import { type CompanionHTTPRequest, type CompanionHTTPResponse, type CompanionOptionValues, type CompanionStaticUpgradeScript, type InstanceConstructor, type InstanceTypes, type JsonValue, type SomeCompanionConfigField } from '@companion-module/base'; import type { SharedUdpSocketMessage } from '@companion-module/base/host-api'; import type { ActionInstance, FeedbackInstance, ModuleHostContext, UpgradeActionAndFeedbackInstancesResponse, UpgradeActionInstance, UpgradeFeedbackInstance } from './context.js'; export declare class InstanceWrapper { #private; constructor(id: string, host: ModuleHostContext, instanceFactory: InstanceConstructor, upgradeScripts: CompanionStaticUpgradeScript[], moduleApiVersion: string); init(msg: InitMessage): Promise; destroy(): Promise; configUpdateAndLabel(label: string, config: TManifest['config'], secrets: TManifest['secrets']): Promise; /** * @deprecated use executeActionWithSignal instead, which allows passing an AbortSignal to the action callback, so that it can be cancelled if needed */ executeAction(action: ActionInstance, surfaceId: string | undefined): Promise; executeActionWithSignal(action: ActionInstance, surfaceId: string | undefined, signal: AbortSignal): Promise; updateFeedbacks(feedbacks: Record): Promise; updateActions(actions: Record): Promise; upgradeActionsAndFeedbacks(defaultUpgradeIndex: number | null, actions: UpgradeActionInstance[], feedbacks: UpgradeFeedbackInstance[]): Promise; getConfigFields(): Promise; httpRequest(request: CompanionHTTPRequest): Promise; /** * @deprecated use learnActionWithSignal instead, which allows passing an AbortSignal to the learn function, so that it can be cancelled if needed */ learnAction(action: ActionInstance): Promise<{ options: CompanionOptionValues | undefined; }>; learnActionWithSignal(action: ActionInstance, signal: AbortSignal): Promise<{ options: CompanionOptionValues | undefined; }>; /** * @deprecated use learnFeedbackWithSignal instead, which allows passing an AbortSignal to the learn function, so that it can be cancelled if needed */ learnFeedback(feedback: FeedbackInstance): Promise<{ options: CompanionOptionValues | undefined; }>; learnFeedbackWithSignal(feedback: FeedbackInstance, signal: AbortSignal): Promise<{ options: CompanionOptionValues | undefined; }>; startStopRecordActions(recording: boolean): Promise; sharedUdpSocketMessage(msg: SharedUdpSocketMessage): Promise; sharedUdpSocketError(msg: SharedUdpSocketError): Promise; } export interface InitMessage { label: string; isFirstInit: boolean; config: unknown; secrets: unknown; lastUpgradeIndex: number; } export interface InitResponseMessage { hasHttpHandler: boolean; hasRecordActionsHandler: boolean; newUpgradeIndex: number; disableNewConfigLayout: boolean; updatedConfig: unknown | undefined; updatedSecrets: unknown | undefined; } export interface ExecuteActionSuccess { success: true; /** * The result returned by the callback, or `undefined` if the callback * doesn't return a result. */ result: JsonValue | undefined; } export interface ExecuteActionFailure { success: false; /** A reason for the failure */ errorMessage: string; } export type ExecuteActionResult = ExecuteActionSuccess | ExecuteActionFailure; export interface SharedUdpSocketError { handleId: string; portNumber: number; errorMessage: string; errorStack: string | undefined; } //# sourceMappingURL=instance.d.ts.map