@amaster.ai/auth-client 1.0.0-beta.1 → 1.0.0-beta.2
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/dist/auth.d.cts +1 -1
- package/dist/auth.d.ts +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/oauth.d.cts +1 -1
- package/dist/oauth.d.ts +1 -1
- package/dist/permissions.d.cts +1 -1
- package/dist/permissions.d.ts +1 -1
- package/dist/sessions.d.cts +1 -1
- package/dist/sessions.d.ts +1 -1
- package/dist/{types-4MBObpYA.d.cts → types-DPUhFGU-.d.cts} +24 -6
- package/dist/{types-4MBObpYA.d.ts → types-DPUhFGU-.d.ts} +24 -6
- package/dist/user.d.cts +1 -1
- package/dist/user.d.ts +1 -1
- package/package.json +2 -2
package/dist/auth.d.cts
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* ============================================================================
|
|
15
15
|
*/
|
|
16
16
|
import { HttpClient, ClientResult } from '@amaster.ai/http-client';
|
|
17
|
-
import { s as User, k as RegisterParams, f as LoginResponse, L as LoginParams, d as CodeLoginParams, S as SendCodeParams, r as SuccessResponse, b as CaptchaResponse, h as OAuthProvider, R as RefreshTokenResponse } from './types-
|
|
17
|
+
import { s as User, k as RegisterParams, f as LoginResponse, L as LoginParams, d as CodeLoginParams, S as SendCodeParams, r as SuccessResponse, b as CaptchaResponse, h as OAuthProvider, R as RefreshTokenResponse } from './types-DPUhFGU-.cjs';
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* Authentication Module
|
package/dist/auth.d.ts
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* ============================================================================
|
|
15
15
|
*/
|
|
16
16
|
import { HttpClient, ClientResult } from '@amaster.ai/http-client';
|
|
17
|
-
import { s as User, k as RegisterParams, f as LoginResponse, L as LoginParams, d as CodeLoginParams, S as SendCodeParams, r as SuccessResponse, b as CaptchaResponse, h as OAuthProvider, R as RefreshTokenResponse } from './types-
|
|
17
|
+
import { s as User, k as RegisterParams, f as LoginResponse, L as LoginParams, d as CodeLoginParams, S as SendCodeParams, r as SuccessResponse, b as CaptchaResponse, h as OAuthProvider, R as RefreshTokenResponse } from './types-DPUhFGU-.js';
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* Authentication Module
|
package/dist/index.d.cts
CHANGED
|
@@ -19,8 +19,8 @@ import { createPermissionsModule } from './permissions.cjs';
|
|
|
19
19
|
import { createUserModule } from './user.cjs';
|
|
20
20
|
import { createOAuthModule } from './oauth.cjs';
|
|
21
21
|
import { createSessionsModule } from './sessions.cjs';
|
|
22
|
-
import { A as AuthClientOptions, a as AuthEvent, E as EventHandler } from './types-
|
|
23
|
-
export { B as BatchCheckPermissionsResponse, b as CaptchaResponse, C as ChangePasswordParams, c as CheckPermissionResponse, d as CodeLoginParams, e as CodeLoginType, D as DataScope, L as LoginParams, f as LoginResponse, g as LoginType, O as OAuthBinding, h as OAuthProvider, P as Permission, i as PermissionDetail, j as PermissionScopeResponse, R as RefreshTokenResponse, k as RegisterParams, l as RegisterResponse, m as RevokeAllSessionsResponse, n as Role, o as RoleDetail, S as SendCodeParams, p as SendCodeType, q as Session, r as SuccessResponse, U as UpdateMeParams, s as User } from './types-
|
|
22
|
+
import { A as AuthClientOptions, a as AuthEvent, E as EventHandler } from './types-DPUhFGU-.cjs';
|
|
23
|
+
export { B as BatchCheckPermissionsResponse, b as CaptchaResponse, C as ChangePasswordParams, c as CheckPermissionResponse, d as CodeLoginParams, e as CodeLoginType, D as DataScope, L as LoginParams, f as LoginResponse, g as LoginType, O as OAuthBinding, h as OAuthProvider, P as Permission, i as PermissionDetail, j as PermissionScopeResponse, R as RefreshTokenResponse, k as RegisterParams, l as RegisterResponse, m as RevokeAllSessionsResponse, n as Role, o as RoleDetail, S as SendCodeParams, p as SendCodeType, q as Session, r as SuccessResponse, U as UpdateMeParams, s as User } from './types-DPUhFGU-.cjs';
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
26
|
* Main Authentication Client
|
package/dist/index.d.ts
CHANGED
|
@@ -19,8 +19,8 @@ import { createPermissionsModule } from './permissions.js';
|
|
|
19
19
|
import { createUserModule } from './user.js';
|
|
20
20
|
import { createOAuthModule } from './oauth.js';
|
|
21
21
|
import { createSessionsModule } from './sessions.js';
|
|
22
|
-
import { A as AuthClientOptions, a as AuthEvent, E as EventHandler } from './types-
|
|
23
|
-
export { B as BatchCheckPermissionsResponse, b as CaptchaResponse, C as ChangePasswordParams, c as CheckPermissionResponse, d as CodeLoginParams, e as CodeLoginType, D as DataScope, L as LoginParams, f as LoginResponse, g as LoginType, O as OAuthBinding, h as OAuthProvider, P as Permission, i as PermissionDetail, j as PermissionScopeResponse, R as RefreshTokenResponse, k as RegisterParams, l as RegisterResponse, m as RevokeAllSessionsResponse, n as Role, o as RoleDetail, S as SendCodeParams, p as SendCodeType, q as Session, r as SuccessResponse, U as UpdateMeParams, s as User } from './types-
|
|
22
|
+
import { A as AuthClientOptions, a as AuthEvent, E as EventHandler } from './types-DPUhFGU-.js';
|
|
23
|
+
export { B as BatchCheckPermissionsResponse, b as CaptchaResponse, C as ChangePasswordParams, c as CheckPermissionResponse, d as CodeLoginParams, e as CodeLoginType, D as DataScope, L as LoginParams, f as LoginResponse, g as LoginType, O as OAuthBinding, h as OAuthProvider, P as Permission, i as PermissionDetail, j as PermissionScopeResponse, R as RefreshTokenResponse, k as RegisterParams, l as RegisterResponse, m as RevokeAllSessionsResponse, n as Role, o as RoleDetail, S as SendCodeParams, p as SendCodeType, q as Session, r as SuccessResponse, U as UpdateMeParams, s as User } from './types-DPUhFGU-.js';
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
26
|
* Main Authentication Client
|
package/dist/oauth.d.cts
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* ============================================================================
|
|
15
15
|
*/
|
|
16
16
|
import { HttpClient, ClientResult } from '@amaster.ai/http-client';
|
|
17
|
-
import { O as OAuthBinding, h as OAuthProvider, r as SuccessResponse } from './types-
|
|
17
|
+
import { O as OAuthBinding, h as OAuthProvider, r as SuccessResponse } from './types-DPUhFGU-.cjs';
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* OAuth Module
|
package/dist/oauth.d.ts
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* ============================================================================
|
|
15
15
|
*/
|
|
16
16
|
import { HttpClient, ClientResult } from '@amaster.ai/http-client';
|
|
17
|
-
import { O as OAuthBinding, h as OAuthProvider, r as SuccessResponse } from './types-
|
|
17
|
+
import { O as OAuthBinding, h as OAuthProvider, r as SuccessResponse } from './types-DPUhFGU-.js';
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* OAuth Module
|
package/dist/permissions.d.cts
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* ============================================================================
|
|
15
15
|
*/
|
|
16
16
|
import { HttpClient, ClientResult } from '@amaster.ai/http-client';
|
|
17
|
-
import { s as User, j as PermissionScopeResponse } from './types-
|
|
17
|
+
import { s as User, j as PermissionScopeResponse } from './types-DPUhFGU-.cjs';
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* Permissions Module
|
package/dist/permissions.d.ts
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* ============================================================================
|
|
15
15
|
*/
|
|
16
16
|
import { HttpClient, ClientResult } from '@amaster.ai/http-client';
|
|
17
|
-
import { s as User, j as PermissionScopeResponse } from './types-
|
|
17
|
+
import { s as User, j as PermissionScopeResponse } from './types-DPUhFGU-.js';
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* Permissions Module
|
package/dist/sessions.d.cts
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* ============================================================================
|
|
15
15
|
*/
|
|
16
16
|
import { HttpClient, ClientResult } from '@amaster.ai/http-client';
|
|
17
|
-
import { q as Session, r as SuccessResponse, m as RevokeAllSessionsResponse } from './types-
|
|
17
|
+
import { q as Session, r as SuccessResponse, m as RevokeAllSessionsResponse } from './types-DPUhFGU-.cjs';
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* Sessions Module
|
package/dist/sessions.d.ts
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* ============================================================================
|
|
15
15
|
*/
|
|
16
16
|
import { HttpClient, ClientResult } from '@amaster.ai/http-client';
|
|
17
|
-
import { q as Session, r as SuccessResponse, m as RevokeAllSessionsResponse } from './types-
|
|
17
|
+
import { q as Session, r as SuccessResponse, m as RevokeAllSessionsResponse } from './types-DPUhFGU-.js';
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* Sessions Module
|
|
@@ -256,17 +256,16 @@ type LoginType = "username" | "email" | "phone";
|
|
|
256
256
|
* Login parameters for password-based authentication
|
|
257
257
|
*
|
|
258
258
|
* @example
|
|
259
|
-
* Login with email:
|
|
259
|
+
* Login with email (auto-detect loginType):
|
|
260
260
|
* ```typescript
|
|
261
261
|
* const params: LoginParams = {
|
|
262
|
-
* loginType: "email",
|
|
263
262
|
* email: "user@example.com",
|
|
264
263
|
* password: "Password@123",
|
|
265
264
|
* };
|
|
266
265
|
* ```
|
|
267
266
|
*
|
|
268
267
|
* @example
|
|
269
|
-
* Login with username:
|
|
268
|
+
* Login with username (explicit loginType):
|
|
270
269
|
* ```typescript
|
|
271
270
|
* const params: LoginParams = {
|
|
272
271
|
* loginType: "username",
|
|
@@ -276,8 +275,11 @@ type LoginType = "username" | "email" | "phone";
|
|
|
276
275
|
* ```
|
|
277
276
|
*/
|
|
278
277
|
interface LoginParams {
|
|
279
|
-
/**
|
|
280
|
-
|
|
278
|
+
/**
|
|
279
|
+
* Login method: "username" | "email" | "phone"
|
|
280
|
+
* Optional: Will be auto-detected based on provided fields
|
|
281
|
+
*/
|
|
282
|
+
loginType?: LoginType;
|
|
281
283
|
/** Username (required if loginType="username") */
|
|
282
284
|
username?: string;
|
|
283
285
|
/** Email (required if loginType="email") */
|
|
@@ -288,8 +290,24 @@ interface LoginParams {
|
|
|
288
290
|
password: string;
|
|
289
291
|
}
|
|
290
292
|
type CodeLoginType = "email" | "phone";
|
|
293
|
+
/**
|
|
294
|
+
* Code login parameters
|
|
295
|
+
*
|
|
296
|
+
* @example
|
|
297
|
+
* Login with email code (auto-detect loginType):
|
|
298
|
+
* ```typescript
|
|
299
|
+
* const params: CodeLoginParams = {
|
|
300
|
+
* email: "user@example.com",
|
|
301
|
+
* code: "123456",
|
|
302
|
+
* };
|
|
303
|
+
* ```
|
|
304
|
+
*/
|
|
291
305
|
interface CodeLoginParams {
|
|
292
|
-
|
|
306
|
+
/**
|
|
307
|
+
* Login method: "email" | "phone"
|
|
308
|
+
* Optional: Will be auto-detected based on provided fields
|
|
309
|
+
*/
|
|
310
|
+
loginType?: CodeLoginType;
|
|
293
311
|
email?: string;
|
|
294
312
|
phone?: string;
|
|
295
313
|
code: string;
|
|
@@ -256,17 +256,16 @@ type LoginType = "username" | "email" | "phone";
|
|
|
256
256
|
* Login parameters for password-based authentication
|
|
257
257
|
*
|
|
258
258
|
* @example
|
|
259
|
-
* Login with email:
|
|
259
|
+
* Login with email (auto-detect loginType):
|
|
260
260
|
* ```typescript
|
|
261
261
|
* const params: LoginParams = {
|
|
262
|
-
* loginType: "email",
|
|
263
262
|
* email: "user@example.com",
|
|
264
263
|
* password: "Password@123",
|
|
265
264
|
* };
|
|
266
265
|
* ```
|
|
267
266
|
*
|
|
268
267
|
* @example
|
|
269
|
-
* Login with username:
|
|
268
|
+
* Login with username (explicit loginType):
|
|
270
269
|
* ```typescript
|
|
271
270
|
* const params: LoginParams = {
|
|
272
271
|
* loginType: "username",
|
|
@@ -276,8 +275,11 @@ type LoginType = "username" | "email" | "phone";
|
|
|
276
275
|
* ```
|
|
277
276
|
*/
|
|
278
277
|
interface LoginParams {
|
|
279
|
-
/**
|
|
280
|
-
|
|
278
|
+
/**
|
|
279
|
+
* Login method: "username" | "email" | "phone"
|
|
280
|
+
* Optional: Will be auto-detected based on provided fields
|
|
281
|
+
*/
|
|
282
|
+
loginType?: LoginType;
|
|
281
283
|
/** Username (required if loginType="username") */
|
|
282
284
|
username?: string;
|
|
283
285
|
/** Email (required if loginType="email") */
|
|
@@ -288,8 +290,24 @@ interface LoginParams {
|
|
|
288
290
|
password: string;
|
|
289
291
|
}
|
|
290
292
|
type CodeLoginType = "email" | "phone";
|
|
293
|
+
/**
|
|
294
|
+
* Code login parameters
|
|
295
|
+
*
|
|
296
|
+
* @example
|
|
297
|
+
* Login with email code (auto-detect loginType):
|
|
298
|
+
* ```typescript
|
|
299
|
+
* const params: CodeLoginParams = {
|
|
300
|
+
* email: "user@example.com",
|
|
301
|
+
* code: "123456",
|
|
302
|
+
* };
|
|
303
|
+
* ```
|
|
304
|
+
*/
|
|
291
305
|
interface CodeLoginParams {
|
|
292
|
-
|
|
306
|
+
/**
|
|
307
|
+
* Login method: "email" | "phone"
|
|
308
|
+
* Optional: Will be auto-detected based on provided fields
|
|
309
|
+
*/
|
|
310
|
+
loginType?: CodeLoginType;
|
|
293
311
|
email?: string;
|
|
294
312
|
phone?: string;
|
|
295
313
|
code: string;
|
package/dist/user.d.cts
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* ============================================================================
|
|
15
15
|
*/
|
|
16
16
|
import { HttpClient, ClientResult } from '@amaster.ai/http-client';
|
|
17
|
-
import { s as User, U as UpdateMeParams, C as ChangePasswordParams, r as SuccessResponse } from './types-
|
|
17
|
+
import { s as User, U as UpdateMeParams, C as ChangePasswordParams, r as SuccessResponse } from './types-DPUhFGU-.cjs';
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* User Management Module
|
package/dist/user.d.ts
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* ============================================================================
|
|
15
15
|
*/
|
|
16
16
|
import { HttpClient, ClientResult } from '@amaster.ai/http-client';
|
|
17
|
-
import { s as User, U as UpdateMeParams, C as ChangePasswordParams, r as SuccessResponse } from './types-
|
|
17
|
+
import { s as User, U as UpdateMeParams, C as ChangePasswordParams, r as SuccessResponse } from './types-DPUhFGU-.js';
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* User Management Module
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amaster.ai/auth-client",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.2",
|
|
4
4
|
"description": "Authentication SDK for Amaster platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"registry": "https://registry.npmjs.org/"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@amaster.ai/http-client": "1.0.0-beta.
|
|
50
|
+
"@amaster.ai/http-client": "1.0.0-beta.6"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
53
|
"axios": "^1.11.0"
|