oorja 1.11.4 → 2.0.1

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 (52) hide show
  1. package/README.md +14 -52
  2. package/dist/commands/signout.d.ts +1 -1
  3. package/dist/commands/signout.js +4 -4
  4. package/dist/commands/teletype/index.d.ts +7 -6
  5. package/dist/commands/teletype/index.js +49 -47
  6. package/dist/lib/config.d.ts +7 -10
  7. package/dist/lib/config.js +29 -49
  8. package/dist/lib/{surya → connect}/index.d.ts +8 -8
  9. package/dist/lib/{surya → connect}/index.js +39 -36
  10. package/dist/lib/{surya → connect}/resources.js +2 -2
  11. package/dist/lib/{surya → connect}/types.d.ts +1 -3
  12. package/dist/lib/encryption.d.ts +2 -3
  13. package/dist/lib/encryption.js +6 -10
  14. package/dist/lib/oorja/client.d.ts +3 -0
  15. package/dist/lib/oorja/client.js +52 -0
  16. package/dist/lib/oorja/index.d.ts +7 -7
  17. package/dist/lib/oorja/index.js +40 -29
  18. package/dist/lib/oorja/preflight.d.ts +8 -8
  19. package/dist/lib/oorja/preflight.js +45 -41
  20. package/dist/lib/teletype/auxiliary.d.ts +2 -2
  21. package/dist/lib/teletype/auxiliary.js +5 -5
  22. package/dist/lib/teletype/index.d.ts +3 -4
  23. package/dist/lib/teletype/index.js +16 -16
  24. package/dist/lib/utils.js +5 -5
  25. package/oclif.manifest.json +11 -10
  26. package/package.json +22 -18
  27. package/dist/lib/surya/vendor/phoenix/ajax.d.ts +0 -8
  28. package/dist/lib/surya/vendor/phoenix/ajax.js +0 -82
  29. package/dist/lib/surya/vendor/phoenix/channel.d.ts +0 -154
  30. package/dist/lib/surya/vendor/phoenix/channel.js +0 -308
  31. package/dist/lib/surya/vendor/phoenix/constants.d.ts +0 -33
  32. package/dist/lib/surya/vendor/phoenix/constants.js +0 -29
  33. package/dist/lib/surya/vendor/phoenix/index.d.ts +0 -199
  34. package/dist/lib/surya/vendor/phoenix/index.js +0 -200
  35. package/dist/lib/surya/vendor/phoenix/longpoll.d.ts +0 -12
  36. package/dist/lib/surya/vendor/phoenix/longpoll.js +0 -126
  37. package/dist/lib/surya/vendor/phoenix/presence.d.ts +0 -44
  38. package/dist/lib/surya/vendor/phoenix/presence.js +0 -152
  39. package/dist/lib/surya/vendor/phoenix/push.d.ts +0 -57
  40. package/dist/lib/surya/vendor/phoenix/push.js +0 -122
  41. package/dist/lib/surya/vendor/phoenix/serializer.d.ts +0 -53
  42. package/dist/lib/surya/vendor/phoenix/serializer.js +0 -100
  43. package/dist/lib/surya/vendor/phoenix/socket.d.ts +0 -222
  44. package/dist/lib/surya/vendor/phoenix/socket.js +0 -541
  45. package/dist/lib/surya/vendor/phoenix/timer.d.ts +0 -25
  46. package/dist/lib/surya/vendor/phoenix/timer.js +0 -40
  47. package/dist/lib/surya/vendor/phoenix/utils.d.ts +0 -1
  48. package/dist/lib/surya/vendor/phoenix/utils.js +0 -11
  49. /package/dist/lib/{surya → connect}/errors.d.ts +0 -0
  50. /package/dist/lib/{surya → connect}/errors.js +0 -0
  51. /package/dist/lib/{surya → connect}/resources.d.ts +0 -0
  52. /package/dist/lib/{surya → connect}/types.js +0 -0
