@candesk/contracts 6.65.0 → 6.66.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -346,6 +346,28 @@ export interface RemoveCommentResponse {
346
346
  comment: Comment | undefined;
347
347
  review: Review | undefined;
348
348
  }
349
+ export interface ProductReview {
350
+ review: Review | undefined;
351
+ allCommentCount: number;
352
+ }
353
+ export interface ListProductReviewsRequest {
354
+ productId: string;
355
+ cursor?: string | undefined;
356
+ limit: number;
357
+ }
358
+ export interface ListProductReviewsResponse {
359
+ reviews: ProductReview[];
360
+ nextCursor?: string | undefined;
361
+ }
362
+ export interface ListReviewCommentsRequest {
363
+ reviewId: string;
364
+ cursor?: string | undefined;
365
+ limit: number;
366
+ }
367
+ export interface ListReviewCommentsResponse {
368
+ comments: Comment[];
369
+ nextCursor?: string | undefined;
370
+ }
349
371
  export interface ReviewService {
350
372
  getReviewSummary(request: GetReviewSummaryRequest): Promise<GetReviewSummaryResponse>;
351
373
  listReviews(request: ListReviewsRequest): Promise<ListReviewsResponse>;
@@ -377,5 +399,7 @@ export interface ReviewService {
377
399
  removeReview(request: RemoveReviewRequest): Promise<RemoveReviewResponse>;
378
400
  listUserComments(request: ListUserCommentsRequest): Promise<ListUserCommentsResponse>;
379
401
  removeComment(request: RemoveCommentRequest): Promise<RemoveCommentResponse>;
402
+ listProductReviews(request: ListProductReviewsRequest): Promise<ListProductReviewsResponse>;
403
+ listReviewComments(request: ListReviewCommentsRequest): Promise<ListReviewCommentsResponse>;
380
404
  getModerationCounts(request: GetModerationCountsRequest): Promise<GetModerationCountsResponse>;
381
405
  }
@@ -347,6 +347,28 @@ export interface RemoveCommentResponse {
347
347
  comment: Comment | undefined;
348
348
  review: Review | undefined;
349
349
  }
350
+ export interface ProductReview {
351
+ review: Review | undefined;
352
+ allCommentCount: number;
353
+ }
354
+ export interface ListProductReviewsRequest {
355
+ productId: string;
356
+ cursor?: string | undefined;
357
+ limit: number;
358
+ }
359
+ export interface ListProductReviewsResponse {
360
+ reviews: ProductReview[];
361
+ nextCursor?: string | undefined;
362
+ }
363
+ export interface ListReviewCommentsRequest {
364
+ reviewId: string;
365
+ cursor?: string | undefined;
366
+ limit: number;
367
+ }
368
+ export interface ListReviewCommentsResponse {
369
+ comments: Comment[];
370
+ nextCursor?: string | undefined;
371
+ }
350
372
  export declare const REVIEW_V1_PACKAGE_NAME = "review.v1";
351
373
  export interface ReviewServiceClient {
352
374
  getReviewSummary(request: GetReviewSummaryRequest): Observable<GetReviewSummaryResponse>;
@@ -379,6 +401,8 @@ export interface ReviewServiceClient {
379
401
  removeReview(request: RemoveReviewRequest): Observable<RemoveReviewResponse>;
380
402
  listUserComments(request: ListUserCommentsRequest): Observable<ListUserCommentsResponse>;
381
403
  removeComment(request: RemoveCommentRequest): Observable<RemoveCommentResponse>;
404
+ listProductReviews(request: ListProductReviewsRequest): Observable<ListProductReviewsResponse>;
405
+ listReviewComments(request: ListReviewCommentsRequest): Observable<ListReviewCommentsResponse>;
382
406
  getModerationCounts(request: GetModerationCountsRequest): Observable<GetModerationCountsResponse>;
383
407
  }
384
408
  export interface ReviewServiceController {
@@ -412,6 +436,8 @@ export interface ReviewServiceController {
412
436
  removeReview(request: RemoveReviewRequest): Promise<RemoveReviewResponse> | Observable<RemoveReviewResponse> | RemoveReviewResponse;
413
437
  listUserComments(request: ListUserCommentsRequest): Promise<ListUserCommentsResponse> | Observable<ListUserCommentsResponse> | ListUserCommentsResponse;
414
438
  removeComment(request: RemoveCommentRequest): Promise<RemoveCommentResponse> | Observable<RemoveCommentResponse> | RemoveCommentResponse;
439
+ listProductReviews(request: ListProductReviewsRequest): Promise<ListProductReviewsResponse> | Observable<ListProductReviewsResponse> | ListProductReviewsResponse;
440
+ listReviewComments(request: ListReviewCommentsRequest): Promise<ListReviewCommentsResponse> | Observable<ListReviewCommentsResponse> | ListReviewCommentsResponse;
415
441
  getModerationCounts(request: GetModerationCountsRequest): Promise<GetModerationCountsResponse> | Observable<GetModerationCountsResponse> | GetModerationCountsResponse;
416
442
  }
417
443
  export declare function ReviewServiceControllerMethods(): (constructor: Function) => void;
@@ -79,6 +79,8 @@ function ReviewServiceControllerMethods() {
79
79
  "removeReview",
80
80
  "listUserComments",
81
81
  "removeComment",
82
+ "listProductReviews",
83
+ "listReviewComments",
82
84
  "getModerationCounts",
83
85
  ];
84
86
  for (const method of grpcMethods) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@candesk/contracts",
3
- "version": "6.65.0",
3
+ "version": "6.66.0",
4
4
  "description": "Protobuf contracts for CanDesk microservices",
5
5
  "author": {
6
6
  "name": "Alexander Schulz",
@@ -37,6 +37,8 @@ service ReviewService {
37
37
  rpc RemoveReview (RemoveReviewRequest) returns (RemoveReviewResponse);
38
38
  rpc ListUserComments (ListUserCommentsRequest) returns (ListUserCommentsResponse);
39
39
  rpc RemoveComment (RemoveCommentRequest) returns (RemoveCommentResponse);
40
+ rpc ListProductReviews (ListProductReviewsRequest) returns (ListProductReviewsResponse);
41
+ rpc ListReviewComments (ListReviewCommentsRequest) returns (ListReviewCommentsResponse);
40
42
  rpc GetModerationCounts (GetModerationCountsRequest) returns (GetModerationCountsResponse);
41
43
  }
42
44
 
@@ -453,3 +455,30 @@ message RemoveCommentResponse {
453
455
  Comment comment = 1;
454
456
  Review review = 2;
455
457
  }
458
+
459
+ message ProductReview {
460
+ Review review = 1;
461
+ int32 all_comment_count = 2;
462
+ }
463
+
464
+ message ListProductReviewsRequest {
465
+ string product_id = 1;
466
+ optional string cursor = 2;
467
+ int32 limit = 3;
468
+ }
469
+
470
+ message ListProductReviewsResponse {
471
+ repeated ProductReview reviews = 1;
472
+ optional string next_cursor = 2;
473
+ }
474
+
475
+ message ListReviewCommentsRequest {
476
+ string review_id = 1;
477
+ optional string cursor = 2;
478
+ int32 limit = 3;
479
+ }
480
+
481
+ message ListReviewCommentsResponse {
482
+ repeated Comment comments = 1;
483
+ optional string next_cursor = 2;
484
+ }