@basmilius/homey-common 0.0.10 → 0.0.11
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/types.d.ts +52 -0
- package/package.json +2 -2
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type Homey from 'homey/lib/Homey';
|
|
2
|
+
import type { App } from './app';
|
|
3
|
+
import type { FlowActionEntity, FlowAutocompleteProvider, FlowConditionEntity, FlowTriggerEntity } from './flow';
|
|
4
|
+
|
|
5
|
+
export type Constructor<T = {}> = new (...args: any[]) => T;
|
|
6
|
+
|
|
7
|
+
export type Action<TApp extends App<TApp>, TEntity extends FlowActionEntity<TApp>> = new (app: TApp) => TEntity;
|
|
8
|
+
export type AutocompleteProvider<TApp extends App<TApp>, TEntity extends FlowAutocompleteProvider<TApp>> = new (app: TApp) => TEntity;
|
|
9
|
+
export type Condition<TApp extends App<TApp>, TEntity extends FlowConditionEntity<TApp>> = new (app: TApp) => TEntity;
|
|
10
|
+
export type Trigger<TApp extends App<TApp>, TEntity extends FlowTriggerEntity<TApp>> = new (app: TApp) => TEntity;
|
|
11
|
+
|
|
12
|
+
export type FlowCardType =
|
|
13
|
+
| 'action'
|
|
14
|
+
| 'condition'
|
|
15
|
+
| 'trigger';
|
|
16
|
+
|
|
17
|
+
export type Color = {
|
|
18
|
+
readonly hex: string;
|
|
19
|
+
readonly label: string;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export type Icon = {
|
|
23
|
+
readonly id: string;
|
|
24
|
+
readonly name: string;
|
|
25
|
+
readonly unicode: string;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export type Language =
|
|
29
|
+
| 'en'
|
|
30
|
+
| 'nl'
|
|
31
|
+
| 'de'
|
|
32
|
+
| 'es'
|
|
33
|
+
| 'fr'
|
|
34
|
+
| 'it'
|
|
35
|
+
| 'ko'
|
|
36
|
+
| 'no'
|
|
37
|
+
| 'pl'
|
|
38
|
+
| 'ru'
|
|
39
|
+
| 'sv';
|
|
40
|
+
|
|
41
|
+
export type ApiRequest<TApp> = {
|
|
42
|
+
readonly homey: Homey & {
|
|
43
|
+
readonly app: TApp;
|
|
44
|
+
};
|
|
45
|
+
readonly body: any;
|
|
46
|
+
readonly params: Record<string, unknown>;
|
|
47
|
+
readonly query: Record<string, string>;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export type WidgetApiRequest<TApp> = ApiRequest<TApp> & {
|
|
51
|
+
readonly widgetInstanceId: string;
|
|
52
|
+
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@basmilius/homey-common",
|
|
3
3
|
"description": "Common code shared across my Homey apps.",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.11",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"funding": "https://github.com/sponsors/basmilius",
|
|
7
7
|
"author": {
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"./*": "./*"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@basmilius/tools": "^2.
|
|
47
|
+
"@basmilius/tools": "^2.15.0",
|
|
48
48
|
"@tsconfig/node18": "^18.2.6",
|
|
49
49
|
"@types/bun": "^1.3.2",
|
|
50
50
|
"@types/homey": "npm:homey-apps-sdk-v3-types@^0.3.12",
|