@elgato/streamdeck
Version:
The official Node.js SDK for creating Stream Deck plugins.
37 lines (36 loc) • 2.92 kB
TypeScript
import type { Manifest } from "../../api/index.js";
import type { Constructor, Unpack } from "../common/utils.js";
import type { SingletonAction } from "./singleton-action.js";
/**
* Definition used to define an action.
*/
type ActionDefinition = Pick<Unpack<Manifest["Actions"]>, "UUID">;
/**
* Defines a Stream Deck action associated with the plugin.
* @param definition The definition of the action, e.g. it's identifier, name, etc.
* @returns The definition decorator.
*/
export declare function action(definition: ActionDefinition): <T extends Constructor<SingletonAction>>(target: T, context: ClassDecoratorContext) => {
new (...args: any[]): {
/**
* The universally-unique value that identifies the action within the manifest.
*/
readonly manifestId: string | undefined;
get actions(): import("@elgato/utils").Enumerable<import("./dial.js").DialAction<import("@elgato/utils").JsonObject> | import("./key.js").KeyAction<import("@elgato/utils").JsonObject>>;
onDialDown?(ev: import("../index.js").DialDownEvent<import("@elgato/utils").JsonObject>): Promise<void> | void;
onDialRotate?(ev: import("../index.js").DialRotateEvent<import("@elgato/utils").JsonObject>): Promise<void> | void;
onDialUp?(ev: import("../index.js").DialUpEvent<import("@elgato/utils").JsonObject>): Promise<void> | void;
onDidReceiveResources?(ev: import("../index.js").DidReceiveResourcesEvent<import("@elgato/utils").JsonObject>): Promise<void> | void;
onDidReceiveSettings?(ev: import("../index.js").DidReceiveSettingsEvent<import("@elgato/utils").JsonObject>): Promise<void> | void;
onKeyDown?(ev: import("../index.js").KeyDownEvent<import("@elgato/utils").JsonObject>): Promise<void> | void;
onKeyUp?(ev: import("../index.js").KeyUpEvent<import("@elgato/utils").JsonObject>): Promise<void> | void;
onPropertyInspectorDidAppear?(ev: import("../index.js").PropertyInspectorDidAppearEvent<import("@elgato/utils").JsonObject>): Promise<void> | void;
onPropertyInspectorDidDisappear?(ev: import("../index.js").PropertyInspectorDidDisappearEvent<import("@elgato/utils").JsonObject>): Promise<void> | void;
onSendToPlugin?(ev: import("../index.js").SendToPluginEvent<import("@elgato/utils").JsonValue, import("@elgato/utils").JsonObject>): Promise<void> | void;
onTitleParametersDidChange?(ev: import("../index.js").TitleParametersDidChangeEvent<import("@elgato/utils").JsonObject>): Promise<void> | void;
onTouchTap?(ev: import("../index.js").TouchTapEvent<import("@elgato/utils").JsonObject>): Promise<void> | void;
onWillAppear?(ev: import("../index.js").WillAppearEvent<import("@elgato/utils").JsonObject>): Promise<void> | void;
onWillDisappear?(ev: import("../index.js").WillDisappearEvent<import("@elgato/utils").JsonObject>): Promise<void> | void;
};
} & T;
export {};