Skip to content

Commit 279cb7b

Browse files
committed
File attachments
1 parent df5e143 commit 279cb7b

2 files changed

Lines changed: 19 additions & 0 deletions

File tree

.changeset/tangy-otters-pump.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@plotday/twister": patch
3+
---
4+
5+
Added: File attachments. For now, just metadata is available to twists.

twister/src/plot.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,8 @@ export enum ActivityLinkType {
213213
callback = "callback",
214214
/** Video conferencing links with provider-specific handling */
215215
conferencing = "conferencing",
216+
/** File attachment links stored in R2 */
217+
file = "file",
216218
}
217219

218220
/**
@@ -309,6 +311,18 @@ export type ActivityLink =
309311
title: string;
310312
/** Token identifying the callback to execute */
311313
callback: Callback;
314+
}
315+
| {
316+
/** File attachment link stored in R2 */
317+
type: ActivityLinkType.file;
318+
/** Unique identifier for the stored file */
319+
fileId: string;
320+
/** Original filename */
321+
fileName: string;
322+
/** File size in bytes */
323+
fileSize: number;
324+
/** MIME type of the file */
325+
mimeType: string;
312326
};
313327

314328
/**

0 commit comments

Comments
 (0)