add GetComments and update proto

This commit is contained in:
2023-08-14 14:27:29 +03:00
parent 85d1191dd9
commit 37e92e8473
16 changed files with 850 additions and 142 deletions

View File

@@ -14,6 +14,7 @@ import { AddCommentReq } from '../models/add-comment-req';
import { AddCommentRsp } from '../models/add-comment-rsp';
import { AddPackageReq } from '../models/add-package-req';
import { AddPackageRsp } from '../models/add-package-rsp';
import { GetCommentsRsp } from '../models/get-comments-rsp';
import { GetModuleRsp } from '../models/get-module-rsp';
import { ListPackageRsp } from '../models/list-package-rsp';
import { UpdatePackageReq } from '../models/update-package-req';
@@ -25,6 +26,53 @@ export class PkgdashServiceService extends BaseService {
super(config, http);
}
/** Path part for operation `getComments()` */
static readonly GetCommentsPath = '/v1/comment';
/**
* This method provides access to the full `HttpResponse`, allowing access to response headers.
* To access only the response body, use `getComments()` instead.
*
* This method doesn't expect any request body.
*/
getComments$Response(
params?: {
id?: Array<number>;
},
context?: HttpContext
): Observable<StrictHttpResponse<GetCommentsRsp>> {
const rb = new RequestBuilder(this.rootUrl, PkgdashServiceService.GetCommentsPath, 'get');
if (params) {
rb.query('id', params.id, {});
}
return this.http.request(
rb.build({ responseType: 'json', accept: 'application/json', context })
).pipe(
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
map((r: HttpResponse<any>) => {
return r as StrictHttpResponse<GetCommentsRsp>;
})
);
}
/**
* This method provides access only to the response body.
* To access the full response (for headers, for example), `getComments$Response()` instead.
*
* This method doesn't expect any request body.
*/
getComments(
params?: {
id?: Array<number>;
},
context?: HttpContext
): Observable<GetCommentsRsp> {
return this.getComments$Response(params, context).pipe(
map((r: StrictHttpResponse<GetCommentsRsp>): GetCommentsRsp => r.body)
);
}
/** Path part for operation `getModule()` */
static readonly GetModulePath = '/v1/module';