@aepstore-dev/contracts 1.103.0 → 1.105.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/auth.d.ts CHANGED
@@ -106,6 +106,99 @@ export interface VerifyPasskeyAuthenticationRequest {
106
106
  userAgent: string;
107
107
  ip: string;
108
108
  }
109
+ export interface CreateOAuthAuthorizationCodeRequest {
110
+ userId: string;
111
+ responseType: string;
112
+ clientId: string;
113
+ redirectUri: string;
114
+ scopes: string[];
115
+ codeChallenge: string;
116
+ codeChallengeMethod: string;
117
+ }
118
+ export interface ValidateOAuthAuthorizationRequestInput {
119
+ responseType: string;
120
+ clientId: string;
121
+ redirectUri: string;
122
+ scopes: string[];
123
+ codeChallenge: string;
124
+ codeChallengeMethod: string;
125
+ }
126
+ export interface OAuthAuthorizationRequestInfo {
127
+ clientId: string;
128
+ clientName: string;
129
+ redirectUri: string;
130
+ scopes: string[];
131
+ }
132
+ export interface CreateOAuthAuthorizationCodeResponse {
133
+ code: string;
134
+ redirectUri: string;
135
+ expiresIn: number;
136
+ }
137
+ export interface ExchangeOAuthTokenRequest {
138
+ grantType: string;
139
+ code: string;
140
+ refreshToken: string;
141
+ clientId: string;
142
+ clientSecret: string;
143
+ redirectUri: string;
144
+ codeVerifier: string;
145
+ }
146
+ export interface OAuthTokenResponse {
147
+ accessToken: string;
148
+ tokenType: string;
149
+ expiresIn: number;
150
+ refreshToken: string;
151
+ scope: string;
152
+ }
153
+ export interface OAuthResourceRequest {
154
+ accessToken: string;
155
+ }
156
+ export interface OAuthPremiumInfo {
157
+ active: boolean;
158
+ expiresAt: string;
159
+ }
160
+ export interface OAuthUserInfoResponse {
161
+ id: string;
162
+ email: string;
163
+ username: string;
164
+ fullName: string;
165
+ avatarUrl: string;
166
+ premium: OAuthPremiumInfo | undefined;
167
+ }
168
+ export interface OAuthProduct {
169
+ id: string;
170
+ name: string;
171
+ description: string;
172
+ preview: string;
173
+ price: string;
174
+ currency: string;
175
+ publicUrl: string;
176
+ moderationStatus: string;
177
+ }
178
+ export interface OAuthProductsResponse {
179
+ items: OAuthProduct[];
180
+ }
181
+ export interface ListOAuthAuthorizationsRequest {
182
+ userId: string;
183
+ }
184
+ export interface OAuthAuthorization {
185
+ clientId: string;
186
+ clientName: string;
187
+ scopes: string[];
188
+ grantedAt: string;
189
+ lastUsedAt: string;
190
+ }
191
+ export interface ListOAuthAuthorizationsResponse {
192
+ items: OAuthAuthorization[];
193
+ }
194
+ export interface RevokeOAuthAuthorizationRequest {
195
+ userId: string;
196
+ clientId: string;
197
+ }
198
+ export interface RevokeOAuthAuthorizationResponse {
199
+ revoked: boolean;
200
+ revokedTokens: number;
201
+ }
109
202
  export interface AuthUser {
110
203
  id: string;
111
204
  username: string;
@@ -256,6 +349,17 @@ export interface AuthServiceClient {
256
349
  deletePasskey(request: DeletePasskeyRequest): Observable<DeletePasskeyResponse>;
257
350
  generatePasskeyAuthenticationOptions(request: GeneratePasskeyAuthenticationOptionsRequest): Observable<PasskeyOptionsResponse>;
258
351
  verifyPasskeyAuthentication(request: VerifyPasskeyAuthenticationRequest): Observable<AuthResult>;
352
+ /**
353
+ * First-party OAuth 2.0 provider. Authorization codes use PKCE S256;
354
+ * access/refresh tokens are opaque, scoped and independently revocable.
355
+ */
356
+ validateOAuthAuthorizationRequest(request: ValidateOAuthAuthorizationRequestInput): Observable<OAuthAuthorizationRequestInfo>;
357
+ createOAuthAuthorizationCode(request: CreateOAuthAuthorizationCodeRequest): Observable<CreateOAuthAuthorizationCodeResponse>;
358
+ exchangeOAuthToken(request: ExchangeOAuthTokenRequest): Observable<OAuthTokenResponse>;
359
+ getOAuthUserInfo(request: OAuthResourceRequest): Observable<OAuthUserInfoResponse>;
360
+ listOAuthProducts(request: OAuthResourceRequest): Observable<OAuthProductsResponse>;
361
+ listOAuthAuthorizations(request: ListOAuthAuthorizationsRequest): Observable<ListOAuthAuthorizationsResponse>;
362
+ revokeOAuthAuthorization(request: RevokeOAuthAuthorizationRequest): Observable<RevokeOAuthAuthorizationResponse>;
259
363
  /**
260
364
  * Logout — kill refresh tokens. LogoutCurrent kills only the one whose
261
365
  * HMAC matches; LogoutAll wipes every row for the user.
@@ -299,6 +403,17 @@ export interface AuthServiceController {
299
403
  deletePasskey(request: DeletePasskeyRequest): Promise<DeletePasskeyResponse> | Observable<DeletePasskeyResponse> | DeletePasskeyResponse;
300
404
  generatePasskeyAuthenticationOptions(request: GeneratePasskeyAuthenticationOptionsRequest): Promise<PasskeyOptionsResponse> | Observable<PasskeyOptionsResponse> | PasskeyOptionsResponse;
301
405
  verifyPasskeyAuthentication(request: VerifyPasskeyAuthenticationRequest): Promise<AuthResult> | Observable<AuthResult> | AuthResult;
406
+ /**
407
+ * First-party OAuth 2.0 provider. Authorization codes use PKCE S256;
408
+ * access/refresh tokens are opaque, scoped and independently revocable.
409
+ */
410
+ validateOAuthAuthorizationRequest(request: ValidateOAuthAuthorizationRequestInput): Promise<OAuthAuthorizationRequestInfo> | Observable<OAuthAuthorizationRequestInfo> | OAuthAuthorizationRequestInfo;
411
+ createOAuthAuthorizationCode(request: CreateOAuthAuthorizationCodeRequest): Promise<CreateOAuthAuthorizationCodeResponse> | Observable<CreateOAuthAuthorizationCodeResponse> | CreateOAuthAuthorizationCodeResponse;
412
+ exchangeOAuthToken(request: ExchangeOAuthTokenRequest): Promise<OAuthTokenResponse> | Observable<OAuthTokenResponse> | OAuthTokenResponse;
413
+ getOAuthUserInfo(request: OAuthResourceRequest): Promise<OAuthUserInfoResponse> | Observable<OAuthUserInfoResponse> | OAuthUserInfoResponse;
414
+ listOAuthProducts(request: OAuthResourceRequest): Promise<OAuthProductsResponse> | Observable<OAuthProductsResponse> | OAuthProductsResponse;
415
+ listOAuthAuthorizations(request: ListOAuthAuthorizationsRequest): Promise<ListOAuthAuthorizationsResponse> | Observable<ListOAuthAuthorizationsResponse> | ListOAuthAuthorizationsResponse;
416
+ revokeOAuthAuthorization(request: RevokeOAuthAuthorizationRequest): Promise<RevokeOAuthAuthorizationResponse> | Observable<RevokeOAuthAuthorizationResponse> | RevokeOAuthAuthorizationResponse;
302
417
  /**
303
418
  * Logout — kill refresh tokens. LogoutCurrent kills only the one whose
304
419
  * HMAC matches; LogoutAll wipes every row for the user.
package/gen/auth.js CHANGED
@@ -37,6 +37,13 @@ function AuthServiceControllerMethods() {
37
37
  "deletePasskey",
38
38
  "generatePasskeyAuthenticationOptions",
39
39
  "verifyPasskeyAuthentication",
40
+ "validateOAuthAuthorizationRequest",
41
+ "createOAuthAuthorizationCode",
42
+ "exchangeOAuthToken",
43
+ "getOAuthUserInfo",
44
+ "listOAuthProducts",
45
+ "listOAuthAuthorizations",
46
+ "revokeOAuthAuthorization",
40
47
  "logoutCurrent",
41
48
  "logoutAll",
42
49
  "restoreLogin",
package/gen/auth.ts CHANGED
@@ -132,6 +132,115 @@ export interface VerifyPasskeyAuthenticationRequest {
132
132
  ip: string;
133
133
  }
134
134
 
135
+ export interface CreateOAuthAuthorizationCodeRequest {
136
+ userId: string;
137
+ responseType: string;
138
+ clientId: string;
139
+ redirectUri: string;
140
+ scopes: string[];
141
+ codeChallenge: string;
142
+ codeChallengeMethod: string;
143
+ }
144
+
145
+ export interface ValidateOAuthAuthorizationRequestInput {
146
+ responseType: string;
147
+ clientId: string;
148
+ redirectUri: string;
149
+ scopes: string[];
150
+ codeChallenge: string;
151
+ codeChallengeMethod: string;
152
+ }
153
+
154
+ export interface OAuthAuthorizationRequestInfo {
155
+ clientId: string;
156
+ clientName: string;
157
+ redirectUri: string;
158
+ scopes: string[];
159
+ }
160
+
161
+ export interface CreateOAuthAuthorizationCodeResponse {
162
+ code: string;
163
+ redirectUri: string;
164
+ expiresIn: number;
165
+ }
166
+
167
+ export interface ExchangeOAuthTokenRequest {
168
+ grantType: string;
169
+ code: string;
170
+ refreshToken: string;
171
+ clientId: string;
172
+ clientSecret: string;
173
+ redirectUri: string;
174
+ codeVerifier: string;
175
+ }
176
+
177
+ export interface OAuthTokenResponse {
178
+ accessToken: string;
179
+ tokenType: string;
180
+ expiresIn: number;
181
+ refreshToken: string;
182
+ scope: string;
183
+ }
184
+
185
+ export interface OAuthResourceRequest {
186
+ accessToken: string;
187
+ }
188
+
189
+ export interface OAuthPremiumInfo {
190
+ active: boolean;
191
+ expiresAt: string;
192
+ }
193
+
194
+ export interface OAuthUserInfoResponse {
195
+ id: string;
196
+ email: string;
197
+ username: string;
198
+ fullName: string;
199
+ avatarUrl: string;
200
+ premium: OAuthPremiumInfo | undefined;
201
+ }
202
+
203
+ export interface OAuthProduct {
204
+ id: string;
205
+ name: string;
206
+ description: string;
207
+ preview: string;
208
+ price: string;
209
+ currency: string;
210
+ publicUrl: string;
211
+ moderationStatus: string;
212
+ }
213
+
214
+ export interface OAuthProductsResponse {
215
+ items: OAuthProduct[];
216
+ }
217
+
218
+ export interface ListOAuthAuthorizationsRequest {
219
+ userId: string;
220
+ }
221
+
222
+ export interface OAuthAuthorization {
223
+ clientId: string;
224
+ clientName: string;
225
+ scopes: string[];
226
+ grantedAt: string;
227
+ lastUsedAt: string;
228
+ }
229
+
230
+ export interface ListOAuthAuthorizationsResponse {
231
+ items: OAuthAuthorization[];
232
+ }
233
+
234
+ export interface RevokeOAuthAuthorizationRequest {
235
+ userId: string;
236
+ clientId: string;
237
+ }
238
+
239
+ export interface RevokeOAuthAuthorizationResponse {
240
+ revoked: boolean;
241
+ revokedTokens: number;
242
+ }
243
+
135
244
  export interface AuthUser {
136
245
  id: string;
137
246
  username: string;
@@ -321,6 +430,29 @@ export interface AuthServiceClient {
321
430
 
322
431
  verifyPasskeyAuthentication(request: VerifyPasskeyAuthenticationRequest): Observable<AuthResult>;
323
432
 
433
+ /**
434
+ * First-party OAuth 2.0 provider. Authorization codes use PKCE S256;
435
+ * access/refresh tokens are opaque, scoped and independently revocable.
436
+ */
437
+
438
+ validateOAuthAuthorizationRequest(
439
+ request: ValidateOAuthAuthorizationRequestInput,
440
+ ): Observable<OAuthAuthorizationRequestInfo>;
441
+
442
+ createOAuthAuthorizationCode(
443
+ request: CreateOAuthAuthorizationCodeRequest,
444
+ ): Observable<CreateOAuthAuthorizationCodeResponse>;
445
+
446
+ exchangeOAuthToken(request: ExchangeOAuthTokenRequest): Observable<OAuthTokenResponse>;
447
+
448
+ getOAuthUserInfo(request: OAuthResourceRequest): Observable<OAuthUserInfoResponse>;
449
+
450
+ listOAuthProducts(request: OAuthResourceRequest): Observable<OAuthProductsResponse>;
451
+
452
+ listOAuthAuthorizations(request: ListOAuthAuthorizationsRequest): Observable<ListOAuthAuthorizationsResponse>;
453
+
454
+ revokeOAuthAuthorization(request: RevokeOAuthAuthorizationRequest): Observable<RevokeOAuthAuthorizationResponse>;
455
+
324
456
  /**
325
457
  * Logout — kill refresh tokens. LogoutCurrent kills only the one whose
326
458
  * HMAC matches; LogoutAll wipes every row for the user.
@@ -404,6 +536,48 @@ export interface AuthServiceController {
404
536
  request: VerifyPasskeyAuthenticationRequest,
405
537
  ): Promise<AuthResult> | Observable<AuthResult> | AuthResult;
406
538
 
539
+ /**
540
+ * First-party OAuth 2.0 provider. Authorization codes use PKCE S256;
541
+ * access/refresh tokens are opaque, scoped and independently revocable.
542
+ */
543
+
544
+ validateOAuthAuthorizationRequest(
545
+ request: ValidateOAuthAuthorizationRequestInput,
546
+ ): Promise<OAuthAuthorizationRequestInfo> | Observable<OAuthAuthorizationRequestInfo> | OAuthAuthorizationRequestInfo;
547
+
548
+ createOAuthAuthorizationCode(
549
+ request: CreateOAuthAuthorizationCodeRequest,
550
+ ):
551
+ | Promise<CreateOAuthAuthorizationCodeResponse>
552
+ | Observable<CreateOAuthAuthorizationCodeResponse>
553
+ | CreateOAuthAuthorizationCodeResponse;
554
+
555
+ exchangeOAuthToken(
556
+ request: ExchangeOAuthTokenRequest,
557
+ ): Promise<OAuthTokenResponse> | Observable<OAuthTokenResponse> | OAuthTokenResponse;
558
+
559
+ getOAuthUserInfo(
560
+ request: OAuthResourceRequest,
561
+ ): Promise<OAuthUserInfoResponse> | Observable<OAuthUserInfoResponse> | OAuthUserInfoResponse;
562
+
563
+ listOAuthProducts(
564
+ request: OAuthResourceRequest,
565
+ ): Promise<OAuthProductsResponse> | Observable<OAuthProductsResponse> | OAuthProductsResponse;
566
+
567
+ listOAuthAuthorizations(
568
+ request: ListOAuthAuthorizationsRequest,
569
+ ):
570
+ | Promise<ListOAuthAuthorizationsResponse>
571
+ | Observable<ListOAuthAuthorizationsResponse>
572
+ | ListOAuthAuthorizationsResponse;
573
+
574
+ revokeOAuthAuthorization(
575
+ request: RevokeOAuthAuthorizationRequest,
576
+ ):
577
+ | Promise<RevokeOAuthAuthorizationResponse>
578
+ | Observable<RevokeOAuthAuthorizationResponse>
579
+ | RevokeOAuthAuthorizationResponse;
580
+
407
581
  /**
408
582
  * Logout — kill refresh tokens. LogoutCurrent kills only the one whose
409
583
  * HMAC matches; LogoutAll wipes every row for the user.
@@ -450,6 +624,13 @@ export function AuthServiceControllerMethods() {
450
624
  "deletePasskey",
451
625
  "generatePasskeyAuthenticationOptions",
452
626
  "verifyPasskeyAuthentication",
627
+ "validateOAuthAuthorizationRequest",
628
+ "createOAuthAuthorizationCode",
629
+ "exchangeOAuthToken",
630
+ "getOAuthUserInfo",
631
+ "listOAuthProducts",
632
+ "listOAuthAuthorizations",
633
+ "revokeOAuthAuthorization",
453
634
  "logoutCurrent",
454
635
  "logoutAll",
455
636
  "restoreLogin",
package/package.json CHANGED
@@ -1,35 +1,35 @@
1
- {
2
- "name": "@aepstore-dev/contracts",
3
- "version": "1.103.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 && tsc -p tsconfig.gen.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.105.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 && tsc -p tsconfig.gen.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
+ }