@aepstore-dev/contracts 1.29.0 → 1.30.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 -4
- package/package.json +35 -35
- package/proto/products.proto +11 -4
package/gen/products.ts
CHANGED
|
@@ -73,6 +73,20 @@ export interface ProductUser {
|
|
|
73
73
|
avatarUrl: string;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
+
/**
|
|
77
|
+
* Moderation block — null on the product while it's a DRAFT / never submitted.
|
|
78
|
+
* status is one of PENDING | APPROVED | REJECTED (never UNSPECIFIED here).
|
|
79
|
+
*/
|
|
80
|
+
export interface ProductModeration {
|
|
81
|
+
status: ModerationStatus;
|
|
82
|
+
/** moderator note (mainly on REJECTED) */
|
|
83
|
+
comment: string;
|
|
84
|
+
/** moderator user id */
|
|
85
|
+
moderatedBy: string;
|
|
86
|
+
/** ISO 8601 */
|
|
87
|
+
moderatedAt: string;
|
|
88
|
+
}
|
|
89
|
+
|
|
76
90
|
export interface Product {
|
|
77
91
|
id: string;
|
|
78
92
|
name: string;
|
|
@@ -86,10 +100,8 @@ export interface Product {
|
|
|
86
100
|
/** double as string for consistency */
|
|
87
101
|
averageRating: string;
|
|
88
102
|
status: ProductStatus;
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
moderatedBy: string;
|
|
92
|
-
moderatedAt: string;
|
|
103
|
+
/** null while DRAFT / not yet submitted */
|
|
104
|
+
moderation: ProductModeration | undefined;
|
|
93
105
|
createdAt: string;
|
|
94
106
|
updatedAt: string;
|
|
95
107
|
preview: string;
|
package/package.json
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@aepstore-dev/contracts",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Protobuf definitions for aepstore microservices",
|
|
5
|
-
"main": "./dist/index.js",
|
|
6
|
-
"types": "./dist/index.d.ts",
|
|
7
|
-
"scripts": {
|
|
8
|
-
"generate": "node scripts/generate.cjs",
|
|
9
|
-
"build": "tsc -p tsconfig.build.json"
|
|
10
|
-
},
|
|
11
|
-
"files": [
|
|
12
|
-
"dist",
|
|
13
|
-
"proto",
|
|
14
|
-
"gen"
|
|
15
|
-
],
|
|
16
|
-
"publishConfig": {
|
|
17
|
-
"access": "public"
|
|
18
|
-
},
|
|
19
|
-
"author": {
|
|
20
|
-
"name": "torroixq",
|
|
21
|
-
"email": "cato.ixq@gmail.com"
|
|
22
|
-
},
|
|
23
|
-
"peerDependencies": {
|
|
24
|
-
"@nestjs/microservices": "^11.1.11",
|
|
25
|
-
"rxjs": "^7.8.2"
|
|
26
|
-
},
|
|
27
|
-
"devDependencies": {
|
|
28
|
-
"@nestjs/microservices": "^11.1.11",
|
|
29
|
-
"@protobuf-ts/protoc": "^2.9.4",
|
|
30
|
-
"@types/node": "^25.0.3",
|
|
31
|
-
"rxjs": "^7.8.2",
|
|
32
|
-
"ts-proto": "^2.10.1",
|
|
33
|
-
"typescript": "^5.9.3"
|
|
34
|
-
}
|
|
35
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@aepstore-dev/contracts",
|
|
3
|
+
"version": "1.30.0",
|
|
4
|
+
"description": "Protobuf definitions for aepstore microservices",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"types": "./dist/index.d.ts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"generate": "node scripts/generate.cjs",
|
|
9
|
+
"build": "tsc -p tsconfig.build.json"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"dist",
|
|
13
|
+
"proto",
|
|
14
|
+
"gen"
|
|
15
|
+
],
|
|
16
|
+
"publishConfig": {
|
|
17
|
+
"access": "public"
|
|
18
|
+
},
|
|
19
|
+
"author": {
|
|
20
|
+
"name": "torroixq",
|
|
21
|
+
"email": "cato.ixq@gmail.com"
|
|
22
|
+
},
|
|
23
|
+
"peerDependencies": {
|
|
24
|
+
"@nestjs/microservices": "^11.1.11",
|
|
25
|
+
"rxjs": "^7.8.2"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@nestjs/microservices": "^11.1.11",
|
|
29
|
+
"@protobuf-ts/protoc": "^2.9.4",
|
|
30
|
+
"@types/node": "^25.0.3",
|
|
31
|
+
"rxjs": "^7.8.2",
|
|
32
|
+
"ts-proto": "^2.10.1",
|
|
33
|
+
"typescript": "^5.9.3"
|
|
34
|
+
}
|
|
35
|
+
}
|
package/proto/products.proto
CHANGED
|
@@ -99,7 +99,17 @@ message ProductUser {
|
|
|
99
99
|
string avatar_url = 3;
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
+
// Moderation block — null on the product while it's a DRAFT / never submitted.
|
|
103
|
+
// status is one of PENDING | APPROVED | REJECTED (never UNSPECIFIED here).
|
|
104
|
+
message ProductModeration {
|
|
105
|
+
ModerationStatus status = 1;
|
|
106
|
+
string comment = 2; // moderator note (mainly on REJECTED)
|
|
107
|
+
string moderated_by = 3; // moderator user id
|
|
108
|
+
string moderated_at = 4; // ISO 8601
|
|
109
|
+
}
|
|
110
|
+
|
|
102
111
|
message Product {
|
|
112
|
+
reserved 9, 10, 11, 12; // retired flat moderation fields → see `moderation`
|
|
103
113
|
string id = 1;
|
|
104
114
|
string name = 2;
|
|
105
115
|
string description = 3;
|
|
@@ -108,10 +118,7 @@ message Product {
|
|
|
108
118
|
string final_price = 6; // Decimal as string
|
|
109
119
|
string average_rating = 7; // double as string for consistency
|
|
110
120
|
ProductStatus status = 8;
|
|
111
|
-
|
|
112
|
-
string moderation_comment = 10;
|
|
113
|
-
string moderated_by = 11;
|
|
114
|
-
string moderated_at = 12;
|
|
121
|
+
ProductModeration moderation = 32; // null while DRAFT / not yet submitted
|
|
115
122
|
string created_at = 13;
|
|
116
123
|
string updated_at = 14;
|
|
117
124
|
string preview = 15;
|