feat: 开发中...

This commit is contained in:
2023-04-06 05:13:43 +08:00
parent d8b1f6f959
commit 2b507f9329
17 changed files with 252 additions and 82 deletions

View File

@@ -1 +1 @@
3.0.41
3.0.42

View File

@@ -17,6 +17,9 @@ import { Configuration } from '../configuration';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
import { AttachAttachIDBody } from '../models';
import { ResponseVOAttachInfoResponseVO } from '../models';
import { ResponseVOLong } from '../models';
import { ResponseVOPageableVOAttachInfoResponseVO } from '../models';
import { ResponseVOVoid } from '../models';
import { V1AttachBody } from '../models';
/**
@@ -27,15 +30,12 @@ export const AttachControllerApiAxiosParamCreator = function (configuration?: Co
return {
/**
*
* @param {V1AttachBody} body
* @summary 新建附件
* @param {V1AttachBody} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createAttach: async (body: V1AttachBody, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new RequiredError('body','Required parameter body was null or undefined when calling createAttach.');
}
createAttach: async (body?: V1AttachBody, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/api/v1/attach/`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
@@ -69,11 +69,12 @@ export const AttachControllerApiAxiosParamCreator = function (configuration?: Co
},
/**
*
* @param {string} attachID
* @summary 删除附件
* @param {number} attachID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteAttach: async (attachID: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
deleteAttach: async (attachID: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'attachID' is not null or undefined
if (attachID === null || attachID === undefined) {
throw new RequiredError('attachID','Required parameter attachID was null or undefined when calling deleteAttach.');
@@ -108,14 +109,55 @@ export const AttachControllerApiAxiosParamCreator = function (configuration?: Co
},
/**
*
* @param {string} attachID
* @summary 获取附件内容
* @param {number} attachID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getAttach: async (attachID: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
getAttachContent: async (attachID: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'attachID' is not null or undefined
if (attachID === null || attachID === undefined) {
throw new RequiredError('attachID','Required parameter attachID was null or undefined when calling getAttach.');
throw new RequiredError('attachID','Required parameter attachID was null or undefined when calling getAttachContent.');
}
const localVarPath = `/api/v1/attach/{attachID}/content`
.replace(`{${"attachID"}}`, encodeURIComponent(String(attachID)));
// 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: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
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};
return {
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
options: localVarRequestOptions,
};
},
/**
*
* @summary 获取附件信息
* @param {number} attachID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getAttachInfo: async (attachID: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'attachID' is not null or undefined
if (attachID === null || attachID === undefined) {
throw new RequiredError('attachID','Required parameter attachID was null or undefined when calling getAttachInfo.');
}
const localVarPath = `/api/v1/attach/{attachID}/`
.replace(`{${"attachID"}}`, encodeURIComponent(String(attachID)));
@@ -147,10 +189,21 @@ export const AttachControllerApiAxiosParamCreator = function (configuration?: Co
},
/**
*
* @summary 获取附件列表
* @param {number} page 页码
* @param {number} size 大小
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getAttachList: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
getAttachList: async (page: number, size: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'page' is not null or undefined
if (page === null || page === undefined) {
throw new RequiredError('page','Required parameter page was null or undefined when calling getAttachList.');
}
// verify required parameter 'size' is not null or undefined
if (size === null || size === undefined) {
throw new RequiredError('size','Required parameter size was null or undefined when calling getAttachList.');
}
const localVarPath = `/api/v1/attach/`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
@@ -162,6 +215,14 @@ export const AttachControllerApiAxiosParamCreator = function (configuration?: Co
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
if (page !== undefined) {
localVarQueryParameter['page'] = page;
}
if (size !== undefined) {
localVarQueryParameter['size'] = size;
}
const query = new URLSearchParams(localVarUrlObj.search);
for (const key in localVarQueryParameter) {
query.set(key, localVarQueryParameter[key]);
@@ -180,19 +241,16 @@ export const AttachControllerApiAxiosParamCreator = function (configuration?: Co
},
/**
*
* @param {AttachAttachIDBody} body
* @param {string} attachID
* @summary 更新附件
* @param {number} attachID
* @param {AttachAttachIDBody} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
modifyAttach: async (body: AttachAttachIDBody, attachID: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new RequiredError('body','Required parameter body was null or undefined when calling modifyAttach.');
}
updateAttach: async (attachID: number, body?: AttachAttachIDBody, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'attachID' is not null or undefined
if (attachID === null || attachID === undefined) {
throw new RequiredError('attachID','Required parameter attachID was null or undefined when calling modifyAttach.');
throw new RequiredError('attachID','Required parameter attachID was null or undefined when calling updateAttach.');
}
const localVarPath = `/api/v1/attach/{attachID}/`
.replace(`{${"attachID"}}`, encodeURIComponent(String(attachID)));
@@ -237,11 +295,12 @@ export const AttachControllerApiFp = function(configuration?: Configuration) {
return {
/**
*
* @param {V1AttachBody} body
* @summary 新建附件
* @param {V1AttachBody} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async createAttach(body: V1AttachBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ResponseVOVoid>>> {
async createAttach(body?: V1AttachBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ResponseVOLong>>> {
const localVarAxiosArgs = await AttachControllerApiAxiosParamCreator(configuration).createAttach(body, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
@@ -250,11 +309,12 @@ export const AttachControllerApiFp = function(configuration?: Configuration) {
},
/**
*
* @param {string} attachID
* @summary 删除附件
* @param {number} attachID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async deleteAttach(attachID: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ResponseVOVoid>>> {
async deleteAttach(attachID: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ResponseVOVoid>>> {
const localVarAxiosArgs = await AttachControllerApiAxiosParamCreator(configuration).deleteAttach(attachID, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
@@ -263,12 +323,13 @@ export const AttachControllerApiFp = function(configuration?: Configuration) {
},
/**
*
* @param {string} attachID
* @summary 获取附件内容
* @param {number} attachID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getAttach(attachID: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ResponseVOVoid>>> {
const localVarAxiosArgs = await AttachControllerApiAxiosParamCreator(configuration).getAttach(attachID, options);
async getAttachContent(attachID: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<Blob>>> {
const localVarAxiosArgs = await AttachControllerApiAxiosParamCreator(configuration).getAttachContent(attachID, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
@@ -276,11 +337,13 @@ export const AttachControllerApiFp = function(configuration?: Configuration) {
},
/**
*
* @summary 获取附件信息
* @param {number} attachID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getAttachList(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ResponseVOVoid>>> {
const localVarAxiosArgs = await AttachControllerApiAxiosParamCreator(configuration).getAttachList(options);
async getAttachInfo(attachID: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ResponseVOAttachInfoResponseVO>>> {
const localVarAxiosArgs = await AttachControllerApiAxiosParamCreator(configuration).getAttachInfo(attachID, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
@@ -288,13 +351,29 @@ export const AttachControllerApiFp = function(configuration?: Configuration) {
},
/**
*
* @param {AttachAttachIDBody} body
* @param {string} attachID
* @summary 获取附件列表
* @param {number} page 页码
* @param {number} size 大小
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async modifyAttach(body: AttachAttachIDBody, attachID: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ResponseVOVoid>>> {
const localVarAxiosArgs = await AttachControllerApiAxiosParamCreator(configuration).modifyAttach(body, attachID, options);
async getAttachList(page: number, size: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ResponseVOPageableVOAttachInfoResponseVO>>> {
const localVarAxiosArgs = await AttachControllerApiAxiosParamCreator(configuration).getAttachList(page, size, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
*
* @summary 更新附件
* @param {number} attachID
* @param {AttachAttachIDBody} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async updateAttach(attachID: number, body?: AttachAttachIDBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ResponseVOVoid>>> {
const localVarAxiosArgs = await AttachControllerApiAxiosParamCreator(configuration).updateAttach(attachID, body, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
@@ -311,48 +390,65 @@ export const AttachControllerApiFactory = function (configuration?: Configuratio
return {
/**
*
* @param {V1AttachBody} body
* @summary 新建附件
* @param {V1AttachBody} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async createAttach(body: V1AttachBody, options?: AxiosRequestConfig): Promise<AxiosResponse<ResponseVOVoid>> {
async createAttach(body?: V1AttachBody, options?: AxiosRequestConfig): Promise<AxiosResponse<ResponseVOLong>> {
return AttachControllerApiFp(configuration).createAttach(body, options).then((request) => request(axios, basePath));
},
/**
*
* @param {string} attachID
* @summary 删除附件
* @param {number} attachID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async deleteAttach(attachID: string, options?: AxiosRequestConfig): Promise<AxiosResponse<ResponseVOVoid>> {
async deleteAttach(attachID: number, options?: AxiosRequestConfig): Promise<AxiosResponse<ResponseVOVoid>> {
return AttachControllerApiFp(configuration).deleteAttach(attachID, options).then((request) => request(axios, basePath));
},
/**
*
* @param {string} attachID
* @summary 获取附件内容
* @param {number} attachID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getAttach(attachID: string, options?: AxiosRequestConfig): Promise<AxiosResponse<ResponseVOVoid>> {
return AttachControllerApiFp(configuration).getAttach(attachID, options).then((request) => request(axios, basePath));
async getAttachContent(attachID: number, options?: AxiosRequestConfig): Promise<AxiosResponse<Blob>> {
return AttachControllerApiFp(configuration).getAttachContent(attachID, options).then((request) => request(axios, basePath));
},
/**
*
* @summary 获取附件信息
* @param {number} attachID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getAttachList(options?: AxiosRequestConfig): Promise<AxiosResponse<ResponseVOVoid>> {
return AttachControllerApiFp(configuration).getAttachList(options).then((request) => request(axios, basePath));
async getAttachInfo(attachID: number, options?: AxiosRequestConfig): Promise<AxiosResponse<ResponseVOAttachInfoResponseVO>> {
return AttachControllerApiFp(configuration).getAttachInfo(attachID, options).then((request) => request(axios, basePath));
},
/**
*
* @param {AttachAttachIDBody} body
* @param {string} attachID
* @summary 获取附件列表
* @param {number} page 页码
* @param {number} size 大小
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async modifyAttach(body: AttachAttachIDBody, attachID: string, options?: AxiosRequestConfig): Promise<AxiosResponse<ResponseVOVoid>> {
return AttachControllerApiFp(configuration).modifyAttach(body, attachID, options).then((request) => request(axios, basePath));
async getAttachList(page: number, size: number, options?: AxiosRequestConfig): Promise<AxiosResponse<ResponseVOPageableVOAttachInfoResponseVO>> {
return AttachControllerApiFp(configuration).getAttachList(page, size, options).then((request) => request(axios, basePath));
},
/**
*
* @summary 更新附件
* @param {number} attachID
* @param {AttachAttachIDBody} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async updateAttach(attachID: number, body?: AttachAttachIDBody, options?: AxiosRequestConfig): Promise<AxiosResponse<ResponseVOVoid>> {
return AttachControllerApiFp(configuration).updateAttach(attachID, body, options).then((request) => request(axios, basePath));
},
};
};
@@ -366,52 +462,70 @@ export const AttachControllerApiFactory = function (configuration?: Configuratio
export class AttachControllerApi extends BaseAPI {
/**
*
* @param {V1AttachBody} body
* @summary 新建附件
* @param {V1AttachBody} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AttachControllerApi
*/
public async createAttach(body: V1AttachBody, options?: AxiosRequestConfig) : Promise<AxiosResponse<ResponseVOVoid>> {
public async createAttach(body?: V1AttachBody, options?: AxiosRequestConfig) : Promise<AxiosResponse<ResponseVOLong>> {
return AttachControllerApiFp(this.configuration).createAttach(body, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @param {string} attachID
* @summary 删除附件
* @param {number} attachID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AttachControllerApi
*/
public async deleteAttach(attachID: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<ResponseVOVoid>> {
public async deleteAttach(attachID: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<ResponseVOVoid>> {
return AttachControllerApiFp(this.configuration).deleteAttach(attachID, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @param {string} attachID
* @summary 获取附件内容
* @param {number} attachID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AttachControllerApi
*/
public async getAttach(attachID: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<ResponseVOVoid>> {
return AttachControllerApiFp(this.configuration).getAttach(attachID, options).then((request) => request(this.axios, this.basePath));
public async getAttachContent(attachID: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<Blob>> {
return AttachControllerApiFp(this.configuration).getAttachContent(attachID, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary 获取附件信息
* @param {number} attachID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AttachControllerApi
*/
public async getAttachList(options?: AxiosRequestConfig) : Promise<AxiosResponse<ResponseVOVoid>> {
return AttachControllerApiFp(this.configuration).getAttachList(options).then((request) => request(this.axios, this.basePath));
public async getAttachInfo(attachID: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<ResponseVOAttachInfoResponseVO>> {
return AttachControllerApiFp(this.configuration).getAttachInfo(attachID, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @param {AttachAttachIDBody} body
* @param {string} attachID
* @summary 获取附件列表
* @param {number} page 页码
* @param {number} size 大小
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AttachControllerApi
*/
public async modifyAttach(body: AttachAttachIDBody, attachID: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<ResponseVOVoid>> {
return AttachControllerApiFp(this.configuration).modifyAttach(body, attachID, options).then((request) => request(this.axios, this.basePath));
public async getAttachList(page: number, size: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<ResponseVOPageableVOAttachInfoResponseVO>> {
return AttachControllerApiFp(this.configuration).getAttachList(page, size, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary 更新附件
* @param {number} attachID
* @param {AttachAttachIDBody} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AttachControllerApi
*/
public async updateAttach(attachID: number, body?: AttachAttachIDBody, options?: AxiosRequestConfig) : Promise<AxiosResponse<ResponseVOVoid>> {
return AttachControllerApiFp(this.configuration).updateAttach(attachID, body, options).then((request) => request(this.axios, this.basePath));
}
}

View File

@@ -22,5 +22,5 @@ export interface AttachAttachIDBody {
* @type {Blob}
* @memberof AttachAttachIDBody
*/
file?: Blob;
file: Blob;
}

View File

@@ -11,6 +11,7 @@
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
import { UserInfoResponseVO } from './user-info-response-vo';
/**
*
* @export
@@ -25,10 +26,16 @@ export interface AttachInfoResponseVO {
id: number;
/**
*
* @type {string}
* @type {UserInfoResponseVO}
* @memberof AttachInfoResponseVO
*/
creator: string;
creator: UserInfoResponseVO;
/**
*
* @type {UserInfoResponseVO}
* @memberof AttachInfoResponseVO
*/
updater: UserInfoResponseVO;
/**
*
* @type {Date}

View File

@@ -29,12 +29,6 @@ export interface BlogUpdateRequireVO {
* @memberof BlogUpdateRequireVO
*/
abstracts?: string;
/**
*
* @type {string}
* @memberof BlogUpdateRequireVO
*/
password?: string;
/**
*
* @type {string}

View File

@@ -6,6 +6,7 @@ export * from './pageable-voattach-info-response-vo';
export * from './pageable-voblog-info-response-vo';
export * from './pageable-vosetting-info-response-vo';
export * from './pageable-vouser-info-response-vo';
export * from './response-voattach-info-response-vo';
export * from './response-voblog-info-response-vo';
export * from './response-volong';
export * from './response-vopageable-voattach-info-response-vo';

View File

@@ -0,0 +1,39 @@
/* tslint:disable */
/* eslint-disable */
/**
* OpenAPI definition
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: v0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
import { AttachInfoResponseVO } from './attach-info-response-vo';
/**
*
* @export
* @interface ResponseVOAttachInfoResponseVO
*/
export interface ResponseVOAttachInfoResponseVO {
/**
*
* @type {number}
* @memberof ResponseVOAttachInfoResponseVO
*/
code?: number;
/**
*
* @type {string}
* @memberof ResponseVOAttachInfoResponseVO
*/
msg?: string;
/**
*
* @type {AttachInfoResponseVO}
* @memberof ResponseVOAttachInfoResponseVO
*/
content?: AttachInfoResponseVO;
}

View File

@@ -22,5 +22,5 @@ export interface V1AttachBody {
* @type {Blob}
* @memberof V1AttachBody
*/
file?: Blob;
file: Blob;
}