@onereach/channel-transformer
Version:
Convert data model between different channels (Slack, Microsoft Teams, Generic...)
16 lines (14 loc) • 452 B
text/typescript
import { IGenericAttachments } from "../../../generic/types";
import { MSDynamicsAttachment } from "../../types";
export const transformFileUpload = (attachments: Array<MSDynamicsAttachment>): IGenericAttachments => ({
type: "attachments",
props: {
value: {
staticValue: attachments.map(attachment => {
return {
text: attachment.url
};
})
}
}
});