@aepstore-dev/contracts 1.102.0 → 1.104.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
@@ -96,11 +96,8 @@ export interface DeletePasskeyRequest {
96
96
  passkeyId: string;
97
97
  }
98
98
  export interface GeneratePasskeyAuthenticationOptionsRequest {
99
- /**
100
- * Username or email. V1 requires an existing account identifier and does
101
- * not implement passkey-first/account-discovery registration.
102
- */
103
- credentials: string;
99
+ userAgent: string;
100
+ ip: string;
104
101
  }
105
102
  export interface VerifyPasskeyAuthenticationRequest {
106
103
  challengeId: string;
@@ -109,6 +106,78 @@ export interface VerifyPasskeyAuthenticationRequest {
109
106
  userAgent: string;
110
107
  ip: string;
111
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
+ }
112
181
  export interface AuthUser {
113
182
  id: string;
114
183
  username: string;
@@ -259,6 +328,15 @@ export interface AuthServiceClient {
259
328
  deletePasskey(request: DeletePasskeyRequest): Observable<DeletePasskeyResponse>;
260
329
  generatePasskeyAuthenticationOptions(request: GeneratePasskeyAuthenticationOptionsRequest): Observable<PasskeyOptionsResponse>;
261
330
  verifyPasskeyAuthentication(request: VerifyPasskeyAuthenticationRequest): Observable<AuthResult>;
331
+ /**
332
+ * First-party OAuth 2.0 provider. Authorization codes use PKCE S256;
333
+ * access/refresh tokens are opaque, scoped and independently revocable.
334
+ */
335
+ validateOAuthAuthorizationRequest(request: ValidateOAuthAuthorizationRequestInput): Observable<OAuthAuthorizationRequestInfo>;
336
+ createOAuthAuthorizationCode(request: CreateOAuthAuthorizationCodeRequest): Observable<CreateOAuthAuthorizationCodeResponse>;
337
+ exchangeOAuthToken(request: ExchangeOAuthTokenRequest): Observable<OAuthTokenResponse>;
338
+ getOAuthUserInfo(request: OAuthResourceRequest): Observable<OAuthUserInfoResponse>;
339
+ listOAuthProducts(request: OAuthResourceRequest): Observable<OAuthProductsResponse>;
262
340
  /**
263
341
  * Logout — kill refresh tokens. LogoutCurrent kills only the one whose
264
342
  * HMAC matches; LogoutAll wipes every row for the user.
@@ -302,6 +380,15 @@ export interface AuthServiceController {
302
380
  deletePasskey(request: DeletePasskeyRequest): Promise<DeletePasskeyResponse> | Observable<DeletePasskeyResponse> | DeletePasskeyResponse;
303
381
  generatePasskeyAuthenticationOptions(request: GeneratePasskeyAuthenticationOptionsRequest): Promise<PasskeyOptionsResponse> | Observable<PasskeyOptionsResponse> | PasskeyOptionsResponse;
304
382
  verifyPasskeyAuthentication(request: VerifyPasskeyAuthenticationRequest): Promise<AuthResult> | Observable<AuthResult> | AuthResult;
383
+ /**
384
+ * First-party OAuth 2.0 provider. Authorization codes use PKCE S256;
385
+ * access/refresh tokens are opaque, scoped and independently revocable.
386
+ */
387
+ validateOAuthAuthorizationRequest(request: ValidateOAuthAuthorizationRequestInput): Promise<OAuthAuthorizationRequestInfo> | Observable<OAuthAuthorizationRequestInfo> | OAuthAuthorizationRequestInfo;
388
+ createOAuthAuthorizationCode(request: CreateOAuthAuthorizationCodeRequest): Promise<CreateOAuthAuthorizationCodeResponse> | Observable<CreateOAuthAuthorizationCodeResponse> | CreateOAuthAuthorizationCodeResponse;
389
+ exchangeOAuthToken(request: ExchangeOAuthTokenRequest): Promise<OAuthTokenResponse> | Observable<OAuthTokenResponse> | OAuthTokenResponse;
390
+ getOAuthUserInfo(request: OAuthResourceRequest): Promise<OAuthUserInfoResponse> | Observable<OAuthUserInfoResponse> | OAuthUserInfoResponse;
391
+ listOAuthProducts(request: OAuthResourceRequest): Promise<OAuthProductsResponse> | Observable<OAuthProductsResponse> | OAuthProductsResponse;
305
392
  /**
306
393
  * Logout — kill refresh tokens. LogoutCurrent kills only the one whose
307
394
  * HMAC matches; LogoutAll wipes every row for the user.
package/gen/auth.js CHANGED
@@ -37,6 +37,11 @@ function AuthServiceControllerMethods() {
37
37
  "deletePasskey",
38
38
  "generatePasskeyAuthenticationOptions",
39
39
  "verifyPasskeyAuthentication",
40
+ "validateOAuthAuthorizationRequest",
41
+ "createOAuthAuthorizationCode",
42
+ "exchangeOAuthToken",
43
+ "getOAuthUserInfo",
44
+ "listOAuthProducts",
40
45
  "logoutCurrent",
41
46
  "logoutAll",
42
47
  "restoreLogin",
package/gen/auth.ts CHANGED
@@ -120,11 +120,8 @@ export interface DeletePasskeyRequest {
120
120
  }
121
121
 
122
122
  export interface GeneratePasskeyAuthenticationOptionsRequest {
123
- /**
124
- * Username or email. V1 requires an existing account identifier and does
125
- * not implement passkey-first/account-discovery registration.
126
- */
127
- credentials: string;
123
+ userAgent: string;
124
+ ip: string;
128
125
  }
129
126
 
130
127
  export interface VerifyPasskeyAuthenticationRequest {
@@ -135,6 +132,89 @@ export interface VerifyPasskeyAuthenticationRequest {
135
132
  ip: string;
136
133
  }
137
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
+
138
218
  export interface AuthUser {
139
219
  id: string;
140
220
  username: string;
@@ -324,6 +404,25 @@ export interface AuthServiceClient {
324
404
 
325
405
  verifyPasskeyAuthentication(request: VerifyPasskeyAuthenticationRequest): Observable<AuthResult>;
326
406
 
407
+ /**
408
+ * First-party OAuth 2.0 provider. Authorization codes use PKCE S256;
409
+ * access/refresh tokens are opaque, scoped and independently revocable.
410
+ */
411
+
412
+ validateOAuthAuthorizationRequest(
413
+ request: ValidateOAuthAuthorizationRequestInput,
414
+ ): Observable<OAuthAuthorizationRequestInfo>;
415
+
416
+ createOAuthAuthorizationCode(
417
+ request: CreateOAuthAuthorizationCodeRequest,
418
+ ): Observable<CreateOAuthAuthorizationCodeResponse>;
419
+
420
+ exchangeOAuthToken(request: ExchangeOAuthTokenRequest): Observable<OAuthTokenResponse>;
421
+
422
+ getOAuthUserInfo(request: OAuthResourceRequest): Observable<OAuthUserInfoResponse>;
423
+
424
+ listOAuthProducts(request: OAuthResourceRequest): Observable<OAuthProductsResponse>;
425
+
327
426
  /**
328
427
  * Logout — kill refresh tokens. LogoutCurrent kills only the one whose
329
428
  * HMAC matches; LogoutAll wipes every row for the user.
@@ -407,6 +506,34 @@ export interface AuthServiceController {
407
506
  request: VerifyPasskeyAuthenticationRequest,
408
507
  ): Promise<AuthResult> | Observable<AuthResult> | AuthResult;
409
508
 
509
+ /**
510
+ * First-party OAuth 2.0 provider. Authorization codes use PKCE S256;
511
+ * access/refresh tokens are opaque, scoped and independently revocable.
512
+ */
513
+
514
+ validateOAuthAuthorizationRequest(
515
+ request: ValidateOAuthAuthorizationRequestInput,
516
+ ): Promise<OAuthAuthorizationRequestInfo> | Observable<OAuthAuthorizationRequestInfo> | OAuthAuthorizationRequestInfo;
517
+
518
+ createOAuthAuthorizationCode(
519
+ request: CreateOAuthAuthorizationCodeRequest,
520
+ ):
521
+ | Promise<CreateOAuthAuthorizationCodeResponse>
522
+ | Observable<CreateOAuthAuthorizationCodeResponse>
523
+ | CreateOAuthAuthorizationCodeResponse;
524
+
525
+ exchangeOAuthToken(
526
+ request: ExchangeOAuthTokenRequest,
527
+ ): Promise<OAuthTokenResponse> | Observable<OAuthTokenResponse> | OAuthTokenResponse;
528
+
529
+ getOAuthUserInfo(
530
+ request: OAuthResourceRequest,
531
+ ): Promise<OAuthUserInfoResponse> | Observable<OAuthUserInfoResponse> | OAuthUserInfoResponse;
532
+
533
+ listOAuthProducts(
534
+ request: OAuthResourceRequest,
535
+ ): Promise<OAuthProductsResponse> | Observable<OAuthProductsResponse> | OAuthProductsResponse;
536
+
410
537
  /**
411
538
  * Logout — kill refresh tokens. LogoutCurrent kills only the one whose
412
539
  * HMAC matches; LogoutAll wipes every row for the user.
@@ -453,6 +580,11 @@ export function AuthServiceControllerMethods() {
453
580
  "deletePasskey",
454
581
  "generatePasskeyAuthenticationOptions",
455
582
  "verifyPasskeyAuthentication",
583
+ "validateOAuthAuthorizationRequest",
584
+ "createOAuthAuthorizationCode",
585
+ "exchangeOAuthToken",
586
+ "getOAuthUserInfo",
587
+ "listOAuthProducts",
456
588
  "logoutCurrent",
457
589
  "logoutAll",
458
590
  "restoreLogin",
package/package.json CHANGED
@@ -1,35 +1,35 @@
1
- {
2
- "name": "@aepstore-dev/contracts",
3
- "version": "1.102.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.104.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
+ }