@aepstore-dev/contracts 1.7.0 → 1.9.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.
@@ -3,6 +3,7 @@ export declare const PROTO_PATHS: {
3
3
  readonly AUTH: string;
4
4
  readonly MAIL: string;
5
5
  readonly PRODUCTS: string;
6
+ readonly SUPPORT: string;
6
7
  readonly TAXONOMY: string;
7
8
  readonly UPLOAD: string;
8
9
  readonly USERS: string;
@@ -12,6 +13,7 @@ export declare const PROTO_PACKAGES: {
12
13
  readonly AUTH: "auth.v1";
13
14
  readonly MAIL: "mail.v1";
14
15
  readonly PRODUCTS: "products.v1";
16
+ readonly SUPPORT: "support.v1";
15
17
  readonly TAXONOMY: "taxonomy.v1";
16
18
  readonly UPLOAD: "upload.v1";
17
19
  readonly USERS: "users.v1";
@@ -8,6 +8,7 @@ exports.PROTO_PATHS = {
8
8
  AUTH: (0, path_1.join)(PROTO_DIR, "auth.proto"),
9
9
  MAIL: (0, path_1.join)(PROTO_DIR, "mail.proto"),
10
10
  PRODUCTS: (0, path_1.join)(PROTO_DIR, "products.proto"),
11
+ SUPPORT: (0, path_1.join)(PROTO_DIR, "support.proto"),
11
12
  TAXONOMY: (0, path_1.join)(PROTO_DIR, "taxonomy.proto"),
12
13
  UPLOAD: (0, path_1.join)(PROTO_DIR, "upload.proto"),
13
14
  USERS: (0, path_1.join)(PROTO_DIR, "users.proto"),
@@ -17,6 +18,7 @@ exports.PROTO_PACKAGES = {
17
18
  AUTH: "auth.v1",
18
19
  MAIL: "mail.v1",
19
20
  PRODUCTS: "products.v1",
21
+ SUPPORT: "support.v1",
20
22
  TAXONOMY: "taxonomy.v1",
21
23
  UPLOAD: "upload.v1",
22
24
  USERS: "users.v1",
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: Product | undefined;
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 {
package/gen/support.ts ADDED
@@ -0,0 +1,59 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.10.1
4
+ // protoc v7.35.0
5
+ // source: support.proto
6
+
7
+ /* eslint-disable */
8
+ import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
9
+ import { Observable } from "rxjs";
10
+
11
+ export const protobufPackage = "support.v1";
12
+
13
+ export interface PingRequest {
14
+ message: string;
15
+ }
16
+
17
+ export interface PingResponse {
18
+ ok: boolean;
19
+ message: string;
20
+ }
21
+
22
+ export const SUPPORT_V1_PACKAGE_NAME = "support.v1";
23
+
24
+ /**
25
+ * Placeholder service. Legacy support-service was an empty stub; this keeps a
26
+ * valid gRPC contract so the service boots and is ready to grow into a tickets
27
+ * API later. Replace Ping with real RPCs when support functionality is built.
28
+ */
29
+
30
+ export interface SupportServiceClient {
31
+ ping(request: PingRequest): Observable<PingResponse>;
32
+ }
33
+
34
+ /**
35
+ * Placeholder service. Legacy support-service was an empty stub; this keeps a
36
+ * valid gRPC contract so the service boots and is ready to grow into a tickets
37
+ * API later. Replace Ping with real RPCs when support functionality is built.
38
+ */
39
+
40
+ export interface SupportServiceController {
41
+ ping(request: PingRequest): Promise<PingResponse> | Observable<PingResponse> | PingResponse;
42
+ }
43
+
44
+ export function SupportServiceControllerMethods() {
45
+ return function (constructor: Function) {
46
+ const grpcMethods: string[] = ["ping"];
47
+ for (const method of grpcMethods) {
48
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
49
+ GrpcMethod("SupportService", method)(constructor.prototype[method], method, descriptor);
50
+ }
51
+ const grpcStreamMethods: string[] = [];
52
+ for (const method of grpcStreamMethods) {
53
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
54
+ GrpcStreamMethod("SupportService", method)(constructor.prototype[method], method, descriptor);
55
+ }
56
+ };
57
+ }
58
+
59
+ export const SUPPORT_SERVICE_NAME = "SupportService";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aepstore-dev/contracts",
3
- "version": "1.7.0",
3
+ "version": "1.9.0",
4
4
  "description": "Protobuf definitions for aepstore microservices",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -121,10 +121,26 @@ message Product {
121
121
  repeated Category categories = 19;
122
122
  repeated Application applications = 20;
123
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
124
138
  }
125
139
 
126
140
  message ProductResponse {
127
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;
128
144
  }
129
145
 
130
146
  message ProductsListResponse {
@@ -0,0 +1,19 @@
1
+ syntax = "proto3";
2
+
3
+ package support.v1;
4
+
5
+ // Placeholder service. Legacy support-service was an empty stub; this keeps a
6
+ // valid gRPC contract so the service boots and is ready to grow into a tickets
7
+ // API later. Replace Ping with real RPCs when support functionality is built.
8
+ service SupportService {
9
+ rpc Ping(PingRequest) returns (PingResponse);
10
+ }
11
+
12
+ message PingRequest {
13
+ string message = 1;
14
+ }
15
+
16
+ message PingResponse {
17
+ bool ok = 1;
18
+ string message = 2;
19
+ }