@mescius/js-collaboration-client 18.2.4 → 19.0.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/dist/index.d.ts CHANGED
@@ -42,6 +42,15 @@ export declare class Client {
42
42
  connect(roomId: string, options?: IConnectOptions): Connection;
43
43
  }
44
44
 
45
+ export type LicenseType = 'evaluation' | 'production' | 'invalid';
46
+
47
+ export interface ILicenseValidationResult {
48
+ type: LicenseType;
49
+ expiredDate?: string;
50
+ message?: string;
51
+ status: number;
52
+ }
53
+
45
54
  export interface IConnectionEvents {
46
55
  connect: () => void;
47
56
  message: (data: MessageData, type: MessageType) => void;
@@ -50,6 +59,7 @@ export interface IConnectionEvents {
50
59
  reconnectAttempts: (attempts: number) => void;
51
60
  reconnect: (attempts: number) => void;
52
61
  reconnectFailed: () => void;
62
+ licenseValidation: (data: ILicenseValidationResult) => void;
53
63
  }
54
64
 
55
65
  /**
@@ -126,10 +136,6 @@ export declare class Connection {
126
136
  * @param {IConnectionEvents[NAME]} f - The event handler function to remove.
127
137
  */
128
138
  off<NAME extends keyof IConnectionEvents>(name: NAME, f: IConnectionEvents[NAME]): void;
129
- /**
130
- * Destroys the observable and cleans up resources.
131
- */
132
- destroy(): void;
133
139
 
134
140
  /**
135
141
  * Sends a message to the server.
@@ -141,4 +147,8 @@ export declare class Connection {
141
147
  * Closes the connection to the server.
142
148
  */
143
149
  close(): void;
150
+ /**
151
+ * Destroys the observable and cleans up resources.
152
+ */
153
+ destroy(): void;
144
154
  }