18 lines
453 B
TypeScript
18 lines
453 B
TypeScript
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
|
import type { GetQuoteInputData, GetQuoteProcessData } from '../load-kp/types';
|
|
|
|
export async function getKPData({ quote }: GetQuoteInputData): Promise<GetQuoteProcessData> {
|
|
const keys: string[] = [];
|
|
quote?.evo_product_risks?.forEach((x) => {
|
|
if (x?.evo_addproduct_typeid) {
|
|
keys.push(x.evo_addproduct_typeid);
|
|
}
|
|
});
|
|
|
|
return {
|
|
fingap: {
|
|
keys,
|
|
},
|
|
};
|
|
}
|