import { KeyValueDTOOfStringAndString } from '@generated/swagger/oms-api';

export const TaskActionTypes = {
  OK: 'OK',
  RETOURE_OK: 'RETOURE_OK',
  NOK: 'NOK',
  RETOURE_NOK: 'RETOURE_NOK',
  UNKNOWN: 'UNKNOWN',
  RETOURE_UNKNOWN: 'RETOURE_UNKNOWN',
} as const;

export type TaskActionTypeType =
  (typeof TaskActionTypes)[keyof typeof TaskActionTypes];

export interface TaskActionType {
  type: TaskActionTypeType;
  taskId: number;
  receiptItemId?: number;
  updateTo?: Exclude<TaskActionTypeType, 'UNKNOWN' | 'RETOURE_UNKNOWN'>;
  actions?: Array<KeyValueDTOOfStringAndString>;
}
