@vuu-ui/vuu-protocol-types 0.13.15 → 0.13.16
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 +48 -19
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -376,6 +376,24 @@ export declare type ClientMessageBody =
|
|
|
376
376
|
|
|
377
377
|
// RPC
|
|
378
378
|
|
|
379
|
+
export declare type GlobalRpcContext = {
|
|
380
|
+
type: "GLOBAL_CONTEXT";
|
|
381
|
+
};
|
|
382
|
+
export declare type ViewportRpcContext = {
|
|
383
|
+
type: "VIEWPORT_CONTEXT";
|
|
384
|
+
viewPortId: string;
|
|
385
|
+
};
|
|
386
|
+
export declare type ViewportRowRpcContext = {
|
|
387
|
+
type: "VIEWPORT_ROW_CONTEXT";
|
|
388
|
+
viewPortId: string;
|
|
389
|
+
rowKey: string;
|
|
390
|
+
};
|
|
391
|
+
|
|
392
|
+
export declare type RpcContext =
|
|
393
|
+
| GlobalRpcContext
|
|
394
|
+
| ViewportRpcContext
|
|
395
|
+
| ViewportRowRpcContext;
|
|
396
|
+
|
|
379
397
|
export declare type VuuRpcRequest =
|
|
380
398
|
| VuuRpcServiceRequest
|
|
381
399
|
| VuuRpcViewportRequest
|
|
@@ -388,25 +406,37 @@ export declare type VuuRpcResponse =
|
|
|
388
406
|
| VuuRpcMenuResponse
|
|
389
407
|
| VuuRpcEditResponse;
|
|
390
408
|
|
|
391
|
-
export declare type VuuRpcServiceRequest = {
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
params: [VuuTable, string];
|
|
398
|
-
}
|
|
399
|
-
| {
|
|
400
|
-
method: "getUniqueFieldValuesStartingWith";
|
|
401
|
-
params: [VuuTable, string, string];
|
|
402
|
-
}
|
|
403
|
-
);
|
|
409
|
+
export declare type VuuRpcServiceRequest<T extends RpcContext = RpcContext> = {
|
|
410
|
+
context: T;
|
|
411
|
+
type: "RPC_REQUEST";
|
|
412
|
+
params: Record<string, string>;
|
|
413
|
+
rpcName: TypeAheadMethod;
|
|
414
|
+
};
|
|
404
415
|
|
|
416
|
+
export declare type RpcResultSuccess = {
|
|
417
|
+
type: "SUCCESS_RESULT";
|
|
418
|
+
data: unknown;
|
|
419
|
+
};
|
|
420
|
+
export declare type RpcResultError = {
|
|
421
|
+
type: "ERROR_RESULT";
|
|
422
|
+
errorMessage: string;
|
|
423
|
+
};
|
|
405
424
|
export interface VuuRpcServiceResponse {
|
|
425
|
+
action: unknown;
|
|
406
426
|
error: null | unknown;
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
result:
|
|
427
|
+
rpcName: TypeAheadMethod;
|
|
428
|
+
type: "RPC_RESPONSE";
|
|
429
|
+
result: RpcResultSuccess | RpcResultError;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
export interface VuuViewportRpcTypeaheadRequest extends VuuRpcServiceRequest {
|
|
433
|
+
rpcName: TypeAheadMethod;
|
|
434
|
+
params: {
|
|
435
|
+
column: string;
|
|
436
|
+
module: string;
|
|
437
|
+
starts?: string;
|
|
438
|
+
table: string;
|
|
439
|
+
};
|
|
410
440
|
}
|
|
411
441
|
|
|
412
442
|
export declare type RpcNamedParams = {
|
|
@@ -418,13 +448,12 @@ export interface VuuRpcViewportRequest {
|
|
|
418
448
|
type: "VIEW_PORT_RPC_CALL";
|
|
419
449
|
rpcName: string;
|
|
420
450
|
namedParams: RpcNamedParams;
|
|
421
|
-
params:
|
|
451
|
+
params: unknown[];
|
|
422
452
|
vpId: string;
|
|
423
453
|
}
|
|
424
|
-
|
|
425
454
|
export interface VuuRpcViewportResponse {
|
|
426
455
|
action: VuuRpcViewportAction;
|
|
427
|
-
type: "
|
|
456
|
+
type: "VIEW_PORT_RPC_RESPONSE";
|
|
428
457
|
method: string;
|
|
429
458
|
namedParams: { [key: string]: VuuRowDataItemType | VuuTable };
|
|
430
459
|
params: string[];
|