Skip to content

Commit

Permalink
refactor(api-client): Delete unused code that was supporting actions …
Browse files Browse the repository at this point in the history
…on maintenance runs (#14670)
  • Loading branch information
SyntaxColoring authored Mar 15, 2024
1 parent c68027d commit a844c66
Show file tree
Hide file tree
Showing 9 changed files with 4 additions and 187 deletions.
20 changes: 0 additions & 20 deletions api-client/src/maintenance_runs/createMaintenanceRunAction.ts

This file was deleted.

1 change: 0 additions & 1 deletion api-client/src/maintenance_runs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ export { getMaintenanceRun } from './getMaintenanceRun'
export { deleteMaintenanceRun } from './deleteMaintenanceRun'
export { createMaintenanceRun } from './createMaintenanceRun'
export { createMaintenanceCommand } from './createMaintenanceCommand'
export { createMaintenanceRunAction } from './createMaintenanceRunAction'
export { createMaintenanceRunLabwareDefinition } from './createMaintenanceRunLabwareDefinition'
export { getCurrentMaintenanceRun } from './getCurrentMaintenanceRun'

Expand Down
22 changes: 2 additions & 20 deletions api-client/src/maintenance_runs/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@ import type {
RunCommandSummary,
LabwareOffsetCreateData,
RunStatus,
RunAction,
} from '../runs'

export interface MaintenanceRunData {
id: string
createdAt: string
status: RunStatus
current: boolean
actions: MaintenanceRunAction[]
actions: RunAction[]
errors: MaintenanceRunError[]
pipettes: LoadedPipette[]
modules: LoadedModule[]
Expand All @@ -29,25 +30,6 @@ export interface MaintenanceRun {
data: MaintenanceRunData
}

export const MAINTENANCE_RUN_ACTION_TYPE_PLAY: 'play' = 'play'
export const MAINTENANCE_RUN_ACTION_TYPE_PAUSE: 'pause' = 'pause'
export const MAINTENANCE_RUN_ACTION_TYPE_STOP: 'stop' = 'stop'

export type MaintenanceRunActionType =
| typeof MAINTENANCE_RUN_ACTION_TYPE_PLAY
| typeof MAINTENANCE_RUN_ACTION_TYPE_PAUSE
| typeof MAINTENANCE_RUN_ACTION_TYPE_STOP

export interface MaintenanceRunAction {
id: string
createdAt: string
actionType: MaintenanceRunActionType
}

export interface MaintenanceCreateRunActionData {
actionType: MaintenanceRunActionType
}

export interface MaintenanceCommandData {
data: RunCommandSummary
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
export * from './maintenanceRunActions'
export * from './maintenanceCommands'
export * from './maintenanceRuns'

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { MAINTENANCE_RUN_ACTION_TYPE_PLAY } from '@opentrons/api-client'
import { RUN_ACTION_TYPE_PLAY } from '@opentrons/api-client'
import type { MaintenanceRun, MaintenanceRunData } from '@opentrons/api-client'

export const MAINTENANCE_RUN_ID = '1'
Expand All @@ -12,7 +12,7 @@ export const mockRunningMaintenanceRun: MaintenanceRunData = {
{
id: '1',
createdAt: '2021-10-25T12:54:53.366581+00:00',
actionType: MAINTENANCE_RUN_ACTION_TYPE_PLAY,
actionType: RUN_ACTION_TYPE_PLAY,
},
],
errors: [],
Expand Down

This file was deleted.

1 change: 0 additions & 1 deletion react-api-client/src/maintenance_runs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ export { useMaintenanceRunQuery } from './useMaintenanceRunQuery'
export { useCreateMaintenanceCommandMutation } from './useCreateMaintenanceCommandMutation'
export { useCreateMaintenanceRunLabwareDefinitionMutation } from './useCreateMaintenanceRunLabwareDefinitionMutation'
export { useDeleteMaintenanceRunMutation } from './useDeleteMaintenanceRunMutation'
export { usePlayMaintenanceRunMutation } from './usePlayMaintenanceRunMutation'
export { useCurrentMaintenanceRun } from './useCurrentMaintenanceRun'

This file was deleted.

0 comments on commit a844c66

Please sign in to comment.