424 lines
18 KiB
TypeScript
424 lines
18 KiB
TypeScript
/* tslint:disable */
|
|
/* eslint-disable */
|
|
/**
|
|
* dex API
|
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
*
|
|
* The version of the OpenAPI document: 0.0.5
|
|
*
|
|
*
|
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
* https://openapi-generator.tech
|
|
* Do not edit the class manually.
|
|
*/
|
|
|
|
|
|
import type { Configuration } from '../configuration';
|
|
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
|
import globalAxios 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, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
|
|
// @ts-ignore
|
|
import type { PageSetDto } from '../model';
|
|
// @ts-ignore
|
|
import type { SetDto } from '../model';
|
|
/**
|
|
* SetService - axios parameter creator
|
|
* @export
|
|
*/
|
|
export const SetServiceAxiosParamCreator = function (configuration?: Configuration) {
|
|
return {
|
|
/**
|
|
*
|
|
* @summary Find Set By Name
|
|
* @param {string} name
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
apiSetsNameGet: async (name: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
// verify required parameter 'name' is not null or undefined
|
|
assertParamExists('apiSetsNameGet', 'name', name)
|
|
const localVarPath = `/api/sets/{name}`
|
|
.replace(`{${"name"}}`, encodeURIComponent(String(name)));
|
|
// 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,
|
|
};
|
|
},
|
|
/**
|
|
*
|
|
* @summary Fetch And Persist From Upstream
|
|
* @param {string} name
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
apiSetsNameNewGet: async (name: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
// verify required parameter 'name' is not null or undefined
|
|
assertParamExists('apiSetsNameNewGet', 'name', name)
|
|
const localVarPath = `/api/sets/{name}/new`
|
|
.replace(`{${"name"}}`, encodeURIComponent(String(name)));
|
|
// 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,
|
|
};
|
|
},
|
|
/**
|
|
*
|
|
* @summary Get a page of Card Sets with optional name query parameter
|
|
* @param {string | null} [name]
|
|
* @param {number} [page]
|
|
* @param {number} [pageSize]
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
getCardSetPage: async (name?: string | null, page?: number, pageSize?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
const localVarPath = `/api/sets`;
|
|
// 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 (name !== undefined) {
|
|
localVarQueryParameter['name'] = name;
|
|
}
|
|
|
|
if (page !== undefined) {
|
|
localVarQueryParameter['page'] = page;
|
|
}
|
|
|
|
if (pageSize !== undefined) {
|
|
localVarQueryParameter['pageSize'] = pageSize;
|
|
}
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
options: localVarRequestOptions,
|
|
};
|
|
},
|
|
/**
|
|
*
|
|
* @summary Scrape a CardSet via name query parameter
|
|
* @param {string} name
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
scrapeSetByName: async (name: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
// verify required parameter 'name' is not null or undefined
|
|
assertParamExists('scrapeSetByName', 'name', name)
|
|
const localVarPath = `/api/sets/{name}/scrape`
|
|
.replace(`{${"name"}}`, encodeURIComponent(String(name)));
|
|
// 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,
|
|
};
|
|
},
|
|
}
|
|
};
|
|
|
|
/**
|
|
* SetService - functional programming interface
|
|
* @export
|
|
*/
|
|
export const SetServiceFp = function(configuration?: Configuration) {
|
|
const localVarAxiosParamCreator = SetServiceAxiosParamCreator(configuration)
|
|
return {
|
|
/**
|
|
*
|
|
* @summary Find Set By Name
|
|
* @param {string} name
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async apiSetsNameGet(name: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SetDto>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.apiSetsNameGet(name, options);
|
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
const localVarOperationServerBasePath = operationServerMap['SetService.apiSetsNameGet']?.[localVarOperationServerIndex]?.url;
|
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
},
|
|
/**
|
|
*
|
|
* @summary Fetch And Persist From Upstream
|
|
* @param {string} name
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async apiSetsNameNewGet(name: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<SetDto>>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.apiSetsNameNewGet(name, options);
|
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
const localVarOperationServerBasePath = operationServerMap['SetService.apiSetsNameNewGet']?.[localVarOperationServerIndex]?.url;
|
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
},
|
|
/**
|
|
*
|
|
* @summary Get a page of Card Sets with optional name query parameter
|
|
* @param {string | null} [name]
|
|
* @param {number} [page]
|
|
* @param {number} [pageSize]
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async getCardSetPage(name?: string | null, page?: number, pageSize?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PageSetDto>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getCardSetPage(name, page, pageSize, options);
|
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
const localVarOperationServerBasePath = operationServerMap['SetService.getCardSetPage']?.[localVarOperationServerIndex]?.url;
|
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
},
|
|
/**
|
|
*
|
|
* @summary Scrape a CardSet via name query parameter
|
|
* @param {string} name
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async scrapeSetByName(name: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.scrapeSetByName(name, options);
|
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
const localVarOperationServerBasePath = operationServerMap['SetService.scrapeSetByName']?.[localVarOperationServerIndex]?.url;
|
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
},
|
|
}
|
|
};
|
|
|
|
/**
|
|
* SetService - factory interface
|
|
* @export
|
|
*/
|
|
export const SetServiceFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
const localVarFp = SetServiceFp(configuration)
|
|
return {
|
|
/**
|
|
*
|
|
* @summary Find Set By Name
|
|
* @param {SetServiceApiSetsNameGetRequest} requestParameters Request parameters.
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
apiSetsNameGet(requestParameters: SetServiceApiSetsNameGetRequest, options?: RawAxiosRequestConfig): AxiosPromise<SetDto> {
|
|
return localVarFp.apiSetsNameGet(requestParameters.name, options).then((request) => request(axios, basePath));
|
|
},
|
|
/**
|
|
*
|
|
* @summary Fetch And Persist From Upstream
|
|
* @param {SetServiceApiSetsNameNewGetRequest} requestParameters Request parameters.
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
apiSetsNameNewGet(requestParameters: SetServiceApiSetsNameNewGetRequest, options?: RawAxiosRequestConfig): AxiosPromise<Array<SetDto>> {
|
|
return localVarFp.apiSetsNameNewGet(requestParameters.name, options).then((request) => request(axios, basePath));
|
|
},
|
|
/**
|
|
*
|
|
* @summary Get a page of Card Sets with optional name query parameter
|
|
* @param {SetServiceGetCardSetPageRequest} requestParameters Request parameters.
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
getCardSetPage(requestParameters: SetServiceGetCardSetPageRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<PageSetDto> {
|
|
return localVarFp.getCardSetPage(requestParameters.name, requestParameters.page, requestParameters.pageSize, options).then((request) => request(axios, basePath));
|
|
},
|
|
/**
|
|
*
|
|
* @summary Scrape a CardSet via name query parameter
|
|
* @param {SetServiceScrapeSetByNameRequest} requestParameters Request parameters.
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
scrapeSetByName(requestParameters: SetServiceScrapeSetByNameRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
|
|
return localVarFp.scrapeSetByName(requestParameters.name, options).then((request) => request(axios, basePath));
|
|
},
|
|
};
|
|
};
|
|
|
|
/**
|
|
* Request parameters for apiSetsNameGet operation in SetService.
|
|
* @export
|
|
* @interface SetServiceApiSetsNameGetRequest
|
|
*/
|
|
export interface SetServiceApiSetsNameGetRequest {
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof SetServiceApiSetsNameGet
|
|
*/
|
|
readonly name: string
|
|
}
|
|
|
|
/**
|
|
* Request parameters for apiSetsNameNewGet operation in SetService.
|
|
* @export
|
|
* @interface SetServiceApiSetsNameNewGetRequest
|
|
*/
|
|
export interface SetServiceApiSetsNameNewGetRequest {
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof SetServiceApiSetsNameNewGet
|
|
*/
|
|
readonly name: string
|
|
}
|
|
|
|
/**
|
|
* Request parameters for getCardSetPage operation in SetService.
|
|
* @export
|
|
* @interface SetServiceGetCardSetPageRequest
|
|
*/
|
|
export interface SetServiceGetCardSetPageRequest {
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof SetServiceGetCardSetPage
|
|
*/
|
|
readonly name?: string | null
|
|
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof SetServiceGetCardSetPage
|
|
*/
|
|
readonly page?: number
|
|
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof SetServiceGetCardSetPage
|
|
*/
|
|
readonly pageSize?: number
|
|
}
|
|
|
|
/**
|
|
* Request parameters for scrapeSetByName operation in SetService.
|
|
* @export
|
|
* @interface SetServiceScrapeSetByNameRequest
|
|
*/
|
|
export interface SetServiceScrapeSetByNameRequest {
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof SetServiceScrapeSetByName
|
|
*/
|
|
readonly name: string
|
|
}
|
|
|
|
/**
|
|
* SetService - object-oriented interface
|
|
* @export
|
|
* @class SetService
|
|
* @extends {BaseAPI}
|
|
*/
|
|
export class SetService extends BaseAPI {
|
|
/**
|
|
*
|
|
* @summary Find Set By Name
|
|
* @param {SetServiceApiSetsNameGetRequest} requestParameters Request parameters.
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof SetService
|
|
*/
|
|
public apiSetsNameGet(requestParameters: SetServiceApiSetsNameGetRequest, options?: RawAxiosRequestConfig) {
|
|
return SetServiceFp(this.configuration).apiSetsNameGet(requestParameters.name, options).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
|
|
/**
|
|
*
|
|
* @summary Fetch And Persist From Upstream
|
|
* @param {SetServiceApiSetsNameNewGetRequest} requestParameters Request parameters.
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof SetService
|
|
*/
|
|
public apiSetsNameNewGet(requestParameters: SetServiceApiSetsNameNewGetRequest, options?: RawAxiosRequestConfig) {
|
|
return SetServiceFp(this.configuration).apiSetsNameNewGet(requestParameters.name, options).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
|
|
/**
|
|
*
|
|
* @summary Get a page of Card Sets with optional name query parameter
|
|
* @param {SetServiceGetCardSetPageRequest} requestParameters Request parameters.
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof SetService
|
|
*/
|
|
public getCardSetPage(requestParameters: SetServiceGetCardSetPageRequest = {}, options?: RawAxiosRequestConfig) {
|
|
return SetServiceFp(this.configuration).getCardSetPage(requestParameters.name, requestParameters.page, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
|
|
/**
|
|
*
|
|
* @summary Scrape a CardSet via name query parameter
|
|
* @param {SetServiceScrapeSetByNameRequest} requestParameters Request parameters.
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof SetService
|
|
*/
|
|
public scrapeSetByName(requestParameters: SetServiceScrapeSetByNameRequest, options?: RawAxiosRequestConfig) {
|
|
return SetServiceFp(this.configuration).scrapeSetByName(requestParameters.name, options).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
}
|
|
|