Skip to content

Commit cca5c30

Browse files
committed
fix: Use Blob | string as a type annotation for media
1 parent 4e69eea commit cca5c30

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

src/mastodon/rest/v1/account-repository.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ export interface UpdateCredentialsParams {
4242
/** The account bio. */
4343
readonly note?: string | null;
4444
/** Avatar image encoded using multipart/form-data */
45-
readonly avatar?: unknown;
45+
readonly avatar?: Blob | string | null;
4646
/** Header image encoded using multipart/form-data */
47-
readonly header?: unknown;
47+
readonly header?: Blob | string | null;
4848
/** Whether manual approval of follow requests is required. */
4949
readonly locked?: boolean | null;
5050
readonly source?: Partial<

src/mastodon/rest/v1/media-attachment-repository.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ import { type MediaAttachment } from "../../entities/v1";
33

44
export interface CreateMediaAttachmentParams {
55
/** The file to be attached, using multipart form data. */
6-
readonly file: unknown;
6+
readonly file: Blob | string;
77
/** A plain-text description of the media, for accessibility purposes. */
88
readonly description?: string | null;
99
/** Two floating points (x,y), comma-delimited, ranging from -1.0 to 1.0 */
1010
readonly focus?: string | null;
1111
/** Custom thumbnail */
12-
readonly thumbnail?: unknown | null;
12+
readonly thumbnail?: Blob | string | null;
1313
}
1414

1515
export type UpdateMediaAttachmentParams = Partial<CreateMediaAttachmentParams>;

src/mastodon/rest/v1/status-repository.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ interface UpdateStatusMediaAttribute {
7171
/** Two floating points (x,y), comma-delimited, ranging from -1.0 to 1.0 */
7272
readonly focus?: string | null;
7373
/** Custom thumbnail */
74-
readonly thumbnail?: unknown | null;
74+
readonly thumbnail?: Blob | string | null;
7575
}
7676

7777
export type UpdateStatusParams = CreateStatusParams & {

src/mastodon/rest/v2/media-attachment-repository.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ import { type MediaAttachment } from "../../entities/v1";
33

44
export interface CreateMediaAttachmentParams {
55
/** The file to be attached, using multipart form data. */
6-
readonly file: unknown;
6+
readonly file: Blob | string;
77
/** A plain-text description of the media, for accessibility purposes. */
88
readonly description?: string | null;
99
/** Two floating points (x,y), comma-delimited, ranging from -1.0 to 1.0 */
1010
readonly focus?: string | null;
1111
/** Custom thumbnail */
12-
readonly thumbnail?: unknown | null;
12+
readonly thumbnail?: Blob | string | null;
1313
}
1414

1515
export interface CreateMediaAttachmentExtraParams {

0 commit comments

Comments
 (0)