@causalfoundry/js-sdk
Version:
Causal Foundry WEB SDK (JS/TS)
18 lines (16 loc) • 567 B
text/typescript
import { LegacyItemRequestProperties } from "../legacyTypes";
import { ItemRequestProperties } from "../typings";
/**
* Maps LegacyItemRequestProperties to ItemRequestProperties
* @param legacyProperties - The legacy item request properties
* @returns The new item request properties format
*/
export const itemRequestPropertiesMapper = (
legacyProperties: LegacyItemRequestProperties
): ItemRequestProperties => {
return {
item_id: legacyProperties.id,
item_name: legacyProperties.item_name,
manufacturer: legacyProperties.manufacturer,
};
};