@vuu-ui/vuu-protocol-types 0.5.4 → 0.5.6

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.
Files changed (3) hide show
  1. package/README.md +3 -0
  2. package/package.json +4 -5
  3. package/index.d.ts +0 -408
package/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # vuu-protocol-types
2
+
3
+ This package provides TypeScript types which describe all the websocket messages passed between client and server in a [VUU](https://https://vuu.finos.org/docs/introduction/intro/) application.
package/package.json CHANGED
@@ -1,15 +1,14 @@
1
1
  {
2
2
  "name": "@vuu-ui/vuu-protocol-types",
3
- "version": "0.5.4",
4
- "scripts": {
5
- "build": "node ../../scripts/run-build.mjs"
6
- },
3
+ "version": "0.5.6",
7
4
  "author": "heswell",
8
5
  "license": "Apache-2.0",
9
6
  "dependencies": {},
10
7
  "peerDependencies": {},
11
8
  "files": [
12
- "index.d.ts"
9
+ "cjs",
10
+ "index.d.ts",
11
+ "README.md"
13
12
  ],
14
13
  "types": "index.d.ts"
15
14
  }
package/index.d.ts DELETED
@@ -1,408 +0,0 @@
1
- export declare type VuuColumnDataType =
2
- | "int"
3
- | "long"
4
- | "double"
5
- | "string"
6
- | "char";
7
- export declare type VuuMenuContext = "cell" | "row" | "grid" | "selected-rows";
8
- export interface VuuMenuItem {
9
- context: VuuMenuContext;
10
- filter: string;
11
- name: string;
12
- rpcName: string;
13
- }
14
- export declare type VuuTable = {
15
- table: string;
16
- module: string;
17
- };
18
- export declare type VuuRange = {
19
- from: number;
20
- to: number;
21
- };
22
- export declare type VuuSortCol = {
23
- column: string;
24
- sortType: "A" | "D";
25
- };
26
- export declare type VuuSort = {
27
- sortDefs: VuuSortCol[];
28
- };
29
- export declare type VuuFilter = {
30
- filter: string;
31
- };
32
- export interface VuuMenu {
33
- name: string;
34
- menus: VuuMenuItem[];
35
- }
36
-
37
- export type VuuRowDataItemType = string | number | boolean;
38
-
39
- export type VuuDataRow = [number, number, ...data: VuuRowDataItemType[]];
40
-
41
- export declare type VuuRow = {
42
- data: VuuDataRow;
43
- rowIndex: number;
44
- rowKey: string;
45
- sel: 0 | 1;
46
- ts: number;
47
- updateType: "U" | "D" | "SIZE";
48
- viewPortId: string;
49
- vpSize: number;
50
- vpVersion: string;
51
- };
52
- export declare type AggTypeSum = 1;
53
- export declare type AggTypeAverage = 2;
54
- export declare type AggTypeCount = 3;
55
- export declare type AggTypeHigh = 4;
56
- export declare type AggTypeLow = 5;
57
- export declare type AggType =
58
- | AggTypeSum
59
- | AggTypeAverage
60
- | AggTypeCount
61
- | AggTypeHigh
62
- | AggTypeLow;
63
- export declare type VuuAggregation = {
64
- column: string;
65
- aggType: AggType;
66
- };
67
- export declare type VuuLink = {
68
- parentVpId: string;
69
- link: {
70
- fromColumn: string;
71
- toTable: string;
72
- toColumn: string;
73
- };
74
- };
75
- export declare type VuuColumns = string[];
76
- export declare type VuuGroupBy = string[];
77
- export interface ServerToClientHeartBeat {
78
- type: "HB";
79
- ts: number;
80
- }
81
- export interface ServerToClientLoginSuccess {
82
- type: "LOGIN_SUCCESS";
83
- token: string;
84
- }
85
- export interface ServerToClientTableList {
86
- type: "TABLE_LIST_RESP";
87
- tables: VuuTable[];
88
- }
89
-
90
- export type VuuTableList = Pick<ServerToClientTableList, "tables">;
91
-
92
- export interface ServerToClientTableMeta {
93
- columns: VuuColumns;
94
- dataTypes: VuuColumnDataType[];
95
- type: "TABLE_META_RESP";
96
- table: VuuTable;
97
- }
98
-
99
- export type VuuTableMeta = Pick<
100
- ServerToClientTableMeta,
101
- "columns" | "dataTypes" | "table"
102
- >;
103
-
104
- export interface ServerToClientMenus {
105
- type: "VIEW_PORT_MENUS_RESP";
106
- menu: VuuMenu;
107
- vpId: string;
108
- }
109
- export interface ServerToClientMenu {
110
- rpcName: "ADD_ROWS_TO_ORDERS";
111
- type: "VIEW_PORT_MENU_RESP";
112
- action: {
113
- table: VuuTable;
114
- type: "OPEN_DIALOG_ACTION";
115
- };
116
- vpId: string;
117
- }
118
- export interface ServerToClientViewPortVisualLinks {
119
- type: "VP_VISUAL_LINKS_RESP";
120
- links: VuuLink[];
121
- vpId: string;
122
- }
123
- export interface ServerToClientCreateViewPortSuccess {
124
- aggregations: VuuAggregation[];
125
- columns: VuuColumns;
126
- filterSpec: VuuFilter;
127
- groupBy: VuuGroupBy;
128
- range: VuuRange;
129
- sort: VuuSort;
130
- type: "CREATE_VP_SUCCESS";
131
- table: string;
132
- viewPortId: string;
133
- }
134
- export interface ServerToClientChangeViewPortSuccess {
135
- type: "CHANGE_VP_SUCCESS";
136
- viewPortId: string;
137
- }
138
- export interface ServerToClientChangeViewPortRangeSuccess {
139
- type: "CHANGE_VP_RANGE_SUCCESS";
140
- viewPortId: string;
141
- from: number;
142
- to: number;
143
- }
144
- export interface ServerToClientDisableViewPortSuccess {
145
- type: "DISABLE_VP_SUCCESS";
146
- viewPortId: string;
147
- }
148
- export interface ServerToClientEnableViewPortSuccess {
149
- type: "ENABLE_VP_SUCCESS";
150
- viewPortId: string;
151
- }
152
- export interface ServerToClientRemoveViewPortSuccess {
153
- type: "REMOVE_VP_SUCCESS";
154
- viewPortId: string;
155
- }
156
- export interface ServerToClientSelectSuccess {
157
- type: "SET_SELECTION_SUCCESS";
158
- vpId: string;
159
- }
160
- export interface ServerToClientRPC {
161
- type: "RPC_RESP";
162
- method: string;
163
- result: any;
164
- }
165
- export interface ServerToClientOpenTreeNodeSuccess {
166
- type: "OPEN_TREE_SUCCESS";
167
- }
168
- export interface ServerToClientCloseTreeNodeSuccess {
169
- type: "CLOSE_TREE_SUCCESS";
170
- }
171
- export interface ServerToClientError {
172
- msg: string;
173
- type: "ERROR";
174
- }
175
- export interface ServerToClientCreateLinkSuccess {
176
- childVpId: string;
177
- childColumnName: string;
178
- parentVpId: string;
179
- parentColumnName: string;
180
- type: "CREATE_VISUAL_LINK_SUCCESS";
181
- }
182
- export interface ServerToClientRemoveLinkSuccess {
183
- childVpId: string;
184
- type: "REMOVE_VISUAL_LINK_SUCCESS";
185
- }
186
- export interface ServerToClientTableRows {
187
- batch: string;
188
- isLast: boolean;
189
- rows: VuuRow[];
190
- timeStamp: number;
191
- type: "TABLE_ROW";
192
- }
193
- export declare type ServerToClientBody =
194
- | ServerToClientHeartBeat
195
- | ServerToClientLoginSuccess
196
- | ServerToClientCreateViewPortSuccess
197
- | ServerToClientChangeViewPortSuccess
198
- | ServerToClientChangeViewPortRangeSuccess
199
- | ServerToClientDisableViewPortSuccess
200
- | ServerToClientEnableViewPortSuccess
201
- | ServerToClientRemoveViewPortSuccess
202
- | ServerToClientSelectSuccess
203
- | ServerToClientTableMeta
204
- | ServerToClientTableList
205
- | ServerToClientTableRows
206
- | ServerToClientMenus
207
- | ServerToClientMenu
208
- | ServerToClientRPC
209
- | ServerToClientViewPortVisualLinks
210
- | ServerToClientOpenTreeNodeSuccess
211
- | ServerToClientCloseTreeNodeSuccess
212
- | ServerToClientCreateLinkSuccess
213
- | ServerToClientRemoveLinkSuccess
214
- | ServerToClientError;
215
- export interface ServerToClientMessage<
216
- TBody extends ServerToClientBody = ServerToClientBody
217
- > {
218
- body: TBody;
219
- module: string;
220
- requestId: string;
221
- sessionId?: string;
222
- token: string;
223
- user: string;
224
- }
225
- export interface ClientToServerAuth {
226
- type: "AUTH";
227
- username: string;
228
- password: string;
229
- }
230
- export interface ClientToServerLogin {
231
- token: string;
232
- type: "LOGIN";
233
- user: string;
234
- }
235
- export interface ClientToServerHeartBeat {
236
- type: "HB_RESP";
237
- ts: number;
238
- }
239
- export interface ClientToServerDisable {
240
- type: "DISABLE_VP";
241
- viewPortId: string;
242
- }
243
- export interface ClientToServerEnable {
244
- type: "ENABLE_VP";
245
- viewPortId: string;
246
- }
247
- export interface ClientToServerTableList {
248
- type: "GET_TABLE_LIST";
249
- }
250
- export interface ClientToServerTableMeta {
251
- type: "GET_TABLE_META";
252
- table: VuuTable;
253
- }
254
- export interface ClientToServerCreateViewPort {
255
- columns: VuuColumns;
256
- filterSpec: VuuFilter;
257
- groupBy: string[];
258
- type: "CREATE_VP";
259
- range: VuuRange;
260
- sort: VuuSort;
261
- table: VuuTable;
262
- }
263
- export interface ClientToServerChangeViewPort {
264
- aggregations: any[];
265
- columns: VuuColumns;
266
- filterSpec: VuuFilter;
267
- groupBy: string[];
268
- sort: VuuSort;
269
- type: "CHANGE_VP";
270
- viewPortId: string;
271
- }
272
- export interface ClientToServerRemoveViewPort {
273
- type: "REMOVE_VP";
274
- viewPortId: string;
275
- }
276
- export interface ClientToServerSelection {
277
- type: "SET_SELECTION";
278
- selection: number[];
279
- vpId: string;
280
- }
281
- export interface ClientToServerViewPortRange {
282
- from: number;
283
- to: number;
284
- type: "CHANGE_VP_RANGE";
285
- viewPortId: string;
286
- }
287
- export interface ClientToServerVisualLinks {
288
- type: "GET_VP_VISUAL_LINKS";
289
- vpId: string;
290
- }
291
- export interface ClientToServerMenus {
292
- type: "GET_VIEW_PORT_MENUS";
293
- vpId: string;
294
- }
295
- export interface ClientToServerOpenTreeNode {
296
- type: "OPEN_TREE_NODE";
297
- vpId: string;
298
- treeKey: string;
299
- }
300
- export interface ClientToServerCloseTreeNode {
301
- type: "CLOSE_TREE_NODE";
302
- vpId: string;
303
- treeKey: string;
304
- }
305
- export interface ClientToServerCreateLink {
306
- childVpId: string;
307
- parentColumnName: string;
308
- parentVpId: string;
309
- type: "CREATE_VISUAL_LINK";
310
- }
311
- export interface ClientToServerRemoveLink {
312
- childVpId: string;
313
- type: "REMOVE_VISUAL_LINK";
314
- }
315
-
316
- export declare type RpcService = "TypeAheadRpcHandler";
317
-
318
- export declare type TypeaheadParams =
319
- | [VuuTable, string]
320
- | [VuuTable, string, string];
321
-
322
- export declare type TypeAheadMethod =
323
- | "getUniqueFieldValues"
324
- | "getUniqueFieldValuesStartingWith";
325
- export declare type RpcMethod = TypeAheadMethod | "addRowsFromInstruments";
326
- export interface ClientToServerGetUniqueValues {
327
- type: "RPC_CALL";
328
- method: "getUniqueFieldValues";
329
- service: "TypeAheadRpcHandler";
330
- params: [VuuTable, string];
331
- }
332
- export interface ClientToServerGetUniqueValuesStartingWith {
333
- type: "RPC_CALL";
334
- method: "getUniqueFieldValuesStartingWith";
335
- service: "TypeAheadRpcHandler";
336
- params: [VuuTable, string, string];
337
- }
338
- // add remaining Rpc calls here
339
-
340
- export declare type ClientToServerRpcCall =
341
- | ClientToServerGetUniqueValues
342
- | ClientToServerGetUniqueValuesStartingWith;
343
-
344
- export interface ClientToServerMenuSelectRPC {
345
- type: "VIEW_PORT_MENUS_SELECT_RPC";
346
- rpcName: string;
347
- vpId: string;
348
- }
349
- export interface ClientToServerMenuTableRPC {
350
- type: "VIEW_PORT_MENU_TABLE_RPC";
351
- rpcName: string;
352
- vpId: string;
353
- }
354
- export interface ClientToServerMenuRowRPC {
355
- type: "VIEW_PORT_MENU_ROW_RPC";
356
- rpcName: string;
357
- vpId: string;
358
- }
359
- export interface ClientToServerMenuCellRPC {
360
- type: "VIEW_PORT_MENU_CELL_RPC";
361
- rpcName: string;
362
- vpId: string;
363
- }
364
-
365
- export type ClientToServerMenuRPCType =
366
- | "VIEW_PORT_MENUS_SELECT_RPC"
367
- | "VIEW_PORT_MENU_TABLE_RPC"
368
- | "VIEW_PORT_MENU_ROW_RPC"
369
- | "VIEW_PORT_MENU_CELL_RPC";
370
-
371
- export type ClientToServerMenuRPC =
372
- | ClientToServerMenuSelectRPC
373
- | ClientToServerMenuTableRPC
374
- | ClientToServerMenuRowRPC
375
- | ClientToServerMenuCellRPC;
376
-
377
- export declare type VuuRpcMessagesOut = ClientToServerMenuSelectRPC;
378
- export declare type ClientToServerBody =
379
- | ClientToServerAuth
380
- | ClientToServerLogin
381
- | ClientToServerHeartBeat
382
- | ClientToServerDisable
383
- | ClientToServerEnable
384
- | ClientToServerTableList
385
- | ClientToServerTableMeta
386
- | ClientToServerCreateViewPort
387
- | ClientToServerChangeViewPort
388
- | ClientToServerRemoveViewPort
389
- | ClientToServerSelection
390
- | ClientToServerViewPortRange
391
- | ClientToServerVisualLinks
392
- | ClientToServerMenus
393
- | ClientToServerOpenTreeNode
394
- | ClientToServerCloseTreeNode
395
- | ClientToServerCreateLink
396
- | ClientToServerRemoveLink
397
- | ClientToServerMenuRPC
398
- | ClientToServerRpcCall;
399
- export interface ClientToServerMessage<
400
- TBody extends ClientToServerBody = ClientToServerBody
401
- > {
402
- body: TBody;
403
- module: string;
404
- requestId: string;
405
- sessionId: string;
406
- token: string;
407
- user: string;
408
- }