-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(types): Add
AttachmentType
and use for envelope `attachment_typ…
…e` property (#10946) `Attachment.attachmentType` was changed to use a string union. The `attachment_type` header property should match so I added an extra type for this.
- Loading branch information
1 parent
9144a86
commit 9b4c855
Showing
3 changed files
with
21 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,23 @@ | ||
export type AttachmentType = | ||
| 'event.attachment' | ||
| 'event.minidump' | ||
| 'event.applecrashreport' | ||
| 'unreal.context' | ||
| 'unreal.logs'; | ||
|
||
/** | ||
* An attachment to an event. This is used to upload arbitrary data to Sentry. | ||
* | ||
* Please take care to not add sensitive information in attachments. | ||
* | ||
* https://develop.sentry.dev/sdk/envelopes/#attachment | ||
*/ | ||
export interface Attachment { | ||
data: string | Uint8Array; | ||
filename: string; | ||
contentType?: string; | ||
attachmentType?: string; | ||
/** | ||
* The type of the attachment. Defaults to `event.attachment` if not specified. | ||
*/ | ||
attachmentType?: AttachmentType; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters