@vuu-ui/vuu-protocol-types 0.8.20-debug → 0.8.21-debug

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 (2) hide show
  1. package/package.json +1 -1
  2. package/index.d.ts +0 -542
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vuu-ui/vuu-protocol-types",
3
- "version": "0.8.20-debug",
3
+ "version": "0.8.21-debug",
4
4
  "author": "heswell",
5
5
  "license": "Apache-2.0",
6
6
  "dependencies": {},
package/index.d.ts DELETED
@@ -1,542 +0,0 @@
1
- // prettier-ignore
2
- export declare type VuuColumnDataType = "int" | "long" | "double" | "string" | "char" | "boolean";
3
- export declare type VuuMenuContext = "cell" | "row" | "grid" | "selected-rows";
4
- export declare type VuuTable = {
5
- table: string;
6
- module: string;
7
- };
8
- export declare type VuuRange = {
9
- from: number;
10
- to: number;
11
- };
12
-
13
- export declare type VuuSortType = "A" | "D";
14
-
15
- export declare type VuuSortCol = {
16
- column: string;
17
- sortType: VuuSortType;
18
- };
19
- export declare type VuuSort = {
20
- sortDefs: VuuSortCol[];
21
- };
22
- export declare type VuuFilter = {
23
- filter: string;
24
- };
25
- export interface VuuMenuItem {
26
- context: VuuMenuContext;
27
- filter: string;
28
- name: string;
29
- rpcName: string;
30
- }
31
-
32
- export interface VuuMenu {
33
- name: string;
34
- menus: (VuuMenuItem | VuuMenu)[];
35
- }
36
-
37
- export type VuuRowDataItemType = string | number | boolean;
38
-
39
- export type VuuDataRow = 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 AggTypeDistinct = 6;
58
- export declare type VuuAggType =
59
- | AggTypeSum
60
- | AggTypeAverage
61
- | AggTypeCount
62
- | AggTypeHigh
63
- | AggTypeLow
64
- | AggTypeDistinct;
65
- export declare type VuuAggregation = {
66
- column: string;
67
- aggType: VuuAggType;
68
- };
69
-
70
- export interface VuuLink {
71
- fromColumn: string;
72
- toTable: string;
73
- toColumn: string;
74
- }
75
-
76
- export declare type VuuLinkDescriptor = {
77
- parentVpId: string;
78
- link: VuuLink;
79
- };
80
-
81
- /**
82
- * LinkDescriptor with label is not strictly part of the Vuu Protocol
83
- *
84
- * The Label is added by client code, if user has assigned a custom
85
- * Title to component bound to viewport.
86
- * The parentClientVpId is also added by client. This is needed as the
87
- * client vpId persists across sessions, whereas the server vpId does
88
- * not.
89
- */
90
- export type LinkDescriptorWithLabel = VuuLinkDescriptor & {
91
- label?: string;
92
- parentClientVpId: string;
93
- };
94
-
95
- export declare type VuuColumns = string[];
96
- export declare type VuuGroupBy = string[];
97
- export interface ServerToClientHeartBeat {
98
- type: "HB";
99
- ts: number;
100
- }
101
- export interface ServerToClientLoginSuccess {
102
- type: "LOGIN_SUCCESS";
103
- token: string;
104
- }
105
- export interface ServerToClientTableList {
106
- type: "TABLE_LIST_RESP";
107
- tables: VuuTable[];
108
- }
109
-
110
- export type VuuTableList = Pick<ServerToClientTableList, "tables">;
111
-
112
- export interface VuuTableMeta {
113
- columns: VuuColumns;
114
- dataTypes: VuuColumnDataType[];
115
- key: string;
116
- }
117
- export interface VuuTableMetaWithTable extends VuuTableMeta {
118
- table: VuuTable;
119
- }
120
-
121
- export interface ServerToClientTableMeta extends VuuTableMetaWithTable {
122
- type: "TABLE_META_RESP";
123
- }
124
-
125
- export type VuuTableMeta = Pick<
126
- ServerToClientTableMeta,
127
- "columns" | "dataTypes" | "table"
128
- >;
129
-
130
- export interface ServerToClientMenus {
131
- type: "VIEW_PORT_MENUS_RESP";
132
- menu: VuuMenu;
133
- vpId: string;
134
- }
135
-
136
- //TODO not all menu messages are "ADD_ROWS_TO_ORDERS"
137
- export interface ServerToClientMenu {
138
- rpcName: "ADD_ROWS_TO_ORDERS";
139
- type: "VIEW_PORT_MENU_RESP";
140
- action: null | {
141
- table?: VuuTable;
142
- type: "OPEN_DIALOG_ACTION";
143
- };
144
- vpId: string;
145
- }
146
-
147
- export interface ServerToClientMenuReject {
148
- error: string;
149
- rpcName: string;
150
- type: "VIEW_PORT_MENU_REJ";
151
- vpId: string;
152
- }
153
-
154
- export interface ServerToClientMenuSessionTableAction
155
- extends ServerToClientMenu {
156
- action: {
157
- table: VuuTable;
158
- type: "OPEN_DIALOG_ACTION";
159
- };
160
- }
161
-
162
- export interface ServerToClientViewPortVisualLinks {
163
- type: "VP_VISUAL_LINKS_RESP";
164
- links: VuuLinkDescriptor[];
165
- vpId: string;
166
- }
167
- export interface ServerToClientCreateViewPortSuccess {
168
- aggregations: VuuAggregation[];
169
- columns: VuuColumns;
170
- filterSpec: VuuFilter;
171
- groupBy: VuuGroupBy;
172
- range: VuuRange;
173
- sort: VuuSort;
174
- type: "CREATE_VP_SUCCESS";
175
- table: string;
176
- viewPortId: string;
177
- }
178
- export interface ServerToClientChangeViewPortSuccess {
179
- aggregations: VuuAggregation[];
180
- columns: VuuColumns;
181
- filterSpec: VuuFilter;
182
- groupBy: VuuGroupBy;
183
- sort: VuuSort;
184
- type: "CHANGE_VP_SUCCESS";
185
- viewPortId: string;
186
- }
187
- export interface ServerToClientChangeViewPortRangeSuccess {
188
- type: "CHANGE_VP_RANGE_SUCCESS";
189
- viewPortId: string;
190
- from: number;
191
- to: number;
192
- }
193
- export interface ServerToClientDisableViewPortSuccess {
194
- type: "DISABLE_VP_SUCCESS";
195
- viewPortId: string;
196
- }
197
- export interface ServerToClientEnableViewPortSuccess {
198
- type: "ENABLE_VP_SUCCESS";
199
- viewPortId: string;
200
- }
201
- export interface ServerToClientRemoveViewPortSuccess {
202
- type: "REMOVE_VP_SUCCESS";
203
- viewPortId: string;
204
- }
205
- export interface ServerToClientSelectSuccess {
206
- type: "SET_SELECTION_SUCCESS";
207
- vpId: string;
208
- }
209
- export interface ServerToClientRPC {
210
- type: "RPC_RESP";
211
- method: string;
212
- result: any;
213
- }
214
-
215
- // TODO flesh out as we know more
216
- export interface ServerToClientViewportRpcResponse {
217
- action: {
218
- key?: string;
219
- msg?: string;
220
- type: "VP_RPC_FAILURE" | "VP_RPC_SUCCESS" | "VP_CREATE_SUCCESS";
221
- };
222
- type: "VIEW_PORT_RPC_REPONSE";
223
- method: string;
224
- namedParams: { [key: string]: VuuRowDataItemType };
225
- params: string[];
226
- vpId: string;
227
- }
228
-
229
- export interface ServerToClientEditRPC {
230
- action: unknown;
231
- type: "VP_EDIT_RPC_RESPONSE";
232
- rpcName: string;
233
- vpId: string;
234
- }
235
- export interface ServerToClientEditRPCRejected {
236
- error: string;
237
- rpcName: string;
238
- type: "VP_EDIT_RPC_REJECT";
239
- vpId: string;
240
- }
241
- export interface ServerToClientOpenTreeNodeSuccess {
242
- type: "OPEN_TREE_SUCCESS";
243
- }
244
- export interface ServerToClientCloseTreeNodeSuccess {
245
- type: "CLOSE_TREE_SUCCESS";
246
- }
247
- export interface ServerToClientError {
248
- msg: string;
249
- type: "ERROR";
250
- }
251
- export interface ServerToClientCreateLinkSuccess {
252
- childVpId: string;
253
- childColumnName: string;
254
- parentVpId: string;
255
- parentColumnName: string;
256
- type: "CREATE_VISUAL_LINK_SUCCESS";
257
- }
258
- export interface ServerToClientRemoveLinkSuccess {
259
- childVpId: string;
260
- type: "REMOVE_VISUAL_LINK_SUCCESS";
261
- }
262
- export interface ServerToClientTableRows {
263
- batch: string;
264
- isLast: boolean;
265
- rows: VuuRow[];
266
- timeStamp: number;
267
- type: "TABLE_ROW";
268
- }
269
- export declare type ServerToClientBody =
270
- | ServerToClientHeartBeat
271
- | ServerToClientLoginSuccess
272
- | ServerToClientCreateViewPortSuccess
273
- | ServerToClientChangeViewPortSuccess
274
- | ServerToClientChangeViewPortRangeSuccess
275
- | ServerToClientDisableViewPortSuccess
276
- | ServerToClientEnableViewPortSuccess
277
- | ServerToClientRemoveViewPortSuccess
278
- | ServerToClientSelectSuccess
279
- | ServerToClientTableMeta
280
- | ServerToClientTableList
281
- | ServerToClientTableRows
282
- | ServerToClientMenus
283
- | ServerToClientMenu
284
- | ServerToClientMenuReject
285
- | ServerToClientMenuSessionTableAction
286
- | ServerToClientRPC
287
- | ServerToClientViewportRpcResponse
288
- | ServerToClientViewPortVisualLinks
289
- | ServerToClientOpenTreeNodeSuccess
290
- | ServerToClientCloseTreeNodeSuccess
291
- | ServerToClientCreateLinkSuccess
292
- | ServerToClientRemoveLinkSuccess
293
- | ServerToClientError
294
- | ServerToClientEditRPC
295
- | ServerToClientEditRPC
296
- | ServerToClientEditRPCRejected;
297
- export interface ServerToClientMessage<
298
- TBody extends ServerToClientBody = ServerToClientBody
299
- > {
300
- body: TBody;
301
- module: string;
302
- requestId: string;
303
- sessionId?: string;
304
- token: string;
305
- user: string;
306
- }
307
- export interface ClientToServerAuth {
308
- type: "AUTH";
309
- username: string;
310
- password: string;
311
- }
312
- export interface ClientToServerLogin {
313
- token: string;
314
- type: "LOGIN";
315
- user: string;
316
- }
317
- export interface ClientToServerHeartBeat {
318
- type: "HB_RESP";
319
- ts: number;
320
- }
321
- export interface ClientToServerDisable {
322
- type: "DISABLE_VP";
323
- viewPortId: string;
324
- }
325
- export interface ClientToServerEnable {
326
- type: "ENABLE_VP";
327
- viewPortId: string;
328
- }
329
- export interface ClientToServerTableList {
330
- type: "GET_TABLE_LIST";
331
- }
332
- export interface ClientToServerTableMeta {
333
- type: "GET_TABLE_META";
334
- table: VuuTable;
335
- }
336
- export interface ClientToServerCreateViewPort {
337
- columns: VuuColumns;
338
- filterSpec: VuuFilter;
339
- groupBy: string[];
340
- type: "CREATE_VP";
341
- range: VuuRange;
342
- sort: VuuSort;
343
- table: VuuTable;
344
- }
345
- export interface ClientToServerChangeViewPort {
346
- aggregations: VuuAggregation[];
347
- columns: VuuColumns;
348
- filterSpec: VuuFilter;
349
- groupBy: string[];
350
- sort: VuuSort;
351
- type: "CHANGE_VP";
352
- viewPortId: string;
353
- }
354
- export interface ClientToServerRemoveViewPort {
355
- type: "REMOVE_VP";
356
- viewPortId: string;
357
- }
358
- export interface ClientToServerSelection {
359
- type: "SET_SELECTION";
360
- selection: number[];
361
- vpId: string;
362
- }
363
- export interface ClientToServerViewPortRange {
364
- from: number;
365
- to: number;
366
- type: "CHANGE_VP_RANGE";
367
- viewPortId: string;
368
- }
369
- export interface ClientToServerVisualLinks {
370
- type: "GET_VP_VISUAL_LINKS";
371
- vpId: string;
372
- }
373
- export interface ClientToServerMenus {
374
- type: "GET_VIEW_PORT_MENUS";
375
- vpId: string;
376
- }
377
- export interface ClientToServerOpenTreeNode {
378
- type: "OPEN_TREE_NODE";
379
- vpId: string;
380
- treeKey: string;
381
- }
382
- export interface ClientToServerCloseTreeNode {
383
- type: "CLOSE_TREE_NODE";
384
- vpId: string;
385
- treeKey: string;
386
- }
387
- export interface ClientToServerCreateLink {
388
- childVpId: string;
389
- parentColumnName: string;
390
- parentVpId: string;
391
- type: "CREATE_VISUAL_LINK";
392
- }
393
- export interface ClientToServerRemoveLink {
394
- childVpId: string;
395
- type: "REMOVE_VISUAL_LINK";
396
- }
397
-
398
- export declare type RpcService = "TypeAheadRpcHandler" | "OrderEntryRpcHandler";
399
-
400
- export declare type TypeaheadParams =
401
- | [VuuTable, string]
402
- | [VuuTable, string, string];
403
-
404
- export declare type TypeAheadMethod =
405
- | "getUniqueFieldValues"
406
- | "getUniqueFieldValuesStartingWith";
407
-
408
- export declare type RpcMethod = TypeAheadMethod | "addRowsFromInstruments";
409
-
410
- export interface ClientToServerViewportRpcCall {
411
- type: "VIEW_PORT_RPC_CALL";
412
- rpcName: string;
413
- namedParams: { [key: string]: VuuRowDataItemType };
414
- params: string[];
415
- vpId: string;
416
- }
417
-
418
- export interface ClientToServerGetUniqueValues {
419
- type: "RPC_CALL";
420
- method: "getUniqueFieldValues";
421
- service: "TypeAheadRpcHandler";
422
- params: [VuuTable, string];
423
- }
424
- export interface ClientToServerGetUniqueValuesStartingWith {
425
- type: "RPC_CALL";
426
- method: "getUniqueFieldValuesStartingWith";
427
- service: "TypeAheadRpcHandler";
428
- params: [VuuTable, string, string];
429
- }
430
-
431
- export declare type VuuRpcRequest =
432
- | ClientToServerGetUniqueValues
433
- | ClientToServerGetUniqueValuesStartingWith;
434
- // add remaining Rpc calls here
435
-
436
- export interface ClientToServerMenuBaseRPC {
437
- rpcName: string;
438
- vpId: string;
439
- }
440
- export interface ClientToServerMenuSelectRPC extends ClientToServerMenuBaseRPC {
441
- type: "VIEW_PORT_MENUS_SELECT_RPC";
442
- }
443
- export interface ClientToServerMenuTableRPC extends ClientToServerMenuBaseRPC {
444
- type: "VIEW_PORT_MENU_TABLE_RPC";
445
- }
446
-
447
- export type VuuRowRecord = { [key: string]: VuuRowDataItemType };
448
- export interface ClientToServerMenuRowRPC extends ClientToServerMenuBaseRPC {
449
- type: "VIEW_PORT_MENU_ROW_RPC";
450
- rowKey: string;
451
- row: VuuRowRecord;
452
- }
453
- export interface ClientToServerMenuCellRPC extends ClientToServerMenuBaseRPC {
454
- field: string;
455
- rowKey: string;
456
- value: VuuColumnDataType;
457
- type: "VIEW_PORT_MENU_CELL_RPC";
458
- }
459
-
460
- export interface ClientToServerEditCellRpc {
461
- rowKey: string;
462
- type: "VP_EDIT_CELL_RPC";
463
- field: string;
464
- value: VuuRowDataItemType;
465
- }
466
- export interface ClientToServerEditRowRpc {
467
- rowKey: string;
468
- type: "VP_EDIT_ROW_RPC";
469
- row: VuuDataRow;
470
- }
471
-
472
- export type VuuDataRowDto = { [key: string]: VuuRowDataItemType };
473
- export interface ClientToServerAddRowRpc {
474
- rowKey: string;
475
- type: "VP_EDIT_ADD_ROW_RPC";
476
- data: VuuDataRowDto;
477
- }
478
- export interface ClientToServerDeleteRowRpc {
479
- rowKey: string;
480
- type: "VP_EDIT_DELETE_ROW_RPC";
481
- }
482
- export interface ClientToServerSubmitFormRpc {
483
- type: "VP_EDIT_SUBMIT_FORM_RPC";
484
- }
485
-
486
- export type ClientToServerEditRpc =
487
- | ClientToServerEditCellRpc
488
- | ClientToServerAddRowRpc
489
- | ClientToServerDeleteRowRpc
490
- | ClientToServerEditRowRpc
491
- | ClientToServerSubmitFormRpc;
492
-
493
- export type ClientToServerMenuRPC =
494
- | ClientToServerMenuRowRPC
495
- | ClientToServerMenuCellRPC
496
- | ClientToServerMenuSelectRPC
497
- | ClientToServerMenuTableRPC;
498
-
499
- export type ClientToServerMenuRPCType =
500
- | "VIEW_PORT_MENUS_SELECT_RPC"
501
- | "VIEW_PORT_MENU_TABLE_RPC"
502
- | "VIEW_PORT_MENU_ROW_RPC"
503
- | "VIEW_PORT_MENU_CELL_RPC";
504
-
505
- export declare type VuuRpcMessagesOut =
506
- | ClientToServerMenuSelectRPC
507
- | ClientToServerEditCellRpc;
508
-
509
- export declare type ClientToServerBody =
510
- | ClientToServerAuth
511
- | ClientToServerLogin
512
- | ClientToServerHeartBeat
513
- | ClientToServerDisable
514
- | ClientToServerEnable
515
- | ClientToServerTableList
516
- | ClientToServerTableMeta
517
- | ClientToServerCreateViewPort
518
- | ClientToServerChangeViewPort
519
- | ClientToServerRemoveViewPort
520
- | ClientToServerSelection
521
- | ClientToServerViewPortRange
522
- | ClientToServerVisualLinks
523
- | ClientToServerMenus
524
- | ClientToServerOpenTreeNode
525
- | ClientToServerCloseTreeNode
526
- | ClientToServerCreateLink
527
- | ClientToServerRemoveLink
528
- | ClientToServerMenuRPC
529
- | ClientToServerViewportRpcCall
530
- | VuuRpcRequest;
531
- export interface ClientToServerMessage<
532
- TBody extends ClientToServerBody = ClientToServerBody
533
- > {
534
- body: TBody;
535
- module: string;
536
- requestId: string;
537
- sessionId: string;
538
- token: string;
539
- user: string;
540
- }
541
-
542
- /** Menu RPC services */