@mediaryorg/contracts 2.0.0 → 2.0.1
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.
|
@@ -141,6 +141,13 @@ export interface AdminValidateSessionResponse {
|
|
|
141
141
|
user: AuthUser | undefined;
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
+
export interface ApplyUserIdentitySnapshotRequest {
|
|
145
|
+
user: AuthUser | undefined;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export interface ApplyUserIdentitySnapshotResponse {
|
|
149
|
+
}
|
|
150
|
+
|
|
144
151
|
export const AUTH_V1_PACKAGE_NAME = "auth.v1";
|
|
145
152
|
|
|
146
153
|
export interface AuthServiceClient {
|
|
@@ -169,6 +176,10 @@ export interface AuthServiceClient {
|
|
|
169
176
|
adminLogout(request: AdminLogoutRequest): Observable<AdminLogoutResponse>;
|
|
170
177
|
|
|
171
178
|
adminValidateSession(request: AdminValidateSessionRequest): Observable<AdminValidateSessionResponse>;
|
|
179
|
+
|
|
180
|
+
/** Called by user-service after identity fields change (e.g. email, role) so active sessions stay in sync. */
|
|
181
|
+
|
|
182
|
+
applyUserIdentitySnapshot(request: ApplyUserIdentitySnapshotRequest): Observable<ApplyUserIdentitySnapshotResponse>;
|
|
172
183
|
}
|
|
173
184
|
|
|
174
185
|
export interface AuthServiceController {
|
|
@@ -217,6 +228,15 @@ export interface AuthServiceController {
|
|
|
217
228
|
adminValidateSession(
|
|
218
229
|
request: AdminValidateSessionRequest,
|
|
219
230
|
): Promise<AdminValidateSessionResponse> | Observable<AdminValidateSessionResponse> | AdminValidateSessionResponse;
|
|
231
|
+
|
|
232
|
+
/** Called by user-service after identity fields change (e.g. email, role) so active sessions stay in sync. */
|
|
233
|
+
|
|
234
|
+
applyUserIdentitySnapshot(
|
|
235
|
+
request: ApplyUserIdentitySnapshotRequest,
|
|
236
|
+
):
|
|
237
|
+
| Promise<ApplyUserIdentitySnapshotResponse>
|
|
238
|
+
| Observable<ApplyUserIdentitySnapshotResponse>
|
|
239
|
+
| ApplyUserIdentitySnapshotResponse;
|
|
220
240
|
}
|
|
221
241
|
|
|
222
242
|
export function AuthServiceControllerMethods() {
|
|
@@ -235,6 +255,7 @@ export function AuthServiceControllerMethods() {
|
|
|
235
255
|
"adminLogin",
|
|
236
256
|
"adminLogout",
|
|
237
257
|
"adminValidateSession",
|
|
258
|
+
"applyUserIdentitySnapshot",
|
|
238
259
|
];
|
|
239
260
|
for (const method of grpcMethods) {
|
|
240
261
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
@@ -116,7 +116,7 @@ export interface InitializeDefaultCollectionsResponse {
|
|
|
116
116
|
export const COLLECTION_V1_PACKAGE_NAME = "collection.v1";
|
|
117
117
|
|
|
118
118
|
export interface CollectionServiceClient {
|
|
119
|
-
/** Global catalog of media collections (Movies, Series, Books,
|
|
119
|
+
/** Global catalog of media collections (Movies, Series, Books, Manga, Manhwa, Anime, Games, KDramas). */
|
|
120
120
|
|
|
121
121
|
listCollections(request: ListCollectionsRequest): Observable<ListCollectionsResponse>;
|
|
122
122
|
|
|
@@ -146,7 +146,7 @@ export interface CollectionServiceClient {
|
|
|
146
146
|
}
|
|
147
147
|
|
|
148
148
|
export interface CollectionServiceController {
|
|
149
|
-
/** Global catalog of media collections (Movies, Series, Books,
|
|
149
|
+
/** Global catalog of media collections (Movies, Series, Books, Manga, Manhwa, Anime, Games, KDramas). */
|
|
150
150
|
|
|
151
151
|
listCollections(
|
|
152
152
|
request: ListCollectionsRequest,
|
package/package.json
CHANGED
package/proto/auth/v1/auth.proto
CHANGED
|
@@ -21,6 +21,9 @@ service AuthService {
|
|
|
21
21
|
rpc AdminLogin(AdminLoginRequest) returns (AdminLoginResponse);
|
|
22
22
|
rpc AdminLogout(AdminLogoutRequest) returns (AdminLogoutResponse);
|
|
23
23
|
rpc AdminValidateSession(AdminValidateSessionRequest) returns (AdminValidateSessionResponse);
|
|
24
|
+
|
|
25
|
+
// Called by user-service after identity fields change (e.g. email, role) so active sessions stay in sync.
|
|
26
|
+
rpc ApplyUserIdentitySnapshot(ApplyUserIdentitySnapshotRequest) returns (ApplyUserIdentitySnapshotResponse);
|
|
24
27
|
}
|
|
25
28
|
|
|
26
29
|
// Identity-only view of a user emitted by auth-service.
|
|
@@ -151,3 +154,9 @@ message AdminValidateSessionResponse {
|
|
|
151
154
|
bool valid = 1;
|
|
152
155
|
AuthUser user = 2;
|
|
153
156
|
}
|
|
157
|
+
|
|
158
|
+
message ApplyUserIdentitySnapshotRequest {
|
|
159
|
+
AuthUser user = 1;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
message ApplyUserIdentitySnapshotResponse {}
|
|
@@ -3,7 +3,7 @@ syntax = "proto3";
|
|
|
3
3
|
package collection.v1;
|
|
4
4
|
|
|
5
5
|
service CollectionService {
|
|
6
|
-
// Global catalog of media collections (Movies, Series, Books,
|
|
6
|
+
// Global catalog of media collections (Movies, Series, Books, Manga, Manhwa, Anime, Games, KDramas).
|
|
7
7
|
rpc ListCollections(ListCollectionsRequest) returns (ListCollectionsResponse);
|
|
8
8
|
rpc GetCollectionById(GetCollectionByIdRequest) returns (GetCollectionByIdResponse);
|
|
9
9
|
rpc GetCollectionByName(GetCollectionByNameRequest) returns (GetCollectionByNameResponse);
|