@aepstore-dev/contracts 1.40.0 → 1.42.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.
Files changed (43) hide show
  1. package/dist/gen/activity.d.ts +170 -0
  2. package/dist/gen/activity.js +62 -0
  3. package/dist/gen/auth.d.ts +220 -0
  4. package/dist/gen/auth.js +49 -0
  5. package/dist/gen/mail.d.ts +70 -0
  6. package/dist/gen/mail.js +34 -0
  7. package/dist/gen/payments.d.ts +603 -0
  8. package/dist/gen/payments.js +57 -0
  9. package/dist/gen/products.d.ts +401 -0
  10. package/dist/gen/products.js +80 -0
  11. package/dist/gen/support.d.ts +139 -0
  12. package/dist/gen/support.js +38 -0
  13. package/dist/gen/taxonomy.d.ts +109 -0
  14. package/dist/gen/taxonomy.js +36 -0
  15. package/dist/gen/upload.d.ts +193 -0
  16. package/dist/gen/upload.js +54 -0
  17. package/dist/gen/users.d.ts +639 -0
  18. package/dist/gen/users.js +84 -0
  19. package/package.json +44 -35
  20. package/proto/activity.proto +200 -200
  21. package/proto/auth.proto +189 -183
  22. package/proto/mail.proto +54 -54
  23. package/proto/payments.proto +407 -407
  24. package/proto/products.proto +402 -402
  25. package/proto/support.proto +118 -118
  26. package/proto/taxonomy.proto +105 -105
  27. package/proto/upload.proto +171 -171
  28. package/proto/users.proto +660 -660
  29. package/gen/activity.ts +0 -270
  30. package/gen/auth.ts +0 -309
  31. package/gen/mail.ts +0 -121
  32. package/gen/payments.ts +0 -828
  33. package/gen/products.ts +0 -579
  34. package/gen/support.ts +0 -220
  35. package/gen/taxonomy.ts +0 -185
  36. package/gen/upload.ts +0 -287
  37. package/gen/users.ts +0 -929
  38. /package/dist/{index.d.ts → src/index.d.ts} +0 -0
  39. /package/dist/{index.js → src/index.js} +0 -0
  40. /package/dist/{proto → src/proto}/index.d.ts +0 -0
  41. /package/dist/{proto → src/proto}/index.js +0 -0
  42. /package/dist/{proto → src/proto}/paths.d.ts +0 -0
  43. /package/dist/{proto → src/proto}/paths.js +0 -0
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
+ // versions:
4
+ // protoc-gen-ts_proto v2.10.1
5
+ // protoc v7.35.0
6
+ // source: users.proto
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.USERS_SERVICE_NAME = exports.USERS_V1_PACKAGE_NAME = exports.PremiumPeriod = exports.UserFieldsType = exports.protobufPackage = void 0;
9
+ exports.UsersServiceControllerMethods = UsersServiceControllerMethods;
10
+ /* eslint-disable */
11
+ const microservices_1 = require("@nestjs/microservices");
12
+ exports.protobufPackage = "users.v1";
13
+ var UserFieldsType;
14
+ (function (UserFieldsType) {
15
+ UserFieldsType[UserFieldsType["USER_FIELDS_TYPE_UNSPECIFIED"] = 0] = "USER_FIELDS_TYPE_UNSPECIFIED";
16
+ UserFieldsType[UserFieldsType["USER_FIELDS_TYPE_VIDEOS"] = 1] = "USER_FIELDS_TYPE_VIDEOS";
17
+ UserFieldsType[UserFieldsType["USER_FIELDS_TYPE_PRODUCTS"] = 2] = "USER_FIELDS_TYPE_PRODUCTS";
18
+ UserFieldsType[UserFieldsType["USER_FIELDS_TYPE_SUBSCRIPTIONS"] = 3] = "USER_FIELDS_TYPE_SUBSCRIPTIONS";
19
+ UserFieldsType[UserFieldsType["USER_FIELDS_TYPE_SUBSCRIBERS"] = 4] = "USER_FIELDS_TYPE_SUBSCRIBERS";
20
+ UserFieldsType[UserFieldsType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
21
+ })(UserFieldsType || (exports.UserFieldsType = UserFieldsType = {}));
22
+ /** Periods mirror PremiumPeriod enum in schema.prisma. */
23
+ var PremiumPeriod;
24
+ (function (PremiumPeriod) {
25
+ PremiumPeriod[PremiumPeriod["PREMIUM_PERIOD_UNSPECIFIED"] = 0] = "PREMIUM_PERIOD_UNSPECIFIED";
26
+ PremiumPeriod[PremiumPeriod["PREMIUM_PERIOD_MONTH_1"] = 1] = "PREMIUM_PERIOD_MONTH_1";
27
+ PremiumPeriod[PremiumPeriod["PREMIUM_PERIOD_MONTH_3"] = 2] = "PREMIUM_PERIOD_MONTH_3";
28
+ PremiumPeriod[PremiumPeriod["PREMIUM_PERIOD_MONTH_6"] = 3] = "PREMIUM_PERIOD_MONTH_6";
29
+ PremiumPeriod[PremiumPeriod["PREMIUM_PERIOD_MONTH_12"] = 4] = "PREMIUM_PERIOD_MONTH_12";
30
+ PremiumPeriod[PremiumPeriod["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
31
+ })(PremiumPeriod || (exports.PremiumPeriod = PremiumPeriod = {}));
32
+ exports.USERS_V1_PACKAGE_NAME = "users.v1";
33
+ function UsersServiceControllerMethods() {
34
+ return function (constructor) {
35
+ const grpcMethods = [
36
+ "getPublicProfile",
37
+ "updateProfile",
38
+ "updateUser",
39
+ "updateUserRole",
40
+ "getUsers",
41
+ "getActiveDevices",
42
+ "manageDevices",
43
+ "getUserFields",
44
+ "createSubscription",
45
+ "deleteSubscription",
46
+ "banUser",
47
+ "unbanUser",
48
+ "getMyPremium",
49
+ "setPremiumAutoRenew",
50
+ "activatePremium",
51
+ "isPremiumActive",
52
+ "listAvatarBorders",
53
+ "upsertAvatarBorder",
54
+ "deleteAvatarBorder",
55
+ "updatePrivacy",
56
+ "updateEmailPrefs",
57
+ "updateLocale",
58
+ "softDeleteAccount",
59
+ "restoreAccount",
60
+ "hardDeletePending",
61
+ "blockUser",
62
+ "unblockUser",
63
+ "listBlockedUsers",
64
+ "isBlocked",
65
+ "requestDataExport",
66
+ "listDataExports",
67
+ "pickPendingDataExport",
68
+ "completeDataExport",
69
+ "collectUserExportData",
70
+ "getAccountSettings",
71
+ "changePassword",
72
+ ];
73
+ for (const method of grpcMethods) {
74
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
75
+ (0, microservices_1.GrpcMethod)("UsersService", method)(constructor.prototype[method], method, descriptor);
76
+ }
77
+ const grpcStreamMethods = [];
78
+ for (const method of grpcStreamMethods) {
79
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
80
+ (0, microservices_1.GrpcStreamMethod)("UsersService", method)(constructor.prototype[method], method, descriptor);
81
+ }
82
+ };
83
+ }
84
+ exports.USERS_SERVICE_NAME = "UsersService";
package/package.json CHANGED
@@ -1,35 +1,44 @@
1
- {
2
- "name": "@aepstore-dev/contracts",
3
- "version": "1.40.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
- }
1
+ {
2
+ "name": "@aepstore-dev/contracts",
3
+ "version": "1.42.0",
4
+ "description": "Protobuf definitions for aepstore microservices",
5
+ "main": "./dist/src/index.js",
6
+ "types": "./dist/src/index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/src/index.d.ts",
10
+ "default": "./dist/src/index.js"
11
+ },
12
+ "./gen/*": {
13
+ "types": "./dist/gen/*.d.ts",
14
+ "default": "./dist/gen/*.js"
15
+ }
16
+ },
17
+ "scripts": {
18
+ "generate": "node scripts/generate.cjs",
19
+ "build": "tsc -p tsconfig.build.json"
20
+ },
21
+ "files": [
22
+ "dist",
23
+ "proto"
24
+ ],
25
+ "publishConfig": {
26
+ "access": "public"
27
+ },
28
+ "author": {
29
+ "name": "torroixq",
30
+ "email": "cato.ixq@gmail.com"
31
+ },
32
+ "peerDependencies": {
33
+ "@nestjs/microservices": "^11.1.11",
34
+ "rxjs": "^7.8.2"
35
+ },
36
+ "devDependencies": {
37
+ "@nestjs/microservices": "^11.1.11",
38
+ "@protobuf-ts/protoc": "^2.9.4",
39
+ "@types/node": "^25.0.3",
40
+ "rxjs": "^7.8.2",
41
+ "ts-proto": "^2.10.1",
42
+ "typescript": "^5.9.3"
43
+ }
44
+ }
@@ -1,200 +1,200 @@
1
- syntax = "proto3";
2
-
3
- package activity.v1;
4
-
5
- service ActivityService {
6
- // Reports
7
- rpc ReportCreate(CreateReportRequest) returns (ReportResponse);
8
- rpc ReportList(ListReportsRequest) returns (ReportsListResponse);
9
- rpc ReportGet(ReportIdRequest) returns (ReportResponse);
10
- rpc ReportModerate(ModerateReportRequest) returns (ReportResponse);
11
-
12
- // Report categories
13
- rpc ReportCategoryCreate(CreateReportCategoryRequest) returns (ReportCategoryResponse);
14
- rpc ReportCategoryList(ListReportCategoriesRequest) returns (ReportCategoriesListResponse);
15
- rpc ReportCategoryGet(ReportCategoryIdRequest) returns (ReportCategoryResponse);
16
- rpc ReportCategoryUpdate(UpdateReportCategoryRequest) returns (ReportCategoryResponse);
17
- rpc ReportCategoryDelete(ReportCategoryIdRequest) returns (Ok);
18
-
19
- // Reviews
20
- rpc ReviewCreate(CreateReviewRequest) returns (ReviewResponse);
21
- rpc GetProductReviews(GetProductReviewsRequest) returns (ReviewsListResponse);
22
-
23
- // NOTE: subscriptions live in users-service (CreateSubscription/DeleteSubscription).
24
- // The former activity.ToggleSubscription was a duplicate write path — removed.
25
- }
26
-
27
- // =================================================================
28
- // Enums
29
- // =================================================================
30
-
31
- // Member names match the DB enum string values exactly (enums: String on the
32
- // wire), so DB values pass straight through with no mapping. UNSPECIFIED=0
33
- // represents "no value / not provided" (e.g. an optional list filter).
34
- enum ReportType {
35
- REPORT_TYPE_UNSPECIFIED = 0;
36
- PRODUCT = 1;
37
- PROFILE = 2;
38
- REVIEW = 3;
39
- }
40
-
41
- enum ReportStatus {
42
- REPORT_STATUS_UNSPECIFIED = 0;
43
- PENDING = 1;
44
- IN_PROGRESS = 2;
45
- RESOLVED = 3;
46
- DISMISSED = 4;
47
- }
48
-
49
- // =================================================================
50
- // Reports
51
- // =================================================================
52
-
53
- message Report {
54
- string id = 1;
55
- ReportType type = 2;
56
- string object_id = 3;
57
- string user_id = 4;
58
- string product_id = 5;
59
- repeated ReportCategory categories = 6;
60
- string message = 7;
61
- ReportStatus status = 8;
62
- string created_at = 9;
63
- string updated_at = 10;
64
- }
65
-
66
- message ReportResponse {
67
- Report report = 1;
68
- }
69
-
70
- message CreateReportRequest {
71
- string user_id = 1;
72
- ReportType type = 2;
73
- string object_id = 3;
74
- repeated string categories = 4; // names
75
- string message = 5;
76
- }
77
-
78
- message ListReportsRequest {
79
- ReportType type = 1;
80
- ReportStatus status = 2;
81
- string user_id = 3;
82
- string object_id = 4;
83
- int32 page = 5;
84
- int32 limit = 6;
85
- }
86
-
87
- message ReportsListResponse {
88
- repeated Report items = 1;
89
- int32 total = 2;
90
- int32 page = 3;
91
- int32 limit = 4;
92
- }
93
-
94
- message ReportIdRequest {
95
- string id = 1;
96
- }
97
-
98
- message ModerateReportRequest {
99
- string id = 1;
100
- string action = 2; // 'accept' | 'reject'
101
- }
102
-
103
- // =================================================================
104
- // Report categories
105
- // =================================================================
106
-
107
- message ReportCategory {
108
- string id = 1;
109
- string name = 2;
110
- ReportType type = 3;
111
- string icon = 4;
112
- string description = 5;
113
- }
114
-
115
- message ReportCategoryResponse {
116
- ReportCategory category = 1;
117
- }
118
-
119
- message CreateReportCategoryRequest {
120
- string name = 1;
121
- ReportType type = 2;
122
- string icon = 3;
123
- string description = 4;
124
- }
125
-
126
- message UpdateReportCategoryRequest {
127
- string id = 1;
128
- string name = 2;
129
- string icon = 3;
130
- string description = 4;
131
- }
132
-
133
- message ListReportCategoriesRequest {
134
- ReportType type = 1;
135
- }
136
-
137
- message ReportCategoriesListResponse {
138
- repeated ReportCategory items = 1;
139
- }
140
-
141
- message ReportCategoryIdRequest {
142
- string id = 1;
143
- }
144
-
145
- // =================================================================
146
- // Reviews
147
- // =================================================================
148
-
149
- message ReviewUser {
150
- string id = 1;
151
- string username = 2;
152
- string avatar_url = 3;
153
- }
154
-
155
- message Review {
156
- reserved 4, 8, 9; // retired flat user_id / user_username / user_avatar_url
157
- string id = 1;
158
- int32 rating = 2;
159
- string text = 3;
160
- string product_id = 5;
161
- string created_at = 6;
162
- string updated_at = 7;
163
- ReviewUser user = 10;
164
- }
165
-
166
- message ReviewResponse {
167
- Review review = 1;
168
- }
169
-
170
- message CreateReviewRequest {
171
- string user_id = 1;
172
- string product_id = 2;
173
- int32 rating = 3;
174
- string text = 4;
175
- }
176
-
177
- message GetProductReviewsRequest {
178
- string product_id = 1;
179
- int32 page = 2;
180
- int32 limit = 3;
181
- }
182
-
183
- message ReviewsListResponse {
184
- repeated Review items = 1;
185
- int32 total = 2;
186
- int32 page = 3;
187
- int32 limit = 4;
188
- }
189
-
190
- // =================================================================
191
- // Subscriptions
192
- // =================================================================
193
-
194
- // =================================================================
195
- // Misc
196
- // =================================================================
197
-
198
- message Ok {
199
- bool ok = 1;
200
- }
1
+ syntax = "proto3";
2
+
3
+ package activity.v1;
4
+
5
+ service ActivityService {
6
+ // Reports
7
+ rpc ReportCreate(CreateReportRequest) returns (ReportResponse);
8
+ rpc ReportList(ListReportsRequest) returns (ReportsListResponse);
9
+ rpc ReportGet(ReportIdRequest) returns (ReportResponse);
10
+ rpc ReportModerate(ModerateReportRequest) returns (ReportResponse);
11
+
12
+ // Report categories
13
+ rpc ReportCategoryCreate(CreateReportCategoryRequest) returns (ReportCategoryResponse);
14
+ rpc ReportCategoryList(ListReportCategoriesRequest) returns (ReportCategoriesListResponse);
15
+ rpc ReportCategoryGet(ReportCategoryIdRequest) returns (ReportCategoryResponse);
16
+ rpc ReportCategoryUpdate(UpdateReportCategoryRequest) returns (ReportCategoryResponse);
17
+ rpc ReportCategoryDelete(ReportCategoryIdRequest) returns (Ok);
18
+
19
+ // Reviews
20
+ rpc ReviewCreate(CreateReviewRequest) returns (ReviewResponse);
21
+ rpc GetProductReviews(GetProductReviewsRequest) returns (ReviewsListResponse);
22
+
23
+ // NOTE: subscriptions live in users-service (CreateSubscription/DeleteSubscription).
24
+ // The former activity.ToggleSubscription was a duplicate write path — removed.
25
+ }
26
+
27
+ // =================================================================
28
+ // Enums
29
+ // =================================================================
30
+
31
+ // Member names match the DB enum string values exactly (enums: String on the
32
+ // wire), so DB values pass straight through with no mapping. UNSPECIFIED=0
33
+ // represents "no value / not provided" (e.g. an optional list filter).
34
+ enum ReportType {
35
+ REPORT_TYPE_UNSPECIFIED = 0;
36
+ PRODUCT = 1;
37
+ PROFILE = 2;
38
+ REVIEW = 3;
39
+ }
40
+
41
+ enum ReportStatus {
42
+ REPORT_STATUS_UNSPECIFIED = 0;
43
+ PENDING = 1;
44
+ IN_PROGRESS = 2;
45
+ RESOLVED = 3;
46
+ DISMISSED = 4;
47
+ }
48
+
49
+ // =================================================================
50
+ // Reports
51
+ // =================================================================
52
+
53
+ message Report {
54
+ string id = 1;
55
+ ReportType type = 2;
56
+ string object_id = 3;
57
+ string user_id = 4;
58
+ string product_id = 5;
59
+ repeated ReportCategory categories = 6;
60
+ string message = 7;
61
+ ReportStatus status = 8;
62
+ string created_at = 9;
63
+ string updated_at = 10;
64
+ }
65
+
66
+ message ReportResponse {
67
+ Report report = 1;
68
+ }
69
+
70
+ message CreateReportRequest {
71
+ string user_id = 1;
72
+ ReportType type = 2;
73
+ string object_id = 3;
74
+ repeated string categories = 4; // names
75
+ string message = 5;
76
+ }
77
+
78
+ message ListReportsRequest {
79
+ ReportType type = 1;
80
+ ReportStatus status = 2;
81
+ string user_id = 3;
82
+ string object_id = 4;
83
+ int32 page = 5;
84
+ int32 limit = 6;
85
+ }
86
+
87
+ message ReportsListResponse {
88
+ repeated Report items = 1;
89
+ int32 total = 2;
90
+ int32 page = 3;
91
+ int32 limit = 4;
92
+ }
93
+
94
+ message ReportIdRequest {
95
+ string id = 1;
96
+ }
97
+
98
+ message ModerateReportRequest {
99
+ string id = 1;
100
+ string action = 2; // 'accept' | 'reject'
101
+ }
102
+
103
+ // =================================================================
104
+ // Report categories
105
+ // =================================================================
106
+
107
+ message ReportCategory {
108
+ string id = 1;
109
+ string name = 2;
110
+ ReportType type = 3;
111
+ string icon = 4;
112
+ string description = 5;
113
+ }
114
+
115
+ message ReportCategoryResponse {
116
+ ReportCategory category = 1;
117
+ }
118
+
119
+ message CreateReportCategoryRequest {
120
+ string name = 1;
121
+ ReportType type = 2;
122
+ string icon = 3;
123
+ string description = 4;
124
+ }
125
+
126
+ message UpdateReportCategoryRequest {
127
+ string id = 1;
128
+ string name = 2;
129
+ string icon = 3;
130
+ string description = 4;
131
+ }
132
+
133
+ message ListReportCategoriesRequest {
134
+ ReportType type = 1;
135
+ }
136
+
137
+ message ReportCategoriesListResponse {
138
+ repeated ReportCategory items = 1;
139
+ }
140
+
141
+ message ReportCategoryIdRequest {
142
+ string id = 1;
143
+ }
144
+
145
+ // =================================================================
146
+ // Reviews
147
+ // =================================================================
148
+
149
+ message ReviewUser {
150
+ string id = 1;
151
+ string username = 2;
152
+ string avatar_url = 3;
153
+ }
154
+
155
+ message Review {
156
+ reserved 4, 8, 9; // retired flat user_id / user_username / user_avatar_url
157
+ string id = 1;
158
+ int32 rating = 2;
159
+ string text = 3;
160
+ string product_id = 5;
161
+ string created_at = 6;
162
+ string updated_at = 7;
163
+ ReviewUser user = 10;
164
+ }
165
+
166
+ message ReviewResponse {
167
+ Review review = 1;
168
+ }
169
+
170
+ message CreateReviewRequest {
171
+ string user_id = 1;
172
+ string product_id = 2;
173
+ int32 rating = 3;
174
+ string text = 4;
175
+ }
176
+
177
+ message GetProductReviewsRequest {
178
+ string product_id = 1;
179
+ int32 page = 2;
180
+ int32 limit = 3;
181
+ }
182
+
183
+ message ReviewsListResponse {
184
+ repeated Review items = 1;
185
+ int32 total = 2;
186
+ int32 page = 3;
187
+ int32 limit = 4;
188
+ }
189
+
190
+ // =================================================================
191
+ // Subscriptions
192
+ // =================================================================
193
+
194
+ // =================================================================
195
+ // Misc
196
+ // =================================================================
197
+
198
+ message Ok {
199
+ bool ok = 1;
200
+ }