From 0928a3d93a4265f334b6e80f14cbe654b45ada56 Mon Sep 17 00:00:00 2001 From: naskya <m@naskya.net> Date: Sun, 24 Sep 2023 12:38:17 +0900 Subject: [PATCH 1/6] chore: remove unused import --- packages/backend/src/models/repositories/note.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/backend/src/models/repositories/note.ts b/packages/backend/src/models/repositories/note.ts index 7e90b7dee1..54001f9524 100644 --- a/packages/backend/src/models/repositories/note.ts +++ b/packages/backend/src/models/repositories/note.ts @@ -23,7 +23,6 @@ import { } from "@/misc/populate-emojis.js"; import { db } from "@/db/postgre.js"; import { IdentifiableError } from "@/misc/identifiable-error.js"; -import { detect as detectLanguage } from "tinyld"; export async function populatePoll(note: Note, meId: User["id"] | null) { const poll = await Polls.findOneByOrFail({ noteId: note.id }); From 1abe36f84478359ac6ad545e853e51309b2acc71 Mon Sep 17 00:00:00 2001 From: naskya <m@naskya.net> Date: Sun, 24 Sep 2023 03:45:25 +0000 Subject: [PATCH 2/6] fix: add missing class --- packages/client/src/ui/_common_/navbar.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/client/src/ui/_common_/navbar.vue b/packages/client/src/ui/_common_/navbar.vue index 074e7ae975..5d599cc4df 100644 --- a/packages/client/src/ui/_common_/navbar.vue +++ b/packages/client/src/ui/_common_/navbar.vue @@ -26,7 +26,7 @@ <MkA v-click-anime v-tooltip.noDelay.right="i18n.ts.timeline" - class="item index" + class="item _button index" active-class="active" to="/" exact From 15fecc44a9404e35ec7a2b121b9545cfd234c1be Mon Sep 17 00:00:00 2001 From: yumeko <yumeko@mainichi.social> Date: Sun, 24 Sep 2023 04:19:28 +0000 Subject: [PATCH 3/6] Fix a couple remaining places where the banners are called ads --- locales/en-US.yml | 3 ++- locales/ja-JP.yml | 3 ++- packages/client/src/components/global/MkAd.vue | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/locales/en-US.yml b/locales/en-US.yml index 37de0e0acc..2eaec59af3 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -1186,7 +1186,8 @@ _accountDelete: inProgress: "Deletion is currently in progress" _ad: back: "Back" - reduceFrequencyOfThisAd: "Show this ad less" + adsBy: "Community banner by {by}" + reduceFrequencyOfThisAd: "Show this banner less" _forgotPassword: enterEmail: "Enter the email address you used to register. A link with which you can reset your password will then be sent to it." diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 2b82df1f8b..d6df04e65e 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1022,7 +1022,8 @@ _accountDelete: inProgress: "削除が進行中" _ad: back: "戻る" - reduceFrequencyOfThisAd: "この広告の表示頻度を下げる" + adsBy: "バナーで{by}" + reduceFrequencyOfThisAd: "このバナーの表示頻度を下げる" _forgotPassword: enterEmail: "アカウントに登録したメールアドレスを入力してください。そのアドレス宛てに、パスワードリセット用のリンクが送信されます。" ifNoEmail: "メールアドレスを登録していない場合は、管理者までお問い合わせください。" diff --git a/packages/client/src/components/global/MkAd.vue b/packages/client/src/components/global/MkAd.vue index 09012a0327..d415351d0a 100644 --- a/packages/client/src/components/global/MkAd.vue +++ b/packages/client/src/components/global/MkAd.vue @@ -21,7 +21,7 @@ </div> <div v-else class="menu"> <div class="body"> - <div>Ads by {{ host }}</div> + <div>{{ i18n.t("_ad.adsBy", { by: host }) }}</div> <!--<MkButton class="button" primary>{{ i18n.ts._ad.like }}</MkButton>--> <MkButton v-if="chosen.ratio !== 0" From 9ea046c01169e0ebedd5f8d18239b9a877294173 Mon Sep 17 00:00:00 2001 From: Kainoa Kanter <kainoa@t1c.dev> Date: Sun, 24 Sep 2023 04:27:16 +0000 Subject: [PATCH 4/6] Refactor: firefishjs imports --- packages/backend/src/models/schema/user.ts | 2 +- packages/backend/test/e2e/users.ts | 16 +- packages/backend/test/utils.ts | 6 +- packages/client/src/account.ts | 12 +- .../src/components/MkAbuseReportWindow.vue | 4 +- .../client/src/components/MkCropperDialog.vue | 8 +- packages/client/src/components/MkCwButton.vue | 4 +- .../client/src/components/MkDrive.file.vue | 6 +- .../client/src/components/MkDrive.folder.vue | 14 +- .../src/components/MkDrive.navFolder.vue | 14 +- packages/client/src/components/MkDrive.vue | 65 +- .../src/components/MkDriveFileThumbnail.vue | 4 +- .../src/components/MkDriveSelectDialog.vue | 8 +- .../client/src/components/MkDriveWindow.vue | 4 +- .../client/src/components/MkEmojiPicker.vue | 8 +- .../src/components/MkFeaturedPhotos.vue | 4 +- .../client/src/components/MkFollowButton.vue | 6 +- .../client/src/components/MkImageViewer.vue | 4 +- packages/client/src/components/MkMedia.vue | 4 +- .../client/src/components/MkMediaBanner.vue | 4 +- .../client/src/components/MkMediaList.vue | 8 +- packages/client/src/components/MkNote.vue | 8 +- .../client/src/components/MkNoteDetailed.vue | 12 +- .../client/src/components/MkNoteHeader.vue | 4 +- .../client/src/components/MkNoteSimple.vue | 4 +- packages/client/src/components/MkNoteSub.vue | 12 +- .../client/src/components/MkNotification.vue | 4 +- .../client/src/components/MkPagination.vue | 8 +- packages/client/src/components/MkPoll.vue | 4 +- packages/client/src/components/MkPostForm.vue | 24 +- .../src/components/MkPostFormDialog.vue | 20 +- .../client/src/components/MkReactedUsers.vue | 6 +- .../components/MkReactionsViewer.reaction.vue | 4 +- .../src/components/MkReactionsViewer.vue | 4 +- .../client/src/components/MkRenoteButton.vue | 4 +- .../src/components/MkSubNoteContent.vue | 4 +- .../client/src/components/MkUserCardMini.vue | 4 +- packages/client/src/components/MkUserInfo.vue | 4 +- .../src/components/MkUserOnlineIndicator.vue | 4 +- .../client/src/components/MkUserPreview.vue | 4 +- .../src/components/MkUserSelectDialog.vue | 10 +- .../components/MkUserSelectLocalDialog.vue | 10 +- .../src/components/MkVisibilityPicker.vue | 8 +- .../client/src/components/global/MkAcct.vue | 4 +- .../client/src/components/global/MkAvatar.vue | 4 +- .../src/components/global/MkUserName.vue | 4 +- packages/client/src/filters/user.ts | 8 +- packages/client/src/instance.ts | 4 +- packages/client/src/os.ts | 10 +- packages/client/src/pages/_error_.vue | 4 +- .../client/src/pages/admin/overview.user.vue | 4 +- packages/client/src/pages/clip.vue | 4 +- .../pages/messaging/messaging-room.form.vue | 8 +- .../messaging/messaging-room.message.vue | 4 +- .../src/pages/messaging/messaging-room.vue | 12 +- packages/client/src/pages/note.vue | 8 +- packages/client/src/pages/settings/theme.vue | 2 +- packages/client/src/pages/share.vue | 10 +- packages/client/src/pages/user-info.vue | 4 +- packages/client/src/pages/user/clips.vue | 4 +- .../client/src/pages/user/follow-list.vue | 4 +- packages/client/src/pages/user/followers.vue | 4 +- packages/client/src/pages/user/following.vue | 4 +- packages/client/src/pages/user/gallery.vue | 4 +- packages/client/src/pages/user/home.vue | 4 +- .../client/src/pages/user/index.activity.vue | 4 +- .../client/src/pages/user/index.photos.vue | 10 +- .../client/src/pages/user/index.timeline.vue | 4 +- packages/client/src/pages/user/index.vue | 4 +- packages/client/src/pages/user/pages.vue | 4 +- packages/client/src/pages/user/reactions.vue | 4 +- packages/client/src/scripts/get-note-menu.ts | 8 +- .../client/src/scripts/get-note-summary.ts | 4 +- packages/client/src/scripts/page-metadata.ts | 6 +- packages/client/src/scripts/upload.ts | 4 +- .../client/src/scripts/use-note-capture.ts | 4 +- packages/client/src/stream.ts | 4 +- packages/client/src/types/menu.ts | 8 +- .../src/ui/_common_/statusbar-federation.vue | 4 +- .../src/ui/_common_/statusbar-user-list.vue | 4 +- packages/firefish-js/README.md | 2 +- packages/firefish-js/etc/misskey-js.api.md | 2681 ----------------- packages/firefish-js/test-d/api.ts | 24 +- packages/firefish-js/test-d/streaming.ts | 10 +- packages/megalodon/src/misskey/web_socket.ts | 2 +- packages/sw/src/scripts/operations.ts | 12 +- packages/sw/src/types.ts | 6 +- 87 files changed, 312 insertions(+), 2990 deletions(-) delete mode 100644 packages/firefish-js/etc/misskey-js.api.md diff --git a/packages/backend/src/models/schema/user.ts b/packages/backend/src/models/schema/user.ts index d625308f00..61c20a898f 100644 --- a/packages/backend/src/models/schema/user.ts +++ b/packages/backend/src/models/schema/user.ts @@ -24,7 +24,7 @@ export const packedUserLiteSchema = { type: "string", nullable: true, optional: false, - example: "misskey.example.com", + example: "firefish.example.com", description: "The local host is represented with `null`.", }, avatarUrl: { diff --git a/packages/backend/test/e2e/users.ts b/packages/backend/test/e2e/users.ts index 86e254aebf..28d5468ecf 100644 --- a/packages/backend/test/e2e/users.ts +++ b/packages/backend/test/e2e/users.ts @@ -15,7 +15,7 @@ import { failedApiCall, uploadFile, } from "../utils.js"; -import type * as misskey from "misskey-js"; +import type * as firefish from "firefish-js"; import type { INestApplicationContext } from "@nestjs/common"; describe("ユーザー", () => { @@ -34,16 +34,16 @@ describe("ユーザー", () => { }; // BUG misskey-jsとjson-schemaと実際に返ってくるデータが全部違う - type UserLite = misskey.entities.UserLite & { + type UserLite = firefish.entities.UserLite & { badgeRoles: any[]; }; type UserDetailedNotMe = UserLite & - misskey.entities.UserDetailed & { + firefish.entities.UserDetailed & { roles: any[]; }; - type MeDetailed = UserDetailedNotMe & misskey.entities.MeDetailed; + type MeDetailed = UserDetailedNotMe & firefish.entities.MeDetailed; type User = MeDetailed & { token: string }; @@ -183,12 +183,12 @@ describe("ユーザー", () => { let root: User; let alice: User; - let aliceNote: misskey.entities.Note; - let alicePage: misskey.entities.Page; - let aliceList: misskey.entities.UserList; + let aliceNote: firefish.entities.Note; + let alicePage: firefish.entities.Page; + let aliceList: firefish.entities.UserList; let bob: User; - let bobNote: misskey.entities.Note; + let bobNote: firefish.entities.Note; let carol: User; let dave: User; diff --git a/packages/backend/test/utils.ts b/packages/backend/test/utils.ts index 79d622b54b..ff2dd79de9 100644 --- a/packages/backend/test/utils.ts +++ b/packages/backend/test/utils.ts @@ -6,7 +6,7 @@ import * as childProcess from "child_process"; import * as http from "node:http"; import { SIGKILL } from "constants"; import WebSocket from "ws"; -import * as misskey from "firefish-js"; +import * as firefish from "firefish-js"; import fetch from "node-fetch"; import FormData from "form-data"; import { DataSource } from "typeorm"; @@ -113,8 +113,8 @@ export const signup = async (params?: any): Promise<any> => { export const post = async ( user: any, - params?: misskey.Endpoints["notes/create"]["req"], -): Promise<misskey.entities.Note> => { + params?: firefish.Endpoints["notes/create"]["req"], +): Promise<firefish.entities.Note> => { const q = Object.assign( { text: "test", diff --git a/packages/client/src/account.ts b/packages/client/src/account.ts index 13408b525d..bb526846e1 100644 --- a/packages/client/src/account.ts +++ b/packages/client/src/account.ts @@ -1,5 +1,5 @@ import { defineAsyncComponent, reactive } from "vue"; -import type * as misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import { i18n } from "./i18n"; import { del, get, set } from "@/scripts/idb-proxy"; import { apiUrl } from "@/config"; @@ -8,7 +8,7 @@ import { reloadChannel, unisonReload } from "@/scripts/unison-reload"; // TODO: 他のタブと永続化されたstateを同期 -type Account = misskey.entities.MeDetailed; +type Account = firefish.entities.MeDetailed; const accountData = localStorage.getItem("account"); @@ -150,8 +150,8 @@ export async function openAccountMenu( opts: { includeCurrentAccount?: boolean; withExtraOperation: boolean; - active?: misskey.entities.UserDetailed["id"]; - onChoose?: (account: misskey.entities.UserDetailed) => void; + active?: firefish.entities.UserDetailed["id"]; + onChoose?: (account: firefish.entities.UserDetailed) => void; }, ev: MouseEvent, ) { @@ -183,7 +183,7 @@ export async function openAccountMenu( ); } - async function switchAccount(account: misskey.entities.UserDetailed) { + async function switchAccount(account: firefish.entities.UserDetailed) { const storedAccounts = await getAccounts(); const token = storedAccounts.find((x) => x.id === account.id).token; switchAccountWithToken(token); @@ -200,7 +200,7 @@ export async function openAccountMenu( userIds: storedAccounts.map((x) => x.id), }); - function createItem(account: misskey.entities.UserDetailed) { + function createItem(account: firefish.entities.UserDetailed) { return { type: "user", user: account, diff --git a/packages/client/src/components/MkAbuseReportWindow.vue b/packages/client/src/components/MkAbuseReportWindow.vue index ed4737894a..3839789436 100644 --- a/packages/client/src/components/MkAbuseReportWindow.vue +++ b/packages/client/src/components/MkAbuseReportWindow.vue @@ -41,7 +41,7 @@ <script setup lang="ts"> import { ref } from "vue"; -import type * as Misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import XWindow from "@/components/MkWindow.vue"; import MkTextarea from "@/components/form/textarea.vue"; import MkButton from "@/components/MkButton.vue"; @@ -49,7 +49,7 @@ import * as os from "@/os"; import { i18n } from "@/i18n"; const props = defineProps<{ - user: Misskey.entities.User; + user: firefish.entities.User; initialComment?: string; }>(); diff --git a/packages/client/src/components/MkCropperDialog.vue b/packages/client/src/components/MkCropperDialog.vue index 6febec9f11..c85cdf9419 100644 --- a/packages/client/src/components/MkCropperDialog.vue +++ b/packages/client/src/components/MkCropperDialog.vue @@ -37,7 +37,7 @@ <script lang="ts" setup> import { onMounted, ref } from "vue"; -import type * as misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import Cropper from "cropperjs"; import tinycolor from "tinycolor2"; import XModalWindow from "@/components/MkModalWindow.vue"; @@ -49,13 +49,13 @@ import { query } from "@/scripts/url"; import { i18n } from "@/i18n"; const emit = defineEmits<{ - (ev: "ok", cropped: misskey.entities.DriveFile): void; + (ev: "ok", cropped: firefish.entities.DriveFile): void; (ev: "cancel"): void; (ev: "closed"): void; }>(); const props = defineProps<{ - file: misskey.entities.DriveFile; + file: firefish.entities.DriveFile; aspectRatio: number; }>(); @@ -68,7 +68,7 @@ let cropper: Cropper | null = null, loading = ref(true); const ok = async () => { - const promise = new Promise<misskey.entities.DriveFile>(async (res) => { + const promise = new Promise<firefish.entities.DriveFile>(async (res) => { const croppedCanvas = await cropper?.getCropperSelection()?.$toCanvas(); croppedCanvas.toBlob((blob) => { const formData = new FormData(); diff --git a/packages/client/src/components/MkCwButton.vue b/packages/client/src/components/MkCwButton.vue index f4505bcf6a..a8e741732a 100644 --- a/packages/client/src/components/MkCwButton.vue +++ b/packages/client/src/components/MkCwButton.vue @@ -15,13 +15,13 @@ <script lang="ts" setup> import { computed, ref } from "vue"; import { length } from "stringz"; -import type * as misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import { concat } from "@/scripts/array"; import { i18n } from "@/i18n"; const props = defineProps<{ modelValue: boolean; - note: misskey.entities.Note; + note: firefish.entities.Note; }>(); const emit = defineEmits<{ diff --git a/packages/client/src/components/MkDrive.file.vue b/packages/client/src/components/MkDrive.file.vue index 53705ca23e..e2ef600044 100644 --- a/packages/client/src/components/MkDrive.file.vue +++ b/packages/client/src/components/MkDrive.file.vue @@ -39,7 +39,7 @@ <script lang="ts" setup> import { computed, defineAsyncComponent, ref } from "vue"; -import type * as Misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import copyToClipboard from "@/scripts/copy-to-clipboard"; import MkDriveFileThumbnail from "@/components/MkDriveFileThumbnail.vue"; import bytes from "@/filters/bytes"; @@ -49,7 +49,7 @@ import { $i } from "@/account"; const props = withDefaults( defineProps<{ - file: Misskey.entities.DriveFile; + file: firefish.entities.DriveFile; isSelected?: boolean; selectMode?: boolean; }>(), @@ -60,7 +60,7 @@ const props = withDefaults( ); const emit = defineEmits<{ - (ev: "chosen", r: Misskey.entities.DriveFile): void; + (ev: "chosen", r: firefish.entities.DriveFile): void; (ev: "dragstart"): void; (ev: "dragend"): void; }>(); diff --git a/packages/client/src/components/MkDrive.folder.vue b/packages/client/src/components/MkDrive.folder.vue index 60700781a2..9973c471d0 100644 --- a/packages/client/src/components/MkDrive.folder.vue +++ b/packages/client/src/components/MkDrive.folder.vue @@ -38,14 +38,14 @@ <script lang="ts" setup> import { computed, defineAsyncComponent, ref } from "vue"; -import type * as Misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import * as os from "@/os"; import { i18n } from "@/i18n"; import { defaultStore } from "@/store"; const props = withDefaults( defineProps<{ - folder: Misskey.entities.DriveFolder; + folder: firefish.entities.DriveFolder; isSelected?: boolean; selectMode?: boolean; }>(), @@ -56,11 +56,11 @@ const props = withDefaults( ); const emit = defineEmits<{ - (ev: "chosen", v: Misskey.entities.DriveFolder): void; - (ev: "move", v: Misskey.entities.DriveFolder): void; - (ev: "upload", file: File, folder: Misskey.entities.DriveFolder); - (ev: "removeFile", v: Misskey.entities.DriveFile["id"]): void; - (ev: "removeFolder", v: Misskey.entities.DriveFolder["id"]): void; + (ev: "chosen", v: firefish.entities.DriveFolder): void; + (ev: "move", v: firefish.entities.DriveFolder): void; + (ev: "upload", file: File, folder: firefish.entities.DriveFolder); + (ev: "removeFile", v: firefish.entities.DriveFile["id"]): void; + (ev: "removeFolder", v: firefish.entities.DriveFolder["id"]): void; (ev: "dragstart"): void; (ev: "dragend"): void; }>(); diff --git a/packages/client/src/components/MkDrive.navFolder.vue b/packages/client/src/components/MkDrive.navFolder.vue index df0b3c49d1..c4a5ff3781 100644 --- a/packages/client/src/components/MkDrive.navFolder.vue +++ b/packages/client/src/components/MkDrive.navFolder.vue @@ -15,24 +15,24 @@ <script lang="ts" setup> import { ref } from "vue"; -import type * as Misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import * as os from "@/os"; import { i18n } from "@/i18n"; const props = defineProps<{ - folder?: Misskey.entities.DriveFolder; - parentFolder: Misskey.entities.DriveFolder | null; + folder?: firefish.entities.DriveFolder; + parentFolder: firefish.entities.DriveFolder | null; }>(); const emit = defineEmits<{ - (ev: "move", v?: Misskey.entities.DriveFolder): void; + (ev: "move", v?: firefish.entities.DriveFolder): void; ( ev: "upload", file: File, - folder?: Misskey.entities.DriveFolder | null, + folder?: firefish.entities.DriveFolder | null, ): void; - (ev: "removeFile", v: Misskey.entities.DriveFile["id"]): void; - (ev: "removeFolder", v: Misskey.entities.DriveFolder["id"]): void; + (ev: "removeFile", v: firefish.entities.DriveFile["id"]): void; + (ev: "removeFolder", v: firefish.entities.DriveFolder["id"]): void; }>(); const hover = ref(false); diff --git a/packages/client/src/components/MkDrive.vue b/packages/client/src/components/MkDrive.vue index c5dec32bcf..3702b94015 100644 --- a/packages/client/src/components/MkDrive.vue +++ b/packages/client/src/components/MkDrive.vue @@ -139,7 +139,7 @@ import { ref, watch, } from "vue"; -import type * as Misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import MkButton from "./MkButton.vue"; import XNavFolder from "@/components/MkDrive.navFolder.vue"; import XFolder from "@/components/MkDrive.folder.vue"; @@ -152,7 +152,7 @@ import { uploadFile, uploads } from "@/scripts/upload"; const props = withDefaults( defineProps<{ - initialFolder?: Misskey.entities.DriveFolder; + initialFolder?: firefish.entities.DriveFolder; type?: string; multiple?: boolean; select?: "file" | "folder" | null; @@ -166,28 +166,28 @@ const props = withDefaults( const emit = defineEmits<{ ( ev: "selected", - v: Misskey.entities.DriveFile | Misskey.entities.DriveFolder, + v: firefish.entities.DriveFile | firefish.entities.DriveFolder, ): void; ( ev: "change-selection", - v: Misskey.entities.DriveFile[] | Misskey.entities.DriveFolder[], + v: firefish.entities.DriveFile[] | firefish.entities.DriveFolder[], ): void; (ev: "move-root"): void; - (ev: "cd", v: Misskey.entities.DriveFolder | null): void; - (ev: "open-folder", v: Misskey.entities.DriveFolder): void; + (ev: "cd", v: firefish.entities.DriveFolder | null): void; + (ev: "open-folder", v: firefish.entities.DriveFolder): void; }>(); const loadMoreFiles = ref<InstanceType<typeof MkButton>>(); const fileInput = ref<HTMLInputElement>(); -const folder = ref<Misskey.entities.DriveFolder | null>(null); -const files = ref<Misskey.entities.DriveFile[]>([]); -const folders = ref<Misskey.entities.DriveFolder[]>([]); +const folder = ref<firefish.entities.DriveFolder | null>(null); +const files = ref<firefish.entities.DriveFile[]>([]); +const folders = ref<firefish.entities.DriveFolder[]>([]); const moreFiles = ref(false); const moreFolders = ref(false); -const hierarchyFolders = ref<Misskey.entities.DriveFolder[]>([]); -const selectedFiles = ref<Misskey.entities.DriveFile[]>([]); -const selectedFolders = ref<Misskey.entities.DriveFolder[]>([]); +const hierarchyFolders = ref<firefish.entities.DriveFolder[]>([]); +const selectedFiles = ref<firefish.entities.DriveFile[]>([]); +const selectedFolders = ref<firefish.entities.DriveFolder[]>([]); const uploadings = uploads; const connection = stream.useChannel("drive"); const keepOriginal = ref<boolean>(defaultStore.state.keepOriginalUploading); // 外部渡しが多いので$refは使わないほうがよい @@ -211,11 +211,11 @@ const ilFilesObserver = new IntersectionObserver( watch(folder, () => emit("cd", folder.value)); -function onStreamDriveFileCreated(file: Misskey.entities.DriveFile) { +function onStreamDriveFileCreated(file: firefish.entities.DriveFile) { addFile(file, true); } -function onStreamDriveFileUpdated(file: Misskey.entities.DriveFile) { +function onStreamDriveFileUpdated(file: firefish.entities.DriveFile) { const current = folder.value ? folder.value.id : null; if (current !== file.folderId) { removeFile(file); @@ -229,13 +229,13 @@ function onStreamDriveFileDeleted(fileId: string) { } function onStreamDriveFolderCreated( - createdFolder: Misskey.entities.DriveFolder, + createdFolder: firefish.entities.DriveFolder, ) { addFolder(createdFolder, true); } function onStreamDriveFolderUpdated( - updatedFolder: Misskey.entities.DriveFolder, + updatedFolder: firefish.entities.DriveFolder, ) { const current = folder.value ? folder.value.id : null; if (current !== updatedFolder.parentId) { @@ -380,7 +380,7 @@ function createFolder() { }); } -function renameFolder(folderToRename: Misskey.entities.DriveFolder) { +function renameFolder(folderToRename: firefish.entities.DriveFolder) { os.inputText({ title: i18n.ts.renameFolder, placeholder: i18n.ts.inputNewFolderName, @@ -397,7 +397,7 @@ function renameFolder(folderToRename: Misskey.entities.DriveFolder) { }); } -function deleteFolder(folderToDelete: Misskey.entities.DriveFolder) { +function deleteFolder(folderToDelete: firefish.entities.DriveFolder) { os.api("drive/folders/delete", { folderId: folderToDelete.id, }) @@ -432,7 +432,7 @@ function onChangeFileInput() { function upload( file: File, - folderToUpload?: Misskey.entities.DriveFolder | null, + folderToUpload?: firefish.entities.DriveFolder | null, ) { uploadFile( file, @@ -446,7 +446,7 @@ function upload( }); } -function chooseFile(file: Misskey.entities.DriveFile) { +function chooseFile(file: firefish.entities.DriveFile) { const isAlreadySelected = selectedFiles.value.some((f) => f.id === file.id); if (props.multiple) { if (isAlreadySelected) { @@ -467,7 +467,7 @@ function chooseFile(file: Misskey.entities.DriveFile) { } } -function chooseFolder(folderToChoose: Misskey.entities.DriveFolder) { +function chooseFolder(folderToChoose: firefish.entities.DriveFolder) { const isAlreadySelected = selectedFolders.value.some( (f) => f.id === folderToChoose.id, ); @@ -490,7 +490,7 @@ function chooseFolder(folderToChoose: Misskey.entities.DriveFolder) { } } -function move(target?: Misskey.entities.DriveFolder) { +function move(target?: firefish.entities.DriveFolder) { if (!target) { goRoot(); return; @@ -518,7 +518,10 @@ function move(target?: Misskey.entities.DriveFolder) { }); } -function addFolder(folderToAdd: Misskey.entities.DriveFolder, unshift = false) { +function addFolder( + folderToAdd: firefish.entities.DriveFolder, + unshift = false, +) { const current = folder.value ? folder.value.id : null; if (current !== folderToAdd.parentId) return; @@ -535,7 +538,7 @@ function addFolder(folderToAdd: Misskey.entities.DriveFolder, unshift = false) { } } -function addFile(fileToAdd: Misskey.entities.DriveFile, unshift = false) { +function addFile(fileToAdd: firefish.entities.DriveFile, unshift = false) { const current = folder.value ? folder.value.id : null; if (current !== fileToAdd.folderId) return; @@ -552,30 +555,30 @@ function addFile(fileToAdd: Misskey.entities.DriveFile, unshift = false) { } } -function removeFolder(folderToRemove: Misskey.entities.DriveFolder | string) { +function removeFolder(folderToRemove: firefish.entities.DriveFolder | string) { const folderIdToRemove = typeof folderToRemove === "object" ? folderToRemove.id : folderToRemove; folders.value = folders.value.filter((f) => f.id !== folderIdToRemove); } -function removeFile(file: Misskey.entities.DriveFile | string) { +function removeFile(file: firefish.entities.DriveFile | string) { const fileId = typeof file === "object" ? file.id : file; files.value = files.value.filter((f) => f.id !== fileId); } -function appendFile(file: Misskey.entities.DriveFile) { +function appendFile(file: firefish.entities.DriveFile) { addFile(file); } -function appendFolder(folderToAppend: Misskey.entities.DriveFolder) { +function appendFolder(folderToAppend: firefish.entities.DriveFolder) { addFolder(folderToAppend); } /* -function prependFile(file: Misskey.entities.DriveFile) { +function prependFile(file: firefish.entities.DriveFile) { addFile(file, true); } -function prependFolder(folderToPrepend: Misskey.entities.DriveFolder) { +function prependFolder(folderToPrepend: firefish.entities.DriveFolder) { addFolder(folderToPrepend, true); } */ @@ -706,7 +709,7 @@ function getMenu() { icon: "ph-trash ph-bold ph-lg", action: () => { deleteFolder( - folder.value as Misskey.entities.DriveFolder, + folder.value as firefish.entities.DriveFolder, ); }, } diff --git a/packages/client/src/components/MkDriveFileThumbnail.vue b/packages/client/src/components/MkDriveFileThumbnail.vue index 7d9b43635e..3a93be6396 100644 --- a/packages/client/src/components/MkDriveFileThumbnail.vue +++ b/packages/client/src/components/MkDriveFileThumbnail.vue @@ -41,11 +41,11 @@ <script lang="ts" setup> import { computed } from "vue"; -import type * as Misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import ImgWithBlurhash from "@/components/MkImgWithBlurhash.vue"; const props = defineProps<{ - file: Misskey.entities.DriveFile; + file: firefish.entities.DriveFile; fit: string; }>(); diff --git a/packages/client/src/components/MkDriveSelectDialog.vue b/packages/client/src/components/MkDriveSelectDialog.vue index ae292b96a7..af40dc8490 100644 --- a/packages/client/src/components/MkDriveSelectDialog.vue +++ b/packages/client/src/components/MkDriveSelectDialog.vue @@ -37,7 +37,7 @@ <script lang="ts" setup> import { ref } from "vue"; -import type * as Misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import XDrive from "@/components/MkDrive.vue"; import XModalWindow from "@/components/MkModalWindow.vue"; import number from "@/filters/number"; @@ -54,13 +54,13 @@ withDefaults( ); const emit = defineEmits<{ - (ev: "done", r?: Misskey.entities.DriveFile[]): void; + (ev: "done", r?: firefish.entities.DriveFile[]): void; (ev: "closed"): void; }>(); const dialog = ref<InstanceType<typeof XModalWindow>>(); -const selected = ref<Misskey.entities.DriveFile[]>([]); +const selected = ref<firefish.entities.DriveFile[]>([]); function ok() { emit("done", selected.value); @@ -72,7 +72,7 @@ function cancel() { dialog.value?.close(); } -function onChangeSelection(files: Misskey.entities.DriveFile[]) { +function onChangeSelection(files: firefish.entities.DriveFile[]) { selected.value = files; } </script> diff --git a/packages/client/src/components/MkDriveWindow.vue b/packages/client/src/components/MkDriveWindow.vue index 24daea977b..f116b6e8f5 100644 --- a/packages/client/src/components/MkDriveWindow.vue +++ b/packages/client/src/components/MkDriveWindow.vue @@ -15,13 +15,13 @@ <script lang="ts" setup> import {} from "vue"; -import type * as Misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import XDrive from "@/components/MkDrive.vue"; import XWindow from "@/components/MkWindow.vue"; import { i18n } from "@/i18n"; defineProps<{ - initialFolder?: Misskey.entities.DriveFolder; + initialFolder?: firefish.entities.DriveFolder; }>(); const emit = defineEmits<{ diff --git a/packages/client/src/components/MkEmojiPicker.vue b/packages/client/src/components/MkEmojiPicker.vue index d14071d5a0..f45195d1a2 100644 --- a/packages/client/src/components/MkEmojiPicker.vue +++ b/packages/client/src/components/MkEmojiPicker.vue @@ -165,7 +165,7 @@ <script lang="ts" setup> import { computed, onMounted, ref, watch } from "vue"; -import type * as Misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import { FocusTrap } from "focus-trap-vue"; import XSection from "@/components/MkEmojiPicker.section.vue"; import type { UnicodeEmojiDef } from "@/scripts/emojilist"; @@ -241,7 +241,7 @@ const height = computed(() => const customEmojiCategories = emojiCategories; const customEmojis = instance.emojis; const q = ref<string | null>(null); -const searchResultCustom = ref<Misskey.entities.CustomEmoji[]>([]); +const searchResultCustom = ref<firefish.entities.CustomEmoji[]>([]); const searchResultUnicode = ref<UnicodeEmojiDef[]>([]); const tab = ref<"index" | "custom" | "unicode" | "tags">("index"); @@ -259,7 +259,7 @@ watch(q, () => { const searchCustom = () => { const max = 16; const emojis = customEmojis; - const matches = new Set<Misskey.entities.CustomEmoji>(); + const matches = new Set<firefish.entities.CustomEmoji>(); const exactMatch = emojis.find((emoji) => emoji.name === newQ); if (exactMatch) matches.add(exactMatch); @@ -420,7 +420,7 @@ function reset() { } function getKey( - emoji: string | Misskey.entities.CustomEmoji | UnicodeEmojiDef, + emoji: string | firefish.entities.CustomEmoji | UnicodeEmojiDef, ): string { return typeof emoji === "string" ? emoji : emoji.emoji || `:${emoji.name}:`; } diff --git a/packages/client/src/components/MkFeaturedPhotos.vue b/packages/client/src/components/MkFeaturedPhotos.vue index c3610ae2ef..8c1eccf73a 100644 --- a/packages/client/src/components/MkFeaturedPhotos.vue +++ b/packages/client/src/components/MkFeaturedPhotos.vue @@ -8,10 +8,10 @@ <script lang="ts" setup> import { ref } from "vue"; -import type * as Misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import * as os from "@/os"; -const meta = ref<Misskey.entities.DetailedInstanceMetadata>(); +const meta = ref<firefish.entities.DetailedInstanceMetadata>(); os.api("meta", { detail: true }).then((gotMeta) => { meta.value = gotMeta; diff --git a/packages/client/src/components/MkFollowButton.vue b/packages/client/src/components/MkFollowButton.vue index afbebf1243..aba3e51612 100644 --- a/packages/client/src/components/MkFollowButton.vue +++ b/packages/client/src/components/MkFollowButton.vue @@ -62,7 +62,7 @@ <script lang="ts" setup> import { computed, onBeforeUnmount, onMounted, ref } from "vue"; -import type * as Misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import * as os from "@/os"; import { stream } from "@/stream"; import { i18n } from "@/i18n"; @@ -76,7 +76,7 @@ const router = useRouter(); const emit = defineEmits(["refresh"]); const props = withDefaults( defineProps<{ - user: Misskey.entities.UserDetailed; + user: firefish.entities.UserDetailed; full?: boolean; large?: boolean; hideMenu?: boolean; @@ -104,7 +104,7 @@ if (props.user.isFollowing == null) { }).then(onFollowChange); } -function onFollowChange(user: Misskey.entities.UserDetailed) { +function onFollowChange(user: firefish.entities.UserDetailed) { if (user.id === props.user.id) { isFollowing.value = user.isFollowing; hasPendingFollowRequestFromYou.value = diff --git a/packages/client/src/components/MkImageViewer.vue b/packages/client/src/components/MkImageViewer.vue index 882701e95b..a75928be8a 100644 --- a/packages/client/src/components/MkImageViewer.vue +++ b/packages/client/src/components/MkImageViewer.vue @@ -28,14 +28,14 @@ <script lang="ts" setup> import { ref } from "vue"; -import type * as misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import bytes from "@/filters/bytes"; import number from "@/filters/number"; import MkModal from "@/components/MkModal.vue"; const props = withDefaults( defineProps<{ - image: misskey.entities.DriveFile; + image: firefish.entities.DriveFile; }>(), {}, ); diff --git a/packages/client/src/components/MkMedia.vue b/packages/client/src/components/MkMedia.vue index 6428eeafb0..7607ed2980 100644 --- a/packages/client/src/components/MkMedia.vue +++ b/packages/client/src/components/MkMedia.vue @@ -92,7 +92,7 @@ import { computed, ref, watch } from "vue"; import VuePlyr from "vue-plyr"; import "vue-plyr/dist/vue-plyr.css"; -import type * as misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import { getStaticImageUrl } from "@/scripts/get-static-image-url"; import ImgWithBlurhash from "@/components/MkImgWithBlurhash.vue"; import { defaultStore } from "@/store"; @@ -100,7 +100,7 @@ import { i18n } from "@/i18n"; import * as os from "@/os"; const props = defineProps<{ - media: misskey.entities.DriveFile; + media: firefish.entities.DriveFile; raw?: boolean; }>(); diff --git a/packages/client/src/components/MkMediaBanner.vue b/packages/client/src/components/MkMediaBanner.vue index 21f2f80330..df9e7d160b 100644 --- a/packages/client/src/components/MkMediaBanner.vue +++ b/packages/client/src/components/MkMediaBanner.vue @@ -58,14 +58,14 @@ <script lang="ts" setup> import { onMounted, ref } from "vue"; import VuePlyr from "vue-plyr"; -import type * as misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import { ColdDeviceStorage } from "@/store"; import "vue-plyr/dist/vue-plyr.css"; import { i18n } from "@/i18n"; const props = withDefaults( defineProps<{ - media: misskey.entities.DriveFile; + media: firefish.entities.DriveFile; }>(), {}, ); diff --git a/packages/client/src/components/MkMediaList.vue b/packages/client/src/components/MkMediaList.vue index 1fbc77d2c2..70afb2cc9c 100644 --- a/packages/client/src/components/MkMediaList.vue +++ b/packages/client/src/components/MkMediaList.vue @@ -41,7 +41,7 @@ <script lang="ts" setup> import { onMounted, ref } from "vue"; -import type * as misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import PhotoSwipeLightbox from "photoswipe/lightbox"; import PhotoSwipe from "photoswipe"; import "photoswipe/style.css"; @@ -56,7 +56,7 @@ import { } from "@/const"; const props = defineProps<{ - mediaList: misskey.entities.DriveFile[]; + mediaList: firefish.entities.DriveFile[]; raw?: boolean; inDm?: boolean; }>(); @@ -184,7 +184,7 @@ onMounted(() => { } }); -const previewable = (file: misskey.entities.DriveFile): boolean => { +const previewable = (file: firefish.entities.DriveFile): boolean => { if (file.type === "image/svg+xml") return true; // svgのwebpublic/thumbnailはpngなのでtrue // FILE_TYPE_BROWSERSAFEに適合しないものはブラウザで表示するのに不適切 if (isModule(file)) return true; @@ -194,7 +194,7 @@ const previewable = (file: misskey.entities.DriveFile): boolean => { ); }; -const isModule = (file: misskey.entities.DriveFile): boolean => { +const isModule = (file: firefish.entities.DriveFile): boolean => { return ( FILE_TYPE_TRACKER_MODULES.some((type) => { return file.type === type; diff --git a/packages/client/src/components/MkNote.vue b/packages/client/src/components/MkNote.vue index 3581cd2395..e6d044e7e1 100644 --- a/packages/client/src/components/MkNote.vue +++ b/packages/client/src/components/MkNote.vue @@ -275,7 +275,7 @@ import { computed, inject, onMounted, ref } from "vue"; import * as mfm from "mfm-js"; import type { Ref } from "vue"; -import type * as misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import { detect as detectLanguage_ } from "tinyld"; import MkSubNoteContent from "./MkSubNoteContent.vue"; import MkNoteSub from "@/components/MkNoteSub.vue"; @@ -307,7 +307,7 @@ import { getNoteSummary } from "@/scripts/get-note-summary"; const router = useRouter(); const props = defineProps<{ - note: misskey.entities.Note; + note: firefish.entities.Note; pinned?: boolean; detailedView?: boolean; collapsedReply?: boolean; @@ -352,7 +352,7 @@ const renoteButton = ref<InstanceType<typeof XRenoteButton>>(); const renoteTime = ref<HTMLElement>(); const reactButton = ref<HTMLElement>(); const appearNote = computed(() => - isRenote ? (note.value.renote as misskey.entities.Note) : note.value, + isRenote ? (note.value.renote as firefish.entities.Note) : note.value, ); const isMyRenote = $i && $i.id === note.value.userId; const showContent = ref(false); @@ -476,7 +476,7 @@ function undoReact(note): void { }); } -const currentClipPage = inject<Ref<misskey.entities.Clip> | null>( +const currentClipPage = inject<Ref<firefish.entities.Clip> | null>( "currentClipPage", null, ); diff --git a/packages/client/src/components/MkNoteDetailed.vue b/packages/client/src/components/MkNoteDetailed.vue index f27a3d5b2e..0fc66fd0fc 100644 --- a/packages/client/src/components/MkNoteDetailed.vue +++ b/packages/client/src/components/MkNoteDetailed.vue @@ -151,7 +151,7 @@ <script lang="ts" setup> import { onMounted, onUnmounted, onUpdated, ref } from "vue"; -import type * as misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import type { NoteUpdatedEvent } from "firefish-js/built/streaming.types"; import MkTab from "@/components/MkTab.vue"; import MkNote from "@/components/MkNote.vue"; @@ -173,7 +173,7 @@ import { deepClone } from "@/scripts/clone"; import { stream } from "@/stream"; const props = defineProps<{ - note: misskey.entities.Note; + note: firefish.entities.Note; pinned?: boolean; }>(); @@ -219,10 +219,10 @@ const muted = ref( ); const translation = ref(null); const translating = ref(false); -const conversation = ref<null | misskey.entities.Note[]>([]); -const replies = ref<misskey.entities.Note[]>([]); -const directReplies = ref<null | misskey.entities.Note[]>([]); -const directQuotes = ref<null | misskey.entities.Note[]>([]); +const conversation = ref<null | firefish.entities.Note[]>([]); +const replies = ref<firefish.entities.Note[]>([]); +const directReplies = ref<null | firefish.entities.Note[]>([]); +const directQuotes = ref<null | firefish.entities.Note[]>([]); const clips = ref(); const renotes = ref(); let isScrolling; diff --git a/packages/client/src/components/MkNoteHeader.vue b/packages/client/src/components/MkNoteHeader.vue index f70e2476ea..48826c9a9a 100644 --- a/packages/client/src/components/MkNoteHeader.vue +++ b/packages/client/src/components/MkNoteHeader.vue @@ -50,7 +50,7 @@ <script lang="ts" setup> import { ref } from "vue"; -import type * as misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import { defaultStore } from "@/store"; import MkVisibility from "@/components/MkVisibility.vue"; import MkInstanceTicker from "@/components/MkInstanceTicker.vue"; @@ -60,7 +60,7 @@ import { i18n } from "@/i18n"; import { pageWindow } from "@/os"; const props = defineProps<{ - note: misskey.entities.Note; + note: firefish.entities.Note; pinned?: boolean; canOpenServerInfo?: boolean; }>(); diff --git a/packages/client/src/components/MkNoteSimple.vue b/packages/client/src/components/MkNoteSimple.vue index 280abe25a4..5f45811fc1 100644 --- a/packages/client/src/components/MkNoteSimple.vue +++ b/packages/client/src/components/MkNoteSimple.vue @@ -11,12 +11,12 @@ </template> <script lang="ts" setup> -import type * as misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import XNoteHeader from "@/components/MkNoteHeader.vue"; import MkSubNoteContent from "@/components/MkSubNoteContent.vue"; const props = defineProps<{ - note: misskey.entities.Note; + note: firefish.entities.Note; pinned?: boolean; }>(); </script> diff --git a/packages/client/src/components/MkNoteSub.vue b/packages/client/src/components/MkNoteSub.vue index 99dc6e6521..5deee1f88b 100644 --- a/packages/client/src/components/MkNoteSub.vue +++ b/packages/client/src/components/MkNoteSub.vue @@ -191,7 +191,7 @@ <script lang="ts" setup> import { computed, inject, ref } from "vue"; import type { Ref } from "vue"; -import type * as misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import * as mfm from "mfm-js"; import { detect as detectLanguage_ } from "tinyld"; import XNoteHeader from "@/components/MkNoteHeader.vue"; @@ -221,8 +221,8 @@ const router = useRouter(); const props = withDefaults( defineProps<{ - note: misskey.entities.Note; - conversation?: misskey.entities.Note[]; + note: firefish.entities.Note; + conversation?: firefish.entities.Note[]; parentId?; detailedView?; @@ -262,7 +262,7 @@ const starButton = ref<InstanceType<typeof XStarButton>>(); const renoteButton = ref<InstanceType<typeof XRenoteButton>>(); const reactButton = ref<HTMLElement>(); const appearNote = computed(() => - isRenote ? (note.value.renote as misskey.entities.Note) : note.value, + isRenote ? (note.value.renote as firefish.entities.Note) : note.value, ); const isDeleted = ref(false); const muted = ref( @@ -275,7 +275,7 @@ const muted = ref( ); const translation = ref(null); const translating = ref(false); -const replies: misskey.entities.Note[] = +const replies: firefish.entities.Note[] = props.conversation ?.filter( (item) => @@ -378,7 +378,7 @@ function undoReact(note): void { }); } -const currentClipPage = inject<Ref<misskey.entities.Clip> | null>( +const currentClipPage = inject<Ref<firefish.entities.Clip> | null>( "currentClipPage", null, ); diff --git a/packages/client/src/components/MkNotification.vue b/packages/client/src/components/MkNotification.vue index d89e27c88a..dc49bbdc4c 100644 --- a/packages/client/src/components/MkNotification.vue +++ b/packages/client/src/components/MkNotification.vue @@ -274,7 +274,7 @@ <script lang="ts" setup> import { onMounted, onUnmounted, ref, watch } from "vue"; -import type * as misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import XReactionIcon from "@/components/MkReactionIcon.vue"; import MkFollowButton from "@/components/MkFollowButton.vue"; import XReactionTooltip from "@/components/MkReactionTooltip.vue"; @@ -290,7 +290,7 @@ import { instance } from "@/instance"; const props = withDefaults( defineProps<{ - notification: misskey.entities.Notification; + notification: firefish.entities.Notification; withTime?: boolean; full?: boolean; }>(), diff --git a/packages/client/src/components/MkPagination.vue b/packages/client/src/components/MkPagination.vue index 6acc5b2851..b38657659e 100644 --- a/packages/client/src/components/MkPagination.vue +++ b/packages/client/src/components/MkPagination.vue @@ -65,7 +65,7 @@ <script lang="ts" setup> import type { ComputedRef } from "vue"; import { computed, isRef, onActivated, onDeactivated, ref, watch } from "vue"; -import type * as misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import * as os from "@/os"; import { getScrollContainer, @@ -77,13 +77,13 @@ import MkButton from "@/components/MkButton.vue"; import { i18n } from "@/i18n"; export interface Paging< - E extends keyof misskey.Endpoints = keyof misskey.Endpoints, + E extends keyof firefish.Endpoints = keyof firefish.Endpoints, > { endpoint: E; limit: number; params?: - | misskey.Endpoints[E]["req"] - | ComputedRef<misskey.Endpoints[E]["req"]>; + | firefish.Endpoints[E]["req"] + | ComputedRef<firefish.Endpoints[E]["req"]>; /** * 検索APIのような、ページング不可なエンドポイントを利用する場合 diff --git a/packages/client/src/components/MkPoll.vue b/packages/client/src/components/MkPoll.vue index 8eb83a2dce..b73c615da0 100644 --- a/packages/client/src/components/MkPoll.vue +++ b/packages/client/src/components/MkPoll.vue @@ -53,7 +53,7 @@ <script lang="ts" setup> import { computed, ref } from "vue"; -import type * as misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import { sum } from "@/scripts/array"; import { pleaseLogin } from "@/scripts/please-login"; import * as os from "@/os"; @@ -61,7 +61,7 @@ import { i18n } from "@/i18n"; import { useInterval } from "@/scripts/use-interval"; const props = defineProps<{ - note: misskey.entities.Note; + note: firefish.entities.Note; readOnly?: boolean; }>(); diff --git a/packages/client/src/components/MkPostForm.vue b/packages/client/src/components/MkPostForm.vue index 51ce6e1b95..cf090a5fae 100644 --- a/packages/client/src/components/MkPostForm.vue +++ b/packages/client/src/components/MkPostForm.vue @@ -243,7 +243,7 @@ import { watch, } from "vue"; import * as mfm from "mfm-js"; -import type * as misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import autosize from "autosize"; import insertTextAtCursor from "insert-text-at-cursor"; import { length } from "stringz"; @@ -281,22 +281,22 @@ const modal = inject("modal"); const props = withDefaults( defineProps<{ - reply?: misskey.entities.Note; - renote?: misskey.entities.Note; + reply?: firefish.entities.Note; + renote?: firefish.entities.Note; channel?: any; // TODO - mention?: misskey.entities.User; - specified?: misskey.entities.User; + mention?: firefish.entities.User; + specified?: firefish.entities.User; initialText?: string; - initialVisibility?: typeof misskey.noteVisibilities; - initialFiles?: misskey.entities.DriveFile[]; + initialVisibility?: typeof firefish.noteVisibilities; + initialFiles?: firefish.entities.DriveFile[]; initialLocalOnly?: boolean; - initialVisibleUsers?: misskey.entities.User[]; - initialNote?: misskey.entities.Note; + initialVisibleUsers?: firefish.entities.User[]; + initialNote?: firefish.entities.Note; instant?: boolean; fixed?: boolean; autofocus?: boolean; showMfmCheatSheet?: boolean; - editId?: misskey.entities.Note["id"]; + editId?: firefish.entities.Note["id"]; }>(), { initialVisibleUsers: () => [], @@ -338,7 +338,7 @@ const visibility = ref( ((defaultStore.state.rememberNoteVisibility ? defaultStore.state.visibility : defaultStore.state - .defaultNoteVisibility) as (typeof misskey.noteVisibilities)[number]), + .defaultNoteVisibility) as (typeof firefish.noteVisibilities)[number]), ); const visibleUsers = ref([]); if (props.initialVisibleUsers) { @@ -980,7 +980,7 @@ function showActions(ev) { ); } -const postAccount = ref<misskey.entities.UserDetailed | null>(null); +const postAccount = ref<firefish.entities.UserDetailed | null>(null); function openAccountMenu(ev: MouseEvent) { openAccountMenu_( diff --git a/packages/client/src/components/MkPostFormDialog.vue b/packages/client/src/components/MkPostFormDialog.vue index 1dd90eebed..1f576eded2 100644 --- a/packages/client/src/components/MkPostFormDialog.vue +++ b/packages/client/src/components/MkPostFormDialog.vue @@ -21,26 +21,26 @@ <script lang="ts" setup> import { shallowRef } from "vue"; -import type * as misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import MkModal from "@/components/MkModal.vue"; import MkPostForm from "@/components/MkPostForm.vue"; const props = defineProps<{ - reply?: misskey.entities.Note; - renote?: misskey.entities.Note; + reply?: firefish.entities.Note; + renote?: firefish.entities.Note; channel?: any; // TODO - mention?: misskey.entities.User; - specified?: misskey.entities.User; + mention?: firefish.entities.User; + specified?: firefish.entities.User; initialText?: string; - initialVisibility?: typeof misskey.noteVisibilities; - initialFiles?: misskey.entities.DriveFile[]; + initialVisibility?: typeof firefish.noteVisibilities; + initialFiles?: firefish.entities.DriveFile[]; initialLocalOnly?: boolean; - initialVisibleUsers?: misskey.entities.User[]; - initialNote?: misskey.entities.Note; + initialVisibleUsers?: firefish.entities.User[]; + initialNote?: firefish.entities.Note; instant?: boolean; fixed?: boolean; autofocus?: boolean; - editId?: misskey.entities.Note["id"]; + editId?: firefish.entities.Note["id"]; }>(); const emit = defineEmits<{ diff --git a/packages/client/src/components/MkReactedUsers.vue b/packages/client/src/components/MkReactedUsers.vue index 3b0c7f0d08..6e0b0fc8c5 100644 --- a/packages/client/src/components/MkReactedUsers.vue +++ b/packages/client/src/components/MkReactedUsers.vue @@ -37,16 +37,16 @@ <script lang="ts" setup> import { onMounted, ref, watch } from "vue"; -import type * as misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import MkReactionIcon from "@/components/MkReactionIcon.vue"; import MkUserCardMini from "@/components/MkUserCardMini.vue"; import * as os from "@/os"; const props = defineProps<{ - noteId: misskey.entities.Note["id"]; + noteId: firefish.entities.Note["id"]; }>(); -const note = ref<misskey.entities.Note>(); +const note = ref<firefish.entities.Note>(); const tab = ref<string>(); const reactions = ref<string[]>(); const users = ref(); diff --git a/packages/client/src/components/MkReactionsViewer.reaction.vue b/packages/client/src/components/MkReactionsViewer.reaction.vue index fdc7e4268c..9b4ce95628 100644 --- a/packages/client/src/components/MkReactionsViewer.reaction.vue +++ b/packages/client/src/components/MkReactionsViewer.reaction.vue @@ -23,7 +23,7 @@ <script lang="ts" setup> import { computed, ref } from "vue"; -import type * as misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import XDetails from "@/components/MkReactionsViewer.details.vue"; import XReactionIcon from "@/components/MkReactionIcon.vue"; import * as os from "@/os"; @@ -34,7 +34,7 @@ const props = defineProps<{ reaction: string; count: number; isInitial: boolean; - note: misskey.entities.Note; + note: firefish.entities.Note; }>(); const emit = defineEmits<{ diff --git a/packages/client/src/components/MkReactionsViewer.vue b/packages/client/src/components/MkReactionsViewer.vue index fc41499adf..e0e695e3f3 100644 --- a/packages/client/src/components/MkReactionsViewer.vue +++ b/packages/client/src/components/MkReactionsViewer.vue @@ -18,12 +18,12 @@ <script lang="ts" setup> import { computed, ref } from "vue"; -import type * as misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import { $i } from "@/account"; import XReaction from "@/components/MkReactionsViewer.reaction.vue"; const props = defineProps<{ - note: misskey.entities.Note; + note: firefish.entities.Note; }>(); const reactionsEl = ref<HTMLElement>(); diff --git a/packages/client/src/components/MkRenoteButton.vue b/packages/client/src/components/MkRenoteButton.vue index 3c766ac4d3..dd96fcd6d8 100644 --- a/packages/client/src/components/MkRenoteButton.vue +++ b/packages/client/src/components/MkRenoteButton.vue @@ -22,7 +22,7 @@ <script lang="ts" setup> import { computed, ref } from "vue"; -import type * as misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import Ripple from "@/components/MkRipple.vue"; import XDetails from "@/components/MkUsersTooltip.vue"; import { pleaseLogin } from "@/scripts/please-login"; @@ -35,7 +35,7 @@ import type { MenuItem } from "@/types/menu"; import { vibrate } from "@/scripts/vibrate"; const props = defineProps<{ - note: misskey.entities.Note; + note: firefish.entities.Note; count: number; detailedView?; }>(); diff --git a/packages/client/src/components/MkSubNoteContent.vue b/packages/client/src/components/MkSubNoteContent.vue index 394dfb34c7..93bf85e2e6 100644 --- a/packages/client/src/components/MkSubNoteContent.vue +++ b/packages/client/src/components/MkSubNoteContent.vue @@ -177,7 +177,7 @@ <script lang="ts" setup> import { ref } from "vue"; -import type * as misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import * as mfm from "mfm-js"; import * as os from "@/os"; import XNoteSimple from "@/components/MkNoteSimple.vue"; @@ -194,7 +194,7 @@ import { i18n } from "@/i18n"; import { defaultStore } from "@/store"; const props = defineProps<{ - note: misskey.entities.Note; + note: firefish.entities.Note; parentId?; conversation?; detailed?: boolean; diff --git a/packages/client/src/components/MkUserCardMini.vue b/packages/client/src/components/MkUserCardMini.vue index 2a22858f83..ac343cd8e5 100644 --- a/packages/client/src/components/MkUserCardMini.vue +++ b/packages/client/src/components/MkUserCardMini.vue @@ -26,14 +26,14 @@ <script lang="ts" setup> import { ref } from "vue"; -import type * as misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import MkMiniChart from "@/components/MkMiniChart.vue"; import * as os from "@/os"; import { acct, userPage } from "@/filters/user"; const props = withDefaults( defineProps<{ - user: misskey.entities.User; + user: firefish.entities.User; withChart?: boolean; showAboutPage?: boolean; }>(), diff --git a/packages/client/src/components/MkUserInfo.vue b/packages/client/src/components/MkUserInfo.vue index 27a75a4bec..df9ae825ab 100644 --- a/packages/client/src/components/MkUserInfo.vue +++ b/packages/client/src/components/MkUserInfo.vue @@ -88,7 +88,7 @@ <script lang="ts" setup> import { ref } from "vue"; -import type * as misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import MkFollowButton from "@/components/MkFollowButton.vue"; import XShowMoreButton from "@/components/MkShowMoreButton.vue"; import MkNumber from "@/components/MkNumber.vue"; @@ -96,7 +96,7 @@ import { userPage } from "@/filters/user"; import { i18n } from "@/i18n"; const props = defineProps<{ - user: misskey.entities.UserDetailed; + user: firefish.entities.UserDetailed; detailed?: boolean; }>(); diff --git a/packages/client/src/components/MkUserOnlineIndicator.vue b/packages/client/src/components/MkUserOnlineIndicator.vue index b988aa7321..a1482bb822 100644 --- a/packages/client/src/components/MkUserOnlineIndicator.vue +++ b/packages/client/src/components/MkUserOnlineIndicator.vue @@ -5,11 +5,11 @@ <script lang="ts" setup> import { computed } from "vue"; -import type * as misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import { i18n } from "@/i18n"; const props = defineProps<{ - user: misskey.entities.User; + user: firefish.entities.User; }>(); const text = computed(() => { diff --git a/packages/client/src/components/MkUserPreview.vue b/packages/client/src/components/MkUserPreview.vue index 38fc41df46..76b7878e39 100644 --- a/packages/client/src/components/MkUserPreview.vue +++ b/packages/client/src/components/MkUserPreview.vue @@ -30,7 +30,7 @@ <script lang="ts" setup> import { onMounted, ref } from "vue"; import * as Acct from "firefish-js/built/acct"; -import type * as misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import MkUserInfo from "@/components/MkUserInfo.vue"; import * as os from "@/os"; @@ -47,7 +47,7 @@ const emit = defineEmits<{ }>(); const zIndex = os.claimZIndex("middle"); -const user = ref<misskey.entities.UserDetailed | null>(null); +const user = ref<firefish.entities.UserDetailed | null>(null); const top = ref(0); const left = ref(0); diff --git a/packages/client/src/components/MkUserSelectDialog.vue b/packages/client/src/components/MkUserSelectDialog.vue index 3a4310c0b5..6ab186170d 100644 --- a/packages/client/src/components/MkUserSelectDialog.vue +++ b/packages/client/src/components/MkUserSelectDialog.vue @@ -89,7 +89,7 @@ <script lang="ts" setup> import { onMounted, ref } from "vue"; -import type * as misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import MkInput from "@/components/form/input.vue"; import FormSplit from "@/components/form/split.vue"; import XModalWindow from "@/components/MkModalWindow.vue"; @@ -98,16 +98,16 @@ import { defaultStore } from "@/store"; import { i18n } from "@/i18n"; const emit = defineEmits<{ - (ev: "ok", selected: misskey.entities.UserDetailed): void; + (ev: "ok", selected: firefish.entities.UserDetailed): void; (ev: "cancel"): void; (ev: "closed"): void; }>(); const username = ref(""); const host = ref(""); -const users: misskey.entities.UserDetailed[] = ref([]); -const recentUsers: misskey.entities.UserDetailed[] = ref([]); -const selected: misskey.entities.UserDetailed | null = ref(null); +const users: firefish.entities.UserDetailed[] = ref([]); +const recentUsers: firefish.entities.UserDetailed[] = ref([]); +const selected: firefish.entities.UserDetailed | null = ref(null); const dialogEl = ref(); const search = () => { diff --git a/packages/client/src/components/MkUserSelectLocalDialog.vue b/packages/client/src/components/MkUserSelectLocalDialog.vue index d72892edc4..055ebf4c1d 100644 --- a/packages/client/src/components/MkUserSelectLocalDialog.vue +++ b/packages/client/src/components/MkUserSelectLocalDialog.vue @@ -85,7 +85,7 @@ <script lang="ts" setup> import { onMounted, ref } from "vue"; -import type * as misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import MkInput from "@/components/form/input.vue"; import FormSplit from "@/components/form/split.vue"; import XModalWindow from "@/components/MkModalWindow.vue"; @@ -94,15 +94,15 @@ import { defaultStore } from "@/store"; import { i18n } from "@/i18n"; const emit = defineEmits<{ - (ev: "ok", selected: misskey.entities.UserDetailed): void; + (ev: "ok", selected: firefish.entities.UserDetailed): void; (ev: "cancel"): void; (ev: "closed"): void; }>(); const username = ref(""); -const users: misskey.entities.UserDetailed[] = ref([]); -const recentUsers: misskey.entities.UserDetailed[] = ref([]); -const selected: misskey.entities.UserDetailed | null = ref(null); +const users: firefish.entities.UserDetailed[] = ref([]); +const recentUsers: firefish.entities.UserDetailed[] = ref([]); +const selected: firefish.entities.UserDetailed | null = ref(null); const dialogEl = ref(); const search = () => { diff --git a/packages/client/src/components/MkVisibilityPicker.vue b/packages/client/src/components/MkVisibilityPicker.vue index 720c79f313..5d0330e8a1 100644 --- a/packages/client/src/components/MkVisibilityPicker.vue +++ b/packages/client/src/components/MkVisibilityPicker.vue @@ -123,7 +123,7 @@ <script lang="ts" setup> import { nextTick, ref, shallowRef, watch } from "vue"; -import type * as misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import MkModal from "@/components/MkModal.vue"; import { i18n } from "@/i18n"; @@ -131,7 +131,7 @@ const modal = shallowRef<InstanceType<typeof MkModal>>(); const props = withDefaults( defineProps<{ - currentVisibility: (typeof misskey.noteVisibilities)[number]; + currentVisibility: (typeof firefish.noteVisibilities)[number]; currentLocalOnly: boolean; src?: HTMLElement; }>(), @@ -141,7 +141,7 @@ const props = withDefaults( const emit = defineEmits<{ ( ev: "changeVisibility", - v: (typeof misskey.noteVisibilities)[number], + v: (typeof firefish.noteVisibilities)[number], ): void; (ev: "changeLocalOnly", v: boolean): void; (ev: "closed"): void; @@ -154,7 +154,7 @@ watch(localOnly, () => { emit("changeLocalOnly", localOnly.value); }); -function choose(visibility: (typeof misskey.noteVisibilities)[number]): void { +function choose(visibility: (typeof firefish.noteVisibilities)[number]): void { v.value = visibility; emit("changeVisibility", visibility); nextTick(() => { diff --git a/packages/client/src/components/global/MkAcct.vue b/packages/client/src/components/global/MkAcct.vue index 7433c70469..bf2f466ae3 100644 --- a/packages/client/src/components/global/MkAcct.vue +++ b/packages/client/src/components/global/MkAcct.vue @@ -10,12 +10,12 @@ </template> <script lang="ts" setup> -import type * as misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import { toUnicode } from "punycode/"; import { host as hostRaw } from "@/config"; defineProps<{ - user: misskey.entities.UserDetailed; + user: firefish.entities.UserDetailed; detail?: boolean; }>(); diff --git a/packages/client/src/components/global/MkAvatar.vue b/packages/client/src/components/global/MkAvatar.vue index 5000dcb874..16a694f690 100644 --- a/packages/client/src/components/global/MkAvatar.vue +++ b/packages/client/src/components/global/MkAvatar.vue @@ -37,7 +37,7 @@ <script lang="ts" setup> import { computed, ref, watch } from "vue"; -import type * as misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import { getStaticImageUrl } from "@/scripts/get-static-image-url"; import { extractAvgColorFromBlurhash } from "@/scripts/extract-avg-color-from-blurhash"; import { acct, userPage } from "@/filters/user"; @@ -46,7 +46,7 @@ import { defaultStore } from "@/store"; const props = withDefaults( defineProps<{ - user: misskey.entities.User; + user: firefish.entities.User; target?: string | null; disableLink?: boolean; disablePreview?: boolean; diff --git a/packages/client/src/components/global/MkUserName.vue b/packages/client/src/components/global/MkUserName.vue index 5094d2f2ab..3e32bf3e89 100644 --- a/packages/client/src/components/global/MkUserName.vue +++ b/packages/client/src/components/global/MkUserName.vue @@ -9,11 +9,11 @@ </template> <script lang="ts" setup> -import type * as misskey from "firefish-js"; +import type * as firefish from "firefish-js"; const props = withDefaults( defineProps<{ - user: misskey.entities.User; + user: firefish.entities.User; nowrap?: boolean; }>(), { diff --git a/packages/client/src/filters/user.ts b/packages/client/src/filters/user.ts index 66a2de49d5..487ce215e1 100644 --- a/packages/client/src/filters/user.ts +++ b/packages/client/src/filters/user.ts @@ -1,15 +1,15 @@ -import type * as misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import * as Acct from "firefish-js/built/acct"; import { url } from "@/config"; -export const acct = (user: misskey.Acct) => { +export const acct = (user: firefish.Acct) => { return Acct.toString(user); }; -export const userName = (user: misskey.entities.User) => { +export const userName = (user: firefish.entities.User) => { return user.name || user.username; }; -export const userPage = (user: misskey.Acct, path?, absolute = false) => { +export const userPage = (user: firefish.Acct, path?, absolute = false) => { return `${absolute ? url : ""}/@${acct(user)}${path ? `/${path}` : ""}`; }; diff --git a/packages/client/src/instance.ts b/packages/client/src/instance.ts index 1ed32fbfc1..783cb01ad6 100644 --- a/packages/client/src/instance.ts +++ b/packages/client/src/instance.ts @@ -1,5 +1,5 @@ import { computed, reactive } from "vue"; -import type * as Misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import { api } from "./os"; // TODO: 他のタブと永続化されたstateを同期 @@ -7,7 +7,7 @@ import { api } from "./os"; const instanceData = localStorage.getItem("instance"); // TODO: instanceをリアクティブにするかは再考の余地あり -export const instance: Misskey.entities.DetailedInstanceMetadata = reactive( +export const instance: firefish.entities.DetailedInstanceMetadata = reactive( instanceData ? JSON.parse(instanceData) : { diff --git a/packages/client/src/os.ts b/packages/client/src/os.ts index b309185270..1943059298 100644 --- a/packages/client/src/os.ts +++ b/packages/client/src/os.ts @@ -4,7 +4,7 @@ import type { Component, Ref } from "vue"; import { defineAsyncComponent, markRaw, ref } from "vue"; import { EventEmitter } from "eventemitter3"; import insertTextAtCursor from "insert-text-at-cursor"; -import * as Misskey from "firefish-js"; +import * as firefish from "firefish-js"; import { i18n } from "./i18n"; import { apiUrl, url } from "@/config"; import MkPostFormDialog from "@/components/MkPostFormDialog.vue"; @@ -16,7 +16,7 @@ import { $i } from "@/account"; export const pendingApiRequestsCount = ref(0); -const apiClient = new Misskey.api.APIClient({ +const apiClient = new firefish.api.APIClient({ origin: url, }); @@ -651,7 +651,7 @@ export async function selectLocalUser() { }); } -export async function selectInstance(): Promise<Misskey.entities.Instance> { +export async function selectInstance(): Promise<firefish.entities.Instance> { return new Promise((resolve, reject) => { popup( defineAsyncComponent({ @@ -741,11 +741,11 @@ export async function pickEmoji(src: HTMLElement | null, opts) { } export async function cropImage( - image: Misskey.entities.DriveFile, + image: firefish.entities.DriveFile, options: { aspectRatio: number; }, -): Promise<Misskey.entities.DriveFile> { +): Promise<firefish.entities.DriveFile> { return new Promise((resolve, reject) => { popup( defineAsyncComponent({ diff --git a/packages/client/src/pages/_error_.vue b/packages/client/src/pages/_error_.vue index e661575884..6ae87fd41a 100644 --- a/packages/client/src/pages/_error_.vue +++ b/packages/client/src/pages/_error_.vue @@ -37,7 +37,7 @@ <script lang="ts" setup> import { ref } from "vue"; -import type * as misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import MkButton from "@/components/MkButton.vue"; import { version } from "@/config"; import * as os from "@/os"; @@ -54,7 +54,7 @@ const props = withDefaults( const loaded = ref(false); const serverIsDead = ref(false); -const meta = ref<misskey.entities.LiteInstanceMetadata | null>(null); +const meta = ref<firefish.entities.LiteInstanceMetadata | null>(null); os.api("meta", { detail: false, diff --git a/packages/client/src/pages/admin/overview.user.vue b/packages/client/src/pages/admin/overview.user.vue index a2de5c85f4..2762b5727b 100644 --- a/packages/client/src/pages/admin/overview.user.vue +++ b/packages/client/src/pages/admin/overview.user.vue @@ -19,13 +19,13 @@ <script lang="ts" setup> import { ref } from "vue"; -import type * as misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import MkMiniChart from "@/components/MkMiniChart.vue"; import * as os from "@/os"; import { acct } from "@/filters/user"; const props = defineProps<{ - user: misskey.entities.User; + user: firefish.entities.User; }>(); const chart = ref(null); diff --git a/packages/client/src/pages/clip.vue b/packages/client/src/pages/clip.vue index e3af86e2c8..e5e0305e63 100644 --- a/packages/client/src/pages/clip.vue +++ b/packages/client/src/pages/clip.vue @@ -29,7 +29,7 @@ <script lang="ts" setup> import { computed, provide, ref, watch } from "vue"; -import type * as misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import XNotes from "@/components/MkNotes.vue"; import { $i } from "@/account"; import { i18n } from "@/i18n"; @@ -40,7 +40,7 @@ const props = defineProps<{ clipId: string; }>(); -const clip = ref<misskey.entities.Clip>(); +const clip = ref<firefish.entities.Clip>(); const pagination = { endpoint: "clips/notes" as const, limit: 10, diff --git a/packages/client/src/pages/messaging/messaging-room.form.vue b/packages/client/src/pages/messaging/messaging-room.form.vue index 6ca305ddc4..35226f10b7 100644 --- a/packages/client/src/pages/messaging/messaging-room.form.vue +++ b/packages/client/src/pages/messaging/messaging-room.form.vue @@ -56,7 +56,7 @@ <script lang="ts" setup> import { computed, onMounted, ref, watch } from "vue"; -import type * as Misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import autosize from "autosize"; // import insertTextAtCursor from 'insert-text-at-cursor'; import { throttle } from "throttle-debounce"; @@ -70,15 +70,15 @@ import { i18n } from "@/i18n"; import { uploadFile } from "@/scripts/upload"; const props = defineProps<{ - user?: Misskey.entities.UserDetailed | null; - group?: Misskey.entities.UserGroup | null; + user?: firefish.entities.UserDetailed | null; + group?: firefish.entities.UserGroup | null; }>(); const textEl = ref<HTMLTextAreaElement>(); const fileEl = ref<HTMLInputElement>(); const text = ref<string>(""); -const file = ref<Misskey.entities.DriveFile | null>(null); +const file = ref<firefish.entities.DriveFile | null>(null); const sending = ref(false); const typing = throttle(3000, () => { stream.send( diff --git a/packages/client/src/pages/messaging/messaging-room.message.vue b/packages/client/src/pages/messaging/messaging-room.message.vue index a23e8621c0..74dce0a000 100644 --- a/packages/client/src/pages/messaging/messaging-room.message.vue +++ b/packages/client/src/pages/messaging/messaging-room.message.vue @@ -85,7 +85,7 @@ import { computed } from "vue"; import * as mfm from "mfm-js"; -import type * as Misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import XMediaList from "@/components/MkMediaList.vue"; import { extractUrlFromMfm } from "@/scripts/extract-url-from-mfm"; import MkUrlPreview from "@/components/MkUrlPreview.vue"; @@ -94,7 +94,7 @@ import { $i } from "@/account"; import { i18n } from "@/i18n"; const props = defineProps<{ - message: Misskey.entities.MessagingMessage; + message: firefish.entities.MessagingMessage; isGroup?: boolean; }>(); diff --git a/packages/client/src/pages/messaging/messaging-room.vue b/packages/client/src/pages/messaging/messaging-room.vue index bb55121b9c..04c6daab16 100644 --- a/packages/client/src/pages/messaging/messaging-room.vue +++ b/packages/client/src/pages/messaging/messaging-room.vue @@ -105,7 +105,7 @@ import { ref, watch, } from "vue"; -import type * as Misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import * as Acct from "firefish-js/built/acct"; import XMessage from "./messaging-room.message.vue"; import XForm from "./messaging-room.form.vue"; @@ -136,11 +136,11 @@ const formEl = ref<InstanceType<typeof XForm>>(); const pagingComponent = ref<InstanceType<typeof MkPagination>>(); const fetching = ref(true); -const user = ref<Misskey.entities.UserDetailed | null>(null); -const group = ref<Misskey.entities.UserGroup | null>(null); -const typers = ref<Misskey.entities.User[]>([]); -const connection: Misskey.ChannelConnection< - Misskey.Channels["messaging"] +const user = ref<firefish.entities.UserDetailed | null>(null); +const group = ref<firefish.entities.UserGroup | null>(null); +const typers = ref<firefish.entities.User[]>([]); +const connection: firefish.ChannelConnection< + firefish.Channels["messaging"] > | null = ref(null); const showIndicator = ref(false); const { animation } = defaultStore.reactiveState; diff --git a/packages/client/src/pages/note.vue b/packages/client/src/pages/note.vue index 1eccecf802..df558b75ff 100644 --- a/packages/client/src/pages/note.vue +++ b/packages/client/src/pages/note.vue @@ -70,7 +70,7 @@ <script lang="ts" setup> import { computed, ref, watch } from "vue"; -import type * as misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import XNoteDetailed from "@/components/MkNoteDetailed.vue"; import XNotes from "@/components/MkNotes.vue"; import MkRemoteCaution from "@/components/MkRemoteCaution.vue"; @@ -83,14 +83,14 @@ const props = defineProps<{ noteId: string; }>(); -const note = ref<null | misskey.entities.Note>(); +const note = ref<null | firefish.entities.Note>(); const hasPrev = ref(false); const hasNext = ref(false); const showPrev = ref(false); const showNext = ref(false); const error = ref(); const isRenote = ref(false); -const appearNote = ref<null | misskey.entities.Note>(); +const appearNote = ref<null | firefish.entities.Note>(); const prevPagination = { endpoint: "users/notes" as const, @@ -136,7 +136,7 @@ function fetchNote() { note.value.fileIds.length === 0 && note.value.poll == null; appearNote.value = isRenote.value - ? (note.value.renote as misskey.entities.Note) + ? (note.value.renote as firefish.entities.Note) : note.value; Promise.all([ diff --git a/packages/client/src/pages/settings/theme.vue b/packages/client/src/pages/settings/theme.vue index ab0b87ad5b..399e0dcdc1 100644 --- a/packages/client/src/pages/settings/theme.vue +++ b/packages/client/src/pages/settings/theme.vue @@ -114,7 +114,7 @@ >{{ i18n.ts._theme.manage }}<template #suffix>{{ themesCount }}</template></FormLink > - <FormLink to="https://assets.misskey.io/theme/list" external + <FormLink to="https://assets.firefish.io/theme/list" external ><template #icon ><i class="ph-planet ph-bold ph-lg"></i></template >{{ i18n.ts._theme.explore }}</FormLink diff --git a/packages/client/src/pages/share.vue b/packages/client/src/pages/share.vue index 7dbe73d17b..edc508d45d 100644 --- a/packages/client/src/pages/share.vue +++ b/packages/client/src/pages/share.vue @@ -35,7 +35,7 @@ import { computed, ref } from "vue"; // SPECIFICATION: https://misskey-hub.net/docs/features/share-form.html import { noteVisibilities } from "firefish-js"; import * as Acct from "firefish-js/built/acct"; -import type * as Misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import MkButton from "@/components/MkButton.vue"; import XPostForm from "@/components/MkPostForm.vue"; import * as os from "@/os"; @@ -52,16 +52,16 @@ const title = ref(urlParams.get("title")); const text = urlParams.get("text"); const url = urlParams.get("url"); const initialText = ref(null as string | null); -const reply = ref(null as Misskey.entities.Note | null); -const renote = ref(null as Misskey.entities.Note | null); +const reply = ref(null as firefish.entities.Note | null); +const renote = ref(null as firefish.entities.Note | null); const visibility = ref( noteVisibilities.includes(visibilityQuery) ? visibilityQuery : null, ); const localOnly = ref( localOnlyQuery === "0" ? false : localOnlyQuery === "1" ? true : null, ); -const files = ref([] as Misskey.entities.DriveFile[]); -const visibleUsers = ref([] as Misskey.entities.User[]); +const files = ref([] as firefish.entities.DriveFile[]); +const visibleUsers = ref([] as firefish.entities.User[]); async function init() { let noteText = ""; diff --git a/packages/client/src/pages/user-info.vue b/packages/client/src/pages/user-info.vue index 7fb1696034..2840577dcc 100644 --- a/packages/client/src/pages/user-info.vue +++ b/packages/client/src/pages/user-info.vue @@ -358,7 +358,7 @@ <script lang="ts" setup> import { computed, ref, watch } from "vue"; -import type * as misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import MkChart from "@/components/MkChart.vue"; import MkObjectView from "@/components/MkObjectView.vue"; import FormTextarea from "@/components/form/textarea.vue"; @@ -387,7 +387,7 @@ const props = defineProps<{ const tab = ref("overview"); const chartSrc = ref("per-user-notes"); -const user = ref<null | misskey.entities.UserDetailed>(); +const user = ref<null | firefish.entities.UserDetailed>(); const init = ref<ReturnType<typeof createFetcher>>(); const info = ref(); const ips = ref(null); diff --git a/packages/client/src/pages/user/clips.vue b/packages/client/src/pages/user/clips.vue index a4bfd34de6..8dad6978c2 100644 --- a/packages/client/src/pages/user/clips.vue +++ b/packages/client/src/pages/user/clips.vue @@ -25,11 +25,11 @@ <script lang="ts" setup> import { computed } from "vue"; -import type * as misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import MkPagination from "@/components/MkPagination.vue"; const props = defineProps<{ - user: misskey.entities.User; + user: firefish.entities.User; }>(); const pagination = { diff --git a/packages/client/src/pages/user/follow-list.vue b/packages/client/src/pages/user/follow-list.vue index 07cef1126b..ba0a2499e2 100644 --- a/packages/client/src/pages/user/follow-list.vue +++ b/packages/client/src/pages/user/follow-list.vue @@ -24,12 +24,12 @@ <script lang="ts" setup> import { computed } from "vue"; -import type * as misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import MkUserInfo from "@/components/MkUserInfo.vue"; import MkPagination from "@/components/MkPagination.vue"; const props = defineProps<{ - user: misskey.entities.User; + user: firefish.entities.User; type: "following" | "followers"; }>(); diff --git a/packages/client/src/pages/user/followers.vue b/packages/client/src/pages/user/followers.vue index a01617edb0..35d8e6bb26 100644 --- a/packages/client/src/pages/user/followers.vue +++ b/packages/client/src/pages/user/followers.vue @@ -18,7 +18,7 @@ <script lang="ts" setup> import { computed, ref, watch } from "vue"; import * as Acct from "firefish-js/built/acct"; -import type * as misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import XFollowList from "./follow-list.vue"; import * as os from "@/os"; import { definePageMetadata } from "@/scripts/page-metadata"; @@ -31,7 +31,7 @@ const props = withDefaults( {}, ); -const user = ref<null | misskey.entities.UserDetailed>(null); +const user = ref<null | firefish.entities.UserDetailed>(null); const error = ref(null); function fetchUser(): void { diff --git a/packages/client/src/pages/user/following.vue b/packages/client/src/pages/user/following.vue index 96ac8087e3..d6d872d190 100644 --- a/packages/client/src/pages/user/following.vue +++ b/packages/client/src/pages/user/following.vue @@ -18,7 +18,7 @@ <script lang="ts" setup> import { computed, ref, watch } from "vue"; import * as Acct from "firefish-js/built/acct"; -import type * as misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import XFollowList from "./follow-list.vue"; import * as os from "@/os"; import { definePageMetadata } from "@/scripts/page-metadata"; @@ -31,7 +31,7 @@ const props = withDefaults( {}, ); -const user = ref<null | misskey.entities.UserDetailed>(null); +const user = ref<null | firefish.entities.UserDetailed>(null); const error = ref(null); function fetchUser(): void { diff --git a/packages/client/src/pages/user/gallery.vue b/packages/client/src/pages/user/gallery.vue index 62381be146..263427285d 100644 --- a/packages/client/src/pages/user/gallery.vue +++ b/packages/client/src/pages/user/gallery.vue @@ -15,13 +15,13 @@ <script lang="ts" setup> import { computed } from "vue"; -import type * as misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import MkGalleryPostPreview from "@/components/MkGalleryPostPreview.vue"; import MkPagination from "@/components/MkPagination.vue"; const props = withDefaults( defineProps<{ - user: misskey.entities.User; + user: firefish.entities.User; }>(), {}, ); diff --git a/packages/client/src/pages/user/home.vue b/packages/client/src/pages/user/home.vue index b95381ab56..ff3834fcab 100644 --- a/packages/client/src/pages/user/home.vue +++ b/packages/client/src/pages/user/home.vue @@ -388,7 +388,7 @@ import { } from "vue"; import calcAge from "s-age"; import cityTimezones from "city-timezones"; -import type * as misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import XUserTimeline from "./index.timeline.vue"; import XNote from "@/components/MkNote.vue"; import MkFollowButton from "@/components/MkFollowButton.vue"; @@ -411,7 +411,7 @@ const XActivity = defineAsyncComponent(() => import("./index.activity.vue")); const emit = defineEmits(["refresh"]); const props = withDefaults( defineProps<{ - user: misskey.entities.UserDetailed; + user: firefish.entities.UserDetailed; }>(), {}, ); diff --git a/packages/client/src/pages/user/index.activity.vue b/packages/client/src/pages/user/index.activity.vue index fc68d3db81..e77fd36804 100644 --- a/packages/client/src/pages/user/index.activity.vue +++ b/packages/client/src/pages/user/index.activity.vue @@ -31,7 +31,7 @@ <script lang="ts" setup> import { ref } from "vue"; -import type * as misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import MkContainer from "@/components/MkContainer.vue"; import MkChart from "@/components/MkChart.vue"; import * as os from "@/os"; @@ -39,7 +39,7 @@ import { i18n } from "@/i18n"; const props = withDefaults( defineProps<{ - user: misskey.entities.User; + user: firefish.entities.User; limit?: number; }>(), { diff --git a/packages/client/src/pages/user/index.photos.vue b/packages/client/src/pages/user/index.photos.vue index e545ba4d78..ac98c4f20c 100644 --- a/packages/client/src/pages/user/index.photos.vue +++ b/packages/client/src/pages/user/index.photos.vue @@ -29,7 +29,7 @@ <script lang="ts" setup> import { onMounted, ref } from "vue"; -import type * as misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import { getStaticImageUrl } from "@/scripts/get-static-image-url"; import { notePage } from "@/filters/note"; import * as os from "@/os"; @@ -39,18 +39,18 @@ import { defaultStore } from "@/store"; import { i18n } from "@/i18n"; const props = defineProps<{ - user: misskey.entities.UserDetailed; + user: firefish.entities.UserDetailed; }>(); const fetching = ref(true); const images = ref< { - note: misskey.entities.Note; - file: misskey.entities.DriveFile; + note: firefish.entities.Note; + file: firefish.entities.DriveFile; }[] >([]); -function thumbnail(image: misskey.entities.DriveFile): string { +function thumbnail(image: firefish.entities.DriveFile): string { return defaultStore.state.disableShowingAnimatedImages ? getStaticImageUrl(image.thumbnailUrl) : image.thumbnailUrl; diff --git a/packages/client/src/pages/user/index.timeline.vue b/packages/client/src/pages/user/index.timeline.vue index fc4306a09b..c67b07fedf 100644 --- a/packages/client/src/pages/user/index.timeline.vue +++ b/packages/client/src/pages/user/index.timeline.vue @@ -13,13 +13,13 @@ <script lang="ts" setup> import { computed, ref } from "vue"; -import type * as misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import XNotes from "@/components/MkNotes.vue"; import MkTab from "@/components/MkTab.vue"; import { i18n } from "@/i18n"; const props = defineProps<{ - user: misskey.entities.UserDetailed; + user: firefish.entities.UserDetailed; }>(); const include = ref<string | null>(null); diff --git a/packages/client/src/pages/user/index.vue b/packages/client/src/pages/user/index.vue index 7bf40b2bfc..0213a14cf9 100644 --- a/packages/client/src/pages/user/index.vue +++ b/packages/client/src/pages/user/index.vue @@ -31,7 +31,7 @@ <script lang="ts" setup> import { computed, defineAsyncComponent, ref, watch } from "vue"; import * as Acct from "firefish-js/built/acct"; -import type * as misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import { acct as getAcct } from "@/filters/user"; import * as os from "@/os"; import { useRouter } from "@/router"; @@ -58,7 +58,7 @@ const props = withDefaults( useRouter(); const tab = ref(props.page); -const user = ref<null | misskey.entities.UserDetailed>(null); +const user = ref<null | firefish.entities.UserDetailed>(null); const error = ref(null); function fetchUser(): void { diff --git a/packages/client/src/pages/user/pages.vue b/packages/client/src/pages/user/pages.vue index 789d3f4b77..755e0174a6 100644 --- a/packages/client/src/pages/user/pages.vue +++ b/packages/client/src/pages/user/pages.vue @@ -13,12 +13,12 @@ <script lang="ts" setup> import { computed } from "vue"; -import type * as misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import MkPagePreview from "@/components/MkPagePreview.vue"; import MkPagination from "@/components/MkPagination.vue"; const props = defineProps<{ - user: misskey.entities.User; + user: firefish.entities.User; }>(); const pagination = { diff --git a/packages/client/src/pages/user/reactions.vue b/packages/client/src/pages/user/reactions.vue index 3e9f24b0e8..bed1ab55c8 100644 --- a/packages/client/src/pages/user/reactions.vue +++ b/packages/client/src/pages/user/reactions.vue @@ -25,13 +25,13 @@ <script lang="ts" setup> import { computed } from "vue"; -import type * as misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import MkPagination from "@/components/MkPagination.vue"; import MkNote from "@/components/MkNote.vue"; import MkReactionIcon from "@/components/MkReactionIcon.vue"; const props = defineProps<{ - user: misskey.entities.User; + user: firefish.entities.User; }>(); const pagination = { diff --git a/packages/client/src/scripts/get-note-menu.ts b/packages/client/src/scripts/get-note-menu.ts index 9b5ac12eec..0abcf8655a 100644 --- a/packages/client/src/scripts/get-note-menu.ts +++ b/packages/client/src/scripts/get-note-menu.ts @@ -1,6 +1,6 @@ import type { Ref } from "vue"; import { defineAsyncComponent, inject } from "vue"; -import type * as misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import { $i } from "@/account"; import { i18n } from "@/i18n"; import { instance } from "@/instance"; @@ -12,12 +12,12 @@ import { shareAvailable } from "@/scripts/share-available"; import { getUserMenu } from "@/scripts/get-user-menu"; export function getNoteMenu(props: { - note: misskey.entities.Note; + note: firefish.entities.Note; menuButton: Ref<HTMLElement | undefined>; translation: Ref<any>; translating: Ref<boolean>; isDeleted: Ref<boolean>; - currentClipPage?: Ref<misskey.entities.Clip>; + currentClipPage?: Ref<firefish.entities.Clip>; }) { const isRenote = props.note.renote != null && @@ -26,7 +26,7 @@ export function getNoteMenu(props: { props.note.poll == null; const appearNote = isRenote - ? (props.note.renote as misskey.entities.Note) + ? (props.note.renote as firefish.entities.Note) : props.note; function del(): void { diff --git a/packages/client/src/scripts/get-note-summary.ts b/packages/client/src/scripts/get-note-summary.ts index 5cef457cb9..a2ea4b4e2e 100644 --- a/packages/client/src/scripts/get-note-summary.ts +++ b/packages/client/src/scripts/get-note-summary.ts @@ -1,11 +1,11 @@ -import type * as misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import { i18n } from "@/i18n"; /** * 投稿を表す文字列を取得します。 * @param {*} note (packされた)投稿 */ -export const getNoteSummary = (note: misskey.entities.Note): string => { +export const getNoteSummary = (note: firefish.entities.Note): string => { /* if (note.deletedAt) { return `(${i18n.ts.deletedNote})`; diff --git a/packages/client/src/scripts/page-metadata.ts b/packages/client/src/scripts/page-metadata.ts index 1d7eda8809..24af3d9d7d 100644 --- a/packages/client/src/scripts/page-metadata.ts +++ b/packages/client/src/scripts/page-metadata.ts @@ -1,4 +1,4 @@ -import type * as misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import type { ComputedRef, Ref } from "vue"; import { inject, isRef, onActivated, onMounted, provide, ref } from "vue"; @@ -9,8 +9,8 @@ export interface PageMetadata { title: string; subtitle?: string; icon?: string | null; - avatar?: misskey.entities.User | null; - userName?: misskey.entities.User | null; + avatar?: firefish.entities.User | null; + userName?: firefish.entities.User | null; bg?: string; } diff --git a/packages/client/src/scripts/upload.ts b/packages/client/src/scripts/upload.ts index 22e1ae48f2..2b26ba3024 100644 --- a/packages/client/src/scripts/upload.ts +++ b/packages/client/src/scripts/upload.ts @@ -1,5 +1,5 @@ import { reactive, ref } from "vue"; -import type * as Misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import { readAndCompressImage } from "browser-image-resizer"; import { defaultStore } from "@/store"; import { apiUrl } from "@/config"; @@ -34,7 +34,7 @@ export function uploadFile( folder?: any, name?: string, keepOriginal: boolean = defaultStore.state.keepOriginalUploading, -): Promise<Misskey.entities.DriveFile> { +): Promise<firefish.entities.DriveFile> { if (folder && typeof folder === "object") folder = folder.id; return new Promise((resolve, reject) => { diff --git a/packages/client/src/scripts/use-note-capture.ts b/packages/client/src/scripts/use-note-capture.ts index 1cfa79a7c1..57cf5b84a4 100644 --- a/packages/client/src/scripts/use-note-capture.ts +++ b/packages/client/src/scripts/use-note-capture.ts @@ -1,13 +1,13 @@ import type { Ref } from "vue"; import { onUnmounted } from "vue"; -import type * as misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import { stream } from "@/stream"; import { $i } from "@/account"; import * as os from "@/os"; export function useNoteCapture(props: { rootEl: Ref<HTMLElement>; - note: Ref<misskey.entities.Note>; + note: Ref<firefish.entities.Note>; isDeletedRef: Ref<boolean>; }) { const note = props.note; diff --git a/packages/client/src/stream.ts b/packages/client/src/stream.ts index 3984370837..6d7f890d6e 100644 --- a/packages/client/src/stream.ts +++ b/packages/client/src/stream.ts @@ -1,10 +1,10 @@ -import * as Misskey from "firefish-js"; +import * as firefish from "firefish-js"; import { markRaw } from "vue"; import { $i } from "@/account"; import { url } from "@/config"; export const stream = markRaw( - new Misskey.Stream( + new firefish.Stream( url, $i ? { diff --git a/packages/client/src/types/menu.ts b/packages/client/src/types/menu.ts index db0d6550ce..056033da1c 100644 --- a/packages/client/src/types/menu.ts +++ b/packages/client/src/types/menu.ts @@ -1,4 +1,4 @@ -import type * as Misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import type { Ref } from "vue"; export type MenuAction = (ev: MouseEvent) => void; @@ -17,7 +17,7 @@ export interface MenuLink { textStyle?: string; icon?: string; indicate?: boolean; - avatar?: Misskey.entities.User; + avatar?: firefish.entities.User; } export interface MenuA { type: "a"; @@ -31,7 +31,7 @@ export interface MenuA { } export interface MenuUser { type: "user"; - user: Misskey.entities.User; + user: firefish.entities.User; active?: boolean; indicate?: boolean; hidden?: boolean; @@ -54,7 +54,7 @@ export interface MenuButton { accent?: boolean; active?: boolean; hidden?: boolean; - avatar?: Misskey.entities.User; + avatar?: firefish.entities.User; action: MenuAction; } export interface MenuParent { diff --git a/packages/client/src/ui/_common_/statusbar-federation.vue b/packages/client/src/ui/_common_/statusbar-federation.vue index 5e644860ab..7e16b7bbc1 100644 --- a/packages/client/src/ui/_common_/statusbar-federation.vue +++ b/packages/client/src/ui/_common_/statusbar-federation.vue @@ -40,7 +40,7 @@ <script lang="ts" setup> import { computed, defineAsyncComponent, ref, toRef, watch } from "vue"; -import type * as misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import MarqueeText from "@/components/MkMarquee.vue"; import * as os from "@/os"; import { useInterval } from "@/scripts/use-interval"; @@ -57,7 +57,7 @@ const props = defineProps<{ refreshIntervalSec?: number; }>(); -const instances = ref<misskey.entities.Instance[]>([]); +const instances = ref<firefish.entities.Instance[]>([]); const fetching = ref(true); const key = ref(0); diff --git a/packages/client/src/ui/_common_/statusbar-user-list.vue b/packages/client/src/ui/_common_/statusbar-user-list.vue index cfc715e155..6956ef9746 100644 --- a/packages/client/src/ui/_common_/statusbar-user-list.vue +++ b/packages/client/src/ui/_common_/statusbar-user-list.vue @@ -35,7 +35,7 @@ <script lang="ts" setup> import { computed, defineAsyncComponent, ref, toRef, watch } from "vue"; -import type * as misskey from "firefish-js"; +import type * as firefish from "firefish-js"; import MarqueeText from "@/components/MkMarquee.vue"; import * as os from "@/os"; import { useInterval } from "@/scripts/use-interval"; @@ -51,7 +51,7 @@ const props = defineProps<{ refreshIntervalSec?: number; }>(); -const notes = ref<misskey.entities.Note[]>([]); +const notes = ref<firefish.entities.Note[]>([]); const fetching = ref(true); const key = ref(0); diff --git a/packages/firefish-js/README.md b/packages/firefish-js/README.md index 1d68cc7713..24839275ab 100644 --- a/packages/firefish-js/README.md +++ b/packages/firefish-js/README.md @@ -1,6 +1,6 @@ # Firefish.js -Fork of Misskey.js for Firefish +Fork of firefish.js for Firefish https://www.npmjs.com/package/firefish-js diff --git a/packages/firefish-js/etc/misskey-js.api.md b/packages/firefish-js/etc/misskey-js.api.md deleted file mode 100644 index 269d5cf101..0000000000 --- a/packages/firefish-js/etc/misskey-js.api.md +++ /dev/null @@ -1,2681 +0,0 @@ -## API Report File for "misskey-js" - -> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). - -```ts - -import { EventEmitter } from 'eventemitter3'; - -// @public (undocumented) -export type Acct = { - username: string; - host: string | null; -}; - -// Warning: (ae-forgotten-export) The symbol "TODO" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type Ad = TODO_2; - -// @public (undocumented) -type Announcement = { - id: ID; - createdAt: DateString; - updatedAt: DateString | null; - text: string; - title: string; - imageUrl: string | null; - isRead?: boolean; -}; - -// @public (undocumented) -type Antenna = { - id: ID; - createdAt: DateString; - name: string; - keywords: string[][]; - excludeKeywords: string[][]; - src: 'home' | 'all' | 'users' | 'list' | 'group'; - userListId: ID | null; - userGroupId: ID | null; - users: string[]; - caseSensitive: boolean; - notify: boolean; - withReplies: boolean; - withFile: boolean; - hasUnreadNote: boolean; -}; - -declare namespace api { - export { - isAPIError, - APIError, - FetchLike, - APIClient - } -} -export { api } - -// @public (undocumented) -class APIClient { - constructor(opts: { - origin: APIClient['origin']; - credential?: APIClient['credential']; - fetch?: APIClient['fetch'] | null | undefined; - }); - // (undocumented) - credential: string | null | undefined; - // (undocumented) - fetch: FetchLike; - // (undocumented) - origin: string; - // Warning: (ae-forgotten-export) The symbol "IsCaseMatched" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "GetCaseResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) - request<E extends keyof Endpoints, P extends Endpoints[E]['req']>(endpoint: E, params?: P, credential?: string | null | undefined): Promise<Endpoints[E]['res'] extends { - $switch: { - $cases: [any, any][]; - $default: any; - }; - } ? IsCaseMatched<E, P, 0> extends true ? GetCaseResult<E, P, 0> : IsCaseMatched<E, P, 1> extends true ? GetCaseResult<E, P, 1> : IsCaseMatched<E, P, 2> extends true ? GetCaseResult<E, P, 2> : IsCaseMatched<E, P, 3> extends true ? GetCaseResult<E, P, 3> : IsCaseMatched<E, P, 4> extends true ? GetCaseResult<E, P, 4> : IsCaseMatched<E, P, 5> extends true ? GetCaseResult<E, P, 5> : IsCaseMatched<E, P, 6> extends true ? GetCaseResult<E, P, 6> : IsCaseMatched<E, P, 7> extends true ? GetCaseResult<E, P, 7> : IsCaseMatched<E, P, 8> extends true ? GetCaseResult<E, P, 8> : IsCaseMatched<E, P, 9> extends true ? GetCaseResult<E, P, 9> : Endpoints[E]['res']['$switch']['$default'] : Endpoints[E]['res']>; -} - -// @public (undocumented) -type APIError = { - id: string; - code: string; - message: string; - kind: 'client' | 'server'; - info: Record<string, any>; -}; - -// @public (undocumented) -type App = TODO_2; - -// @public (undocumented) -type AuthSession = { - id: ID; - app: App; - token: string; -}; - -// @public (undocumented) -type Blocking = { - id: ID; - createdAt: DateString; - blockeeId: User['id']; - blockee: UserDetailed; -}; - -// @public (undocumented) -type Channel = { - id: ID; -}; - -// Warning: (ae-forgotten-export) The symbol "AnyOf" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -export abstract class ChannelConnection<Channel extends AnyOf<Channels> = any> extends EventEmitter<Channel['events']> { - constructor(stream: Stream, channel: string, name?: string); - // (undocumented) - channel: string; - // (undocumented) - abstract dispose(): void; - // (undocumented) - abstract id: string; - // (undocumented) - inCount: number; - // (undocumented) - name?: string; - // (undocumented) - outCount: number; - // (undocumented) - send<T extends keyof Channel['receives']>(type: T, body: Channel['receives'][T]): void; - // (undocumented) - protected stream: Stream; -} - -// @public (undocumented) -export type Channels = { - main: { - params: null; - events: { - notification: (payload: Notification_2) => void; - mention: (payload: Note) => void; - reply: (payload: Note) => void; - renote: (payload: Note) => void; - follow: (payload: User) => void; - followed: (payload: User) => void; - unfollow: (payload: User) => void; - meUpdated: (payload: MeDetailed) => void; - pageEvent: (payload: PageEvent) => void; - urlUploadFinished: (payload: { - marker: string; - file: DriveFile; - }) => void; - readAllNotifications: () => void; - unreadNotification: (payload: Notification_2) => void; - unreadMention: (payload: Note['id']) => void; - readAllUnreadMentions: () => void; - unreadSpecifiedNote: (payload: Note['id']) => void; - readAllUnreadSpecifiedNotes: () => void; - readAllMessagingMessages: () => void; - messagingMessage: (payload: MessagingMessage) => void; - unreadMessagingMessage: (payload: MessagingMessage) => void; - readAllAntennas: () => void; - unreadAntenna: (payload: Antenna) => void; - readAllAnnouncements: () => void; - readAllChannels: () => void; - unreadChannel: (payload: Note['id']) => void; - myTokenRegenerated: () => void; - reversiNoInvites: () => void; - reversiInvited: (payload: FIXME) => void; - signin: (payload: FIXME) => void; - registryUpdated: (payload: { - scope?: string[]; - key: string; - value: any | null; - }) => void; - driveFileCreated: (payload: DriveFile) => void; - readAntenna: (payload: Antenna) => void; - }; - receives: null; - }; - homeTimeline: { - params: null; - events: { - note: (payload: Note) => void; - }; - receives: null; - }; - localTimeline: { - params: null; - events: { - note: (payload: Note) => void; - }; - receives: null; - }; - hybridTimeline: { - params: null; - events: { - note: (payload: Note) => void; - }; - receives: null; - }; - recommendedTimeline: { - params: null; - events: { - note: (payload: Note) => void; - }; - receives: null; - }; - globalTimeline: { - params: null; - events: { - note: (payload: Note) => void; - }; - receives: null; - }; - messaging: { - params: { - otherparty?: User['id'] | null; - group?: UserGroup['id'] | null; - }; - events: { - message: (payload: MessagingMessage) => void; - deleted: (payload: MessagingMessage['id']) => void; - read: (payload: MessagingMessage['id'][]) => void; - typers: (payload: User[]) => void; - }; - receives: { - read: { - id: MessagingMessage['id']; - }; - }; - }; - serverStats: { - params: null; - events: { - stats: (payload: FIXME) => void; - }; - receives: { - requestLog: { - id: string | number; - length: number; - }; - }; - }; - queueStats: { - params: null; - events: { - stats: (payload: FIXME) => void; - }; - receives: { - requestLog: { - id: string | number; - length: number; - }; - }; - }; -}; - -// @public (undocumented) -type Clip = TODO_2; - -// @public (undocumented) -type CustomEmoji = { - id: string; - name: string; - url: string; - category: string; - aliases: string[]; -}; - -// @public (undocumented) -type DateString = string; - -// @public (undocumented) -type DetailedInstanceMetadata = LiteInstanceMetadata & { - features: Record<string, any>; -}; - -// @public (undocumented) -type DriveFile = { - id: ID; - createdAt: DateString; - isSensitive: boolean; - name: string; - thumbnailUrl: string; - url: string; - type: string; - size: number; - md5: string; - blurhash: string; - properties: Record<string, any>; -}; - -// @public (undocumented) -type DriveFolder = TODO_2; - -// @public (undocumented) -export type Endpoints = { - 'admin/abuse-user-reports': { - req: TODO; - res: TODO; - }; - 'admin/delete-all-files-of-a-user': { - req: { - userId: User['id']; - }; - res: null; - }; - 'admin/delete-logs': { - req: NoParams; - res: null; - }; - 'admin/get-index-stats': { - req: TODO; - res: TODO; - }; - 'admin/get-table-stats': { - req: TODO; - res: TODO; - }; - 'admin/invite': { - req: TODO; - res: TODO; - }; - 'admin/logs': { - req: TODO; - res: TODO; - }; - 'admin/reset-password': { - req: TODO; - res: TODO; - }; - 'admin/resolve-abuse-user-report': { - req: TODO; - res: TODO; - }; - 'admin/resync-chart': { - req: TODO; - res: TODO; - }; - 'admin/send-email': { - req: TODO; - res: TODO; - }; - 'admin/server-info': { - req: TODO; - res: TODO; - }; - 'admin/show-moderation-logs': { - req: TODO; - res: TODO; - }; - 'admin/show-user': { - req: TODO; - res: TODO; - }; - 'admin/show-users': { - req: TODO; - res: TODO; - }; - 'admin/silence-user': { - req: TODO; - res: TODO; - }; - 'admin/suspend-user': { - req: TODO; - res: TODO; - }; - 'admin/unsilence-user': { - req: TODO; - res: TODO; - }; - 'admin/unsuspend-user': { - req: TODO; - res: TODO; - }; - 'admin/update-meta': { - req: TODO; - res: TODO; - }; - 'admin/vacuum': { - req: TODO; - res: TODO; - }; - 'admin/accounts/create': { - req: TODO; - res: TODO; - }; - 'admin/ad/create': { - req: TODO; - res: TODO; - }; - 'admin/ad/delete': { - req: { - id: Ad['id']; - }; - res: null; - }; - 'admin/ad/list': { - req: TODO; - res: TODO; - }; - 'admin/ad/update': { - req: TODO; - res: TODO; - }; - 'admin/announcements/create': { - req: TODO; - res: TODO; - }; - 'admin/announcements/delete': { - req: { - id: Announcement['id']; - }; - res: null; - }; - 'admin/announcements/list': { - req: TODO; - res: TODO; - }; - 'admin/announcements/update': { - req: TODO; - res: TODO; - }; - 'admin/drive/clean-remote-files': { - req: TODO; - res: TODO; - }; - 'admin/drive/cleanup': { - req: TODO; - res: TODO; - }; - 'admin/drive/files': { - req: TODO; - res: TODO; - }; - 'admin/drive/show-file': { - req: TODO; - res: TODO; - }; - 'admin/emoji/add': { - req: TODO; - res: TODO; - }; - 'admin/emoji/copy': { - req: TODO; - res: TODO; - }; - 'admin/emoji/list-remote': { - req: TODO; - res: TODO; - }; - 'admin/emoji/list': { - req: TODO; - res: TODO; - }; - 'admin/emoji/remove': { - req: TODO; - res: TODO; - }; - 'admin/emoji/update': { - req: TODO; - res: TODO; - }; - 'admin/federation/delete-all-files': { - req: { - host: string; - }; - res: null; - }; - 'admin/federation/refresh-remote-instance-metadata': { - req: TODO; - res: TODO; - }; - 'admin/federation/remove-all-following': { - req: TODO; - res: TODO; - }; - 'admin/federation/update-instance': { - req: TODO; - res: TODO; - }; - 'admin/moderators/add': { - req: TODO; - res: TODO; - }; - 'admin/moderators/remove': { - req: TODO; - res: TODO; - }; - 'admin/promo/create': { - req: TODO; - res: TODO; - }; - 'admin/queue/clear': { - req: TODO; - res: TODO; - }; - 'admin/queue/deliver-delayed': { - req: TODO; - res: TODO; - }; - 'admin/queue/inbox-delayed': { - req: TODO; - res: TODO; - }; - 'admin/queue/jobs': { - req: TODO; - res: TODO; - }; - 'admin/queue/stats': { - req: TODO; - res: TODO; - }; - 'admin/relays/add': { - req: TODO; - res: TODO; - }; - 'admin/relays/list': { - req: TODO; - res: TODO; - }; - 'admin/relays/remove': { - req: TODO; - res: TODO; - }; - 'announcements': { - req: { - limit?: number; - withUnreads?: boolean; - sinceId?: Announcement['id']; - untilId?: Announcement['id']; - }; - res: Announcement[]; - }; - 'antennas/create': { - req: TODO; - res: Antenna; - }; - 'antennas/delete': { - req: { - antennaId: Antenna['id']; - }; - res: null; - }; - 'antennas/list': { - req: NoParams; - res: Antenna[]; - }; - 'antennas/notes': { - req: { - antennaId: Antenna['id']; - limit?: number; - sinceId?: Note['id']; - untilId?: Note['id']; - }; - res: Note[]; - }; - 'antennas/show': { - req: { - antennaId: Antenna['id']; - }; - res: Antenna; - }; - 'antennas/update': { - req: TODO; - res: Antenna; - }; - 'ap/get': { - req: { - uri: string; - }; - res: Record<string, any>; - }; - 'ap/show': { - req: { - uri: string; - }; - res: { - type: 'Note'; - object: Note; - } | { - type: 'User'; - object: UserDetailed; - }; - }; - 'app/create': { - req: TODO; - res: App; - }; - 'app/show': { - req: { - appId: App['id']; - }; - res: App; - }; - 'auth/accept': { - req: { - token: string; - }; - res: null; - }; - 'auth/session/generate': { - req: { - appSecret: string; - }; - res: { - token: string; - url: string; - }; - }; - 'auth/session/show': { - req: { - token: string; - }; - res: AuthSession; - }; - 'auth/session/userkey': { - req: { - appSecret: string; - token: string; - }; - res: { - accessToken: string; - user: User; - }; - }; - 'blocking/create': { - req: { - userId: User['id']; - }; - res: UserDetailed; - }; - 'blocking/delete': { - req: { - userId: User['id']; - }; - res: UserDetailed; - }; - 'blocking/list': { - req: { - limit?: number; - sinceId?: Blocking['id']; - untilId?: Blocking['id']; - }; - res: Blocking[]; - }; - 'channels/create': { - req: TODO; - res: TODO; - }; - 'channels/featured': { - req: TODO; - res: TODO; - }; - 'channels/follow': { - req: TODO; - res: TODO; - }; - 'channels/followed': { - req: TODO; - res: TODO; - }; - 'channels/owned': { - req: TODO; - res: TODO; - }; - 'channels/pin-note': { - req: TODO; - res: TODO; - }; - 'channels/show': { - req: TODO; - res: TODO; - }; - 'channels/timeline': { - req: TODO; - res: TODO; - }; - 'channels/unfollow': { - req: TODO; - res: TODO; - }; - 'channels/update': { - req: TODO; - res: TODO; - }; - 'charts/active-users': { - req: { - span: 'day' | 'hour'; - limit?: number; - offset?: number | null; - }; - res: { - local: { - users: number[]; - }; - remote: { - users: number[]; - }; - }; - }; - 'charts/drive': { - req: { - span: 'day' | 'hour'; - limit?: number; - offset?: number | null; - }; - res: { - local: { - decCount: number[]; - decSize: number[]; - incCount: number[]; - incSize: number[]; - totalCount: number[]; - totalSize: number[]; - }; - remote: { - decCount: number[]; - decSize: number[]; - incCount: number[]; - incSize: number[]; - totalCount: number[]; - totalSize: number[]; - }; - }; - }; - 'charts/federation': { - req: { - span: 'day' | 'hour'; - limit?: number; - offset?: number | null; - }; - res: { - instance: { - dec: number[]; - inc: number[]; - total: number[]; - }; - }; - }; - 'charts/hashtag': { - req: { - span: 'day' | 'hour'; - limit?: number; - offset?: number | null; - }; - res: TODO; - }; - 'charts/instance': { - req: { - span: 'day' | 'hour'; - limit?: number; - offset?: number | null; - host: string; - }; - res: { - drive: { - decFiles: number[]; - decUsage: number[]; - incFiles: number[]; - incUsage: number[]; - totalFiles: number[]; - totalUsage: number[]; - }; - followers: { - dec: number[]; - inc: number[]; - total: number[]; - }; - following: { - dec: number[]; - inc: number[]; - total: number[]; - }; - notes: { - dec: number[]; - inc: number[]; - total: number[]; - diffs: { - normal: number[]; - renote: number[]; - reply: number[]; - }; - }; - requests: { - failed: number[]; - received: number[]; - succeeded: number[]; - }; - users: { - dec: number[]; - inc: number[]; - total: number[]; - }; - }; - }; - 'charts/network': { - req: { - span: 'day' | 'hour'; - limit?: number; - offset?: number | null; - }; - res: TODO; - }; - 'charts/notes': { - req: { - span: 'day' | 'hour'; - limit?: number; - offset?: number | null; - }; - res: { - local: { - dec: number[]; - inc: number[]; - total: number[]; - diffs: { - normal: number[]; - renote: number[]; - reply: number[]; - }; - }; - remote: { - dec: number[]; - inc: number[]; - total: number[]; - diffs: { - normal: number[]; - renote: number[]; - reply: number[]; - }; - }; - }; - }; - 'charts/user/drive': { - req: { - span: 'day' | 'hour'; - limit?: number; - offset?: number | null; - userId: User['id']; - }; - res: { - decCount: number[]; - decSize: number[]; - incCount: number[]; - incSize: number[]; - totalCount: number[]; - totalSize: number[]; - }; - }; - 'charts/user/following': { - req: { - span: 'day' | 'hour'; - limit?: number; - offset?: number | null; - userId: User['id']; - }; - res: TODO; - }; - 'charts/user/notes': { - req: { - span: 'day' | 'hour'; - limit?: number; - offset?: number | null; - userId: User['id']; - }; - res: { - dec: number[]; - inc: number[]; - total: number[]; - diffs: { - normal: number[]; - renote: number[]; - reply: number[]; - }; - }; - }; - 'charts/user/reactions': { - req: { - span: 'day' | 'hour'; - limit?: number; - offset?: number | null; - userId: User['id']; - }; - res: TODO; - }; - 'charts/users': { - req: { - span: 'day' | 'hour'; - limit?: number; - offset?: number | null; - }; - res: { - local: { - dec: number[]; - inc: number[]; - total: number[]; - }; - remote: { - dec: number[]; - inc: number[]; - total: number[]; - }; - }; - }; - 'clips/add-note': { - req: TODO; - res: TODO; - }; - 'clips/create': { - req: TODO; - res: TODO; - }; - 'clips/delete': { - req: { - clipId: Clip['id']; - }; - res: null; - }; - 'clips/list': { - req: TODO; - res: TODO; - }; - 'clips/notes': { - req: TODO; - res: TODO; - }; - 'clips/show': { - req: TODO; - res: TODO; - }; - 'clips/update': { - req: TODO; - res: TODO; - }; - 'drive': { - req: NoParams; - res: { - capacity: number; - usage: number; - }; - }; - 'drive/files': { - req: { - folderId?: DriveFolder['id'] | null; - type?: DriveFile['type'] | null; - limit?: number; - sinceId?: DriveFile['id']; - untilId?: DriveFile['id']; - }; - res: DriveFile[]; - }; - 'drive/files/attached-notes': { - req: TODO; - res: TODO; - }; - 'drive/files/check-existence': { - req: TODO; - res: TODO; - }; - 'drive/files/create': { - req: TODO; - res: TODO; - }; - 'drive/files/delete': { - req: { - fileId: DriveFile['id']; - }; - res: null; - }; - 'drive/files/find-by-hash': { - req: TODO; - res: TODO; - }; - 'drive/files/find': { - req: { - name: string; - folderId?: DriveFolder['id'] | null; - }; - res: DriveFile[]; - }; - 'drive/files/show': { - req: { - fileId?: DriveFile['id']; - url?: string; - }; - res: DriveFile; - }; - 'drive/files/update': { - req: { - fileId: DriveFile['id']; - folderId?: DriveFolder['id'] | null; - name?: string; - isSensitive?: boolean; - comment?: string | null; - }; - res: DriveFile; - }; - 'drive/files/upload-from-url': { - req: { - url: string; - folderId?: DriveFolder['id'] | null; - isSensitive?: boolean; - comment?: string | null; - marker?: string | null; - force?: boolean; - }; - res: null; - }; - 'drive/folders': { - req: { - folderId?: DriveFolder['id'] | null; - limit?: number; - sinceId?: DriveFile['id']; - untilId?: DriveFile['id']; - }; - res: DriveFolder[]; - }; - 'drive/folders/create': { - req: { - name?: string; - parentId?: DriveFolder['id'] | null; - }; - res: DriveFolder; - }; - 'drive/folders/delete': { - req: { - folderId: DriveFolder['id']; - }; - res: null; - }; - 'drive/folders/find': { - req: { - name: string; - parentId?: DriveFolder['id'] | null; - }; - res: DriveFolder[]; - }; - 'drive/folders/show': { - req: { - folderId: DriveFolder['id']; - }; - res: DriveFolder; - }; - 'drive/folders/update': { - req: { - folderId: DriveFolder['id']; - name?: string; - parentId?: DriveFolder['id'] | null; - }; - res: DriveFolder; - }; - 'drive/stream': { - req: { - type?: DriveFile['type'] | null; - limit?: number; - sinceId?: DriveFile['id']; - untilId?: DriveFile['id']; - }; - res: DriveFile[]; - }; - 'endpoint': { - req: { - endpoint: string; - }; - res: { - params: { - name: string; - type: string; - }[]; - }; - }; - 'endpoints': { - req: NoParams; - res: string[]; - }; - 'federation/dns': { - req: { - host: string; - }; - res: { - a: string[]; - aaaa: string[]; - cname: string[]; - txt: string[]; - }; - }; - 'federation/followers': { - req: { - host: string; - limit?: number; - sinceId?: Following['id']; - untilId?: Following['id']; - }; - res: FollowingFolloweePopulated[]; - }; - 'federation/following': { - req: { - host: string; - limit?: number; - sinceId?: Following['id']; - untilId?: Following['id']; - }; - res: FollowingFolloweePopulated[]; - }; - 'federation/instances': { - req: { - host?: string | null; - blocked?: boolean | null; - notResponding?: boolean | null; - suspended?: boolean | null; - federating?: boolean | null; - subscribing?: boolean | null; - publishing?: boolean | null; - limit?: number; - offset?: number; - sort?: '+pubSub' | '-pubSub' | '+notes' | '-notes' | '+users' | '-users' | '+following' | '-following' | '+followers' | '-followers' | '+caughtAt' | '-caughtAt' | '+lastCommunicatedAt' | '-lastCommunicatedAt' | '+driveUsage' | '-driveUsage' | '+driveFiles' | '-driveFiles'; - }; - res: Instance[]; - }; - 'federation/show-instance': { - req: { - host: string; - }; - res: Instance; - }; - 'federation/update-remote-user': { - req: { - userId: User['id']; - }; - res: null; - }; - 'federation/users': { - req: { - host: string; - limit?: number; - sinceId?: User['id']; - untilId?: User['id']; - }; - res: UserDetailed[]; - }; - 'following/create': { - req: { - userId: User['id']; - }; - res: User; - }; - 'following/delete': { - req: { - userId: User['id']; - }; - res: User; - }; - 'following/requests/accept': { - req: { - userId: User['id']; - }; - res: null; - }; - 'following/requests/cancel': { - req: { - userId: User['id']; - }; - res: User; - }; - 'following/requests/list': { - req: NoParams; - res: FollowRequest[]; - }; - 'following/requests/reject': { - req: { - userId: User['id']; - }; - res: null; - }; - 'gallery/featured': { - req: TODO; - res: TODO; - }; - 'gallery/popular': { - req: TODO; - res: TODO; - }; - 'gallery/posts': { - req: TODO; - res: TODO; - }; - 'gallery/posts/create': { - req: TODO; - res: TODO; - }; - 'gallery/posts/delete': { - req: { - postId: GalleryPost['id']; - }; - res: null; - }; - 'gallery/posts/like': { - req: TODO; - res: TODO; - }; - 'gallery/posts/show': { - req: TODO; - res: TODO; - }; - 'gallery/posts/unlike': { - req: TODO; - res: TODO; - }; - 'gallery/posts/update': { - req: TODO; - res: TODO; - }; - 'games/reversi/games': { - req: TODO; - res: TODO; - }; - 'games/reversi/games/show': { - req: TODO; - res: TODO; - }; - 'games/reversi/games/surrender': { - req: TODO; - res: TODO; - }; - 'games/reversi/invitations': { - req: TODO; - res: TODO; - }; - 'games/reversi/match': { - req: TODO; - res: TODO; - }; - 'games/reversi/match/cancel': { - req: TODO; - res: TODO; - }; - 'get-online-users-count': { - req: NoParams; - res: { - count: number; - }; - }; - 'hashtags/list': { - req: TODO; - res: TODO; - }; - 'hashtags/search': { - req: TODO; - res: TODO; - }; - 'hashtags/show': { - req: TODO; - res: TODO; - }; - 'hashtags/trend': { - req: TODO; - res: TODO; - }; - 'hashtags/users': { - req: TODO; - res: TODO; - }; - 'i': { - req: NoParams; - res: User; - }; - 'i/apps': { - req: TODO; - res: TODO; - }; - 'i/authorized-apps': { - req: TODO; - res: TODO; - }; - 'i/change-password': { - req: TODO; - res: TODO; - }; - 'i/delete-account': { - req: { - password: string; - }; - res: null; - }; - 'i/export-blocking': { - req: TODO; - res: TODO; - }; - 'i/export-following': { - req: TODO; - res: TODO; - }; - 'i/export-mute': { - req: TODO; - res: TODO; - }; - 'i/export-notes': { - req: TODO; - res: TODO; - }; - 'i/export-user-lists': { - req: TODO; - res: TODO; - }; - 'i/favorites': { - req: { - limit?: number; - sinceId?: NoteFavorite['id']; - untilId?: NoteFavorite['id']; - }; - res: NoteFavorite[]; - }; - 'i/gallery/likes': { - req: TODO; - res: TODO; - }; - 'i/gallery/posts': { - req: TODO; - res: TODO; - }; - 'i/get-word-muted-notes-count': { - req: TODO; - res: TODO; - }; - 'i/import-following': { - req: TODO; - res: TODO; - }; - 'i/import-user-lists': { - req: TODO; - res: TODO; - }; - 'i/notifications': { - req: { - limit?: number; - sinceId?: Notification_2['id']; - untilId?: Notification_2['id']; - following?: boolean; - markAsRead?: boolean; - includeTypes?: Notification_2['type'][]; - excludeTypes?: Notification_2['type'][]; - }; - res: Notification_2[]; - }; - 'i/page-likes': { - req: TODO; - res: TODO; - }; - 'i/pages': { - req: TODO; - res: TODO; - }; - 'i/pin': { - req: { - noteId: Note['id']; - }; - res: MeDetailed; - }; - 'i/read-all-messaging-messages': { - req: TODO; - res: TODO; - }; - 'i/read-all-unread-notes': { - req: TODO; - res: TODO; - }; - 'i/read-announcement': { - req: TODO; - res: TODO; - }; - 'i/regenerate-token': { - req: { - password: string; - }; - res: null; - }; - 'i/registry/get-all': { - req: { - scope?: string[]; - }; - res: Record<string, any>; - }; - 'i/registry/get-detail': { - req: { - key: string; - scope?: string[]; - }; - res: { - updatedAt: DateString; - value: any; - }; - }; - 'i/registry/get': { - req: { - key: string; - scope?: string[]; - }; - res: any; - }; - 'i/registry/keys-with-type': { - req: { - scope?: string[]; - }; - res: Record<string, 'null' | 'array' | 'number' | 'string' | 'boolean' | 'object'>; - }; - 'i/registry/keys': { - req: { - scope?: string[]; - }; - res: string[]; - }; - 'i/registry/remove': { - req: { - key: string; - scope?: string[]; - }; - res: null; - }; - 'i/registry/scopes': { - req: NoParams; - res: string[][]; - }; - 'i/registry/set': { - req: { - key: string; - value: any; - scope?: string[]; - }; - res: null; - }; - 'i/revoke-token': { - req: TODO; - res: TODO; - }; - 'i/signin-history': { - req: { - limit?: number; - sinceId?: Signin['id']; - untilId?: Signin['id']; - }; - res: Signin[]; - }; - 'i/unpin': { - req: { - noteId: Note['id']; - }; - res: MeDetailed; - }; - 'i/update-email': { - req: { - password: string; - email?: string | null; - }; - res: MeDetailed; - }; - 'i/update': { - req: { - name?: string | null; - description?: string | null; - lang?: string | null; - location?: string | null; - birthday?: string | null; - avatarId?: DriveFile['id'] | null; - bannerId?: DriveFile['id'] | null; - fields?: { - name: string; - value: string; - }[]; - isLocked?: boolean; - isExplorable?: boolean; - hideOnlineStatus?: boolean; - carefulBot?: boolean; - autoAcceptFollowed?: boolean; - noCrawle?: boolean; - isBot?: boolean; - isCat?: boolean; - injectFeaturedNote?: boolean; - receiveAnnouncementEmail?: boolean; - alwaysMarkNsfw?: boolean; - mutedWords?: string[][]; - mutingNotificationTypes?: Notification_2['type'][]; - emailNotificationTypes?: string[]; - }; - res: MeDetailed; - }; - 'i/user-group-invites': { - req: TODO; - res: TODO; - }; - 'i/2fa/done': { - req: TODO; - res: TODO; - }; - 'i/2fa/key-done': { - req: TODO; - res: TODO; - }; - 'i/2fa/password-less': { - req: TODO; - res: TODO; - }; - 'i/2fa/register-key': { - req: TODO; - res: TODO; - }; - 'i/2fa/register': { - req: TODO; - res: TODO; - }; - 'i/2fa/remove-key': { - req: TODO; - res: TODO; - }; - 'i/2fa/unregister': { - req: TODO; - res: TODO; - }; - 'messaging/history': { - req: { - limit?: number; - group?: boolean; - }; - res: MessagingMessage[]; - }; - 'messaging/messages': { - req: { - userId?: User['id']; - groupId?: UserGroup['id']; - limit?: number; - sinceId?: MessagingMessage['id']; - untilId?: MessagingMessage['id']; - markAsRead?: boolean; - }; - res: MessagingMessage[]; - }; - 'messaging/messages/create': { - req: { - userId?: User['id']; - groupId?: UserGroup['id']; - text?: string; - fileId?: DriveFile['id']; - }; - res: MessagingMessage; - }; - 'messaging/messages/delete': { - req: { - messageId: MessagingMessage['id']; - }; - res: null; - }; - 'messaging/messages/read': { - req: { - messageId: MessagingMessage['id']; - }; - res: null; - }; - 'meta': { - req: { - detail?: boolean; - }; - res: { - $switch: { - $cases: [ - [ - { - detail: true; - }, - DetailedInstanceMetadata - ], - [ - { - detail: false; - }, - LiteInstanceMetadata - ], - [ - { - detail: boolean; - }, - LiteInstanceMetadata | DetailedInstanceMetadata - ] - ]; - $default: LiteInstanceMetadata; - }; - }; - }; - 'miauth/gen-token': { - req: TODO; - res: TODO; - }; - 'mute/create': { - req: TODO; - res: TODO; - }; - 'mute/delete': { - req: { - userId: User['id']; - }; - res: null; - }; - 'mute/list': { - req: TODO; - res: TODO; - }; - 'my/apps': { - req: TODO; - res: TODO; - }; - 'notes': { - req: { - limit?: number; - sinceId?: Note['id']; - untilId?: Note['id']; - }; - res: Note[]; - }; - 'notes/children': { - req: { - noteId: Note['id']; - limit?: number; - sinceId?: Note['id']; - untilId?: Note['id']; - }; - res: Note[]; - }; - 'notes/clips': { - req: TODO; - res: TODO; - }; - 'notes/conversation': { - req: TODO; - res: TODO; - }; - 'notes/create': { - req: { - visibility?: 'public' | 'home' | 'followers' | 'specified'; - visibleUserIds?: User['id'][]; - text?: null | string; - cw?: null | string; - viaMobile?: boolean; - localOnly?: boolean; - fileIds?: DriveFile['id'][]; - replyId?: null | Note['id']; - renoteId?: null | Note['id']; - channelId?: null | Channel['id']; - poll?: null | { - choices: string[]; - multiple?: boolean; - expiresAt?: null | number; - expiredAfter?: null | number; - }; - }; - res: { - createdNote: Note; - }; - }; - 'notes/delete': { - req: { - noteId: Note['id']; - }; - res: null; - }; - 'notes/favorites/create': { - req: { - noteId: Note['id']; - }; - res: null; - }; - 'notes/favorites/delete': { - req: { - noteId: Note['id']; - }; - res: null; - }; - 'notes/featured': { - req: TODO; - res: Note[]; - }; - 'notes/global-timeline': { - req: { - limit?: number; - sinceId?: Note['id']; - untilId?: Note['id']; - sinceDate?: number; - untilDate?: number; - }; - res: Note[]; - }; - 'notes/recommended-timeline': { - req: { - limit?: number; - sinceId?: Note['id']; - untilId?: Note['id']; - sinceDate?: number; - untilDate?: number; - }; - res: Note[]; - }; - 'notes/hybrid-timeline': { - req: { - limit?: number; - sinceId?: Note['id']; - untilId?: Note['id']; - sinceDate?: number; - untilDate?: number; - }; - res: Note[]; - }; - 'notes/local-timeline': { - req: { - limit?: number; - sinceId?: Note['id']; - untilId?: Note['id']; - sinceDate?: number; - untilDate?: number; - }; - res: Note[]; - }; - 'notes/mentions': { - req: { - following?: boolean; - limit?: number; - sinceId?: Note['id']; - untilId?: Note['id']; - }; - res: Note[]; - }; - 'notes/polls/recommendation': { - req: TODO; - res: TODO; - }; - 'notes/polls/vote': { - req: { - noteId: Note['id']; - choice: number; - }; - res: null; - }; - 'notes/reactions': { - req: { - noteId: Note['id']; - type?: string | null; - limit?: number; - }; - res: NoteReaction[]; - }; - 'notes/reactions/create': { - req: { - noteId: Note['id']; - reaction: string; - }; - res: null; - }; - 'notes/reactions/delete': { - req: { - noteId: Note['id']; - }; - res: null; - }; - 'notes/renotes': { - req: { - limit?: number; - sinceId?: Note['id']; - untilId?: Note['id']; - noteId: Note['id']; - }; - res: Note[]; - }; - 'notes/replies': { - req: { - limit?: number; - sinceId?: Note['id']; - untilId?: Note['id']; - noteId: Note['id']; - }; - res: Note[]; - }; - 'notes/search-by-tag': { - req: TODO; - res: TODO; - }; - 'notes/search': { - req: TODO; - res: TODO; - }; - 'notes/show': { - req: { - noteId: Note['id']; - }; - res: Note; - }; - 'notes/state': { - req: TODO; - res: TODO; - }; - 'notes/timeline': { - req: { - limit?: number; - sinceId?: Note['id']; - untilId?: Note['id']; - sinceDate?: number; - untilDate?: number; - }; - res: Note[]; - }; - 'notes/unrenote': { - req: { - noteId: Note['id']; - }; - res: null; - }; - 'notes/user-list-timeline': { - req: { - listId: UserList['id']; - limit?: number; - sinceId?: Note['id']; - untilId?: Note['id']; - sinceDate?: number; - untilDate?: number; - }; - res: Note[]; - }; - 'notes/watching/create': { - req: TODO; - res: TODO; - }; - 'notes/watching/delete': { - req: { - noteId: Note['id']; - }; - res: null; - }; - 'notifications/create': { - req: { - body: string; - header?: string | null; - icon?: string | null; - }; - res: null; - }; - 'notifications/mark-all-as-read': { - req: NoParams; - res: null; - }; - 'notifications/read': { - req: { - notificationId: Notification_2['id']; - }; - res: null; - }; - 'page-push': { - req: { - pageId: Page['id']; - event: string; - var?: any; - }; - res: null; - }; - 'pages/create': { - req: TODO; - res: Page; - }; - 'pages/delete': { - req: { - pageId: Page['id']; - }; - res: null; - }; - 'pages/featured': { - req: NoParams; - res: Page[]; - }; - 'pages/like': { - req: { - pageId: Page['id']; - }; - res: null; - }; - 'pages/show': { - req: { - pageId?: Page['id']; - name?: string; - username?: string; - }; - res: Page; - }; - 'pages/unlike': { - req: { - pageId: Page['id']; - }; - res: null; - }; - 'pages/update': { - req: TODO; - res: null; - }; - 'ping': { - req: NoParams; - res: { - pong: number; - }; - }; - 'pinned-users': { - req: TODO; - res: TODO; - }; - 'promo/read': { - req: TODO; - res: TODO; - }; - 'request-reset-password': { - req: { - username: string; - email: string; - }; - res: null; - }; - 'reset-password': { - req: { - token: string; - password: string; - }; - res: null; - }; - 'room/show': { - req: TODO; - res: TODO; - }; - 'room/update': { - req: TODO; - res: TODO; - }; - 'stats': { - req: NoParams; - res: Stats; - }; - 'server-info': { - req: NoParams; - res: ServerInfo; - }; - 'sw/register': { - req: TODO; - res: TODO; - }; - 'username/available': { - req: { - username: string; - }; - res: { - available: boolean; - }; - }; - 'users': { - req: { - limit?: number; - offset?: number; - sort?: UserSorting; - origin?: OriginType; - }; - res: User[]; - }; - 'users/clips': { - req: TODO; - res: TODO; - }; - 'users/followers': { - req: { - userId?: User['id']; - username?: User['username']; - host?: User['host'] | null; - limit?: number; - sinceId?: Following['id']; - untilId?: Following['id']; - }; - res: FollowingFollowerPopulated[]; - }; - 'users/following': { - req: { - userId?: User['id']; - username?: User['username']; - host?: User['host'] | null; - limit?: number; - sinceId?: Following['id']; - untilId?: Following['id']; - }; - res: FollowingFolloweePopulated[]; - }; - 'users/gallery/posts': { - req: TODO; - res: TODO; - }; - 'users/get-frequently-replied-users': { - req: TODO; - res: TODO; - }; - 'users/groups/create': { - req: TODO; - res: TODO; - }; - 'users/groups/delete': { - req: { - groupId: UserGroup['id']; - }; - res: null; - }; - 'users/groups/invitations/accept': { - req: TODO; - res: TODO; - }; - 'users/groups/invitations/reject': { - req: TODO; - res: TODO; - }; - 'users/groups/invite': { - req: TODO; - res: TODO; - }; - 'users/groups/joined': { - req: TODO; - res: TODO; - }; - 'users/groups/owned': { - req: TODO; - res: TODO; - }; - 'users/groups/pull': { - req: TODO; - res: TODO; - }; - 'users/groups/show': { - req: TODO; - res: TODO; - }; - 'users/groups/transfer': { - req: TODO; - res: TODO; - }; - 'users/groups/update': { - req: TODO; - res: TODO; - }; - 'users/lists/create': { - req: { - name: string; - }; - res: UserList; - }; - 'users/lists/delete': { - req: { - listId: UserList['id']; - }; - res: null; - }; - 'users/lists/list': { - req: NoParams; - res: UserList[]; - }; - 'users/lists/pull': { - req: { - listId: UserList['id']; - userId: User['id']; - }; - res: null; - }; - 'users/lists/push': { - req: { - listId: UserList['id']; - userId: User['id']; - }; - res: null; - }; - 'users/lists/show': { - req: { - listId: UserList['id']; - }; - res: UserList; - }; - 'users/lists/update': { - req: { - listId: UserList['id']; - name: string; - }; - res: UserList; - }; - 'users/notes': { - req: { - userId: User['id']; - limit?: number; - sinceId?: Note['id']; - untilId?: Note['id']; - sinceDate?: number; - untilDate?: number; - }; - res: Note[]; - }; - 'users/pages': { - req: TODO; - res: TODO; - }; - 'users/recommendation': { - req: TODO; - res: TODO; - }; - 'users/relation': { - req: TODO; - res: TODO; - }; - 'users/report-abuse': { - req: TODO; - res: TODO; - }; - 'users/search-by-username-and-host': { - req: TODO; - res: TODO; - }; - 'users/search': { - req: TODO; - res: TODO; - }; - 'users/show': { - req: ShowUserReq | { - userIds: User['id'][]; - }; - res: { - $switch: { - $cases: [ - [ - { - userIds: User['id'][]; - }, - UserDetailed[] - ] - ]; - $default: UserDetailed; - }; - }; - }; - 'users/stats': { - req: TODO; - res: TODO; - }; -}; - -declare namespace entities { - export { - ID, - DateString, - User, - UserLite, - UserDetailed, - UserGroup, - UserList, - MeDetailed, - DriveFile, - DriveFolder, - GalleryPost, - Note, - NoteReaction, - Notification_2 as Notification, - MessagingMessage, - CustomEmoji, - LiteInstanceMetadata, - DetailedInstanceMetadata, - InstanceMetadata, - ServerInfo, - Stats, - Page, - PageEvent, - Announcement, - Antenna, - App, - AuthSession, - Ad, - Clip, - NoteFavorite, - FollowRequest, - Channel, - Following, - FollowingFolloweePopulated, - FollowingFollowerPopulated, - Blocking, - Instance, - Signin, - UserSorting, - OriginType - } -} -export { entities } - -// @public (undocumented) -type FetchLike = (input: string, init?: { - method?: string; - body?: string; - credentials?: RequestCredentials; - cache?: RequestCache; -}) => Promise<{ - status: number; - json(): Promise<any>; -}>; - -// @public (undocumented) -export const ffVisibility: readonly ["public", "followers", "private"]; - -// @public (undocumented) -type Following = { - id: ID; - createdAt: DateString; - followerId: User['id']; - followeeId: User['id']; -}; - -// @public (undocumented) -type FollowingFolloweePopulated = Following & { - followee: UserDetailed; -}; - -// @public (undocumented) -type FollowingFollowerPopulated = Following & { - follower: UserDetailed; -}; - -// @public (undocumented) -type FollowRequest = { - id: ID; - follower: User; - followee: User; -}; - -// @public (undocumented) -type GalleryPost = TODO_2; - -// @public (undocumented) -type ID = string; - -// @public (undocumented) -type Instance = { - id: ID; - caughtAt: DateString; - host: string; - usersCount: number; - notesCount: number; - followingCount: number; - followersCount: number; - driveUsage: number; - driveFiles: number; - latestRequestSentAt: DateString | null; - latestStatus: number | null; - latestRequestReceivedAt: DateString | null; - lastCommunicatedAt: DateString; - isNotResponding: boolean; - isSuspended: boolean; - softwareName: string | null; - softwareVersion: string | null; - openRegistrations: boolean | null; - name: string | null; - description: string | null; - maintainerName: string | null; - maintainerEmail: string | null; - iconUrl: string | null; - faviconUrl: string | null; - themeColor: string | null; - infoUpdatedAt: DateString | null; -}; - -// @public (undocumented) -type InstanceMetadata = LiteInstanceMetadata | DetailedInstanceMetadata; - -// @public (undocumented) -function isAPIError(reason: any): reason is APIError; - -// @public (undocumented) -type LiteInstanceMetadata = { - maintainerName: string | null; - maintainerEmail: string | null; - version: string; - name: string | null; - uri: string; - description: string | null; - tosUrl: string | null; - disableRegistration: boolean; - disableLocalTimeline: boolean; - disableRecommendedTimeline: boolean; - disableGlobalTimeline: boolean; - driveCapacityPerLocalUserMb: number; - driveCapacityPerRemoteUserMb: number; - enableHcaptcha: boolean; - hcaptchaSiteKey: string | null; - enableRecaptcha: boolean; - recaptchaSiteKey: string | null; - swPublickey: string | null; - maxNoteTextLength: number; - enableEmail: boolean; - enableTwitterIntegration: boolean; - enableGithubIntegration: boolean; - enableDiscordIntegration: boolean; - enableServiceWorker: boolean; - emojis: CustomEmoji[]; - ads: { - id: ID; - ratio: number; - place: string; - url: string; - imageUrl: string; - }[]; -}; - -// @public (undocumented) -type MeDetailed = UserDetailed & { - avatarId: DriveFile['id']; - bannerId: DriveFile['id']; - autoAcceptFollowed: boolean; - alwaysMarkNsfw: boolean; - carefulBot: boolean; - emailNotificationTypes: string[]; - hasPendingReceivedFollowRequest: boolean; - hasUnreadAnnouncement: boolean; - hasUnreadAntenna: boolean; - hasUnreadChannel: boolean; - hasUnreadMentions: boolean; - hasUnreadMessagingMessage: boolean; - hasUnreadNotification: boolean; - hasUnreadSpecifiedNotes: boolean; - hideOnlineStatus: boolean; - injectFeaturedNote: boolean; - integrations: Record<string, any>; - isDeleted: boolean; - isExplorable: boolean; - mutedWords: string[][]; - mutingNotificationTypes: string[]; - noCrawle: boolean; - receiveAnnouncementEmail: boolean; - usePasswordLessLogin: boolean; - [other: string]: any; -}; - -// @public (undocumented) -type MessagingMessage = { - id: ID; - createdAt: DateString; - file: DriveFile | null; - fileId: DriveFile['id'] | null; - isRead: boolean; - reads: User['id'][]; - text: string | null; - user: User; - userId: User['id']; - recipient?: User | null; - recipientId: User['id'] | null; - group?: UserGroup | null; - groupId: UserGroup['id'] | null; -}; - -// @public (undocumented) -export const mutedNoteReasons: readonly ["word", "manual", "spam", "other"]; - -// @public (undocumented) -type Note = { - id: ID; - createdAt: DateString; - text: string | null; - cw: string | null; - user: User; - userId: User['id']; - reply?: Note; - replyId: Note['id']; - renote?: Note; - renoteId: Note['id']; - files: DriveFile[]; - fileIds: DriveFile['id'][]; - visibility: 'public' | 'home' | 'followers' | 'specified'; - visibleUserIds?: User['id'][]; - localOnly?: boolean; - myReaction?: string; - reactions: Record<string, number>; - renoteCount: number; - repliesCount: number; - poll?: { - expiresAt: DateString | null; - multiple: boolean; - choices: { - isVoted: boolean; - text: string; - votes: number; - }[]; - }; - emojis: { - name: string; - url: string; - }[]; - uri?: string; - url?: string; - isHidden?: boolean; -}; - -// @public (undocumented) -type NoteFavorite = { - id: ID; - createdAt: DateString; - noteId: Note['id']; - note: Note; -}; - -// @public (undocumented) -type NoteReaction = { - id: ID; - createdAt: DateString; - user: UserLite; - type: string; -}; - -// @public (undocumented) -export const noteVisibilities: readonly ["public", "home", "followers", "specified"]; - -// @public (undocumented) -type Notification_2 = { - id: ID; - createdAt: DateString; - isRead: boolean; -} & ({ - type: 'reaction'; - reaction: string; - user: User; - userId: User['id']; - note: Note; -} | { - type: 'reply'; - user: User; - userId: User['id']; - note: Note; -} | { - type: 'renote'; - user: User; - userId: User['id']; - note: Note; -} | { - type: 'quote'; - user: User; - userId: User['id']; - note: Note; -} | { - type: 'mention'; - user: User; - userId: User['id']; - note: Note; -} | { - type: 'pollVote'; - user: User; - userId: User['id']; - note: Note; -} | { - type: 'follow'; - user: User; - userId: User['id']; -} | { - type: 'followRequestAccepted'; - user: User; - userId: User['id']; -} | { - type: 'receiveFollowRequest'; - user: User; - userId: User['id']; -} | { - type: 'groupInvited'; - invitation: UserGroup; - user: User; - userId: User['id']; -} | { - type: 'app'; - header?: string | null; - body: string; - icon?: string | null; -}); - -// @public (undocumented) -export const notificationTypes: readonly ["follow", "mention", "reply", "renote", "quote", "reaction", "pollVote", "receiveFollowRequest", "followRequestAccepted", "groupInvited", "app"]; - -// @public (undocumented) -type OriginType = 'combined' | 'local' | 'remote'; - -// @public (undocumented) -type Page = { - id: ID; - createdAt: DateString; - updatedAt: DateString; - userId: User['id']; - user: User; - content: Record<string, any>[]; - variables: Record<string, any>[]; - title: string; - name: string; - summary: string | null; - hideTitleWhenPinned: boolean; - alignCenter: boolean; - font: string; - script: string; - eyeCatchingImageId: DriveFile['id'] | null; - eyeCatchingImage: DriveFile | null; - attachedFiles: any; - likedCount: number; - isLiked?: boolean; -}; - -// @public (undocumented) -type PageEvent = { - pageId: Page['id']; - event: string; - var: any; - userId: User['id']; - user: User; -}; - -// @public (undocumented) -export const permissions: string[]; - -// @public (undocumented) -type ServerInfo = { - machine: string; - cpu: { - model: string; - cores: number; - }; - mem: { - total: number; - }; - fs: { - total: number; - used: number; - }; -}; - -// @public (undocumented) -type Signin = { - id: ID; - createdAt: DateString; - ip: string; - headers: Record<string, any>; - success: boolean; -}; - -// @public (undocumented) -type Stats = { - notesCount: number; - originalNotesCount: number; - usersCount: number; - originalUsersCount: number; - instances: number; - driveUsageLocal: number; - driveUsageRemote: number; -}; - -// Warning: (ae-forgotten-export) The symbol "StreamEvents" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -export class Stream extends EventEmitter<StreamEvents> { - constructor(origin: string, user: { - token: string; - } | null, options?: { - WebSocket?: any; - }); - // (undocumented) - close(): void; - // Warning: (ae-forgotten-export) The symbol "NonSharedConnection" needs to be exported by the entry point index.d.ts - // - // (undocumented) - disconnectToChannel(connection: NonSharedConnection): void; - // Warning: (ae-forgotten-export) The symbol "SharedConnection" needs to be exported by the entry point index.d.ts - // - // (undocumented) - removeSharedConnection(connection: SharedConnection): void; - // Warning: (ae-forgotten-export) The symbol "Pool" needs to be exported by the entry point index.d.ts - // - // (undocumented) - removeSharedConnectionPool(pool: Pool): void; - // (undocumented) - send(typeOrPayload: any, payload?: any): void; - // (undocumented) - state: 'initializing' | 'reconnecting' | 'connected'; - // (undocumented) - useChannel<C extends keyof Channels>(channel: C, params?: Channels[C]['params'], name?: string): ChannelConnection<Channels[C]>; -} - -// @public (undocumented) -type User = UserLite | UserDetailed; - -// @public (undocumented) -type UserDetailed = UserLite & { - bannerBlurhash: string | null; - bannerColor: string | null; - bannerUrl: string | null; - birthday: string | null; - createdAt: DateString; - description: string | null; - ffVisibility: 'public' | 'followers' | 'private'; - fields: { - name: string; - value: string; - }[]; - followersCount: number; - followingCount: number; - hasPendingFollowRequestFromYou: boolean; - hasPendingFollowRequestToYou: boolean; - isAdmin: boolean; - isBlocked: boolean; - isBlocking: boolean; - isBot: boolean; - isCat: boolean; - isFollowed: boolean; - isFollowing: boolean; - isLocked: boolean; - isModerator: boolean; - isMuted: boolean; - isSilenced: boolean; - isSuspended: boolean; - lang: string | null; - lastFetchedAt?: DateString; - location: string | null; - notesCount: number; - pinnedNoteIds: ID[]; - pinnedNotes: Note[]; - pinnedPage: Page | null; - pinnedPageId: string | null; - publicReactions: boolean; - securityKeys: boolean; - twoFactorEnabled: boolean; - updatedAt: DateString | null; - uri: string | null; - url: string | null; -}; - -// @public (undocumented) -type UserGroup = TODO_2; - -// @public (undocumented) -type UserList = { - id: ID; - createdAt: DateString; - name: string; - userIds: User['id'][]; -}; - -// @public (undocumented) -type UserLite = { - id: ID; - username: string; - host: string | null; - name: string; - onlineStatus: 'online' | 'active' | 'offline' | 'unknown'; - avatarUrl: string; - avatarBlurhash: string; - emojis: { - name: string; - url: string; - }[]; - instance?: { - name: Instance['name']; - softwareName: Instance['softwareName']; - softwareVersion: Instance['softwareVersion']; - iconUrl: Instance['iconUrl']; - faviconUrl: Instance['faviconUrl']; - themeColor: Instance['themeColor']; - }; -}; - -// @public (undocumented) -type UserSorting = '+follower' | '-follower' | '+createdAt' | '-createdAt' | '+updatedAt' | '-updatedAt'; - -// Warnings were encountered during analysis: -// -// src/api.types.ts:16:32 - (ae-forgotten-export) The symbol "TODO" needs to be exported by the entry point index.d.ts -// src/api.types.ts:18:25 - (ae-forgotten-export) The symbol "NoParams" needs to be exported by the entry point index.d.ts -// src/api.types.ts:595:18 - (ae-forgotten-export) The symbol "ShowUserReq" needs to be exported by the entry point index.d.ts -// src/streaming.types.ts:35:4 - (ae-forgotten-export) The symbol "FIXME" needs to be exported by the entry point index.d.ts - -// (No @packageDocumentation comment for this package) - -``` diff --git a/packages/firefish-js/test-d/api.ts b/packages/firefish-js/test-d/api.ts index 39166879d8..e7dbd6c9f7 100644 --- a/packages/firefish-js/test-d/api.ts +++ b/packages/firefish-js/test-d/api.ts @@ -1,48 +1,48 @@ import { expectType } from "tsd"; -import * as Misskey from "../src"; +import * as firefish from "../src"; describe("API", () => { test("success", async () => { - const cli = new Misskey.api.APIClient({ + const cli = new firefish.api.APIClient({ origin: "https://firefish.test", credential: "TOKEN", }); const res = await cli.request("meta", { detail: true }); - expectType<Misskey.entities.DetailedInstanceMetadata>(res); + expectType<firefish.entities.DetailedInstanceMetadata>(res); }); test("conditional respose type (meta)", async () => { - const cli = new Misskey.api.APIClient({ + const cli = new firefish.api.APIClient({ origin: "https://firefish.test", credential: "TOKEN", }); const res = await cli.request("meta", { detail: true }); - expectType<Misskey.entities.DetailedInstanceMetadata>(res); + expectType<firefish.entities.DetailedInstanceMetadata>(res); const res2 = await cli.request("meta", { detail: false }); - expectType<Misskey.entities.LiteInstanceMetadata>(res2); + expectType<firefish.entities.LiteInstanceMetadata>(res2); const res3 = await cli.request("meta", {}); - expectType<Misskey.entities.LiteInstanceMetadata>(res3); + expectType<firefish.entities.LiteInstanceMetadata>(res3); const res4 = await cli.request("meta", { detail: true as boolean }); expectType< - | Misskey.entities.LiteInstanceMetadata - | Misskey.entities.DetailedInstanceMetadata + | firefish.entities.LiteInstanceMetadata + | firefish.entities.DetailedInstanceMetadata >(res4); }); test("conditional respose type (users/show)", async () => { - const cli = new Misskey.api.APIClient({ + const cli = new firefish.api.APIClient({ origin: "https://firefish.test", credential: "TOKEN", }); const res = await cli.request("users/show", { userId: "xxxxxxxx" }); - expectType<Misskey.entities.UserDetailed>(res); + expectType<firefish.entities.UserDetailed>(res); const res2 = await cli.request("users/show", { userIds: ["xxxxxxxx"] }); - expectType<Misskey.entities.UserDetailed[]>(res2); + expectType<firefish.entities.UserDetailed[]>(res2); }); }); diff --git a/packages/firefish-js/test-d/streaming.ts b/packages/firefish-js/test-d/streaming.ts index b1eb19e4ed..0f322caacf 100644 --- a/packages/firefish-js/test-d/streaming.ts +++ b/packages/firefish-js/test-d/streaming.ts @@ -1,19 +1,19 @@ import { expectType } from "tsd"; -import * as Misskey from "../src"; +import * as firefish from "../src"; describe("Streaming", () => { test("emit type", async () => { - const stream = new Misskey.Stream("https://firefish.test", { + const stream = new firefish.Stream("https://firefish.test", { token: "TOKEN", }); const mainChannel = stream.useChannel("main"); mainChannel.on("notification", (notification) => { - expectType<Misskey.entities.Notification>(notification); + expectType<firefish.entities.Notification>(notification); }); }); test("params type", async () => { - const stream = new Misskey.Stream("https://firefish.test", { + const stream = new firefish.Stream("https://firefish.test", { token: "TOKEN", }); // TODO: 「stream.useChannel の第二引数として受け入れる型が @@ -26,7 +26,7 @@ describe("Streaming", () => { otherparty: "aaa", }); messagingChannel.on("message", (message) => { - expectType<Misskey.entities.MessagingMessage>(message); + expectType<firefish.entities.MessagingMessage>(message); }); }); }); diff --git a/packages/megalodon/src/misskey/web_socket.ts b/packages/megalodon/src/misskey/web_socket.ts index 0cbfc2bfeb..677f2049d3 100644 --- a/packages/megalodon/src/misskey/web_socket.ts +++ b/packages/megalodon/src/misskey/web_socket.ts @@ -40,7 +40,7 @@ export default class WebSocket private _pongWaiting = false; /** - * @param url Full url of websocket: e.g. wss://misskey.io/streaming + * @param url Full url of websocket: e.g. wss://firefish.io/streaming * @param channel Channel name is user, localTimeline, hybridTimeline, globalTimeline, conversation or list. * @param accessToken The access token. * @param listId This parameter is required when you specify list as channel. diff --git a/packages/sw/src/scripts/operations.ts b/packages/sw/src/scripts/operations.ts index 7cc22c5d3f..dc778c628e 100644 --- a/packages/sw/src/scripts/operations.ts +++ b/packages/sw/src/scripts/operations.ts @@ -2,19 +2,19 @@ * Operations * 各種操作 */ -import * as Misskey from "firefish-js"; +import * as firefish from "firefish-js"; import type { SwMessage, SwMessageOrderType } from "@/types"; import { getAccountFromId } from "@/scripts/get-account-from-id"; import { getUrlWithLoginId } from "@/scripts/login-id"; -export const cli = new Misskey.api.APIClient({ +export const cli = new firefish.api.APIClient({ origin, fetch: (...args): Promise<Response> => fetch(...args), }); export async function api< - E extends keyof Misskey.Endpoints, - O extends Misskey.Endpoints[E]["req"], + E extends keyof firefish.Endpoints, + O extends firefish.Endpoints[E]["req"], >( endpoint: E, userId?: string, @@ -75,8 +75,8 @@ export function openAntenna( export async function openPost( options: { initialText?: string; - reply?: Misskey.entities.Note; - renote?: Misskey.entities.Note; + reply?: firefish.entities.Note; + renote?: firefish.entities.Note; }, loginId?: string, ): ReturnType<typeof openClient> { diff --git a/packages/sw/src/types.ts b/packages/sw/src/types.ts index 3318354905..3de84e5749 100644 --- a/packages/sw/src/types.ts +++ b/packages/sw/src/types.ts @@ -1,4 +1,4 @@ -import * as Misskey from "firefish-js"; +import * as firefish from "firefish-js"; export type SwMessageOrderType = "post" | "push"; @@ -12,10 +12,10 @@ export type SwMessage = { // Defined also @/services/push-notification.ts#L7-L14 type PushNotificationDataSourceMap = { - notification: Misskey.entities.Notification; + notification: firefish.entities.Notification; unreadAntennaNote: { antenna: { id: string; name: string }; - note: Misskey.entities.Note; + note: firefish.entities.Note; }; readAllNotifications: undefined; readAllMessagingMessages: undefined; From 284795fdf53e468051a3a920027d6afc61bfed0f Mon Sep 17 00:00:00 2001 From: ThatOneCalculator <kainoa@t1c.dev> Date: Sat, 23 Sep 2023 22:05:25 -0700 Subject: [PATCH 5/6] =?UTF-8?q?fix:=20=F0=9F=90=9B=20when=20favorouting/un?= =?UTF-8?q?favouriting=20with=20Mastodon=20API,=20send=20instance=20defaul?= =?UTF-8?q?t=20reaction?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../server/api/mastodon/endpoints/status.ts | 29 ++++--------------- 1 file changed, 5 insertions(+), 24 deletions(-) diff --git a/packages/backend/src/server/api/mastodon/endpoints/status.ts b/packages/backend/src/server/api/mastodon/endpoints/status.ts index c3e6946e2f..bc95d77769 100644 --- a/packages/backend/src/server/api/mastodon/endpoints/status.ts +++ b/packages/backend/src/server/api/mastodon/endpoints/status.ts @@ -12,6 +12,7 @@ import { convertPoll, convertStatus, } from "../converters.js"; +import { fetchMeta } from "@/misc/fetch-meta.js"; function normalizeQuery(data: any) { const str = querystring.stringify(data); @@ -216,10 +217,11 @@ export function apiStatusMastodon(router: Router): void { router.post<{ Params: { id: string } }>( "/v1/statuses/:id/favourite", async (ctx) => { + const meta = await fetchMeta(); const BASE_URL = `${ctx.protocol}://${ctx.hostname}`; const accessTokens = ctx.headers.authorization; const client = getClient(BASE_URL, accessTokens); - const react = await getFirstReaction(BASE_URL, accessTokens); + const react = meta.defaultReaction; try { const a = (await client.createEmojiReaction( convertId(ctx.params.id, IdType.FirefishId), @@ -238,10 +240,11 @@ export function apiStatusMastodon(router: Router): void { router.post<{ Params: { id: string } }>( "/v1/statuses/:id/unfavourite", async (ctx) => { + const meta = await fetchMeta(); const BASE_URL = `${ctx.protocol}://${ctx.hostname}`; const accessTokens = ctx.headers.authorization; const client = getClient(BASE_URL, accessTokens); - const react = await getFirstReaction(BASE_URL, accessTokens); + const react = meta.defaultReaction; try { const data = await client.deleteEmojiReaction( convertId(ctx.params.id, IdType.FirefishId), @@ -476,25 +479,3 @@ export function apiStatusMastodon(router: Router): void { }, ); } - -async function getFirstReaction( - BASE_URL: string, - accessTokens: string | undefined, -) { - const accessTokenArr = accessTokens?.split(" ") ?? [null]; - const accessToken = accessTokenArr[accessTokenArr.length - 1]; - let react = "⭐"; - try { - const api = await axios.post(`${BASE_URL}/api/i/registry/get-unsecure`, { - scope: ["client", "base"], - key: "reactions", - i: accessToken, - }); - const reactRaw = api.data; - react = Array.isArray(reactRaw) ? api.data[0] : "⭐"; - console.log(api.data); - return react; - } catch (e) { - return react; - } -} From 3633dd4e7f762b276c9dd7157455f0197dd6a7f7 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator <kainoa@t1c.dev> Date: Sat, 23 Sep 2023 22:24:18 -0700 Subject: [PATCH 6/6] =?UTF-8?q?style:=20=F0=9F=92=84=20use=20rocket=20as?= =?UTF-8?q?=20icon=20for=20boosting=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/client/src/components/MkNote.vue | 2 +- packages/client/src/components/MkNoteDetailed.vue | 2 +- packages/client/src/components/MkNotification.vue | 2 +- packages/client/src/components/MkRenoteButton.vue | 6 +++--- packages/client/src/pages/gallery/post.vue | 2 +- packages/client/src/pages/page.vue | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/client/src/components/MkNote.vue b/packages/client/src/components/MkNote.vue index e6d044e7e1..f790889c38 100644 --- a/packages/client/src/components/MkNote.vue +++ b/packages/client/src/components/MkNote.vue @@ -43,7 +43,7 @@ >{{ i18n.ts.pinnedNote }} </div> <div v-if="isRenote" class="renote"> - <i class="ph-repeat ph-bold ph-lg"></i> + <i class="ph-rocket-launch ph-bold ph-lg"></i> <I18n :src="i18n.ts.renotedBy" tag="span"> <template #user> <MkA diff --git a/packages/client/src/components/MkNoteDetailed.vue b/packages/client/src/components/MkNoteDetailed.vue index 0fc66fd0fc..ac5da6485b 100644 --- a/packages/client/src/components/MkNoteDetailed.vue +++ b/packages/client/src/components/MkNoteDetailed.vue @@ -42,7 +42,7 @@ {{ i18n.ts._notification._types.reply }} </option> <option v-if="note.renoteCount > 0" value="renotes"> - <!-- <i class="ph-repeat ph-bold ph-lg"></i> --> + <!-- <i class="ph-rocket-launch ph-bold ph-lg"></i> --> <span class="count">{{ note.renoteCount }}</span> {{ i18n.ts._notification._types.renote }} </option> diff --git a/packages/client/src/components/MkNotification.vue b/packages/client/src/components/MkNotification.vue index dc49bbdc4c..29a38bf177 100644 --- a/packages/client/src/components/MkNotification.vue +++ b/packages/client/src/components/MkNotification.vue @@ -41,7 +41,7 @@ ></i> <i v-else-if="notification.type === 'renote'" - class="ph-repeat ph-bold" + class="ph-rocket-launch ph-bold" ></i> <i v-else-if="notification.type === 'reply'" diff --git a/packages/client/src/components/MkRenoteButton.vue b/packages/client/src/components/MkRenoteButton.vue index dd96fcd6d8..bf60e15a39 100644 --- a/packages/client/src/components/MkRenoteButton.vue +++ b/packages/client/src/components/MkRenoteButton.vue @@ -7,7 +7,7 @@ :class="{ renoted: hasRenotedBefore }" @click.stop="renote(false, $event)" > - <i class="ph-repeat ph-bold ph-lg"></i> + <i class="ph-rocket-launch ph-bold ph-lg"></i> <p v-if="count > 0 && !detailedView" class="count">{{ count }}</p> </button> <button @@ -16,7 +16,7 @@ class="eddddedb _button" disabled="true" > - <i class="ph-repeat ph-bold ph-lg"></i> + <i class="ph-rocket-launch ph-bold ph-lg"></i> </button> </template> @@ -88,7 +88,7 @@ const renote = (viaKeyboard = false, ev?: MouseEvent) => { if (props.note.visibility === "public") { buttonActions.push({ text: i18n.ts.renote, - icon: "ph-repeat ph-bold ph-lg", + icon: "ph-rocket-launch ph-bold ph-lg", danger: false, action: () => { os.api("notes/create", { diff --git a/packages/client/src/pages/gallery/post.vue b/packages/client/src/pages/gallery/post.vue index 3f3266c634..9826bcb1fb 100644 --- a/packages/client/src/pages/gallery/post.vue +++ b/packages/client/src/pages/gallery/post.vue @@ -75,7 +75,7 @@ @click="shareWithNote" > <i - class="ph-repeat ph-bold ph-lg ph-fw ph-lg" + class="ph-rocket-launch ph-bold ph-lg ph-fw ph-lg" ></i> </button> <button diff --git a/packages/client/src/pages/page.vue b/packages/client/src/pages/page.vue index e33fffa648..20193e4a6b 100644 --- a/packages/client/src/pages/page.vue +++ b/packages/client/src/pages/page.vue @@ -125,7 +125,7 @@ @click="shareWithNote" > <i - class="ph-repeat ph-bold ph-lg ph-fw ph-lg" + class="ph-rocket-launch ph-bold ph-lg ph-fw ph-lg" ></i> </button> <button