sys-auth-api.ts 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578
  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 生成图片验证码
  33. * @param {*} [options] Override http request option.
  34. * @throws {RequiredError}
  35. */
  36. captchaGet: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  37. const localVarPath = `/captcha`;
  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: 'GET', ...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 获取刷新Token
  66. * @param {string} accessToken
  67. * @param {*} [options] Override http request option.
  68. * @throws {RequiredError}
  69. */
  70. getRefreshTokenPost: async (accessToken: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  71. // verify required parameter 'accessToken' is not null or undefined
  72. if (accessToken === null || accessToken === undefined) {
  73. throw new RequiredError('accessToken','Required parameter accessToken was null or undefined when calling getRefreshTokenPost.');
  74. }
  75. const localVarPath = `/getRefreshToken`;
  76. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  77. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  78. let baseOptions;
  79. if (configuration) {
  80. baseOptions = configuration.baseOptions;
  81. }
  82. const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
  83. const localVarHeaderParameter = {} as any;
  84. const localVarQueryParameter = {} as any;
  85. // authentication Bearer required
  86. if (accessToken !== undefined) {
  87. localVarQueryParameter['accessToken'] = accessToken;
  88. }
  89. const query = new URLSearchParams(localVarUrlObj.search);
  90. for (const key in localVarQueryParameter) {
  91. query.set(key, localVarQueryParameter[key]);
  92. }
  93. for (const key in options.params) {
  94. query.set(key, options.params[key]);
  95. }
  96. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  97. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  98. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  99. return {
  100. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  101. options: localVarRequestOptions,
  102. };
  103. },
  104. /**
  105. *
  106. * @summary 获取用户信息
  107. * @param {*} [options] Override http request option.
  108. * @throws {RequiredError}
  109. */
  110. getUserInfoGet: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  111. const localVarPath = `/getUserInfo`;
  112. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  113. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  114. let baseOptions;
  115. if (configuration) {
  116. baseOptions = configuration.baseOptions;
  117. }
  118. const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
  119. const localVarHeaderParameter = {} as any;
  120. const localVarQueryParameter = {} as any;
  121. // authentication Bearer required
  122. const query = new URLSearchParams(localVarUrlObj.search);
  123. for (const key in localVarQueryParameter) {
  124. query.set(key, localVarQueryParameter[key]);
  125. }
  126. for (const key in options.params) {
  127. query.set(key, options.params[key]);
  128. }
  129. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  130. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  131. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  132. return {
  133. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  134. options: localVarRequestOptions,
  135. };
  136. },
  137. /**
  138. * 用户名/密码:superadmin/123456
  139. * @summary 登录系统
  140. * @param {LoginInput} body
  141. * @param {*} [options] Override http request option.
  142. * @throws {RequiredError}
  143. */
  144. loginPost: async (body: LoginInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  145. // verify required parameter 'body' is not null or undefined
  146. if (body === null || body === undefined) {
  147. throw new RequiredError('body','Required parameter body was null or undefined when calling loginPost.');
  148. }
  149. const localVarPath = `/login`;
  150. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  151. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  152. let baseOptions;
  153. if (configuration) {
  154. baseOptions = configuration.baseOptions;
  155. }
  156. const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
  157. const localVarHeaderParameter = {} as any;
  158. const localVarQueryParameter = {} as any;
  159. // authentication Bearer required
  160. localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
  161. const query = new URLSearchParams(localVarUrlObj.search);
  162. for (const key in localVarQueryParameter) {
  163. query.set(key, localVarQueryParameter[key]);
  164. }
  165. for (const key in options.params) {
  166. query.set(key, options.params[key]);
  167. }
  168. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  169. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  170. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  171. const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
  172. localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
  173. return {
  174. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  175. options: localVarRequestOptions,
  176. };
  177. },
  178. /**
  179. *
  180. * @summary 退出系统
  181. * @param {*} [options] Override http request option.
  182. * @throws {RequiredError}
  183. */
  184. logoutPost: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  185. const localVarPath = `/logout`;
  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. const query = new URLSearchParams(localVarUrlObj.search);
  197. for (const key in localVarQueryParameter) {
  198. query.set(key, localVarQueryParameter[key]);
  199. }
  200. for (const key in options.params) {
  201. query.set(key, options.params[key]);
  202. }
  203. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  204. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  205. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  206. return {
  207. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  208. options: localVarRequestOptions,
  209. };
  210. },
  211. /**
  212. *
  213. * @summary Swagger登录检查
  214. * @param {*} [options] Override http request option.
  215. * @throws {RequiredError}
  216. */
  217. swaggerCheckUrlPost: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  218. const localVarPath = `/Swagger/CheckUrl`;
  219. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  220. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  221. let baseOptions;
  222. if (configuration) {
  223. baseOptions = configuration.baseOptions;
  224. }
  225. const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
  226. const localVarHeaderParameter = {} as any;
  227. const localVarQueryParameter = {} as any;
  228. // authentication Bearer required
  229. const query = new URLSearchParams(localVarUrlObj.search);
  230. for (const key in localVarQueryParameter) {
  231. query.set(key, localVarQueryParameter[key]);
  232. }
  233. for (const key in options.params) {
  234. query.set(key, options.params[key]);
  235. }
  236. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  237. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  238. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  239. return {
  240. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  241. options: localVarRequestOptions,
  242. };
  243. },
  244. /**
  245. *
  246. * @summary Swagger登录
  247. * @param {string} [userName]
  248. * @param {string} [password]
  249. * @param {*} [options] Override http request option.
  250. * @throws {RequiredError}
  251. */
  252. swaggerSubmitUrlPostForm: async (userName?: string, password?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  253. const localVarPath = `/Swagger/SubmitUrl`;
  254. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  255. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  256. let baseOptions;
  257. if (configuration) {
  258. baseOptions = configuration.baseOptions;
  259. }
  260. const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
  261. const localVarHeaderParameter = {} as any;
  262. const localVarQueryParameter = {} as any;
  263. const localVarFormParams = new FormData();
  264. // authentication Bearer required
  265. if (userName !== undefined) {
  266. localVarFormParams.append('UserName', userName as any);
  267. }
  268. if (password !== undefined) {
  269. localVarFormParams.append('Password', password as any);
  270. }
  271. localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
  272. const query = new URLSearchParams(localVarUrlObj.search);
  273. for (const key in localVarQueryParameter) {
  274. query.set(key, localVarQueryParameter[key]);
  275. }
  276. for (const key in options.params) {
  277. query.set(key, options.params[key]);
  278. }
  279. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  280. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  281. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  282. localVarRequestOptions.data = localVarFormParams;
  283. return {
  284. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  285. options: localVarRequestOptions,
  286. };
  287. },
  288. }
  289. };
  290. /**
  291. * SysAuthApi - functional programming interface
  292. * @export
  293. */
  294. export const SysAuthApiFp = function(configuration?: Configuration) {
  295. return {
  296. /**
  297. *
  298. * @summary 生成图片验证码
  299. * @param {*} [options] Override http request option.
  300. * @throws {RequiredError}
  301. */
  302. async captchaGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultObject>>> {
  303. const localVarAxiosArgs = await SysAuthApiAxiosParamCreator(configuration).captchaGet(options);
  304. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  305. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  306. return axios.request(axiosRequestArgs);
  307. };
  308. },
  309. /**
  310. *
  311. * @summary 获取刷新Token
  312. * @param {string} accessToken
  313. * @param {*} [options] Override http request option.
  314. * @throws {RequiredError}
  315. */
  316. async getRefreshTokenPost(accessToken: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultString>>> {
  317. const localVarAxiosArgs = await SysAuthApiAxiosParamCreator(configuration).getRefreshTokenPost(accessToken, options);
  318. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  319. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  320. return axios.request(axiosRequestArgs);
  321. };
  322. },
  323. /**
  324. *
  325. * @summary 获取用户信息
  326. * @param {*} [options] Override http request option.
  327. * @throws {RequiredError}
  328. */
  329. async getUserInfoGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultLoginUserOutput>>> {
  330. const localVarAxiosArgs = await SysAuthApiAxiosParamCreator(configuration).getUserInfoGet(options);
  331. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  332. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  333. return axios.request(axiosRequestArgs);
  334. };
  335. },
  336. /**
  337. * 用户名/密码:superadmin/123456
  338. * @summary 登录系统
  339. * @param {LoginInput} body
  340. * @param {*} [options] Override http request option.
  341. * @throws {RequiredError}
  342. */
  343. async loginPost(body: LoginInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultLoginOutput>>> {
  344. const localVarAxiosArgs = await SysAuthApiAxiosParamCreator(configuration).loginPost(body, options);
  345. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  346. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  347. return axios.request(axiosRequestArgs);
  348. };
  349. },
  350. /**
  351. *
  352. * @summary 退出系统
  353. * @param {*} [options] Override http request option.
  354. * @throws {RequiredError}
  355. */
  356. async logoutPost(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
  357. const localVarAxiosArgs = await SysAuthApiAxiosParamCreator(configuration).logoutPost(options);
  358. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  359. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  360. return axios.request(axiosRequestArgs);
  361. };
  362. },
  363. /**
  364. *
  365. * @summary Swagger登录检查
  366. * @param {*} [options] Override http request option.
  367. * @throws {RequiredError}
  368. */
  369. async swaggerCheckUrlPost(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<number>>> {
  370. const localVarAxiosArgs = await SysAuthApiAxiosParamCreator(configuration).swaggerCheckUrlPost(options);
  371. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  372. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  373. return axios.request(axiosRequestArgs);
  374. };
  375. },
  376. /**
  377. *
  378. * @summary Swagger登录
  379. * @param {string} [userName]
  380. * @param {string} [password]
  381. * @param {*} [options] Override http request option.
  382. * @throws {RequiredError}
  383. */
  384. async swaggerSubmitUrlPostForm(userName?: string, password?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<number>>> {
  385. const localVarAxiosArgs = await SysAuthApiAxiosParamCreator(configuration).swaggerSubmitUrlPostForm(userName, password, options);
  386. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  387. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  388. return axios.request(axiosRequestArgs);
  389. };
  390. },
  391. }
  392. };
  393. /**
  394. * SysAuthApi - factory interface
  395. * @export
  396. */
  397. export const SysAuthApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
  398. return {
  399. /**
  400. *
  401. * @summary 生成图片验证码
  402. * @param {*} [options] Override http request option.
  403. * @throws {RequiredError}
  404. */
  405. async captchaGet(options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultObject>> {
  406. return SysAuthApiFp(configuration).captchaGet(options).then((request) => request(axios, basePath));
  407. },
  408. /**
  409. *
  410. * @summary 获取刷新Token
  411. * @param {string} accessToken
  412. * @param {*} [options] Override http request option.
  413. * @throws {RequiredError}
  414. */
  415. async getRefreshTokenPost(accessToken: string, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultString>> {
  416. return SysAuthApiFp(configuration).getRefreshTokenPost(accessToken, options).then((request) => request(axios, basePath));
  417. },
  418. /**
  419. *
  420. * @summary 获取用户信息
  421. * @param {*} [options] Override http request option.
  422. * @throws {RequiredError}
  423. */
  424. async getUserInfoGet(options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultLoginUserOutput>> {
  425. return SysAuthApiFp(configuration).getUserInfoGet(options).then((request) => request(axios, basePath));
  426. },
  427. /**
  428. * 用户名/密码:superadmin/123456
  429. * @summary 登录系统
  430. * @param {LoginInput} body
  431. * @param {*} [options] Override http request option.
  432. * @throws {RequiredError}
  433. */
  434. async loginPost(body: LoginInput, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultLoginOutput>> {
  435. return SysAuthApiFp(configuration).loginPost(body, options).then((request) => request(axios, basePath));
  436. },
  437. /**
  438. *
  439. * @summary 退出系统
  440. * @param {*} [options] Override http request option.
  441. * @throws {RequiredError}
  442. */
  443. async logoutPost(options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
  444. return SysAuthApiFp(configuration).logoutPost(options).then((request) => request(axios, basePath));
  445. },
  446. /**
  447. *
  448. * @summary Swagger登录检查
  449. * @param {*} [options] Override http request option.
  450. * @throws {RequiredError}
  451. */
  452. async swaggerCheckUrlPost(options?: AxiosRequestConfig): Promise<AxiosResponse<number>> {
  453. return SysAuthApiFp(configuration).swaggerCheckUrlPost(options).then((request) => request(axios, basePath));
  454. },
  455. /**
  456. *
  457. * @summary Swagger登录
  458. * @param {string} [userName]
  459. * @param {string} [password]
  460. * @param {*} [options] Override http request option.
  461. * @throws {RequiredError}
  462. */
  463. async swaggerSubmitUrlPostForm(userName?: string, password?: string, options?: AxiosRequestConfig): Promise<AxiosResponse<number>> {
  464. return SysAuthApiFp(configuration).swaggerSubmitUrlPostForm(userName, password, options).then((request) => request(axios, basePath));
  465. },
  466. };
  467. };
  468. /**
  469. * SysAuthApi - object-oriented interface
  470. * @export
  471. * @class SysAuthApi
  472. * @extends {BaseAPI}
  473. */
  474. export class SysAuthApi extends BaseAPI {
  475. /**
  476. *
  477. * @summary 生成图片验证码
  478. * @param {*} [options] Override http request option.
  479. * @throws {RequiredError}
  480. * @memberof SysAuthApi
  481. */
  482. public async captchaGet(options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultObject>> {
  483. return SysAuthApiFp(this.configuration).captchaGet(options).then((request) => request(this.axios, this.basePath));
  484. }
  485. /**
  486. *
  487. * @summary 获取刷新Token
  488. * @param {string} accessToken
  489. * @param {*} [options] Override http request option.
  490. * @throws {RequiredError}
  491. * @memberof SysAuthApi
  492. */
  493. public async getRefreshTokenPost(accessToken: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultString>> {
  494. return SysAuthApiFp(this.configuration).getRefreshTokenPost(accessToken, options).then((request) => request(this.axios, this.basePath));
  495. }
  496. /**
  497. *
  498. * @summary 获取用户信息
  499. * @param {*} [options] Override http request option.
  500. * @throws {RequiredError}
  501. * @memberof SysAuthApi
  502. */
  503. public async getUserInfoGet(options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultLoginUserOutput>> {
  504. return SysAuthApiFp(this.configuration).getUserInfoGet(options).then((request) => request(this.axios, this.basePath));
  505. }
  506. /**
  507. * 用户名/密码:superadmin/123456
  508. * @summary 登录系统
  509. * @param {LoginInput} body
  510. * @param {*} [options] Override http request option.
  511. * @throws {RequiredError}
  512. * @memberof SysAuthApi
  513. */
  514. public async loginPost(body: LoginInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultLoginOutput>> {
  515. return SysAuthApiFp(this.configuration).loginPost(body, options).then((request) => request(this.axios, this.basePath));
  516. }
  517. /**
  518. *
  519. * @summary 退出系统
  520. * @param {*} [options] Override http request option.
  521. * @throws {RequiredError}
  522. * @memberof SysAuthApi
  523. */
  524. public async logoutPost(options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
  525. return SysAuthApiFp(this.configuration).logoutPost(options).then((request) => request(this.axios, this.basePath));
  526. }
  527. /**
  528. *
  529. * @summary Swagger登录检查
  530. * @param {*} [options] Override http request option.
  531. * @throws {RequiredError}
  532. * @memberof SysAuthApi
  533. */
  534. public async swaggerCheckUrlPost(options?: AxiosRequestConfig) : Promise<AxiosResponse<number>> {
  535. return SysAuthApiFp(this.configuration).swaggerCheckUrlPost(options).then((request) => request(this.axios, this.basePath));
  536. }
  537. /**
  538. *
  539. * @summary Swagger登录
  540. * @param {string} [userName]
  541. * @param {string} [password]
  542. * @param {*} [options] Override http request option.
  543. * @throws {RequiredError}
  544. * @memberof SysAuthApi
  545. */
  546. public async swaggerSubmitUrlPostForm(userName?: string, password?: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<number>> {
  547. return SysAuthApiFp(this.configuration).swaggerSubmitUrlPostForm(userName, password, options).then((request) => request(this.axios, this.basePath));
  548. }
  549. }