Skip to content

Commit

Permalink
feat!: remove deprecated fields added for legacy module compatability
Browse files Browse the repository at this point in the history
  • Loading branch information
Julusian committed Oct 16, 2022
1 parent 297fac1 commit a6d7d70
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 69 deletions.
16 changes: 0 additions & 16 deletions src/host-api/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,6 @@ export interface SetVariableValuesMessage {

export interface ExecuteActionMessage {
action: ActionInstance

/** @deprecated */
deviceId: string | undefined
}

export interface UpdateFeedbackValuesMessage {
Expand Down Expand Up @@ -175,14 +172,6 @@ export interface FeedbackInstance extends FeedbackInstanceBase {
width: number
height: number
}

/** @deprecated */
page: number
/** @deprecated */
bank: number

/** @deprecated */
rawBank: any
}

export interface UpdateFeedbackInstancesMessage {
Expand All @@ -200,11 +189,6 @@ export interface ActionInstanceBase {
}
export interface ActionInstance extends ActionInstanceBase {
controlId: string

/** @deprecated */
page: number
/** @deprecated */
bank: number
}

export interface UpdateActionInstancesMessage {
Expand Down
4 changes: 0 additions & 4 deletions src/internal/feedback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,12 @@ export function callFeedbackOnDefinition(definition: CompanionFeedbackDefinition
return definition.callback({
...convertFeedbackInstanceToEvent('boolean', feedback),
type: 'boolean',
_rawBank: feedback.rawBank,
})
} else {
return definition.callback({
...convertFeedbackInstanceToEvent('advanced', feedback),
type: 'advanced',
image: feedback.image,
_page: feedback.page,
_bank: feedback.bank,
_rawBank: feedback.rawBank,
})
}
}
11 changes: 1 addition & 10 deletions src/module-api/action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,4 @@ export interface CompanionActionInfo {
/**
* Extended information for execution of an action
*/
export interface CompanionActionEvent extends CompanionActionInfo {
// Future: the contents of this should be re-evaluated in v1

/** @deprecated */
readonly _deviceId: string | undefined
/** @deprecated */
readonly _page: number
/** @deprecated */
readonly _bank: number
}
export interface CompanionActionEvent extends CompanionActionInfo {}
28 changes: 0 additions & 28 deletions src/module-api/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,6 @@ export abstract class InstanceBase<TConfig> implements InstanceBaseShared<TConfi
actionId: msg.action.actionId,
controlId: msg.action.controlId,
options: msg.action.options,

_deviceId: msg.deviceId,
_page: msg.action.page,
_bank: msg.action.bank,
})
}
private async _handleUpdateFeedbacks(msg: UpdateFeedbackInstancesMessage, skipUpgrades?: boolean): Promise<void> {
Expand Down Expand Up @@ -328,10 +324,6 @@ export abstract class InstanceBase<TConfig> implements InstanceBaseShared<TConfi
actionId: msg.action.actionId,
controlId: msg.action.controlId,
options: msg.action.options,

_deviceId: undefined,
_page: msg.action.page,
_bank: msg.action.bank,
})

return {
Expand Down Expand Up @@ -655,16 +647,6 @@ export abstract class InstanceBase<TConfig> implements InstanceBaseShared<TConfi
}
}

/** @deprecated */
_getAllActions() {
return Array.from(this.#actionInstances.values()).map((act) => ({
id: act.id,
actionId: act.actionId,
controlId: act.controlId,
options: act.options,
}))
}

/**
* Call subscribe on all currently known placed actions.
* It can be useful to trigger this upon establishing a connection, to ensure all data is loaded
Expand Down Expand Up @@ -712,16 +694,6 @@ export abstract class InstanceBase<TConfig> implements InstanceBaseShared<TConfi
}
}

/** @deprecated */
_getAllFeedbacks() {
return Array.from(this.#feedbackInstances.values()).map((fb) => ({
id: fb.id,
feedbackId: fb.feedbackId,
controlId: fb.controlId,
options: fb.options,
}))
}

/**
* Call subscribe on all currently known placed feedbacks.
* It can be useful to trigger this upon establishing a connection, to ensure all data is loaded
Expand Down
11 changes: 0 additions & 11 deletions src/module-api/feedback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ export interface CompanionFeedbackInfo {
*/
export interface CompanionFeedbackBooleanEvent extends CompanionFeedbackInfo {
// readonly type: 'boolean'

/** @deprecated */
readonly _rawBank: any
}

/**
Expand All @@ -56,14 +53,6 @@ export interface CompanionFeedbackAdvancedEvent extends CompanionFeedbackInfo {
readonly width: number
readonly height: number
}

/** @deprecated */
readonly _page: number
/** @deprecated */
readonly _bank: number

/** @deprecated */
readonly _rawBank: any
}

/**
Expand Down

0 comments on commit a6d7d70

Please sign in to comment.