discord-message-transcript-base 1.3.2-dev.0.49 → 1.3.2-dev.1.51

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/core/markdown.d.ts +1 -1
  3. package/dist/core/output.d.ts +2 -1
  4. package/dist/core/output.js +1 -1
  5. package/dist/core/sanitizer.d.ts +1 -1
  6. package/dist/index.d.ts +5 -6
  7. package/dist/index.js +6 -8
  8. package/dist/internalIndex.d.ts +4 -0
  9. package/dist/internalIndex.js +4 -0
  10. package/dist/renderers/html/html.d.ts +1 -1
  11. package/dist/renderers/html/html.js +9 -9
  12. package/dist/types/internal/index.d.ts +7 -0
  13. package/dist/types/internal/index.js +7 -0
  14. package/dist/types/internal/message/components.d.ts +252 -0
  15. package/dist/types/internal/message/components.js +1 -0
  16. package/dist/types/internal/message/componentsV2.d.ts +138 -0
  17. package/dist/types/internal/message/componentsV2.js +1 -0
  18. package/dist/types/internal/message/enum.d.ts +41 -0
  19. package/dist/types/{types.js → internal/message/enum.js} +6 -52
  20. package/dist/types/internal/message/messageItens.d.ts +149 -0
  21. package/dist/types/internal/message/messageItens.js +1 -0
  22. package/dist/types/internal/parse.d.ts +53 -0
  23. package/dist/types/internal/parse.js +7 -0
  24. package/dist/types/internal/return.d.ts +17 -0
  25. package/dist/types/internal/return.js +13 -0
  26. package/dist/types/internal/transcript.d.ts +91 -0
  27. package/dist/types/internal/transcript.js +1 -0
  28. package/dist/types/internal/util.d.ts +51 -0
  29. package/dist/types/internal/util.js +1 -0
  30. package/dist/types/public/index.d.ts +2 -0
  31. package/dist/types/public/index.js +2 -0
  32. package/dist/types/public/return.d.ts +25 -0
  33. package/dist/types/public/return.js +21 -0
  34. package/dist/types/public/transcript.d.ts +25 -0
  35. package/dist/types/public/transcript.js +1 -0
  36. package/package.json +6 -2
  37. package/dist/types/types.d.ts +0 -824
