sys-tenant-api.ts 44 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922
  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 { AddTenantInput } from '../models';
  20. import { AdminResultListInt64 } from '../models';
  21. import { AdminResultListSysMenu } from '../models';
  22. import { AdminResultObject } from '../models';
  23. import { AdminResultSysTenant } from '../models';
  24. import { DeleteTenantInput } from '../models';
  25. import { QueryeTenantInput } from '../models';
  26. import { RoleMenuInput } from '../models';
  27. import { UpdateTenantInput } from '../models';
  28. /**
  29. * SysTenantApi - axios parameter creator
  30. * @export
  31. */
  32. export const SysTenantApiAxiosParamCreator = function (configuration?: Configuration) {
  33. return {
  34. /**
  35. *
  36. * @summary 增加租户
  37. * @param {AddTenantInput} [body]
  38. * @param {*} [options] Override http request option.
  39. * @throws {RequiredError}
  40. */
  41. sysTenantAddPost: async (body?: AddTenantInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  42. const localVarPath = `/sysTenant/add`;
  43. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  44. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  45. let baseOptions;
  46. if (configuration) {
  47. baseOptions = configuration.baseOptions;
  48. }
  49. const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
  50. const localVarHeaderParameter = {} as any;
  51. const localVarQueryParameter = {} as any;
  52. // authentication Bearer required
  53. localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
  54. const query = new URLSearchParams(localVarUrlObj.search);
  55. for (const key in localVarQueryParameter) {
  56. query.set(key, localVarQueryParameter[key]);
  57. }
  58. for (const key in options.params) {
  59. query.set(key, options.params[key]);
  60. }
  61. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  62. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  63. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  64. const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
  65. localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
  66. return {
  67. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  68. options: localVarRequestOptions,
  69. };
  70. },
  71. /**
  72. *
  73. * @summary 删除租户
  74. * @param {DeleteTenantInput} [body]
  75. * @param {*} [options] Override http request option.
  76. * @throws {RequiredError}
  77. */
  78. sysTenantDeletePost: async (body?: DeleteTenantInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  79. const localVarPath = `/sysTenant/delete`;
  80. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  81. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  82. let baseOptions;
  83. if (configuration) {
  84. baseOptions = configuration.baseOptions;
  85. }
  86. const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
  87. const localVarHeaderParameter = {} as any;
  88. const localVarQueryParameter = {} as any;
  89. // authentication Bearer required
  90. localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
  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. const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
  102. localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
  103. return {
  104. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  105. options: localVarRequestOptions,
  106. };
  107. },
  108. /**
  109. *
  110. * @summary 获取租户详情
  111. * @param {number} id Id
  112. * @param {*} [options] Override http request option.
  113. * @throws {RequiredError}
  114. */
  115. sysTenantDetailGet: async (id: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  116. // verify required parameter 'id' is not null or undefined
  117. if (id === null || id === undefined) {
  118. throw new RequiredError('id','Required parameter id was null or undefined when calling sysTenantDetailGet.');
  119. }
  120. const localVarPath = `/sysTenant/detail`;
  121. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  122. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  123. let baseOptions;
  124. if (configuration) {
  125. baseOptions = configuration.baseOptions;
  126. }
  127. const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
  128. const localVarHeaderParameter = {} as any;
  129. const localVarQueryParameter = {} as any;
  130. // authentication Bearer required
  131. if (id !== undefined) {
  132. localVarQueryParameter['Id'] = id;
  133. }
  134. const query = new URLSearchParams(localVarUrlObj.search);
  135. for (const key in localVarQueryParameter) {
  136. query.set(key, localVarQueryParameter[key]);
  137. }
  138. for (const key in options.params) {
  139. query.set(key, options.params[key]);
  140. }
  141. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  142. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  143. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  144. return {
  145. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  146. options: localVarRequestOptions,
  147. };
  148. },
  149. /**
  150. *
  151. * @summary 更新租户
  152. * @param {UpdateTenantInput} [body]
  153. * @param {*} [options] Override http request option.
  154. * @throws {RequiredError}
  155. */
  156. sysTenantEditPost: async (body?: UpdateTenantInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  157. const localVarPath = `/sysTenant/edit`;
  158. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  159. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  160. let baseOptions;
  161. if (configuration) {
  162. baseOptions = configuration.baseOptions;
  163. }
  164. const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
  165. const localVarHeaderParameter = {} as any;
  166. const localVarQueryParameter = {} as any;
  167. // authentication Bearer required
  168. localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
  169. const query = new URLSearchParams(localVarUrlObj.search);
  170. for (const key in localVarQueryParameter) {
  171. query.set(key, localVarQueryParameter[key]);
  172. }
  173. for (const key in options.params) {
  174. query.set(key, options.params[key]);
  175. }
  176. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  177. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  178. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  179. const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
  180. localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
  181. return {
  182. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  183. options: localVarRequestOptions,
  184. };
  185. },
  186. /**
  187. *
  188. * @summary 授权租户管理员角色菜单
  189. * @param {RoleMenuInput} [body]
  190. * @param {*} [options] Override http request option.
  191. * @throws {RequiredError}
  192. */
  193. sysTenantGrantMenuPost: async (body?: RoleMenuInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  194. const localVarPath = `/sysTenant/grantMenu`;
  195. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  196. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  197. let baseOptions;
  198. if (configuration) {
  199. baseOptions = configuration.baseOptions;
  200. }
  201. const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
  202. const localVarHeaderParameter = {} as any;
  203. const localVarQueryParameter = {} as any;
  204. // authentication Bearer required
  205. localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
  206. const query = new URLSearchParams(localVarUrlObj.search);
  207. for (const key in localVarQueryParameter) {
  208. query.set(key, localVarQueryParameter[key]);
  209. }
  210. for (const key in options.params) {
  211. query.set(key, options.params[key]);
  212. }
  213. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  214. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  215. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  216. const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
  217. localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
  218. return {
  219. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  220. options: localVarRequestOptions,
  221. };
  222. },
  223. /**
  224. *
  225. * @summary 获取租户列表
  226. * @param {*} [options] Override http request option.
  227. * @throws {RequiredError}
  228. */
  229. sysTenantListGet: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  230. const localVarPath = `/sysTenant/list`;
  231. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  232. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  233. let baseOptions;
  234. if (configuration) {
  235. baseOptions = configuration.baseOptions;
  236. }
  237. const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
  238. const localVarHeaderParameter = {} as any;
  239. const localVarQueryParameter = {} as any;
  240. // authentication Bearer required
  241. const query = new URLSearchParams(localVarUrlObj.search);
  242. for (const key in localVarQueryParameter) {
  243. query.set(key, localVarQueryParameter[key]);
  244. }
  245. for (const key in options.params) {
  246. query.set(key, options.params[key]);
  247. }
  248. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  249. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  250. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  251. return {
  252. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  253. options: localVarRequestOptions,
  254. };
  255. },
  256. /**
  257. *
  258. * @summary 获取租户管理员角色拥有菜单树
  259. * @param {number} id Id
  260. * @param {*} [options] Override http request option.
  261. * @throws {RequiredError}
  262. */
  263. sysTenantOwnMenuGet: async (id: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  264. // verify required parameter 'id' is not null or undefined
  265. if (id === null || id === undefined) {
  266. throw new RequiredError('id','Required parameter id was null or undefined when calling sysTenantOwnMenuGet.');
  267. }
  268. const localVarPath = `/sysTenant/ownMenu`;
  269. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  270. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  271. let baseOptions;
  272. if (configuration) {
  273. baseOptions = configuration.baseOptions;
  274. }
  275. const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
  276. const localVarHeaderParameter = {} as any;
  277. const localVarQueryParameter = {} as any;
  278. // authentication Bearer required
  279. if (id !== undefined) {
  280. localVarQueryParameter['Id'] = id;
  281. }
  282. const query = new URLSearchParams(localVarUrlObj.search);
  283. for (const key in localVarQueryParameter) {
  284. query.set(key, localVarQueryParameter[key]);
  285. }
  286. for (const key in options.params) {
  287. query.set(key, options.params[key]);
  288. }
  289. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  290. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  291. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  292. return {
  293. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  294. options: localVarRequestOptions,
  295. };
  296. },
  297. /**
  298. *
  299. * @summary 获取租户管理员角色拥有菜单树
  300. * @param {number} id Id
  301. * @param {*} [options] Override http request option.
  302. * @throws {RequiredError}
  303. */
  304. sysTenantOwnMenuListGet: async (id: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  305. // verify required parameter 'id' is not null or undefined
  306. if (id === null || id === undefined) {
  307. throw new RequiredError('id','Required parameter id was null or undefined when calling sysTenantOwnMenuListGet.');
  308. }
  309. const localVarPath = `/sysTenant/ownMenuList`;
  310. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  311. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  312. let baseOptions;
  313. if (configuration) {
  314. baseOptions = configuration.baseOptions;
  315. }
  316. const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
  317. const localVarHeaderParameter = {} as any;
  318. const localVarQueryParameter = {} as any;
  319. // authentication Bearer required
  320. if (id !== undefined) {
  321. localVarQueryParameter['Id'] = id;
  322. }
  323. const query = new URLSearchParams(localVarUrlObj.search);
  324. for (const key in localVarQueryParameter) {
  325. query.set(key, localVarQueryParameter[key]);
  326. }
  327. for (const key in options.params) {
  328. query.set(key, options.params[key]);
  329. }
  330. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  331. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  332. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  333. return {
  334. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  335. options: localVarRequestOptions,
  336. };
  337. },
  338. /**
  339. *
  340. * @summary 获取租户分页列表
  341. * @param {string} [name] 公司名称
  342. * @param {string} [adminName] 管理员名称
  343. * @param {string} [host] 主机
  344. * @param {string} [email] 电子邮箱
  345. * @param {string} [phone] 电话
  346. * @param {string} [connection] 数据库连接
  347. * @param {string} [schema] 架构
  348. * @param {string} [remark] 备注
  349. * @param {number} [page] 当前页码
  350. * @param {number} [pageSize] 页码容量
  351. * @param {string} [field] 排序字段
  352. * @param {string} [order] 排序方向
  353. * @param {string} [descStr] 降序排序
  354. * @param {*} [options] Override http request option.
  355. * @throws {RequiredError}
  356. */
  357. sysTenantPageGet: async (name?: string, adminName?: string, host?: string, email?: string, phone?: string, connection?: string, schema?: string, remark?: string, page?: number, pageSize?: number, field?: string, order?: string, descStr?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  358. const localVarPath = `/sysTenant/page`;
  359. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  360. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  361. let baseOptions;
  362. if (configuration) {
  363. baseOptions = configuration.baseOptions;
  364. }
  365. const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
  366. const localVarHeaderParameter = {} as any;
  367. const localVarQueryParameter = {} as any;
  368. // authentication Bearer required
  369. if (name !== undefined) {
  370. localVarQueryParameter['Name'] = name;
  371. }
  372. if (adminName !== undefined) {
  373. localVarQueryParameter['AdminName'] = adminName;
  374. }
  375. if (host !== undefined) {
  376. localVarQueryParameter['Host'] = host;
  377. }
  378. if (email !== undefined) {
  379. localVarQueryParameter['Email'] = email;
  380. }
  381. if (phone !== undefined) {
  382. localVarQueryParameter['Phone'] = phone;
  383. }
  384. if (connection !== undefined) {
  385. localVarQueryParameter['Connection'] = connection;
  386. }
  387. if (schema !== undefined) {
  388. localVarQueryParameter['Schema'] = schema;
  389. }
  390. if (remark !== undefined) {
  391. localVarQueryParameter['Remark'] = remark;
  392. }
  393. if (page !== undefined) {
  394. localVarQueryParameter['Page'] = page;
  395. }
  396. if (pageSize !== undefined) {
  397. localVarQueryParameter['PageSize'] = pageSize;
  398. }
  399. if (field !== undefined) {
  400. localVarQueryParameter['Field'] = field;
  401. }
  402. if (order !== undefined) {
  403. localVarQueryParameter['Order'] = order;
  404. }
  405. if (descStr !== undefined) {
  406. localVarQueryParameter['DescStr'] = descStr;
  407. }
  408. const query = new URLSearchParams(localVarUrlObj.search);
  409. for (const key in localVarQueryParameter) {
  410. query.set(key, localVarQueryParameter[key]);
  411. }
  412. for (const key in options.params) {
  413. query.set(key, options.params[key]);
  414. }
  415. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  416. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  417. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  418. return {
  419. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  420. options: localVarRequestOptions,
  421. };
  422. },
  423. /**
  424. *
  425. * @summary 重置租户管理员密码
  426. * @param {QueryeTenantInput} [body]
  427. * @param {*} [options] Override http request option.
  428. * @throws {RequiredError}
  429. */
  430. sysTenantResetPwdPost: async (body?: QueryeTenantInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  431. const localVarPath = `/sysTenant/resetPwd`;
  432. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  433. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  434. let baseOptions;
  435. if (configuration) {
  436. baseOptions = configuration.baseOptions;
  437. }
  438. const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
  439. const localVarHeaderParameter = {} as any;
  440. const localVarQueryParameter = {} as any;
  441. // authentication Bearer required
  442. localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
  443. const query = new URLSearchParams(localVarUrlObj.search);
  444. for (const key in localVarQueryParameter) {
  445. query.set(key, localVarQueryParameter[key]);
  446. }
  447. for (const key in options.params) {
  448. query.set(key, options.params[key]);
  449. }
  450. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  451. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  452. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  453. const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
  454. localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
  455. return {
  456. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  457. options: localVarRequestOptions,
  458. };
  459. },
  460. }
  461. };
  462. /**
  463. * SysTenantApi - functional programming interface
  464. * @export
  465. */
  466. export const SysTenantApiFp = function(configuration?: Configuration) {
  467. return {
  468. /**
  469. *
  470. * @summary 增加租户
  471. * @param {AddTenantInput} [body]
  472. * @param {*} [options] Override http request option.
  473. * @throws {RequiredError}
  474. */
  475. async sysTenantAddPost(body?: AddTenantInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
  476. const localVarAxiosArgs = await SysTenantApiAxiosParamCreator(configuration).sysTenantAddPost(body, options);
  477. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  478. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  479. return axios.request(axiosRequestArgs);
  480. };
  481. },
  482. /**
  483. *
  484. * @summary 删除租户
  485. * @param {DeleteTenantInput} [body]
  486. * @param {*} [options] Override http request option.
  487. * @throws {RequiredError}
  488. */
  489. async sysTenantDeletePost(body?: DeleteTenantInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
  490. const localVarAxiosArgs = await SysTenantApiAxiosParamCreator(configuration).sysTenantDeletePost(body, options);
  491. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  492. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  493. return axios.request(axiosRequestArgs);
  494. };
  495. },
  496. /**
  497. *
  498. * @summary 获取租户详情
  499. * @param {number} id Id
  500. * @param {*} [options] Override http request option.
  501. * @throws {RequiredError}
  502. */
  503. async sysTenantDetailGet(id: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultSysTenant>>> {
  504. const localVarAxiosArgs = await SysTenantApiAxiosParamCreator(configuration).sysTenantDetailGet(id, options);
  505. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  506. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  507. return axios.request(axiosRequestArgs);
  508. };
  509. },
  510. /**
  511. *
  512. * @summary 更新租户
  513. * @param {UpdateTenantInput} [body]
  514. * @param {*} [options] Override http request option.
  515. * @throws {RequiredError}
  516. */
  517. async sysTenantEditPost(body?: UpdateTenantInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
  518. const localVarAxiosArgs = await SysTenantApiAxiosParamCreator(configuration).sysTenantEditPost(body, options);
  519. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  520. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  521. return axios.request(axiosRequestArgs);
  522. };
  523. },
  524. /**
  525. *
  526. * @summary 授权租户管理员角色菜单
  527. * @param {RoleMenuInput} [body]
  528. * @param {*} [options] Override http request option.
  529. * @throws {RequiredError}
  530. */
  531. async sysTenantGrantMenuPost(body?: RoleMenuInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
  532. const localVarAxiosArgs = await SysTenantApiAxiosParamCreator(configuration).sysTenantGrantMenuPost(body, options);
  533. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  534. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  535. return axios.request(axiosRequestArgs);
  536. };
  537. },
  538. /**
  539. *
  540. * @summary 获取租户列表
  541. * @param {*} [options] Override http request option.
  542. * @throws {RequiredError}
  543. */
  544. async sysTenantListGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultObject>>> {
  545. const localVarAxiosArgs = await SysTenantApiAxiosParamCreator(configuration).sysTenantListGet(options);
  546. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  547. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  548. return axios.request(axiosRequestArgs);
  549. };
  550. },
  551. /**
  552. *
  553. * @summary 获取租户管理员角色拥有菜单树
  554. * @param {number} id Id
  555. * @param {*} [options] Override http request option.
  556. * @throws {RequiredError}
  557. */
  558. async sysTenantOwnMenuGet(id: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultListSysMenu>>> {
  559. const localVarAxiosArgs = await SysTenantApiAxiosParamCreator(configuration).sysTenantOwnMenuGet(id, options);
  560. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  561. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  562. return axios.request(axiosRequestArgs);
  563. };
  564. },
  565. /**
  566. *
  567. * @summary 获取租户管理员角色拥有菜单树
  568. * @param {number} id Id
  569. * @param {*} [options] Override http request option.
  570. * @throws {RequiredError}
  571. */
  572. async sysTenantOwnMenuListGet(id: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultListInt64>>> {
  573. const localVarAxiosArgs = await SysTenantApiAxiosParamCreator(configuration).sysTenantOwnMenuListGet(id, options);
  574. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  575. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  576. return axios.request(axiosRequestArgs);
  577. };
  578. },
  579. /**
  580. *
  581. * @summary 获取租户分页列表
  582. * @param {string} [name] 公司名称
  583. * @param {string} [adminName] 管理员名称
  584. * @param {string} [host] 主机
  585. * @param {string} [email] 电子邮箱
  586. * @param {string} [phone] 电话
  587. * @param {string} [connection] 数据库连接
  588. * @param {string} [schema] 架构
  589. * @param {string} [remark] 备注
  590. * @param {number} [page] 当前页码
  591. * @param {number} [pageSize] 页码容量
  592. * @param {string} [field] 排序字段
  593. * @param {string} [order] 排序方向
  594. * @param {string} [descStr] 降序排序
  595. * @param {*} [options] Override http request option.
  596. * @throws {RequiredError}
  597. */
  598. async sysTenantPageGet(name?: string, adminName?: string, host?: string, email?: string, phone?: string, connection?: string, schema?: string, remark?: string, page?: number, pageSize?: number, field?: string, order?: string, descStr?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultObject>>> {
  599. const localVarAxiosArgs = await SysTenantApiAxiosParamCreator(configuration).sysTenantPageGet(name, adminName, host, email, phone, connection, schema, remark, page, pageSize, field, order, descStr, options);
  600. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  601. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  602. return axios.request(axiosRequestArgs);
  603. };
  604. },
  605. /**
  606. *
  607. * @summary 重置租户管理员密码
  608. * @param {QueryeTenantInput} [body]
  609. * @param {*} [options] Override http request option.
  610. * @throws {RequiredError}
  611. */
  612. async sysTenantResetPwdPost(body?: QueryeTenantInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
  613. const localVarAxiosArgs = await SysTenantApiAxiosParamCreator(configuration).sysTenantResetPwdPost(body, options);
  614. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  615. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  616. return axios.request(axiosRequestArgs);
  617. };
  618. },
  619. }
  620. };
  621. /**
  622. * SysTenantApi - factory interface
  623. * @export
  624. */
  625. export const SysTenantApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
  626. return {
  627. /**
  628. *
  629. * @summary 增加租户
  630. * @param {AddTenantInput} [body]
  631. * @param {*} [options] Override http request option.
  632. * @throws {RequiredError}
  633. */
  634. async sysTenantAddPost(body?: AddTenantInput, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
  635. return SysTenantApiFp(configuration).sysTenantAddPost(body, options).then((request) => request(axios, basePath));
  636. },
  637. /**
  638. *
  639. * @summary 删除租户
  640. * @param {DeleteTenantInput} [body]
  641. * @param {*} [options] Override http request option.
  642. * @throws {RequiredError}
  643. */
  644. async sysTenantDeletePost(body?: DeleteTenantInput, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
  645. return SysTenantApiFp(configuration).sysTenantDeletePost(body, options).then((request) => request(axios, basePath));
  646. },
  647. /**
  648. *
  649. * @summary 获取租户详情
  650. * @param {number} id Id
  651. * @param {*} [options] Override http request option.
  652. * @throws {RequiredError}
  653. */
  654. async sysTenantDetailGet(id: number, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultSysTenant>> {
  655. return SysTenantApiFp(configuration).sysTenantDetailGet(id, options).then((request) => request(axios, basePath));
  656. },
  657. /**
  658. *
  659. * @summary 更新租户
  660. * @param {UpdateTenantInput} [body]
  661. * @param {*} [options] Override http request option.
  662. * @throws {RequiredError}
  663. */
  664. async sysTenantEditPost(body?: UpdateTenantInput, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
  665. return SysTenantApiFp(configuration).sysTenantEditPost(body, options).then((request) => request(axios, basePath));
  666. },
  667. /**
  668. *
  669. * @summary 授权租户管理员角色菜单
  670. * @param {RoleMenuInput} [body]
  671. * @param {*} [options] Override http request option.
  672. * @throws {RequiredError}
  673. */
  674. async sysTenantGrantMenuPost(body?: RoleMenuInput, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
  675. return SysTenantApiFp(configuration).sysTenantGrantMenuPost(body, options).then((request) => request(axios, basePath));
  676. },
  677. /**
  678. *
  679. * @summary 获取租户列表
  680. * @param {*} [options] Override http request option.
  681. * @throws {RequiredError}
  682. */
  683. async sysTenantListGet(options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultObject>> {
  684. return SysTenantApiFp(configuration).sysTenantListGet(options).then((request) => request(axios, basePath));
  685. },
  686. /**
  687. *
  688. * @summary 获取租户管理员角色拥有菜单树
  689. * @param {number} id Id
  690. * @param {*} [options] Override http request option.
  691. * @throws {RequiredError}
  692. */
  693. async sysTenantOwnMenuGet(id: number, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultListSysMenu>> {
  694. return SysTenantApiFp(configuration).sysTenantOwnMenuGet(id, options).then((request) => request(axios, basePath));
  695. },
  696. /**
  697. *
  698. * @summary 获取租户管理员角色拥有菜单树
  699. * @param {number} id Id
  700. * @param {*} [options] Override http request option.
  701. * @throws {RequiredError}
  702. */
  703. async sysTenantOwnMenuListGet(id: number, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultListInt64>> {
  704. return SysTenantApiFp(configuration).sysTenantOwnMenuListGet(id, options).then((request) => request(axios, basePath));
  705. },
  706. /**
  707. *
  708. * @summary 获取租户分页列表
  709. * @param {string} [name] 公司名称
  710. * @param {string} [adminName] 管理员名称
  711. * @param {string} [host] 主机
  712. * @param {string} [email] 电子邮箱
  713. * @param {string} [phone] 电话
  714. * @param {string} [connection] 数据库连接
  715. * @param {string} [schema] 架构
  716. * @param {string} [remark] 备注
  717. * @param {number} [page] 当前页码
  718. * @param {number} [pageSize] 页码容量
  719. * @param {string} [field] 排序字段
  720. * @param {string} [order] 排序方向
  721. * @param {string} [descStr] 降序排序
  722. * @param {*} [options] Override http request option.
  723. * @throws {RequiredError}
  724. */
  725. async sysTenantPageGet(name?: string, adminName?: string, host?: string, email?: string, phone?: string, connection?: string, schema?: string, remark?: string, page?: number, pageSize?: number, field?: string, order?: string, descStr?: string, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultObject>> {
  726. return SysTenantApiFp(configuration).sysTenantPageGet(name, adminName, host, email, phone, connection, schema, remark, page, pageSize, field, order, descStr, options).then((request) => request(axios, basePath));
  727. },
  728. /**
  729. *
  730. * @summary 重置租户管理员密码
  731. * @param {QueryeTenantInput} [body]
  732. * @param {*} [options] Override http request option.
  733. * @throws {RequiredError}
  734. */
  735. async sysTenantResetPwdPost(body?: QueryeTenantInput, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
  736. return SysTenantApiFp(configuration).sysTenantResetPwdPost(body, options).then((request) => request(axios, basePath));
  737. },
  738. };
  739. };
  740. /**
  741. * SysTenantApi - object-oriented interface
  742. * @export
  743. * @class SysTenantApi
  744. * @extends {BaseAPI}
  745. */
  746. export class SysTenantApi extends BaseAPI {
  747. /**
  748. *
  749. * @summary 增加租户
  750. * @param {AddTenantInput} [body]
  751. * @param {*} [options] Override http request option.
  752. * @throws {RequiredError}
  753. * @memberof SysTenantApi
  754. */
  755. public async sysTenantAddPost(body?: AddTenantInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
  756. return SysTenantApiFp(this.configuration).sysTenantAddPost(body, options).then((request) => request(this.axios, this.basePath));
  757. }
  758. /**
  759. *
  760. * @summary 删除租户
  761. * @param {DeleteTenantInput} [body]
  762. * @param {*} [options] Override http request option.
  763. * @throws {RequiredError}
  764. * @memberof SysTenantApi
  765. */
  766. public async sysTenantDeletePost(body?: DeleteTenantInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
  767. return SysTenantApiFp(this.configuration).sysTenantDeletePost(body, options).then((request) => request(this.axios, this.basePath));
  768. }
  769. /**
  770. *
  771. * @summary 获取租户详情
  772. * @param {number} id Id
  773. * @param {*} [options] Override http request option.
  774. * @throws {RequiredError}
  775. * @memberof SysTenantApi
  776. */
  777. public async sysTenantDetailGet(id: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultSysTenant>> {
  778. return SysTenantApiFp(this.configuration).sysTenantDetailGet(id, options).then((request) => request(this.axios, this.basePath));
  779. }
  780. /**
  781. *
  782. * @summary 更新租户
  783. * @param {UpdateTenantInput} [body]
  784. * @param {*} [options] Override http request option.
  785. * @throws {RequiredError}
  786. * @memberof SysTenantApi
  787. */
  788. public async sysTenantEditPost(body?: UpdateTenantInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
  789. return SysTenantApiFp(this.configuration).sysTenantEditPost(body, options).then((request) => request(this.axios, this.basePath));
  790. }
  791. /**
  792. *
  793. * @summary 授权租户管理员角色菜单
  794. * @param {RoleMenuInput} [body]
  795. * @param {*} [options] Override http request option.
  796. * @throws {RequiredError}
  797. * @memberof SysTenantApi
  798. */
  799. public async sysTenantGrantMenuPost(body?: RoleMenuInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
  800. return SysTenantApiFp(this.configuration).sysTenantGrantMenuPost(body, options).then((request) => request(this.axios, this.basePath));
  801. }
  802. /**
  803. *
  804. * @summary 获取租户列表
  805. * @param {*} [options] Override http request option.
  806. * @throws {RequiredError}
  807. * @memberof SysTenantApi
  808. */
  809. public async sysTenantListGet(options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultObject>> {
  810. return SysTenantApiFp(this.configuration).sysTenantListGet(options).then((request) => request(this.axios, this.basePath));
  811. }
  812. /**
  813. *
  814. * @summary 获取租户管理员角色拥有菜单树
  815. * @param {number} id Id
  816. * @param {*} [options] Override http request option.
  817. * @throws {RequiredError}
  818. * @memberof SysTenantApi
  819. */
  820. public async sysTenantOwnMenuGet(id: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultListSysMenu>> {
  821. return SysTenantApiFp(this.configuration).sysTenantOwnMenuGet(id, options).then((request) => request(this.axios, this.basePath));
  822. }
  823. /**
  824. *
  825. * @summary 获取租户管理员角色拥有菜单树
  826. * @param {number} id Id
  827. * @param {*} [options] Override http request option.
  828. * @throws {RequiredError}
  829. * @memberof SysTenantApi
  830. */
  831. public async sysTenantOwnMenuListGet(id: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultListInt64>> {
  832. return SysTenantApiFp(this.configuration).sysTenantOwnMenuListGet(id, options).then((request) => request(this.axios, this.basePath));
  833. }
  834. /**
  835. *
  836. * @summary 获取租户分页列表
  837. * @param {string} [name] 公司名称
  838. * @param {string} [adminName] 管理员名称
  839. * @param {string} [host] 主机
  840. * @param {string} [email] 电子邮箱
  841. * @param {string} [phone] 电话
  842. * @param {string} [connection] 数据库连接
  843. * @param {string} [schema] 架构
  844. * @param {string} [remark] 备注
  845. * @param {number} [page] 当前页码
  846. * @param {number} [pageSize] 页码容量
  847. * @param {string} [field] 排序字段
  848. * @param {string} [order] 排序方向
  849. * @param {string} [descStr] 降序排序
  850. * @param {*} [options] Override http request option.
  851. * @throws {RequiredError}
  852. * @memberof SysTenantApi
  853. */
  854. public async sysTenantPageGet(name?: string, adminName?: string, host?: string, email?: string, phone?: string, connection?: string, schema?: string, remark?: string, page?: number, pageSize?: number, field?: string, order?: string, descStr?: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultObject>> {
  855. return SysTenantApiFp(this.configuration).sysTenantPageGet(name, adminName, host, email, phone, connection, schema, remark, page, pageSize, field, order, descStr, options).then((request) => request(this.axios, this.basePath));
  856. }
  857. /**
  858. *
  859. * @summary 重置租户管理员密码
  860. * @param {QueryeTenantInput} [body]
  861. * @param {*} [options] Override http request option.
  862. * @throws {RequiredError}
  863. * @memberof SysTenantApi
  864. */
  865. public async sysTenantResetPwdPost(body?: QueryeTenantInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
  866. return SysTenantApiFp(this.configuration).sysTenantResetPwdPost(body, options).then((request) => request(this.axios, this.basePath));
  867. }
  868. }