@dreamcomposer/engine-types 0.0.71 → 0.0.73
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/from-engine/AckMessage.d.ts +21 -0
- package/package.json +1 -1
- package/post-messages.d.ts +7 -0
- package/EngineState.d.ts +0 -4
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { FromEngineMessage } from "../post-messages";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Sent as a response for every message to the engine,
|
|
5
|
+
*/
|
|
6
|
+
export interface AckMessage extends FromEngineMessage<"ack"> {
|
|
7
|
+
payload: {
|
|
8
|
+
/**
|
|
9
|
+
* The nonce that was sent with the message to the engine.
|
|
10
|
+
*
|
|
11
|
+
* Used to identify to what message the ack belongs.
|
|
12
|
+
*/
|
|
13
|
+
nonce: string;
|
|
14
|
+
/**
|
|
15
|
+
* An error if the message to the engine could not be processed by the engine.
|
|
16
|
+
*/
|
|
17
|
+
error?: {
|
|
18
|
+
message?: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
}
|
package/package.json
CHANGED
package/post-messages.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AckMessage } from "./from-engine/AckMessage";
|
|
1
2
|
import { CanvasImageUrlMessage } from "./from-engine/CanvasImageUrlMessage";
|
|
2
3
|
import { EngineReadyMessage } from "./from-engine/EngineReadyMessage";
|
|
3
4
|
import { KeyDownMessage } from "./from-engine/KeyDownMessage";
|
|
@@ -61,10 +62,16 @@ export interface FromEngineMessage<Channel> {
|
|
|
61
62
|
*/
|
|
62
63
|
export interface ToEngineMessage<Channel> {
|
|
63
64
|
channel: Channel;
|
|
65
|
+
/**
|
|
66
|
+
* The nonce is a randomly generated string that is re-send by the engine in
|
|
67
|
+
* the ack message.
|
|
68
|
+
*/
|
|
69
|
+
nonce: string;
|
|
64
70
|
payload?: unknown;
|
|
65
71
|
}
|
|
66
72
|
|
|
67
73
|
export type FromEnginePostMessage =
|
|
74
|
+
| AckMessage
|
|
68
75
|
| CanvasImageUrlMessage
|
|
69
76
|
| DisplayLoadingUiMessage
|
|
70
77
|
| EngineReadyMessage
|
package/EngineState.d.ts
DELETED