lml-main
Version:
This is now a mono repository published into many standalone packages.
47 lines (46 loc) • 2.11 kB
TypeScript
import { RxHttpActionTypes, RxHttpRequestAction } from 'redux-rx-http';
import { JobIncidentCode, JobIncidentModel } from '@lml/cosmo-ts-data';
import { JobIncidentOption } from '../interfaces';
export declare const FETCH_JOB_INCIDENT_CODES: RxHttpActionTypes;
export declare const POST_JOB_INCIDENT: RxHttpActionTypes;
export declare const DELETE_JOB_INCIDENT: RxHttpActionTypes;
export declare const SET_JOB_INCIDENT = "SET_JOB_INCIDENT";
export declare const SET_JOB_INCIDENTS_BATCH = "SET_JOB_INCIDENTS_BATCH";
export declare const SET_JOB_INCIDENT_CODES = "SET_JOB_INCIDENT_CODES";
export interface SetJobIncidentAction {
type: 'SET_JOB_INCIDENT';
refId: string;
incident: JobIncidentModel;
}
export interface SetJobIncidentsBatchAction {
type: 'SET_JOB_INCIDENTS_BATCH';
refId: string;
incidents: JobIncidentModel[];
}
export interface SetJobIncidentCodesAction {
type: 'SET_JOB_INCIDENT_CODES';
impacts: JobIncidentOption[];
reasons: JobIncidentOption[];
}
export declare type JobIncidentAction = SetJobIncidentAction | SetJobIncidentsBatchAction | SetJobIncidentCodesAction;
export declare const fetchJobIncidentCodes: (args?: any) => RxHttpRequestAction;
export declare const postJobIncident: (jobId: string, impact: JobIncidentCode, reason: JobIncidentCode, comment: string, user: string, args?: any) => RxHttpRequestAction;
export declare const deleteJobIncident: (jobId: string, incidentId: string, username: string) => RxHttpRequestAction;
/**
* Set a job incident in the state
*
* @param incident
*/
export declare const setJobIncident: (refId: string, incident: JobIncidentModel) => SetJobIncidentAction;
/**
* Set an array of job incidents in the state
*
* @param incidents
*/
export declare const setJobIncidents: (refId: string, incidents: JobIncidentModel[]) => SetJobIncidentsBatchAction;
/**
* Set the list of incident impact and reason codes that the controller must choose from
*
* @param impactCodes
*/
export declare const setJobIncidentCodes: (impacts: JobIncidentOption[], reasons: JobIncidentOption[]) => SetJobIncidentCodesAction;