Cache.ts 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /* eslint-disable */
  2. /* tslint:disable */
  3. /*
  4. * ---------------------------------------------------------------
  5. * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
  6. * ## ##
  7. * ## AUTHOR: acacode ##
  8. * ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
  9. * ---------------------------------------------------------------
  10. */
  11. import { AxiosResponse } from 'axios'
  12. import { ResultOutputListObject } from './data-contracts'
  13. import { HttpClient, RequestParams } from './http-client'
  14. export class Cache<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
  15. /**
  16. * No description
  17. *
  18. * @tags cache
  19. * @name GetList
  20. * @summary 查询列表
  21. * @request GET:/api/admin/cache/get-list
  22. * @secure
  23. */
  24. getList = (params: RequestParams = {}) =>
  25. this.request<ResultOutputListObject, any>({
  26. path: `/api/admin/cache/get-list`,
  27. method: 'GET',
  28. secure: true,
  29. format: 'json',
  30. ...params,
  31. })
  32. /**
  33. * No description
  34. *
  35. * @tags cache
  36. * @name Clear
  37. * @summary 清除缓存
  38. * @request DELETE:/api/admin/cache/clear
  39. * @secure
  40. */
  41. clear = (
  42. query?: {
  43. /** 缓存键 */
  44. cacheKey?: string
  45. },
  46. params: RequestParams = {}
  47. ) =>
  48. this.request<AxiosResponse, any>({
  49. path: `/api/admin/cache/clear`,
  50. method: 'DELETE',
  51. query: query,
  52. secure: true,
  53. ...params,
  54. })
  55. }