@aepstore-dev/contracts 1.23.0 → 1.25.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 +16 -1
- package/gen/users.ts +2 -0
- package/package.json +1 -1
- package/proto/products.proto +13 -1
- package/proto/users.proto +1 -0
package/gen/products.ts
CHANGED
|
@@ -117,12 +117,27 @@ export interface Product {
|
|
|
117
117
|
popularityScore: string;
|
|
118
118
|
}
|
|
119
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
|
+
|
|
120
135
|
export interface ProductResponse {
|
|
121
136
|
product:
|
|
122
137
|
| Product
|
|
123
138
|
| undefined;
|
|
124
139
|
/** Populated only by FindOne: up to 2 other approved products by the same author. */
|
|
125
|
-
relatedProducts:
|
|
140
|
+
relatedProducts: RelatedProduct[];
|
|
126
141
|
}
|
|
127
142
|
|
|
128
143
|
export interface TopProductRequest {
|
package/gen/users.ts
CHANGED
|
@@ -151,6 +151,8 @@ export interface PublicProfileResponse {
|
|
|
151
151
|
subscriptions: User[];
|
|
152
152
|
subscribers: User[];
|
|
153
153
|
isOwner: boolean;
|
|
154
|
+
/** viewer is subscribed to this profile (false when anonymous / self) */
|
|
155
|
+
isSubscribed: boolean;
|
|
154
156
|
}
|
|
155
157
|
|
|
156
158
|
export interface UpdateProfileRequest {
|
package/package.json
CHANGED
package/proto/products.proto
CHANGED
|
@@ -139,10 +139,22 @@ message Product {
|
|
|
139
139
|
string popularity_score = 29; // double as string
|
|
140
140
|
}
|
|
141
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
|
+
|
|
142
154
|
message ProductResponse {
|
|
143
155
|
Product product = 1;
|
|
144
156
|
// Populated only by FindOne: up to 2 other approved products by the same author.
|
|
145
|
-
repeated
|
|
157
|
+
repeated RelatedProduct related_products = 2;
|
|
146
158
|
}
|
|
147
159
|
|
|
148
160
|
message TopProductRequest {
|
package/proto/users.proto
CHANGED
|
@@ -148,6 +148,7 @@ message PublicProfileResponse {
|
|
|
148
148
|
repeated User subscriptions = 16;
|
|
149
149
|
repeated User subscribers = 17;
|
|
150
150
|
bool is_owner = 18;
|
|
151
|
+
bool is_subscribed = 19; // viewer is subscribed to this profile (false when anonymous / self)
|
|
151
152
|
}
|
|
152
153
|
|
|
153
154
|
// =================================================================
|