@vuu-ui/vuu-data-types 0.8.93 → 0.8.94
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 +51 -19
- package/package.json +3 -3
package/index.d.ts
CHANGED
|
@@ -15,6 +15,12 @@ import type {
|
|
|
15
15
|
VuuSort,
|
|
16
16
|
VuuTable,
|
|
17
17
|
VuuRpcRequest,
|
|
18
|
+
VuuRpcServiceRequest,
|
|
19
|
+
VuuRpcMenuRequest,
|
|
20
|
+
VuuRpcViewportRequest,
|
|
21
|
+
VuuCreateVisualLink,
|
|
22
|
+
VuuRemoveVisualLink,
|
|
23
|
+
VuuTableList,
|
|
18
24
|
} from "@vuu-ui/vuu-protocol-types";
|
|
19
25
|
import type { DataSourceConfigChanges, IEventEmitter } from "@vuu-ui/vuu-utils";
|
|
20
26
|
import type {
|
|
@@ -32,6 +38,7 @@ import type {
|
|
|
32
38
|
VuuRange,
|
|
33
39
|
} from "@vuu-ui/vuu-protocol-types";
|
|
34
40
|
import { DataValueTypeDescriptor } from "@vuu-ui/vuu-table-types";
|
|
41
|
+
import { PostMessageToClientCallback } from "@vuu-ui/vuu-data-remote";
|
|
35
42
|
|
|
36
43
|
export declare type DataValueValidationSuccessResult = {
|
|
37
44
|
ok: true;
|
|
@@ -211,6 +218,9 @@ export interface DataSourceAggregateMessage
|
|
|
211
218
|
|
|
212
219
|
export type DataUpdateMode = "batch" | "update" | "size-only";
|
|
213
220
|
|
|
221
|
+
export interface DataSourceClearMessage extends MessageWithClientViewportId {
|
|
222
|
+
type: "viewport-clear";
|
|
223
|
+
}
|
|
214
224
|
export interface DataSourceDataMessage extends MessageWithClientViewportId {
|
|
215
225
|
mode: DataUpdateMode;
|
|
216
226
|
rows?: DataSourceRow[];
|
|
@@ -315,6 +325,7 @@ export type DataSourceCallbackMessage =
|
|
|
315
325
|
| DataSourceConfigMessage
|
|
316
326
|
| DataSourceColumnsMessage
|
|
317
327
|
| DataSourceDataMessage
|
|
328
|
+
| DataSourceClearMessage
|
|
318
329
|
| DataSourceDebounceRequest
|
|
319
330
|
| DataSourceDisabledMessage
|
|
320
331
|
| DataSourceEnabledMessage
|
|
@@ -548,7 +559,7 @@ export interface DataSource
|
|
|
548
559
|
* If an suspend is requested and not resumed within 3 seconds, it will automatically be promoted to a disable.,
|
|
549
560
|
*/
|
|
550
561
|
suspend?: () => void;
|
|
551
|
-
resume?: () => void;
|
|
562
|
+
resume?: (callback?: SubscribeCallback) => void;
|
|
552
563
|
|
|
553
564
|
deleteRow?: DataSourceDeleteHandler;
|
|
554
565
|
/**
|
|
@@ -648,21 +659,6 @@ export declare type MenuRpcAction =
|
|
|
648
659
|
| NoAction
|
|
649
660
|
| ShowToastAction;
|
|
650
661
|
|
|
651
|
-
export type ConnectionStatus =
|
|
652
|
-
| "connecting"
|
|
653
|
-
| "connection-open-awaiting-session"
|
|
654
|
-
| "connected"
|
|
655
|
-
| "disconnected"
|
|
656
|
-
| "failed"
|
|
657
|
-
| "reconnected";
|
|
658
|
-
|
|
659
|
-
export interface ConnectionStatusMessage {
|
|
660
|
-
type: "connection-status";
|
|
661
|
-
reason?: string;
|
|
662
|
-
retry?: boolean;
|
|
663
|
-
status: ConnectionStatus;
|
|
664
|
-
}
|
|
665
|
-
|
|
666
662
|
export interface ConnectionQualityMetrics {
|
|
667
663
|
type: "connection-metrics";
|
|
668
664
|
messagesLength: number;
|
|
@@ -773,7 +769,7 @@ export type VuuUIMessageIn =
|
|
|
773
769
|
export type WebSocketProtocol = string | string[] | undefined;
|
|
774
770
|
|
|
775
771
|
export interface VuuUIMessageOutConnect {
|
|
776
|
-
protocol
|
|
772
|
+
protocol?: WebSocketProtocol;
|
|
777
773
|
type: "connect";
|
|
778
774
|
token: string;
|
|
779
775
|
url: string;
|
|
@@ -782,6 +778,10 @@ export interface VuuUIMessageOutConnect {
|
|
|
782
778
|
retryLimitStartup?: number;
|
|
783
779
|
}
|
|
784
780
|
|
|
781
|
+
export interface VuuUIMessageOutDisconnect {
|
|
782
|
+
type: "disconnect";
|
|
783
|
+
}
|
|
784
|
+
|
|
785
785
|
export interface VuuUIMessageOutSubscribe extends ServerProxySubscribeMessage {
|
|
786
786
|
type: "subscribe";
|
|
787
787
|
}
|
|
@@ -900,8 +900,40 @@ export type WithRequestId<T> = T & { requestId: string };
|
|
|
900
900
|
|
|
901
901
|
export type VuuUIMessageOut =
|
|
902
902
|
| VuuUIMessageOutConnect
|
|
903
|
+
| VuuUIMessageOutDisconnect
|
|
903
904
|
| VuuUIMessageOutSubscribe
|
|
904
905
|
| VuuUIMessageOutUnsubscribe
|
|
905
906
|
| VuuUIMessageOutViewport
|
|
906
|
-
| WithRequestId<VuuTableListRequest
|
|
907
|
-
|
|
907
|
+
| WithRequestId<VuuTableListRequest | VuuTableMetaRequest>;
|
|
908
|
+
|
|
909
|
+
export type ConnectOptions = {
|
|
910
|
+
url: string;
|
|
911
|
+
token: string;
|
|
912
|
+
username: string;
|
|
913
|
+
protocol?: WebSocketProtocol;
|
|
914
|
+
/** Max number of reconnect attempts in the event of unsuccessful websocket connection at startup */
|
|
915
|
+
retryLimitStartup?: number;
|
|
916
|
+
/** Max number of reconnect attempts in the event of a disconnected websocket connection */
|
|
917
|
+
retryLimitDisconnect?: number;
|
|
918
|
+
};
|
|
919
|
+
|
|
920
|
+
export interface ServerAPI {
|
|
921
|
+
destroy: (viewportId?: string) => void;
|
|
922
|
+
getTableSchema: (table: VuuTable) => Promise<TableSchema>;
|
|
923
|
+
getTableList: (module?: string) => Promise<VuuTableList>;
|
|
924
|
+
// TODO its not really unknown
|
|
925
|
+
rpcCall: <T = unknown>(
|
|
926
|
+
msg:
|
|
927
|
+
| VuuRpcServiceRequest
|
|
928
|
+
| VuuRpcMenuRequest
|
|
929
|
+
| VuuRpcViewportRequest
|
|
930
|
+
| VuuCreateVisualLink
|
|
931
|
+
| VuuRemoveVisualLink,
|
|
932
|
+
) => Promise<T>;
|
|
933
|
+
send: (message: VuuUIMessageOut) => void;
|
|
934
|
+
subscribe: (
|
|
935
|
+
message: ServerProxySubscribeMessage,
|
|
936
|
+
callback: PostMessageToClientCallback,
|
|
937
|
+
) => void;
|
|
938
|
+
unsubscribe: (viewport: string) => void;
|
|
939
|
+
}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vuu-ui/vuu-data-types",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.94",
|
|
4
4
|
"author": "heswell",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"devDependencies": {
|
|
7
|
-
"@vuu-ui/vuu-filter-types": "0.8.
|
|
8
|
-
"@vuu-ui/vuu-protocol-types": "0.8.
|
|
7
|
+
"@vuu-ui/vuu-filter-types": "0.8.94",
|
|
8
|
+
"@vuu-ui/vuu-protocol-types": "0.8.94"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {},
|
|
11
11
|
"peerDependencies": {},
|