Add OpenAPI
This commit is contained in:
307
src/api/openapi/service/job-service.ts
Normal file
307
src/api/openapi/service/job-service.ts
Normal file
@@ -0,0 +1,307 @@
|
||||
/* 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.1
|
||||
*
|
||||
*
|
||||
* 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 { JobDto } from '../model';
|
||||
/**
|
||||
* JobService - axios parameter creator
|
||||
* @export
|
||||
*/
|
||||
export const JobServiceAxiosParamCreator = function (configuration?: Configuration) {
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary Get status of CardPrintImportJob
|
||||
* @param {number} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getCardPrintImportJobStatusById: async (id: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
assertParamExists('getCardPrintImportJobStatusById', 'id', id)
|
||||
const localVarPath = `/api/jobs/cardPrintImport/{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,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Get status of CardSetImportJob
|
||||
* @param {number} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getCardSetImportJobStatusById: async (id: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
assertParamExists('getCardSetImportJobStatusById', 'id', id)
|
||||
const localVarPath = `/api/jobs/cardSetImport/{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,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Get status of RegionalSetImportJob
|
||||
* @param {number} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getRegionalSetImportJobStatusById: async (id: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
assertParamExists('getRegionalSetImportJobStatusById', 'id', id)
|
||||
const localVarPath = `/api/jobs/regionalSetImport/{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,
|
||||
};
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* JobService - functional programming interface
|
||||
* @export
|
||||
*/
|
||||
export const JobServiceFp = function(configuration?: Configuration) {
|
||||
const localVarAxiosParamCreator = JobServiceAxiosParamCreator(configuration)
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary Get status of CardPrintImportJob
|
||||
* @param {number} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getCardPrintImportJobStatusById(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<JobDto>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getCardPrintImportJobStatusById(id, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['JobService.getCardPrintImportJobStatusById']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Get status of CardSetImportJob
|
||||
* @param {number} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getCardSetImportJobStatusById(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<JobDto>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getCardSetImportJobStatusById(id, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['JobService.getCardSetImportJobStatusById']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Get status of RegionalSetImportJob
|
||||
* @param {number} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getRegionalSetImportJobStatusById(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<JobDto>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getRegionalSetImportJobStatusById(id, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['JobService.getRegionalSetImportJobStatusById']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* JobService - factory interface
|
||||
* @export
|
||||
*/
|
||||
export const JobServiceFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
||||
const localVarFp = JobServiceFp(configuration)
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary Get status of CardPrintImportJob
|
||||
* @param {number} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getCardPrintImportJobStatusById(id: number, options?: RawAxiosRequestConfig): AxiosPromise<JobDto> {
|
||||
return localVarFp.getCardPrintImportJobStatusById(id, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Get status of CardSetImportJob
|
||||
* @param {number} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getCardSetImportJobStatusById(id: number, options?: RawAxiosRequestConfig): AxiosPromise<JobDto> {
|
||||
return localVarFp.getCardSetImportJobStatusById(id, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Get status of RegionalSetImportJob
|
||||
* @param {number} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getRegionalSetImportJobStatusById(id: number, options?: RawAxiosRequestConfig): AxiosPromise<JobDto> {
|
||||
return localVarFp.getRegionalSetImportJobStatusById(id, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* JobService - interface
|
||||
* @export
|
||||
* @interface JobService
|
||||
*/
|
||||
export interface JobServiceInterface {
|
||||
/**
|
||||
*
|
||||
* @summary Get status of CardPrintImportJob
|
||||
* @param {number} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof JobServiceInterface
|
||||
*/
|
||||
getCardPrintImportJobStatusById(id: number, options?: RawAxiosRequestConfig): AxiosPromise<JobDto>;
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Get status of CardSetImportJob
|
||||
* @param {number} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof JobServiceInterface
|
||||
*/
|
||||
getCardSetImportJobStatusById(id: number, options?: RawAxiosRequestConfig): AxiosPromise<JobDto>;
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Get status of RegionalSetImportJob
|
||||
* @param {number} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof JobServiceInterface
|
||||
*/
|
||||
getRegionalSetImportJobStatusById(id: number, options?: RawAxiosRequestConfig): AxiosPromise<JobDto>;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* JobService - object-oriented interface
|
||||
* @export
|
||||
* @class JobService
|
||||
* @extends {BaseAPI}
|
||||
*/
|
||||
export class JobService extends BaseAPI implements JobServiceInterface {
|
||||
/**
|
||||
*
|
||||
* @summary Get status of CardPrintImportJob
|
||||
* @param {number} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof JobService
|
||||
*/
|
||||
public getCardPrintImportJobStatusById(id: number, options?: RawAxiosRequestConfig) {
|
||||
return JobServiceFp(this.configuration).getCardPrintImportJobStatusById(id, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Get status of CardSetImportJob
|
||||
* @param {number} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof JobService
|
||||
*/
|
||||
public getCardSetImportJobStatusById(id: number, options?: RawAxiosRequestConfig) {
|
||||
return JobServiceFp(this.configuration).getCardSetImportJobStatusById(id, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Get status of RegionalSetImportJob
|
||||
* @param {number} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof JobService
|
||||
*/
|
||||
public getRegionalSetImportJobStatusById(id: number, options?: RawAxiosRequestConfig) {
|
||||
return JobServiceFp(this.configuration).getRegionalSetImportJobStatusById(id, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user