sys-cache-api.ts 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468
  1. /* tslint:disable */
  2. /* eslint-disable */
  3. /**
  4. * Admin.NET 通用权限开发平台
  5. * 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><br/>👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,均与作者无关!
  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 { 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. apiSysCacheDeleteByPreKeyPrefixKeyPost: 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 apiSysCacheDeleteByPreKeyPrefixKeyPost.');
  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: 'POST', ...baseOptions, ...options};
  49. const localVarHeaderParameter = {} as any;
  50. const localVarQueryParameter = {} as any;
  51. // authentication Bearer required
  52. // http bearer authentication required
  53. if (configuration && configuration.accessToken) {
  54. const accessToken = typeof configuration.accessToken === 'function'
  55. ? await configuration.accessToken()
  56. : await configuration.accessToken;
  57. localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
  58. }
  59. const query = new URLSearchParams(localVarUrlObj.search);
  60. for (const key in localVarQueryParameter) {
  61. query.set(key, localVarQueryParameter[key]);
  62. }
  63. for (const key in options.params) {
  64. query.set(key, options.params[key]);
  65. }
  66. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  67. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  68. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  69. return {
  70. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  71. options: localVarRequestOptions,
  72. };
  73. },
  74. /**
  75. *
  76. * @summary 删除缓存
  77. * @param {string} key
  78. * @param {*} [options] Override http request option.
  79. * @throws {RequiredError}
  80. */
  81. apiSysCacheDeleteKeyPost: async (key: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  82. // verify required parameter 'key' is not null or undefined
  83. if (key === null || key === undefined) {
  84. throw new RequiredError('key','Required parameter key was null or undefined when calling apiSysCacheDeleteKeyPost.');
  85. }
  86. const localVarPath = `/api/sysCache/delete/{key}`
  87. .replace(`{${"key"}}`, encodeURIComponent(String(key)));
  88. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  89. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  90. let baseOptions;
  91. if (configuration) {
  92. baseOptions = configuration.baseOptions;
  93. }
  94. const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
  95. const localVarHeaderParameter = {} as any;
  96. const localVarQueryParameter = {} as any;
  97. // authentication Bearer required
  98. // http bearer authentication required
  99. if (configuration && configuration.accessToken) {
  100. const accessToken = typeof configuration.accessToken === 'function'
  101. ? await configuration.accessToken()
  102. : await configuration.accessToken;
  103. localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
  104. }
  105. const query = new URLSearchParams(localVarUrlObj.search);
  106. for (const key in localVarQueryParameter) {
  107. query.set(key, localVarQueryParameter[key]);
  108. }
  109. for (const key in options.params) {
  110. query.set(key, options.params[key]);
  111. }
  112. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  113. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  114. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  115. return {
  116. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  117. options: localVarRequestOptions,
  118. };
  119. },
  120. /**
  121. *
  122. * @summary 获取缓存键名集合
  123. * @param {*} [options] Override http request option.
  124. * @throws {RequiredError}
  125. */
  126. apiSysCacheKeyListGet: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  127. const localVarPath = `/api/sysCache/keyList`;
  128. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  129. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  130. let baseOptions;
  131. if (configuration) {
  132. baseOptions = configuration.baseOptions;
  133. }
  134. const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
  135. const localVarHeaderParameter = {} as any;
  136. const localVarQueryParameter = {} as any;
  137. // authentication Bearer required
  138. // http bearer authentication required
  139. if (configuration && configuration.accessToken) {
  140. const accessToken = typeof configuration.accessToken === 'function'
  141. ? await configuration.accessToken()
  142. : await configuration.accessToken;
  143. localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
  144. }
  145. const query = new URLSearchParams(localVarUrlObj.search);
  146. for (const key in localVarQueryParameter) {
  147. query.set(key, localVarQueryParameter[key]);
  148. }
  149. for (const key in options.params) {
  150. query.set(key, options.params[key]);
  151. }
  152. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  153. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  154. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  155. return {
  156. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  157. options: localVarRequestOptions,
  158. };
  159. },
  160. /**
  161. *
  162. * @summary 根据键名前缀获取键名集合
  163. * @param {string} prefixKey 键名前缀
  164. * @param {*} [options] Override http request option.
  165. * @throws {RequiredError}
  166. */
  167. apiSysCacheKeysByPrefixKeyPrefixKeyGet: async (prefixKey: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  168. // verify required parameter 'prefixKey' is not null or undefined
  169. if (prefixKey === null || prefixKey === undefined) {
  170. throw new RequiredError('prefixKey','Required parameter prefixKey was null or undefined when calling apiSysCacheKeysByPrefixKeyPrefixKeyGet.');
  171. }
  172. const localVarPath = `/api/sysCache/keysByPrefixKey/{prefixKey}`
  173. .replace(`{${"prefixKey"}}`, encodeURIComponent(String(prefixKey)));
  174. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  175. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  176. let baseOptions;
  177. if (configuration) {
  178. baseOptions = configuration.baseOptions;
  179. }
  180. const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
  181. const localVarHeaderParameter = {} as any;
  182. const localVarQueryParameter = {} as any;
  183. // authentication Bearer required
  184. // http bearer authentication required
  185. if (configuration && configuration.accessToken) {
  186. const accessToken = typeof configuration.accessToken === 'function'
  187. ? await configuration.accessToken()
  188. : await configuration.accessToken;
  189. localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
  190. }
  191. const query = new URLSearchParams(localVarUrlObj.search);
  192. for (const key in localVarQueryParameter) {
  193. query.set(key, localVarQueryParameter[key]);
  194. }
  195. for (const key in options.params) {
  196. query.set(key, options.params[key]);
  197. }
  198. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  199. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  200. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  201. return {
  202. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  203. options: localVarRequestOptions,
  204. };
  205. },
  206. /**
  207. *
  208. * @summary 获取缓存值
  209. * @param {string} key
  210. * @param {*} [options] Override http request option.
  211. * @throws {RequiredError}
  212. */
  213. apiSysCacheValueKeyGet: async (key: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  214. // verify required parameter 'key' is not null or undefined
  215. if (key === null || key === undefined) {
  216. throw new RequiredError('key','Required parameter key was null or undefined when calling apiSysCacheValueKeyGet.');
  217. }
  218. const localVarPath = `/api/sysCache/value/{key}`
  219. .replace(`{${"key"}}`, encodeURIComponent(String(key)));
  220. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  221. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  222. let baseOptions;
  223. if (configuration) {
  224. baseOptions = configuration.baseOptions;
  225. }
  226. const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
  227. const localVarHeaderParameter = {} as any;
  228. const localVarQueryParameter = {} as any;
  229. // authentication Bearer required
  230. // http bearer authentication required
  231. if (configuration && configuration.accessToken) {
  232. const accessToken = typeof configuration.accessToken === 'function'
  233. ? await configuration.accessToken()
  234. : await configuration.accessToken;
  235. localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
  236. }
  237. const query = new URLSearchParams(localVarUrlObj.search);
  238. for (const key in localVarQueryParameter) {
  239. query.set(key, localVarQueryParameter[key]);
  240. }
  241. for (const key in options.params) {
  242. query.set(key, options.params[key]);
  243. }
  244. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  245. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  246. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  247. return {
  248. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  249. options: localVarRequestOptions,
  250. };
  251. },
  252. }
  253. };
  254. /**
  255. * SysCacheApi - functional programming interface
  256. * @export
  257. */
  258. export const SysCacheApiFp = function(configuration?: Configuration) {
  259. return {
  260. /**
  261. *
  262. * @summary 根据键名前缀删除缓存
  263. * @param {string} prefixKey 键名前缀
  264. * @param {*} [options] Override http request option.
  265. * @throws {RequiredError}
  266. */
  267. async apiSysCacheDeleteByPreKeyPrefixKeyPost(prefixKey: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultInt32>>> {
  268. const localVarAxiosArgs = await SysCacheApiAxiosParamCreator(configuration).apiSysCacheDeleteByPreKeyPrefixKeyPost(prefixKey, options);
  269. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  270. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  271. return axios.request(axiosRequestArgs);
  272. };
  273. },
  274. /**
  275. *
  276. * @summary 删除缓存
  277. * @param {string} key
  278. * @param {*} [options] Override http request option.
  279. * @throws {RequiredError}
  280. */
  281. async apiSysCacheDeleteKeyPost(key: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultInt32>>> {
  282. const localVarAxiosArgs = await SysCacheApiAxiosParamCreator(configuration).apiSysCacheDeleteKeyPost(key, options);
  283. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  284. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  285. return axios.request(axiosRequestArgs);
  286. };
  287. },
  288. /**
  289. *
  290. * @summary 获取缓存键名集合
  291. * @param {*} [options] Override http request option.
  292. * @throws {RequiredError}
  293. */
  294. async apiSysCacheKeyListGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultListString>>> {
  295. const localVarAxiosArgs = await SysCacheApiAxiosParamCreator(configuration).apiSysCacheKeyListGet(options);
  296. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  297. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  298. return axios.request(axiosRequestArgs);
  299. };
  300. },
  301. /**
  302. *
  303. * @summary 根据键名前缀获取键名集合
  304. * @param {string} prefixKey 键名前缀
  305. * @param {*} [options] Override http request option.
  306. * @throws {RequiredError}
  307. */
  308. async apiSysCacheKeysByPrefixKeyPrefixKeyGet(prefixKey: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultListString>>> {
  309. const localVarAxiosArgs = await SysCacheApiAxiosParamCreator(configuration).apiSysCacheKeysByPrefixKeyPrefixKeyGet(prefixKey, options);
  310. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  311. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  312. return axios.request(axiosRequestArgs);
  313. };
  314. },
  315. /**
  316. *
  317. * @summary 获取缓存值
  318. * @param {string} key
  319. * @param {*} [options] Override http request option.
  320. * @throws {RequiredError}
  321. */
  322. async apiSysCacheValueKeyGet(key: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultObject>>> {
  323. const localVarAxiosArgs = await SysCacheApiAxiosParamCreator(configuration).apiSysCacheValueKeyGet(key, options);
  324. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  325. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  326. return axios.request(axiosRequestArgs);
  327. };
  328. },
  329. }
  330. };
  331. /**
  332. * SysCacheApi - factory interface
  333. * @export
  334. */
  335. export const SysCacheApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
  336. return {
  337. /**
  338. *
  339. * @summary 根据键名前缀删除缓存
  340. * @param {string} prefixKey 键名前缀
  341. * @param {*} [options] Override http request option.
  342. * @throws {RequiredError}
  343. */
  344. async apiSysCacheDeleteByPreKeyPrefixKeyPost(prefixKey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultInt32>> {
  345. return SysCacheApiFp(configuration).apiSysCacheDeleteByPreKeyPrefixKeyPost(prefixKey, options).then((request) => request(axios, basePath));
  346. },
  347. /**
  348. *
  349. * @summary 删除缓存
  350. * @param {string} key
  351. * @param {*} [options] Override http request option.
  352. * @throws {RequiredError}
  353. */
  354. async apiSysCacheDeleteKeyPost(key: string, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultInt32>> {
  355. return SysCacheApiFp(configuration).apiSysCacheDeleteKeyPost(key, options).then((request) => request(axios, basePath));
  356. },
  357. /**
  358. *
  359. * @summary 获取缓存键名集合
  360. * @param {*} [options] Override http request option.
  361. * @throws {RequiredError}
  362. */
  363. async apiSysCacheKeyListGet(options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultListString>> {
  364. return SysCacheApiFp(configuration).apiSysCacheKeyListGet(options).then((request) => request(axios, basePath));
  365. },
  366. /**
  367. *
  368. * @summary 根据键名前缀获取键名集合
  369. * @param {string} prefixKey 键名前缀
  370. * @param {*} [options] Override http request option.
  371. * @throws {RequiredError}
  372. */
  373. async apiSysCacheKeysByPrefixKeyPrefixKeyGet(prefixKey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultListString>> {
  374. return SysCacheApiFp(configuration).apiSysCacheKeysByPrefixKeyPrefixKeyGet(prefixKey, options).then((request) => request(axios, basePath));
  375. },
  376. /**
  377. *
  378. * @summary 获取缓存值
  379. * @param {string} key
  380. * @param {*} [options] Override http request option.
  381. * @throws {RequiredError}
  382. */
  383. async apiSysCacheValueKeyGet(key: string, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultObject>> {
  384. return SysCacheApiFp(configuration).apiSysCacheValueKeyGet(key, options).then((request) => request(axios, basePath));
  385. },
  386. };
  387. };
  388. /**
  389. * SysCacheApi - object-oriented interface
  390. * @export
  391. * @class SysCacheApi
  392. * @extends {BaseAPI}
  393. */
  394. export class SysCacheApi extends BaseAPI {
  395. /**
  396. *
  397. * @summary 根据键名前缀删除缓存
  398. * @param {string} prefixKey 键名前缀
  399. * @param {*} [options] Override http request option.
  400. * @throws {RequiredError}
  401. * @memberof SysCacheApi
  402. */
  403. public async apiSysCacheDeleteByPreKeyPrefixKeyPost(prefixKey: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultInt32>> {
  404. return SysCacheApiFp(this.configuration).apiSysCacheDeleteByPreKeyPrefixKeyPost(prefixKey, options).then((request) => request(this.axios, this.basePath));
  405. }
  406. /**
  407. *
  408. * @summary 删除缓存
  409. * @param {string} key
  410. * @param {*} [options] Override http request option.
  411. * @throws {RequiredError}
  412. * @memberof SysCacheApi
  413. */
  414. public async apiSysCacheDeleteKeyPost(key: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultInt32>> {
  415. return SysCacheApiFp(this.configuration).apiSysCacheDeleteKeyPost(key, options).then((request) => request(this.axios, this.basePath));
  416. }
  417. /**
  418. *
  419. * @summary 获取缓存键名集合
  420. * @param {*} [options] Override http request option.
  421. * @throws {RequiredError}
  422. * @memberof SysCacheApi
  423. */
  424. public async apiSysCacheKeyListGet(options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultListString>> {
  425. return SysCacheApiFp(this.configuration).apiSysCacheKeyListGet(options).then((request) => request(this.axios, this.basePath));
  426. }
  427. /**
  428. *
  429. * @summary 根据键名前缀获取键名集合
  430. * @param {string} prefixKey 键名前缀
  431. * @param {*} [options] Override http request option.
  432. * @throws {RequiredError}
  433. * @memberof SysCacheApi
  434. */
  435. public async apiSysCacheKeysByPrefixKeyPrefixKeyGet(prefixKey: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultListString>> {
  436. return SysCacheApiFp(this.configuration).apiSysCacheKeysByPrefixKeyPrefixKeyGet(prefixKey, options).then((request) => request(this.axios, this.basePath));
  437. }
  438. /**
  439. *
  440. * @summary 获取缓存值
  441. * @param {string} key
  442. * @param {*} [options] Override http request option.
  443. * @throws {RequiredError}
  444. * @memberof SysCacheApi
  445. */
  446. public async apiSysCacheValueKeyGet(key: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultObject>> {
  447. return SysCacheApiFp(this.configuration).apiSysCacheValueKeyGet(key, options).then((request) => request(this.axios, this.basePath));
  448. }
  449. }