@aepstore-dev/contracts 1.30.0 → 1.32.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.
package/gen/products.ts CHANGED
@@ -127,6 +127,18 @@ export interface Product {
127
127
  isReviewed: boolean;
128
128
  /** Popularity (populated by GetTopProduct / GetPopularProducts). */
129
129
  popularityScore: string;
130
+ /**
131
+ * OWNER-ONLY: the product's deliverable files. Populated by FindOne only
132
+ * when the viewer is the product owner; empty for everyone else (never
133
+ * exposes private attachment metadata to non-owners).
134
+ */
135
+ attachments: ProductAttachment[];
136
+ }
137
+
138
+ export interface ProductAttachment {
139
+ id: string;
140
+ fileName: string;
141
+ fileSize: number;
130
142
  }
131
143
 
132
144
  /** Compact product shape for "related products" — only the fields a card needs. */
@@ -278,6 +290,20 @@ export interface SaveAttachmentMetadataRequest {
278
290
  uploadId: string;
279
291
  }
280
292
 
293
+ export interface RemoveMediaRequest {
294
+ /** product id */
295
+ id: string;
296
+ userId: string;
297
+ mediaId: string;
298
+ }
299
+
300
+ export interface RemoveAttachmentRequest {
301
+ /** product id */
302
+ id: string;
303
+ userId: string;
304
+ attachmentId: string;
305
+ }
306
+
281
307
  export interface ProductModerationQueryRequest {
282
308
  status: ModerationStatus;
283
309
  page: number;
@@ -387,6 +413,10 @@ export interface ProductsServiceClient {
387
413
 
388
414
  saveAttachmentMetadata(request: SaveAttachmentMetadataRequest): Observable<ProductResponse>;
389
415
 
416
+ removeMedia(request: RemoveMediaRequest): Observable<ProductResponse>;
417
+
418
+ removeAttachment(request: RemoveAttachmentRequest): Observable<ProductResponse>;
419
+
390
420
  getProductsForModeration(request: ProductModerationQueryRequest): Observable<ProductsListResponse>;
391
421
 
392
422
  moderateProduct(request: ModerateProductRequest): Observable<ModerationResponse>;
@@ -448,6 +478,12 @@ export interface ProductsServiceController {
448
478
  request: SaveAttachmentMetadataRequest,
449
479
  ): Promise<ProductResponse> | Observable<ProductResponse> | ProductResponse;
450
480
 
481
+ removeMedia(request: RemoveMediaRequest): Promise<ProductResponse> | Observable<ProductResponse> | ProductResponse;
482
+
483
+ removeAttachment(
484
+ request: RemoveAttachmentRequest,
485
+ ): Promise<ProductResponse> | Observable<ProductResponse> | ProductResponse;
486
+
451
487
  getProductsForModeration(
452
488
  request: ProductModerationQueryRequest,
453
489
  ): Promise<ProductsListResponse> | Observable<ProductsListResponse> | ProductsListResponse;
@@ -503,6 +539,8 @@ export function ProductsServiceControllerMethods() {
503
539
  "removeFromFavorites",
504
540
  "saveMediaMetadata",
505
541
  "saveAttachmentMetadata",
542
+ "removeMedia",
543
+ "removeAttachment",
506
544
  "getProductsForModeration",
507
545
  "moderateProduct",
508
546
  "resubmitProduct",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aepstore-dev/contracts",
3
- "version": "1.30.0",
3
+ "version": "1.32.0",
4
4
  "description": "Protobuf definitions for aepstore microservices",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -18,6 +18,8 @@ service ProductsService {
18
18
 
19
19
  rpc SaveMediaMetadata(SaveMediaMetadataRequest) returns (ProductResponse);
20
20
  rpc SaveAttachmentMetadata(SaveAttachmentMetadataRequest) returns (ProductResponse);
21
+ rpc RemoveMedia(RemoveMediaRequest) returns (ProductResponse);
22
+ rpc RemoveAttachment(RemoveAttachmentRequest) returns (ProductResponse);
21
23
 
22
24
  rpc GetProductsForModeration(ProductModerationQueryRequest) returns (ProductsListResponse);
23
25
  rpc ModerateProduct(ModerateProductRequest) returns (ModerationResponse);
@@ -144,6 +146,17 @@ message Product {
144
146
 
145
147
  // Popularity (populated by GetTopProduct / GetPopularProducts).
146
148
  string popularity_score = 29; // double as string
149
+
150
+ // OWNER-ONLY: the product's deliverable files. Populated by FindOne only
151
+ // when the viewer is the product owner; empty for everyone else (never
152
+ // exposes private attachment metadata to non-owners).
153
+ repeated ProductAttachment attachments = 33;
154
+ }
155
+
156
+ message ProductAttachment {
157
+ string id = 1;
158
+ string file_name = 2;
159
+ double file_size = 3;
147
160
  }
148
161
 
149
162
  // Compact product shape for "related products" — only the fields a card needs.
@@ -293,6 +306,18 @@ message SaveAttachmentMetadataRequest {
293
306
  string upload_id = 4;
294
307
  }
295
308
 
309
+ message RemoveMediaRequest {
310
+ string id = 1; // product id
311
+ string user_id = 2;
312
+ string media_id = 3;
313
+ }
314
+
315
+ message RemoveAttachmentRequest {
316
+ string id = 1; // product id
317
+ string user_id = 2;
318
+ string attachment_id = 3;
319
+ }
320
+
296
321
  // =================================================================
297
322
  // Moderation
298
323
  // =================================================================