/* 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 { 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 => { 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> { 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 {string | null} [name] * @param {number} [page] * @param {number} [pageSize] * @param {*} [options] Override http request option. * @throws {RequiredError} */ getCardPrintPage(name?: string | null, page?: number, pageSize?: number, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.getCardPrintPage(name, page, pageSize, options).then((request) => request(axios, basePath)); }, }; }; /** * CardPrintService - interface * @export * @interface CardPrintService */ export interface CardPrintServiceInterface { /** * * @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} * @memberof CardPrintServiceInterface */ getCardPrintPage(name?: string | null, page?: number, pageSize?: number, options?: RawAxiosRequestConfig): AxiosPromise; } /** * CardPrintService - object-oriented interface * @export * @class CardPrintService * @extends {BaseAPI} */ export class CardPrintService extends BaseAPI implements CardPrintServiceInterface { /** * * @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} * @memberof CardPrintService */ public getCardPrintPage(name?: string | null, page?: number, pageSize?: number, options?: RawAxiosRequestConfig) { return CardPrintServiceFp(this.configuration).getCardPrintPage(name, page, pageSize, options).then((request) => request(this.axios, this.basePath)); } }