@aepstore-dev/contracts 1.7.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 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aepstore-dev/contracts",
3
- "version": "1.7.0",
3
+ "version": "1.8.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 {