sys-const-api.ts 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  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 { AdminResultListConstOutput } from '../models';
  20. /**
  21. * SysConstApi - axios parameter creator
  22. * @export
  23. */
  24. export const SysConstApiAxiosParamCreator = function (configuration?: Configuration) {
  25. return {
  26. /**
  27. *
  28. * @summary 根据类名获取常量数据
  29. * @param {string} typeName
  30. * @param {*} [options] Override http request option.
  31. * @throws {RequiredError}
  32. */
  33. apiSysConstDataTypeNameGet: async (typeName: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  34. // verify required parameter 'typeName' is not null or undefined
  35. if (typeName === null || typeName === undefined) {
  36. throw new RequiredError('typeName','Required parameter typeName was null or undefined when calling apiSysConstDataTypeNameGet.');
  37. }
  38. const localVarPath = `/api/sysConst/data/{typeName}`
  39. .replace(`{${"typeName"}}`, encodeURIComponent(String(typeName)));
  40. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  41. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  42. let baseOptions;
  43. if (configuration) {
  44. baseOptions = configuration.baseOptions;
  45. }
  46. const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
  47. const localVarHeaderParameter = {} as any;
  48. const localVarQueryParameter = {} as any;
  49. // authentication Bearer required
  50. // http bearer authentication required
  51. if (configuration && configuration.accessToken) {
  52. const accessToken = typeof configuration.accessToken === 'function'
  53. ? await configuration.accessToken()
  54. : await configuration.accessToken;
  55. localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
  56. }
  57. const query = new URLSearchParams(localVarUrlObj.search);
  58. for (const key in localVarQueryParameter) {
  59. query.set(key, localVarQueryParameter[key]);
  60. }
  61. for (const key in options.params) {
  62. query.set(key, options.params[key]);
  63. }
  64. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  65. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  66. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  67. return {
  68. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  69. options: localVarRequestOptions,
  70. };
  71. },
  72. /**
  73. *
  74. * @summary 获取所有常量列表
  75. * @param {*} [options] Override http request option.
  76. * @throws {RequiredError}
  77. */
  78. apiSysConstListGet: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  79. const localVarPath = `/api/sysConst/list`;
  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: 'GET', ...baseOptions, ...options};
  87. const localVarHeaderParameter = {} as any;
  88. const localVarQueryParameter = {} as any;
  89. // authentication Bearer required
  90. // http bearer authentication required
  91. if (configuration && configuration.accessToken) {
  92. const accessToken = typeof configuration.accessToken === 'function'
  93. ? await configuration.accessToken()
  94. : await configuration.accessToken;
  95. localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
  96. }
  97. const query = new URLSearchParams(localVarUrlObj.search);
  98. for (const key in localVarQueryParameter) {
  99. query.set(key, localVarQueryParameter[key]);
  100. }
  101. for (const key in options.params) {
  102. query.set(key, options.params[key]);
  103. }
  104. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  105. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  106. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  107. return {
  108. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  109. options: localVarRequestOptions,
  110. };
  111. },
  112. }
  113. };
  114. /**
  115. * SysConstApi - functional programming interface
  116. * @export
  117. */
  118. export const SysConstApiFp = function(configuration?: Configuration) {
  119. return {
  120. /**
  121. *
  122. * @summary 根据类名获取常量数据
  123. * @param {string} typeName
  124. * @param {*} [options] Override http request option.
  125. * @throws {RequiredError}
  126. */
  127. async apiSysConstDataTypeNameGet(typeName: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultListConstOutput>>> {
  128. const localVarAxiosArgs = await SysConstApiAxiosParamCreator(configuration).apiSysConstDataTypeNameGet(typeName, options);
  129. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  130. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  131. return axios.request(axiosRequestArgs);
  132. };
  133. },
  134. /**
  135. *
  136. * @summary 获取所有常量列表
  137. * @param {*} [options] Override http request option.
  138. * @throws {RequiredError}
  139. */
  140. async apiSysConstListGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultListConstOutput>>> {
  141. const localVarAxiosArgs = await SysConstApiAxiosParamCreator(configuration).apiSysConstListGet(options);
  142. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  143. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  144. return axios.request(axiosRequestArgs);
  145. };
  146. },
  147. }
  148. };
  149. /**
  150. * SysConstApi - factory interface
  151. * @export
  152. */
  153. export const SysConstApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
  154. return {
  155. /**
  156. *
  157. * @summary 根据类名获取常量数据
  158. * @param {string} typeName
  159. * @param {*} [options] Override http request option.
  160. * @throws {RequiredError}
  161. */
  162. async apiSysConstDataTypeNameGet(typeName: string, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultListConstOutput>> {
  163. return SysConstApiFp(configuration).apiSysConstDataTypeNameGet(typeName, options).then((request) => request(axios, basePath));
  164. },
  165. /**
  166. *
  167. * @summary 获取所有常量列表
  168. * @param {*} [options] Override http request option.
  169. * @throws {RequiredError}
  170. */
  171. async apiSysConstListGet(options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultListConstOutput>> {
  172. return SysConstApiFp(configuration).apiSysConstListGet(options).then((request) => request(axios, basePath));
  173. },
  174. };
  175. };
  176. /**
  177. * SysConstApi - object-oriented interface
  178. * @export
  179. * @class SysConstApi
  180. * @extends {BaseAPI}
  181. */
  182. export class SysConstApi extends BaseAPI {
  183. /**
  184. *
  185. * @summary 根据类名获取常量数据
  186. * @param {string} typeName
  187. * @param {*} [options] Override http request option.
  188. * @throws {RequiredError}
  189. * @memberof SysConstApi
  190. */
  191. public async apiSysConstDataTypeNameGet(typeName: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultListConstOutput>> {
  192. return SysConstApiFp(this.configuration).apiSysConstDataTypeNameGet(typeName, options).then((request) => request(this.axios, this.basePath));
  193. }
  194. /**
  195. *
  196. * @summary 获取所有常量列表
  197. * @param {*} [options] Override http request option.
  198. * @throws {RequiredError}
  199. * @memberof SysConstApi
  200. */
  201. public async apiSysConstListGet(options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultListConstOutput>> {
  202. return SysConstApiFp(this.configuration).apiSysConstListGet(options).then((request) => request(this.axios, this.basePath));
  203. }
  204. }