@aepstore-dev/contracts 1.5.0 → 1.7.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 +33 -14
- package/package.json +1 -1
- package/proto/products.proto +19 -12
package/gen/products.ts
CHANGED
|
@@ -10,25 +10,30 @@ import { Observable } from "rxjs";
|
|
|
10
10
|
|
|
11
11
|
export const protobufPackage = "products.v1";
|
|
12
12
|
|
|
13
|
+
/**
|
|
14
|
+
* Member names match the DB enum string values exactly (enums: String on the
|
|
15
|
+
* wire) so values pass straight through with no mapping. UNSPECIFIED=0 covers
|
|
16
|
+
* null/optional (e.g. nullable moderation_status, missing list filters).
|
|
17
|
+
*/
|
|
13
18
|
export enum ProductStatus {
|
|
14
19
|
PRODUCT_STATUS_UNSPECIFIED = 0,
|
|
15
|
-
|
|
16
|
-
|
|
20
|
+
ACTIVE = 1,
|
|
21
|
+
DRAFT = 2,
|
|
17
22
|
UNRECOGNIZED = -1,
|
|
18
23
|
}
|
|
19
24
|
|
|
20
25
|
export enum ModerationStatus {
|
|
21
26
|
MODERATION_STATUS_UNSPECIFIED = 0,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
27
|
+
PENDING = 1,
|
|
28
|
+
APPROVED = 2,
|
|
29
|
+
REJECTED = 3,
|
|
25
30
|
UNRECOGNIZED = -1,
|
|
26
31
|
}
|
|
27
32
|
|
|
28
33
|
export enum MediaType {
|
|
29
34
|
MEDIA_TYPE_UNSPECIFIED = 0,
|
|
30
|
-
|
|
31
|
-
|
|
35
|
+
IMAGE = 1,
|
|
36
|
+
VIDEO = 2,
|
|
32
37
|
UNRECOGNIZED = -1,
|
|
33
38
|
}
|
|
34
39
|
|
|
@@ -284,15 +289,17 @@ export interface AttachmentDownloadInfoResponse {
|
|
|
284
289
|
contentType: string;
|
|
285
290
|
}
|
|
286
291
|
|
|
287
|
-
export interface
|
|
292
|
+
export interface GetAttachmentDownloadUrlRequest {
|
|
288
293
|
productId: string;
|
|
289
294
|
attachmentId: string;
|
|
290
295
|
userId: string;
|
|
291
296
|
}
|
|
292
297
|
|
|
293
|
-
export interface
|
|
294
|
-
|
|
295
|
-
|
|
298
|
+
export interface AttachmentDownloadUrlResponse {
|
|
299
|
+
downloadUrl: string;
|
|
300
|
+
expiresIn: number;
|
|
301
|
+
fileName: string;
|
|
302
|
+
fileSize: number;
|
|
296
303
|
}
|
|
297
304
|
|
|
298
305
|
export const PRODUCTS_V1_PACKAGE_NAME = "products.v1";
|
|
@@ -334,7 +341,12 @@ export interface ProductsServiceClient {
|
|
|
334
341
|
|
|
335
342
|
getAttachmentDownloadInfo(request: GetAttachmentDownloadInfoRequest): Observable<AttachmentDownloadInfoResponse>;
|
|
336
343
|
|
|
337
|
-
|
|
344
|
+
/**
|
|
345
|
+
* Single presigned GET URL for one attachment (after purchase/access check).
|
|
346
|
+
* Bytes never traverse the backend — see upload-service.
|
|
347
|
+
*/
|
|
348
|
+
|
|
349
|
+
getAttachmentDownloadUrl(request: GetAttachmentDownloadUrlRequest): Observable<AttachmentDownloadUrlResponse>;
|
|
338
350
|
|
|
339
351
|
getTopProduct(request: Empty): Observable<ProductResponse>;
|
|
340
352
|
|
|
@@ -403,7 +415,14 @@ export interface ProductsServiceController {
|
|
|
403
415
|
| Observable<AttachmentDownloadInfoResponse>
|
|
404
416
|
| AttachmentDownloadInfoResponse;
|
|
405
417
|
|
|
406
|
-
|
|
418
|
+
/**
|
|
419
|
+
* Single presigned GET URL for one attachment (after purchase/access check).
|
|
420
|
+
* Bytes never traverse the backend — see upload-service.
|
|
421
|
+
*/
|
|
422
|
+
|
|
423
|
+
getAttachmentDownloadUrl(
|
|
424
|
+
request: GetAttachmentDownloadUrlRequest,
|
|
425
|
+
): Promise<AttachmentDownloadUrlResponse> | Observable<AttachmentDownloadUrlResponse> | AttachmentDownloadUrlResponse;
|
|
407
426
|
|
|
408
427
|
getTopProduct(request: Empty): Promise<ProductResponse> | Observable<ProductResponse> | ProductResponse;
|
|
409
428
|
|
|
@@ -433,7 +452,7 @@ export function ProductsServiceControllerMethods() {
|
|
|
433
452
|
"resubmitProduct",
|
|
434
453
|
"getSecureDownloadLinks",
|
|
435
454
|
"getAttachmentDownloadInfo",
|
|
436
|
-
"
|
|
455
|
+
"getAttachmentDownloadUrl",
|
|
437
456
|
"getTopProduct",
|
|
438
457
|
"getPopularProducts",
|
|
439
458
|
];
|
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);
|
|
@@ -35,23 +37,26 @@ service ProductsService {
|
|
|
35
37
|
// Enums
|
|
36
38
|
// =================================================================
|
|
37
39
|
|
|
40
|
+
// Member names match the DB enum string values exactly (enums: String on the
|
|
41
|
+
// wire) so values pass straight through with no mapping. UNSPECIFIED=0 covers
|
|
42
|
+
// null/optional (e.g. nullable moderation_status, missing list filters).
|
|
38
43
|
enum ProductStatus {
|
|
39
44
|
PRODUCT_STATUS_UNSPECIFIED = 0;
|
|
40
|
-
|
|
41
|
-
|
|
45
|
+
ACTIVE = 1;
|
|
46
|
+
DRAFT = 2;
|
|
42
47
|
}
|
|
43
48
|
|
|
44
49
|
enum ModerationStatus {
|
|
45
50
|
MODERATION_STATUS_UNSPECIFIED = 0;
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
51
|
+
PENDING = 1;
|
|
52
|
+
APPROVED = 2;
|
|
53
|
+
REJECTED = 3;
|
|
49
54
|
}
|
|
50
55
|
|
|
51
56
|
enum MediaType {
|
|
52
57
|
MEDIA_TYPE_UNSPECIFIED = 0;
|
|
53
|
-
|
|
54
|
-
|
|
58
|
+
IMAGE = 1;
|
|
59
|
+
VIDEO = 2;
|
|
55
60
|
}
|
|
56
61
|
|
|
57
62
|
// =================================================================
|
|
@@ -315,13 +320,15 @@ message AttachmentDownloadInfoResponse {
|
|
|
315
320
|
string content_type = 3;
|
|
316
321
|
}
|
|
317
322
|
|
|
318
|
-
message
|
|
323
|
+
message GetAttachmentDownloadUrlRequest {
|
|
319
324
|
string product_id = 1;
|
|
320
325
|
string attachment_id = 2;
|
|
321
326
|
string user_id = 3;
|
|
322
327
|
}
|
|
323
328
|
|
|
324
|
-
message
|
|
325
|
-
|
|
326
|
-
|
|
329
|
+
message AttachmentDownloadUrlResponse {
|
|
330
|
+
string download_url = 1;
|
|
331
|
+
int32 expires_in = 2;
|
|
332
|
+
string file_name = 3;
|
|
333
|
+
double file_size = 4;
|
|
327
334
|
}
|