@@ -0,0 +1,252 @@
1
+ import { hexColor } from "../util.js";
2
+ import { JsonButtonStyle, JsonComponentType } from "./enum.js";
3
+ /**
4
+ * A union of all possible select menu types.
5
+ */
6
+ export type JsonSelectMenu = JsonSelectMenuOthers | JsonSelectMenuString;
7
+ /**
8
+ * A JSON-serializable representation of a Discord Action Row component.
9
+ */
10
+ export interface JsonActionRow {
11
+ /**
12
+ * The components within the action row (e.g., buttons, select menus).
13
+ */
14
+ components: (JsonButtonComponent | JsonSelectMenu)[];
15
+ /**
16
+ * The type of the component.
17
+ */
18
+ type: JsonComponentType.ActionRow;
19
+ }
20
+ /**
21
+ * A JSON-serializable representation of a message attachment.
22
+ */
23
+ export interface JsonAttachment {
24
+ /**
25
+ * The MIME type of the attachment.
26
+ */
27
+ contentType: string | null;
28
+ /**
29
+ * The name of the attachment file.
30
+ */
31
+ name: string;
32
+ /**
33
+ * The size of the attachment in bytes.
34
+ */
35
+ size: number;
36
+ /**
37
+ * Whether the attachment is a spoiler.
38
+ */
39
+ spoiler: boolean;
40
+ /**
41
+ * The URL of the attachment.
42
+ */
43
+ url: string;
44
+ }
45
+ /**
46
+ * A JSON-serializable representation of a message author.
47
+ */
48
+ export interface JsonAuthor {
49
+ /**
50
+ * The URL of the author's avatar.
51
+ */
52
+ avatarURL: string;
53
+ /**
54
+ * Whether the author is a bot.
55
+ */
56
+ bot: boolean;
57
+ /**
58
+ * The display name of the author.
59
+ */
60
+ displayName: string;
61
+ /**
62
+ * The guild-specific tag of the author, if any.
63
+ */
64
+ guildTag: string | null;
65
+ /**
66
+ * The ID of the author.
67
+ */
68
+ id: string;
69
+ /**
70
+ * Information about the author as a guild member.
71
+ */
72
+ member: {
73
+ /**
74
+ * The member's display color in hex format.
75
+ */
76
+ displayHexColor: hexColor;
77
+ /**
78
+ * The member's display name in the guild.
79
+ */
80
+ displayName: string;
81
+ } | null;
82
+ /**
83
+ * Whether the author is a system user.
84
+ */
85
+ system: boolean;
86
+ }
87
+ /**
88
+ * A JSON-serializable representation of a button component.
89
+ */
90
+ export interface JsonButtonComponent {
91
+ /**
92
+ * Whether the button is disabled.
93
+ */
94
+ disabled: boolean;
95
+ /**
96
+ * The emoji on the button, if any.
97
+ */
98
+ emoji: string | null;
99
+ /**
100
+ * The label text on the button.
101
+ */
102
+ label: string | null;
103
+ /**
104
+ * The style of the button.
105
+ */
106
+ style: JsonButtonStyle;
107
+ /**
108
+ * The type of the component.
109
+ */
110
+ type: JsonComponentType.Button;
111
+ /**
112
+ * The URL for link-style buttons.
113
+ */
114
+ url: string | null;
115
+ }
116
+ /**
117
+ * A JSON-serializable representation of a message embed.
118
+ */
119
+ export interface JsonEmbed {
120
+ author: {
121
+ name: string;
122
+ url: string | null;
123
+ iconURL: string | null;
124
+ } | null;
125
+ description: string | null;
126
+ fields: {
127
+ inline: boolean | null;
128
+ name: string;
129
+ value: string;
130
+ }[];
131
+ footer: {
132
+ iconURL: string | null;
133
+ text: string;
134
+ } | null;
135
+ hexColor: hexColor | null;
136
+ image: {
137
+ url: string;
138
+ } | null;
139
+ thumbnail: {
140
+ url: string;
141
+ } | null;
142
+ timestamp: string | null;
143
+ title: string | null;
144
+ type: string;
145
+ url: string | null;
146
+ }
147
+ /**
148
+ * A JSON-serializable representation of a poll.
149
+ */
150
+ export interface JsonPoll {
151
+ /**
152
+ * The answers available in the poll.
153
+ */
154
+ answers: JsonPollAnswer[];
155
+ /**
156
+ * A formatted string indicating when the poll expires.
157
+ */
158
+ expiry: string | null;
159
+ /**
160
+ * Whether the poll has been finalized.
161
+ */
162
+ isFinalized: boolean;
163
+ /**
164
+ * The question of the poll.
165
+ */
166
+ question: string;
167
+ }
168
+ /**
169
+ * A JSON-serializable representation of a single answer in a poll.
170
+ */
171
+ export interface JsonPollAnswer {
172
+ /**
173
+ * The number of votes for this answer.
174
+ */
175
+ count: number;
176
+ /**
177
+ * The emoji associated with this answer, if any.
178
+ */
179
+ emoji: {
180
+ id: string | null;
181
+ name: string | null;
182
+ animated: boolean;
183
+ } | null;
184
+ /**
185
+ * The ID of the answer.
186
+ */
187
+ id: number;
188
+ /**
189
+ * The text of the answer.
190
+ */
191
+ text: string;
192
+ }
193
+ /**
194
+ * A JSON-serializable representation of an option in a select menu.
195
+ */
196
+ export interface JsonSelectOption {
197
+ /**
198
+ * The description of the option.
199
+ */
200
+ description: string | null;
201
+ /**
202
+ * The emoji for the option, if any.
203
+ */
204
+ emoji: {
205
+ id: string | null;
206
+ name: string | null;
207
+ animated: boolean;
208
+ } | null;
209
+ /**
210
+ * The user-facing label for the option.
211
+ */
212
+ label: string;
213
+ }
214
+ /**
215
+ * A JSON-serializable representation of a non-string select menu.
216
+ */
217
+ interface JsonSelectMenuOthers {
218
+ /**
219
+ * Whether the select menu is disabled.
220
+ */
221
+ disabled: boolean;
222
+ /**
223
+ * The placeholder text for the select menu.
224
+ */
225
+ placeholder: string | null;
226
+ /**
227
+ * The type of the select menu.
228
+ */
229
+ type: JsonComponentType.UserSelect | JsonComponentType.RoleSelect | JsonComponentType.MentionableSelect | JsonComponentType.ChannelSelect;
230
+ }
231
+ /**
232
+ * A JSON-serializable representation of a string select menu.
233
+ */
234
+ interface JsonSelectMenuString {
235
+ /**
236
+ * Whether the select menu is disabled.
237
+ */
238
+ disabled: boolean;
239
+ /**
240
+ * The options available in the select menu.
241
+ */
242
+ options: JsonSelectOption[];
243
+ /**
244
+ * The placeholder text for the select menu.
245
+ */
246
+ placeholder: string | null;
247
+ /**
248
+ * The type of the select menu.
249
+ */
250
+ type: JsonComponentType.StringSelect;
251
+ }
252
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,138 @@
1
+ import { hexColor } from "../util.js";
2
+ import { JsonButtonComponent } from "./components.js";
3
+ import { JsonComponentType, JsonSeparatorSpacingSize } from "./enum.js";
4
+ import { JsonComponentInContainer } from "./messageItens.js";
5
+ /**
6
+ * A union of all V2 component types.
7
+ */
8
+ export type JsonV2Component = JsonContainerComponent | JsonFileComponent | JsonMediaGalleryComponent | JsonSectionComponent | JsonSeparatorComponent | JsonTextDisplayComponent | JsonThumbnailComponent;
9
+ /**
10
+ * A JSON-serializable representation of a V2 container component.
11
+ */
12
+ export interface JsonContainerComponent {
13
+ /**
14
+ * The components inside the container.
15
+ */
16
+ components: JsonComponentInContainer[];
17
+ /**
18
+ * The accent color of the container's border.
19
+ */
20
+ hexAccentColor: hexColor;
21
+ /**
22
+ * Whether the container's content is a spoiler.
23
+ */
24
+ spoiler: boolean;
25
+ /**
26
+ * The type of the component.
27
+ */
28
+ type: JsonComponentType.Container;
29
+ }
30
+ /**
31
+ * A JSON-serializable representation of a V2 file component.
32
+ */
33
+ export interface JsonFileComponent {
34
+ /**
35
+ * The name of the file.
36
+ */
37
+ fileName: string | null;
38
+ /**
39
+ * The size of the file in bytes.
40
+ */
41
+ size: number;
42
+ /**
43
+ * Whether the file is a spoiler.
44
+ */
45
+ spoiler: boolean;
46
+ /**
47
+ * The type of the component.
48
+ */
49
+ type: JsonComponentType.File;
50
+ /**
51
+ * The URL of the file.
52
+ */
53
+ url: string;
54
+ }
55
+ /**
56
+ * A JSON-serializable representation of a V2 media gallery component.
57
+ */
58
+ export interface JsonMediaGalleryComponent {
59
+ /**
60
+ * The items within the media gallery.
61
+ */
62
+ items: {
63
+ media: {
64
+ url: string;
65
+ };
66
+ spoiler: boolean;
67
+ }[];
68
+ /**
69
+ * The type of the component.
70
+ */
71
+ type: JsonComponentType.MediaGallery;
72
+ }
73
+ /**
74
+ * A JSON-serializable representation of a V2 section component.
75
+ */
76
+ export interface JsonSectionComponent {
77
+ /**
78
+ * The accessory component on the right side of the section.
79
+ */
80
+ accessory: JsonButtonComponent | JsonThumbnailComponent | null;
81
+ /**
82
+ * The components inside the section.
83
+ */
84
+ components: JsonTextDisplayComponent[];
85
+ /**
86
+ * The type of the component.
87
+ */
88
+ type: JsonComponentType.Section;
89
+ }
90
+ /**
91
+ * A JSON-serializable representation of a V2 separator component.
92
+ */
93
+ export interface JsonSeparatorComponent {
94
+ /**
95
+ * Whether the separator is a visible line.
96
+ */
97
+ divider: boolean;
98
+ /**
99
+ * The spacing size of the separator.
100
+ */
101
+ spacing: JsonSeparatorSpacingSize;
102
+ /**
103
+ * The type of the component.
104
+ */
105
+ type: JsonComponentType.Separator;
106
+ }
107
+ /**
108
+ * A JSON-serializable representation of a V2 text display component.
109
+ */
110
+ export interface JsonTextDisplayComponent {
111
+ /**
112
+ * The content of the text display.
113
+ */
114
+ content: string;
115
+ /**
116
+ * The type of the component.
117
+ */
118
+ type: JsonComponentType.TextDisplay;
119
+ }
120
+ /**
121
+ * A JSON-serializable representation of a V2 thumbnail component.
122
+ */
123
+ export interface JsonThumbnailComponent {
124
+ /**
125
+ * The media information for the thumbnail.
126
+ */
127
+ media: {
128
+ url: string;
129
+ };
130
+ /**
131
+ * Whether the thumbnail is a spoiler.
132
+ */
133
+ spoiler: boolean;
134
+ /**
135
+ * The type of the component.
136
+ */
137
+ type: JsonComponentType.Thumbnail;
138
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,41 @@
1
+ /**
2
+ * An enum representing the spacing size of a separator component.
3
+ */
4
+ export declare enum JsonSeparatorSpacingSize {
5
+ Small = 1,
6
+ Large = 2
7
+ }
8
+ /**
9
+ * An enum representing the styles of a Discord button.
10
+ */
11
+ export declare enum JsonButtonStyle {
12
+ Primary = 1,
13
+ Secondary = 2,
14
+ Success = 3,
15
+ Danger = 4,
16
+ Link = 5,
17
+ Premium = 6
18
+ }
19
+ /**
20
+ * An enum representing all known component types.
21
+ */
22
+ export declare enum JsonComponentType {
23
+ ActionRow = 1,
24
+ Button = 2,
25
+ StringSelect = 3,
26
+ TextInput = 4,
27
+ UserSelect = 5,
28
+ RoleSelect = 6,
29
+ MentionableSelect = 7,
30
+ ChannelSelect = 8,
31
+ Section = 9,
32
+ TextDisplay = 10,
33
+ Thumbnail = 11,
34
+ MediaGallery = 12,
35
+ File = 13,
36
+ Separator = 14,
37
+ ContentInventoryEntry = 16,
38
+ Container = 17,
39
+ Label = 18,
40
+ FileUpload = 19
41
+ }
@@ -1,49 +1,11 @@
1
1
  /**
2
- * An enum-like object for the possible return types, excluding 'attachment'.
3
- */
4
- export const ReturnTypeBase = {
5
- /**
6
- * Returns a `Buffer`.
7
- */
8
- Buffer: "buffer",
9
- /**
10
- * Returns a `Stream.Readable`.
11
- */
12
- Stream: "stream",
13
- /**
14
- * Returns a `string`.
15
- */
16
- String: "string",
17
- /**
18
- * Returns an `Uploadable` object.
19
- */
20
- Uploadable: "uploadable"
21
- };
22
- /**
23
- * An enum for all possible return types, used for parsing.
24
- */
25
- export var ReturnTypeParse;
26
- (function (ReturnTypeParse) {
27
- ReturnTypeParse["Attachment"] = "attachment";
28
- ReturnTypeParse["Buffer"] = "buffer";
29
- ReturnTypeParse["Stream"] = "stream";
30
- ReturnTypeParse["String"] = "string";
31
- ReturnTypeParse["Uploadable"] = "uploadable";
32
- })(ReturnTypeParse || (ReturnTypeParse = {}));
33
- ;
34
- /**
35
- * An enum-like object for the possible transcript formats.
2
+ * An enum representing the spacing size of a separator component.
36
3
  */
37
- export const ReturnFormat = {
38
- /**
39
- * JSON format.
40
- */
41
- JSON: "JSON",
42
- /**
43
- * HTML format.
44
- */
45
- HTML: "HTML"
46
- };
4
+ export var JsonSeparatorSpacingSize;
5
+ (function (JsonSeparatorSpacingSize) {
6
+ JsonSeparatorSpacingSize[JsonSeparatorSpacingSize["Small"] = 1] = "Small";
7
+ JsonSeparatorSpacingSize[JsonSeparatorSpacingSize["Large"] = 2] = "Large";
8
+ })(JsonSeparatorSpacingSize || (JsonSeparatorSpacingSize = {}));
47
9
  /**
48
10
  * An enum representing the styles of a Discord button.
49
11
  */
@@ -80,11 +42,3 @@ export var JsonComponentType;
80
42
  JsonComponentType[JsonComponentType["Label"] = 18] = "Label";
81
43
  JsonComponentType[JsonComponentType["FileUpload"] = 19] = "FileUpload";
82
44
  })(JsonComponentType || (JsonComponentType = {}));
