sys-auth-api.ts 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711
  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 { AdminResultLoginOutput } from '../models';
  20. import { AdminResultLoginUserOutput } from '../models';
  21. import { AdminResultObject } from '../models';
  22. import { AdminResultString } from '../models';
  23. import { LoginInput } from '../models';
  24. /**
  25. * SysAuthApi - axios parameter creator
  26. * @export
  27. */
  28. export const SysAuthApiAxiosParamCreator = function (configuration?: Configuration) {
  29. return {
  30. /**
  31. *
  32. * @summary swagger登录检查
  33. * @param {*} [options] Override http request option.
  34. * @throws {RequiredError}
  35. */
  36. apiSwaggerCheckUrlPost: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  37. const localVarPath = `/api/swagger/checkUrl`;
  38. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  39. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  40. let baseOptions;
  41. if (configuration) {
  42. baseOptions = configuration.baseOptions;
  43. }
  44. const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
  45. const localVarHeaderParameter = {} as any;
  46. const localVarQueryParameter = {} as any;
  47. // authentication Bearer required
  48. const query = new URLSearchParams(localVarUrlObj.search);
  49. for (const key in localVarQueryParameter) {
  50. query.set(key, localVarQueryParameter[key]);
  51. }
  52. for (const key in options.params) {
  53. query.set(key, options.params[key]);
  54. }
  55. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  56. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  57. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  58. return {
  59. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  60. options: localVarRequestOptions,
  61. };
  62. },
  63. /**
  64. *
  65. * @summary swagger登录提交
  66. * @param {string} [userName]
  67. * @param {string} [password]
  68. * @param {*} [options] Override http request option.
  69. * @throws {RequiredError}
  70. */
  71. apiSwaggerSubmitUrlPostForm: async (userName?: string, password?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  72. const localVarPath = `/api/swagger/submitUrl`;
  73. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  74. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  75. let baseOptions;
  76. if (configuration) {
  77. baseOptions = configuration.baseOptions;
  78. }
  79. const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
  80. const localVarHeaderParameter = {} as any;
  81. const localVarQueryParameter = {} as any;
  82. const localVarFormParams = new FormData();
  83. // authentication Bearer required
  84. if (userName !== undefined) {
  85. localVarFormParams.append('UserName', userName as any);
  86. }
  87. if (password !== undefined) {
  88. localVarFormParams.append('Password', password as any);
  89. }
  90. localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
  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. localVarRequestOptions.data = localVarFormParams;
  102. return {
  103. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  104. options: localVarRequestOptions,
  105. };
  106. },
  107. /**
  108. *
  109. * @summary 获取验证码
  110. * @param {*} [options] Override http request option.
  111. * @throws {RequiredError}
  112. */
  113. apiSysAuthCaptchaGet: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  114. const localVarPath = `/api/sysAuth/captcha`;
  115. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  116. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  117. let baseOptions;
  118. if (configuration) {
  119. baseOptions = configuration.baseOptions;
  120. }
  121. const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
  122. const localVarHeaderParameter = {} as any;
  123. const localVarQueryParameter = {} as any;
  124. // authentication Bearer required
  125. const query = new URLSearchParams(localVarUrlObj.search);
  126. for (const key in localVarQueryParameter) {
  127. query.set(key, localVarQueryParameter[key]);
  128. }
  129. for (const key in options.params) {
  130. query.set(key, options.params[key]);
  131. }
  132. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  133. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  134. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  135. return {
  136. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  137. options: localVarRequestOptions,
  138. };
  139. },
  140. /**
  141. *
  142. * @summary 获取登录配置
  143. * @param {*} [options] Override http request option.
  144. * @throws {RequiredError}
  145. */
  146. apiSysAuthLoginConfigGet: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  147. const localVarPath = `/api/sysAuth/loginConfig`;
  148. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  149. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  150. let baseOptions;
  151. if (configuration) {
  152. baseOptions = configuration.baseOptions;
  153. }
  154. const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
  155. const localVarHeaderParameter = {} as any;
  156. const localVarQueryParameter = {} as any;
  157. // authentication Bearer required
  158. const query = new URLSearchParams(localVarUrlObj.search);
  159. for (const key in localVarQueryParameter) {
  160. query.set(key, localVarQueryParameter[key]);
  161. }
  162. for (const key in options.params) {
  163. query.set(key, options.params[key]);
  164. }
  165. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  166. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  167. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  168. return {
  169. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  170. options: localVarRequestOptions,
  171. };
  172. },
  173. /**
  174. * 用户名/密码:superadmin/123456
  175. * @summary 登录系统
  176. * @param {LoginInput} body
  177. * @param {*} [options] Override http request option.
  178. * @throws {RequiredError}
  179. */
  180. apiSysAuthLoginPost: async (body: LoginInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  181. // verify required parameter 'body' is not null or undefined
  182. if (body === null || body === undefined) {
  183. throw new RequiredError('body','Required parameter body was null or undefined when calling apiSysAuthLoginPost.');
  184. }
  185. const localVarPath = `/api/sysAuth/login`;
  186. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  187. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  188. let baseOptions;
  189. if (configuration) {
  190. baseOptions = configuration.baseOptions;
  191. }
  192. const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
  193. const localVarHeaderParameter = {} as any;
  194. const localVarQueryParameter = {} as any;
  195. // authentication Bearer required
  196. localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
  197. const query = new URLSearchParams(localVarUrlObj.search);
  198. for (const key in localVarQueryParameter) {
  199. query.set(key, localVarQueryParameter[key]);
  200. }
  201. for (const key in options.params) {
  202. query.set(key, options.params[key]);
  203. }
  204. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  205. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  206. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  207. const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
  208. localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
  209. return {
  210. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  211. options: localVarRequestOptions,
  212. };
  213. },
  214. /**
  215. *
  216. * @summary 退出系统
  217. * @param {*} [options] Override http request option.
  218. * @throws {RequiredError}
  219. */
  220. apiSysAuthLogoutPost: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  221. const localVarPath = `/api/sysAuth/logout`;
  222. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  223. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  224. let baseOptions;
  225. if (configuration) {
  226. baseOptions = configuration.baseOptions;
  227. }
  228. const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
  229. const localVarHeaderParameter = {} as any;
  230. const localVarQueryParameter = {} as any;
  231. // authentication Bearer required
  232. const query = new URLSearchParams(localVarUrlObj.search);
  233. for (const key in localVarQueryParameter) {
  234. query.set(key, localVarQueryParameter[key]);
  235. }
  236. for (const key in options.params) {
  237. query.set(key, options.params[key]);
  238. }
  239. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  240. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  241. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  242. return {
  243. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  244. options: localVarRequestOptions,
  245. };
  246. },
  247. /**
  248. *
  249. * @summary 获取刷新Token
  250. * @param {string} accessToken
  251. * @param {*} [options] Override http request option.
  252. * @throws {RequiredError}
  253. */
  254. apiSysAuthRefreshTokenAccessTokenGet: async (accessToken: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  255. // verify required parameter 'accessToken' is not null or undefined
  256. if (accessToken === null || accessToken === undefined) {
  257. throw new RequiredError('accessToken','Required parameter accessToken was null or undefined when calling apiSysAuthRefreshTokenAccessTokenGet.');
  258. }
  259. const localVarPath = `/api/sysAuth/refreshToken/{accessToken}`
  260. .replace(`{${"accessToken"}}`, encodeURIComponent(String(accessToken)));
  261. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  262. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  263. let baseOptions;
  264. if (configuration) {
  265. baseOptions = configuration.baseOptions;
  266. }
  267. const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
  268. const localVarHeaderParameter = {} as any;
  269. const localVarQueryParameter = {} as any;
  270. // authentication Bearer required
  271. const query = new URLSearchParams(localVarUrlObj.search);
  272. for (const key in localVarQueryParameter) {
  273. query.set(key, localVarQueryParameter[key]);
  274. }
  275. for (const key in options.params) {
  276. query.set(key, options.params[key]);
  277. }
  278. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  279. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  280. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  281. return {
  282. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  283. options: localVarRequestOptions,
  284. };
  285. },
  286. /**
  287. *
  288. * @summary 获取用户配置
  289. * @param {*} [options] Override http request option.
  290. * @throws {RequiredError}
  291. */
  292. apiSysAuthUserConfigGet: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  293. const localVarPath = `/api/sysAuth/userConfig`;
  294. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  295. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  296. let baseOptions;
  297. if (configuration) {
  298. baseOptions = configuration.baseOptions;
  299. }
  300. const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
  301. const localVarHeaderParameter = {} as any;
  302. const localVarQueryParameter = {} as any;
  303. // authentication Bearer required
  304. const query = new URLSearchParams(localVarUrlObj.search);
  305. for (const key in localVarQueryParameter) {
  306. query.set(key, localVarQueryParameter[key]);
  307. }
  308. for (const key in options.params) {
  309. query.set(key, options.params[key]);
  310. }
  311. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  312. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  313. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  314. return {
  315. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  316. options: localVarRequestOptions,
  317. };
  318. },
  319. /**
  320. *
  321. * @summary 获取登录账号
  322. * @param {*} [options] Override http request option.
  323. * @throws {RequiredError}
  324. */
  325. apiSysAuthUserInfoGet: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  326. const localVarPath = `/api/sysAuth/userInfo`;
  327. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  328. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  329. let baseOptions;
  330. if (configuration) {
  331. baseOptions = configuration.baseOptions;
  332. }
  333. const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
  334. const localVarHeaderParameter = {} as any;
  335. const localVarQueryParameter = {} as any;
  336. // authentication Bearer required
  337. const query = new URLSearchParams(localVarUrlObj.search);
  338. for (const key in localVarQueryParameter) {
  339. query.set(key, localVarQueryParameter[key]);
  340. }
  341. for (const key in options.params) {
  342. query.set(key, options.params[key]);
  343. }
  344. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  345. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  346. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  347. return {
  348. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  349. options: localVarRequestOptions,
  350. };
  351. },
  352. }
  353. };
  354. /**
  355. * SysAuthApi - functional programming interface
  356. * @export
  357. */
  358. export const SysAuthApiFp = function(configuration?: Configuration) {
  359. return {
  360. /**
  361. *
  362. * @summary swagger登录检查
  363. * @param {*} [options] Override http request option.
  364. * @throws {RequiredError}
  365. */
  366. async apiSwaggerCheckUrlPost(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<number>>> {
  367. const localVarAxiosArgs = await SysAuthApiAxiosParamCreator(configuration).apiSwaggerCheckUrlPost(options);
  368. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  369. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  370. return axios.request(axiosRequestArgs);
  371. };
  372. },
  373. /**
  374. *
  375. * @summary swagger登录提交
  376. * @param {string} [userName]
  377. * @param {string} [password]
  378. * @param {*} [options] Override http request option.
  379. * @throws {RequiredError}
  380. */
  381. async apiSwaggerSubmitUrlPostForm(userName?: string, password?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<number>>> {
  382. const localVarAxiosArgs = await SysAuthApiAxiosParamCreator(configuration).apiSwaggerSubmitUrlPostForm(userName, password, options);
  383. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  384. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  385. return axios.request(axiosRequestArgs);
  386. };
  387. },
  388. /**
  389. *
  390. * @summary 获取验证码
  391. * @param {*} [options] Override http request option.
  392. * @throws {RequiredError}
  393. */
  394. async apiSysAuthCaptchaGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultObject>>> {
  395. const localVarAxiosArgs = await SysAuthApiAxiosParamCreator(configuration).apiSysAuthCaptchaGet(options);
  396. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  397. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  398. return axios.request(axiosRequestArgs);
  399. };
  400. },
  401. /**
  402. *
  403. * @summary 获取登录配置
  404. * @param {*} [options] Override http request option.
  405. * @throws {RequiredError}
  406. */
  407. async apiSysAuthLoginConfigGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultObject>>> {
  408. const localVarAxiosArgs = await SysAuthApiAxiosParamCreator(configuration).apiSysAuthLoginConfigGet(options);
  409. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  410. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  411. return axios.request(axiosRequestArgs);
  412. };
  413. },
  414. /**
  415. * 用户名/密码:superadmin/123456
  416. * @summary 登录系统
  417. * @param {LoginInput} body
  418. * @param {*} [options] Override http request option.
  419. * @throws {RequiredError}
  420. */
  421. async apiSysAuthLoginPost(body: LoginInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultLoginOutput>>> {
  422. const localVarAxiosArgs = await SysAuthApiAxiosParamCreator(configuration).apiSysAuthLoginPost(body, options);
  423. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  424. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  425. return axios.request(axiosRequestArgs);
  426. };
  427. },
  428. /**
  429. *
  430. * @summary 退出系统
  431. * @param {*} [options] Override http request option.
  432. * @throws {RequiredError}
  433. */
  434. async apiSysAuthLogoutPost(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
  435. const localVarAxiosArgs = await SysAuthApiAxiosParamCreator(configuration).apiSysAuthLogoutPost(options);
  436. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  437. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  438. return axios.request(axiosRequestArgs);
  439. };
  440. },
  441. /**
  442. *
  443. * @summary 获取刷新Token
  444. * @param {string} accessToken
  445. * @param {*} [options] Override http request option.
  446. * @throws {RequiredError}
  447. */
  448. async apiSysAuthRefreshTokenAccessTokenGet(accessToken: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultString>>> {
  449. const localVarAxiosArgs = await SysAuthApiAxiosParamCreator(configuration).apiSysAuthRefreshTokenAccessTokenGet(accessToken, options);
  450. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  451. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  452. return axios.request(axiosRequestArgs);
  453. };
  454. },
  455. /**
  456. *
  457. * @summary 获取用户配置
  458. * @param {*} [options] Override http request option.
  459. * @throws {RequiredError}
  460. */
  461. async apiSysAuthUserConfigGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultObject>>> {
  462. const localVarAxiosArgs = await SysAuthApiAxiosParamCreator(configuration).apiSysAuthUserConfigGet(options);
  463. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  464. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  465. return axios.request(axiosRequestArgs);
  466. };
  467. },
  468. /**
  469. *
  470. * @summary 获取登录账号
  471. * @param {*} [options] Override http request option.
  472. * @throws {RequiredError}
  473. */
  474. async apiSysAuthUserInfoGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultLoginUserOutput>>> {
  475. const localVarAxiosArgs = await SysAuthApiAxiosParamCreator(configuration).apiSysAuthUserInfoGet(options);
  476. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  477. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  478. return axios.request(axiosRequestArgs);
  479. };
  480. },
  481. }
  482. };
  483. /**
  484. * SysAuthApi - factory interface
  485. * @export
  486. */
  487. export const SysAuthApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
  488. return {
  489. /**
  490. *
  491. * @summary swagger登录检查
  492. * @param {*} [options] Override http request option.
  493. * @throws {RequiredError}
  494. */
  495. async apiSwaggerCheckUrlPost(options?: AxiosRequestConfig): Promise<AxiosResponse<number>> {
  496. return SysAuthApiFp(configuration).apiSwaggerCheckUrlPost(options).then((request) => request(axios, basePath));
  497. },
  498. /**
  499. *
  500. * @summary swagger登录提交
  501. * @param {string} [userName]
  502. * @param {string} [password]
  503. * @param {*} [options] Override http request option.
  504. * @throws {RequiredError}
  505. */
  506. async apiSwaggerSubmitUrlPostForm(userName?: string, password?: string, options?: AxiosRequestConfig): Promise<AxiosResponse<number>> {
  507. return SysAuthApiFp(configuration).apiSwaggerSubmitUrlPostForm(userName, password, options).then((request) => request(axios, basePath));
  508. },
  509. /**
  510. *
  511. * @summary 获取验证码
  512. * @param {*} [options] Override http request option.
  513. * @throws {RequiredError}
  514. */
  515. async apiSysAuthCaptchaGet(options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultObject>> {
  516. return SysAuthApiFp(configuration).apiSysAuthCaptchaGet(options).then((request) => request(axios, basePath));
  517. },
  518. /**
  519. *
  520. * @summary 获取登录配置
  521. * @param {*} [options] Override http request option.
  522. * @throws {RequiredError}
  523. */
  524. async apiSysAuthLoginConfigGet(options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultObject>> {
  525. return SysAuthApiFp(configuration).apiSysAuthLoginConfigGet(options).then((request) => request(axios, basePath));
  526. },
  527. /**
  528. * 用户名/密码:superadmin/123456
  529. * @summary 登录系统
  530. * @param {LoginInput} body
  531. * @param {*} [options] Override http request option.
  532. * @throws {RequiredError}
  533. */
  534. async apiSysAuthLoginPost(body: LoginInput, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultLoginOutput>> {
  535. return SysAuthApiFp(configuration).apiSysAuthLoginPost(body, options).then((request) => request(axios, basePath));
  536. },
  537. /**
  538. *
  539. * @summary 退出系统
  540. * @param {*} [options] Override http request option.
  541. * @throws {RequiredError}
  542. */
  543. async apiSysAuthLogoutPost(options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
  544. return SysAuthApiFp(configuration).apiSysAuthLogoutPost(options).then((request) => request(axios, basePath));
  545. },
  546. /**
  547. *
  548. * @summary 获取刷新Token
  549. * @param {string} accessToken
  550. * @param {*} [options] Override http request option.
  551. * @throws {RequiredError}
  552. */
  553. async apiSysAuthRefreshTokenAccessTokenGet(accessToken: string, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultString>> {
  554. return SysAuthApiFp(configuration).apiSysAuthRefreshTokenAccessTokenGet(accessToken, options).then((request) => request(axios, basePath));
  555. },
  556. /**
  557. *
  558. * @summary 获取用户配置
  559. * @param {*} [options] Override http request option.
  560. * @throws {RequiredError}
  561. */
  562. async apiSysAuthUserConfigGet(options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultObject>> {
  563. return SysAuthApiFp(configuration).apiSysAuthUserConfigGet(options).then((request) => request(axios, basePath));
  564. },
  565. /**
  566. *
  567. * @summary 获取登录账号
  568. * @param {*} [options] Override http request option.
  569. * @throws {RequiredError}
  570. */
  571. async apiSysAuthUserInfoGet(options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultLoginUserOutput>> {
  572. return SysAuthApiFp(configuration).apiSysAuthUserInfoGet(options).then((request) => request(axios, basePath));
  573. },
  574. };
  575. };
  576. /**
  577. * SysAuthApi - object-oriented interface
  578. * @export
  579. * @class SysAuthApi
  580. * @extends {BaseAPI}
  581. */
  582. export class SysAuthApi extends BaseAPI {
  583. /**
  584. *
  585. * @summary swagger登录检查
  586. * @param {*} [options] Override http request option.
  587. * @throws {RequiredError}
  588. * @memberof SysAuthApi
  589. */
  590. public async apiSwaggerCheckUrlPost(options?: AxiosRequestConfig) : Promise<AxiosResponse<number>> {
  591. return SysAuthApiFp(this.configuration).apiSwaggerCheckUrlPost(options).then((request) => request(this.axios, this.basePath));
  592. }
  593. /**
  594. *
  595. * @summary swagger登录提交
  596. * @param {string} [userName]
  597. * @param {string} [password]
  598. * @param {*} [options] Override http request option.
  599. * @throws {RequiredError}
  600. * @memberof SysAuthApi
  601. */
  602. public async apiSwaggerSubmitUrlPostForm(userName?: string, password?: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<number>> {
  603. return SysAuthApiFp(this.configuration).apiSwaggerSubmitUrlPostForm(userName, password, options).then((request) => request(this.axios, this.basePath));
  604. }
  605. /**
  606. *
  607. * @summary 获取验证码
  608. * @param {*} [options] Override http request option.
  609. * @throws {RequiredError}
  610. * @memberof SysAuthApi
  611. */
  612. public async apiSysAuthCaptchaGet(options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultObject>> {
  613. return SysAuthApiFp(this.configuration).apiSysAuthCaptchaGet(options).then((request) => request(this.axios, this.basePath));
  614. }
  615. /**
  616. *
  617. * @summary 获取登录配置
  618. * @param {*} [options] Override http request option.
  619. * @throws {RequiredError}
  620. * @memberof SysAuthApi
  621. */
  622. public async apiSysAuthLoginConfigGet(options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultObject>> {
  623. return SysAuthApiFp(this.configuration).apiSysAuthLoginConfigGet(options).then((request) => request(this.axios, this.basePath));
  624. }
  625. /**
  626. * 用户名/密码:superadmin/123456
  627. * @summary 登录系统
  628. * @param {LoginInput} body
  629. * @param {*} [options] Override http request option.
  630. * @throws {RequiredError}
  631. * @memberof SysAuthApi
  632. */
  633. public async apiSysAuthLoginPost(body: LoginInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultLoginOutput>> {
  634. return SysAuthApiFp(this.configuration).apiSysAuthLoginPost(body, options).then((request) => request(this.axios, this.basePath));
  635. }
  636. /**
  637. *
  638. * @summary 退出系统
  639. * @param {*} [options] Override http request option.
  640. * @throws {RequiredError}
  641. * @memberof SysAuthApi
  642. */
  643. public async apiSysAuthLogoutPost(options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
  644. return SysAuthApiFp(this.configuration).apiSysAuthLogoutPost(options).then((request) => request(this.axios, this.basePath));
  645. }
  646. /**
  647. *
  648. * @summary 获取刷新Token
  649. * @param {string} accessToken
  650. * @param {*} [options] Override http request option.
  651. * @throws {RequiredError}
  652. * @memberof SysAuthApi
  653. */
  654. public async apiSysAuthRefreshTokenAccessTokenGet(accessToken: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultString>> {
  655. return SysAuthApiFp(this.configuration).apiSysAuthRefreshTokenAccessTokenGet(accessToken, options).then((request) => request(this.axios, this.basePath));
  656. }
  657. /**
  658. *
  659. * @summary 获取用户配置
  660. * @param {*} [options] Override http request option.
  661. * @throws {RequiredError}
  662. * @memberof SysAuthApi
  663. */
  664. public async apiSysAuthUserConfigGet(options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultObject>> {
  665. return SysAuthApiFp(this.configuration).apiSysAuthUserConfigGet(options).then((request) => request(this.axios, this.basePath));
  666. }
  667. /**
  668. *
  669. * @summary 获取登录账号
  670. * @param {*} [options] Override http request option.
  671. * @throws {RequiredError}
  672. * @memberof SysAuthApi
  673. */
  674. public async apiSysAuthUserInfoGet(options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultLoginUserOutput>> {
  675. return SysAuthApiFp(this.configuration).apiSysAuthUserInfoGet(options).then((request) => request(this.axios, this.basePath));
  676. }
  677. }