twilio-ccai-fulfillment-tools
Version:
A collection of tools to assist in the creation of Twilio CCAI Integration cards via fulfillment scripts
22 lines (19 loc) • 376 B
text/typescript
import { TCard, TItems, TEMPLATES, SIZES } from '../types';
interface ICardInput {
items: TItems[];
position?: number;
width?: SIZES;
title?: string;
}
export const createCard = ({
items,
width,
title,
position,
}: ICardInput): TCard => ({
template: TEMPLATES.CARD,
items,
width: width ?? SIZES.FULL,
title,
position,
});