|
|
|
/* generated using openapi-typescript-codegen -- do not edit */
|
|
|
|
/* istanbul ignore file */
|
|
|
|
/* tslint:disable */
|
|
|
|
/* eslint-disable */
|
|
|
|
import type { BaseResponse_List_CourseResources_ } from '../models/BaseResponse_List_CourseResources_'
|
|
|
|
import type { BaseResponse_Page_ } from '../models/BaseResponse_Page_'
|
|
|
|
import type { BaseResponse_string_ } from '../models/BaseResponse_string_'
|
|
|
|
import type { CourseResources } from '../models/CourseResources'
|
|
|
|
import type { CancelablePromise } from '../core/CancelablePromise'
|
|
|
|
import { OpenAPI } from '../core/OpenAPI'
|
|
|
|
import { request as __request } from '../core/request'
|
|
|
|
export class CourseResourceControllerService {
|
|
|
|
/**
|
|
|
|
* All
|
|
|
|
* @returns BaseResponse_List_CourseResources_ OK
|
|
|
|
* @throws ApiError
|
|
|
|
*/
|
|
|
|
public static allUsingGet1(): CancelablePromise<BaseResponse_List_CourseResources_> {
|
|
|
|
return __request(OpenAPI, {
|
|
|
|
method: 'GET',
|
|
|
|
url: '/courses/all',
|
|
|
|
errors: {
|
|
|
|
401: `Unauthorized`,
|
|
|
|
403: `Forbidden`,
|
|
|
|
404: `Not Found`,
|
|
|
|
},
|
|
|
|
})
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* deleteRecords
|
|
|
|
* @param ids ids
|
|
|
|
* @returns BaseResponse_string_ OK
|
|
|
|
* @throws ApiError
|
|
|
|
*/
|
|
|
|
public static deleteRecordsUsingDelete1(
|
|
|
|
ids: Array<number>,
|
|
|
|
): CancelablePromise<BaseResponse_string_> {
|
|
|
|
return __request(OpenAPI, {
|
|
|
|
method: 'DELETE',
|
|
|
|
url: '/courses/delete',
|
|
|
|
query: {
|
|
|
|
ids: ids,
|
|
|
|
},
|
|
|
|
errors: {
|
|
|
|
401: `Unauthorized`,
|
|
|
|
403: `Forbidden`,
|
|
|
|
},
|
|
|
|
})
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* getAll
|
|
|
|
* @param pagenum pagenum
|
|
|
|
* @param pagesize pagesize
|
|
|
|
* @param type type
|
|
|
|
* @returns BaseResponse_Page_ OK
|
|
|
|
* @throws ApiError
|
|
|
|
*/
|
|
|
|
public static getAllUsingGet1(
|
|
|
|
pagenum: number = 1,
|
|
|
|
pagesize: number = 10,
|
|
|
|
type?: string,
|
|
|
|
): CancelablePromise<BaseResponse_Page_> {
|
|
|
|
return __request(OpenAPI, {
|
|
|
|
method: 'GET',
|
|
|
|
url: '/courses/getall',
|
|
|
|
query: {
|
|
|
|
pagenum: pagenum,
|
|
|
|
pagesize: pagesize,
|
|
|
|
type: type,
|
|
|
|
},
|
|
|
|
errors: {
|
|
|
|
401: `Unauthorized`,
|
|
|
|
403: `Forbidden`,
|
|
|
|
404: `Not Found`,
|
|
|
|
},
|
|
|
|
})
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* saveCourseResource
|
|
|
|
* @param courseResources courseResources
|
|
|
|
* @returns BaseResponse_string_ OK
|
|
|
|
* @throws ApiError
|
|
|
|
*/
|
|
|
|
public static saveCourseResourceUsingGet1(
|
|
|
|
courseResources: CourseResources,
|
|
|
|
): CancelablePromise<BaseResponse_string_> {
|
|
|
|
return __request(OpenAPI, {
|
|
|
|
method: 'GET',
|
|
|
|
url: '/courses/save',
|
|
|
|
body: courseResources,
|
|
|
|
errors: {
|
|
|
|
401: `Unauthorized`,
|
|
|
|
403: `Forbidden`,
|
|
|
|
404: `Not Found`,
|
|
|
|
},
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|