@aepstore-dev/contracts 1.6.0 → 1.8.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 +38 -8
- package/package.json +1 -1
- package/proto/products.proto +25 -5
package/gen/products.ts
CHANGED
|
@@ -99,10 +99,26 @@ export interface Product {
|
|
|
99
99
|
categories: Category[];
|
|
100
100
|
applications: Application[];
|
|
101
101
|
tags: Tag[];
|
|
102
|
+
/** Aggregate counts (populated where the query includes _count). */
|
|
103
|
+
favoritesCount: number;
|
|
104
|
+
viewsCount: number;
|
|
105
|
+
reviewsCount: number;
|
|
106
|
+
/** Viewer-contextual flags (populated by FindOne when a viewer is known). */
|
|
107
|
+
owner: boolean;
|
|
108
|
+
isFavorite: boolean;
|
|
109
|
+
isViewed: boolean;
|
|
110
|
+
/** owner-only, current-month revenue (Decimal as string) */
|
|
111
|
+
revenue: string;
|
|
112
|
+
/** Popularity (populated by GetTopProduct / GetPopularProducts). */
|
|
113
|
+
popularityScore: string;
|
|
102
114
|
}
|
|
103
115
|
|
|
104
116
|
export interface ProductResponse {
|
|
105
|
-
product:
|
|
117
|
+
product:
|
|
118
|
+
| Product
|
|
119
|
+
| undefined;
|
|
120
|
+
/** Populated only by FindOne: up to 2 other approved products by the same author. */
|
|
121
|
+
relatedProducts: Product[];
|
|
106
122
|
}
|
|
107
123
|
|
|
108
124
|
export interface ProductsListResponse {
|
|
@@ -289,15 +305,17 @@ export interface AttachmentDownloadInfoResponse {
|
|
|
289
305
|
contentType: string;
|
|
290
306
|
}
|
|
291
307
|
|
|
292
|
-
export interface
|
|
308
|
+
export interface GetAttachmentDownloadUrlRequest {
|
|
293
309
|
productId: string;
|
|
294
310
|
attachmentId: string;
|
|
295
311
|
userId: string;
|
|
296
312
|
}
|
|
297
313
|
|
|
298
|
-
export interface
|
|
299
|
-
|
|
300
|
-
|
|
314
|
+
export interface AttachmentDownloadUrlResponse {
|
|
315
|
+
downloadUrl: string;
|
|
316
|
+
expiresIn: number;
|
|
317
|
+
fileName: string;
|
|
318
|
+
fileSize: number;
|
|
301
319
|
}
|
|
302
320
|
|
|
303
321
|
export const PRODUCTS_V1_PACKAGE_NAME = "products.v1";
|
|
@@ -339,7 +357,12 @@ export interface ProductsServiceClient {
|
|
|
339
357
|
|
|
340
358
|
getAttachmentDownloadInfo(request: GetAttachmentDownloadInfoRequest): Observable<AttachmentDownloadInfoResponse>;
|
|
341
359
|
|
|
342
|
-
|
|
360
|
+
/**
|
|
361
|
+
* Single presigned GET URL for one attachment (after purchase/access check).
|
|
362
|
+
* Bytes never traverse the backend — see upload-service.
|
|
363
|
+
*/
|
|
364
|
+
|
|
365
|
+
getAttachmentDownloadUrl(request: GetAttachmentDownloadUrlRequest): Observable<AttachmentDownloadUrlResponse>;
|
|
343
366
|
|
|
344
367
|
getTopProduct(request: Empty): Observable<ProductResponse>;
|
|
345
368
|
|
|
@@ -408,7 +431,14 @@ export interface ProductsServiceController {
|
|
|
408
431
|
| Observable<AttachmentDownloadInfoResponse>
|
|
409
432
|
| AttachmentDownloadInfoResponse;
|
|
410
433
|
|
|
411
|
-
|
|
434
|
+
/**
|
|
435
|
+
* Single presigned GET URL for one attachment (after purchase/access check).
|
|
436
|
+
* Bytes never traverse the backend — see upload-service.
|
|
437
|
+
*/
|
|
438
|
+
|
|
439
|
+
getAttachmentDownloadUrl(
|
|
440
|
+
request: GetAttachmentDownloadUrlRequest,
|
|
441
|
+
): Promise<AttachmentDownloadUrlResponse> | Observable<AttachmentDownloadUrlResponse> | AttachmentDownloadUrlResponse;
|
|
412
442
|
|
|
413
443
|
getTopProduct(request: Empty): Promise<ProductResponse> | Observable<ProductResponse> | ProductResponse;
|
|
414
444
|
|
|
@@ -438,7 +468,7 @@ export function ProductsServiceControllerMethods() {
|
|
|
438
468
|
"resubmitProduct",
|
|
439
469
|
"getSecureDownloadLinks",
|
|
440
470
|
"getAttachmentDownloadInfo",
|
|
441
|
-
"
|
|
471
|
+
"getAttachmentDownloadUrl",
|
|
442
472
|
"getTopProduct",
|
|
443
473
|
"getPopularProducts",
|
|
444
474
|
];
|
package/package.json
CHANGED
package/proto/products.proto
CHANGED
|
@@ -25,7 +25,9 @@ service ProductsService {
|
|
|
25
25
|
|
|
26
26
|
rpc GetSecureDownloadLinks(GetSecureDownloadLinksRequest) returns (SecureDownloadLinksResponse);
|
|
27
27
|
rpc GetAttachmentDownloadInfo(GetAttachmentDownloadInfoRequest) returns (AttachmentDownloadInfoResponse);
|
|
28
|
-
|
|
28
|
+
// Single presigned GET URL for one attachment (after purchase/access check).
|
|
29
|
+
// Bytes never traverse the backend — see upload-service.
|
|
30
|
+
rpc GetAttachmentDownloadUrl(GetAttachmentDownloadUrlRequest) returns (AttachmentDownloadUrlResponse);
|
|
29
31
|
|
|
30
32
|
rpc GetTopProduct(Empty) returns (ProductResponse);
|
|
31
33
|
rpc GetPopularProducts(QueryProductsRequest) returns (ProductsListResponse);
|
|
@@ -119,10 +121,26 @@ message Product {
|
|
|
119
121
|
repeated Category categories = 19;
|
|
120
122
|
repeated Application applications = 20;
|
|
121
123
|
repeated Tag tags = 21;
|
|
124
|
+
|
|
125
|
+
// Aggregate counts (populated where the query includes _count).
|
|
126
|
+
int32 favorites_count = 22;
|
|
127
|
+
int32 views_count = 23;
|
|
128
|
+
int32 reviews_count = 24;
|
|
129
|
+
|
|
130
|
+
// Viewer-contextual flags (populated by FindOne when a viewer is known).
|
|
131
|
+
bool owner = 25;
|
|
132
|
+
bool is_favorite = 26;
|
|
133
|
+
bool is_viewed = 27;
|
|
134
|
+
string revenue = 28; // owner-only, current-month revenue (Decimal as string)
|
|
135
|
+
|
|
136
|
+
// Popularity (populated by GetTopProduct / GetPopularProducts).
|
|
137
|
+
string popularity_score = 29; // double as string
|
|
122
138
|
}
|
|
123
139
|
|
|
124
140
|
message ProductResponse {
|
|
125
141
|
Product product = 1;
|
|
142
|
+
// Populated only by FindOne: up to 2 other approved products by the same author.
|
|
143
|
+
repeated Product related_products = 2;
|
|
126
144
|
}
|
|
127
145
|
|
|
128
146
|
message ProductsListResponse {
|
|
@@ -318,13 +336,15 @@ message AttachmentDownloadInfoResponse {
|
|
|
318
336
|
string content_type = 3;
|
|
319
337
|
}
|
|
320
338
|
|
|
321
|
-
message
|
|
339
|
+
message GetAttachmentDownloadUrlRequest {
|
|
322
340
|
string product_id = 1;
|
|
323
341
|
string attachment_id = 2;
|
|
324
342
|
string user_id = 3;
|
|
325
343
|
}
|
|
326
344
|
|
|
327
|
-
message
|
|
328
|
-
|
|
329
|
-
|
|
345
|
+
message AttachmentDownloadUrlResponse {
|
|
346
|
+
string download_url = 1;
|
|
347
|
+
int32 expires_in = 2;
|
|
348
|
+
string file_name = 3;
|
|
349
|
+
double file_size = 4;
|
|
330
350
|
}
|