sys-cache-api.ts 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355
  1. /* tslint:disable */
  2. /* eslint-disable */
  3. /**
  4. * Admin.NET
  5. * 让 .NET 开发更简单、更通用、更流行。前后端分离架构(.NET6/Vue3),开箱即用紧随前沿技术。<br/><a href='https://gitee.com/zuohuaijun/Admin.NET/'>https://gitee.com/zuohuaijun/Admin.NET</a>
  6. *
  7. * OpenAPI spec version: 1.0.0
  8. * Contact: 515096995@qq.com
  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 { AdminResultInt32 } from '../models';
  20. import { AdminResultListString } from '../models';
  21. import { AdminResultObject } from '../models';
  22. /**
  23. * SysCacheApi - axios parameter creator
  24. * @export
  25. */
  26. export const SysCacheApiAxiosParamCreator = function (configuration?: Configuration) {
  27. return {
  28. /**
  29. *
  30. * @summary 根据键名前缀删除缓存
  31. * @param {string} prefixKey 键名前缀
  32. * @param {*} [options] Override http request option.
  33. * @throws {RequiredError}
  34. */
  35. apiSysCacheDeleteByPreKeyPrefixKeyDelete: async (prefixKey: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  36. // verify required parameter 'prefixKey' is not null or undefined
  37. if (prefixKey === null || prefixKey === undefined) {
  38. throw new RequiredError('prefixKey','Required parameter prefixKey was null or undefined when calling apiSysCacheDeleteByPreKeyPrefixKeyDelete.');
  39. }
  40. const localVarPath = `/api/sysCache/deleteByPreKey/{prefixKey}`
  41. .replace(`{${"prefixKey"}}`, encodeURIComponent(String(prefixKey)));
  42. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  43. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  44. let baseOptions;
  45. if (configuration) {
  46. baseOptions = configuration.baseOptions;
  47. }
  48. const localVarRequestOptions :AxiosRequestConfig = { method: 'DELETE', ...baseOptions, ...options};
  49. const localVarHeaderParameter = {} as any;
  50. const localVarQueryParameter = {} as any;
  51. // authentication Bearer required
  52. const query = new URLSearchParams(localVarUrlObj.search);
  53. for (const key in localVarQueryParameter) {
  54. query.set(key, localVarQueryParameter[key]);
  55. }
  56. for (const key in options.params) {
  57. query.set(key, options.params[key]);
  58. }
  59. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  60. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  61. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  62. return {
  63. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  64. options: localVarRequestOptions,
  65. };
  66. },
  67. /**
  68. *
  69. * @summary 删除缓存
  70. * @param {string} key
  71. * @param {*} [options] Override http request option.
  72. * @throws {RequiredError}
  73. */
  74. apiSysCacheDeleteKeyDelete: async (key: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  75. // verify required parameter 'key' is not null or undefined
  76. if (key === null || key === undefined) {
  77. throw new RequiredError('key','Required parameter key was null or undefined when calling apiSysCacheDeleteKeyDelete.');
  78. }
  79. const localVarPath = `/api/sysCache/delete/{key}`
  80. .replace(`{${"key"}}`, encodeURIComponent(String(key)));
  81. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  82. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  83. let baseOptions;
  84. if (configuration) {
  85. baseOptions = configuration.baseOptions;
  86. }
  87. const localVarRequestOptions :AxiosRequestConfig = { method: 'DELETE', ...baseOptions, ...options};
  88. const localVarHeaderParameter = {} as any;
  89. const localVarQueryParameter = {} as any;
  90. // authentication Bearer required
  91. const query = new URLSearchParams(localVarUrlObj.search);
  92. for (const key in localVarQueryParameter) {
  93. query.set(key, localVarQueryParameter[key]);
  94. }
  95. for (const key in options.params) {
  96. query.set(key, options.params[key]);
  97. }
  98. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  99. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  100. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  101. return {
  102. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  103. options: localVarRequestOptions,
  104. };
  105. },
  106. /**
  107. *
  108. * @summary 获取缓存键名集合
  109. * @param {*} [options] Override http request option.
  110. * @throws {RequiredError}
  111. */
  112. apiSysCacheKeyListGet: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  113. const localVarPath = `/api/sysCache/keyList`;
  114. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  115. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  116. let baseOptions;
  117. if (configuration) {
  118. baseOptions = configuration.baseOptions;
  119. }
  120. const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
  121. const localVarHeaderParameter = {} as any;
  122. const localVarQueryParameter = {} as any;
  123. // authentication Bearer required
  124. const query = new URLSearchParams(localVarUrlObj.search);
  125. for (const key in localVarQueryParameter) {
  126. query.set(key, localVarQueryParameter[key]);
  127. }
  128. for (const key in options.params) {
  129. query.set(key, options.params[key]);
  130. }
  131. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  132. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  133. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  134. return {
  135. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  136. options: localVarRequestOptions,
  137. };
  138. },
  139. /**
  140. *
  141. * @summary 获取缓存值
  142. * @param {string} key
  143. * @param {*} [options] Override http request option.
  144. * @throws {RequiredError}
  145. */
  146. apiSysCacheValueKeyGet: async (key: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  147. // verify required parameter 'key' is not null or undefined
  148. if (key === null || key === undefined) {
  149. throw new RequiredError('key','Required parameter key was null or undefined when calling apiSysCacheValueKeyGet.');
  150. }
  151. const localVarPath = `/api/sysCache/value/{key}`
  152. .replace(`{${"key"}}`, encodeURIComponent(String(key)));
  153. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  154. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  155. let baseOptions;
  156. if (configuration) {
  157. baseOptions = configuration.baseOptions;
  158. }
  159. const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
  160. const localVarHeaderParameter = {} as any;
  161. const localVarQueryParameter = {} as any;
  162. // authentication Bearer required
  163. const query = new URLSearchParams(localVarUrlObj.search);
  164. for (const key in localVarQueryParameter) {
  165. query.set(key, localVarQueryParameter[key]);
  166. }
  167. for (const key in options.params) {
  168. query.set(key, options.params[key]);
  169. }
  170. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  171. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  172. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  173. return {
  174. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  175. options: localVarRequestOptions,
  176. };
  177. },
  178. }
  179. };
  180. /**
  181. * SysCacheApi - functional programming interface
  182. * @export
  183. */
  184. export const SysCacheApiFp = function(configuration?: Configuration) {
  185. return {
  186. /**
  187. *
  188. * @summary 根据键名前缀删除缓存
  189. * @param {string} prefixKey 键名前缀
  190. * @param {*} [options] Override http request option.
  191. * @throws {RequiredError}
  192. */
  193. async apiSysCacheDeleteByPreKeyPrefixKeyDelete(prefixKey: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultInt32>>> {
  194. const localVarAxiosArgs = await SysCacheApiAxiosParamCreator(configuration).apiSysCacheDeleteByPreKeyPrefixKeyDelete(prefixKey, options);
  195. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  196. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  197. return axios.request(axiosRequestArgs);
  198. };
  199. },
  200. /**
  201. *
  202. * @summary 删除缓存
  203. * @param {string} key
  204. * @param {*} [options] Override http request option.
  205. * @throws {RequiredError}
  206. */
  207. async apiSysCacheDeleteKeyDelete(key: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
  208. const localVarAxiosArgs = await SysCacheApiAxiosParamCreator(configuration).apiSysCacheDeleteKeyDelete(key, options);
  209. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  210. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  211. return axios.request(axiosRequestArgs);
  212. };
  213. },
  214. /**
  215. *
  216. * @summary 获取缓存键名集合
  217. * @param {*} [options] Override http request option.
  218. * @throws {RequiredError}
  219. */
  220. async apiSysCacheKeyListGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultListString>>> {
  221. const localVarAxiosArgs = await SysCacheApiAxiosParamCreator(configuration).apiSysCacheKeyListGet(options);
  222. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  223. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  224. return axios.request(axiosRequestArgs);
  225. };
  226. },
  227. /**
  228. *
  229. * @summary 获取缓存值
  230. * @param {string} key
  231. * @param {*} [options] Override http request option.
  232. * @throws {RequiredError}
  233. */
  234. async apiSysCacheValueKeyGet(key: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultObject>>> {
  235. const localVarAxiosArgs = await SysCacheApiAxiosParamCreator(configuration).apiSysCacheValueKeyGet(key, options);
  236. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  237. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  238. return axios.request(axiosRequestArgs);
  239. };
  240. },
  241. }
  242. };
  243. /**
  244. * SysCacheApi - factory interface
  245. * @export
  246. */
  247. export const SysCacheApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
  248. return {
  249. /**
  250. *
  251. * @summary 根据键名前缀删除缓存
  252. * @param {string} prefixKey 键名前缀
  253. * @param {*} [options] Override http request option.
  254. * @throws {RequiredError}
  255. */
  256. async apiSysCacheDeleteByPreKeyPrefixKeyDelete(prefixKey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultInt32>> {
  257. return SysCacheApiFp(configuration).apiSysCacheDeleteByPreKeyPrefixKeyDelete(prefixKey, options).then((request) => request(axios, basePath));
  258. },
  259. /**
  260. *
  261. * @summary 删除缓存
  262. * @param {string} key
  263. * @param {*} [options] Override http request option.
  264. * @throws {RequiredError}
  265. */
  266. async apiSysCacheDeleteKeyDelete(key: string, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
  267. return SysCacheApiFp(configuration).apiSysCacheDeleteKeyDelete(key, options).then((request) => request(axios, basePath));
  268. },
  269. /**
  270. *
  271. * @summary 获取缓存键名集合
  272. * @param {*} [options] Override http request option.
  273. * @throws {RequiredError}
  274. */
  275. async apiSysCacheKeyListGet(options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultListString>> {
  276. return SysCacheApiFp(configuration).apiSysCacheKeyListGet(options).then((request) => request(axios, basePath));
  277. },
  278. /**
  279. *
  280. * @summary 获取缓存值
  281. * @param {string} key
  282. * @param {*} [options] Override http request option.
  283. * @throws {RequiredError}
  284. */
  285. async apiSysCacheValueKeyGet(key: string, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultObject>> {
  286. return SysCacheApiFp(configuration).apiSysCacheValueKeyGet(key, options).then((request) => request(axios, basePath));
  287. },
  288. };
  289. };
  290. /**
  291. * SysCacheApi - object-oriented interface
  292. * @export
  293. * @class SysCacheApi
  294. * @extends {BaseAPI}
  295. */
  296. export class SysCacheApi extends BaseAPI {
  297. /**
  298. *
  299. * @summary 根据键名前缀删除缓存
  300. * @param {string} prefixKey 键名前缀
  301. * @param {*} [options] Override http request option.
  302. * @throws {RequiredError}
  303. * @memberof SysCacheApi
  304. */
  305. public async apiSysCacheDeleteByPreKeyPrefixKeyDelete(prefixKey: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultInt32>> {
  306. return SysCacheApiFp(this.configuration).apiSysCacheDeleteByPreKeyPrefixKeyDelete(prefixKey, options).then((request) => request(this.axios, this.basePath));
  307. }
  308. /**
  309. *
  310. * @summary 删除缓存
  311. * @param {string} key
  312. * @param {*} [options] Override http request option.
  313. * @throws {RequiredError}
  314. * @memberof SysCacheApi
  315. */
  316. public async apiSysCacheDeleteKeyDelete(key: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
  317. return SysCacheApiFp(this.configuration).apiSysCacheDeleteKeyDelete(key, options).then((request) => request(this.axios, this.basePath));
  318. }
  319. /**
  320. *
  321. * @summary 获取缓存键名集合
  322. * @param {*} [options] Override http request option.
  323. * @throws {RequiredError}
  324. * @memberof SysCacheApi
  325. */
  326. public async apiSysCacheKeyListGet(options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultListString>> {
  327. return SysCacheApiFp(this.configuration).apiSysCacheKeyListGet(options).then((request) => request(this.axios, this.basePath));
  328. }
  329. /**
  330. *
  331. * @summary 获取缓存值
  332. * @param {string} key
  333. * @param {*} [options] Override http request option.
  334. * @throws {RequiredError}
  335. * @memberof SysCacheApi
  336. */
  337. public async apiSysCacheValueKeyGet(key: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultObject>> {
  338. return SysCacheApiFp(this.configuration).apiSysCacheValueKeyGet(key, options).then((request) => request(this.axios, this.basePath));
  339. }
  340. }