Code-Master/generated/services/QuestionControllerService.ts

257 lines
8.4 KiB
TypeScript
Raw Normal View History

2024-09-01 21:31:38 +08:00
/* generated using openapi-typescript-codegen -- do not 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_Question_ } from '../models/BaseResponse_Page_Question_';
import type { BaseResponse_Page_QuestionSubmitVO_ } from '../models/BaseResponse_Page_QuestionSubmitVO_';
import type { BaseResponse_Page_QuestionVO_ } from '../models/BaseResponse_Page_QuestionVO_';
import type { BaseResponse_Question_ } from '../models/BaseResponse_Question_';
import type { BaseResponse_QuestionVO_ } from '../models/BaseResponse_QuestionVO_';
import type { DeleteRequest } from '../models/DeleteRequest';
import type { QuestionAddRequest } from '../models/QuestionAddRequest';
import type { QuestionEditRequest } from '../models/QuestionEditRequest';
import type { QuestionQueryRequest } from '../models/QuestionQueryRequest';
import type { QuestionSubmitAddRequest } from '../models/QuestionSubmitAddRequest';
import type { QuestionSubmitQueryRequest } from '../models/QuestionSubmitQueryRequest';
import type { QuestionUpdateRequest } from '../models/QuestionUpdateRequest';
import type { CancelablePromise } from '../core/CancelablePromise';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';
export class QuestionControllerService {
/**
* addQuestion
* @param questionAddRequest questionAddRequest
* @returns BaseResponse_long_ OK
* @returns any Created
* @throws ApiError
*/
public static addQuestionUsingPost(
2024-09-01 21:31:38 +08:00
questionAddRequest: QuestionAddRequest,
): CancelablePromise<BaseResponse_long_ | any> {
2024-06-16 21:34:10 +08:00
return __request(OpenAPI, {
method: 'POST',
url: '/api/question/add',
body: questionAddRequest,
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
});
}
/**
* deleteQuestion
* @param deleteRequest deleteRequest
* @returns BaseResponse_boolean_ OK
* @returns any Created
* @throws ApiError
*/
public static deleteQuestionUsingPost(
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/question/delete',
body: deleteRequest,
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
});
}
/**
* editQuestion
* @param questionEditRequest questionEditRequest
* @returns BaseResponse_boolean_ OK
* @returns any Created
* @throws ApiError
*/
public static editQuestionUsingPost(
2024-09-01 21:31:38 +08:00
questionEditRequest: QuestionEditRequest,
): CancelablePromise<BaseResponse_boolean_ | any> {
2024-06-16 21:34:10 +08:00
return __request(OpenAPI, {
method: 'POST',
url: '/api/question/edit',
body: questionEditRequest,
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
});
}
/**
* getQuestionById
* @param id id
* @returns BaseResponse_Question_ OK
* @throws ApiError
*/
public static getQuestionByIdUsingGet(
2024-09-01 21:31:38 +08:00
id?: number,
): CancelablePromise<BaseResponse_Question_> {
2024-06-16 21:34:10 +08:00
return __request(OpenAPI, {
method: 'GET',
url: '/api/question/get',
query: {
'id': id,
},
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
});
}
/**
* getQuestionVOById
* @param id id
* @returns BaseResponse_QuestionVO_ OK
* @throws ApiError
*/
public static getQuestionVoByIdUsingGet(
2024-09-01 21:31:38 +08:00
id?: number,
): CancelablePromise<BaseResponse_QuestionVO_> {
2024-06-16 21:34:10 +08:00
return __request(OpenAPI, {
method: 'GET',
url: '/api/question/get/vo',
query: {
'id': id,
},
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
});
}
/**
* listQuestionByPage
* @param questionQueryRequest questionQueryRequest
* @returns BaseResponse_Page_Question_ OK
* @returns any Created
* @throws ApiError
*/
public static listQuestionByPageUsingPost(
2024-09-01 21:31:38 +08:00
questionQueryRequest: QuestionQueryRequest,
): CancelablePromise<BaseResponse_Page_Question_ | any> {
2024-06-16 21:34:10 +08:00
return __request(OpenAPI, {
method: 'POST',
url: '/api/question/list/page',
body: questionQueryRequest,
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
});
}
/**
* listQuestionVOByPage
* @param questionQueryRequest questionQueryRequest
* @returns BaseResponse_Page_QuestionVO_ OK
* @returns any Created
* @throws ApiError
*/
public static listQuestionVoByPageUsingPost(
2024-09-01 21:31:38 +08:00
questionQueryRequest: QuestionQueryRequest,
): CancelablePromise<BaseResponse_Page_QuestionVO_ | any> {
2024-06-16 21:34:10 +08:00
return __request(OpenAPI, {
method: 'POST',
url: '/api/question/list/page/vo',
body: questionQueryRequest,
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
});
}
/**
* listMyQuestionVOByPage
* @param questionQueryRequest questionQueryRequest
* @returns BaseResponse_Page_QuestionVO_ OK
* @returns any Created
* @throws ApiError
*/
public static listMyQuestionVoByPageUsingPost(
2024-09-01 21:31:38 +08:00
questionQueryRequest: QuestionQueryRequest,
): CancelablePromise<BaseResponse_Page_QuestionVO_ | any> {
2024-06-16 21:34:10 +08:00
return __request(OpenAPI, {
method: 'POST',
url: '/api/question/my/list/page/vo',
body: questionQueryRequest,
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
});
}
/**
* doQuestionSubmit
* @param questionSubmitAddRequest questionSubmitAddRequest
* @returns BaseResponse_long_ OK
* @returns any Created
* @throws ApiError
*/
public static doQuestionSubmitUsingPost(
2024-09-01 21:31:38 +08:00
questionSubmitAddRequest: QuestionSubmitAddRequest,
): CancelablePromise<BaseResponse_long_ | any> {
2024-06-16 21:34:10 +08:00
return __request(OpenAPI, {
method: 'POST',
url: '/api/question/question_submit/do',
body: questionSubmitAddRequest,
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
});
}
/**
* listQuestionSubmitByPage
* @param questionSubmitQueryRequest questionSubmitQueryRequest
* @returns BaseResponse_Page_QuestionSubmitVO_ OK
* @returns any Created
* @throws ApiError
*/
public static listQuestionSubmitByPageUsingPost(
2024-09-01 21:31:38 +08:00
questionSubmitQueryRequest: QuestionSubmitQueryRequest,
): CancelablePromise<BaseResponse_Page_QuestionSubmitVO_ | any> {
2024-06-16 21:34:10 +08:00
return __request(OpenAPI, {
method: 'POST',
url: '/api/question/question_submit/list/page',
body: questionSubmitQueryRequest,
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
});
}
/**
* updateQuestion
* @param questionUpdateRequest questionUpdateRequest
* @returns BaseResponse_boolean_ OK
* @returns any Created
* @throws ApiError
*/
public static updateQuestionUsingPost(
2024-09-01 21:31:38 +08:00
questionUpdateRequest: QuestionUpdateRequest,
): CancelablePromise<BaseResponse_boolean_ | any> {
2024-06-16 21:34:10 +08:00
return __request(OpenAPI, {
method: 'POST',
url: '/api/question/update',
body: questionUpdateRequest,
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
});
}
}