@aepstore-dev/contracts 1.22.0 → 1.24.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
@@ -111,16 +111,33 @@ export interface Product {
111
111
  revenue: string;
112
112
  /** viewer has a COMPLETED purchase of this product */
113
113
  isBuyed: boolean;
114
+ /** viewer has already left a review on this product */
115
+ isReviewed: boolean;
114
116
  /** Popularity (populated by GetTopProduct / GetPopularProducts). */
115
117
  popularityScore: string;
116
118
  }
117
119
 
120
+ /** Compact product shape for "related products" — only the fields a card needs. */
121
+ export interface RelatedProduct {
122
+ id: string;
123
+ name: string;
124
+ /** Decimal as string */
125
+ price: string;
126
+ /** Decimal as string */
127
+ discountPercent: string;
128
+ /** Decimal as string */
129
+ finalPrice: string;
130
+ preview: string;
131
+ user: ProductUser | undefined;
132
+ categories: Category[];
133
+ }
134
+
118
135
  export interface ProductResponse {
119
136
  product:
120
137
  | Product
121
138
  | undefined;
122
139
  /** Populated only by FindOne: up to 2 other approved products by the same author. */
123
- relatedProducts: Product[];
140
+ relatedProducts: RelatedProduct[];
124
141
  }
125
142
 
126
143
  export interface TopProductRequest {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aepstore-dev/contracts",
3
- "version": "1.22.0",
3
+ "version": "1.24.0",
4
4
  "description": "Protobuf definitions for aepstore microservices",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -133,15 +133,28 @@ message Product {
133
133
  bool is_viewed = 27;
134
134
  string revenue = 28; // owner-only, current-month revenue (Decimal as string)
135
135
  bool is_buyed = 30; // viewer has a COMPLETED purchase of this product
136
+ bool is_reviewed = 31; // viewer has already left a review on this product
136
137
 
137
138
  // Popularity (populated by GetTopProduct / GetPopularProducts).
138
139
  string popularity_score = 29; // double as string
139
140
  }
140
141
 
142
+ // Compact product shape for "related products" — only the fields a card needs.
143
+ message RelatedProduct {
144
+ string id = 1;
145
+ string name = 2;
146
+ string price = 3; // Decimal as string
147
+ string discount_percent = 4; // Decimal as string
148
+ string final_price = 5; // Decimal as string
149
+ string preview = 6;
150
+ ProductUser user = 7;
151
+ repeated Category categories = 8;
152
+ }
153
+
141
154
  message ProductResponse {
142
155
  Product product = 1;
143
156
  // Populated only by FindOne: up to 2 other approved products by the same author.
144
- repeated Product related_products = 2;
157
+ repeated RelatedProduct related_products = 2;
145
158
  }
146
159
 
147
160
  message TopProductRequest {