2024-09-01 21:31:38 +08:00
|
|
|
/* generated using openapi-typescript-codegen -- do no edit */
|
2024-06-16 21:34:10 +08:00
|
|
|
/* istanbul ignore file */
|
|
|
|
/* tslint:disable */
|
|
|
|
/* eslint-disable */
|
|
|
|
import type { BaseResponse_boolean_ } from '../models/BaseResponse_boolean_';
|
|
|
|
import type { BaseResponse_long_ } from '../models/BaseResponse_long_';
|
|
|
|
import type { BaseResponse_Page_PostVO_ } from '../models/BaseResponse_Page_PostVO_';
|
|
|
|
import type { BaseResponse_PostVO_ } from '../models/BaseResponse_PostVO_';
|
|
|
|
import type { DeleteRequest } from '../models/DeleteRequest';
|
|
|
|
import type { PostAddRequest } from '../models/PostAddRequest';
|
|
|
|
import type { PostEditRequest } from '../models/PostEditRequest';
|
|
|
|
import type { PostQueryRequest } from '../models/PostQueryRequest';
|
|
|
|
import type { PostUpdateRequest } from '../models/PostUpdateRequest';
|
2024-09-01 21:31:38 +08:00
|
|
|
|
2024-06-16 21:34:10 +08:00
|
|
|
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
|
|
import { OpenAPI } from '../core/OpenAPI';
|
|
|
|
import { request as __request } from '../core/request';
|
2024-09-01 21:31:38 +08:00
|
|
|
|
2024-06-16 21:34:10 +08:00
|
|
|
export class PostControllerService {
|
2024-09-01 21:31:38 +08:00
|
|
|
|
2024-06-16 21:34:10 +08:00
|
|
|
/**
|
|
|
|
* addPost
|
|
|
|
* @param postAddRequest postAddRequest
|
|
|
|
* @returns BaseResponse_long_ OK
|
|
|
|
* @returns any Created
|
|
|
|
* @throws ApiError
|
|
|
|
*/
|
|
|
|
public static addPostUsingPost(
|
2024-09-01 21:31:38 +08:00
|
|
|
postAddRequest: PostAddRequest,
|
|
|
|
): CancelablePromise<BaseResponse_long_ | any> {
|
2024-06-16 21:34:10 +08:00
|
|
|
return __request(OpenAPI, {
|
|
|
|
method: 'POST',
|
|
|
|
url: '/api/post/add',
|
|
|
|
body: postAddRequest,
|
|
|
|
errors: {
|
|
|
|
401: `Unauthorized`,
|
|
|
|
403: `Forbidden`,
|
|
|
|
404: `Not Found`,
|
|
|
|
},
|
|
|
|
});
|
|
|
|
}
|
2024-09-01 21:31:38 +08:00
|
|
|
|
2024-06-16 21:34:10 +08:00
|
|
|
/**
|
|
|
|
* deletePost
|
|
|
|
* @param deleteRequest deleteRequest
|
|
|
|
* @returns BaseResponse_boolean_ OK
|
|
|
|
* @returns any Created
|
|
|
|
* @throws ApiError
|
|
|
|
*/
|
|
|
|
public static deletePostUsingPost(
|
2024-09-01 21:31:38 +08:00
|
|
|
deleteRequest: DeleteRequest,
|
|
|
|
): CancelablePromise<BaseResponse_boolean_ | any> {
|
2024-06-16 21:34:10 +08:00
|
|
|
return __request(OpenAPI, {
|
|
|
|
method: 'POST',
|
|
|
|
url: '/api/post/delete',
|
|
|
|
body: deleteRequest,
|
|
|
|
errors: {
|
|
|
|
401: `Unauthorized`,
|
|
|
|
403: `Forbidden`,
|
|
|
|
404: `Not Found`,
|
|
|
|
},
|
|
|
|
});
|
|
|
|
}
|
2024-09-01 21:31:38 +08:00
|
|
|
|
2024-06-16 21:34:10 +08:00
|
|
|
/**
|
|
|
|
* editPost
|
|
|
|
* @param postEditRequest postEditRequest
|
|
|
|
* @returns BaseResponse_boolean_ OK
|
|
|
|
* @returns any Created
|
|
|
|
* @throws ApiError
|
|
|
|
*/
|
|
|
|
public static editPostUsingPost(
|
2024-09-01 21:31:38 +08:00
|
|
|
postEditRequest: PostEditRequest,
|
|
|
|
): CancelablePromise<BaseResponse_boolean_ | any> {
|
2024-06-16 21:34:10 +08:00
|
|
|
return __request(OpenAPI, {
|
|
|
|
method: 'POST',
|
|
|
|
url: '/api/post/edit',
|
|
|
|
body: postEditRequest,
|
|
|
|
errors: {
|
|
|
|
401: `Unauthorized`,
|
|
|
|
403: `Forbidden`,
|
|
|
|
404: `Not Found`,
|
|
|
|
},
|
|
|
|
});
|
|
|
|
}
|
2024-09-01 21:31:38 +08:00
|
|
|
|
2024-06-16 21:34:10 +08:00
|
|
|
/**
|
|
|
|
* getPostVOById
|
|
|
|
* @param id id
|
|
|
|
* @returns BaseResponse_PostVO_ OK
|
|
|
|
* @throws ApiError
|
|
|
|
*/
|
|
|
|
public static getPostVoByIdUsingGet(
|
2024-09-01 21:31:38 +08:00
|
|
|
id?: number,
|
|
|
|
): CancelablePromise<BaseResponse_PostVO_> {
|
2024-06-16 21:34:10 +08:00
|
|
|
return __request(OpenAPI, {
|
|
|
|
method: 'GET',
|
|
|
|
url: '/api/post/get/vo',
|
|
|
|
query: {
|
|
|
|
'id': id,
|
|
|
|
},
|
|
|
|
errors: {
|
|
|
|
401: `Unauthorized`,
|
|
|
|
403: `Forbidden`,
|
|
|
|
404: `Not Found`,
|
|
|
|
},
|
|
|
|
});
|
|
|
|
}
|
2024-09-01 21:31:38 +08:00
|
|
|
|
2024-06-16 21:34:10 +08:00
|
|
|
/**
|
|
|
|
* listPostVOByPage
|
|
|
|
* @param postQueryRequest postQueryRequest
|
|
|
|
* @returns BaseResponse_Page_PostVO_ OK
|
|
|
|
* @returns any Created
|
|
|
|
* @throws ApiError
|
|
|
|
*/
|
|
|
|
public static listPostVoByPageUsingPost(
|
2024-09-01 21:31:38 +08:00
|
|
|
postQueryRequest: PostQueryRequest,
|
|
|
|
): CancelablePromise<BaseResponse_Page_PostVO_ | any> {
|
2024-06-16 21:34:10 +08:00
|
|
|
return __request(OpenAPI, {
|
|
|
|
method: 'POST',
|
|
|
|
url: '/api/post/list/page/vo',
|
|
|
|
body: postQueryRequest,
|
|
|
|
errors: {
|
|
|
|
401: `Unauthorized`,
|
|
|
|
403: `Forbidden`,
|
|
|
|
404: `Not Found`,
|
|
|
|
},
|
|
|
|
});
|
|
|
|
}
|
2024-09-01 21:31:38 +08:00
|
|
|
|
2024-06-16 21:34:10 +08:00
|
|
|
/**
|
|
|
|
* listMyPostVOByPage
|
|
|
|
* @param postQueryRequest postQueryRequest
|
|
|
|
* @returns BaseResponse_Page_PostVO_ OK
|
|
|
|
* @returns any Created
|
|
|
|
* @throws ApiError
|
|
|
|
*/
|
|
|
|
public static listMyPostVoByPageUsingPost(
|
2024-09-01 21:31:38 +08:00
|
|
|
postQueryRequest: PostQueryRequest,
|
|
|
|
): CancelablePromise<BaseResponse_Page_PostVO_ | any> {
|
2024-06-16 21:34:10 +08:00
|
|
|
return __request(OpenAPI, {
|
|
|
|
method: 'POST',
|
|
|
|
url: '/api/post/my/list/page/vo',
|
|
|
|
body: postQueryRequest,
|
|
|
|
errors: {
|
|
|
|
401: `Unauthorized`,
|
|
|
|
403: `Forbidden`,
|
|
|
|
404: `Not Found`,
|
|
|
|
},
|
|
|
|
});
|
|
|
|
}
|
2024-09-01 21:31:38 +08:00
|
|
|
|
2024-06-16 21:34:10 +08:00
|
|
|
/**
|
|
|
|
* searchPostVOByPage
|
|
|
|
* @param postQueryRequest postQueryRequest
|
|
|
|
* @returns BaseResponse_Page_PostVO_ OK
|
|
|
|
* @returns any Created
|
|
|
|
* @throws ApiError
|
|
|
|
*/
|
|
|
|
public static searchPostVoByPageUsingPost(
|
2024-09-01 21:31:38 +08:00
|
|
|
postQueryRequest: PostQueryRequest,
|
|
|
|
): CancelablePromise<BaseResponse_Page_PostVO_ | any> {
|
2024-06-16 21:34:10 +08:00
|
|
|
return __request(OpenAPI, {
|
|
|
|
method: 'POST',
|
|
|
|
url: '/api/post/search/page/vo',
|
|
|
|
body: postQueryRequest,
|
|
|
|
errors: {
|
|
|
|
401: `Unauthorized`,
|
|
|
|
403: `Forbidden`,
|
|
|
|
404: `Not Found`,
|
|
|
|
},
|
|
|
|
});
|
|
|
|
}
|
2024-09-01 21:31:38 +08:00
|
|
|
|
2024-06-16 21:34:10 +08:00
|
|
|
/**
|
|
|
|
* updatePost
|
|
|
|
* @param postUpdateRequest postUpdateRequest
|
|
|
|
* @returns BaseResponse_boolean_ OK
|
|
|
|
* @returns any Created
|
|
|
|
* @throws ApiError
|
|
|
|
*/
|
|
|
|
public static updatePostUsingPost(
|
2024-09-01 21:31:38 +08:00
|
|
|
postUpdateRequest: PostUpdateRequest,
|
|
|
|
): CancelablePromise<BaseResponse_boolean_ | any> {
|
2024-06-16 21:34:10 +08:00
|
|
|
return __request(OpenAPI, {
|
|
|
|
method: 'POST',
|
|
|
|
url: '/api/post/update',
|
|
|
|
body: postUpdateRequest,
|
|
|
|
errors: {
|
|
|
|
401: `Unauthorized`,
|
|
|
|
403: `Forbidden`,
|
|
|
|
404: `Not Found`,
|
|
|
|
},
|
|
|
|
});
|
|
|
|
}
|
2024-09-01 21:31:38 +08:00
|
|
|
|
2024-06-16 21:34:10 +08:00
|
|
|
}
|