83
- /**
84
- * An enum representing the spacing size of a separator component.
85
- */
86
- export var JsonSeparatorSpacingSize;
87
- (function (JsonSeparatorSpacingSize) {
88
- JsonSeparatorSpacingSize[JsonSeparatorSpacingSize["Small"] = 1] = "Small";
89
- JsonSeparatorSpacingSize[JsonSeparatorSpacingSize["Large"] = 2] = "Large";
90
- })(JsonSeparatorSpacingSize || (JsonSeparatorSpacingSize = {}));
@@ -0,0 +1,149 @@
1
+ import { TranscriptOptionsBase } from "../transcript.js";
2
+ import { ArrayMentions, hexColor } from "../util.js";
3
+ import { JsonActionRow, JsonAttachment, JsonAuthor, JsonButtonComponent, JsonEmbed, JsonPoll, JsonSelectMenu } from "./components.js";
4
+ import { JsonFileComponent, JsonMediaGalleryComponent, JsonSectionComponent, JsonSeparatorComponent, JsonTextDisplayComponent, JsonV2Component } from "./componentsV2.js";
5
+ /**
6
+ * A union of all component types that can be placed inside a `JsonContainerComponent`.
7
+ */
8
+ export type JsonComponentInContainer = JsonActionRow | JsonFileComponent | JsonMediaGalleryComponent | JsonSectionComponent | JsonSeparatorComponent | JsonTextDisplayComponent;
9
+ /**
10
+ * A union of all top-level component types that can exist directly in a message.
11
+ */
12
+ export type JsonTopLevelComponent = JsonActionRow | JsonButtonComponent | JsonSelectMenu | JsonV2Component;
13
+ /**
14
+ * The root object for a JSON transcript, containing all data.
15
+ */
16
+ export interface JsonData {
17
+ /**
18
+ * A list of all unique authors in the transcript.
19
+ */
20
+ authors: JsonAuthor[];
21
+ /**
22
+ * Information about the channel where the transcript was created.
23
+ */
24
+ channel: JsonDataChannel;
25
+ /**
26
+ * Information about the guild.
27
+ */
28
+ guild: JsonDataGuild | null;
29
+ /**
30
+ * An array of all messages in the transcript.
31
+ */
32
+ messages: JsonMessage[];
33
+ /**
34
+ * The options used to create this transcript.
35
+ */
36
+ options: TranscriptOptionsBase;
37
+ /**
38
+ * A list of all mentions found in the messages.
39
+ */
40
+ mentions: ArrayMentions;
41
+ }
42
+ /**
43
+ * A JSON-serializable representation of the transcript's channel.
44
+ */
45
+ export interface JsonDataChannel {
46
+ /**
47
+ * The ID of the channel.
48
+ */
49
+ id: string;
50
+ /**
51
+ * The icon URL for the channel (e.g., for DMs).
52
+ */
53
+ img: string | null;
54
+ /**
55
+ * The name of the channel.
56
+ */
57
+ name: string;
58
+ /**
59
+ * The parent category of the channel, if any.
60
+ */
61
+ parent: {
62
+ name: string;
63
+ id: string;
64
+ } | null;
65
+ /**
66
+ * The topic of the channel.
67
+ */
68
+ topic: string | null;
69
+ }
70
+ /**
71
+ * A JSON-serializable representation of the transcript's guild.
72
+ */
73
+ export interface JsonDataGuild {
74
+ /**
75
+ * The URL of the guild's icon.
76
+ */
77
+ icon: string | null;
78
+ /**
79
+ * The ID of the guild.
80
+ */
81
+ id: string;
82
+ /**
83
+ * The name of the guild.
84
+ */
85
+ name: string;
86
+ }
87
+ /**
88
+ * A JSON-serializable representation of a Discord message.
89
+ */
90
+ export interface JsonMessage {
91
+ attachments: JsonAttachment[];
92
+ authorId: string;
93
+ components: JsonTopLevelComponent[];
94
+ content: string;
95
+ createdTimestamp: number;
96
+ embeds: JsonEmbed[];
97
+ id: string;
98
+ mentions: boolean;
99
+ poll: JsonPoll | null;
100
+ reactions: JsonReaction[];
101
+ references: {
102
+ messageId: string | null;
103
+ } | null;
104
+ system: boolean;
105
+ }
106
+ /**
107
+ * Structure containing arrays of mentions found in a message.
108
+ */
109
+ export interface JsonMessageMentions {
110
+ channels: JsonMessageMentionsChannels[];
111
+ roles: JsonMessageMentionsRoles[];
112
+ users: JsonMessageMentionsUsers[];
113
+ }
114
+ /**
115
+ * A JSON-serializable representation of a channel mention.
116
+ */
117
+ export interface JsonMessageMentionsChannels {
118
+ id: string;
119
+ name: string | null;
120
+ }
121
+ /**
122
+ * A JSON-serializable representation of a role mention.
123
+ */
124
+ export interface JsonMessageMentionsRoles {
125
+ id: string;
126
+ name: string;
127
+ color: hexColor;
128
+ }
129
+ /**
130
+ * A JSON-serializable representation of a user mention.
131
+ */
132
+ export interface JsonMessageMentionsUsers {
133
+ id: string;
134
+ name: string;
135
+ color: hexColor | null;
136
+ }
137
+ /**
138
+ * A JSON-serializable representation of a message reaction.
139
+ */
140
+ export interface JsonReaction {
141
+ /**
142
+ * The number of times the emoji was reacted.
143
+ */
144
+ count: number;
145
+ /**
146
+ * The emoji that was reacted.
147
+ */
148
+ emoji: string;
149
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,53 @@
1
+ import Stream from "stream";
2
+ import { ReturnType } from "../public/return.js";
3
+ import { JsonAuthor } from "./message/components.js";
4
+ import { JsonDataChannel, JsonDataGuild, JsonMessage } from "./message/messageItens.js";
5
+ import { ReturnFormat } from "./return.js";
6
+ import { ArrayMentions, LocalDate, TimeZone, Uploadable } from "./util.js";
7
+ export declare const ReturnTypeParse: {
8
+ readonly Attachment: "attachment";
9
+ readonly Buffer: "buffer";
10
+ readonly Stream: "stream";
11
+ readonly String: "string";
12
+ readonly Uploadable: "uploadable";
13
+ };
14
+ export type ReturnTypeParse = typeof ReturnTypeParse[keyof typeof ReturnTypeParse];
15
+ /**
16
+ * The root object for a JSON transcript, used for parsing.
17
+ */
18
+ export interface JsonDataParse {
19
+ authors: JsonAuthor[];
20
+ channel: JsonDataChannel;
21
+ guild: JsonDataGuild | null;
22
+ messages: JsonMessage[];
23
+ options: TranscriptOptionsParse;
24
+ mentions: ArrayMentions;
25
+ }
26
+ /**
27
+ * Transcript options used for parsing, with a different `returnType`.
28
+ */
29
+ export interface TranscriptOptionsParse {
30
+ fileName: string;
31
+ disableWarnings: boolean;
32
+ includeAttachments: boolean;
33
+ includeButtons: boolean;
34
+ includeComponents: boolean;
35
+ includeEmpty: boolean;
36
+ includeEmbeds: boolean;
37
+ includePolls: boolean;
38
+ includeReactions: boolean;
39
+ includeV2Components: boolean;
40
+ localDate: LocalDate;
41
+ quantity: number;
42
+ returnFormat: ReturnFormat;
43
+ returnType: ReturnTypeParse;
44
+ safeMode: boolean;
45
+ saveImages: boolean;
46
+ selfContained: boolean;
47
+ timeZone: TimeZone;
48
+ watermark: boolean;
49
+ }
50
+ /**
51
+ * A conditional type that maps a `ReturnType` literal to the actual TypeScript type.
52
+ */
53
+ export type OutputType<T extends ReturnType> = T extends typeof ReturnType.Buffer ? Buffer : T extends typeof ReturnType.Stream ? Stream : T extends typeof ReturnType.Uploadable ? Uploadable : string;