sys-print-api.ts 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362
  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 { AddPrintInput } from '../models';
  20. import { AdminResultSqlSugarPagedListSysPrint } from '../models';
  21. import { DeletePrintInput } from '../models';
  22. import { PagePrintInput } from '../models';
  23. import { UpdatePrintInput } from '../models';
  24. /**
  25. * SysPrintApi - axios parameter creator
  26. * @export
  27. */
  28. export const SysPrintApiAxiosParamCreator = function (configuration?: Configuration) {
  29. return {
  30. /**
  31. *
  32. * @summary 增加打印模板
  33. * @param {AddPrintInput} [body]
  34. * @param {*} [options] Override http request option.
  35. * @throws {RequiredError}
  36. */
  37. apiSysPrintAddPost: async (body?: AddPrintInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  38. const localVarPath = `/api/sysPrint/add`;
  39. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  40. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  41. let baseOptions;
  42. if (configuration) {
  43. baseOptions = configuration.baseOptions;
  44. }
  45. const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
  46. const localVarHeaderParameter = {} as any;
  47. const localVarQueryParameter = {} as any;
  48. // authentication Bearer required
  49. localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
  50. const query = new URLSearchParams(localVarUrlObj.search);
  51. for (const key in localVarQueryParameter) {
  52. query.set(key, localVarQueryParameter[key]);
  53. }
  54. for (const key in options.params) {
  55. query.set(key, options.params[key]);
  56. }
  57. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  58. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  59. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  60. const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
  61. localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
  62. return {
  63. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  64. options: localVarRequestOptions,
  65. };
  66. },
  67. /**
  68. *
  69. * @summary 删除打印模板
  70. * @param {DeletePrintInput} [body]
  71. * @param {*} [options] Override http request option.
  72. * @throws {RequiredError}
  73. */
  74. apiSysPrintDeletePost: async (body?: DeletePrintInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  75. const localVarPath = `/api/sysPrint/delete`;
  76. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  77. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  78. let baseOptions;
  79. if (configuration) {
  80. baseOptions = configuration.baseOptions;
  81. }
  82. const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
  83. const localVarHeaderParameter = {} as any;
  84. const localVarQueryParameter = {} as any;
  85. // authentication Bearer required
  86. localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
  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. const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
  98. localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
  99. return {
  100. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  101. options: localVarRequestOptions,
  102. };
  103. },
  104. /**
  105. *
  106. * @summary 获取打印模板列表
  107. * @param {PagePrintInput} [body]
  108. * @param {*} [options] Override http request option.
  109. * @throws {RequiredError}
  110. */
  111. apiSysPrintPagePost: async (body?: PagePrintInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  112. const localVarPath = `/api/sysPrint/page`;
  113. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  114. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  115. let baseOptions;
  116. if (configuration) {
  117. baseOptions = configuration.baseOptions;
  118. }
  119. const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
  120. const localVarHeaderParameter = {} as any;
  121. const localVarQueryParameter = {} as any;
  122. // authentication Bearer required
  123. localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
  124. const query = new URLSearchParams(localVarUrlObj.search);
  125. for (const key in localVarQueryParameter) {
  126. query.set(key, localVarQueryParameter[key]);
  127. }
  128. for (const key in options.params) {
  129. query.set(key, options.params[key]);
  130. }
  131. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  132. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  133. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  134. const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
  135. localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
  136. return {
  137. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  138. options: localVarRequestOptions,
  139. };
  140. },
  141. /**
  142. *
  143. * @summary 更新打印模板
  144. * @param {UpdatePrintInput} [body]
  145. * @param {*} [options] Override http request option.
  146. * @throws {RequiredError}
  147. */
  148. apiSysPrintUpdatePost: async (body?: UpdatePrintInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  149. const localVarPath = `/api/sysPrint/update`;
  150. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  151. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  152. let baseOptions;
  153. if (configuration) {
  154. baseOptions = configuration.baseOptions;
  155. }
  156. const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
  157. const localVarHeaderParameter = {} as any;
  158. const localVarQueryParameter = {} as any;
  159. // authentication Bearer required
  160. localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
  161. const query = new URLSearchParams(localVarUrlObj.search);
  162. for (const key in localVarQueryParameter) {
  163. query.set(key, localVarQueryParameter[key]);
  164. }
  165. for (const key in options.params) {
  166. query.set(key, options.params[key]);
  167. }
  168. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  169. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  170. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  171. const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
  172. localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
  173. return {
  174. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  175. options: localVarRequestOptions,
  176. };
  177. },
  178. }
  179. };
  180. /**
  181. * SysPrintApi - functional programming interface
  182. * @export
  183. */
  184. export const SysPrintApiFp = function(configuration?: Configuration) {
  185. return {
  186. /**
  187. *
  188. * @summary 增加打印模板
  189. * @param {AddPrintInput} [body]
  190. * @param {*} [options] Override http request option.
  191. * @throws {RequiredError}
  192. */
  193. async apiSysPrintAddPost(body?: AddPrintInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
  194. const localVarAxiosArgs = await SysPrintApiAxiosParamCreator(configuration).apiSysPrintAddPost(body, options);
  195. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  196. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  197. return axios.request(axiosRequestArgs);
  198. };
  199. },
  200. /**
  201. *
  202. * @summary 删除打印模板
  203. * @param {DeletePrintInput} [body]
  204. * @param {*} [options] Override http request option.
  205. * @throws {RequiredError}
  206. */
  207. async apiSysPrintDeletePost(body?: DeletePrintInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
  208. const localVarAxiosArgs = await SysPrintApiAxiosParamCreator(configuration).apiSysPrintDeletePost(body, options);
  209. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  210. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  211. return axios.request(axiosRequestArgs);
  212. };
  213. },
  214. /**
  215. *
  216. * @summary 获取打印模板列表
  217. * @param {PagePrintInput} [body]
  218. * @param {*} [options] Override http request option.
  219. * @throws {RequiredError}
  220. */
  221. async apiSysPrintPagePost(body?: PagePrintInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultSqlSugarPagedListSysPrint>>> {
  222. const localVarAxiosArgs = await SysPrintApiAxiosParamCreator(configuration).apiSysPrintPagePost(body, options);
  223. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  224. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  225. return axios.request(axiosRequestArgs);
  226. };
  227. },
  228. /**
  229. *
  230. * @summary 更新打印模板
  231. * @param {UpdatePrintInput} [body]
  232. * @param {*} [options] Override http request option.
  233. * @throws {RequiredError}
  234. */
  235. async apiSysPrintUpdatePost(body?: UpdatePrintInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
  236. const localVarAxiosArgs = await SysPrintApiAxiosParamCreator(configuration).apiSysPrintUpdatePost(body, options);
  237. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  238. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  239. return axios.request(axiosRequestArgs);
  240. };
  241. },
  242. }
  243. };
  244. /**
  245. * SysPrintApi - factory interface
  246. * @export
  247. */
  248. export const SysPrintApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
  249. return {
  250. /**
  251. *
  252. * @summary 增加打印模板
  253. * @param {AddPrintInput} [body]
  254. * @param {*} [options] Override http request option.
  255. * @throws {RequiredError}
  256. */
  257. async apiSysPrintAddPost(body?: AddPrintInput, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
  258. return SysPrintApiFp(configuration).apiSysPrintAddPost(body, options).then((request) => request(axios, basePath));
  259. },
  260. /**
  261. *
  262. * @summary 删除打印模板
  263. * @param {DeletePrintInput} [body]
  264. * @param {*} [options] Override http request option.
  265. * @throws {RequiredError}
  266. */
  267. async apiSysPrintDeletePost(body?: DeletePrintInput, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
  268. return SysPrintApiFp(configuration).apiSysPrintDeletePost(body, options).then((request) => request(axios, basePath));
  269. },
  270. /**
  271. *
  272. * @summary 获取打印模板列表
  273. * @param {PagePrintInput} [body]
  274. * @param {*} [options] Override http request option.
  275. * @throws {RequiredError}
  276. */
  277. async apiSysPrintPagePost(body?: PagePrintInput, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultSqlSugarPagedListSysPrint>> {
  278. return SysPrintApiFp(configuration).apiSysPrintPagePost(body, options).then((request) => request(axios, basePath));
  279. },
  280. /**
  281. *
  282. * @summary 更新打印模板
  283. * @param {UpdatePrintInput} [body]
  284. * @param {*} [options] Override http request option.
  285. * @throws {RequiredError}
  286. */
  287. async apiSysPrintUpdatePost(body?: UpdatePrintInput, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
  288. return SysPrintApiFp(configuration).apiSysPrintUpdatePost(body, options).then((request) => request(axios, basePath));
  289. },
  290. };
  291. };
  292. /**
  293. * SysPrintApi - object-oriented interface
  294. * @export
  295. * @class SysPrintApi
  296. * @extends {BaseAPI}
  297. */
  298. export class SysPrintApi extends BaseAPI {
  299. /**
  300. *
  301. * @summary 增加打印模板
  302. * @param {AddPrintInput} [body]
  303. * @param {*} [options] Override http request option.
  304. * @throws {RequiredError}
  305. * @memberof SysPrintApi
  306. */
  307. public async apiSysPrintAddPost(body?: AddPrintInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
  308. return SysPrintApiFp(this.configuration).apiSysPrintAddPost(body, options).then((request) => request(this.axios, this.basePath));
  309. }
  310. /**
  311. *
  312. * @summary 删除打印模板
  313. * @param {DeletePrintInput} [body]
  314. * @param {*} [options] Override http request option.
  315. * @throws {RequiredError}
  316. * @memberof SysPrintApi
  317. */
  318. public async apiSysPrintDeletePost(body?: DeletePrintInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
  319. return SysPrintApiFp(this.configuration).apiSysPrintDeletePost(body, options).then((request) => request(this.axios, this.basePath));
  320. }
  321. /**
  322. *
  323. * @summary 获取打印模板列表
  324. * @param {PagePrintInput} [body]
  325. * @param {*} [options] Override http request option.
  326. * @throws {RequiredError}
  327. * @memberof SysPrintApi
  328. */
  329. public async apiSysPrintPagePost(body?: PagePrintInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultSqlSugarPagedListSysPrint>> {
  330. return SysPrintApiFp(this.configuration).apiSysPrintPagePost(body, options).then((request) => request(this.axios, this.basePath));
  331. }
  332. /**
  333. *
  334. * @summary 更新打印模板
  335. * @param {UpdatePrintInput} [body]
  336. * @param {*} [options] Override http request option.
  337. * @throws {RequiredError}
  338. * @memberof SysPrintApi
  339. */
  340. public async apiSysPrintUpdatePost(body?: UpdatePrintInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
  341. return SysPrintApiFp(this.configuration).apiSysPrintUpdatePost(body, options).then((request) => request(this.axios, this.basePath));
  342. }
  343. }