sys-log-op-api.ts 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383
  1. /* tslint:disable */
  2. /* eslint-disable */
  3. /**
  4. * Admin.NET 通用权限开发平台
  5. * 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
  6. *
  7. * OpenAPI spec version: 1.0.0
  8. *
  9. *
  10. * NOTE: This class is auto generated by the swagger code generator program.
  11. * https://github.com/swagger-api/swagger-codegen.git
  12. * Do not edit the class manually.
  13. */
  14. import globalAxios, { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios';
  15. import { Configuration } from '../configuration';
  16. // Some imports not used depending on template conditions
  17. // @ts-ignore
  18. import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
  19. import { AdminResultSqlSugarPagedListSysLogOp } from '../models';
  20. import { AdminResultSysLogOp } from '../models';
  21. import { LogInput } from '../models';
  22. import { PageOpLogInput } from '../models';
  23. /**
  24. * SysLogOpApi - axios parameter creator
  25. * @export
  26. */
  27. export const SysLogOpApiAxiosParamCreator = function (configuration?: Configuration) {
  28. return {
  29. /**
  30. *
  31. * @summary 清空操作日志 🔖
  32. * @param {*} [options] Override http request option.
  33. * @throws {RequiredError}
  34. */
  35. apiSysLogOpClearPost: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  36. const localVarPath = `/api/sysLogOp/clear`;
  37. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  38. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  39. let baseOptions;
  40. if (configuration) {
  41. baseOptions = configuration.baseOptions;
  42. }
  43. const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
  44. const localVarHeaderParameter = {} as any;
  45. const localVarQueryParameter = {} as any;
  46. // authentication Bearer required
  47. // http bearer authentication required
  48. if (configuration && configuration.accessToken) {
  49. const accessToken = typeof configuration.accessToken === 'function'
  50. ? await configuration.accessToken()
  51. : await configuration.accessToken;
  52. localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
  53. }
  54. const query = new URLSearchParams(localVarUrlObj.search);
  55. for (const key in localVarQueryParameter) {
  56. query.set(key, localVarQueryParameter[key]);
  57. }
  58. for (const key in options.params) {
  59. query.set(key, options.params[key]);
  60. }
  61. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  62. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  63. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  64. return {
  65. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  66. options: localVarRequestOptions,
  67. };
  68. },
  69. /**
  70. *
  71. * @summary 获取操作日志详情 🔖
  72. * @param {number} id
  73. * @param {*} [options] Override http request option.
  74. * @throws {RequiredError}
  75. */
  76. apiSysLogOpDetailIdGet: async (id: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  77. // verify required parameter 'id' is not null or undefined
  78. if (id === null || id === undefined) {
  79. throw new RequiredError('id','Required parameter id was null or undefined when calling apiSysLogOpDetailIdGet.');
  80. }
  81. const localVarPath = `/api/sysLogOp/detail/{id}`
  82. .replace(`{${"id"}}`, encodeURIComponent(String(id)));
  83. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  84. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  85. let baseOptions;
  86. if (configuration) {
  87. baseOptions = configuration.baseOptions;
  88. }
  89. const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
  90. const localVarHeaderParameter = {} as any;
  91. const localVarQueryParameter = {} as any;
  92. // authentication Bearer required
  93. // http bearer authentication required
  94. if (configuration && configuration.accessToken) {
  95. const accessToken = typeof configuration.accessToken === 'function'
  96. ? await configuration.accessToken()
  97. : await configuration.accessToken;
  98. localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
  99. }
  100. const query = new URLSearchParams(localVarUrlObj.search);
  101. for (const key in localVarQueryParameter) {
  102. query.set(key, localVarQueryParameter[key]);
  103. }
  104. for (const key in options.params) {
  105. query.set(key, options.params[key]);
  106. }
  107. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  108. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  109. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  110. return {
  111. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  112. options: localVarRequestOptions,
  113. };
  114. },
  115. /**
  116. *
  117. * @summary 导出操作日志 🔖
  118. * @param {LogInput} [body]
  119. * @param {*} [options] Override http request option.
  120. * @throws {RequiredError}
  121. */
  122. apiSysLogOpExportPost: async (body?: LogInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  123. const localVarPath = `/api/sysLogOp/export`;
  124. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  125. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  126. let baseOptions;
  127. if (configuration) {
  128. baseOptions = configuration.baseOptions;
  129. }
  130. const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
  131. const localVarHeaderParameter = {} as any;
  132. const localVarQueryParameter = {} as any;
  133. // authentication Bearer required
  134. // http bearer authentication required
  135. if (configuration && configuration.accessToken) {
  136. const accessToken = typeof configuration.accessToken === 'function'
  137. ? await configuration.accessToken()
  138. : await configuration.accessToken;
  139. localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
  140. }
  141. localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
  142. const query = new URLSearchParams(localVarUrlObj.search);
  143. for (const key in localVarQueryParameter) {
  144. query.set(key, localVarQueryParameter[key]);
  145. }
  146. for (const key in options.params) {
  147. query.set(key, options.params[key]);
  148. }
  149. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  150. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  151. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  152. const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
  153. localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
  154. return {
  155. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  156. options: localVarRequestOptions,
  157. };
  158. },
  159. /**
  160. *
  161. * @summary 获取操作日志分页列表 🔖
  162. * @param {PageOpLogInput} [body]
  163. * @param {*} [options] Override http request option.
  164. * @throws {RequiredError}
  165. */
  166. apiSysLogOpPagePost: async (body?: PageOpLogInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  167. const localVarPath = `/api/sysLogOp/page`;
  168. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  169. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  170. let baseOptions;
  171. if (configuration) {
  172. baseOptions = configuration.baseOptions;
  173. }
  174. const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
  175. const localVarHeaderParameter = {} as any;
  176. const localVarQueryParameter = {} as any;
  177. // authentication Bearer required
  178. // http bearer authentication required
  179. if (configuration && configuration.accessToken) {
  180. const accessToken = typeof configuration.accessToken === 'function'
  181. ? await configuration.accessToken()
  182. : await configuration.accessToken;
  183. localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
  184. }
  185. localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
  186. const query = new URLSearchParams(localVarUrlObj.search);
  187. for (const key in localVarQueryParameter) {
  188. query.set(key, localVarQueryParameter[key]);
  189. }
  190. for (const key in options.params) {
  191. query.set(key, options.params[key]);
  192. }
  193. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  194. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  195. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  196. const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
  197. localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
  198. return {
  199. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  200. options: localVarRequestOptions,
  201. };
  202. },
  203. }
  204. };
  205. /**
  206. * SysLogOpApi - functional programming interface
  207. * @export
  208. */
  209. export const SysLogOpApiFp = function(configuration?: Configuration) {
  210. return {
  211. /**
  212. *
  213. * @summary 清空操作日志 🔖
  214. * @param {*} [options] Override http request option.
  215. * @throws {RequiredError}
  216. */
  217. async apiSysLogOpClearPost(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
  218. const localVarAxiosArgs = await SysLogOpApiAxiosParamCreator(configuration).apiSysLogOpClearPost(options);
  219. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  220. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  221. return axios.request(axiosRequestArgs);
  222. };
  223. },
  224. /**
  225. *
  226. * @summary 获取操作日志详情 🔖
  227. * @param {number} id
  228. * @param {*} [options] Override http request option.
  229. * @throws {RequiredError}
  230. */
  231. async apiSysLogOpDetailIdGet(id: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultSysLogOp>>> {
  232. const localVarAxiosArgs = await SysLogOpApiAxiosParamCreator(configuration).apiSysLogOpDetailIdGet(id, options);
  233. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  234. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  235. return axios.request(axiosRequestArgs);
  236. };
  237. },
  238. /**
  239. *
  240. * @summary 导出操作日志 🔖
  241. * @param {LogInput} [body]
  242. * @param {*} [options] Override http request option.
  243. * @throws {RequiredError}
  244. */
  245. async apiSysLogOpExportPost(body?: LogInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
  246. const localVarAxiosArgs = await SysLogOpApiAxiosParamCreator(configuration).apiSysLogOpExportPost(body, options);
  247. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  248. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  249. return axios.request(axiosRequestArgs);
  250. };
  251. },
  252. /**
  253. *
  254. * @summary 获取操作日志分页列表 🔖
  255. * @param {PageOpLogInput} [body]
  256. * @param {*} [options] Override http request option.
  257. * @throws {RequiredError}
  258. */
  259. async apiSysLogOpPagePost(body?: PageOpLogInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultSqlSugarPagedListSysLogOp>>> {
  260. const localVarAxiosArgs = await SysLogOpApiAxiosParamCreator(configuration).apiSysLogOpPagePost(body, options);
  261. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  262. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  263. return axios.request(axiosRequestArgs);
  264. };
  265. },
  266. }
  267. };
  268. /**
  269. * SysLogOpApi - factory interface
  270. * @export
  271. */
  272. export const SysLogOpApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
  273. return {
  274. /**
  275. *
  276. * @summary 清空操作日志 🔖
  277. * @param {*} [options] Override http request option.
  278. * @throws {RequiredError}
  279. */
  280. async apiSysLogOpClearPost(options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
  281. return SysLogOpApiFp(configuration).apiSysLogOpClearPost(options).then((request) => request(axios, basePath));
  282. },
  283. /**
  284. *
  285. * @summary 获取操作日志详情 🔖
  286. * @param {number} id
  287. * @param {*} [options] Override http request option.
  288. * @throws {RequiredError}
  289. */
  290. async apiSysLogOpDetailIdGet(id: number, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultSysLogOp>> {
  291. return SysLogOpApiFp(configuration).apiSysLogOpDetailIdGet(id, options).then((request) => request(axios, basePath));
  292. },
  293. /**
  294. *
  295. * @summary 导出操作日志 🔖
  296. * @param {LogInput} [body]
  297. * @param {*} [options] Override http request option.
  298. * @throws {RequiredError}
  299. */
  300. async apiSysLogOpExportPost(body?: LogInput, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
  301. return SysLogOpApiFp(configuration).apiSysLogOpExportPost(body, options).then((request) => request(axios, basePath));
  302. },
  303. /**
  304. *
  305. * @summary 获取操作日志分页列表 🔖
  306. * @param {PageOpLogInput} [body]
  307. * @param {*} [options] Override http request option.
  308. * @throws {RequiredError}
  309. */
  310. async apiSysLogOpPagePost(body?: PageOpLogInput, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultSqlSugarPagedListSysLogOp>> {
  311. return SysLogOpApiFp(configuration).apiSysLogOpPagePost(body, options).then((request) => request(axios, basePath));
  312. },
  313. };
  314. };
  315. /**
  316. * SysLogOpApi - object-oriented interface
  317. * @export
  318. * @class SysLogOpApi
  319. * @extends {BaseAPI}
  320. */
  321. export class SysLogOpApi extends BaseAPI {
  322. /**
  323. *
  324. * @summary 清空操作日志 🔖
  325. * @param {*} [options] Override http request option.
  326. * @throws {RequiredError}
  327. * @memberof SysLogOpApi
  328. */
  329. public async apiSysLogOpClearPost(options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
  330. return SysLogOpApiFp(this.configuration).apiSysLogOpClearPost(options).then((request) => request(this.axios, this.basePath));
  331. }
  332. /**
  333. *
  334. * @summary 获取操作日志详情 🔖
  335. * @param {number} id
  336. * @param {*} [options] Override http request option.
  337. * @throws {RequiredError}
  338. * @memberof SysLogOpApi
  339. */
  340. public async apiSysLogOpDetailIdGet(id: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultSysLogOp>> {
  341. return SysLogOpApiFp(this.configuration).apiSysLogOpDetailIdGet(id, options).then((request) => request(this.axios, this.basePath));
  342. }
  343. /**
  344. *
  345. * @summary 导出操作日志 🔖
  346. * @param {LogInput} [body]
  347. * @param {*} [options] Override http request option.
  348. * @throws {RequiredError}
  349. * @memberof SysLogOpApi
  350. */
  351. public async apiSysLogOpExportPost(body?: LogInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
  352. return SysLogOpApiFp(this.configuration).apiSysLogOpExportPost(body, options).then((request) => request(this.axios, this.basePath));
  353. }
  354. /**
  355. *
  356. * @summary 获取操作日志分页列表 🔖
  357. * @param {PageOpLogInput} [body]
  358. * @param {*} [options] Override http request option.
  359. * @throws {RequiredError}
  360. * @memberof SysLogOpApi
  361. */
  362. public async apiSysLogOpPagePost(body?: PageOpLogInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultSqlSugarPagedListSysLogOp>> {
  363. return SysLogOpApiFp(this.configuration).apiSysLogOpPagePost(body, options).then((request) => request(this.axios, this.basePath));
  364. }
  365. }