@rootintf/protocol-2phw 2.3.7-api.2 → 3.0.13-api.2
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/README.md +384 -1
- package/dist/generated/iface-TwoPhW/index.d.mts +25 -0
- package/dist/generated/iface-TwoPhW/validate.d.cts +76 -0
- package/dist/generated/iface-TwoPhW/validate.d.mts +75 -0
- package/dist/twoPhW.cjs.js +419 -974
- package/dist/twoPhW.d.ts +51 -36
- package/dist/twoPhW.es.mjs +403 -970
- package/package.json +26 -17
- package/src/generated/.gitattributes +4 -0
- package/src/generated/iface-TwoPhW/index.cjs +26 -0
- package/src/generated/iface-TwoPhW/index.d.cts +25 -0
- package/src/generated/iface-TwoPhW/index.d.mts +25 -0
- package/src/generated/iface-TwoPhW/index.d.ts +25 -0
- package/src/generated/iface-TwoPhW/index.mjs +23 -0
- package/src/generated/iface-TwoPhW/package.json +36 -0
- package/src/generated/iface-TwoPhW/schema/schema_TwoPhW.json +131 -0
- package/src/generated/iface-TwoPhW/validate.cjs +1 -0
- package/src/generated/iface-TwoPhW/validate.mjs +1 -0
- package/src/generated/iface-introspection/index.cjs +13 -0
- package/src/generated/iface-introspection/index.d.cts +6 -0
- package/src/generated/iface-introspection/index.d.mts +6 -0
- package/src/generated/iface-introspection/index.d.ts +6 -0
- package/src/generated/iface-introspection/index.mjs +10 -0
- package/src/generated/iface-introspection/package.json +30 -0
- package/src/schema-cache/.gitattributes +4 -0
- package/src/schema-cache/5fdbd096ad99962b7e3d77cde8bd355fe180c859f35a61cfd07ee36b96c6700a.json +131 -0
- package/src/twoPhW.ts +770 -833
- package/dist/ajv-gen-validate.d.cts +0 -1
- package/dist/validate-esm.d.mts +0 -48
- package/schema/schema_2PhW.json +0 -61
- package/src/ajv-gen-validate.cjs +0 -40
- package/src/validate-esm.mjs +0 -1
package/dist/twoPhW.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as iface_TwoPhW_ from './generated/iface-TwoPhW/index.mjs';
|
|
2
|
+
import { JSON_Msg, JSON_Eff, JSON_Ack } from '@rootintf/json-msg';
|
|
2
3
|
import { EventLog } from '@rootintf/eventlog';
|
|
3
4
|
type t_msg = string;
|
|
4
5
|
interface EventMinimal {
|
|
@@ -6,44 +7,61 @@ interface EventMinimal {
|
|
|
6
7
|
data: {
|
|
7
8
|
msg: t_msg;
|
|
8
9
|
json_msg: any;
|
|
10
|
+
b_sent: boolean;
|
|
9
11
|
};
|
|
10
12
|
}
|
|
11
13
|
declare const logr_: any;
|
|
12
14
|
type t_callback = (msg: t_msg, json_msg: any) => boolean;
|
|
13
15
|
type t_callback_void = (msg: t_msg, json_msg: any) => void;
|
|
14
16
|
declare class Config {
|
|
15
|
-
_callback_msgWarp: t_callback;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
_callback_msgWarp: t_callback | null;
|
|
18
|
+
_callback_effEngage: t_callback | null;
|
|
19
|
+
_callback_ackWarp: t_callback | null;
|
|
20
|
+
_callback_ackEngage: t_callback | null;
|
|
21
|
+
_callback_sender_sent_expired: t_callback_void;
|
|
22
|
+
_callback_receiver_sent_expired: t_callback_void;
|
|
20
23
|
_callback_msgOptions: () => void;
|
|
21
24
|
constructor();
|
|
22
|
-
receiver(callback_msgWarp: t_callback,
|
|
23
|
-
sender(
|
|
25
|
+
receiver(callback_msgWarp: t_callback, callback_effEngage: t_callback, callback_msg_sent_expired: t_callback_void): void;
|
|
26
|
+
sender(callback_ackWarp: t_callback, callback_ackEngage: t_callback, callback_msg_sent_expired: t_callback_void): void;
|
|
24
27
|
set callback_msgOptions(callback: any);
|
|
25
28
|
}
|
|
29
|
+
declare const k_VERSION: "2";
|
|
26
30
|
declare function time_ttl_rtt_(ttl_msec: number | undefined, rtt_msec?: number): number | undefined;
|
|
27
31
|
declare var JSON_MsgOptions: {
|
|
28
|
-
create_with_cause_options: (msg_cause: any, options: any) =>
|
|
32
|
+
create_with_cause_options: (msg_cause: any, options: any) => JSON_Eff & {
|
|
33
|
+
options: any;
|
|
34
|
+
"2PhW": "2";
|
|
35
|
+
};
|
|
29
36
|
validate: (json: any) => boolean;
|
|
30
37
|
};
|
|
31
38
|
declare var JSON_MsgWarp: {
|
|
32
|
-
create_with_id_user_hyperport: (json_warp_id: any, json_user: any, json_hyperport: any, nr_ttl_msec: any) =>
|
|
39
|
+
create_with_id_user_hyperport: (json_warp_id: any, json_user: any, json_hyperport: any, nr_ttl_msec: any) => iface_TwoPhW_.JSON_MsgWarp;
|
|
33
40
|
compare: (json_L: any, json_R: any) => boolean;
|
|
34
|
-
validate
|
|
41
|
+
validate(msg: JSON_Msg): msg is iface_TwoPhW_.JSON_MsgWarp;
|
|
42
|
+
merge(body: {
|
|
43
|
+
"id": string;
|
|
44
|
+
"ttl_msec": number;
|
|
45
|
+
"instantaneous"?: boolean;
|
|
46
|
+
"user": unknown;
|
|
47
|
+
"hyperport": unknown;
|
|
48
|
+
}): iface_TwoPhW_.JSON_MsgWarp;
|
|
35
49
|
};
|
|
36
|
-
declare var
|
|
37
|
-
create_with_Warp: (json_msgWarp: any) =>
|
|
38
|
-
validate
|
|
50
|
+
declare var JSON_EffEngage: {
|
|
51
|
+
create_with_Warp: (json_msgWarp: any) => iface_TwoPhW_.JSON_EffEngage;
|
|
52
|
+
validate(msg: JSON_Eff): msg is iface_TwoPhW_.JSON_EffEngage;
|
|
53
|
+
create_with_cause_merge(cause: JSON_Msg, body: {
|
|
54
|
+
"ok": boolean;
|
|
55
|
+
"rtt_msec": number;
|
|
56
|
+
}): iface_TwoPhW_.JSON_EffEngage;
|
|
39
57
|
};
|
|
40
|
-
declare var
|
|
41
|
-
create_with_Warp_Ok: (json_msgWarp: any, b_ok?: boolean) =>
|
|
42
|
-
validate
|
|
58
|
+
declare var JSON_AckWarp: {
|
|
59
|
+
create_with_Warp_Ok: (json_msgWarp: any, b_ok?: boolean) => JSON_Ack;
|
|
60
|
+
validate(msg: JSON_Ack): msg is iface_TwoPhW_.JSON_AckWarp;
|
|
43
61
|
};
|
|
44
|
-
declare var
|
|
45
|
-
create_with_Engage_Ok: (
|
|
46
|
-
validate
|
|
62
|
+
declare var JSON_AckEngage: {
|
|
63
|
+
create_with_Engage_Ok: (json_effEngage: any, b_ok?: boolean) => JSON_Ack;
|
|
64
|
+
validate(msg: JSON_Ack): msg is iface_TwoPhW_.JSON_AckEngage;
|
|
47
65
|
};
|
|
48
66
|
declare class StateState {
|
|
49
67
|
private _idx_event;
|
|
@@ -61,19 +79,19 @@ declare class StateState {
|
|
|
61
79
|
declare class StateAckEngage extends StateState {
|
|
62
80
|
constructor(idx_event: number, event: EventMinimal);
|
|
63
81
|
get evt_AckEngage(): EventMinimal;
|
|
64
|
-
get
|
|
82
|
+
get json_ackEngage(): any;
|
|
65
83
|
canChangeState(_state_new: StateState): boolean;
|
|
66
84
|
}
|
|
67
85
|
declare class StateEngage extends StateState {
|
|
68
86
|
constructor(idx_event: number, event: EventMinimal);
|
|
69
87
|
get evt_Engage(): EventMinimal;
|
|
70
|
-
get
|
|
88
|
+
get json_effEngage(): any;
|
|
71
89
|
canChangeState(state_new: StateState): boolean;
|
|
72
90
|
}
|
|
73
91
|
declare class StateAckWarp extends StateState {
|
|
74
92
|
constructor(idx_event: number, event: EventMinimal);
|
|
75
93
|
get evt_AckWarp(): EventMinimal;
|
|
76
|
-
get
|
|
94
|
+
get json_ackWarp(): any;
|
|
77
95
|
canChangeState(state_new: StateState): boolean;
|
|
78
96
|
}
|
|
79
97
|
declare class StateWarp extends StateState {
|
|
@@ -104,8 +122,8 @@ declare class TwoPhW_EventLog {
|
|
|
104
122
|
str_type: string;
|
|
105
123
|
json_msgWarp: any;
|
|
106
124
|
};
|
|
107
|
-
_addEvent(msg: t_msg, json_msg: any, timeout_ms?: number, timeout_callback?: () => void): void;
|
|
108
|
-
_dropEvent(json_msg: any): void;
|
|
125
|
+
_addEvent(msg: t_msg, json_msg: any, b_sent: boolean, timeout_ms?: number, timeout_callback?: () => void): void;
|
|
126
|
+
_dropEvent(msg: t_msg, json_msg: any): void;
|
|
109
127
|
_cancelTimeout(idx_event: any): void;
|
|
110
128
|
traverse_State(json_msgWarp: any): ProtocolStateState;
|
|
111
129
|
}
|
|
@@ -117,15 +135,12 @@ declare class TwoPhW {
|
|
|
117
135
|
get eventLog(): TwoPhW_EventLog;
|
|
118
136
|
_handler_msgOptions(cfg: any, msg: any, json_msgOptions: any): boolean;
|
|
119
137
|
register_msgWarp(msg: t_msg, json_msgWarp: any): boolean;
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
handler_json_msgAck(msg: t_msg, json_msgAck: any): boolean;
|
|
128
|
-
handler_json_msgEffect(msg: t_msg, json_msgEffect: any): boolean;
|
|
129
|
-
handler_json_msg(msg: t_msg, json_msg: any): boolean;
|
|
138
|
+
handler_json_ackWarp(msg: t_msg, json_ackWarp: any): boolean;
|
|
139
|
+
register_effEngage(msg: t_msg, json_effEngage: any): boolean;
|
|
140
|
+
handler_json_ackEngage(msg: t_msg, json_ackEngage: any): boolean;
|
|
141
|
+
handler_json_msgWarp(msg: t_msg, json_msgWarp: any): boolean;
|
|
142
|
+
register_ackWarp(msg: t_msg, json_ackWarp: any): boolean;
|
|
143
|
+
handler_json_effEngage(msg: t_msg, json_effEngage: any): boolean;
|
|
144
|
+
register_ackEngage(msg: t_msg, json_ackEngage: any): boolean;
|
|
130
145
|
}
|
|
131
|
-
export { time_ttl_rtt_ as t_ttl_rtt, TwoPhW, JSON_MsgOptions, JSON_MsgWarp,
|
|
146
|
+
export { time_ttl_rtt_ as t_ttl_rtt, TwoPhW, JSON_MsgOptions, JSON_MsgWarp, JSON_EffEngage, JSON_AckWarp, JSON_AckEngage, logr_ as logr, JSON_Msg, JSON_Eff, JSON_Ack, k_VERSION as VERSION, StateAckEngage, StateEngage, StateAckWarp, StateWarp, StateINVALID, StateInitialState };
|