diff --git a/api-client/src/runs/types.ts b/api-client/src/runs/types.ts index 2692fff5987..e41626b6448 100644 --- a/api-client/src/runs/types.ts +++ b/api-client/src/runs/types.ts @@ -203,6 +203,7 @@ export interface UpdateErrorRecoveryPolicyRequest { data: ErrorRecoveryPolicy } +export type UpdateErrorRecoveryPolicyResponse = Record export type ErrorRecoveryPolicyResponse = UpdateErrorRecoveryPolicyRequest /** diff --git a/app/src/resources/runs/useUpdateRecoveryPolicyWithStrategy.ts b/app/src/resources/runs/useUpdateRecoveryPolicyWithStrategy.ts index 7720066c74e..22060b053ca 100644 --- a/app/src/resources/runs/useUpdateRecoveryPolicyWithStrategy.ts +++ b/app/src/resources/runs/useUpdateRecoveryPolicyWithStrategy.ts @@ -2,7 +2,10 @@ import { useHost, useUpdateErrorRecoveryPolicy, } from '@opentrons/react-api-client' -import { getErrorRecoveryPolicy } from '@opentrons/api-client' +import { + getErrorRecoveryPolicy, + UpdateErrorRecoveryPolicyResponse, +} from '@opentrons/api-client' import type { HostConfig, @@ -26,7 +29,7 @@ export function useUpdateRecoveryPolicyWithStrategy( ): ( newPolicy: UpdateErrorRecoveryPolicyWithStrategy['newPolicy'], strategy: UpdateErrorRecoveryPolicyWithStrategy['strategy'] -) => Promise { +) => Promise { const host = useHost() const { diff --git a/react-api-client/src/runs/useUpdateErrorRecoveryPolicy.ts b/react-api-client/src/runs/useUpdateErrorRecoveryPolicy.ts index 10ea2a2cd22..7e09abc6160 100644 --- a/react-api-client/src/runs/useUpdateErrorRecoveryPolicy.ts +++ b/react-api-client/src/runs/useUpdateErrorRecoveryPolicy.ts @@ -12,24 +12,24 @@ import type { import type { AxiosError } from 'axios' import type { RecoveryPolicyRulesParams, - ErrorRecoveryPolicyResponse, + UpdateErrorRecoveryPolicyResponse, HostConfig, } from '@opentrons/api-client' export type UseErrorRecoveryPolicyResponse = UseMutationResult< - ErrorRecoveryPolicyResponse, + UpdateErrorRecoveryPolicyResponse, AxiosError, RecoveryPolicyRulesParams > & { updateErrorRecoveryPolicy: UseMutateFunction< - ErrorRecoveryPolicyResponse, + UpdateErrorRecoveryPolicyResponse, AxiosError, RecoveryPolicyRulesParams > } export type UseUpdateErrorRecoveryPolicyOptions = UseMutationOptions< - ErrorRecoveryPolicyResponse, + UpdateErrorRecoveryPolicyResponse, AxiosError, RecoveryPolicyRulesParams > @@ -41,7 +41,7 @@ export function useUpdateErrorRecoveryPolicy( const host = useHost() const mutation = useMutation< - ErrorRecoveryPolicyResponse, + UpdateErrorRecoveryPolicyResponse, AxiosError, RecoveryPolicyRulesParams >(