@kemu-io/edge-runtime 0.1.30 → 0.2.0
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/runner.d.ts +20 -3
- package/runner.js +2 -2
package/package.json
CHANGED
package/runner.d.ts
CHANGED
|
@@ -110,7 +110,8 @@ declare enum WidgetType {
|
|
|
110
110
|
variable = "variable",
|
|
111
111
|
hubService = "hubService",
|
|
112
112
|
imageFilter = "imageFilter",
|
|
113
|
-
recipeLoad = "recipeLoad"
|
|
113
|
+
recipeLoad = "recipeLoad",
|
|
114
|
+
note = "note"
|
|
114
115
|
}
|
|
115
116
|
export type VariableDefinition = {
|
|
116
117
|
/**
|
|
@@ -137,6 +138,7 @@ export type VariableDefinition = {
|
|
|
137
138
|
export type VarValueChangeEvt = Readonly<Pick<VariableDefinition, "type" | "value"> & {
|
|
138
139
|
varName: string;
|
|
139
140
|
}>;
|
|
141
|
+
export type SendToInputWidgetFn = (inputName: string, data: PartialData | number | string | boolean | Array<any>) => Promise<void>;
|
|
140
142
|
export declare const utils: {
|
|
141
143
|
/**
|
|
142
144
|
* Builds an object that represents an ImageData type. This is useful when services
|
|
@@ -172,8 +174,23 @@ declare const _default: {
|
|
|
172
174
|
**/
|
|
173
175
|
apiKey?: string;
|
|
174
176
|
}) => Promise<{
|
|
175
|
-
/**
|
|
176
|
-
|
|
177
|
+
/**
|
|
178
|
+
* use it to send data to input widgets
|
|
179
|
+
* @param inputName the name of the input widget to send data to.
|
|
180
|
+
* @param data the data to send to the input widget.
|
|
181
|
+
* @example
|
|
182
|
+
* ```typescript
|
|
183
|
+
* await sendToInputWidget('myInputName', 'this is my value');
|
|
184
|
+
* await sendToInputWidget('counter', 1234);
|
|
185
|
+
*
|
|
186
|
+
* // For non primitive types such as images, you can specify the data type
|
|
187
|
+
* await sendToInputWidget('myImageInputName', {
|
|
188
|
+
* type: DataType.ImageData,
|
|
189
|
+
* data: utils.createImageDataLike(image, 100, 200),
|
|
190
|
+
* });
|
|
191
|
+
* ```
|
|
192
|
+
*/
|
|
193
|
+
sendToInputWidget: SendToInputWidgetFn;
|
|
177
194
|
}>;
|
|
178
195
|
terminate: () => Promise<void>;
|
|
179
196
|
/**
|