@beaver-im/js-sdk 1.0.2 → 1.1.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.
@@ -1,6 +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
  export interface ISdkConfig {
2
22
  apiBase: string;
3
23
  oauthBase: string;
24
+ /** 本机海狸 PC 快捷登录服务地址(非网关) */
25
+ localClientBase: string;
4
26
  }
5
27
  export declare const DEFAULT_CONFIG: ISdkConfig;
6
28
  declare class ConfigManager {
@@ -8,6 +30,7 @@ declare class ConfigManager {
8
30
  init(partial?: Partial<ISdkConfig>): void;
9
31
  get apiBase(): string;
10
32
  get oauthBase(): string;
33
+ get localClientBase(): string;
11
34
  }
12
35
  export declare const configManager: ConfigManager;
13
36
  export {};
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';
@@ -1,5 +1,5 @@
1
1
  declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
- appId: {
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
- appId: {
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
- appId: {
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
- appId: {
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
- appId: {
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
- appId: {
99
+ oauthId: {
100
100
  type: StringConstructor;
101
101
  required: true;
102
102
  };
@@ -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
- appId: string;
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
- appId: string;
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
- appId: string;
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
- appId: {
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
- appId: {
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
- appId: {
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
- appId: {
30
+ oauthId: {
31
31
  type: StringConstructor;
32
32
  required: true;
33
33
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@beaver-im/js-sdk",
3
- "version": "1.0.2",
3
+ "version": "1.1.1",
4
4
  "description": "Beaver SDK Web Components 版本",
5
5
  "main": "dist/beaver-sdk.umd.js",
6
6
  "module": "dist/beaver-sdk.es.js",