orgnote-api 0.41.21 → 0.41.23

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.
@@ -3,6 +3,7 @@ export declare const SyncProfileSchema: import("valibot").ObjectSchema<{
3
3
  readonly name: import("valibot").StringSchema<undefined>;
4
4
  readonly clientAddress: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, "">;
5
5
  readonly remoteAddress: import("valibot").StringSchema<undefined>;
6
+ readonly wsAddress: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, "">;
6
7
  readonly token: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, "">;
7
8
  readonly rootFolder: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, "">;
8
9
  readonly logPath: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, "/tmp/log/orgnote">;
@@ -15,6 +16,7 @@ export declare const SyncProfileConfigSchema: import("valibot").ObjectSchema<{
15
16
  readonly name: import("valibot").StringSchema<undefined>;
16
17
  readonly clientAddress: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, "">;
17
18
  readonly remoteAddress: import("valibot").StringSchema<undefined>;
19
+ readonly wsAddress: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, "">;
18
20
  readonly token: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, "">;
19
21
  readonly rootFolder: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, "">;
20
22
  readonly logPath: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, "/tmp/log/orgnote">;
@@ -26,6 +28,7 @@ export declare const SyncProfileConfigSchema: import("valibot").ObjectSchema<{
26
28
  readonly name: import("valibot").StringSchema<undefined>;
27
29
  readonly clientAddress: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, "">;
28
30
  readonly remoteAddress: import("valibot").StringSchema<undefined>;
31
+ readonly wsAddress: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, "">;
29
32
  readonly token: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, "">;
30
33
  readonly rootFolder: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, "">;
31
34
  readonly logPath: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, "/tmp/log/orgnote">;
@@ -3,6 +3,7 @@ export const SyncProfileSchema = object({
3
3
  name: string(),
4
4
  clientAddress: optional(string(), ''),
5
5
  remoteAddress: string(),
6
+ wsAddress: optional(string(), ''),
6
7
  token: optional(string(), ''),
7
8
  rootFolder: optional(string(), ''),
8
9
  logPath: optional(string(), '/tmp/log/orgnote'),
@@ -17,6 +17,11 @@ export interface EncryptionInfo {
17
17
  privateKeyProvided?: boolean;
18
18
  passphraseProvided?: boolean;
19
19
  }
20
+ export interface WebSocketInfo {
21
+ url: string;
22
+ isConnected: boolean;
23
+ socketId: string | null;
24
+ }
20
25
  export interface EnvironmentInfo {
21
26
  apiUrl: string;
22
27
  authUrl: string;
@@ -36,6 +41,7 @@ export interface SystemInfo {
36
41
  language: string;
37
42
  screen: ScreenInfo;
38
43
  encryption: EncryptionInfo;
44
+ websocket: WebSocketInfo;
39
45
  environment: EnvironmentInfo;
40
46
  platform: PlatformInfo;
41
47
  device?: DeviceInfo;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orgnote-api",
3
- "version": "0.41.21",
3
+ "version": "0.41.23",
4
4
  "description": "Official API for creating extensions for OrgNote app",
5
5
  "type": "module",
6
6
  "main": "./index.js",
@@ -12,6 +12,7 @@ export declare class WebSocketClient {
12
12
  private handlers;
13
13
  private token;
14
14
  socketId: string | null;
15
+ get isConnected(): boolean;
15
16
  constructor(url: string, logger: Logger, webSocketImpl?: unknown);
16
17
  connect(token: string): void;
17
18
  disconnect(): void;
@@ -7,6 +7,9 @@ export class WebSocketClient {
7
7
  handlers = new Map();
8
8
  token = null;
9
9
  socketId = null;
10
+ get isConnected() {
11
+ return this.socket?.readyState === 1;
12
+ }
10
13
  constructor(url, logger, webSocketImpl) {
11
14
  this.url = url;
12
15
  this.logger = logger;