244 lines
4.2 KiB
TypeScript
244 lines
4.2 KiB
TypeScript
import { JobLine, RawJobDataObject } from "./raw-job-data.interface";
|
|
|
|
// ES Job Object with transformed fields
|
|
export interface ESJobObject extends Omit<
|
|
RawJobDataObject,
|
|
// Agent fields
|
|
| "cat_no"
|
|
| "ciecaid"
|
|
| "agt_co_id"
|
|
| "agt_co_nm"
|
|
| "agt_addr1"
|
|
| "agt_addr2"
|
|
| "agt_city"
|
|
| "agt_st"
|
|
| "agt_zip"
|
|
| "agt_ctry"
|
|
| "agt_ph1"
|
|
| "agt_ph1x"
|
|
| "agt_ph2"
|
|
| "agt_ph2x"
|
|
| "agt_fax"
|
|
| "agt_faxx"
|
|
| "agt_ct_ln"
|
|
| "agt_ct_fn"
|
|
| "agt_ct_ph"
|
|
| "agt_ct_phx"
|
|
| "agt_ea"
|
|
| "agt_lic_no"
|
|
// Adjustment fields
|
|
| "adj_g_disc"
|
|
| "adj_strdis"
|
|
| "adj_towdis"
|
|
// Assignment fields
|
|
| "asgn_date"
|
|
| "asgn_no"
|
|
| "asgn_type"
|
|
// Claim fields
|
|
| "clm_addr1"
|
|
| "clm_addr2"
|
|
| "clm_city"
|
|
| "clm_ct_fn"
|
|
| "clm_ct_ln"
|
|
| "clm_ct_ph"
|
|
| "clm_ct_phx"
|
|
| "clm_ctry"
|
|
| "clm_ea"
|
|
| "clm_fax"
|
|
| "clm_faxx"
|
|
| "clm_ofc_id"
|
|
| "clm_ofc_nm"
|
|
| "clm_ph1"
|
|
| "clm_ph1x"
|
|
| "clm_ph2"
|
|
| "clm_ph2x"
|
|
| "clm_st"
|
|
| "clm_title"
|
|
| "clm_zip"
|
|
| "clm_total"
|
|
// Misc fields
|
|
| "cust_pr"
|
|
| "date_estimated"
|
|
| "ded_status"
|
|
| "depreciation_taxes"
|
|
// Estimator fields
|
|
| "est_addr1"
|
|
| "est_addr2"
|
|
| "est_city"
|
|
| "est_co_nm"
|
|
| "est_ct_fn"
|
|
| "est_ct_ln"
|
|
| "est_ctry"
|
|
| "est_ea"
|
|
| "est_ph1"
|
|
| "est_st"
|
|
| "est_zip"
|
|
| "federal_tax_rate"
|
|
// Insurance fields
|
|
| "ins_addr1"
|
|
| "ins_addr2"
|
|
| "ins_city"
|
|
| "ins_co_id"
|
|
| "ins_ct_fn"
|
|
| "ins_ct_ln"
|
|
| "ins_ct_ph"
|
|
| "ins_ct_phx"
|
|
| "ins_ctry"
|
|
| "ins_ea"
|
|
| "ins_fax"
|
|
| "ins_faxx"
|
|
| "ins_ph1"
|
|
| "ins_ph1x"
|
|
| "ins_ph2"
|
|
| "ins_ph2x"
|
|
| "ins_st"
|
|
| "ins_title"
|
|
| "ins_zip"
|
|
| "insd_fax"
|
|
| "insd_faxx"
|
|
// Loss fields
|
|
| "kmin"
|
|
| "loss_cat"
|
|
| "loss_type"
|
|
// Owner fields
|
|
| "ownr_addr2"
|
|
| "ownr_co_nm"
|
|
| "ownr_ctry"
|
|
| "ownr_ea"
|
|
| "ownr_ph2"
|
|
| "ownr_st"
|
|
| "ownr_title"
|
|
| "ownr_zip"
|
|
// Payment fields
|
|
| "pay_amt"
|
|
| "pay_chknm"
|
|
| "pay_date"
|
|
| "pay_type"
|
|
| "payee_nms"
|
|
// Vehicle fields
|
|
| "plate_no"
|
|
| "plate_st"
|
|
| "policy_no"
|
|
// Rate fields
|
|
| "rate_la1"
|
|
| "rate_la2"
|
|
| "rate_la3"
|
|
| "rate_la4"
|
|
| "rate_laa"
|
|
| "rate_lab"
|
|
| "rate_lad"
|
|
| "rate_lae"
|
|
| "rate_laf"
|
|
| "rate_lag"
|
|
| "rate_lam"
|
|
| "rate_lar"
|
|
| "rate_las"
|
|
| "rate_lau"
|
|
| "rate_ma2s"
|
|
| "rate_ma2t"
|
|
| "rate_ma3s"
|
|
| "rate_mabl"
|
|
| "rate_macs"
|
|
| "rate_mahw"
|
|
| "rate_mapa"
|
|
| "rate_mash"
|
|
// Tax fields
|
|
| "tax_lbr_rt"
|
|
| "tax_levies_rt"
|
|
| "tax_paint_mat_rt"
|
|
| "tax_predis"
|
|
| "tax_prethr"
|
|
| "tax_pstthr"
|
|
| "tax_shop_mat_rt"
|
|
| "tax_str_rt"
|
|
| "tax_sub_rt"
|
|
| "tax_thramt"
|
|
| "tax_tow_rt"
|
|
// Additional vehicle fields
|
|
| "theft_ind"
|
|
| "v_color"
|
|
| "tlos_ind"
|
|
| "v_make_desc"
|
|
| "v_model_desc"
|
|
| "shopid"
|
|
| "est_system"
|
|
// Object fields
|
|
| "owner"
|
|
| "vehicle"
|
|
| "bodyshop"
|
|
| "area_of_damage"
|
|
| "joblines"
|
|
// CIECA fields
|
|
| "cieca_pft"
|
|
| "cieca_pfl"
|
|
| "cieca_pfm"
|
|
| "cieca_pfo"
|
|
| "cieca_stl"
|
|
| "cieca_ttl"
|
|
| "parts_tax_rates"
|
|
| "materials"
|
|
> {
|
|
// Fields added by the transformer
|
|
impact_1?: string;
|
|
impact_2?: string;
|
|
close_date: string | null;
|
|
created_at: string;
|
|
id: string;
|
|
group?: string;
|
|
group_verified?: boolean;
|
|
updated_at: string;
|
|
v_age: number;
|
|
v_type: string;
|
|
v_makedesc?: string;
|
|
v_model?: string;
|
|
supp_amt: number;
|
|
ro_number: string | null;
|
|
requires_reimport: boolean;
|
|
v_mileage: string;
|
|
id_pro_nam?: string;
|
|
g_ttl_amt: number;
|
|
source_system: string;
|
|
rf_ph1: string;
|
|
rf_zip: string;
|
|
association_switch: string;
|
|
sending_entity_id: string;
|
|
sending_entity_accept_terms_of_use: boolean;
|
|
|
|
// Transformed arrays
|
|
joblines: Omit<
|
|
JobLine,
|
|
| "lbr_tax"
|
|
| "lbr_typ_j"
|
|
| "line_ref"
|
|
| "misc_sublt"
|
|
| "misc_tax"
|
|
| "prt_dsmk_m"
|
|
| "prt_dsmk_p"
|
|
| "tran_code"
|
|
| "unq_seq"
|
|
| "alt_co_id"
|
|
| "alt_overrd"
|
|
| "alt_part_i"
|
|
| "alt_partm"
|
|
| "bett_type"
|
|
| "bett_pctg"
|
|
| "bett_amt"
|
|
| "bett_tax"
|
|
| "op_code_desc"
|
|
| "paint_stg"
|
|
| "paint_tone"
|
|
>[];
|
|
|
|
totals: Array<{
|
|
nt_hrs?: number;
|
|
t_amt?: number;
|
|
t_hrs?: number;
|
|
ttl_typecd?: string;
|
|
}>;
|
|
|
|
rates: Array<
|
|
| { cal_prethr?: number; mat_type?: string }
|
|
| { lbr_desc?: string; lbr_rate?: number; lbr_type?: string }
|
|
>;
|
|
}
|