@frockbot/applet-sdk 0.7.260 → 0.7.262
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/package.json +1 -1
- package/plugin/index.d.ts +10 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frockbot/applet-sdk",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.262",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Authoring SDK for FrockBot Plugins: the declarations a Plugin is written against, and the build pipeline the cloud build service runs.",
|
package/plugin/index.d.ts
CHANGED
|
@@ -852,11 +852,20 @@ export type PluginHooks = {
|
|
|
852
852
|
|
|
853
853
|
/**
|
|
854
854
|
* One delivery handed to a trigger: the posted body as it arrived, and the
|
|
855
|
-
* headers lower-cased with the door's own credential removed.
|
|
855
|
+
* headers lower-cased with the door's own credential removed. An event the
|
|
856
|
+
* Plugin's own device module emitted carries `source`: its payload is the
|
|
857
|
+
* body as JSON text, and there are no headers.
|
|
856
858
|
*/
|
|
857
859
|
export interface PluginTriggerDelivery {
|
|
858
860
|
headers: Record<string, string>;
|
|
859
861
|
body: string;
|
|
862
|
+
source?: {
|
|
863
|
+
kind: "device-module";
|
|
864
|
+
moduleId: string;
|
|
865
|
+
machineId: string;
|
|
866
|
+
/** The key the module emitted with: the source's id for the occurrence. */
|
|
867
|
+
key: string;
|
|
868
|
+
};
|
|
860
869
|
}
|
|
861
870
|
|
|
862
871
|
/** A trigger's refusal: the Routine does not fire, and the receipt says why. */
|