sys-tenant-api.ts 45 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897
  1. /* tslint:disable */
  2. /* eslint-disable */
  3. /**
  4. * Admin.NET 通用权限开发平台
  5. * 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
  6. *
  7. * OpenAPI spec version: 1.0.0
  8. *
  9. *
  10. * NOTE: This class is auto generated by the swagger code generator program.
  11. * https://github.com/swagger-api/swagger-codegen.git
  12. * Do not edit the class manually.
  13. */
  14. import globalAxios, { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios';
  15. import { Configuration } from '../configuration';
  16. // Some imports not used depending on template conditions
  17. // @ts-ignore
  18. import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
  19. import { AddTenantInput } from '../models';
  20. import { AdminResultInt32 } from '../models';
  21. import { AdminResultListInt64 } from '../models';
  22. import { AdminResultListSysUser } from '../models';
  23. import { AdminResultSqlSugarPagedListTenantOutput } from '../models';
  24. import { AdminResultString } from '../models';
  25. import { DeleteTenantInput } from '../models';
  26. import { PageTenantInput } from '../models';
  27. import { RoleMenuInput } from '../models';
  28. import { TenantIdInput } from '../models';
  29. import { TenantInput } from '../models';
  30. import { TenantUserInput } from '../models';
  31. import { UpdateTenantInput } from '../models';
  32. /**
  33. * SysTenantApi - axios parameter creator
  34. * @export
  35. */
  36. export const SysTenantApiAxiosParamCreator = function (configuration?: Configuration) {
  37. return {
  38. /**
  39. *
  40. * @summary 增加租户 🔖
  41. * @param {AddTenantInput} [body]
  42. * @param {*} [options] Override http request option.
  43. * @throws {RequiredError}
  44. */
  45. apiSysTenantAddPost: async (body?: AddTenantInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  46. const localVarPath = `/api/sysTenant/add`;
  47. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  48. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  49. let baseOptions;
  50. if (configuration) {
  51. baseOptions = configuration.baseOptions;
  52. }
  53. const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
  54. const localVarHeaderParameter = {} as any;
  55. const localVarQueryParameter = {} as any;
  56. // authentication Bearer required
  57. // http bearer authentication required
  58. if (configuration && configuration.accessToken) {
  59. const accessToken = typeof configuration.accessToken === 'function'
  60. ? await configuration.accessToken()
  61. : await configuration.accessToken;
  62. localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
  63. }
  64. localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
  65. const query = new URLSearchParams(localVarUrlObj.search);
  66. for (const key in localVarQueryParameter) {
  67. query.set(key, localVarQueryParameter[key]);
  68. }
  69. for (const key in options.params) {
  70. query.set(key, options.params[key]);
  71. }
  72. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  73. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  74. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  75. const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
  76. localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
  77. return {
  78. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  79. options: localVarRequestOptions,
  80. };
  81. },
  82. /**
  83. *
  84. * @summary 创建租户数据库 🔖
  85. * @param {TenantInput} [body]
  86. * @param {*} [options] Override http request option.
  87. * @throws {RequiredError}
  88. */
  89. apiSysTenantCreateDbPost: async (body?: TenantInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  90. const localVarPath = `/api/sysTenant/createDb`;
  91. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  92. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  93. let baseOptions;
  94. if (configuration) {
  95. baseOptions = configuration.baseOptions;
  96. }
  97. const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
  98. const localVarHeaderParameter = {} as any;
  99. const localVarQueryParameter = {} as any;
  100. // authentication Bearer required
  101. // http bearer authentication required
  102. if (configuration && configuration.accessToken) {
  103. const accessToken = typeof configuration.accessToken === 'function'
  104. ? await configuration.accessToken()
  105. : await configuration.accessToken;
  106. localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
  107. }
  108. localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
  109. const query = new URLSearchParams(localVarUrlObj.search);
  110. for (const key in localVarQueryParameter) {
  111. query.set(key, localVarQueryParameter[key]);
  112. }
  113. for (const key in options.params) {
  114. query.set(key, options.params[key]);
  115. }
  116. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  117. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  118. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  119. const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
  120. localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
  121. return {
  122. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  123. options: localVarRequestOptions,
  124. };
  125. },
  126. /**
  127. *
  128. * @summary 删除租户 🔖
  129. * @param {DeleteTenantInput} [body]
  130. * @param {*} [options] Override http request option.
  131. * @throws {RequiredError}
  132. */
  133. apiSysTenantDeletePost: async (body?: DeleteTenantInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  134. const localVarPath = `/api/sysTenant/delete`;
  135. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  136. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  137. let baseOptions;
  138. if (configuration) {
  139. baseOptions = configuration.baseOptions;
  140. }
  141. const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
  142. const localVarHeaderParameter = {} as any;
  143. const localVarQueryParameter = {} as any;
  144. // authentication Bearer required
  145. // http bearer authentication required
  146. if (configuration && configuration.accessToken) {
  147. const accessToken = typeof configuration.accessToken === 'function'
  148. ? await configuration.accessToken()
  149. : await configuration.accessToken;
  150. localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
  151. }
  152. localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
  153. const query = new URLSearchParams(localVarUrlObj.search);
  154. for (const key in localVarQueryParameter) {
  155. query.set(key, localVarQueryParameter[key]);
  156. }
  157. for (const key in options.params) {
  158. query.set(key, options.params[key]);
  159. }
  160. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  161. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  162. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  163. const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
  164. localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
  165. return {
  166. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  167. options: localVarRequestOptions,
  168. };
  169. },
  170. /**
  171. *
  172. * @summary 授权租户管理员角色菜单 🔖
  173. * @param {RoleMenuInput} [body]
  174. * @param {*} [options] Override http request option.
  175. * @throws {RequiredError}
  176. */
  177. apiSysTenantGrantMenuPost: async (body?: RoleMenuInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  178. const localVarPath = `/api/sysTenant/grantMenu`;
  179. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  180. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  181. let baseOptions;
  182. if (configuration) {
  183. baseOptions = configuration.baseOptions;
  184. }
  185. const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
  186. const localVarHeaderParameter = {} as any;
  187. const localVarQueryParameter = {} as any;
  188. // authentication Bearer required
  189. // http bearer authentication required
  190. if (configuration && configuration.accessToken) {
  191. const accessToken = typeof configuration.accessToken === 'function'
  192. ? await configuration.accessToken()
  193. : await configuration.accessToken;
  194. localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
  195. }
  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 获取租户管理员角色拥有菜单Id集合 🔖
  217. * @param {number} [userId] 用户Id
  218. * @param {*} [options] Override http request option.
  219. * @throws {RequiredError}
  220. */
  221. apiSysTenantOwnMenuListGet: async (userId?: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  222. const localVarPath = `/api/sysTenant/ownMenuList`;
  223. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  224. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  225. let baseOptions;
  226. if (configuration) {
  227. baseOptions = configuration.baseOptions;
  228. }
  229. const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
  230. const localVarHeaderParameter = {} as any;
  231. const localVarQueryParameter = {} as any;
  232. // authentication Bearer required
  233. // http bearer authentication required
  234. if (configuration && configuration.accessToken) {
  235. const accessToken = typeof configuration.accessToken === 'function'
  236. ? await configuration.accessToken()
  237. : await configuration.accessToken;
  238. localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
  239. }
  240. if (userId !== undefined) {
  241. localVarQueryParameter['UserId'] = userId;
  242. }
  243. const query = new URLSearchParams(localVarUrlObj.search);
  244. for (const key in localVarQueryParameter) {
  245. query.set(key, localVarQueryParameter[key]);
  246. }
  247. for (const key in options.params) {
  248. query.set(key, options.params[key]);
  249. }
  250. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  251. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  252. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  253. return {
  254. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  255. options: localVarRequestOptions,
  256. };
  257. },
  258. /**
  259. *
  260. * @summary 获取租户分页列表 🔖
  261. * @param {PageTenantInput} [body]
  262. * @param {*} [options] Override http request option.
  263. * @throws {RequiredError}
  264. */
  265. apiSysTenantPagePost: async (body?: PageTenantInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  266. const localVarPath = `/api/sysTenant/page`;
  267. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  268. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  269. let baseOptions;
  270. if (configuration) {
  271. baseOptions = configuration.baseOptions;
  272. }
  273. const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
  274. const localVarHeaderParameter = {} as any;
  275. const localVarQueryParameter = {} as any;
  276. // authentication Bearer required
  277. // http bearer authentication required
  278. if (configuration && configuration.accessToken) {
  279. const accessToken = typeof configuration.accessToken === 'function'
  280. ? await configuration.accessToken()
  281. : await configuration.accessToken;
  282. localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
  283. }
  284. localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
  285. const query = new URLSearchParams(localVarUrlObj.search);
  286. for (const key in localVarQueryParameter) {
  287. query.set(key, localVarQueryParameter[key]);
  288. }
  289. for (const key in options.params) {
  290. query.set(key, options.params[key]);
  291. }
  292. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  293. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  294. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  295. const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
  296. localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
  297. return {
  298. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  299. options: localVarRequestOptions,
  300. };
  301. },
  302. /**
  303. *
  304. * @summary 重置租户管理员密码 🔖
  305. * @param {TenantUserInput} [body]
  306. * @param {*} [options] Override http request option.
  307. * @throws {RequiredError}
  308. */
  309. apiSysTenantResetPwdPost: async (body?: TenantUserInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  310. const localVarPath = `/api/sysTenant/resetPwd`;
  311. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  312. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  313. let baseOptions;
  314. if (configuration) {
  315. baseOptions = configuration.baseOptions;
  316. }
  317. const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
  318. const localVarHeaderParameter = {} as any;
  319. const localVarQueryParameter = {} as any;
  320. // authentication Bearer required
  321. // http bearer authentication required
  322. if (configuration && configuration.accessToken) {
  323. const accessToken = typeof configuration.accessToken === 'function'
  324. ? await configuration.accessToken()
  325. : await configuration.accessToken;
  326. localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
  327. }
  328. localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
  329. const query = new URLSearchParams(localVarUrlObj.search);
  330. for (const key in localVarQueryParameter) {
  331. query.set(key, localVarQueryParameter[key]);
  332. }
  333. for (const key in options.params) {
  334. query.set(key, options.params[key]);
  335. }
  336. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  337. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  338. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  339. const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
  340. localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
  341. return {
  342. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  343. options: localVarRequestOptions,
  344. };
  345. },
  346. /**
  347. *
  348. * @summary 设置租户状态 🔖
  349. * @param {TenantInput} [body]
  350. * @param {*} [options] Override http request option.
  351. * @throws {RequiredError}
  352. */
  353. apiSysTenantSetStatusPost: async (body?: TenantInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  354. const localVarPath = `/api/sysTenant/setStatus`;
  355. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  356. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  357. let baseOptions;
  358. if (configuration) {
  359. baseOptions = configuration.baseOptions;
  360. }
  361. const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
  362. const localVarHeaderParameter = {} as any;
  363. const localVarQueryParameter = {} as any;
  364. // authentication Bearer required
  365. // http bearer authentication required
  366. if (configuration && configuration.accessToken) {
  367. const accessToken = typeof configuration.accessToken === 'function'
  368. ? await configuration.accessToken()
  369. : await configuration.accessToken;
  370. localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
  371. }
  372. localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
  373. const query = new URLSearchParams(localVarUrlObj.search);
  374. for (const key in localVarQueryParameter) {
  375. query.set(key, localVarQueryParameter[key]);
  376. }
  377. for (const key in options.params) {
  378. query.set(key, options.params[key]);
  379. }
  380. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  381. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  382. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  383. const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
  384. localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
  385. return {
  386. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  387. options: localVarRequestOptions,
  388. };
  389. },
  390. /**
  391. *
  392. * @summary 更新租户 🔖
  393. * @param {UpdateTenantInput} [body]
  394. * @param {*} [options] Override http request option.
  395. * @throws {RequiredError}
  396. */
  397. apiSysTenantUpdatePost: async (body?: UpdateTenantInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  398. const localVarPath = `/api/sysTenant/update`;
  399. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  400. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  401. let baseOptions;
  402. if (configuration) {
  403. baseOptions = configuration.baseOptions;
  404. }
  405. const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
  406. const localVarHeaderParameter = {} as any;
  407. const localVarQueryParameter = {} as any;
  408. // authentication Bearer required
  409. // http bearer authentication required
  410. if (configuration && configuration.accessToken) {
  411. const accessToken = typeof configuration.accessToken === 'function'
  412. ? await configuration.accessToken()
  413. : await configuration.accessToken;
  414. localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
  415. }
  416. localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
  417. const query = new URLSearchParams(localVarUrlObj.search);
  418. for (const key in localVarQueryParameter) {
  419. query.set(key, localVarQueryParameter[key]);
  420. }
  421. for (const key in options.params) {
  422. query.set(key, options.params[key]);
  423. }
  424. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  425. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  426. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  427. const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
  428. localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
  429. return {
  430. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  431. options: localVarRequestOptions,
  432. };
  433. },
  434. /**
  435. *
  436. * @summary 获取租户下的用户列表 🔖
  437. * @param {TenantIdInput} [body]
  438. * @param {*} [options] Override http request option.
  439. * @throws {RequiredError}
  440. */
  441. apiSysTenantUserListPost: async (body?: TenantIdInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  442. const localVarPath = `/api/sysTenant/userList`;
  443. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  444. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  445. let baseOptions;
  446. if (configuration) {
  447. baseOptions = configuration.baseOptions;
  448. }
  449. const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
  450. const localVarHeaderParameter = {} as any;
  451. const localVarQueryParameter = {} as any;
  452. // authentication Bearer required
  453. // http bearer authentication required
  454. if (configuration && configuration.accessToken) {
  455. const accessToken = typeof configuration.accessToken === 'function'
  456. ? await configuration.accessToken()
  457. : await configuration.accessToken;
  458. localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
  459. }
  460. localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
  461. const query = new URLSearchParams(localVarUrlObj.search);
  462. for (const key in localVarQueryParameter) {
  463. query.set(key, localVarQueryParameter[key]);
  464. }
  465. for (const key in options.params) {
  466. query.set(key, options.params[key]);
  467. }
  468. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  469. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  470. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  471. const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
  472. localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
  473. return {
  474. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  475. options: localVarRequestOptions,
  476. };
  477. },
  478. }
  479. };
  480. /**
  481. * SysTenantApi - functional programming interface
  482. * @export
  483. */
  484. export const SysTenantApiFp = function(configuration?: Configuration) {
  485. return {
  486. /**
  487. *
  488. * @summary 增加租户 🔖
  489. * @param {AddTenantInput} [body]
  490. * @param {*} [options] Override http request option.
  491. * @throws {RequiredError}
  492. */
  493. async apiSysTenantAddPost(body?: AddTenantInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
  494. const localVarAxiosArgs = await SysTenantApiAxiosParamCreator(configuration).apiSysTenantAddPost(body, options);
  495. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  496. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  497. return axios.request(axiosRequestArgs);
  498. };
  499. },
  500. /**
  501. *
  502. * @summary 创建租户数据库 🔖
  503. * @param {TenantInput} [body]
  504. * @param {*} [options] Override http request option.
  505. * @throws {RequiredError}
  506. */
  507. async apiSysTenantCreateDbPost(body?: TenantInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
  508. const localVarAxiosArgs = await SysTenantApiAxiosParamCreator(configuration).apiSysTenantCreateDbPost(body, options);
  509. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  510. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  511. return axios.request(axiosRequestArgs);
  512. };
  513. },
  514. /**
  515. *
  516. * @summary 删除租户 🔖
  517. * @param {DeleteTenantInput} [body]
  518. * @param {*} [options] Override http request option.
  519. * @throws {RequiredError}
  520. */
  521. async apiSysTenantDeletePost(body?: DeleteTenantInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
  522. const localVarAxiosArgs = await SysTenantApiAxiosParamCreator(configuration).apiSysTenantDeletePost(body, options);
  523. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  524. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  525. return axios.request(axiosRequestArgs);
  526. };
  527. },
  528. /**
  529. *
  530. * @summary 授权租户管理员角色菜单 🔖
  531. * @param {RoleMenuInput} [body]
  532. * @param {*} [options] Override http request option.
  533. * @throws {RequiredError}
  534. */
  535. async apiSysTenantGrantMenuPost(body?: RoleMenuInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
  536. const localVarAxiosArgs = await SysTenantApiAxiosParamCreator(configuration).apiSysTenantGrantMenuPost(body, options);
  537. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  538. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  539. return axios.request(axiosRequestArgs);
  540. };
  541. },
  542. /**
  543. *
  544. * @summary 获取租户管理员角色拥有菜单Id集合 🔖
  545. * @param {number} [userId] 用户Id
  546. * @param {*} [options] Override http request option.
  547. * @throws {RequiredError}
  548. */
  549. async apiSysTenantOwnMenuListGet(userId?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultListInt64>>> {
  550. const localVarAxiosArgs = await SysTenantApiAxiosParamCreator(configuration).apiSysTenantOwnMenuListGet(userId, options);
  551. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  552. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  553. return axios.request(axiosRequestArgs);
  554. };
  555. },
  556. /**
  557. *
  558. * @summary 获取租户分页列表 🔖
  559. * @param {PageTenantInput} [body]
  560. * @param {*} [options] Override http request option.
  561. * @throws {RequiredError}
  562. */
  563. async apiSysTenantPagePost(body?: PageTenantInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultSqlSugarPagedListTenantOutput>>> {
  564. const localVarAxiosArgs = await SysTenantApiAxiosParamCreator(configuration).apiSysTenantPagePost(body, options);
  565. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  566. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  567. return axios.request(axiosRequestArgs);
  568. };
  569. },
  570. /**
  571. *
  572. * @summary 重置租户管理员密码 🔖
  573. * @param {TenantUserInput} [body]
  574. * @param {*} [options] Override http request option.
  575. * @throws {RequiredError}
  576. */
  577. async apiSysTenantResetPwdPost(body?: TenantUserInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultString>>> {
  578. const localVarAxiosArgs = await SysTenantApiAxiosParamCreator(configuration).apiSysTenantResetPwdPost(body, options);
  579. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  580. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  581. return axios.request(axiosRequestArgs);
  582. };
  583. },
  584. /**
  585. *
  586. * @summary 设置租户状态 🔖
  587. * @param {TenantInput} [body]
  588. * @param {*} [options] Override http request option.
  589. * @throws {RequiredError}
  590. */
  591. async apiSysTenantSetStatusPost(body?: TenantInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultInt32>>> {
  592. const localVarAxiosArgs = await SysTenantApiAxiosParamCreator(configuration).apiSysTenantSetStatusPost(body, options);
  593. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  594. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  595. return axios.request(axiosRequestArgs);
  596. };
  597. },
  598. /**
  599. *
  600. * @summary 更新租户 🔖
  601. * @param {UpdateTenantInput} [body]
  602. * @param {*} [options] Override http request option.
  603. * @throws {RequiredError}
  604. */
  605. async apiSysTenantUpdatePost(body?: UpdateTenantInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
  606. const localVarAxiosArgs = await SysTenantApiAxiosParamCreator(configuration).apiSysTenantUpdatePost(body, options);
  607. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  608. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  609. return axios.request(axiosRequestArgs);
  610. };
  611. },
  612. /**
  613. *
  614. * @summary 获取租户下的用户列表 🔖
  615. * @param {TenantIdInput} [body]
  616. * @param {*} [options] Override http request option.
  617. * @throws {RequiredError}
  618. */
  619. async apiSysTenantUserListPost(body?: TenantIdInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultListSysUser>>> {
  620. const localVarAxiosArgs = await SysTenantApiAxiosParamCreator(configuration).apiSysTenantUserListPost(body, options);
  621. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  622. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  623. return axios.request(axiosRequestArgs);
  624. };
  625. },
  626. }
  627. };
  628. /**
  629. * SysTenantApi - factory interface
  630. * @export
  631. */
  632. export const SysTenantApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
  633. return {
  634. /**
  635. *
  636. * @summary 增加租户 🔖
  637. * @param {AddTenantInput} [body]
  638. * @param {*} [options] Override http request option.
  639. * @throws {RequiredError}
  640. */
  641. async apiSysTenantAddPost(body?: AddTenantInput, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
  642. return SysTenantApiFp(configuration).apiSysTenantAddPost(body, options).then((request) => request(axios, basePath));
  643. },
  644. /**
  645. *
  646. * @summary 创建租户数据库 🔖
  647. * @param {TenantInput} [body]
  648. * @param {*} [options] Override http request option.
  649. * @throws {RequiredError}
  650. */
  651. async apiSysTenantCreateDbPost(body?: TenantInput, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
  652. return SysTenantApiFp(configuration).apiSysTenantCreateDbPost(body, options).then((request) => request(axios, basePath));
  653. },
  654. /**
  655. *
  656. * @summary 删除租户 🔖
  657. * @param {DeleteTenantInput} [body]
  658. * @param {*} [options] Override http request option.
  659. * @throws {RequiredError}
  660. */
  661. async apiSysTenantDeletePost(body?: DeleteTenantInput, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
  662. return SysTenantApiFp(configuration).apiSysTenantDeletePost(body, options).then((request) => request(axios, basePath));
  663. },
  664. /**
  665. *
  666. * @summary 授权租户管理员角色菜单 🔖
  667. * @param {RoleMenuInput} [body]
  668. * @param {*} [options] Override http request option.
  669. * @throws {RequiredError}
  670. */
  671. async apiSysTenantGrantMenuPost(body?: RoleMenuInput, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
  672. return SysTenantApiFp(configuration).apiSysTenantGrantMenuPost(body, options).then((request) => request(axios, basePath));
  673. },
  674. /**
  675. *
  676. * @summary 获取租户管理员角色拥有菜单Id集合 🔖
  677. * @param {number} [userId] 用户Id
  678. * @param {*} [options] Override http request option.
  679. * @throws {RequiredError}
  680. */
  681. async apiSysTenantOwnMenuListGet(userId?: number, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultListInt64>> {
  682. return SysTenantApiFp(configuration).apiSysTenantOwnMenuListGet(userId, options).then((request) => request(axios, basePath));
  683. },
  684. /**
  685. *
  686. * @summary 获取租户分页列表 🔖
  687. * @param {PageTenantInput} [body]
  688. * @param {*} [options] Override http request option.
  689. * @throws {RequiredError}
  690. */
  691. async apiSysTenantPagePost(body?: PageTenantInput, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultSqlSugarPagedListTenantOutput>> {
  692. return SysTenantApiFp(configuration).apiSysTenantPagePost(body, options).then((request) => request(axios, basePath));
  693. },
  694. /**
  695. *
  696. * @summary 重置租户管理员密码 🔖
  697. * @param {TenantUserInput} [body]
  698. * @param {*} [options] Override http request option.
  699. * @throws {RequiredError}
  700. */
  701. async apiSysTenantResetPwdPost(body?: TenantUserInput, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultString>> {
  702. return SysTenantApiFp(configuration).apiSysTenantResetPwdPost(body, options).then((request) => request(axios, basePath));
  703. },
  704. /**
  705. *
  706. * @summary 设置租户状态 🔖
  707. * @param {TenantInput} [body]
  708. * @param {*} [options] Override http request option.
  709. * @throws {RequiredError}
  710. */
  711. async apiSysTenantSetStatusPost(body?: TenantInput, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultInt32>> {
  712. return SysTenantApiFp(configuration).apiSysTenantSetStatusPost(body, options).then((request) => request(axios, basePath));
  713. },
  714. /**
  715. *
  716. * @summary 更新租户 🔖
  717. * @param {UpdateTenantInput} [body]
  718. * @param {*} [options] Override http request option.
  719. * @throws {RequiredError}
  720. */
  721. async apiSysTenantUpdatePost(body?: UpdateTenantInput, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
  722. return SysTenantApiFp(configuration).apiSysTenantUpdatePost(body, options).then((request) => request(axios, basePath));
  723. },
  724. /**
  725. *
  726. * @summary 获取租户下的用户列表 🔖
  727. * @param {TenantIdInput} [body]
  728. * @param {*} [options] Override http request option.
  729. * @throws {RequiredError}
  730. */
  731. async apiSysTenantUserListPost(body?: TenantIdInput, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultListSysUser>> {
  732. return SysTenantApiFp(configuration).apiSysTenantUserListPost(body, options).then((request) => request(axios, basePath));
  733. },
  734. };
  735. };
  736. /**
  737. * SysTenantApi - object-oriented interface
  738. * @export
  739. * @class SysTenantApi
  740. * @extends {BaseAPI}
  741. */
  742. export class SysTenantApi extends BaseAPI {
  743. /**
  744. *
  745. * @summary 增加租户 🔖
  746. * @param {AddTenantInput} [body]
  747. * @param {*} [options] Override http request option.
  748. * @throws {RequiredError}
  749. * @memberof SysTenantApi
  750. */
  751. public async apiSysTenantAddPost(body?: AddTenantInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
  752. return SysTenantApiFp(this.configuration).apiSysTenantAddPost(body, options).then((request) => request(this.axios, this.basePath));
  753. }
  754. /**
  755. *
  756. * @summary 创建租户数据库 🔖
  757. * @param {TenantInput} [body]
  758. * @param {*} [options] Override http request option.
  759. * @throws {RequiredError}
  760. * @memberof SysTenantApi
  761. */
  762. public async apiSysTenantCreateDbPost(body?: TenantInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
  763. return SysTenantApiFp(this.configuration).apiSysTenantCreateDbPost(body, options).then((request) => request(this.axios, this.basePath));
  764. }
  765. /**
  766. *
  767. * @summary 删除租户 🔖
  768. * @param {DeleteTenantInput} [body]
  769. * @param {*} [options] Override http request option.
  770. * @throws {RequiredError}
  771. * @memberof SysTenantApi
  772. */
  773. public async apiSysTenantDeletePost(body?: DeleteTenantInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
  774. return SysTenantApiFp(this.configuration).apiSysTenantDeletePost(body, options).then((request) => request(this.axios, this.basePath));
  775. }
  776. /**
  777. *
  778. * @summary 授权租户管理员角色菜单 🔖
  779. * @param {RoleMenuInput} [body]
  780. * @param {*} [options] Override http request option.
  781. * @throws {RequiredError}
  782. * @memberof SysTenantApi
  783. */
  784. public async apiSysTenantGrantMenuPost(body?: RoleMenuInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
  785. return SysTenantApiFp(this.configuration).apiSysTenantGrantMenuPost(body, options).then((request) => request(this.axios, this.basePath));
  786. }
  787. /**
  788. *
  789. * @summary 获取租户管理员角色拥有菜单Id集合 🔖
  790. * @param {number} [userId] 用户Id
  791. * @param {*} [options] Override http request option.
  792. * @throws {RequiredError}
  793. * @memberof SysTenantApi
  794. */
  795. public async apiSysTenantOwnMenuListGet(userId?: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultListInt64>> {
  796. return SysTenantApiFp(this.configuration).apiSysTenantOwnMenuListGet(userId, options).then((request) => request(this.axios, this.basePath));
  797. }
  798. /**
  799. *
  800. * @summary 获取租户分页列表 🔖
  801. * @param {PageTenantInput} [body]
  802. * @param {*} [options] Override http request option.
  803. * @throws {RequiredError}
  804. * @memberof SysTenantApi
  805. */
  806. public async apiSysTenantPagePost(body?: PageTenantInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultSqlSugarPagedListTenantOutput>> {
  807. return SysTenantApiFp(this.configuration).apiSysTenantPagePost(body, options).then((request) => request(this.axios, this.basePath));
  808. }
  809. /**
  810. *
  811. * @summary 重置租户管理员密码 🔖
  812. * @param {TenantUserInput} [body]
  813. * @param {*} [options] Override http request option.
  814. * @throws {RequiredError}
  815. * @memberof SysTenantApi
  816. */
  817. public async apiSysTenantResetPwdPost(body?: TenantUserInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultString>> {
  818. return SysTenantApiFp(this.configuration).apiSysTenantResetPwdPost(body, options).then((request) => request(this.axios, this.basePath));
  819. }
  820. /**
  821. *
  822. * @summary 设置租户状态 🔖
  823. * @param {TenantInput} [body]
  824. * @param {*} [options] Override http request option.
  825. * @throws {RequiredError}
  826. * @memberof SysTenantApi
  827. */
  828. public async apiSysTenantSetStatusPost(body?: TenantInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultInt32>> {
  829. return SysTenantApiFp(this.configuration).apiSysTenantSetStatusPost(body, options).then((request) => request(this.axios, this.basePath));
  830. }
  831. /**
  832. *
  833. * @summary 更新租户 🔖
  834. * @param {UpdateTenantInput} [body]
  835. * @param {*} [options] Override http request option.
  836. * @throws {RequiredError}
  837. * @memberof SysTenantApi
  838. */
  839. public async apiSysTenantUpdatePost(body?: UpdateTenantInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
  840. return SysTenantApiFp(this.configuration).apiSysTenantUpdatePost(body, options).then((request) => request(this.axios, this.basePath));
  841. }
  842. /**
  843. *
  844. * @summary 获取租户下的用户列表 🔖
  845. * @param {TenantIdInput} [body]
  846. * @param {*} [options] Override http request option.
  847. * @throws {RequiredError}
  848. * @memberof SysTenantApi
  849. */
  850. public async apiSysTenantUserListPost(body?: TenantIdInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultListSysUser>> {
  851. return SysTenantApiFp(this.configuration).apiSysTenantUserListPost(body, options).then((request) => request(this.axios, this.basePath));
  852. }
  853. }