@basmilius/homey-common 1.0.4 → 1.0.6
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/dist/flow.d.ts +13 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +4 -4
- package/dist/registry.d.ts +12 -2
- package/dist/types.d.ts +3 -1
- package/package.json +1 -1
- package/src/flow.ts +12 -3
- package/src/index.ts +1 -0
- package/src/registry.ts +16 -2
- package/src/types.ts +3 -1
package/dist/flow.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type Homey from "homey";
|
|
2
2
|
import { type App, Shortcuts } from "./app";
|
|
3
|
+
import type { Device } from "./device";
|
|
3
4
|
import type { AutocompleteProvider, FlowCardType } from "./types";
|
|
4
5
|
export declare abstract class FlowEntity<
|
|
5
6
|
TApp extends App<TApp>,
|
|
@@ -29,12 +30,22 @@ export declare abstract class FlowConditionEntity<
|
|
|
29
30
|
TArgs = unknown,
|
|
30
31
|
TState = unknown
|
|
31
32
|
> extends FlowEntity<TApp, Homey.FlowCardCondition, TArgs, TState, boolean> {}
|
|
33
|
+
export declare abstract class FlowDeviceTriggerEntity<
|
|
34
|
+
TApp extends App<TApp>,
|
|
35
|
+
TDevice extends Device<TApp>,
|
|
36
|
+
TArgs = unknown,
|
|
37
|
+
TState = unknown,
|
|
38
|
+
TTokens = unknown
|
|
39
|
+
> extends FlowEntity<TApp, Homey.FlowCardTriggerDevice, TArgs, TState, boolean> {
|
|
40
|
+
trigger(device: TDevice, state: TState, tokens?: TTokens): Promise<any>;
|
|
41
|
+
}
|
|
32
42
|
export declare abstract class FlowTriggerEntity<
|
|
33
43
|
TApp extends App<TApp>,
|
|
34
44
|
TArgs = unknown,
|
|
35
|
-
TState = unknown
|
|
45
|
+
TState = unknown,
|
|
46
|
+
TTokens = unknown
|
|
36
47
|
> extends FlowEntity<TApp, Homey.FlowCardTrigger, TArgs, TState, boolean> {
|
|
37
|
-
trigger(state: TState, tokens?:
|
|
48
|
+
trigger(state: TState, tokens?: TTokens): Promise<any>;
|
|
38
49
|
}
|
|
39
50
|
export declare abstract class FlowAutocompleteProvider<TApp extends App<TApp>> extends Shortcuts<TApp> {
|
|
40
51
|
abstract find(query: string, args: Record<string, unknown>): Promise<Homey.FlowCard.ArgumentAutocompleteResults>;
|
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,6 @@ export type { ApiRequest, Color, Constructor, FlowCardType, Icon, Language, Widg
|
|
|
2
2
|
export { App, Shortcuts } from "./app";
|
|
3
3
|
export { action, autocomplete, condition, trigger } from "./decorator";
|
|
4
4
|
export { Device, Driver } from "./device";
|
|
5
|
-
export { FlowEntity, FlowActionEntity, FlowAutocompleteProvider, FlowConditionEntity, FlowTriggerEntity } from "./flow";
|
|
5
|
+
export { FlowEntity, FlowActionEntity, FlowAutocompleteProvider, FlowConditionEntity, FlowDeviceTriggerEntity, FlowTriggerEntity } from "./flow";
|
|
6
6
|
export { Registry } from "./registry";
|
|
7
7
|
export { colors, icons } from "./data";
|