@jdg-keyforge/protocol 0.6.0 → 0.7.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/dist/common.d.ts +51 -1
- package/dist/methods/create_profile.d.ts +1 -1
- package/dist/methods/duplicate_profile.d.ts +1 -1
- package/dist/methods/list_bindings.d.ts +1 -1
- package/dist/methods/list_profiles.d.ts +1 -1
- package/dist/methods/set_binding.d.ts +1 -1
- package/package.json +1 -1
- package/src/common.ts +51 -1
- package/src/methods/create_profile.ts +1 -1
- package/src/methods/duplicate_profile.ts +1 -1
- package/src/methods/list_bindings.ts +1 -1
- package/src/methods/list_profiles.ts +1 -1
- package/src/methods/set_binding.ts +1 -1
package/dist/common.d.ts
CHANGED
|
@@ -61,12 +61,62 @@ export interface Action {
|
|
|
61
61
|
*/
|
|
62
62
|
type: string;
|
|
63
63
|
/**
|
|
64
|
-
* Action-specific parameters. Schema depends on 'type'.
|
|
64
|
+
* Action-specific parameters. Schema depends on 'type'. The daemon validates them against the per-type ActionParams definition (e.g. DelayActionParams for type 'delay').
|
|
65
65
|
*/
|
|
66
66
|
params?: {
|
|
67
67
|
[k: string]: unknown;
|
|
68
68
|
};
|
|
69
69
|
}
|
|
70
|
+
/**
|
|
71
|
+
* Params for the built-in 'send_keys' action: types a key combination.
|
|
72
|
+
*
|
|
73
|
+
* This interface was referenced by `CommonTypes`'s JSON-Schema
|
|
74
|
+
* via the `definition` "SendKeysActionParams".
|
|
75
|
+
*/
|
|
76
|
+
export interface SendKeysActionParams {
|
|
77
|
+
/**
|
|
78
|
+
* Key combination to send, e.g. 'Ctrl+Shift+S'.
|
|
79
|
+
*/
|
|
80
|
+
keys: string;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Params for the built-in 'launch_app' action: launches an application.
|
|
84
|
+
*
|
|
85
|
+
* This interface was referenced by `CommonTypes`'s JSON-Schema
|
|
86
|
+
* via the `definition` "LaunchAppActionParams".
|
|
87
|
+
*/
|
|
88
|
+
export interface LaunchAppActionParams {
|
|
89
|
+
/**
|
|
90
|
+
* Absolute path to the application or executable to launch.
|
|
91
|
+
*/
|
|
92
|
+
path: string;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Params for the built-in 'delay' action: waits for the given duration. Mainly useful as a step inside a macro.
|
|
96
|
+
*
|
|
97
|
+
* This interface was referenced by `CommonTypes`'s JSON-Schema
|
|
98
|
+
* via the `definition` "DelayActionParams".
|
|
99
|
+
*/
|
|
100
|
+
export interface DelayActionParams {
|
|
101
|
+
/**
|
|
102
|
+
* Milliseconds to wait before continuing.
|
|
103
|
+
*/
|
|
104
|
+
ms: number;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Params for the built-in 'macro' action: runs a sequence of actions in order. The schema allows any Action as a step; the daemon rejects nested macros (a step whose type is 'macro').
|
|
108
|
+
*
|
|
109
|
+
* This interface was referenced by `CommonTypes`'s JSON-Schema
|
|
110
|
+
* via the `definition` "MacroActionParams".
|
|
111
|
+
*/
|
|
112
|
+
export interface MacroActionParams {
|
|
113
|
+
/**
|
|
114
|
+
* Actions to run in order. Must contain at least one step.
|
|
115
|
+
*
|
|
116
|
+
* @minItems 1
|
|
117
|
+
*/
|
|
118
|
+
steps: [Action, ...Action[]];
|
|
119
|
+
}
|
|
70
120
|
/**
|
|
71
121
|
* Maps an input on a specific device to an action.
|
|
72
122
|
*
|
|
@@ -60,7 +60,7 @@ export interface Action {
|
|
|
60
60
|
*/
|
|
61
61
|
type: string;
|
|
62
62
|
/**
|
|
63
|
-
* Action-specific parameters. Schema depends on 'type'.
|
|
63
|
+
* Action-specific parameters. Schema depends on 'type'. The daemon validates them against the per-type ActionParams definition (e.g. DelayActionParams for type 'delay').
|
|
64
64
|
*/
|
|
65
65
|
params?: {
|
|
66
66
|
[k: string]: unknown;
|
|
@@ -64,7 +64,7 @@ export interface Action {
|
|
|
64
64
|
*/
|
|
65
65
|
type: string;
|
|
66
66
|
/**
|
|
67
|
-
* Action-specific parameters. Schema depends on 'type'.
|
|
67
|
+
* Action-specific parameters. Schema depends on 'type'. The daemon validates them against the per-type ActionParams definition (e.g. DelayActionParams for type 'delay').
|
|
68
68
|
*/
|
|
69
69
|
params?: {
|
|
70
70
|
[k: string]: unknown;
|
|
@@ -44,7 +44,7 @@ export interface Action {
|
|
|
44
44
|
*/
|
|
45
45
|
type: string;
|
|
46
46
|
/**
|
|
47
|
-
* Action-specific parameters. Schema depends on 'type'.
|
|
47
|
+
* Action-specific parameters. Schema depends on 'type'. The daemon validates them against the per-type ActionParams definition (e.g. DelayActionParams for type 'delay').
|
|
48
48
|
*/
|
|
49
49
|
params?: {
|
|
50
50
|
[k: string]: unknown;
|
|
@@ -65,7 +65,7 @@ export interface Action {
|
|
|
65
65
|
*/
|
|
66
66
|
type: string;
|
|
67
67
|
/**
|
|
68
|
-
* Action-specific parameters. Schema depends on 'type'.
|
|
68
|
+
* Action-specific parameters. Schema depends on 'type'. The daemon validates them against the per-type ActionParams definition (e.g. DelayActionParams for type 'delay').
|
|
69
69
|
*/
|
|
70
70
|
params?: {
|
|
71
71
|
[k: string]: unknown;
|
|
@@ -41,7 +41,7 @@ export interface Action {
|
|
|
41
41
|
*/
|
|
42
42
|
type: string;
|
|
43
43
|
/**
|
|
44
|
-
* Action-specific parameters. Schema depends on 'type'.
|
|
44
|
+
* Action-specific parameters. Schema depends on 'type'. The daemon validates them against the per-type ActionParams definition (e.g. DelayActionParams for type 'delay').
|
|
45
45
|
*/
|
|
46
46
|
params?: {
|
|
47
47
|
[k: string]: unknown;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jdg-keyforge/protocol",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "TypeScript types for the KeyForge WebSocket protocol, generated from the canonical JSON Schema contracts.",
|
|
5
5
|
"keywords": ["keyforge", "protocol", "types", "json-schema", "websocket"],
|
|
6
6
|
"license": "Apache-2.0",
|
package/src/common.ts
CHANGED
|
@@ -64,12 +64,62 @@ export interface Action {
|
|
|
64
64
|
*/
|
|
65
65
|
type: string;
|
|
66
66
|
/**
|
|
67
|
-
* Action-specific parameters. Schema depends on 'type'.
|
|
67
|
+
* Action-specific parameters. Schema depends on 'type'. The daemon validates them against the per-type ActionParams definition (e.g. DelayActionParams for type 'delay').
|
|
68
68
|
*/
|
|
69
69
|
params?: {
|
|
70
70
|
[k: string]: unknown;
|
|
71
71
|
};
|
|
72
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* Params for the built-in 'send_keys' action: types a key combination.
|
|
75
|
+
*
|
|
76
|
+
* This interface was referenced by `CommonTypes`'s JSON-Schema
|
|
77
|
+
* via the `definition` "SendKeysActionParams".
|
|
78
|
+
*/
|
|
79
|
+
export interface SendKeysActionParams {
|
|
80
|
+
/**
|
|
81
|
+
* Key combination to send, e.g. 'Ctrl+Shift+S'.
|
|
82
|
+
*/
|
|
83
|
+
keys: string;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Params for the built-in 'launch_app' action: launches an application.
|
|
87
|
+
*
|
|
88
|
+
* This interface was referenced by `CommonTypes`'s JSON-Schema
|
|
89
|
+
* via the `definition` "LaunchAppActionParams".
|
|
90
|
+
*/
|
|
91
|
+
export interface LaunchAppActionParams {
|
|
92
|
+
/**
|
|
93
|
+
* Absolute path to the application or executable to launch.
|
|
94
|
+
*/
|
|
95
|
+
path: string;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Params for the built-in 'delay' action: waits for the given duration. Mainly useful as a step inside a macro.
|
|
99
|
+
*
|
|
100
|
+
* This interface was referenced by `CommonTypes`'s JSON-Schema
|
|
101
|
+
* via the `definition` "DelayActionParams".
|
|
102
|
+
*/
|
|
103
|
+
export interface DelayActionParams {
|
|
104
|
+
/**
|
|
105
|
+
* Milliseconds to wait before continuing.
|
|
106
|
+
*/
|
|
107
|
+
ms: number;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Params for the built-in 'macro' action: runs a sequence of actions in order. The schema allows any Action as a step; the daemon rejects nested macros (a step whose type is 'macro').
|
|
111
|
+
*
|
|
112
|
+
* This interface was referenced by `CommonTypes`'s JSON-Schema
|
|
113
|
+
* via the `definition` "MacroActionParams".
|
|
114
|
+
*/
|
|
115
|
+
export interface MacroActionParams {
|
|
116
|
+
/**
|
|
117
|
+
* Actions to run in order. Must contain at least one step.
|
|
118
|
+
*
|
|
119
|
+
* @minItems 1
|
|
120
|
+
*/
|
|
121
|
+
steps: [Action, ...Action[]];
|
|
122
|
+
}
|
|
73
123
|
/**
|
|
74
124
|
* Maps an input on a specific device to an action.
|
|
75
125
|
*
|
|
@@ -63,7 +63,7 @@ export interface Action {
|
|
|
63
63
|
*/
|
|
64
64
|
type: string;
|
|
65
65
|
/**
|
|
66
|
-
* Action-specific parameters. Schema depends on 'type'.
|
|
66
|
+
* Action-specific parameters. Schema depends on 'type'. The daemon validates them against the per-type ActionParams definition (e.g. DelayActionParams for type 'delay').
|
|
67
67
|
*/
|
|
68
68
|
params?: {
|
|
69
69
|
[k: string]: unknown;
|
|
@@ -67,7 +67,7 @@ export interface Action {
|
|
|
67
67
|
*/
|
|
68
68
|
type: string;
|
|
69
69
|
/**
|
|
70
|
-
* Action-specific parameters. Schema depends on 'type'.
|
|
70
|
+
* Action-specific parameters. Schema depends on 'type'. The daemon validates them against the per-type ActionParams definition (e.g. DelayActionParams for type 'delay').
|
|
71
71
|
*/
|
|
72
72
|
params?: {
|
|
73
73
|
[k: string]: unknown;
|
|
@@ -47,7 +47,7 @@ export interface Action {
|
|
|
47
47
|
*/
|
|
48
48
|
type: string;
|
|
49
49
|
/**
|
|
50
|
-
* Action-specific parameters. Schema depends on 'type'.
|
|
50
|
+
* Action-specific parameters. Schema depends on 'type'. The daemon validates them against the per-type ActionParams definition (e.g. DelayActionParams for type 'delay').
|
|
51
51
|
*/
|
|
52
52
|
params?: {
|
|
53
53
|
[k: string]: unknown;
|
|
@@ -68,7 +68,7 @@ export interface Action {
|
|
|
68
68
|
*/
|
|
69
69
|
type: string;
|
|
70
70
|
/**
|
|
71
|
-
* Action-specific parameters. Schema depends on 'type'.
|
|
71
|
+
* Action-specific parameters. Schema depends on 'type'. The daemon validates them against the per-type ActionParams definition (e.g. DelayActionParams for type 'delay').
|
|
72
72
|
*/
|
|
73
73
|
params?: {
|
|
74
74
|
[k: string]: unknown;
|
|
@@ -44,7 +44,7 @@ export interface Action {
|
|
|
44
44
|
*/
|
|
45
45
|
type: string;
|
|
46
46
|
/**
|
|
47
|
-
* Action-specific parameters. Schema depends on 'type'.
|
|
47
|
+
* Action-specific parameters. Schema depends on 'type'. The daemon validates them against the per-type ActionParams definition (e.g. DelayActionParams for type 'delay').
|
|
48
48
|
*/
|
|
49
49
|
params?: {
|
|
50
50
|
[k: string]: unknown;
|