@beaver-im/js-sdk 1.0.1 → 1.1.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/README.md +3 -3
- package/dist/api/localClient.d.ts +1 -1
- package/dist/beaver-sdk.es.js +362 -356
- package/dist/beaver-sdk.umd.js +14 -14
- package/dist/config/index.d.ts +20 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.vue.d.ts +6 -6
- package/dist/types/api/auth.d.ts +21 -1
- package/dist/types/api/localClient.d.ts +20 -0
- package/dist/types/api/oauth.d.ts +21 -1
- package/dist/types/api/qrcode.d.ts +21 -1
- package/dist/view/password-login/index.vue.d.ts +2 -2
- package/dist/view/qrcode-login/index.vue.d.ts +2 -2
- package/package.json +1 -1
package/dist/config/index.d.ts
CHANGED
|
@@ -1,3 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2024-2026 Beaver IM Team
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
* Project: beaver-sdk
|
|
5
|
+
* https://github.com/wsrh8888/beaver-sdk
|
|
6
|
+
*
|
|
7
|
+
* 中文:
|
|
8
|
+
* 本文件为海狸 IM(Beaver IM)开源项目源代码。
|
|
9
|
+
* 版权所有 © 2024-2026 Beaver IM Team,基于 MIT 协议授权。
|
|
10
|
+
* 禁止删除、篡改或替换本文件头部版权与许可声明。
|
|
11
|
+
* 使用与商业授权说明:https://wsrh8888.github.io/beaver-docs/community/license.html
|
|
12
|
+
*
|
|
13
|
+
* English:
|
|
14
|
+
* This file is part of the Beaver IM open-source project.
|
|
15
|
+
* Copyright (c) 2024-2026 Beaver IM Team. Licensed under the MIT License.
|
|
16
|
+
* Do not remove, alter, or replace this copyright and license header.
|
|
17
|
+
* Usage & commercial licensing: https://wsrh8888.github.io/beaver-docs/community/license.html
|
|
18
|
+
*
|
|
19
|
+
* beaver-sdk-header-v1
|
|
20
|
+
*/
|
|
1
21
|
export interface ISdkConfig {
|
|
2
22
|
apiBase: string;
|
|
3
23
|
oauthBase: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2024-2026 Beaver IM Team
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
* Project: beaver-sdk
|
|
5
|
+
* https://github.com/wsrh8888/beaver-sdk
|
|
6
|
+
*
|
|
7
|
+
* 中文:
|
|
8
|
+
* 本文件为海狸 IM(Beaver IM)开源项目源代码。
|
|
9
|
+
* 版权所有 © 2024-2026 Beaver IM Team,基于 MIT 协议授权。
|
|
10
|
+
* 禁止删除、篡改或替换本文件头部版权与许可声明。
|
|
11
|
+
* 使用与商业授权说明:https://wsrh8888.github.io/beaver-docs/community/license.html
|
|
12
|
+
*
|
|
13
|
+
* English:
|
|
14
|
+
* This file is part of the Beaver IM open-source project.
|
|
15
|
+
* Copyright (c) 2024-2026 Beaver IM Team. Licensed under the MIT License.
|
|
16
|
+
* Do not remove, alter, or replace this copyright and license header.
|
|
17
|
+
* Usage & commercial licensing: https://wsrh8888.github.io/beaver-docs/community/license.html
|
|
18
|
+
*
|
|
19
|
+
* beaver-sdk-header-v1
|
|
20
|
+
*/
|
|
1
21
|
declare const version = "1.0.0";
|
|
2
22
|
export declare function register(): void;
|
|
3
23
|
export type { ISdkLoginEvent, ISdkLoginResult } from './types/api/oauth';
|
package/dist/index.vue.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
|
-
|
|
2
|
+
oauthId: {
|
|
3
3
|
type: StringConstructor;
|
|
4
4
|
required: true;
|
|
5
5
|
};
|
|
@@ -20,7 +20,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
20
20
|
toggleLoginMode: () => void;
|
|
21
21
|
handleLoginSuccess: (authCode: string) => void;
|
|
22
22
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "login"[], "login", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
23
|
-
|
|
23
|
+
oauthId: {
|
|
24
24
|
type: StringConstructor;
|
|
25
25
|
required: true;
|
|
26
26
|
};
|
|
@@ -44,7 +44,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
44
44
|
redirectUrl: string;
|
|
45
45
|
}, {}, {
|
|
46
46
|
QrcodeLoginView: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
47
|
-
|
|
47
|
+
oauthId: {
|
|
48
48
|
type: StringConstructor;
|
|
49
49
|
required: true;
|
|
50
50
|
};
|
|
@@ -72,7 +72,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
72
72
|
initQrCode: () => Promise<void>;
|
|
73
73
|
handleLocalLogin: () => void;
|
|
74
74
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "login-success"[], "login-success", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
75
|
-
|
|
75
|
+
oauthId: {
|
|
76
76
|
type: StringConstructor;
|
|
77
77
|
required: true;
|
|
78
78
|
};
|
|
@@ -80,7 +80,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
80
80
|
"onLogin-success"?: ((...args: any[]) => any) | undefined;
|
|
81
81
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
82
82
|
PasswordLoginView: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
83
|
-
|
|
83
|
+
oauthId: {
|
|
84
84
|
type: StringConstructor;
|
|
85
85
|
required: true;
|
|
86
86
|
};
|
|
@@ -96,7 +96,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
96
96
|
eyeIcon: string;
|
|
97
97
|
eyeOffIcon: string;
|
|
98
98
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "login-success"[], "login-success", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
99
|
-
|
|
99
|
+
oauthId: {
|
|
100
100
|
type: StringConstructor;
|
|
101
101
|
required: true;
|
|
102
102
|
};
|
package/dist/types/api/auth.d.ts
CHANGED
|
@@ -1,8 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2024-2026 Beaver IM Team
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
* Project: beaver-sdk
|
|
5
|
+
* https://github.com/wsrh8888/beaver-sdk
|
|
6
|
+
*
|
|
7
|
+
* 中文:
|
|
8
|
+
* 本文件为海狸 IM(Beaver IM)开源项目源代码。
|
|
9
|
+
* 版权所有 © 2024-2026 Beaver IM Team,基于 MIT 协议授权。
|
|
10
|
+
* 禁止删除、篡改或替换本文件头部版权与许可声明。
|
|
11
|
+
* 使用与商业授权说明:https://wsrh8888.github.io/beaver-docs/community/license.html
|
|
12
|
+
*
|
|
13
|
+
* English:
|
|
14
|
+
* This file is part of the Beaver IM open-source project.
|
|
15
|
+
* Copyright (c) 2024-2026 Beaver IM Team. Licensed under the MIT License.
|
|
16
|
+
* Do not remove, alter, or replace this copyright and license header.
|
|
17
|
+
* Usage & commercial licensing: https://wsrh8888.github.io/beaver-docs/community/license.html
|
|
18
|
+
*
|
|
19
|
+
* beaver-sdk-header-v1
|
|
20
|
+
*/
|
|
1
21
|
/**
|
|
2
22
|
* OAuth 认证相关类型
|
|
3
23
|
*/
|
|
4
24
|
export interface IAuthConfig {
|
|
5
|
-
|
|
25
|
+
oauthId: string;
|
|
6
26
|
redirectUri: string;
|
|
7
27
|
apiBase?: string;
|
|
8
28
|
oauthBase?: string;
|
|
@@ -1,3 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2024-2026 Beaver IM Team
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
* Project: beaver-sdk
|
|
5
|
+
* https://github.com/wsrh8888/beaver-sdk
|
|
6
|
+
*
|
|
7
|
+
* 中文:
|
|
8
|
+
* 本文件为海狸 IM(Beaver IM)开源项目源代码。
|
|
9
|
+
* 版权所有 © 2024-2026 Beaver IM Team,基于 MIT 协议授权。
|
|
10
|
+
* 禁止删除、篡改或替换本文件头部版权与许可声明。
|
|
11
|
+
* 使用与商业授权说明:https://wsrh8888.github.io/beaver-docs/community/license.html
|
|
12
|
+
*
|
|
13
|
+
* English:
|
|
14
|
+
* This file is part of the Beaver IM open-source project.
|
|
15
|
+
* Copyright (c) 2024-2026 Beaver IM Team. Licensed under the MIT License.
|
|
16
|
+
* Do not remove, alter, or replace this copyright and license header.
|
|
17
|
+
* Usage & commercial licensing: https://wsrh8888.github.io/beaver-docs/community/license.html
|
|
18
|
+
*
|
|
19
|
+
* beaver-sdk-header-v1
|
|
20
|
+
*/
|
|
1
21
|
/**
|
|
2
22
|
* 本机客户端 API 类型
|
|
3
23
|
*/
|
|
@@ -1,8 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2024-2026 Beaver IM Team
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
* Project: beaver-sdk
|
|
5
|
+
* https://github.com/wsrh8888/beaver-sdk
|
|
6
|
+
*
|
|
7
|
+
* 中文:
|
|
8
|
+
* 本文件为海狸 IM(Beaver IM)开源项目源代码。
|
|
9
|
+
* 版权所有 © 2024-2026 Beaver IM Team,基于 MIT 协议授权。
|
|
10
|
+
* 禁止删除、篡改或替换本文件头部版权与许可声明。
|
|
11
|
+
* 使用与商业授权说明:https://wsrh8888.github.io/beaver-docs/community/license.html
|
|
12
|
+
*
|
|
13
|
+
* English:
|
|
14
|
+
* This file is part of the Beaver IM open-source project.
|
|
15
|
+
* Copyright (c) 2024-2026 Beaver IM Team. Licensed under the MIT License.
|
|
16
|
+
* Do not remove, alter, or replace this copyright and license header.
|
|
17
|
+
* Usage & commercial licensing: https://wsrh8888.github.io/beaver-docs/community/license.html
|
|
18
|
+
*
|
|
19
|
+
* beaver-sdk-header-v1
|
|
20
|
+
*/
|
|
1
21
|
/**
|
|
2
22
|
* OAuth API 请求/响应类型(密码登录)
|
|
3
23
|
*/
|
|
4
24
|
export interface IPasswordLoginReq {
|
|
5
|
-
|
|
25
|
+
oauthId: string;
|
|
6
26
|
account: string;
|
|
7
27
|
password: string;
|
|
8
28
|
}
|
|
@@ -1,8 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2024-2026 Beaver IM Team
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
* Project: beaver-sdk
|
|
5
|
+
* https://github.com/wsrh8888/beaver-sdk
|
|
6
|
+
*
|
|
7
|
+
* 中文:
|
|
8
|
+
* 本文件为海狸 IM(Beaver IM)开源项目源代码。
|
|
9
|
+
* 版权所有 © 2024-2026 Beaver IM Team,基于 MIT 协议授权。
|
|
10
|
+
* 禁止删除、篡改或替换本文件头部版权与许可声明。
|
|
11
|
+
* 使用与商业授权说明:https://wsrh8888.github.io/beaver-docs/community/license.html
|
|
12
|
+
*
|
|
13
|
+
* English:
|
|
14
|
+
* This file is part of the Beaver IM open-source project.
|
|
15
|
+
* Copyright (c) 2024-2026 Beaver IM Team. Licensed under the MIT License.
|
|
16
|
+
* Do not remove, alter, or replace this copyright and license header.
|
|
17
|
+
* Usage & commercial licensing: https://wsrh8888.github.io/beaver-docs/community/license.html
|
|
18
|
+
*
|
|
19
|
+
* beaver-sdk-header-v1
|
|
20
|
+
*/
|
|
1
21
|
/**
|
|
2
22
|
* 扫码登录 API
|
|
3
23
|
*/
|
|
4
24
|
export interface IGenerateQrCodeReq {
|
|
5
|
-
|
|
25
|
+
oauthId: string;
|
|
6
26
|
}
|
|
7
27
|
export interface IGenerateQrCodeRes {
|
|
8
28
|
sceneId: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
|
-
|
|
2
|
+
oauthId: {
|
|
3
3
|
type: StringConstructor;
|
|
4
4
|
required: true;
|
|
5
5
|
};
|
|
@@ -15,7 +15,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
15
15
|
eyeIcon: string;
|
|
16
16
|
eyeOffIcon: string;
|
|
17
17
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "login-success"[], "login-success", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
18
|
-
|
|
18
|
+
oauthId: {
|
|
19
19
|
type: StringConstructor;
|
|
20
20
|
required: true;
|
|
21
21
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
|
-
|
|
2
|
+
oauthId: {
|
|
3
3
|
type: StringConstructor;
|
|
4
4
|
required: true;
|
|
5
5
|
};
|
|
@@ -27,7 +27,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
27
27
|
initQrCode: () => Promise<void>;
|
|
28
28
|
handleLocalLogin: () => void;
|
|
29
29
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "login-success"[], "login-success", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
30
|
-
|
|
30
|
+
oauthId: {
|
|
31
31
|
type: StringConstructor;
|
|
32
32
|
required: true;
|
|
33
33
|
};
|