/* tslint:disable */ /* eslint-disable */ /** * 统一管理平台API文档 * 包含模块:会员、账号、商品、支付、咨询、营销 * * OpenAPI spec version: 2.0 * * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; import { Configuration } from '../configuration'; // Some imports not used depending on template conditions // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; import { Log } from '../models'; import { ResponseResult } from '../models'; /** * LogControllerApi - axios parameter creator * @export */ export const LogControllerApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * * @param {number} page * @param {number} rows * @param {Log} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ getLogList: async (page: number, rows: number, body?: Log, options: any = {}): Promise => { // verify required parameter 'page' is not null or undefined if (page === null || page === undefined) { throw new RequiredError('page','Required parameter page was null or undefined when calling getLogList.'); } // verify required parameter 'rows' is not null or undefined if (rows === null || rows === undefined) { throw new RequiredError('rows','Required parameter rows was null or undefined when calling getLogList.'); } const localVarPath = `/log/list/{page}/{rows}` .replace(`{${"page"}}`, encodeURIComponent(String(page))) .replace(`{${"rows"}}`, encodeURIComponent(String(rows))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, 'https://example.com'); 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'; const query = new URLSearchParams(localVarUrlObj.search); for (const key in localVarQueryParameter) { query.set(key, localVarQueryParameter[key]); } for (const key in options.query) { query.set(key, options.query[key]); } localVarUrlObj.search = (new URLSearchParams(query)).toString(); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); return { url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, options: localVarRequestOptions, }; }, } }; /** * LogControllerApi - functional programming interface * @export */ export const LogControllerApiFp = function(configuration?: Configuration) { return { /** * * @param {number} page * @param {number} rows * @param {Log} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getLogList(page: number, rows: number, body?: Log, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await LogControllerApiAxiosParamCreator(configuration).getLogList(page, rows, body, options); return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; return axios.request(axiosRequestArgs); }; }, } }; /** * LogControllerApi - factory interface * @export */ export const LogControllerApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { return { /** * * @param {number} page * @param {number} rows * @param {Log} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ getLogList(page: number, rows: number, body?: Log, options?: any): AxiosPromise { return LogControllerApiFp(configuration).getLogList(page, rows, body, options).then((request) => request(axios, basePath)); }, }; }; /** * LogControllerApi - object-oriented interface * @export * @class LogControllerApi * @extends {BaseAPI} */ export class LogControllerApi extends BaseAPI { /** * * @param {number} page * @param {number} rows * @param {Log} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof LogControllerApi */ public getLogList(page: number, rows: number, body?: Log, options?: any) { return LogControllerApiFp(this.configuration).getLogList(page, rows, body, options).then((request) => request(this.axios, this.basePath)); } }