|
|
@@ -20,6 +20,7 @@ import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } fr
|
|
|
import { AdminResultIActionResult } from '../models';
|
|
|
import { AdminResultListSysFile } from '../models';
|
|
|
import { AdminResultSqlSugarPagedListSysFile } from '../models';
|
|
|
+import { AdminResultString } from '../models';
|
|
|
import { AdminResultSysFile } from '../models';
|
|
|
import { DeleteFileInput } from '../models';
|
|
|
import { FileInput } from '../models';
|
|
|
@@ -79,6 +80,54 @@ export const SysFileApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
options: localVarRequestOptions,
|
|
|
};
|
|
|
},
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ * @summary 下载指定文件Base64格式
|
|
|
+ * @param {string} [body]
|
|
|
+ * @param {*} [options] Override http request option.
|
|
|
+ * @throws {RequiredError}
|
|
|
+ */
|
|
|
+ apiSysFileDownloadFileBase64Post: async (body?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
|
+ const localVarPath = `/api/sysFile/downloadFileBase64`;
|
|
|
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
|
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
|
+ let baseOptions;
|
|
|
+ if (configuration) {
|
|
|
+ baseOptions = configuration.baseOptions;
|
|
|
+ }
|
|
|
+ const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
|
|
|
+ const localVarHeaderParameter = {} as any;
|
|
|
+ const localVarQueryParameter = {} as any;
|
|
|
+
|
|
|
+ // authentication Bearer required
|
|
|
+ // http bearer authentication required
|
|
|
+ if (configuration && configuration.accessToken) {
|
|
|
+ const accessToken = typeof configuration.accessToken === 'function'
|
|
|
+ ? await configuration.accessToken()
|
|
|
+ : await configuration.accessToken;
|
|
|
+ localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
|
|
+ }
|
|
|
+
|
|
|
+ localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
|
|
|
+
|
|
|
+ const query = new URLSearchParams(localVarUrlObj.search);
|
|
|
+ for (const key in localVarQueryParameter) {
|
|
|
+ query.set(key, localVarQueryParameter[key]);
|
|
|
+ }
|
|
|
+ for (const key in options.params) {
|
|
|
+ query.set(key, options.params[key]);
|
|
|
+ }
|
|
|
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
|
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
|
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
|
+ const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
|
|
+ localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
|
|
+
|
|
|
+ return {
|
|
|
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
|
+ options: localVarRequestOptions,
|
|
|
+ };
|
|
|
+ },
|
|
|
/**
|
|
|
*
|
|
|
* @summary 根据文件Id或Url下载
|
|
|
@@ -508,6 +557,20 @@ export const SysFileApiFp = function(configuration?: Configuration) {
|
|
|
return axios.request(axiosRequestArgs);
|
|
|
};
|
|
|
},
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ * @summary 下载指定文件Base64格式
|
|
|
+ * @param {string} [body]
|
|
|
+ * @param {*} [options] Override http request option.
|
|
|
+ * @throws {RequiredError}
|
|
|
+ */
|
|
|
+ async apiSysFileDownloadFileBase64Post(body?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultString>>> {
|
|
|
+ const localVarAxiosArgs = await SysFileApiAxiosParamCreator(configuration).apiSysFileDownloadFileBase64Post(body, options);
|
|
|
+ return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
|
+ const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
|
+ return axios.request(axiosRequestArgs);
|
|
|
+ };
|
|
|
+ },
|
|
|
/**
|
|
|
*
|
|
|
* @summary 根据文件Id或Url下载
|
|
|
@@ -640,6 +703,16 @@ export const SysFileApiFactory = function (configuration?: Configuration, basePa
|
|
|
async apiSysFileDeletePost(body?: DeleteFileInput, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
|
|
|
return SysFileApiFp(configuration).apiSysFileDeletePost(body, options).then((request) => request(axios, basePath));
|
|
|
},
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ * @summary 下载指定文件Base64格式
|
|
|
+ * @param {string} [body]
|
|
|
+ * @param {*} [options] Override http request option.
|
|
|
+ * @throws {RequiredError}
|
|
|
+ */
|
|
|
+ async apiSysFileDownloadFileBase64Post(body?: string, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultString>> {
|
|
|
+ return SysFileApiFp(configuration).apiSysFileDownloadFileBase64Post(body, options).then((request) => request(axios, basePath));
|
|
|
+ },
|
|
|
/**
|
|
|
*
|
|
|
* @summary 根据文件Id或Url下载
|
|
|
@@ -742,6 +815,17 @@ export class SysFileApi extends BaseAPI {
|
|
|
public async apiSysFileDeletePost(body?: DeleteFileInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
|
|
|
return SysFileApiFp(this.configuration).apiSysFileDeletePost(body, options).then((request) => request(this.axios, this.basePath));
|
|
|
}
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ * @summary 下载指定文件Base64格式
|
|
|
+ * @param {string} [body]
|
|
|
+ * @param {*} [options] Override http request option.
|
|
|
+ * @throws {RequiredError}
|
|
|
+ * @memberof SysFileApi
|
|
|
+ */
|
|
|
+ public async apiSysFileDownloadFileBase64Post(body?: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultString>> {
|
|
|
+ return SysFileApiFp(this.configuration).apiSysFileDownloadFileBase64Post(body, options).then((request) => request(this.axios, this.basePath));
|
|
|
+ }
|
|
|
/**
|
|
|
*
|
|
|
* @summary 根据文件Id或Url下载
|