@rongcloud/electron 5.32.0 → 5.34.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/index.d.ts CHANGED
@@ -43,40 +43,10 @@ declare enum LogL {
43
43
  */
44
44
  declare type EnableLogL = LogL.DEBUG | LogL.INFO | LogL.WARN | LogL.ERROR;
45
45
 
46
- declare class RCMainProxy {
47
- private _rcMain;
48
- constructor(appkey: string, dbpath: string, logOutputLevel: EnableLogL, enableSyncEmptyTopConversation: boolean, disableLogReport: boolean, eventLoopBlockingCheck: boolean);
49
- /**
50
- * @deprecated
51
- */
52
- getCppProto(): {
53
- destroy: () => void;
54
- };
55
- /**
56
- * 退出应用前调用
57
- */
58
- destroy(): void;
59
- /**
60
- * 获取 DeviceId
61
- */
62
- getDeviceId(): string;
63
- /**
64
- * 获取 server Time
65
- */
66
- getServerTime(): number;
67
- /**
68
- * 设置数据库日志配置
69
- * 仅 lib 层内部调用 不对外给开发者
70
- * @hidden
71
- * @param milliseconds 数据库操作最小时间阀值,数据库 sql 操作 >= milliseconds 即打印日志。单位毫秒
72
- */
73
- setDatabaseOperationTimeThreshold(milliseconds: number): void;
74
- }
75
-
76
46
  interface IInitOptions {
77
47
  /**
78
- * 应用标识 appkey
79
- */
48
+ * 应用标识 appkey
49
+ */
80
50
  appkey: string;
81
51
  /**
82
52
  * 指定 C++ 协议栈的数据存储目录,包括消息数据库与日志数据库
@@ -114,6 +84,47 @@ interface IInitOptions {
114
84
  eventLoopBlockingCheck?: boolean;
115
85
  }
116
86
 
117
- declare const _default: (options: IInitOptions) => RCMainProxy;
87
+ /**
88
+ * Electron 主进程中的 SDK 客户端入口类
89
+ */
90
+ declare class RCMainClient {
91
+ #private;
92
+ static init(options: IInitOptions): RCMainClient;
93
+ private _rendererInitOptions;
94
+ private _svr;
95
+ constructor(initOptions: Required<IInitOptions>);
96
+ private _initIpcEventListeners;
97
+ private _senders;
98
+ private _registerRenderers;
99
+ private _send2Renderer;
100
+ private _send2AllRenderer;
101
+ /**
102
+ * @deprecated
103
+ */
104
+ getCppProto(): {
105
+ destroy: () => void;
106
+ };
107
+ /**
108
+ * 退出应用前调用
109
+ */
110
+ destroy(): void;
111
+ /**
112
+ * 获取 DeviceId
113
+ */
114
+ getDeviceId(): string;
115
+ /**
116
+ * 获取 server Time
117
+ */
118
+ getServerTime(): number;
119
+ /**
120
+ * 设置数据库日志配置
121
+ * 仅 lib 层内部调用 不对外给开发者
122
+ * @hidden
123
+ * @param milliseconds 数据库操作最小时间阀值,数据库 sql 操作 >= milliseconds 即打印日志。单位毫秒
124
+ */
125
+ setDatabaseOperationTimeThreshold(milliseconds: number): void;
126
+ }
127
+
128
+ declare const _default: (options: IInitOptions) => RCMainClient;
118
129
 
119
130
  export { _default as default };