@@ -1,200 +0,0 @@
1
- // @ts-nocheck
2
- /**
3
- * Phoenix Channels JavaScript client
4
- *
5
- * ## Socket Connection
6
- *
7
- * A single connection is established to the server and
8
- * channels are multiplexed over the connection.
9
- * Connect to the server using the `Socket` class:
10
- *
11
- * ```javascript
12
- * let socket = new Socket("/socket", {params: {userToken: "123"}})
13
- * socket.connect()
14
- * ```
15
- *
16
- * The `Socket` constructor takes the mount point of the socket,
17
- * the authentication params, as well as options that can be found in
18
- * the Socket docs, such as configuring the `LongPoll` transport, and
19
- * heartbeat.
20
- *
21
- * ## Channels
22
- *
23
- * Channels are isolated, concurrent processes on the server that
24
- * subscribe to topics and broker events between the client and server.
25
- * To join a channel, you must provide the topic, and channel params for
26
- * authorization. Here's an example chat room example where `"new_msg"`
27
- * events are listened for, messages are pushed to the server, and
28
- * the channel is joined with ok/error/timeout matches:
29
- *
30
- * ```javascript
31
- * let channel = socket.channel("room:123", {token: roomToken})
32
- * channel.on("new_msg", msg => console.log("Got message", msg) )
33
- * $input.onEnter( e => {
34
- * channel.push("new_msg", {body: e.target.val}, 10000)
35
- * .receive("ok", (msg) => console.log("created message", msg) )
36
- * .receive("error", (reasons) => console.log("create failed", reasons) )
37
- * .receive("timeout", () => console.log("Networking issue...") )
38
- * })
39
- *
40
- * channel.join()
41
- * .receive("ok", ({messages}) => console.log("catching up", messages) )
42
- * .receive("error", ({reason}) => console.log("failed join", reason) )
43
- * .receive("timeout", () => console.log("Networking issue. Still waiting..."))
44
- *```
45
- *
46
- * ## Joining
47
- *
48
- * Creating a channel with `socket.channel(topic, params)`, binds the params to
49
- * `channel.params`, which are sent up on `channel.join()`.
50
- * Subsequent rejoins will send up the modified params for
51
- * updating authorization params, or passing up last_message_id information.
52
- * Successful joins receive an "ok" status, while unsuccessful joins
53
- * receive "error".
54
- *
55
- * With the default serializers and WebSocket transport, JSON text frames are
56
- * used for pushing a JSON object literal. If an `ArrayBuffer` instance is provided,
57
- * binary encoding will be used and the message will be sent with the binary
58
- * opcode.
59
- *
60
- * *Note*: binary messages are only supported on the WebSocket transport.
61
- *
62
- * ## Duplicate Join Subscriptions
63
- *
64
- * While the client may join any number of topics on any number of channels,
65
- * the client may only hold a single subscription for each unique topic at any
66
- * given time. When attempting to create a duplicate subscription,
67
- * the server will close the existing channel, log a warning, and
68
- * spawn a new channel for the topic. The client will have their
69
- * `channel.onClose` callbacks fired for the existing channel, and the new
70
- * channel join will have its receive hooks processed as normal.
71
- *
72
- * ## Pushing Messages
73
- *
74
- * From the previous example, we can see that pushing messages to the server
75
- * can be done with `channel.push(eventName, payload)` and we can optionally
76
- * receive responses from the push. Additionally, we can use
77
- * `receive("timeout", callback)` to abort waiting for our other `receive` hooks
78
- * and take action after some period of waiting. The default timeout is 10000ms.
79
- *
80
- *
81
- * ## Socket Hooks
82
- *
83
- * Lifecycle events of the multiplexed connection can be hooked into via
84
- * `socket.onError()` and `socket.onClose()` events, ie:
85
- *
86
- * ```javascript
87
- * socket.onError( () => console.log("there was an error with the connection!") )
88
- * socket.onClose( () => console.log("the connection dropped") )
89
- * ```
90
- *
91
- *
92
- * ## Channel Hooks
93
- *
94
- * For each joined channel, you can bind to `onError` and `onClose` events
95
- * to monitor the channel lifecycle, ie:
96
- *
97
- * ```javascript
98
- * channel.onError( () => console.log("there was an error!") )
99
- * channel.onClose( () => console.log("the channel has gone away gracefully") )
100
- * ```
101
- *
102
- * ### onError hooks
103
- *
104
- * `onError` hooks are invoked if the socket connection drops, or the channel
105
- * crashes on the server. In either case, a channel rejoin is attempted
106
- * automatically in an exponential backoff manner.
107
- *
108
- * ### onClose hooks
109
- *
110
- * `onClose` hooks are invoked only in two cases. 1) the channel explicitly
111
- * closed on the server, or 2). The client explicitly closed, by calling
112
- * `channel.leave()`
113
- *
114
- *
115
- * ## Presence
116
- *
117
- * The `Presence` object provides features for syncing presence information
118
- * from the server with the client and handling presences joining and leaving.
119
- *
120
- * ### Syncing state from the server
121
- *
122
- * To sync presence state from the server, first instantiate an object and
123
- * pass your channel in to track lifecycle events:
124
- *
125
- * ```javascript
126
- * let channel = socket.channel("some:topic")
127
- * let presence = new Presence(channel)
128
- * ```
129
- *
130
- * Next, use the `presence.onSync` callback to react to state changes
131
- * from the server. For example, to render the list of users every time
132
- * the list changes, you could write:
133
- *
134
- * ```javascript
135
- * presence.onSync(() => {
136
- * myRenderUsersFunction(presence.list())
137
- * })
138
- * ```
139
- *
140
- * ### Listing Presences
141
- *
142
- * `presence.list` is used to return a list of presence information
143
- * based on the local state of metadata. By default, all presence
144
- * metadata is returned, but a `listBy` function can be supplied to
145
- * allow the client to select which metadata to use for a given presence.
146
- * For example, you may have a user online from different devices with
147
- * a metadata status of "online", but they have set themselves to "away"
148
- * on another device. In this case, the app may choose to use the "away"
149
- * status for what appears on the UI. The example below defines a `listBy`
150
- * function which prioritizes the first metadata which was registered for
151
- * each user. This could be the first tab they opened, or the first device
152
- * they came online from:
153
- *
154
- * ```javascript
155
- * let listBy = (id, {metas: [first, ...rest]}) => {
156
- * first.count = rest.length + 1 // count of this user's presences
157
- * first.id = id
158
- * return first
159
- * }
160
- * let onlineUsers = presence.list(listBy)
161
- * ```
162
- *
163
- * ### Handling individual presence join and leave events
164
- *
165
- * The `presence.onJoin` and `presence.onLeave` callbacks can be used to
166
- * react to individual presences joining and leaving the app. For example:
167
- *
168
- * ```javascript
169
- * let presence = new Presence(channel)
170
- *
171
- * // detect if user has joined for the 1st time or from another tab/device
172
- * presence.onJoin((id, current, newPres) => {
173
- * if(!current){
174
- * console.log("user has entered for the first time", newPres)
175
- * } else {
176
- * console.log("user additional presence", newPres)
177
- * }
178
- * })
179
- *
180
- * // detect if user has left from all tabs/devices, or is still present
181
- * presence.onLeave((id, current, leftPres) => {
182
- * if(current.metas.length === 0){
183
- * console.log("user has left from all devices", leftPres)
184
- * } else {
185
- * console.log("user left from a device", leftPres)
186
- * }
187
- * })
188
- * // receive presence data from server
189
- * presence.onSync(() => {
190
- * displayUsers(presence.list())
191
- * })
192
- * ```
193
- * @module phoenix
194
- */
195
- import Channel from "./channel.js";
196
- import LongPoll from "./longpoll.js";
197
- import Presence from "./presence.js";
198
- import Serializer from "./serializer.js";
199
- import Socket from "./socket.js";
200
- export { Channel, LongPoll, Presence, Serializer, Socket };
@@ -1,12 +0,0 @@
1
- export default class LongPoll {
2
- constructor(endPoint: any);
3
- normalizeEndpoint(endPoint: any): any;
4
- endpointURL(): any;
5
- closeAndRetry(code: any, reason: any, wasClean: any): void;
6
- ontimeout(): void;
7
- isActive(): boolean;
8
- poll(): void;
9
- send(body: any): void;
10
- close(code: any, reason: any, wasClean: any): void;
11
- ajax(method: any, body: any, onCallerTimeout: any, callback: any): void;
12
- }
@@ -1,126 +0,0 @@
1
- // @ts-nocheck
2
- import { SOCKET_STATES, TRANSPORTS } from "./constants.js";
3
- import Ajax from "./ajax.js";
4
- export default class LongPoll {
5
- constructor(endPoint) {
6
- this.endPoint = null;
7
- this.token = null;
8
- this.skipHeartbeat = true;
9
- this.reqs = new Set();
10
- this.onopen = function () { }; // noop
11
- this.onerror = function () { }; // noop
12
- this.onmessage = function () { }; // noop
13
- this.onclose = function () { }; // noop
14
- this.pollEndpoint = this.normalizeEndpoint(endPoint);
15
- this.readyState = SOCKET_STATES.connecting;
16
- this.poll();
17
- }
18
- normalizeEndpoint(endPoint) {
19
- return (endPoint
20
- .replace("ws://", "http://")
21
- .replace("wss://", "https://")
22
- .replace(new RegExp("(.*)\/" + TRANSPORTS.websocket), "$1/" + TRANSPORTS.longpoll));
23
- }
24
- endpointURL() {
25
- return Ajax.appendParams(this.pollEndpoint, { token: this.token });
26
- }
27
- closeAndRetry(code, reason, wasClean) {
28
- this.close(code, reason, wasClean);
29
- this.readyState = SOCKET_STATES.connecting;
30
- }
31
- ontimeout() {
32
- this.onerror("timeout");
33
- this.closeAndRetry(1005, "timeout", false);
34
- }
35
- isActive() { return this.readyState === SOCKET_STATES.open || this.readyState === SOCKET_STATES.connecting; }
36
- poll() {
37
- this.ajax("GET", null, () => this.ontimeout(), resp => {
38
- if (resp) {
39
- var { status, token, messages } = resp;
40
- this.token = token;
41
- }
42
- else {
43
- status = 0;
44
- }
45
- switch (status) {
46
- case 200:
47
- messages.forEach(msg => {
48
- // Tasks are what things like event handlers, setTimeout callbacks,
49
- // promise resolves and more are run within.
50
- // In modern browsers, there are two different kinds of tasks,
51
- // microtasks and macrotasks.
52
- // Microtasks are mainly used for Promises, while macrotasks are
53
- // used for everything else.
54
- // Microtasks always have priority over macrotasks. If the JS engine
55
- // is looking for a task to run, it will always try to empty the
56
- // microtask queue before attempting to run anything from the
57
- // macrotask queue.
58
- //
59
- // For the WebSocket transport, messages always arrive in their own
60
- // event. This means that if any promises are resolved from within,
61
- // their callbacks will always finish execution by the time the
62
- // next message event handler is run.
63
- //
64
- // In order to emulate this behaviour, we need to make sure each
65
- // onmessage handler is run within its own macrotask.
66
- setTimeout(() => this.onmessage({ data: msg }), 0);
67
- });
68
- this.poll();
69
- break;
70
- case 204:
71
- this.poll();
72
- break;
73
- case 410:
74
- this.readyState = SOCKET_STATES.open;
75
- this.onopen({});
76
- this.poll();
77
- break;
78
- case 403:
79
- this.onerror(403);
80
- this.close(1008, "forbidden", false);
81
- break;
82
- case 0:
83
- case 500:
84
- this.onerror(500);
85
- this.closeAndRetry(1011, "internal server error", 500);
86
- break;
87
- default: throw new Error(`unhandled poll status ${status}`);
88
- }
89
- });
90
- }
91
- send(body) {
92
- this.ajax("POST", body, () => this.onerror("timeout"), resp => {
93
- if (!resp || resp.status !== 200) {
94
- this.onerror(resp && resp.status);
95
- this.closeAndRetry(1011, "internal server error", false);
96
- }
97
- });
98
- }
99
- close(code, reason, wasClean) {
100
- for (let req of this.reqs) {
101
- req.abort();
102
- }
103
- this.readyState = SOCKET_STATES.closed;
104
- let opts = Object.assign({ code: 1000, reason: undefined, wasClean: true }, { code, reason, wasClean });
105
- if (typeof (CloseEvent) !== "undefined") {
106
- this.onclose(new CloseEvent("close", opts));
107
- }
108
- else {
109
- this.onclose(opts);
110
- }
111
- }
112
- ajax(method, body, onCallerTimeout, callback) {
113
- let req;
114
- let ontimeout = () => {
115
- this.reqs.delete(req);
116
- onCallerTimeout();
117
- };
118
- req = Ajax.request(method, this.endpointURL(), "application/json", body, this.timeout, ontimeout, resp => {
119
- this.reqs.delete(req);
120
- if (this.isActive()) {
121
- callback(resp);
122
- }
123
- });
124
- this.reqs.add(req);
125
- }
126
- }
@@ -1,44 +0,0 @@
1
- /**
2
- * Initializes the Presence
3
- * @param {Channel} channel - The Channel
4
- * @param {Object} opts - The options,
5
- * for example `{events: {state: "state", diff: "diff"}}`
6
- */
7
- export default class Presence {
8
- constructor(channel: any, opts?: {});
9
- onJoin(callback: any): void;
10
- onLeave(callback: any): void;
11
- onSync(callback: any): void;
12
- list(by: any): any[];
13
- inPendingSyncState(): boolean;
14
- /**
15
- * Used to sync the list of presences on the server
16
- * with the client's state. An optional `onJoin` and `onLeave` callback can
17
- * be provided to react to changes in the client's local presences across
18
- * disconnects and reconnects with the server.
19
- *
20
- * @returns {Presence}
21
- */
22
- static syncState(currentState: any, newState: any, onJoin: any, onLeave: any): any;
23
- /**
24
- *
25
- * Used to sync a diff of presence join and leave
26
- * events from the server, as they happen. Like `syncState`, `syncDiff`
27
- * accepts optional `onJoin` and `onLeave` callbacks to react to a user
28
- * joining or leaving from a device.
29
- *
30
- * @returns {Presence}
31
- */
32
- static syncDiff(state: any, diff: any, onJoin: any, onLeave: any): any;
33
- /**
34
- * Returns the array of presences, with selected metadata.
35
- *
36
- * @param {Object} presences
37
- * @param {Function} chooser
38
- *
39
- * @returns {Presence}
40
- */
41
- static list(presences: any, chooser: any): any[];
42
- static map(obj: any, func: any): any[];
43
- static clone(obj: any): any;
44
- }
@@ -1,152 +0,0 @@
1
- // @ts-nocheck
2
- /**
3
- * Initializes the Presence
4
- * @param {Channel} channel - The Channel
5
- * @param {Object} opts - The options,
6
- * for example `{events: {state: "state", diff: "diff"}}`
7
- */
8
- export default class Presence {
9
- constructor(channel, opts = {}) {
10
- let events = opts.events || { state: "presence_state", diff: "presence_diff" };
11
- this.state = {};
12
- this.pendingDiffs = [];
13
- this.channel = channel;
14
- this.joinRef = null;
15
- this.caller = {
16
- onJoin: function () { },
17
- onLeave: function () { },
18
- onSync: function () { }
19
- };
20
- this.channel.on(events.state, newState => {
21
- let { onJoin, onLeave, onSync } = this.caller;
22
- this.joinRef = this.channel.joinRef();
23
- this.state = Presence.syncState(this.state, newState, onJoin, onLeave);
24
- this.pendingDiffs.forEach(diff => {
25
- this.state = Presence.syncDiff(this.state, diff, onJoin, onLeave);
26
- });
27
- this.pendingDiffs = [];
28
- onSync();
29
- });
30
- this.channel.on(events.diff, diff => {
31
- let { onJoin, onLeave, onSync } = this.caller;
32
- if (this.inPendingSyncState()) {
33
- this.pendingDiffs.push(diff);
34
- }
35
- else {
36
- this.state = Presence.syncDiff(this.state, diff, onJoin, onLeave);
37
- onSync();
38
- }
39
- });
40
- }
41
- onJoin(callback) { this.caller.onJoin = callback; }
42
- onLeave(callback) { this.caller.onLeave = callback; }
43
- onSync(callback) { this.caller.onSync = callback; }
44
- list(by) { return Presence.list(this.state, by); }
45
- inPendingSyncState() {
46
- return !this.joinRef || (this.joinRef !== this.channel.joinRef());
47
- }
48
- // lower-level public static API
49
- /**
50
- * Used to sync the list of presences on the server
51
- * with the client's state. An optional `onJoin` and `onLeave` callback can
52
- * be provided to react to changes in the client's local presences across
53
- * disconnects and reconnects with the server.
54
- *
55
- * @returns {Presence}
56
- */
57
- static syncState(currentState, newState, onJoin, onLeave) {
58
- let state = this.clone(currentState);
59
- let joins = {};
60
- let leaves = {};
61
- this.map(state, (key, presence) => {
62
- if (!newState[key]) {
63
- leaves[key] = presence;
64
- }
65
- });
66
- this.map(newState, (key, newPresence) => {
67
- let currentPresence = state[key];
68
- if (currentPresence) {
69
- let newRefs = newPresence.metas.map(m => m.phx_ref);
70
- let curRefs = currentPresence.metas.map(m => m.phx_ref);
71
- let joinedMetas = newPresence.metas.filter(m => curRefs.indexOf(m.phx_ref) < 0);
72
- let leftMetas = currentPresence.metas.filter(m => newRefs.indexOf(m.phx_ref) < 0);
73
- if (joinedMetas.length > 0) {
74
- joins[key] = newPresence;
75
- joins[key].metas = joinedMetas;
76
- }
77
- if (leftMetas.length > 0) {
78
- leaves[key] = this.clone(currentPresence);
79
- leaves[key].metas = leftMetas;
80
- }
81
- }
82
- else {
83
- joins[key] = newPresence;
84
- }
85
- });
86
- return this.syncDiff(state, { joins: joins, leaves: leaves }, onJoin, onLeave);
87
- }
88
- /**
89
- *
90
- * Used to sync a diff of presence join and leave
91
- * events from the server, as they happen. Like `syncState`, `syncDiff`
92
- * accepts optional `onJoin` and `onLeave` callbacks to react to a user
93
- * joining or leaving from a device.
94
- *
95
- * @returns {Presence}
96
- */
97
- static syncDiff(state, diff, onJoin, onLeave) {
98
- let { joins, leaves } = this.clone(diff);
99
- if (!onJoin) {
100
- onJoin = function () { };
101
- }
102
- if (!onLeave) {
103
- onLeave = function () { };
104
- }
105
- this.map(joins, (key, newPresence) => {
106
- let currentPresence = state[key];
107
- state[key] = this.clone(newPresence);
108
- if (currentPresence) {
109
- let joinedRefs = state[key].metas.map(m => m.phx_ref);
110
- let curMetas = currentPresence.metas.filter(m => joinedRefs.indexOf(m.phx_ref) < 0);
111
- state[key].metas.unshift(...curMetas);
112
- }
113
- onJoin(key, currentPresence, newPresence);
114
- });
115
- this.map(leaves, (key, leftPresence) => {
116
- let currentPresence = state[key];
117
- if (!currentPresence) {
118
- return;
119
- }
120
- let refsToRemove = leftPresence.metas.map(m => m.phx_ref);
121
- currentPresence.metas = currentPresence.metas.filter(p => {
122
- return refsToRemove.indexOf(p.phx_ref) < 0;
123
- });
124
- onLeave(key, currentPresence, leftPresence);
125
- if (currentPresence.metas.length === 0) {
126
- delete state[key];
127
- }
128
- });
129
- return state;
130
- }
131
- /**
132
- * Returns the array of presences, with selected metadata.
133
- *
134
- * @param {Object} presences
135
- * @param {Function} chooser
136
- *
137
- * @returns {Presence}
138
- */
139
- static list(presences, chooser) {
140
- if (!chooser) {
141
- chooser = function (key, pres) { return pres; };
142
- }
143
- return this.map(presences, (key, presence) => {
144
- return chooser(key, presence);
145
- });
146
- }
147
- // private
148
- static map(obj, func) {
149
- return Object.getOwnPropertyNames(obj).map(key => func(key, obj[key]));
150
- }
151
- static clone(obj) { return JSON.parse(JSON.stringify(obj)); }
152
- }
@@ -1,57 +0,0 @@
1
- /**
2
- * Initializes the Push
3
- * @param {Channel} channel - The Channel
4
- * @param {string} event - The event, for example `"phx_join"`
5
- * @param {Object} payload - The payload, for example `{user_id: 123}`
6
- * @param {number} timeout - The push timeout in milliseconds
7
- */
8
- export default class Push {
9
- constructor(channel: any, event: any, payload: any, timeout: any);
10
- /**
11
- *
12
- * @param {number} timeout
13
- */
14
- resend(timeout: any): void;
15
- /**
16
- *
17
- */
18
- send(): void;
19
- /**
20
- *
21
- * @param {*} status
22
- * @param {*} callback
23
- */
24
- receive(status: any, callback: any): this;
25
- /**
26
- * @private
27
- */
28
- reset(): void;
29
- /**
30
- * @private
31
- */
32
- matchReceive({ status, response, _ref }: {
33
- status: any;
34
- response: any;
35
- _ref: any;
36
- }): void;
37
- /**
38
- * @private
39
- */
40
- cancelRefEvent(): void;
41
- /**
42
- * @private
43
- */
44
- cancelTimeout(): void;
45
- /**
46
- * @private
47
- */
48
- startTimeout(): void;
49
- /**
50
- * @private
51
- */
52
- hasReceived(status: any): any;
53
- /**
54
- * @private
55
- */
56
- trigger(status: any, response: any): void;
57
- }