sys-message-api.ts 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435
  1. /* tslint:disable */
  2. /* eslint-disable */
  3. /**
  4. * 所有接口
  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 { MessageInput } from '../models';
  20. /**
  21. * SysMessageApi - axios parameter creator
  22. * @export
  23. */
  24. export const SysMessageApiAxiosParamCreator = function (configuration?: Configuration) {
  25. return {
  26. /**
  27. *
  28. * @summary 发送消息给所有人
  29. * @param {MessageInput} [body]
  30. * @param {*} [options] Override http request option.
  31. * @throws {RequiredError}
  32. */
  33. apiSysMessageSendAllUserPost: async (body?: MessageInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  34. const localVarPath = `/api/sysMessage/sendAllUser`;
  35. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  36. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  37. let baseOptions;
  38. if (configuration) {
  39. baseOptions = configuration.baseOptions;
  40. }
  41. const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
  42. const localVarHeaderParameter = {} as any;
  43. const localVarQueryParameter = {} as any;
  44. // authentication Bearer required
  45. localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
  46. const query = new URLSearchParams(localVarUrlObj.search);
  47. for (const key in localVarQueryParameter) {
  48. query.set(key, localVarQueryParameter[key]);
  49. }
  50. for (const key in options.params) {
  51. query.set(key, options.params[key]);
  52. }
  53. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  54. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  55. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  56. const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
  57. localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
  58. return {
  59. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  60. options: localVarRequestOptions,
  61. };
  62. },
  63. /**
  64. *
  65. * @summary 发送邮件
  66. * @param {string} message
  67. * @param {*} [options] Override http request option.
  68. * @throws {RequiredError}
  69. */
  70. apiSysMessageSendEmailMessagePost: async (message: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  71. // verify required parameter 'message' is not null or undefined
  72. if (message === null || message === undefined) {
  73. throw new RequiredError('message','Required parameter message was null or undefined when calling apiSysMessageSendEmailMessagePost.');
  74. }
  75. const localVarPath = `/api/sysMessage/sendEmail/{message}`
  76. .replace(`{${"message"}}`, encodeURIComponent(String(message)));
  77. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  78. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  79. let baseOptions;
  80. if (configuration) {
  81. baseOptions = configuration.baseOptions;
  82. }
  83. const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
  84. const localVarHeaderParameter = {} as any;
  85. const localVarQueryParameter = {} as any;
  86. // authentication Bearer required
  87. const query = new URLSearchParams(localVarUrlObj.search);
  88. for (const key in localVarQueryParameter) {
  89. query.set(key, localVarQueryParameter[key]);
  90. }
  91. for (const key in options.params) {
  92. query.set(key, options.params[key]);
  93. }
  94. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  95. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  96. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  97. return {
  98. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  99. options: localVarRequestOptions,
  100. };
  101. },
  102. /**
  103. *
  104. * @summary 发送消息给除了发送人的其他人
  105. * @param {MessageInput} [body]
  106. * @param {*} [options] Override http request option.
  107. * @throws {RequiredError}
  108. */
  109. apiSysMessageSendOtherUserPost: async (body?: MessageInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  110. const localVarPath = `/api/sysMessage/sendOtherUser`;
  111. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  112. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  113. let baseOptions;
  114. if (configuration) {
  115. baseOptions = configuration.baseOptions;
  116. }
  117. const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
  118. const localVarHeaderParameter = {} as any;
  119. const localVarQueryParameter = {} as any;
  120. // authentication Bearer required
  121. localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
  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. const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
  133. localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
  134. return {
  135. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  136. options: localVarRequestOptions,
  137. };
  138. },
  139. /**
  140. *
  141. * @summary 发送消息给某个人
  142. * @param {MessageInput} [body]
  143. * @param {*} [options] Override http request option.
  144. * @throws {RequiredError}
  145. */
  146. apiSysMessageSendUserPost: async (body?: MessageInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  147. const localVarPath = `/api/sysMessage/sendUser`;
  148. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  149. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  150. let baseOptions;
  151. if (configuration) {
  152. baseOptions = configuration.baseOptions;
  153. }
  154. const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
  155. const localVarHeaderParameter = {} as any;
  156. const localVarQueryParameter = {} as any;
  157. // authentication Bearer required
  158. localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
  159. const query = new URLSearchParams(localVarUrlObj.search);
  160. for (const key in localVarQueryParameter) {
  161. query.set(key, localVarQueryParameter[key]);
  162. }
  163. for (const key in options.params) {
  164. query.set(key, options.params[key]);
  165. }
  166. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  167. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  168. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  169. const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
  170. localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
  171. return {
  172. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  173. options: localVarRequestOptions,
  174. };
  175. },
  176. /**
  177. *
  178. * @summary 发送消息给某些人
  179. * @param {MessageInput} [body]
  180. * @param {*} [options] Override http request option.
  181. * @throws {RequiredError}
  182. */
  183. apiSysMessageSendUsersPost: async (body?: MessageInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  184. const localVarPath = `/api/sysMessage/sendUsers`;
  185. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  186. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  187. let baseOptions;
  188. if (configuration) {
  189. baseOptions = configuration.baseOptions;
  190. }
  191. const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
  192. const localVarHeaderParameter = {} as any;
  193. const localVarQueryParameter = {} as any;
  194. // authentication Bearer required
  195. localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
  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. const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
  207. localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
  208. return {
  209. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  210. options: localVarRequestOptions,
  211. };
  212. },
  213. }
  214. };
  215. /**
  216. * SysMessageApi - functional programming interface
  217. * @export
  218. */
  219. export const SysMessageApiFp = function(configuration?: Configuration) {
  220. return {
  221. /**
  222. *
  223. * @summary 发送消息给所有人
  224. * @param {MessageInput} [body]
  225. * @param {*} [options] Override http request option.
  226. * @throws {RequiredError}
  227. */
  228. async apiSysMessageSendAllUserPost(body?: MessageInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
  229. const localVarAxiosArgs = await SysMessageApiAxiosParamCreator(configuration).apiSysMessageSendAllUserPost(body, options);
  230. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  231. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  232. return axios.request(axiosRequestArgs);
  233. };
  234. },
  235. /**
  236. *
  237. * @summary 发送邮件
  238. * @param {string} message
  239. * @param {*} [options] Override http request option.
  240. * @throws {RequiredError}
  241. */
  242. async apiSysMessageSendEmailMessagePost(message: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
  243. const localVarAxiosArgs = await SysMessageApiAxiosParamCreator(configuration).apiSysMessageSendEmailMessagePost(message, options);
  244. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  245. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  246. return axios.request(axiosRequestArgs);
  247. };
  248. },
  249. /**
  250. *
  251. * @summary 发送消息给除了发送人的其他人
  252. * @param {MessageInput} [body]
  253. * @param {*} [options] Override http request option.
  254. * @throws {RequiredError}
  255. */
  256. async apiSysMessageSendOtherUserPost(body?: MessageInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
  257. const localVarAxiosArgs = await SysMessageApiAxiosParamCreator(configuration).apiSysMessageSendOtherUserPost(body, options);
  258. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  259. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  260. return axios.request(axiosRequestArgs);
  261. };
  262. },
  263. /**
  264. *
  265. * @summary 发送消息给某个人
  266. * @param {MessageInput} [body]
  267. * @param {*} [options] Override http request option.
  268. * @throws {RequiredError}
  269. */
  270. async apiSysMessageSendUserPost(body?: MessageInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
  271. const localVarAxiosArgs = await SysMessageApiAxiosParamCreator(configuration).apiSysMessageSendUserPost(body, options);
  272. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  273. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  274. return axios.request(axiosRequestArgs);
  275. };
  276. },
  277. /**
  278. *
  279. * @summary 发送消息给某些人
  280. * @param {MessageInput} [body]
  281. * @param {*} [options] Override http request option.
  282. * @throws {RequiredError}
  283. */
  284. async apiSysMessageSendUsersPost(body?: MessageInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
  285. const localVarAxiosArgs = await SysMessageApiAxiosParamCreator(configuration).apiSysMessageSendUsersPost(body, options);
  286. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  287. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  288. return axios.request(axiosRequestArgs);
  289. };
  290. },
  291. }
  292. };
  293. /**
  294. * SysMessageApi - factory interface
  295. * @export
  296. */
  297. export const SysMessageApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
  298. return {
  299. /**
  300. *
  301. * @summary 发送消息给所有人
  302. * @param {MessageInput} [body]
  303. * @param {*} [options] Override http request option.
  304. * @throws {RequiredError}
  305. */
  306. async apiSysMessageSendAllUserPost(body?: MessageInput, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
  307. return SysMessageApiFp(configuration).apiSysMessageSendAllUserPost(body, options).then((request) => request(axios, basePath));
  308. },
  309. /**
  310. *
  311. * @summary 发送邮件
  312. * @param {string} message
  313. * @param {*} [options] Override http request option.
  314. * @throws {RequiredError}
  315. */
  316. async apiSysMessageSendEmailMessagePost(message: string, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
  317. return SysMessageApiFp(configuration).apiSysMessageSendEmailMessagePost(message, options).then((request) => request(axios, basePath));
  318. },
  319. /**
  320. *
  321. * @summary 发送消息给除了发送人的其他人
  322. * @param {MessageInput} [body]
  323. * @param {*} [options] Override http request option.
  324. * @throws {RequiredError}
  325. */
  326. async apiSysMessageSendOtherUserPost(body?: MessageInput, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
  327. return SysMessageApiFp(configuration).apiSysMessageSendOtherUserPost(body, options).then((request) => request(axios, basePath));
  328. },
  329. /**
  330. *
  331. * @summary 发送消息给某个人
  332. * @param {MessageInput} [body]
  333. * @param {*} [options] Override http request option.
  334. * @throws {RequiredError}
  335. */
  336. async apiSysMessageSendUserPost(body?: MessageInput, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
  337. return SysMessageApiFp(configuration).apiSysMessageSendUserPost(body, options).then((request) => request(axios, basePath));
  338. },
  339. /**
  340. *
  341. * @summary 发送消息给某些人
  342. * @param {MessageInput} [body]
  343. * @param {*} [options] Override http request option.
  344. * @throws {RequiredError}
  345. */
  346. async apiSysMessageSendUsersPost(body?: MessageInput, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
  347. return SysMessageApiFp(configuration).apiSysMessageSendUsersPost(body, options).then((request) => request(axios, basePath));
  348. },
  349. };
  350. };
  351. /**
  352. * SysMessageApi - object-oriented interface
  353. * @export
  354. * @class SysMessageApi
  355. * @extends {BaseAPI}
  356. */
  357. export class SysMessageApi extends BaseAPI {
  358. /**
  359. *
  360. * @summary 发送消息给所有人
  361. * @param {MessageInput} [body]
  362. * @param {*} [options] Override http request option.
  363. * @throws {RequiredError}
  364. * @memberof SysMessageApi
  365. */
  366. public async apiSysMessageSendAllUserPost(body?: MessageInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
  367. return SysMessageApiFp(this.configuration).apiSysMessageSendAllUserPost(body, options).then((request) => request(this.axios, this.basePath));
  368. }
  369. /**
  370. *
  371. * @summary 发送邮件
  372. * @param {string} message
  373. * @param {*} [options] Override http request option.
  374. * @throws {RequiredError}
  375. * @memberof SysMessageApi
  376. */
  377. public async apiSysMessageSendEmailMessagePost(message: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
  378. return SysMessageApiFp(this.configuration).apiSysMessageSendEmailMessagePost(message, options).then((request) => request(this.axios, this.basePath));
  379. }
  380. /**
  381. *
  382. * @summary 发送消息给除了发送人的其他人
  383. * @param {MessageInput} [body]
  384. * @param {*} [options] Override http request option.
  385. * @throws {RequiredError}
  386. * @memberof SysMessageApi
  387. */
  388. public async apiSysMessageSendOtherUserPost(body?: MessageInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
  389. return SysMessageApiFp(this.configuration).apiSysMessageSendOtherUserPost(body, options).then((request) => request(this.axios, this.basePath));
  390. }
  391. /**
  392. *
  393. * @summary 发送消息给某个人
  394. * @param {MessageInput} [body]
  395. * @param {*} [options] Override http request option.
  396. * @throws {RequiredError}
  397. * @memberof SysMessageApi
  398. */
  399. public async apiSysMessageSendUserPost(body?: MessageInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
  400. return SysMessageApiFp(this.configuration).apiSysMessageSendUserPost(body, options).then((request) => request(this.axios, this.basePath));
  401. }
  402. /**
  403. *
  404. * @summary 发送消息给某些人
  405. * @param {MessageInput} [body]
  406. * @param {*} [options] Override http request option.
  407. * @throws {RequiredError}
  408. * @memberof SysMessageApi
  409. */
  410. public async apiSysMessageSendUsersPost(body?: MessageInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
  411. return SysMessageApiFp(this.configuration).apiSysMessageSendUsersPost(body, options).then((request) => request(this.axios, this.basePath));
  412. }
  413. }