apijsonapi.ts 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  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 { AdminResultJObject } from '../models';
  20. import { JToken } from '../models';
  21. /**
  22. * APIJSONApi - axios parameter creator
  23. * @export
  24. */
  25. export const APIJSONApiAxiosParamCreator = function (configuration?: Configuration) {
  26. return {
  27. /**
  28. * 参数:{\"[]\":{\"SYS_LOG_OP\":{}}}
  29. * @summary 统一入口
  30. * @param {{ [key: string]: JToken; }} [body]
  31. * @param {*} [options] Override http request option.
  32. * @throws {RequiredError}
  33. */
  34. apiAPIJSONPost: async (body?: { [key: string]: JToken; }, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  35. const localVarPath = `/api/aPIJSON`;
  36. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  37. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  38. let baseOptions;
  39. if (configuration) {
  40. baseOptions = configuration.baseOptions;
  41. }
  42. const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
  43. const localVarHeaderParameter = {} as any;
  44. const localVarQueryParameter = {} as any;
  45. // authentication Bearer required
  46. // http bearer authentication required
  47. if (configuration && configuration.accessToken) {
  48. const accessToken = typeof configuration.accessToken === 'function'
  49. ? await configuration.accessToken()
  50. : await configuration.accessToken;
  51. localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
  52. }
  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. /**
  74. * APIJSONApi - functional programming interface
  75. * @export
  76. */
  77. export const APIJSONApiFp = function(configuration?: Configuration) {
  78. return {
  79. /**
  80. * 参数:{\"[]\":{\"SYS_LOG_OP\":{}}}
  81. * @summary 统一入口
  82. * @param {{ [key: string]: JToken; }} [body]
  83. * @param {*} [options] Override http request option.
  84. * @throws {RequiredError}
  85. */
  86. async apiAPIJSONPost(body?: { [key: string]: JToken; }, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultJObject>>> {
  87. const localVarAxiosArgs = await APIJSONApiAxiosParamCreator(configuration).apiAPIJSONPost(body, options);
  88. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  89. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  90. return axios.request(axiosRequestArgs);
  91. };
  92. },
  93. }
  94. };
  95. /**
  96. * APIJSONApi - factory interface
  97. * @export
  98. */
  99. export const APIJSONApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
  100. return {
  101. /**
  102. * 参数:{\"[]\":{\"SYS_LOG_OP\":{}}}
  103. * @summary 统一入口
  104. * @param {{ [key: string]: JToken; }} [body]
  105. * @param {*} [options] Override http request option.
  106. * @throws {RequiredError}
  107. */
  108. async apiAPIJSONPost(body?: { [key: string]: JToken; }, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultJObject>> {
  109. return APIJSONApiFp(configuration).apiAPIJSONPost(body, options).then((request) => request(axios, basePath));
  110. },
  111. };
  112. };
  113. /**
  114. * APIJSONApi - object-oriented interface
  115. * @export
  116. * @class APIJSONApi
  117. * @extends {BaseAPI}
  118. */
  119. export class APIJSONApi extends BaseAPI {
  120. /**
  121. * 参数:{\"[]\":{\"SYS_LOG_OP\":{}}}
  122. * @summary 统一入口
  123. * @param {{ [key: string]: JToken; }} [body]
  124. * @param {*} [options] Override http request option.
  125. * @throws {RequiredError}
  126. * @memberof APIJSONApi
  127. */
  128. public async apiAPIJSONPost(body?: { [key: string]: JToken; }, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultJObject>> {
  129. return APIJSONApiFp(this.configuration).apiAPIJSONPost(body, options).then((request) => request(this.axios, this.basePath));
  130. }
  131. }