@companion-module/base 1.13.2 → 1.13.3
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/CHANGELOG.md +8 -0
- package/package.json +58 -58
- package/dist/common/json-value.d.ts +0 -33
- package/dist/common/json-value.d.ts.map +0 -1
- package/dist/common/json-value.js +0 -5
- package/dist/common/json-value.js.map +0 -1
- package/dist/common/osc.d.ts +0 -17
- package/dist/common/osc.d.ts.map +0 -1
- package/dist/common/osc.js +0 -7
- package/dist/common/osc.js.map +0 -1
- package/dist/entrypoint.d.ts +0 -11
- package/dist/entrypoint.d.ts.map +0 -1
- package/dist/entrypoint.js +0 -134
- package/dist/entrypoint.js.map +0 -1
- package/dist/helpers/index.d.ts +0 -4
- package/dist/helpers/index.d.ts.map +0 -1
- package/dist/helpers/index.js +0 -10
- package/dist/helpers/index.js.map +0 -1
- package/dist/helpers/tcp.d.ts +0 -31
- package/dist/helpers/tcp.d.ts.map +0 -1
- package/dist/helpers/tcp.js +0 -164
- package/dist/helpers/tcp.js.map +0 -1
- package/dist/helpers/telnet.d.ts +0 -18
- package/dist/helpers/telnet.d.ts.map +0 -1
- package/dist/helpers/telnet.js +0 -169
- package/dist/helpers/telnet.js.map +0 -1
- package/dist/helpers/udp.d.ts +0 -33
- package/dist/helpers/udp.d.ts.map +0 -1
- package/dist/helpers/udp.js +0 -126
- package/dist/helpers/udp.js.map +0 -1
- package/dist/host-api/api.d.ts +0 -383
- package/dist/host-api/api.d.ts.map +0 -1
- package/dist/host-api/api.js +0 -9
- package/dist/host-api/api.js.map +0 -1
- package/dist/host-api/ipc-wrapper.d.ts +0 -37
- package/dist/host-api/ipc-wrapper.d.ts.map +0 -1
- package/dist/host-api/ipc-wrapper.js +0 -128
- package/dist/host-api/ipc-wrapper.js.map +0 -1
- package/dist/host-api/versions.d.ts +0 -12
- package/dist/host-api/versions.d.ts.map +0 -1
- package/dist/host-api/versions.js +0 -5
- package/dist/host-api/versions.js.map +0 -1
- package/dist/index.d.ts +0 -8
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -22
- package/dist/index.js.map +0 -1
- package/dist/instance-base.d.ts +0 -12
- package/dist/instance-base.d.ts.map +0 -1
- package/dist/instance-base.js +0 -3
- package/dist/instance-base.js.map +0 -1
- package/dist/internal/actions.d.ts +0 -16
- package/dist/internal/actions.d.ts.map +0 -1
- package/dist/internal/actions.js +0 -207
- package/dist/internal/actions.js.map +0 -1
- package/dist/internal/base.d.ts +0 -11
- package/dist/internal/base.d.ts.map +0 -1
- package/dist/internal/base.js +0 -39
- package/dist/internal/base.js.map +0 -1
- package/dist/internal/feedback.d.ts +0 -20
- package/dist/internal/feedback.d.ts.map +0 -1
- package/dist/internal/feedback.js +0 -307
- package/dist/internal/feedback.js.map +0 -1
- package/dist/internal/upgrade.d.ts +0 -15
- package/dist/internal/upgrade.d.ts.map +0 -1
- package/dist/internal/upgrade.js +0 -174
- package/dist/internal/upgrade.js.map +0 -1
- package/dist/manifest.d.ts +0 -5
- package/dist/manifest.d.ts.map +0 -1
- package/dist/manifest.js +0 -37
- package/dist/manifest.js.map +0 -1
- package/dist/module-api/action.d.ts +0 -100
- package/dist/module-api/action.d.ts.map +0 -1
- package/dist/module-api/action.js +0 -3
- package/dist/module-api/action.js.map +0 -1
- package/dist/module-api/base.d.ts +0 -198
- package/dist/module-api/base.d.ts.map +0 -1
- package/dist/module-api/base.js +0 -486
- package/dist/module-api/base.js.map +0 -1
- package/dist/module-api/common.d.ts +0 -14
- package/dist/module-api/common.d.ts.map +0 -1
- package/dist/module-api/common.js +0 -3
- package/dist/module-api/common.js.map +0 -1
- package/dist/module-api/config.d.ts +0 -12
- package/dist/module-api/config.d.ts.map +0 -1
- package/dist/module-api/config.js +0 -3
- package/dist/module-api/config.js.map +0 -1
- package/dist/module-api/enums.d.ts +0 -31
- package/dist/module-api/enums.d.ts.map +0 -1
- package/dist/module-api/enums.js +0 -37
- package/dist/module-api/enums.js.map +0 -1
- package/dist/module-api/feedback.d.ts +0 -147
- package/dist/module-api/feedback.d.ts.map +0 -1
- package/dist/module-api/feedback.js +0 -3
- package/dist/module-api/feedback.js.map +0 -1
- package/dist/module-api/http.d.ts +0 -17
- package/dist/module-api/http.d.ts.map +0 -1
- package/dist/module-api/http.js +0 -3
- package/dist/module-api/http.js.map +0 -1
- package/dist/module-api/index.d.ts +0 -13
- package/dist/module-api/index.d.ts.map +0 -1
- package/dist/module-api/index.js +0 -15
- package/dist/module-api/index.js.map +0 -1
- package/dist/module-api/input.d.ts +0 -392
- package/dist/module-api/input.d.ts.map +0 -1
- package/dist/module-api/input.js +0 -3
- package/dist/module-api/input.js.map +0 -1
- package/dist/module-api/preset.d.ts +0 -111
- package/dist/module-api/preset.d.ts.map +0 -1
- package/dist/module-api/preset.js +0 -3
- package/dist/module-api/preset.js.map +0 -1
- package/dist/module-api/shared-udp-socket.d.ts +0 -60
- package/dist/module-api/shared-udp-socket.d.ts.map +0 -1
- package/dist/module-api/shared-udp-socket.js +0 -178
- package/dist/module-api/shared-udp-socket.js.map +0 -1
- package/dist/module-api/style.d.ts +0 -20
- package/dist/module-api/style.d.ts.map +0 -1
- package/dist/module-api/style.js +0 -3
- package/dist/module-api/style.js.map +0 -1
- package/dist/module-api/upgrade.d.ts +0 -118
- package/dist/module-api/upgrade.d.ts.map +0 -1
- package/dist/module-api/upgrade.js +0 -95
- package/dist/module-api/upgrade.js.map +0 -1
- package/dist/module-api/variable.d.ts +0 -18
- package/dist/module-api/variable.d.ts.map +0 -1
- package/dist/module-api/variable.js +0 -3
- package/dist/module-api/variable.js.map +0 -1
- package/dist/util.d.ts +0 -97
- package/dist/util.d.ts.map +0 -1
- package/dist/util.js +0 -177
- package/dist/util.js.map +0 -1
- package/generated/manifest.d.ts +0 -133
- package/generated/validate_manifest.js +0 -1
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import type { CompanionCommonCallbackContext } from './common.js';
|
|
2
|
-
import type { CompanionOptionValues, CompanionInputFieldCheckbox, CompanionInputFieldColor, CompanionInputFieldDropdown, CompanionInputFieldMultiDropdown, CompanionInputFieldNumber, CompanionInputFieldStaticText, CompanionInputFieldTextInput, CompanionInputFieldCustomVariable } from './input.js';
|
|
3
|
-
import type { CompanionVariableValue } from './variable.js';
|
|
4
|
-
export type SomeCompanionActionInputField = CompanionInputFieldStaticText | CompanionInputFieldColor | CompanionInputFieldTextInput | CompanionInputFieldDropdown | CompanionInputFieldMultiDropdown | CompanionInputFieldNumber | CompanionInputFieldCheckbox | CompanionInputFieldCustomVariable;
|
|
5
|
-
/**
|
|
6
|
-
* Utility functions available in the context of the current action
|
|
7
|
-
*/
|
|
8
|
-
export interface CompanionActionContext extends CompanionCommonCallbackContext {
|
|
9
|
-
/**
|
|
10
|
-
* @deprecated Experimental: This method may change without notice. Do not use!
|
|
11
|
-
* Set the value of a custom variable
|
|
12
|
-
* @param variableName
|
|
13
|
-
* @param value
|
|
14
|
-
* @returns Promise which resolves upon success, or rejects if the variable no longer exists
|
|
15
|
-
*/
|
|
16
|
-
setCustomVariableValue(variableName: string, value: CompanionVariableValue): void;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* The definition of an action
|
|
20
|
-
*/
|
|
21
|
-
export interface CompanionActionDefinition {
|
|
22
|
-
/** Name to show in the actions list */
|
|
23
|
-
name: string;
|
|
24
|
-
/** Additional description of the action */
|
|
25
|
-
description?: string;
|
|
26
|
-
/** The input fields for the action */
|
|
27
|
-
options: SomeCompanionActionInputField[];
|
|
28
|
-
/**
|
|
29
|
-
* Ignore changes to certain options and don't allow them to trigger the subscribe/unsubscribe callbacks
|
|
30
|
-
* This allows for ensuring that the subscribe callback is only called when values the action cares about change
|
|
31
|
-
*/
|
|
32
|
-
optionsToIgnoreForSubscribe?: string[];
|
|
33
|
-
/**
|
|
34
|
-
* If true, the unsubscribe callback will not be called when the options change, only when the action is removed or disabled
|
|
35
|
-
*/
|
|
36
|
-
skipUnsubscribeOnOptionsChange?: boolean;
|
|
37
|
-
/** Called to execute the action */
|
|
38
|
-
callback: (action: CompanionActionEvent, context: CompanionActionContext) => Promise<void> | void;
|
|
39
|
-
/**
|
|
40
|
-
* Called to report the existence of an action
|
|
41
|
-
* Useful to ensure necessary data is loaded
|
|
42
|
-
*/
|
|
43
|
-
subscribe?: (action: CompanionActionInfo, context: CompanionActionContext) => Promise<void> | void;
|
|
44
|
-
/**
|
|
45
|
-
* Called to report an action has been edited/removed
|
|
46
|
-
* Useful to cleanup subscriptions setup in subscribe
|
|
47
|
-
*/
|
|
48
|
-
unsubscribe?: (action: CompanionActionInfo, context: CompanionActionContext) => Promise<void> | void;
|
|
49
|
-
/**
|
|
50
|
-
* The user requested to 'learn' the values for this action.
|
|
51
|
-
*/
|
|
52
|
-
learn?: (action: CompanionActionEvent, context: CompanionActionContext) => CompanionOptionValues | undefined | Promise<CompanionOptionValues | undefined>;
|
|
53
|
-
/**
|
|
54
|
-
* Timeout for the 'learn' function (in milliseconds)
|
|
55
|
-
* Companion sets a default value of 5s, to ensure that the learn does not get stuck never completing
|
|
56
|
-
* You can change this if this number does not work for you, but you should keep it to a sensible value
|
|
57
|
-
*/
|
|
58
|
-
learnTimeout?: number;
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* The definitions of a group of actions
|
|
62
|
-
*/
|
|
63
|
-
export interface CompanionActionDefinitions {
|
|
64
|
-
[actionId: string]: CompanionActionDefinition | undefined;
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Basic information about an instance of an action
|
|
68
|
-
*/
|
|
69
|
-
export interface CompanionActionInfo {
|
|
70
|
-
/** The unique id for this action */
|
|
71
|
-
readonly id: string;
|
|
72
|
-
/** The unique id for the location of this action */
|
|
73
|
-
readonly controlId: string;
|
|
74
|
-
/** The id of the action definition */
|
|
75
|
-
readonly actionId: string;
|
|
76
|
-
/** The user selected options for the action */
|
|
77
|
-
readonly options: CompanionOptionValues;
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Extended information for execution of an action
|
|
81
|
-
*/
|
|
82
|
-
export interface CompanionActionEvent extends CompanionActionInfo {
|
|
83
|
-
/** Identifier of the surface which triggered this action */
|
|
84
|
-
readonly surfaceId: string | undefined;
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* Information about an action which has been recorded
|
|
88
|
-
*/
|
|
89
|
-
export interface CompanionRecordedAction {
|
|
90
|
-
/** The id of the action definition */
|
|
91
|
-
actionId: string;
|
|
92
|
-
/** The user selected options for the action */
|
|
93
|
-
options: CompanionOptionValues;
|
|
94
|
-
/**
|
|
95
|
-
* Delay to give to this action
|
|
96
|
-
* This is always relative to the previous action
|
|
97
|
-
*/
|
|
98
|
-
delay?: number;
|
|
99
|
-
}
|
|
100
|
-
//# sourceMappingURL=action.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"action.d.ts","sourceRoot":"","sources":["../../src/module-api/action.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,aAAa,CAAA;AACjE,OAAO,KAAK,EACX,qBAAqB,EACrB,2BAA2B,EAC3B,wBAAwB,EACxB,2BAA2B,EAC3B,gCAAgC,EAChC,yBAAyB,EACzB,6BAA6B,EAC7B,4BAA4B,EAC5B,iCAAiC,EACjC,MAAM,YAAY,CAAA;AACnB,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAA;AAE3D,MAAM,MAAM,6BAA6B,GACtC,6BAA6B,GAC7B,wBAAwB,GACxB,4BAA4B,GAC5B,2BAA2B,GAC3B,gCAAgC,GAChC,yBAAyB,GACzB,2BAA2B,GAC3B,iCAAiC,CAAA;AAEpC;;GAEG;AACH,MAAM,WAAW,sBAAuB,SAAQ,8BAA8B;IAC7E;;;;;;OAMG;IACH,sBAAsB,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,sBAAsB,GAAG,IAAI,CAAA;CACjF;AAED;;GAEG;AACH,MAAM,WAAW,yB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AA+C;IAC/C,QAAQ,CAAC,OAAO,EAAE,qBAAqB,CAAA;CACvC;AAED;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,mBAAmB;IAChE,4DAA4D;IAC5D,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,CAAA;CACtC;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACvC,sCAAsC;IACtC,QAAQ,EAAE,MAAM,CAAA;IAChB,+CAA+C;IAC/C,OAAO,EAAE,qBAAqB,CAAA;IAE9B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;CACd"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"action.js","sourceRoot":"","sources":["../../src/module-api/action.ts"],"names":[],"mappings":""}
|
|
@@ -1,198 +0,0 @@
|
|
|
1
|
-
import type { CompanionActionDefinitions, CompanionRecordedAction } from './action.js';
|
|
2
|
-
import type { CompanionFeedbackDefinitions } from './feedback.js';
|
|
3
|
-
import type { CompanionPresetDefinitions } from './preset.js';
|
|
4
|
-
import type { InstanceStatus, LogLevel } from './enums.js';
|
|
5
|
-
import type { InstanceBaseShared } from '../instance-base.js';
|
|
6
|
-
import type { CompanionVariableDefinition, CompanionVariableValue, CompanionVariableValues } from './variable.js';
|
|
7
|
-
import type { OSCSomeArguments } from '../common/osc.js';
|
|
8
|
-
import type { SomeCompanionConfigField } from './config.js';
|
|
9
|
-
import type { CompanionHTTPRequest, CompanionHTTPResponse } from './http.js';
|
|
10
|
-
import { SharedUdpSocket, SharedUdpSocketMessageCallback, SharedUdpSocketOptions } from './shared-udp-socket.js';
|
|
11
|
-
export interface InstanceBaseOptions {
|
|
12
|
-
/**
|
|
13
|
-
* Disable enforcement of variables requiring a definition.
|
|
14
|
-
* It is not recommended to set this, unless you know what you are doing.
|
|
15
|
-
*/
|
|
16
|
-
disableVariableValidation: boolean;
|
|
17
|
-
}
|
|
18
|
-
export declare abstract class InstanceBase<TConfig, TSecrets = undefined> implements InstanceBaseShared<TConfig, TSecrets> {
|
|
19
|
-
#private;
|
|
20
|
-
readonly id: string;
|
|
21
|
-
get instanceOptions(): InstanceBaseOptions;
|
|
22
|
-
/**
|
|
23
|
-
* The user chosen name for this instance.
|
|
24
|
-
* This can be changed just before `configUpdated` is called
|
|
25
|
-
*/
|
|
26
|
-
get label(): string;
|
|
27
|
-
/**
|
|
28
|
-
* Create an instance of the module
|
|
29
|
-
*/
|
|
30
|
-
constructor(internal: unknown);
|
|
31
|
-
private _handleInit;
|
|
32
|
-
private _handleDestroy;
|
|
33
|
-
private _handleConfigUpdateAndLabel;
|
|
34
|
-
private _handleExecuteAction;
|
|
35
|
-
private _handleUpdateFeedbacks;
|
|
36
|
-
private _handleUpdateActions;
|
|
37
|
-
private _handleUpgradeActionsAndFeedbacks;
|
|
38
|
-
private _handleGetConfigFields;
|
|
39
|
-
private _handleHttpRequest;
|
|
40
|
-
private _handleLearnAction;
|
|
41
|
-
private _handleLearnFeedback;
|
|
42
|
-
private _handleStartStopRecordActions;
|
|
43
|
-
private _handleSharedUdpSocketMessage;
|
|
44
|
-
private _handleSharedUdpSocketError;
|
|
45
|
-
/**
|
|
46
|
-
* Main initialization function called
|
|
47
|
-
* once the module is OK to start doing things.
|
|
48
|
-
*/
|
|
49
|
-
abstract init(config: TConfig, isFirstInit: boolean, secrets: TSecrets): Promise<void>;
|
|
50
|
-
/**
|
|
51
|
-
* Clean up the instance before it is destroyed.
|
|
52
|
-
*/
|
|
53
|
-
abstract destroy(): Promise<void>;
|
|
54
|
-
/**
|
|
55
|
-
* Called when the configuration is updated.
|
|
56
|
-
* @param config The new config object
|
|
57
|
-
*/
|
|
58
|
-
abstract configUpdated(config: TConfig, secrets: TSecrets): Promise<void>;
|
|
59
|
-
/**
|
|
60
|
-
* Save an updated configuration object
|
|
61
|
-
* Note: The whole config object and the keys of the secrets object are reported to the webui, so be careful how sensitive data is stored
|
|
62
|
-
* @param newConfig The new config object, or undefined to not update the config
|
|
63
|
-
* @param newSecrets The new secrets object, or undefined to not update the secrets
|
|
64
|
-
*/
|
|
65
|
-
saveConfig(newConfig: TConfig | undefined, newSecrets: TSecrets | undefined): void;
|
|
66
|
-
/**
|
|
67
|
-
* Creates the configuration fields for web config
|
|
68
|
-
*/
|
|
69
|
-
abstract getConfigFields(): SomeCompanionConfigField[];
|
|
70
|
-
/**
|
|
71
|
-
* Handle HTTP requests from Companion
|
|
72
|
-
* @param request partial request object from Express
|
|
73
|
-
*/
|
|
74
|
-
handleHttpRequest?(request: CompanionHTTPRequest): CompanionHTTPResponse | Promise<CompanionHTTPResponse>;
|
|
75
|
-
/**
|
|
76
|
-
* Handle request from Companion to start/stop recording actions
|
|
77
|
-
* @param isRecording whether recording is now running
|
|
78
|
-
*/
|
|
79
|
-
handleStartStopRecordActions?(isRecording: boolean): void;
|
|
80
|
-
/**
|
|
81
|
-
* Set the action definitions for this instance
|
|
82
|
-
* @param actions The action definitions
|
|
83
|
-
*/
|
|
84
|
-
setActionDefinitions(actions: CompanionActionDefinitions): void;
|
|
85
|
-
/**
|
|
86
|
-
* Set the feedback definitions for this instance
|
|
87
|
-
* @param feedbacks The feedback definitions
|
|
88
|
-
*/
|
|
89
|
-
setFeedbackDefinitions(feedbacks: CompanionFeedbackDefinitions): void;
|
|
90
|
-
/**
|
|
91
|
-
* Set the peset definitions for this instance
|
|
92
|
-
* @param presets The preset definitions
|
|
93
|
-
*/
|
|
94
|
-
setPresetDefinitions(presets: CompanionPresetDefinitions): void;
|
|
95
|
-
/**
|
|
96
|
-
* Set the variable definitions for this instance
|
|
97
|
-
* @param variables The variable definitions
|
|
98
|
-
*/
|
|
99
|
-
setVariableDefinitions(variables: CompanionVariableDefinition[]): void;
|
|
100
|
-
/**
|
|
101
|
-
* Set the values of some variables
|
|
102
|
-
* @param values The new values for the variables
|
|
103
|
-
*/
|
|
104
|
-
setVariableValues(values: CompanionVariableValues): void;
|
|
105
|
-
/**
|
|
106
|
-
* Get the last set value of a variable from this connection
|
|
107
|
-
* @param variableId id of the variable
|
|
108
|
-
* @returns The value
|
|
109
|
-
*/
|
|
110
|
-
getVariableValue(variableId: string): CompanionVariableValue | undefined;
|
|
111
|
-
/**
|
|
112
|
-
* @deprecated Companion now handles this for you, for actions and feedbacks. If you need this for another purpose, let us know as we intend to remove this
|
|
113
|
-
*
|
|
114
|
-
* Parse and replace all the variables in a string
|
|
115
|
-
* Note: You must not use this for feedbacks, as your feedback will not update when the variable changes.
|
|
116
|
-
* There is an alternate version of this supplied to each of the action/feedback callbacks that tracks
|
|
117
|
-
* usages properly and will retrigger the feedback when the variables change.
|
|
118
|
-
* @param text The text to parse
|
|
119
|
-
* @returns The string with variables replaced with their values
|
|
120
|
-
*/
|
|
121
|
-
parseVariablesInString(text: string): Promise<string>;
|
|
122
|
-
/**
|
|
123
|
-
* Request all feedbacks of the specified types to be checked for changes
|
|
124
|
-
* @param feedbackTypes The feedback types to check
|
|
125
|
-
*/
|
|
126
|
-
checkFeedbacks(...feedbackTypes: string[]): void;
|
|
127
|
-
/**
|
|
128
|
-
* Request the specified feedback instances to be checked for changes
|
|
129
|
-
* @param feedbackIds The ids of the feedback instances to check
|
|
130
|
-
*/
|
|
131
|
-
checkFeedbacksById(...feedbackIds: string[]): void;
|
|
132
|
-
/**
|
|
133
|
-
* Call subscribe on all currently known placed actions.
|
|
134
|
-
* It can be useful to trigger this upon establishing a connection, to ensure all data is loaded.
|
|
135
|
-
* @param actionIds The actionIds to call subscribe for. If no values are provided, then all are called.
|
|
136
|
-
*/
|
|
137
|
-
subscribeActions(...actionIds: string[]): void;
|
|
138
|
-
/**
|
|
139
|
-
* Call unsubscribe on all currently known placed actions.
|
|
140
|
-
* It can be useful to do some cleanup upon a connection closing.
|
|
141
|
-
* @param actionIds The actionIds to call subscribe for. If no values are provided, then all are called.
|
|
142
|
-
*/
|
|
143
|
-
unsubscribeActions(...actionIds: string[]): void;
|
|
144
|
-
/**
|
|
145
|
-
* Call subscribe on all currently known placed feedbacks.
|
|
146
|
-
* It can be useful to trigger this upon establishing a connection, to ensure all data is loaded.
|
|
147
|
-
* @param feedbackIds The feedbackIds to call subscribe for. If no values are provided, then all are called.
|
|
148
|
-
*/
|
|
149
|
-
subscribeFeedbacks(...feedbackIds: string[]): void;
|
|
150
|
-
/**
|
|
151
|
-
* Call unsubscribe on all currently known placed feedbacks.
|
|
152
|
-
* It can be useful to do some cleanup upon a connection closing.
|
|
153
|
-
* @param feedbackIds The feedbackIds to call subscribe for. If no values are provided, then all are called.
|
|
154
|
-
*/
|
|
155
|
-
unsubscribeFeedbacks(...feedbackIds: string[]): void;
|
|
156
|
-
/**
|
|
157
|
-
* Add an action to the current recording session
|
|
158
|
-
* @param action The action to be added to the recording session
|
|
159
|
-
* @param uniquenessId A unique id for the action being recorded. This should be different for each action, but by passing the same as a previous call will replace the previous value.
|
|
160
|
-
*/
|
|
161
|
-
recordAction(action: CompanionRecordedAction, uniquenessId?: string): void;
|
|
162
|
-
/**
|
|
163
|
-
* Send an osc message from the system osc sender
|
|
164
|
-
* @param host destination ip address
|
|
165
|
-
* @param port destination port number
|
|
166
|
-
* @param path message path
|
|
167
|
-
* @param args mesage arguments
|
|
168
|
-
*/
|
|
169
|
-
oscSend(host: string, port: number, path: string, args: OSCSomeArguments): void;
|
|
170
|
-
/**
|
|
171
|
-
* Update the status of this connection
|
|
172
|
-
* @param status The status level
|
|
173
|
-
* @param message Additional information about the status
|
|
174
|
-
*
|
|
175
|
-
* ### Example
|
|
176
|
-
* ```js
|
|
177
|
-
* this.updateStatus(InstanceStatus.Ok)
|
|
178
|
-
* ```
|
|
179
|
-
*/
|
|
180
|
-
updateStatus(status: InstanceStatus, message?: string | null): void;
|
|
181
|
-
/**
|
|
182
|
-
* Write a line to the log
|
|
183
|
-
* @param level The level of the message
|
|
184
|
-
* @param message The message text to write
|
|
185
|
-
*/
|
|
186
|
-
log(level: LogLevel, message: string): void;
|
|
187
|
-
/**
|
|
188
|
-
* Create a shared udp socket.
|
|
189
|
-
* This can be neccessary for modules where the device/software sends UDP messages to a hardcoded port number. In those
|
|
190
|
-
* cases if you don't use this then it won't be possible to use multiple instances of you module.
|
|
191
|
-
* The api here is a subset of the `Socket` from the builtin `node:dgram`, but with Companion hosting the sockets instead of the module.
|
|
192
|
-
* @param type Type of udp to use
|
|
193
|
-
* @param callback Message received callback
|
|
194
|
-
*/
|
|
195
|
-
createSharedUdpSocket(type: 'udp4' | 'udp6', callback?: SharedUdpSocketMessageCallback): SharedUdpSocket;
|
|
196
|
-
createSharedUdpSocket(options: SharedUdpSocketOptions, callback?: SharedUdpSocketMessageCallback): SharedUdpSocket;
|
|
197
|
-
}
|
|
198
|
-
//# sourceMappingURL=base.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/module-api/base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAA;AACtF,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,eAAe,CAAA;AACjE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAA;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAiC1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAA;AAE7D,OAAO,KAAK,EAAE,2BAA2B,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAA;AACjH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AACxD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAA;AAK3D,OAAO,KAAK,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAA;AAG5E,OAAO,EACN,eAAe,EAEf,8BAA8B,EAC9B,sBAAsB,EACtB,MAAM,wBAAwB,CAAA;AAE/B,MAAM,WAAW,mBAAmB;IACnC;;;OAG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