@vuu-ui/vuu-protocol-types 0.8.70 → 0.8.71

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/index.d.ts +131 -128
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -1,124 +1,36 @@
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
1
  /**
82
- * LinkDescriptor with label is not strictly part of the Vuu Protocol
2
+ * Vuu Protocol Message Envelope.
83
3
  *
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.
4
+ * All messages, in both directions (client to server and server to client) carry
5
+ * a set of common properties. All variation is found within the message.body.
89
6
  */
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";
7
+ export interface VuuClientToServerMessage<
8
+ TBody extends ClientToServerBody = ClientToServerBody
9
+ > {
10
+ body: TBody;
11
+ module: string;
12
+ requestId: string;
13
+ sessionId: string;
103
14
  token: string;
104
- }
105
- export interface ServerToClientTableList {
106
- type: "TABLE_LIST_RESP";
107
- tables: VuuTable[];
15
+ user: string;
108
16
  }
109
17
 
110
- export type VuuTableList = Pick<ServerToClientTableList, "tables">;
18
+ export interface VuuServerToClientMessage<
19
+ TBody extends ServerToClientBody = ServerToClientBody
20
+ > {
21
+ body: TBody;
22
+ module: string;
23
+ requestId: string;
24
+ sessionId?: string;
25
+ token: string;
26
+ user: string;
27
+ }
111
28
 
112
- export interface VuuTableMeta {
29
+ export interface ServerToClientTableMeta extends VuuTableMeta {
113
30
  columns: VuuColumns;
114
31
  dataTypes: VuuColumnDataType[];
115
32
  key: string;
116
- }
117
- export interface VuuTableMetaWithTable extends VuuTableMeta {
118
33
  table: VuuTable;
119
- }
120
-
121
- export interface ServerToClientTableMeta extends VuuTableMetaWithTable {
122
34
  type: "TABLE_META_RESP";
123
35
  }
124
36
 
@@ -295,16 +207,6 @@ export declare type ServerToClientBody =
295
207
  | ServerToClientEditRPC
296
208
  | ServerToClientEditRPC
297
209
  | ServerToClientEditRPCRejected;
298
- export interface ServerToClientMessage<
299
- TBody extends ServerToClientBody = ServerToClientBody
300
- > {
301
- body: TBody;
302
- module: string;
303
- requestId: string;
304
- sessionId?: string;
305
- token: string;
306
- user: string;
307
- }
308
210
  export interface ClientToServerAuth {
309
211
  type: "AUTH";
310
212
  username: string;
@@ -529,15 +431,116 @@ export declare type ClientToServerBody =
529
431
  | ClientToServerMenuRPC
530
432
  | ClientToServerViewportRpcCall
531
433
  | VuuRpcRequest;
532
- export interface ClientToServerMessage<
533
- TBody extends ClientToServerBody = ClientToServerBody
534
- > {
535
- body: TBody;
434
+
435
+ /** Menu RPC services */
436
+
437
+ // prettier-ignore
438
+ export declare type VuuColumnDataType = "int" | "long" | "double" | "string" | "char" | "boolean";
439
+ export declare type VuuMenuContext = "cell" | "row" | "grid" | "selected-rows";
440
+ export declare type VuuTable = {
441
+ table: string;
536
442
  module: string;
537
- requestId: string;
538
- sessionId: string;
443
+ };
444
+ export declare type VuuRange = {
445
+ from: number;
446
+ to: number;
447
+ };
448
+
449
+ export declare type VuuSortType = "A" | "D";
450
+
451
+ export declare type VuuSortCol = {
452
+ column: string;
453
+ sortType: VuuSortType;
454
+ };
455
+ export declare type VuuSort = {
456
+ sortDefs: VuuSortCol[];
457
+ };
458
+ export declare type VuuFilter = {
459
+ filter: string;
460
+ };
461
+ export interface VuuMenuItem {
462
+ context: VuuMenuContext;
463
+ filter: string;
464
+ name: string;
465
+ rpcName: string;
466
+ }
467
+
468
+ export interface VuuMenu {
469
+ name: string;
470
+ menus: (VuuMenuItem | VuuMenu)[];
471
+ }
472
+
473
+ export type VuuRowDataItemType = string | number | boolean;
474
+
475
+ export type VuuDataRow = VuuRowDataItemType[];
476
+
477
+ export declare type VuuRow = {
478
+ data: VuuDataRow;
479
+ rowIndex: number;
480
+ rowKey: string;
481
+ sel: 0 | 1;
482
+ ts: number;
483
+ updateType: "U" | "D" | "SIZE";
484
+ viewPortId: string;
485
+ vpSize: number;
486
+ vpVersion: string;
487
+ };
488
+ export declare type AggTypeSum = 1;
489
+ export declare type AggTypeAverage = 2;
490
+ export declare type AggTypeCount = 3;
491
+ export declare type AggTypeHigh = 4;
492
+ export declare type AggTypeLow = 5;
493
+ export declare type AggTypeDistinct = 6;
494
+ export declare type VuuAggType =
495
+ | AggTypeSum
496
+ | AggTypeAverage
497
+ | AggTypeCount
498
+ | AggTypeHigh
499
+ | AggTypeLow
500
+ | AggTypeDistinct;
501
+ export declare type VuuAggregation = {
502
+ column: string;
503
+ aggType: VuuAggType;
504
+ };
505
+
506
+ export interface VuuLink {
507
+ fromColumn: string;
508
+ toTable: string;
509
+ toColumn: string;
510
+ }
511
+
512
+ export declare type VuuLinkDescriptor = {
513
+ parentVpId: string;
514
+ link: VuuLink;
515
+ };
516
+
517
+ /**
518
+ * LinkDescriptor with label is not strictly part of the Vuu Protocol
519
+ *
520
+ * The Label is added by client code, if user has assigned a custom
521
+ * Title to component bound to viewport.
522
+ * The parentClientVpId is also added by client. This is needed as the
523
+ * client vpId persists across sessions, whereas the server vpId does
524
+ * not.
525
+ */
526
+ export type LinkDescriptorWithLabel = VuuLinkDescriptor & {
527
+ label?: string;
528
+ parentClientVpId: string;
529
+ };
530
+
531
+ export declare type VuuColumns = string[];
532
+ export declare type VuuGroupBy = string[];
533
+ export interface ServerToClientHeartBeat {
534
+ type: "HB";
535
+ ts: number;
536
+ }
537
+ export interface ServerToClientLoginSuccess {
538
+ type: "LOGIN_SUCCESS";
539
539
  token: string;
540
- user: string;
540
+ }
541
+ export interface ServerToClientTableList {
542
+ type: "TABLE_LIST_RESP";
543
+ tables: VuuTable[];
541
544
  }
542
545
 
543
- /** Menu RPC services */
546
+ export type VuuTableList = Pick<ServerToClientTableList, "tables">;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vuu-ui/vuu-protocol-types",
3
- "version": "0.8.70",
3
+ "version": "0.8.71",
4
4
  "author": "heswell",
5
5
  "license": "Apache-2.0",
6
6
  "dependencies": {},