Files
dex-ui-vue/src/api/openapi/service/card-print-service.ts

173 lines
6.6 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 { PageCardPrintDto } from '../model';
/**
* CardPrintService - axios parameter creator
* @export
*/
export const CardPrintServiceAxiosParamCreator = function (configuration?: Configuration) {
return {
/**
*
* @summary Get a page of Card Prints with optional name query parameter
* @param {string | null} [name]
* @param {number} [page]
* @param {number} [pageSize]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getCardPrintPage: async (name?: string | null, page?: number, pageSize?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/api/prints`;
// 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,
};
},
}
};
/**
* CardPrintService - functional programming interface
* @export
*/
export const CardPrintServiceFp = function(configuration?: Configuration) {
const localVarAxiosParamCreator = CardPrintServiceAxiosParamCreator(configuration)
return {
/**
*
* @summary Get a page of Card Prints with optional name query parameter
* @param {string | null} [name]
* @param {number} [page]
* @param {number} [pageSize]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getCardPrintPage(name?: string | null, page?: number, pageSize?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PageCardPrintDto>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getCardPrintPage(name, page, pageSize, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['CardPrintService.getCardPrintPage']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
}
};
/**
* CardPrintService - factory interface
* @export
*/
export const CardPrintServiceFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
const localVarFp = CardPrintServiceFp(configuration)
return {
/**
*
* @summary Get a page of Card Prints with optional name query parameter
* @param {CardPrintServiceGetCardPrintPageRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getCardPrintPage(requestParameters: CardPrintServiceGetCardPrintPageRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<PageCardPrintDto> {
return localVarFp.getCardPrintPage(requestParameters.name, requestParameters.page, requestParameters.pageSize, options).then((request) => request(axios, basePath));
},
};
};
/**
* Request parameters for getCardPrintPage operation in CardPrintService.
* @export
* @interface CardPrintServiceGetCardPrintPageRequest
*/
export interface CardPrintServiceGetCardPrintPageRequest {
/**
*
* @type {string}
* @memberof CardPrintServiceGetCardPrintPage
*/
readonly name?: string | null
/**
*
* @type {number}
* @memberof CardPrintServiceGetCardPrintPage
*/
readonly page?: number
/**
*
* @type {number}
* @memberof CardPrintServiceGetCardPrintPage
*/
readonly pageSize?: number
}
/**
* CardPrintService - object-oriented interface
* @export
* @class CardPrintService
* @extends {BaseAPI}
*/
export class CardPrintService extends BaseAPI {
/**
*
* @summary Get a page of Card Prints with optional name query parameter
* @param {CardPrintServiceGetCardPrintPageRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof CardPrintService
*/
public getCardPrintPage(requestParameters: CardPrintServiceGetCardPrintPageRequest = {}, options?: RawAxiosRequestConfig) {
return CardPrintServiceFp(this.configuration).getCardPrintPage(requestParameters.name, requestParameters.page, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
}
}