This commit is contained in:
nelle 2024-06-17 10:15:54 -06:00
parent cc4a0d3e58
commit ba0e5eec93
113 changed files with 6611 additions and 9045 deletions

View file

@ -1,195 +0,0 @@
#━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# Firefish configuration
#━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# ┌─────┐
#───┘ URL └─────────────────────────────────────────────────────
# Final accessible URL seen by a user.
url: https://example.tld/
# ONCE YOU HAVE STARTED THE INSTANCE, DO NOT CHANGE THE
# URL SETTINGS AFTER THAT!
# ┌───────────────────────┐
#───┘ Port and TLS settings └───────────────────────────────────
#
# Misskey requires a reverse proxy to support HTTPS connections.
#
# +----- https://example.tld/ ------------+
# +------+ |+-------------+ +----------------+|
# | User | ---> || Proxy (443) | ---> | Misskey (3000) ||
# +------+ |+-------------+ +----------------+|
# +---------------------------------------+
#
# You need to set up a reverse proxy. (e.g. nginx)
# An encrypted connection with HTTPS is highly recommended
# because tokens may be transferred in GET requests.
# The port that your Misskey server should listen on.
port: 3000
# ┌──────────────────────────┐
#───┘ PostgreSQL configuration └────────────────────────────────
db:
host: database
port: 5432
# Database name
db: postgres
# Auth
user: postgres
pass: test
# Whether disable Caching queries
#disableCache: true
# Extra Connection options
#extra:
# ssl: true
# ┌─────────────────────┐
#───┘ Redis configuration └─────────────────────────────────────
redis:
host: redis
port: 6379
#family: 0 # 0=Both, 4=IPv4, 6=IPv6
#pass: example-pass
#prefix: example-prefix
#db: 1
# ┌─────────────────────────────┐
#───┘ Elasticsearch configuration └─────────────────────────────
#elasticsearch:
# host: localhost
# port: 9200
# ssl: false
# user:
# pass:
# ┌───────────────┐
#───┘ ID generation └───────────────────────────────────────────
# You can select the ID generation method.
# You don't usually need to change this setting, but you can
# change it according to your preferences.
# Available methods:
# aid ... Short, Millisecond accuracy
# meid ... Similar to ObjectID, Millisecond accuracy
# ulid ... Millisecond accuracy
# objectid ... This is left for backward compatibility
# ONCE YOU HAVE STARTED THE INSTANCE, DO NOT CHANGE THE
# ID SETTINGS AFTER THAT!
id: 'aid'
# ┌─────────────────────┐
#───┘ Other configuration └─────────────────────────────────────
# Max note length, should be < 8000.
#maxNoteLength: 3000
# Whether disable HSTS
#disableHsts: true
# Number of worker processes
#clusterLimit: 1
# Job concurrency per worker
# deliverJobConcurrency: 128
# inboxJobConcurrency: 16
# Job rate limiter
# deliverJobPerSec: 128
# inboxJobPerSec: 16
# Job attempts
# deliverJobMaxAttempts: 12
# inboxJobMaxAttempts: 8
# IP address family used for outgoing request (ipv4, ipv6 or dual)
#outgoingAddressFamily: ipv4
# Syslog option
#syslog:
# host: localhost
# port: 514
# Proxy for HTTP/HTTPS
#proxy: http://127.0.0.1:3128
#proxyBypassHosts: [
# 'example.com',
# '192.0.2.8'
#]
# Proxy for SMTP/SMTPS
#proxySmtp: http://127.0.0.1:3128 # use HTTP/1.1 CONNECT
#proxySmtp: socks4://127.0.0.1:1080 # use SOCKS4
#proxySmtp: socks5://127.0.0.1:1080 # use SOCKS5
# Media Proxy
#mediaProxy: https://example.com/proxy
# Proxy remote files (default: false)
#proxyRemoteFiles: true
#allowedPrivateNetworks: [
# '127.0.0.1/32'
#]
# Upload or download file size limits (bytes)
#maxFileSize: 262144000
# Managed hosting settings
# !!!!!!!!!!
# >>>>>> NORMAL SELF-HOSTERS, STAY AWAY! <<<<<<
# >>>>>> YOU DON'T NEED THIS! <<<<<<
# !!!!!!!!!!
# Each category is optional, but if each item in each category is mandatory!
# If you mess this up, that's on you, you've been warned...
#maxUserSignups: 100
#isManagedHosting: true
#deepl:
# managed: true
# authKey: ''
# isPro: false
#
#email:
# managed: true
# address: 'example@email.com'
# host: 'email.com'
# port: 587
# user: 'example@email.com'
# pass: ''
# useImplicitSslTls: false
#
#objectStorage:
# managed: true
# baseUrl: ''
# bucket: ''
# prefix: ''
# endpoint: ''
# region: ''
# accessKey: ''
# secretKey: ''
# useSsl: true
# connnectOverProxy: false
# setPublicReadOnUpload: true
# s3ForcePathStyle: true
# !!!!!!!!!!
# >>>>>> AGAIN, NORMAL SELF-HOSTERS, STAY AWAY! <<<<<<
# >>>>>> YOU DON'T NEED THIS, ABOVE SETTINGS ARE FOR MANAGED HOSTING ONLY! <<<<<<
# !!!!!!!!!!
# Seriously. Do NOT fill out the above settings if you're self-hosting.
# They're much better off being set from the control panel.

View file

@ -1,11 +0,0 @@
{
"recommendations": [
"editorconfig.editorconfig",
"eg2.vscode-npm-script",
"vue.volar",
"vue.vscode-typescript-vue-plugin",
"arcanis.vscode-zipfs",
"orta.vscode-twoslash-queries",
"biomejs.biome"
]
}

BIN
.yarn/corepack.tgz (Stored with Git LFS)

Binary file not shown.

@ -1 +0,0 @@
Subproject commit 1c4e96bcfe61c981a1e8f23142082ac8ce7fc575

View file

@ -1,13 +0,0 @@
Copyright 2023 The Iceshrimp contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View file

@ -1,103 +0,0 @@
import type Bull from "bull";
import { queueLogger } from "../../logger.js";
import { DriveFiles, Notes, UserProfiles, Users } from "@/models/index.js";
import type { DbUserDeleteJobData } from "@/queue/types.js";
import type { Note } from "@/models/entities/note.js";
import type { DriveFile } from "@/models/entities/drive-file.js";
import { MoreThan } from "typeorm";
import { deleteFileSync } from "@/services/drive/delete-file.js";
import { sendEmail } from "@/services/send-email.js";
import { publishInternalEvent } from "@/services/stream.js";
const logger = queueLogger.createSubLogger("delete-account");
export async function deleteAccount(
job: Bull.Job<DbUserDeleteJobData>,
): Promise<string | void> {
logger.info(`Deleting account of ${job.data.user.id} ...`);
const user = await Users.findOneBy({ id: job.data.user.id });
if (!user) return;
const isLocal = Users.isLocalUser(user);
{
// Delete notes
let cursor: Note["id"] | null = null;
while (true) {
const notes = (await Notes.find({
where: {
userId: user.id,
...(cursor ? { id: MoreThan(cursor) } : {}),
},
take: 10,
order: {
id: 1,
},
})) as Note[];
if (notes.length === 0) {
break;
}
cursor = notes[notes.length - 1].id;
await Notes.delete(notes.map((note) => note.id));
}
logger.succ("All of notes deleted");
}
{
// Delete files
let cursor: DriveFile["id"] | null = null;
while (true) {
const files = (await DriveFiles.find({
where: {
userId: user.id,
...(cursor ? { id: MoreThan(cursor) } : {}),
},
take: 10,
order: {
id: 1,
},
})) as DriveFile[];
if (files.length === 0) {
break;
}
cursor = files[files.length - 1].id;
for (const file of files) {
await deleteFileSync(file);
}
}
logger.succ("All of files deleted");
}
{
// Send email notification
const profile = await UserProfiles.findOneByOrFail({ userId: user.id });
if (profile.email && profile.emailVerified) {
sendEmail(
profile.email,
"Account deleted",
"Your account has been deleted.",
"Your account has been deleted.",
);
}
}
// soft指定されている場合は物理削除しない
if (job.data.soft) {
// nop
} else {
await Users.delete(job.data.user.id);
publishInternalEvent(isLocal ? "localUserDeleted" : "remoteUserDeleted", { id: user.id });
}
return "Account deleted";
}

View file

@ -1,61 +0,0 @@
import type Bull from "bull";
import { queueLogger } from "../../logger.js";
import { deleteFileSync } from "@/services/drive/delete-file.js";
import { Users, DriveFiles } from "@/models/index.js";
import { MoreThan } from "typeorm";
import type { DbUserJobData } from "@/queue/types.js";
const logger = queueLogger.createSubLogger("delete-drive-files");
export async function deleteDriveFiles(
job: Bull.Job<DbUserJobData>,
done: any,
): Promise<void> {
logger.info(`Deleting drive files of ${job.data.user.id} ...`);
const user = await Users.findOneBy({ id: job.data.user.id });
if (user == null) {
done();
return;
}
let deletedCount = 0;
let cursor: any = null;
while (true) {
const files = await DriveFiles.find({
where: {
userId: user.id,
...(cursor ? { id: MoreThan(cursor) } : {}),
},
take: 100,
order: {
id: 1,
},
});
if (files.length === 0) {
job.progress(100);
break;
}
cursor = files[files.length - 1].id;
for (const file of files) {
await deleteFileSync(file);
deletedCount++;
}
const total = await DriveFiles.countBy({
userId: user.id,
});
job.progress(deletedCount / total);
}
logger.succ(
`All drive files (${deletedCount}) of ${user.id} has been deleted.`,
);
done();
}

View file

@ -1,105 +0,0 @@
import type Bull from "bull";
import * as fs from "node:fs";
import { queueLogger } from "../../logger.js";
import { addFile } from "@/services/drive/add-file.js";
import { format as dateFormat } from "date-fns";
import { getFullApAccount } from "@/misc/convert-host.js";
import { createTemp } from "@/misc/create-temp.js";
import { Users, Blockings } from "@/models/index.js";
import { MoreThan } from "typeorm";
import type { DbUserJobData } from "@/queue/types.js";
const logger = queueLogger.createSubLogger("export-blocking");
export async function exportBlocking(
job: Bull.Job<DbUserJobData>,
done: any,
): Promise<void> {
logger.info(`Exporting blocking of ${job.data.user.id} ...`);
const user = await Users.findOneBy({ id: job.data.user.id });
if (user == null) {
done();
return;
}
// Create temp file
const [path, cleanup] = await createTemp();
logger.info(`Temp file is ${path}`);
try {
const stream = fs.createWriteStream(path, { flags: "a" });
let exportedCount = 0;
let cursor: any = null;
while (true) {
const blockings = await Blockings.find({
where: {
blockerId: user.id,
...(cursor ? { id: MoreThan(cursor) } : {}),
},
take: 100,
order: {
id: 1,
},
});
if (blockings.length === 0) {
job.progress(100);
break;
}
cursor = blockings[blockings.length - 1].id;
for (const block of blockings) {
const u = await Users.findOneBy({ id: block.blockeeId });
if (u == null) {
exportedCount++;
continue;
}
const content = getFullApAccount(u.username, u.host);
await new Promise<void>((res, rej) => {
stream.write(content + "\n", (err) => {
if (err) {
logger.error(err);
rej(err);
} else {
res();
}
});
});
exportedCount++;
}
const total = await Blockings.countBy({
blockerId: user.id,
});
job.progress(exportedCount / total);
}
stream.end();
logger.succ(`Exported to: ${path}`);
const fileName = `blocking-${dateFormat(
new Date(),
"yyyy-MM-dd-HH-mm-ss",
)}.csv`;
const driveFile = await addFile({
user,
path,
name: fileName,
force: true,
});
logger.succ(`Exported to: ${driveFile.id}`);
} finally {
cleanup();
}
done();
}

View file

@ -1,132 +0,0 @@
import type Bull from "bull";
import * as fs from "node:fs";
import { ulid } from "ulid";
import mime from "mime-types";
import archiver from "archiver";
import { queueLogger } from "../../logger.js";
import { addFile } from "@/services/drive/add-file.js";
import { format as dateFormat } from "date-fns";
import { Users, Emojis } from "@/models/index.js";
import {} from "@/queue/types.js";
import { createTemp, createTempDir } from "@/misc/create-temp.js";
import { downloadUrl } from "@/misc/download-url.js";
import config from "@/config/index.js";
import { IsNull } from "typeorm";
const logger = queueLogger.createSubLogger("export-custom-emojis");
export async function exportCustomEmojis(
job: Bull.Job,
done: () => void,
): Promise<void> {
logger.info("Exporting custom emojis ...");
const user = await Users.findOneBy({ id: job.data.user.id });
if (user == null) {
done();
return;
}
const [path, cleanup] = await createTempDir();
logger.info(`Temp dir is ${path}`);
const metaPath = `${path}/meta.json`;
fs.writeFileSync(metaPath, "", "utf-8");
const metaStream = fs.createWriteStream(metaPath, { flags: "a" });
const writeMeta = (text: string): Promise<void> => {
return new Promise<void>((res, rej) => {
metaStream.write(text, (err) => {
if (err) {
logger.error(err);
rej(err);
} else {
res();
}
});
});
};
await writeMeta(
`{"metaVersion":2,"host":"${
config.host
}","exportedAt":"${new Date().toString()}","emojis":[`,
);
const customEmojis = await Emojis.find({
where: {
host: IsNull(),
},
order: {
id: "ASC",
},
});
for (const emoji of customEmojis) {
const ext = mime.extension(emoji.type);
// there are some restrictions on file names, so to be safe the files are
// named after their database id instead of the actual emoji name
const fileName = emoji.id + (ext ? '.' + ext : '');
const emojiPath = `${path}/${fileName}`;
fs.writeFileSync(emojiPath, "", "binary");
let downloaded = false;
try {
await downloadUrl(emoji.originalUrl, emojiPath);
downloaded = true;
} catch (e) {
// TODO: 何度か再試行
logger.error(e instanceof Error ? e : new Error(e as string));
}
if (!downloaded) {
fs.unlinkSync(emojiPath);
}
const content = JSON.stringify({
fileName: fileName,
downloaded: downloaded,
emoji: emoji,
});
const isFirst = customEmojis.indexOf(emoji) === 0;
await writeMeta(isFirst ? content : ",\n" + content);
}
await writeMeta("]}");
metaStream.end();
// Create archive
const [archivePath, archiveCleanup] = await createTemp();
const archiveStream = fs.createWriteStream(archivePath);
const archive = archiver("zip", {
zlib: { level: 0 },
});
archiveStream.on("close", async () => {
logger.succ(`Exported to: ${archivePath}`);
const fileName = `custom-emojis-${dateFormat(
new Date(),
"yyyy-MM-dd-HH-mm-ss",
)}.zip`;
const driveFile = await addFile({
user,
path: archivePath,
name: fileName,
force: true,
});
logger.succ(`Exported to: ${driveFile.id}`);
cleanup();
archiveCleanup();
done();
});
archive.pipe(archiveStream);
archive.directory(path, false);
archive.finalize();
}

View file

@ -1,113 +0,0 @@
import type Bull from "bull";
import * as fs from "node:fs";
import { queueLogger } from "../../logger.js";
import { addFile } from "@/services/drive/add-file.js";
import { format as dateFormat } from "date-fns";
import { getFullApAccount } from "@/misc/convert-host.js";
import { createTemp } from "@/misc/create-temp.js";
import { Users, Followings, Mutings } from "@/models/index.js";
import { In, MoreThan, Not } from "typeorm";
import type { DbUserJobData } from "@/queue/types.js";
import type { Following } from "@/models/entities/following.js";
const logger = queueLogger.createSubLogger("export-following");
export async function exportFollowing(
job: Bull.Job<DbUserJobData>,
done: () => void,
): Promise<void> {
logger.info(`Exporting following of ${job.data.user.id} ...`);
const user = await Users.findOneBy({ id: job.data.user.id });
if (user == null) {
done();
return;
}
// Create temp file
const [path, cleanup] = await createTemp();
logger.info(`Temp file is ${path}`);
try {
const stream = fs.createWriteStream(path, { flags: "a" });
let cursor: Following["id"] | null = null;
const mutings = job.data.excludeMuting
? await Mutings.findBy({
muterId: user.id,
})
: [];
while (true) {
const followings = (await Followings.find({
where: {
followerId: user.id,
...(mutings.length > 0
? { followeeId: Not(In(mutings.map((x) => x.muteeId))) }
: {}),
...(cursor ? { id: MoreThan(cursor) } : {}),
},
take: 100,
order: {
id: 1,
},
})) as Following[];
if (followings.length === 0) {
break;
}
cursor = followings[followings.length - 1].id;
for (const following of followings) {
const u = await Users.findOneBy({ id: following.followeeId });
if (u == null) {
continue;
}
if (
job.data.excludeInactive &&
u.updatedAt &&
Date.now() - u.updatedAt.getTime() > 1000 * 60 * 60 * 24 * 90
) {
continue;
}
const content = getFullApAccount(u.username, u.host);
await new Promise<void>((res, rej) => {
stream.write(content + "\n", (err) => {
if (err) {
logger.error(err);
rej(err);
} else {
res();
}
});
});
}
}
stream.end();
logger.succ(`Exported to: ${path}`);
const fileName = `following-${dateFormat(
new Date(),
"yyyy-MM-dd-HH-mm-ss",
)}.csv`;
const driveFile = await addFile({
user,
path,
name: fileName,
force: true,
});
logger.succ(`Exported to: ${driveFile.id}`);
} finally {
cleanup();
}
done();
}

View file

@ -1,106 +0,0 @@
import type Bull from "bull";
import * as fs from "node:fs";
import { queueLogger } from "../../logger.js";
import { addFile } from "@/services/drive/add-file.js";
import { format as dateFormat } from "date-fns";
import { getFullApAccount } from "@/misc/convert-host.js";
import { createTemp } from "@/misc/create-temp.js";
import { Users, Mutings } from "@/models/index.js";
import { IsNull, MoreThan } from "typeorm";
import type { DbUserJobData } from "@/queue/types.js";
const logger = queueLogger.createSubLogger("export-mute");
export async function exportMute(
job: Bull.Job<DbUserJobData>,
done: any,
): Promise<void> {
logger.info(`Exporting mute of ${job.data.user.id} ...`);
const user = await Users.findOneBy({ id: job.data.user.id });
if (user == null) {
done();
return;
}
// Create temp file
const [path, cleanup] = await createTemp();
logger.info(`Temp file is ${path}`);
try {
const stream = fs.createWriteStream(path, { flags: "a" });
let exportedCount = 0;
let cursor: any = null;
while (true) {
const mutes = await Mutings.find({
where: {
muterId: user.id,
expiresAt: IsNull(),
...(cursor ? { id: MoreThan(cursor) } : {}),
},
take: 100,
order: {
id: 1,
},
});
if (mutes.length === 0) {
job.progress(100);
break;
}
cursor = mutes[mutes.length - 1].id;
for (const mute of mutes) {
const u = await Users.findOneBy({ id: mute.muteeId });
if (u == null) {
exportedCount++;
continue;
}
const content = getFullApAccount(u.username, u.host);
await new Promise<void>((res, rej) => {
stream.write(content + "\n", (err) => {
if (err) {
logger.error(err);
rej(err);
} else {
res();
}
});
});
exportedCount++;
}
const total = await Mutings.countBy({
muterId: user.id,
});
job.progress(exportedCount / total);
}
stream.end();
logger.succ(`Exported to: ${path}`);
const fileName = `mute-${dateFormat(
new Date(),
"yyyy-MM-dd-HH-mm-ss",
)}.csv`;
const driveFile = await addFile({
user,
path,
name: fileName,
force: true,
});
logger.succ(`Exported to: ${driveFile.id}`);
} finally {
cleanup();
}
done();
}

View file

@ -1,133 +0,0 @@
import type Bull from "bull";
import * as fs from "node:fs";
import { queueLogger } from "../../logger.js";
import { addFile } from "@/services/drive/add-file.js";
import { format as dateFormat } from "date-fns";
import { Users, Notes, Polls, DriveFiles } from "@/models/index.js";
import { MoreThan } from "typeorm";
import type { Note } from "@/models/entities/note.js";
import type { Poll } from "@/models/entities/poll.js";
import type { DbUserJobData } from "@/queue/types.js";
import { createTemp } from "@/misc/create-temp.js";
const logger = queueLogger.createSubLogger("export-notes");
export async function exportNotes(
job: Bull.Job<DbUserJobData>,
done: any,
): Promise<void> {
logger.info(`Exporting notes of ${job.data.user.id} ...`);
const user = await Users.findOneBy({ id: job.data.user.id });
if (user == null) {
done();
return;
}
// Create temp file
const [path, cleanup] = await createTemp();
logger.info(`Temp file is ${path}`);
try {
const stream = fs.createWriteStream(path, { flags: "a" });
const write = (text: string): Promise<void> => {
return new Promise<void>((res, rej) => {
stream.write(text, (err) => {
if (err) {
logger.error(err);
rej(err);
} else {
res();
}
});
});
};
await write("[");
let exportedNotesCount = 0;
let cursor: Note["id"] | null = null;
while (true) {
const notes = (await Notes.find({
where: {
userId: user.id,
...(cursor ? { id: MoreThan(cursor) } : {}),
},
take: 100,
order: {
id: 1,
},
})) as Note[];
if (notes.length === 0) {
job.progress(100);
break;
}
cursor = notes[notes.length - 1].id;
for (const note of notes) {
let poll: Poll | undefined;
if (note.hasPoll) {
poll = await Polls.findOneByOrFail({ noteId: note.id });
}
const content = JSON.stringify(await serialize(note, poll));
const isFirst = exportedNotesCount === 0;
await write(isFirst ? content : ",\n" + content);
exportedNotesCount++;
}
const total = await Notes.countBy({
userId: user.id,
});
job.progress(exportedNotesCount / total);
}
await write("]");
stream.end();
logger.succ(`Exported to: ${path}`);
const fileName = `notes-${dateFormat(
new Date(),
"yyyy-MM-dd-HH-mm-ss",
)}.json`;
const driveFile = await addFile({
user,
path,
name: fileName,
force: true,
});
logger.succ(`Exported to: ${driveFile.id}`);
} finally {
cleanup();
}
done();
}
async function serialize(
note: Note,
poll: Poll | null = null,
): Promise<Record<string, unknown>> {
return {
id: note.id,
text: note.text,
createdAt: note.createdAt,
fileIds: note.fileIds,
files: await DriveFiles.packMany(note.fileIds),
replyId: note.replyId,
renoteId: note.renoteId,
poll: poll,
cw: note.cw,
visibility: note.visibility,
visibleUserIds: note.visibleUserIds,
localOnly: note.localOnly,
};
}

View file

@ -1,81 +0,0 @@
import type Bull from "bull";
import * as fs from "node:fs";
import { queueLogger } from "../../logger.js";
import { addFile } from "@/services/drive/add-file.js";
import { format as dateFormat } from "date-fns";
import { getFullApAccount } from "@/misc/convert-host.js";
import { createTemp } from "@/misc/create-temp.js";
import { Users, UserLists, UserListJoinings } from "@/models/index.js";
import { In } from "typeorm";
import type { DbUserJobData } from "@/queue/types.js";
const logger = queueLogger.createSubLogger("export-user-lists");
export async function exportUserLists(
job: Bull.Job<DbUserJobData>,
done: any,
): Promise<void> {
logger.info(`Exporting user lists of ${job.data.user.id} ...`);
const user = await Users.findOneBy({ id: job.data.user.id });
if (user == null) {
done();
return;
}
const lists = await UserLists.findBy({
userId: user.id,
});
// Create temp file
const [path, cleanup] = await createTemp();
logger.info(`Temp file is ${path}`);
try {
const stream = fs.createWriteStream(path, { flags: "a" });
for (const list of lists) {
const joinings = await UserListJoinings.findBy({ userListId: list.id });
const users = await Users.findBy({
id: In(joinings.map((j) => j.userId)),
});
for (const u of users) {
const acct = getFullApAccount(u.username, u.host);
const content = `${list.name},${acct}`;
await new Promise<void>((res, rej) => {
stream.write(content + "\n", (err) => {
if (err) {
logger.error(err);
rej(err);
} else {
res();
}
});
});
}
}
stream.end();
logger.succ(`Exported to: ${path}`);
const fileName = `user-lists-${dateFormat(
new Date(),
"yyyy-MM-dd-HH-mm-ss",
)}.csv`;
const driveFile = await addFile({
user,
path,
name: fileName,
force: true,
});
logger.succ(`Exported to: ${driveFile.id}`);
} finally {
cleanup();
}
done();
}

View file

@ -1,79 +0,0 @@
import type Bull from "bull";
import { queueLogger } from "../../logger.js";
import * as Acct from "@/misc/acct.js";
import { resolveUser } from "@/remote/resolve-user.js";
import { downloadTextFile } from "@/misc/download-text-file.js";
import { isSelfHost, toPuny } from "@/misc/convert-host.js";
import { Users, DriveFiles, Blockings } from "@/models/index.js";
import type { DbUserImportJobData } from "@/queue/types.js";
import block from "@/services/blocking/create.js";
import { IsNull } from "typeorm";
const logger = queueLogger.createSubLogger("import-blocking");
export async function importBlocking(
job: Bull.Job<DbUserImportJobData>,
done: any,
): Promise<void> {
logger.info(`Importing blocking of ${job.data.user.id} ...`);
const user = await Users.findOneBy({ id: job.data.user.id });
if (user == null) {
done();
return;
}
const file = await DriveFiles.findOneBy({
id: job.data.fileId,
});
if (file == null) {
done();
return;
}
const csv = await downloadTextFile(file.url);
let linenum = 0;
for (const line of csv.trim().split("\n")) {
linenum++;
try {
const acct = line.split(",")[0].trim();
const { username, host } = Acct.parse(acct);
let target = isSelfHost(host!)
? await Users.findOneBy({
host: IsNull(),
usernameLower: username.toLowerCase(),
})
: await Users.findOneBy({
host: toPuny(host!),
usernameLower: username.toLowerCase(),
});
if (host == null && target == null) continue;
if (target == null) {
target = await resolveUser(username, host);
}
if (target == null) {
throw new Error(`cannot resolve user: @${username}@${host}`);
}
// skip myself
if (target.id === job.data.user.id) continue;
logger.info(`Block[${linenum}] ${target.id} ...`);
await block(user, target);
} catch (e) {
logger.warn(`Error in line:${linenum} ${e}`);
}
}
logger.succ("Imported");
done();
}

View file

@ -1,150 +0,0 @@
import type Bull from "bull";
import * as fs from "node:fs";
import AdmZip from "adm-zip";
import { queueLogger } from "../../logger.js";
import { createTempDir } from "@/misc/create-temp.js";
import { downloadUrl } from "@/misc/download-url.js";
import { DriveFiles, Emojis } from "@/models/index.js";
import type { DbUserImportJobData } from "@/queue/types.js";
import { addFile } from "@/services/drive/add-file.js";
import { genId } from "@/misc/gen-id.js";
import { db } from "@/db/postgre.js";
import probeImageSize from "probe-image-size";
import * as path from "path";
const logger = queueLogger.createSubLogger("import-custom-emojis");
// TODO: 名前衝突時の動作を選べるようにする
export async function importCustomEmojis(
job: Bull.Job<DbUserImportJobData>,
done: any,
): Promise<void> {
logger.info("Importing custom emojis ...");
const file = await DriveFiles.findOneBy({
id: job.data.fileId,
});
if (file == null) {
done();
return;
}
const [tempPath, cleanup] = await createTempDir();
logger.info(`Temp dir is ${tempPath}`);
const destPath = `${tempPath}/emojis.zip`;
try {
fs.writeFileSync(destPath, "", "binary");
await downloadUrl(file.url, destPath);
} catch (e) {
// TODO: 何度か再試行
if (e instanceof Error || typeof e === "string") {
logger.error(e);
}
throw e;
}
const outputPath = `${tempPath}/emojis`;
const unzipStream = fs.createReadStream(destPath);
const zip = new AdmZip(destPath);
zip.extractAllToAsync(outputPath, true, false, async (error) => {
if (error) throw error;
if (fs.existsSync(`${outputPath}/meta.json`)) {
logger.info("starting emoji import with metadata");
const metaRaw = fs.readFileSync(`${outputPath}/meta.json`, "utf-8");
const meta = JSON.parse(metaRaw);
for (const record of meta.emojis) {
if (!record.downloaded) continue;
const emojiInfo = record.emoji;
const emojiPath = `${outputPath}/${record.fileName}`;
await Emojis.delete({
name: emojiInfo.name,
});
const driveFile = await addFile({
user: null,
path: emojiPath,
name: record.fileName,
force: true,
});
const file = fs.createReadStream(emojiPath);
const size = await probeImageSize(file);
file.destroy();
await Emojis.insert({
id: genId(),
updatedAt: new Date(),
name: emojiInfo.name,
category: emojiInfo.category,
host: null,
aliases: emojiInfo.aliases,
originalUrl: driveFile.url,
publicUrl: driveFile.webpublicUrl ?? driveFile.url,
type: driveFile.webpublicType ?? driveFile.type,
license: emojiInfo.license,
width: size.width || null,
height: size.height || null,
}).then((x) => Emojis.findOneByOrFail(x.identifiers[0]));
}
} else {
logger.info("starting emoji import without metadata");
// Since we lack metadata, we import into a randomized category name instead
let categoryName = genId();
let containedEmojis = fs.readdirSync(outputPath);
// Filter out accidental JSON files
containedEmojis = containedEmojis.filter(
(emoji) => !emoji.match(/\.(json)$/i),
);
for (const emojiFilename of containedEmojis) {
// strip extension and get filename to use as name
const name = path.basename(emojiFilename, path.extname(emojiFilename));
const emojiPath = `${outputPath}/${emojiFilename}`;
logger.info(`importing ${name}`);
await Emojis.delete({
name: name,
});
const driveFile = await addFile({
user: null,
path: emojiPath,
name: path.basename(emojiFilename),
force: true,
});
const file = fs.createReadStream(emojiPath);
const size = await probeImageSize(file);
file.destroy();
logger.info(`emoji size: ${size.width}x${size.height}`);
await Emojis.insert({
id: genId(),
updatedAt: new Date(),
name: name,
category: categoryName,
host: null,
aliases: [],
originalUrl: driveFile.url,
publicUrl: driveFile.webpublicUrl ?? driveFile.url,
type: driveFile.webpublicType ?? driveFile.type,
license: null,
width: size.width || null,
height: size.height || null,
}).then((x) => Emojis.findOneByOrFail(x.identifiers[0]));
}
}
await db.queryResultCache!.remove(["meta_emojis"]);
cleanup();
logger.succ("Imported");
done();
});
logger.succ(`Unzipping to ${outputPath}`);
}

View file

@ -1,15 +0,0 @@
import * as Post from "@/misc/post.js";
import create from "@/services/note/create.js";
import { Users } from "@/models/index.js";
import type { DbUserImportMastoPostJobData } from "@/queue/types.js";
import { queueLogger } from "../../logger.js";
import type Bull from "bull";
const logger = queueLogger.createSubLogger("import-firefish-post");
export async function importCkPost(
job: Bull.Job<DbUserImportMastoPostJobData>,
done: any,
): Promise<void> {
done();
}

View file

@ -1,116 +0,0 @@
import { IsNull } from "typeorm";
import follow from "@/services/following/create.js";
import * as Acct from "@/misc/acct.js";
import { resolveUser } from "@/remote/resolve-user.js";
import { downloadTextFile } from "@/misc/download-text-file.js";
import { isSelfHost, toPuny } from "@/misc/convert-host.js";
import { Users, DriveFiles } from "@/models/index.js";
import type { DbUserImportJobData } from "@/queue/types.js";
import { queueLogger } from "../../logger.js";
import type Bull from "bull";
const logger = queueLogger.createSubLogger("import-following");
export async function importFollowing(
job: Bull.Job<DbUserImportJobData>,
done: any,
): Promise<void> {
logger.info(`Importing following of ${job.data.user.id} ...`);
const user = await Users.findOneBy({ id: job.data.user.id });
if (user == null) {
done();
return;
}
const file = await DriveFiles.findOneBy({
id: job.data.fileId,
});
if (file == null) {
done();
return;
}
const csv = await downloadTextFile(file.url);
let linenum = 0;
if (file.type.endsWith("json")) {
for (const acct of JSON.parse(csv)) {
try {
const { username, host } = Acct.parse(acct);
let target = isSelfHost(host!)
? await Users.findOneBy({
host: IsNull(),
usernameLower: username.toLowerCase(),
})
: await Users.findOneBy({
host: toPuny(host!),
usernameLower: username.toLowerCase(),
});
if (host == null && target == null) continue;
if (target == null) {
target = await resolveUser(username, host);
}
if (target == null) {
throw new Error(`cannot resolve user: @${username}@${host}`);
}
// skip myself
if (target.id === job.data.user.id) continue;
logger.info(`Follow[${linenum}] ${target.id} ...`);
follow(user, target);
} catch (e) {
logger.warn(`Error in line:${linenum} ${e}`);
}
}
} else {
for (const line of csv.trim().split("\n")) {
linenum++;
try {
const acct = line.split(",")[0].trim();
const { username, host } = Acct.parse(acct);
let target = isSelfHost(host!)
? await Users.findOneBy({
host: IsNull(),
usernameLower: username.toLowerCase(),
})
: await Users.findOneBy({
host: toPuny(host!),
usernameLower: username.toLowerCase(),
});
if (host == null && target == null) continue;
if (target == null) {
target = await resolveUser(username, host);
}
if (target == null) {
throw new Error(`cannot resolve user: @${username}@${host}`);
}
// skip myself
if (target.id === job.data.user.id) continue;
logger.info(`Follow[${linenum}] ${target.id} ...`);
follow(user, target);
} catch (e) {
logger.warn(`Error in line:${linenum} ${e}`);
}
}
}
logger.succ("Imported");
done();
}

View file

@ -1,19 +0,0 @@
import create from "@/services/note/create.js";
import { Users } from "@/models/index.js";
import type { DbUserImportMastoPostJobData } from "@/queue/types.js";
import { queueLogger } from "../../logger.js";
import type Bull from "bull";
import { htmlToMfm } from "@/remote/activitypub/misc/html-to-mfm.js";
import { resolveNote } from "@/remote/activitypub/models/note.js";
import { Note } from "@/models/entities/note.js";
import { uploadFromUrl } from "@/services/drive/upload-from-url.js";
import type { DriveFile } from "@/models/entities/drive-file.js";
const logger = queueLogger.createSubLogger("import-masto-post");
export async function importMastoPost(
job: Bull.Job<DbUserImportMastoPostJobData>,
done: any,
): Promise<void> {
done();
}

View file

@ -1,89 +0,0 @@
import type Bull from "bull";
import { queueLogger } from "../../logger.js";
import * as Acct from "@/misc/acct.js";
import { resolveUser } from "@/remote/resolve-user.js";
import { downloadTextFile } from "@/misc/download-text-file.js";
import { isSelfHost, toPuny } from "@/misc/convert-host.js";
import { Users, DriveFiles, Mutings } from "@/models/index.js";
import type { DbUserImportJobData } from "@/queue/types.js";
import type { User } from "@/models/entities/user.js";
import { genId } from "@/misc/gen-id.js";
import { IsNull } from "typeorm";
const logger = queueLogger.createSubLogger("import-muting");
export async function importMuting(
job: Bull.Job<DbUserImportJobData>,
done: any,
): Promise<void> {
logger.info(`Importing muting of ${job.data.user.id} ...`);
const user = await Users.findOneBy({ id: job.data.user.id });
if (user == null) {
done();
return;
}
const file = await DriveFiles.findOneBy({
id: job.data.fileId,
});
if (file == null) {
done();
return;
}
const csv = await downloadTextFile(file.url);
let linenum = 0;
for (const line of csv.trim().split("\n")) {
linenum++;
try {
const acct = line.split(",")[0].trim();
const { username, host } = Acct.parse(acct);
let target = isSelfHost(host!)
? await Users.findOneBy({
host: IsNull(),
usernameLower: username.toLowerCase(),
})
: await Users.findOneBy({
host: toPuny(host!),
usernameLower: username.toLowerCase(),
});
if (host == null && target == null) continue;
if (target == null) {
target = await resolveUser(username, host);
}
if (target == null) {
throw new Error(`cannot resolve user: @${username}@${host}`);
}
// skip myself
if (target.id === job.data.user.id) continue;
logger.info(`Mute[${linenum}] ${target.id} ...`);
await mute(user, target);
} catch (e) {
logger.warn(`Error in line:${linenum} ${e}`);
}
}
logger.succ("Imported");
done();
}
async function mute(user: User, target: User) {
await Mutings.insert({
id: genId(),
createdAt: new Date(),
muterId: user.id,
muteeId: target.id,
});
}

View file

@ -1,76 +0,0 @@
import { downloadTextFile } from "@/misc/download-text-file.js";
import { processMastoNotes } from "@/misc/process-masto-notes.js";
import { Users, DriveFiles } from "@/models/index.js";
import type { DbUserImportPostsJobData } from "@/queue/types.js";
import { queueLogger } from "../../logger.js";
import type Bull from "bull";
import {
createImportCkPostJob,
createImportMastoPostJob,
} from "@/queue/index.js";
const logger = queueLogger.createSubLogger("import-posts");
export async function importPosts(
job: Bull.Job<DbUserImportPostsJobData>,
done: any,
): Promise<void> {
logger.info(`Importing posts of ${job.data.user.id} ...`);
const user = await Users.findOneBy({ id: job.data.user.id });
if (user == null) {
done();
return;
}
const file = await DriveFiles.findOneBy({
id: job.data.fileId,
});
if (file == null) {
done();
return;
}
if (file.name.endsWith("tar.gz") || file.name.endsWith("zip")) {
try {
logger.info("Reading Mastodon archive");
const outbox = await processMastoNotes(
file.name,
file.url,
job.data.user.id,
);
for (const post of outbox.orderedItems) {
createImportMastoPostJob(job.data.user, post, job.data.signatureCheck);
}
} catch (e) {
// handle error
logger.warn(`Failed reading Mastodon archive: ${e}`);
}
logger.succ("Mastodon archive imported");
done();
return;
}
const json = await downloadTextFile(file.url);
try {
const parsed = JSON.parse(json);
if (parsed instanceof Array) {
logger.info("Parsing key style posts");
for (const post of JSON.parse(json)) {
createImportCkPostJob(job.data.user, post, job.data.signatureCheck);
}
} else if (parsed instanceof Object) {
logger.info("Parsing animal style posts");
for (const post of parsed.orderedItems) {
createImportMastoPostJob(job.data.user, post, job.data.signatureCheck);
}
}
} catch (e) {
// handle error
logger.warn(`Error reading: ${e}`);
}
logger.succ("Imported");
done();
}

View file

@ -1,111 +0,0 @@
import type Bull from "bull";
import { queueLogger } from "../../logger.js";
import * as Acct from "@/misc/acct.js";
import { resolveUser } from "@/remote/resolve-user.js";
import { pushUserToUserList } from "@/services/user-list/push.js";
import { downloadTextFile } from "@/misc/download-text-file.js";
import { isSelfHost, toPuny } from "@/misc/convert-host.js";
import {
DriveFiles,
Users,
UserLists,
UserListJoinings, Blockings, Followings,
} from "@/models/index.js";
import { genId } from "@/misc/gen-id.js";
import type { DbUserImportJobData } from "@/queue/types.js";
import { IsNull } from "typeorm";
const logger = queueLogger.createSubLogger("import-user-lists");
export async function importUserLists(
job: Bull.Job<DbUserImportJobData>,
done: any,
): Promise<void> {
logger.info(`Importing user lists of ${job.data.user.id} ...`);
const user = await Users.findOneBy({ id: job.data.user.id });
if (user == null) {
done();
return;
}
const file = await DriveFiles.findOneBy({
id: job.data.fileId,
});
if (file == null) {
done();
return;
}
const csv = await downloadTextFile(file.url);
let linenum = 0;
for (const line of csv.trim().split("\n")) {
linenum++;
try {
const listName = line.split(",")[0].trim();
const { username, host } = Acct.parse(line.split(",")[1].trim());
let list = await UserLists.findOneBy({
userId: user.id,
name: listName,
});
if (list == null) {
list = await UserLists.insert({
id: genId(),
createdAt: new Date(),
userId: user.id,
name: listName,
}).then((x) => UserLists.findOneByOrFail(x.identifiers[0]));
}
let target = isSelfHost(host!)
? await Users.findOneBy({
host: IsNull(),
usernameLower: username.toLowerCase(),
})
: await Users.findOneBy({
host: toPuny(host!),
usernameLower: username.toLowerCase(),
});
if (target == null) {
target = await resolveUser(username, host);
}
const isBlocked = await Blockings.exist({
where: {
blockerId: target.id,
blockeeId: user.id,
},
});
const isFollowed = await Followings.exist({
where: {
followerId: user.id,
followeeId: target.id,
},
});
if (isBlocked || !isFollowed) continue;
if (
(await UserListJoinings.findOneBy({
userListId: list!.id,
userId: target.id,
})) != null
)
continue;
pushUserToUserList(target, list!);
} catch (e) {
logger.warn(`Error in line:${linenum} ${e}`);
}
}
logger.succ("Imported");
done();
}

View file

@ -1,47 +0,0 @@
import type Bull from "bull";
import type { DbJobData } from "@/queue/types.js";
import { deleteDriveFiles } from "./delete-drive-files.js";
import { exportCustomEmojis } from "./export-custom-emojis.js";
import { exportNotes } from "./export-notes.js";
import { exportFollowing } from "./export-following.js";
import { exportMute } from "./export-mute.js";
import { exportBlocking } from "./export-blocking.js";
import { exportUserLists } from "./export-user-lists.js";
import { importFollowing } from "./import-following.js";
import { importUserLists } from "./import-user-lists.js";
import { deleteAccount } from "./delete-account.js";
import { importMuting } from "./import-muting.js";
import { importPosts } from "./import-posts.js";
import { importMastoPost } from "./import-masto-post.js";
import { importCkPost } from "./import-firefish-post.js";
import { importBlocking } from "./import-blocking.js";
import { importCustomEmojis } from "./import-custom-emojis.js";
const jobs = {
deleteDriveFiles,
exportCustomEmojis,
exportNotes,
exportFollowing,
exportMute,
exportBlocking,
exportUserLists,
importFollowing,
importMuting,
importBlocking,
importUserLists,
importPosts,
importMastoPost,
importCkPost,
importCustomEmojis,
deleteAccount,
} as Record<
string,
| Bull.ProcessCallbackFunction<DbJobData>
| Bull.ProcessPromiseFunction<DbJobData>
>;
export default function (dbQueue: Bull.Queue<DbJobData>) {
for (const [k, v] of Object.entries(jobs)) {
dbQueue.process(k, v);
}
}

View file

@ -1,61 +0,0 @@
import define from "../../../define.js";
import { ApiError } from "../../../error.js";
import { DriveFiles, Notes } from "@/models/index.js";
export const meta = {
tags: ["drive", "notes"],
requireCredential: true,
kind: "read:drive",
description: "Find the notes to which the given file is attached.",
res: {
type: "array",
optional: false,
nullable: false,
items: {
type: "object",
optional: false,
nullable: false,
ref: "Note",
},
},
errors: {
noSuchFile: {
message: "No such file.",
code: "NO_SUCH_FILE",
id: "c118ece3-2e4b-4296-99d1-51756e32d232",
},
},
} as const;
export const paramDef = {
type: "object",
properties: {
fileId: { type: "string", format: "misskey:id" },
},
required: ["fileId"],
} as const;
export default define(meta, paramDef, async (ps, user) => {
// Fetch file
const file = await DriveFiles.findOneBy({
id: ps.fileId,
userId: user.id,
});
if (file == null) {
throw new ApiError(meta.errors.noSuchFile);
}
const notes = await Notes.createQueryBuilder("note")
.where(":file = ANY(note.fileIds)", { file: file.id })
.getMany();
return await Notes.packMany(notes, user, {
detail: true,
});
});

View file

@ -1,42 +0,0 @@
import define from "../../../define.js";
import { createWorker } from "tesseract.js";
export const meta = {
tags: ["drive"],
requireCredential: true,
kind: "read:drive",
description: "Return caption of image",
res: {
type: "string",
optional: false,
nullable: false,
},
} as const;
export const paramDef = {
type: "object",
properties: {
url: { type: "string" },
},
required: ["url"],
} as const;
export default define(meta, paramDef, async (ps) => {
const worker = createWorker({
logger: (m) => console.log(m),
});
await worker.load();
await worker.loadLanguage("eng");
await worker.initialize("eng");
const {
data: { text },
} = await worker.recognize(ps.url);
await worker.terminate();
return text;
});

View file

@ -1,37 +0,0 @@
import define from "../../../define.js";
import { DriveFiles } from "@/models/index.js";
export const meta = {
tags: ["drive"],
requireCredential: true,
kind: "read:drive",
description: "Check if a given file exists.",
res: {
type: "boolean",
optional: false,
nullable: false,
},
} as const;
export const paramDef = {
type: "object",
properties: {
md5: { type: "string" },
},
required: ["md5"],
} as const;
export default define(meta, paramDef, async (ps, user) => {
const exist = await DriveFiles.exist({
where: {
md5: ps.md5,
userId: user.id,
},
});
return exist;
});

View file

@ -1,129 +0,0 @@
import { addFile } from "@/services/drive/add-file.js";
import { DriveFiles } from "@/models/index.js";
import { DB_MAX_IMAGE_COMMENT_LENGTH } from "@/misc/hard-limits.js";
import { IdentifiableError } from "@/misc/identifiable-error.js";
import { fetchMeta } from "@/misc/fetch-meta.js";
import { HOUR } from "@/const.js";
import define from "../../../define.js";
import { apiLogger } from "../../../logger.js";
import { ApiError } from "../../../error.js";
export const meta = {
tags: ["drive"],
requireCredential: true,
limit: {
duration: HOUR,
max: 120,
},
requireFile: true,
kind: "write:drive",
description: "Upload a new drive file.",
res: {
type: "object",
optional: false,
nullable: false,
ref: "DriveFile",
},
errors: {
invalidFileName: {
message: "Invalid file name.",
code: "INVALID_FILE_NAME",
id: "f449b209-0c60-4e51-84d5-29486263bfd4",
},
inappropriate: {
message:
"Cannot upload the file because it has been determined that it possibly contains inappropriate content.",
code: "INAPPROPRIATE",
id: "bec5bd69-fba3-43c9-b4fb-2894b66ad5d2",
},
noFreeSpace: {
message:
"Cannot upload the file because you have no free space of drive.",
code: "NO_FREE_SPACE",
id: "d08dbc37-a6a9-463a-8c47-96c32ab5f064",
},
},
} as const;
export const paramDef = {
type: "object",
properties: {
folderId: {
type: "string",
format: "misskey:id",
nullable: true,
default: null,
},
name: { type: "string", nullable: true, default: null },
comment: {
type: "string",
nullable: true,
maxLength: DB_MAX_IMAGE_COMMENT_LENGTH,
default: null,
},
isSensitive: { type: "boolean", default: false },
force: { type: "boolean", default: false },
},
required: [],
} as const;
export default define(
meta,
paramDef,
async (ps, user, _, file, cleanup, ip, headers) => {
// Get 'name' parameter
let name = ps.name || file.originalname;
if (name !== undefined && name !== null) {
name = name.trim();
if (name.length === 0) {
name = null;
} else if (name === "blob") {
name = null;
} else if (!DriveFiles.validateFileName(name)) {
throw new ApiError(meta.errors.invalidFileName);
}
} else {
name = null;
}
const meta = await fetchMeta();
try {
// Create file
const driveFile = await addFile({
user,
path: file.path,
name,
comment: ps.comment,
folderId: ps.folderId,
force: ps.force,
sensitive: ps.isSensitive,
requestIp: meta.enableIpLogging ? ip : null,
requestHeaders: meta.enableIpLogging ? headers : null,
});
return await DriveFiles.pack(driveFile, { self: true });
} catch (e) {
if (e instanceof Error || typeof e === "string") {
apiLogger.error(e);
}
if (e instanceof IdentifiableError) {
if (e.id === "282f77bf-5816-4f72-9264-aa14d8261a21")
throw new ApiError(meta.errors.inappropriate);
if (e.id === "c6244ed2-a39a-4e1c-bf93-f0fbd7764fa6")
throw new ApiError(meta.errors.noFreeSpace);
}
throw new ApiError();
} finally {
cleanup!();
}
},
);

View file

@ -1,55 +0,0 @@
import { deleteFile } from "@/services/drive/delete-file.js";
import { publishDriveStream } from "@/services/stream.js";
import define from "../../../define.js";
import { ApiError } from "../../../error.js";
import { DriveFiles, Users } from "@/models/index.js";
export const meta = {
tags: ["drive"],
requireCredential: true,
kind: "write:drive",
description: "Delete an existing drive file.",
errors: {
noSuchFile: {
message: "No such file.",
code: "NO_SUCH_FILE",
id: "908939ec-e52b-4458-b395-1025195cea58",
},
accessDenied: {
message: "Access denied.",
code: "ACCESS_DENIED",
id: "5eb8d909-2540-4970-90b8-dd6f86088121",
},
},
} as const;
export const paramDef = {
type: "object",
properties: {
fileId: { type: "string", format: "misskey:id" },
},
required: ["fileId"],
} as const;
export default define(meta, paramDef, async (ps, user) => {
const file = await DriveFiles.findOneBy({ id: ps.fileId });
if (file == null) {
throw new ApiError(meta.errors.noSuchFile);
}
if (!(user.isAdmin || user.isModerator) && file.userId !== user.id) {
throw new ApiError(meta.errors.accessDenied);
}
// Delete
await deleteFile(file);
// Publish fileDeleted event
publishDriveStream(user.id, "fileDeleted", file.id);
});

View file

@ -1,41 +0,0 @@
import { DriveFiles } from "@/models/index.js";
import define from "../../../define.js";
export const meta = {
tags: ["drive"],
requireCredential: true,
kind: "read:drive",
description: "Search for a drive file by a hash of the contents.",
res: {
type: "array",
optional: false,
nullable: false,
items: {
type: "object",
optional: false,
nullable: false,
ref: "DriveFile",
},
},
} as const;
export const paramDef = {
type: "object",
properties: {
md5: { type: "string" },
},
required: ["md5"],
} as const;
export default define(meta, paramDef, async (ps, user) => {
const files = await DriveFiles.findBy({
md5: ps.md5,
userId: user.id,
});
return await DriveFiles.packMany(files, { self: true });
});

View file

@ -1,51 +0,0 @@
import define from "../../../define.js";
import { DriveFiles } from "@/models/index.js";
import { IsNull } from "typeorm";
export const meta = {
requireCredential: true,
tags: ["drive"],
kind: "read:drive",
description: "Search for a drive file by the given parameters.",
res: {
type: "array",
optional: false,
nullable: false,
items: {
type: "object",
optional: false,
nullable: false,
ref: "DriveFile",
},
},
} as const;
export const paramDef = {
type: "object",
properties: {
name: { type: "string" },
folderId: {
type: "string",
format: "misskey:id",
nullable: true,
default: null,
},
},
required: ["name"],
} as const;
export default define(meta, paramDef, async (ps, user) => {
const files = await DriveFiles.findBy({
name: ps.name,
userId: user.id,
folderId: ps.folderId ?? IsNull(),
});
return await Promise.all(
files.map((file) => DriveFiles.pack(file, { self: true })),
);
});

View file

@ -1,89 +0,0 @@
import type { DriveFile } from "@/models/entities/drive-file.js";
import { DriveFiles, Users } from "@/models/index.js";
import define from "../../../define.js";
import { ApiError } from "../../../error.js";
export const meta = {
tags: ["drive"],
requireCredential: true,
kind: "read:drive",
description: "Show the properties of a drive file.",
res: {
type: "object",
optional: false,
nullable: false,
ref: "DriveFile",
},
errors: {
noSuchFile: {
message: "No such file.",
code: "NO_SUCH_FILE",
id: "067bc436-2718-4795-b0fb-ecbe43949e31",
},
accessDenied: {
message: "Access denied.",
code: "ACCESS_DENIED",
id: "25b73c73-68b1-41d0-bad1-381cfdf6579f",
},
},
} as const;
export const paramDef = {
type: "object",
anyOf: [
{
properties: {
fileId: { type: "string", format: "misskey:id" },
},
required: ["fileId"],
},
{
properties: {
url: { type: "string" },
},
required: ["url"],
},
],
} as const;
export default define(meta, paramDef, async (ps, user) => {
let file: DriveFile | null = null;
if (ps.fileId) {
file = await DriveFiles.findOneBy({ id: ps.fileId });
} else if (ps.url) {
file = await DriveFiles.findOne({
where: [
{
url: ps.url,
},
{
webpublicUrl: ps.url,
},
{
thumbnailUrl: ps.url,
},
],
});
}
if (file == null) {
throw new ApiError(meta.errors.noSuchFile);
}
if (!(user.isAdmin || user.isModerator) && file.userId !== user.id) {
throw new ApiError(meta.errors.accessDenied);
}
return await DriveFiles.pack(file, {
detail: true,
withUser: true,
self: true,
});
});

View file

@ -1,116 +0,0 @@
import { publishDriveStream } from "@/services/stream.js";
import { DriveFiles, DriveFolders, Users } from "@/models/index.js";
import { DB_MAX_IMAGE_COMMENT_LENGTH } from "@/misc/hard-limits.js";
import define from "../../../define.js";
import { ApiError } from "../../../error.js";
export const meta = {
tags: ["drive"],
requireCredential: true,
kind: "write:drive",
description: "Update the properties of a drive file.",
errors: {
invalidFileName: {
message: "Invalid file name.",
code: "INVALID_FILE_NAME",
id: "395e7156-f9f0-475e-af89-53c3c23080c2",
},
noSuchFile: {
message: "No such file.",
code: "NO_SUCH_FILE",
id: "e7778c7e-3af9-49cd-9690-6dbc3e6c972d",
},
accessDenied: {
message: "Access denied.",
code: "ACCESS_DENIED",
id: "01a53b27-82fc-445b-a0c1-b558465a8ed2",
},
noSuchFolder: {
message: "No such folder.",
code: "NO_SUCH_FOLDER",
id: "ea8fb7a5-af77-4a08-b608-c0218176cd73",
},
},
res: {
type: "object",
optional: false,
nullable: false,
ref: "DriveFile",
},
} as const;
export const paramDef = {
type: "object",
properties: {
fileId: { type: "string", format: "misskey:id" },
folderId: { type: "string", format: "misskey:id", nullable: true },
name: { type: "string" },
isSensitive: { type: "boolean" },
comment: {
type: "string",
nullable: true,
maxLength: DB_MAX_IMAGE_COMMENT_LENGTH,
},
},
required: ["fileId"],
} as const;
export default define(meta, paramDef, async (ps, user) => {
const file = await DriveFiles.findOneBy({ id: ps.fileId });
if (file == null) {
throw new ApiError(meta.errors.noSuchFile);
}
if (!(user.isAdmin || user.isModerator) && file.userId !== user.id) {
throw new ApiError(meta.errors.accessDenied);
}
if (ps.name) file.name = ps.name;
if (!DriveFiles.validateFileName(file.name)) {
throw new ApiError(meta.errors.invalidFileName);
}
if (ps.comment !== undefined) file.comment = ps.comment;
if (ps.isSensitive !== undefined) file.isSensitive = ps.isSensitive;
if (ps.folderId !== undefined) {
if (ps.folderId === null) {
file.folderId = null;
} else {
const folder = await DriveFolders.findOneBy({
id: ps.folderId,
userId: user.id,
});
if (folder == null) {
throw new ApiError(meta.errors.noSuchFolder);
}
file.folderId = folder.id;
}
}
await DriveFiles.update(file.id, {
name: file.name,
comment: file.comment,
folderId: file.folderId,
isSensitive: file.isSensitive,
});
const fileObj = await DriveFiles.pack(file, { self: true });
// Publish fileUpdated event
publishDriveStream(user.id, "fileUpdated", fileObj);
return fileObj;
});

View file

@ -1,57 +0,0 @@
import { uploadFromUrl } from "@/services/drive/upload-from-url.js";
import define from "../../../define.js";
import { DriveFiles } from "@/models/index.js";
import { publishMainStream } from "@/services/stream.js";
import { HOUR } from "@/const.js";
export const meta = {
tags: ["drive"],
limit: {
duration: HOUR,
max: 60,
},
description:
"Request the server to download a new drive file from the specified URL.",
requireCredential: true,
kind: "write:drive",
} as const;
export const paramDef = {
type: "object",
properties: {
url: { type: "string" },
folderId: {
type: "string",
format: "misskey:id",
nullable: true,
default: null,
},
isSensitive: { type: "boolean", default: false },
comment: { type: "string", nullable: true, maxLength: 512, default: null },
marker: { type: "string", nullable: true, default: null },
force: { type: "boolean", default: false },
},
required: ["url"],
} as const;
export default define(meta, paramDef, async (ps, user) => {
uploadFromUrl({
url: ps.url,
user,
folderId: ps.folderId,
sensitive: ps.isSensitive,
force: ps.force,
comment: ps.comment,
}).then((file) => {
DriveFiles.pack(file, { self: true }).then((packedFile) => {
publishMainStream(user.id, "urlUploadFinished", {
marker: ps.marker,
file: packedFile,
});
});
});
});

File diff suppressed because it is too large Load diff

View file

@ -1,14 +1,14 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [Acct](./iceshrimp-js.acct.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [Acct](./iceshrimp-js.acct.md)
## Acct type ## Acct type
**Signature:** **Signature:**
```typescript ```typescript
export declare type Acct = { export declare type Acct = {
username: string; username: string;
host: string | null; host: string | null;
}; };
``` ```

View file

@ -1,24 +1,24 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [api](./iceshrimp-js.api.md) &gt; [APIClient](./iceshrimp-js.api.apiclient.md) &gt; [(constructor)](./iceshrimp-js.api.apiclient._constructor_.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [api](./iceshrimp-js.api.md) &gt; [APIClient](./iceshrimp-js.api.apiclient.md) &gt; [(constructor)](./iceshrimp-js.api.apiclient._constructor_.md)
## api.APIClient.(constructor) ## api.APIClient.(constructor)
Constructs a new instance of the `APIClient` class Constructs a new instance of the `APIClient` class
**Signature:** **Signature:**
```typescript ```typescript
constructor(opts: { constructor(opts: {
origin: APIClient["origin"]; origin: APIClient["origin"];
credential?: APIClient["credential"]; credential?: APIClient["credential"];
fetch?: APIClient["fetch"] | null | undefined; fetch?: APIClient["fetch"] | null | undefined;
}); });
``` ```
## Parameters ## Parameters
| Parameter | Type | Description | | Parameter | Type | Description |
| --- | --- | --- | | --- | --- | --- |
| opts | { origin: [APIClient](./iceshrimp-js.api.apiclient.md)<!-- -->\["origin"\]; credential?: [APIClient](./iceshrimp-js.api.apiclient.md)<!-- -->\["credential"\]; fetch?: [APIClient](./iceshrimp-js.api.apiclient.md)<!-- -->\["fetch"\] \| null \| undefined; } | | | opts | { origin: [APIClient](./iceshrimp-js.api.apiclient.md)<!-- -->\["origin"\]; credential?: [APIClient](./iceshrimp-js.api.apiclient.md)<!-- -->\["credential"\]; fetch?: [APIClient](./iceshrimp-js.api.apiclient.md)<!-- -->\["fetch"\] \| null \| undefined; } | |

View file

@ -1,11 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [api](./iceshrimp-js.api.md) &gt; [APIClient](./iceshrimp-js.api.apiclient.md) &gt; [credential](./iceshrimp-js.api.apiclient.credential.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [api](./iceshrimp-js.api.md) &gt; [APIClient](./iceshrimp-js.api.apiclient.md) &gt; [credential](./iceshrimp-js.api.apiclient.credential.md)
## api.APIClient.credential property ## api.APIClient.credential property
**Signature:** **Signature:**
```typescript ```typescript
credential: string | null | undefined; credential: string | null | undefined;
``` ```

View file

@ -1,11 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [api](./iceshrimp-js.api.md) &gt; [APIClient](./iceshrimp-js.api.apiclient.md) &gt; [fetch](./iceshrimp-js.api.apiclient.fetch.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [api](./iceshrimp-js.api.md) &gt; [APIClient](./iceshrimp-js.api.apiclient.md) &gt; [fetch](./iceshrimp-js.api.apiclient.fetch.md)
## api.APIClient.fetch property ## api.APIClient.fetch property
**Signature:** **Signature:**
```typescript ```typescript
fetch: FetchLike; fetch: FetchLike;
``` ```

View file

@ -1,32 +1,32 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [api](./iceshrimp-js.api.md) &gt; [APIClient](./iceshrimp-js.api.apiclient.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [api](./iceshrimp-js.api.md) &gt; [APIClient](./iceshrimp-js.api.apiclient.md)
## api.APIClient class ## api.APIClient class
**Signature:** **Signature:**
```typescript ```typescript
export declare class APIClient export declare class APIClient
``` ```
## Constructors ## Constructors
| Constructor | Modifiers | Description | | Constructor | Modifiers | Description |
| --- | --- | --- | | --- | --- | --- |
| [(constructor)(opts)](./iceshrimp-js.api.apiclient._constructor_.md) | | Constructs a new instance of the <code>APIClient</code> class | | [(constructor)(opts)](./iceshrimp-js.api.apiclient._constructor_.md) | | Constructs a new instance of the <code>APIClient</code> class |
## Properties ## Properties
| Property | Modifiers | Type | Description | | Property | Modifiers | Type | Description |
| --- | --- | --- | --- | | --- | --- | --- | --- |
| [credential](./iceshrimp-js.api.apiclient.credential.md) | | string \| null \| undefined | | | [credential](./iceshrimp-js.api.apiclient.credential.md) | | string \| null \| undefined | |
| [fetch](./iceshrimp-js.api.apiclient.fetch.md) | | [FetchLike](./iceshrimp-js.api.fetchlike.md) | | | [fetch](./iceshrimp-js.api.apiclient.fetch.md) | | [FetchLike](./iceshrimp-js.api.fetchlike.md) | |
| [origin](./iceshrimp-js.api.apiclient.origin.md) | | string | | | [origin](./iceshrimp-js.api.apiclient.origin.md) | | string | |
## Methods ## Methods
| Method | Modifiers | Description | | Method | Modifiers | Description |
| --- | --- | --- | | --- | --- | --- |
| [request(endpoint, params, credential)](./iceshrimp-js.api.apiclient.request.md) | | | | [request(endpoint, params, credential)](./iceshrimp-js.api.apiclient.request.md) | | |

View file

@ -1,11 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [api](./iceshrimp-js.api.md) &gt; [APIClient](./iceshrimp-js.api.apiclient.md) &gt; [origin](./iceshrimp-js.api.apiclient.origin.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [api](./iceshrimp-js.api.md) &gt; [APIClient](./iceshrimp-js.api.apiclient.md) &gt; [origin](./iceshrimp-js.api.apiclient.origin.md)
## api.APIClient.origin property ## api.APIClient.origin property
**Signature:** **Signature:**
```typescript ```typescript
origin: string; origin: string;
``` ```

View file

@ -1,57 +1,57 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [api](./iceshrimp-js.api.md) &gt; [APIClient](./iceshrimp-js.api.apiclient.md) &gt; [request](./iceshrimp-js.api.apiclient.request.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [api](./iceshrimp-js.api.md) &gt; [APIClient](./iceshrimp-js.api.apiclient.md) &gt; [request](./iceshrimp-js.api.apiclient.request.md)
## api.APIClient.request() method ## api.APIClient.request() method
**Signature:** **Signature:**
```typescript ```typescript
request<E extends keyof Endpoints, P extends Endpoints[E]["req"]>( request<E extends keyof Endpoints, P extends Endpoints[E]["req"]>(
endpoint: E, endpoint: E,
params?: P, params?: P,
credential?: string | null | undefined, credential?: string | null | undefined,
): Promise< ): Promise<
Endpoints[E]["res"] extends { Endpoints[E]["res"] extends {
$switch: { $switch: {
$cases: [any, any][]; $cases: [any, any][];
$default: any; $default: any;
}; };
} }
? IsCaseMatched<E, P, 0> extends true ? IsCaseMatched<E, P, 0> extends true
? GetCaseResult<E, P, 0> ? GetCaseResult<E, P, 0>
: IsCaseMatched<E, P, 1> extends true : IsCaseMatched<E, P, 1> extends true
? GetCaseResult<E, P, 1> ? GetCaseResult<E, P, 1>
: IsCaseMatched<E, P, 2> extends true : IsCaseMatched<E, P, 2> extends true
? GetCaseResult<E, P, 2> ? GetCaseResult<E, P, 2>
: IsCaseMatched<E, P, 3> extends true : IsCaseMatched<E, P, 3> extends true
? GetCaseResult<E, P, 3> ? GetCaseResult<E, P, 3>
: IsCaseMatched<E, P, 4> extends true : IsCaseMatched<E, P, 4> extends true
? GetCaseResult<E, P, 4> ? GetCaseResult<E, P, 4>
: IsCaseMatched<E, P, 5> extends true : IsCaseMatched<E, P, 5> extends true
? GetCaseResult<E, P, 5> ? GetCaseResult<E, P, 5>
: IsCaseMatched<E, P, 6> extends true : IsCaseMatched<E, P, 6> extends true
? GetCaseResult<E, P, 6> ? GetCaseResult<E, P, 6>
: IsCaseMatched<E, P, 7> extends true : IsCaseMatched<E, P, 7> extends true
? GetCaseResult<E, P, 7> ? GetCaseResult<E, P, 7>
: IsCaseMatched<E, P, 8> extends true : IsCaseMatched<E, P, 8> extends true
? GetCaseResult<E, P, 8> ? GetCaseResult<E, P, 8>
: IsCaseMatched<E, P, 9> extends true : IsCaseMatched<E, P, 9> extends true
? GetCaseResult<E, P, 9> ? GetCaseResult<E, P, 9>
: Endpoints[E]["res"]["$switch"]["$default"] : Endpoints[E]["res"]["$switch"]["$default"]
: Endpoints[E]["res"] : Endpoints[E]["res"]
>; >;
``` ```
## Parameters ## Parameters
| Parameter | Type | Description | | Parameter | Type | Description |
| --- | --- | --- | | --- | --- | --- |
| endpoint | E | | | endpoint | E | |
| params | P | _(Optional)_ | | params | P | _(Optional)_ |
| credential | string \| null \| undefined | _(Optional)_ | | credential | string \| null \| undefined | _(Optional)_ |
**Returns:** **Returns:**
Promise&lt; [Endpoints](./iceshrimp-js.endpoints.md)<!-- -->\[E\]\["res"\] extends { $switch: { $cases: \[any, any\]\[\]; $default: any; }; } ? IsCaseMatched&lt;E, P, 0&gt; extends true ? GetCaseResult&lt;E, P, 0&gt; : IsCaseMatched&lt;E, P, 1&gt; extends true ? GetCaseResult&lt;E, P, 1&gt; : IsCaseMatched&lt;E, P, 2&gt; extends true ? GetCaseResult&lt;E, P, 2&gt; : IsCaseMatched&lt;E, P, 3&gt; extends true ? GetCaseResult&lt;E, P, 3&gt; : IsCaseMatched&lt;E, P, 4&gt; extends true ? GetCaseResult&lt;E, P, 4&gt; : IsCaseMatched&lt;E, P, 5&gt; extends true ? GetCaseResult&lt;E, P, 5&gt; : IsCaseMatched&lt;E, P, 6&gt; extends true ? GetCaseResult&lt;E, P, 6&gt; : IsCaseMatched&lt;E, P, 7&gt; extends true ? GetCaseResult&lt;E, P, 7&gt; : IsCaseMatched&lt;E, P, 8&gt; extends true ? GetCaseResult&lt;E, P, 8&gt; : IsCaseMatched&lt;E, P, 9&gt; extends true ? GetCaseResult&lt;E, P, 9&gt; : [Endpoints](./iceshrimp-js.endpoints.md)<!-- -->\[E\]\["res"\]\["$switch"\]\["$default"\] : [Endpoints](./iceshrimp-js.endpoints.md)<!-- -->\[E\]\["res"\] &gt; Promise&lt; [Endpoints](./iceshrimp-js.endpoints.md)<!-- -->\[E\]\["res"\] extends { $switch: { $cases: \[any, any\]\[\]; $default: any; }; } ? IsCaseMatched&lt;E, P, 0&gt; extends true ? GetCaseResult&lt;E, P, 0&gt; : IsCaseMatched&lt;E, P, 1&gt; extends true ? GetCaseResult&lt;E, P, 1&gt; : IsCaseMatched&lt;E, P, 2&gt; extends true ? GetCaseResult&lt;E, P, 2&gt; : IsCaseMatched&lt;E, P, 3&gt; extends true ? GetCaseResult&lt;E, P, 3&gt; : IsCaseMatched&lt;E, P, 4&gt; extends true ? GetCaseResult&lt;E, P, 4&gt; : IsCaseMatched&lt;E, P, 5&gt; extends true ? GetCaseResult&lt;E, P, 5&gt; : IsCaseMatched&lt;E, P, 6&gt; extends true ? GetCaseResult&lt;E, P, 6&gt; : IsCaseMatched&lt;E, P, 7&gt; extends true ? GetCaseResult&lt;E, P, 7&gt; : IsCaseMatched&lt;E, P, 8&gt; extends true ? GetCaseResult&lt;E, P, 8&gt; : IsCaseMatched&lt;E, P, 9&gt; extends true ? GetCaseResult&lt;E, P, 9&gt; : [Endpoints](./iceshrimp-js.endpoints.md)<!-- -->\[E\]\["res"\]\["$switch"\]\["$default"\] : [Endpoints](./iceshrimp-js.endpoints.md)<!-- -->\[E\]\["res"\] &gt;

View file

@ -1,17 +1,17 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [api](./iceshrimp-js.api.md) &gt; [APIError](./iceshrimp-js.api.apierror.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [api](./iceshrimp-js.api.md) &gt; [APIError](./iceshrimp-js.api.apierror.md)
## api.APIError type ## api.APIError type
**Signature:** **Signature:**
```typescript ```typescript
export declare type APIError = { export declare type APIError = {
id: string; id: string;
code: string; code: string;
message: string; message: string;
kind: "client" | "server"; kind: "client" | "server";
info: Record<string, any>; info: Record<string, any>;
}; };
``` ```

View file

@ -1,22 +1,22 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [api](./iceshrimp-js.api.md) &gt; [FetchLike](./iceshrimp-js.api.fetchlike.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [api](./iceshrimp-js.api.md) &gt; [FetchLike](./iceshrimp-js.api.fetchlike.md)
## api.FetchLike type ## api.FetchLike type
**Signature:** **Signature:**
```typescript ```typescript
export declare type FetchLike = ( export declare type FetchLike = (
input: string, input: string,
init?: { init?: {
method?: string; method?: string;
body?: string; body?: string;
credentials?: RequestCredentials; credentials?: RequestCredentials;
cache?: RequestCache; cache?: RequestCache;
}, },
) => Promise<{ ) => Promise<{
status: number; status: number;
json(): Promise<any>; json(): Promise<any>;
}>; }>;
``` ```

View file

@ -1,22 +1,22 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [api](./iceshrimp-js.api.md) &gt; [isAPIError](./iceshrimp-js.api.isapierror.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [api](./iceshrimp-js.api.md) &gt; [isAPIError](./iceshrimp-js.api.isapierror.md)
## api.isAPIError() function ## api.isAPIError() function
**Signature:** **Signature:**
```typescript ```typescript
export declare function isAPIError(reason: any): reason is APIError; export declare function isAPIError(reason: any): reason is APIError;
``` ```
## Parameters ## Parameters
| Parameter | Type | Description | | Parameter | Type | Description |
| --- | --- | --- | | --- | --- | --- |
| reason | any | | | reason | any | |
**Returns:** **Returns:**
reason is [APIError](./iceshrimp-js.api.apierror.md) reason is [APIError](./iceshrimp-js.api.apierror.md)

View file

@ -1,25 +1,25 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [api](./iceshrimp-js.api.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [api](./iceshrimp-js.api.md)
## api namespace ## api namespace
## Classes ## Classes
| Class | Description | | Class | Description |
| --- | --- | | --- | --- |
| [APIClient](./iceshrimp-js.api.apiclient.md) | | | [APIClient](./iceshrimp-js.api.apiclient.md) | |
## Functions ## Functions
| Function | Description | | Function | Description |
| --- | --- | | --- | --- |
| [isAPIError(reason)](./iceshrimp-js.api.isapierror.md) | | | [isAPIError(reason)](./iceshrimp-js.api.isapierror.md) | |
## Type Aliases ## Type Aliases
| Type Alias | Description | | Type Alias | Description |
| --- | --- | | --- | --- |
| [APIError](./iceshrimp-js.api.apierror.md) | | | [APIError](./iceshrimp-js.api.apierror.md) | |
| [FetchLike](./iceshrimp-js.api.fetchlike.md) | | | [FetchLike](./iceshrimp-js.api.fetchlike.md) | |

View file

@ -1,22 +1,22 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [ChannelConnection](./iceshrimp-js.channelconnection.md) &gt; [(constructor)](./iceshrimp-js.channelconnection._constructor_.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [ChannelConnection](./iceshrimp-js.channelconnection.md) &gt; [(constructor)](./iceshrimp-js.channelconnection._constructor_.md)
## ChannelConnection.(constructor) ## ChannelConnection.(constructor)
Constructs a new instance of the `Connection` class Constructs a new instance of the `Connection` class
**Signature:** **Signature:**
```typescript ```typescript
constructor(stream: Stream, channel: string, name?: string); constructor(stream: Stream, channel: string, name?: string);
``` ```
## Parameters ## Parameters
| Parameter | Type | Description | | Parameter | Type | Description |
| --- | --- | --- | | --- | --- | --- |
| stream | [Stream](./iceshrimp-js.stream.md) | | | stream | [Stream](./iceshrimp-js.stream.md) | |
| channel | string | | | channel | string | |
| name | string | _(Optional)_ | | name | string | _(Optional)_ |

View file

@ -1,11 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [ChannelConnection](./iceshrimp-js.channelconnection.md) &gt; [channel](./iceshrimp-js.channelconnection.channel.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [ChannelConnection](./iceshrimp-js.channelconnection.md) &gt; [channel](./iceshrimp-js.channelconnection.channel.md)
## ChannelConnection.channel property ## ChannelConnection.channel property
**Signature:** **Signature:**
```typescript ```typescript
channel: string; channel: string;
``` ```

View file

@ -1,15 +1,15 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [ChannelConnection](./iceshrimp-js.channelconnection.md) &gt; [dispose](./iceshrimp-js.channelconnection.dispose.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [ChannelConnection](./iceshrimp-js.channelconnection.md) &gt; [dispose](./iceshrimp-js.channelconnection.dispose.md)
## ChannelConnection.dispose() method ## ChannelConnection.dispose() method
**Signature:** **Signature:**
```typescript ```typescript
abstract dispose(): void; abstract dispose(): void;
``` ```
**Returns:** **Returns:**
void void

View file

@ -1,11 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [ChannelConnection](./iceshrimp-js.channelconnection.md) &gt; [id](./iceshrimp-js.channelconnection.id.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [ChannelConnection](./iceshrimp-js.channelconnection.md) &gt; [id](./iceshrimp-js.channelconnection.id.md)
## ChannelConnection.id property ## ChannelConnection.id property
**Signature:** **Signature:**
```typescript ```typescript
abstract id: string; abstract id: string;
``` ```

View file

@ -1,11 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [ChannelConnection](./iceshrimp-js.channelconnection.md) &gt; [inCount](./iceshrimp-js.channelconnection.incount.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [ChannelConnection](./iceshrimp-js.channelconnection.md) &gt; [inCount](./iceshrimp-js.channelconnection.incount.md)
## ChannelConnection.inCount property ## ChannelConnection.inCount property
**Signature:** **Signature:**
```typescript ```typescript
inCount: number; inCount: number;
``` ```

View file

@ -1,39 +1,39 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [ChannelConnection](./iceshrimp-js.channelconnection.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [ChannelConnection](./iceshrimp-js.channelconnection.md)
## ChannelConnection class ## ChannelConnection class
**Signature:** **Signature:**
```typescript ```typescript
export declare abstract class Connection< export declare abstract class Connection<
Channel extends AnyOf<Channels> = any, Channel extends AnyOf<Channels> = any,
> extends EventEmitter<Channel["events"]> > extends EventEmitter<Channel["events"]>
``` ```
**Extends:** EventEmitter&lt;Channel\["events"\]&gt; **Extends:** EventEmitter&lt;Channel\["events"\]&gt;
## Constructors ## Constructors
| Constructor | Modifiers | Description | | Constructor | Modifiers | Description |
| --- | --- | --- | | --- | --- | --- |
| [(constructor)(stream, channel, name)](./iceshrimp-js.channelconnection._constructor_.md) | | Constructs a new instance of the <code>Connection</code> class | | [(constructor)(stream, channel, name)](./iceshrimp-js.channelconnection._constructor_.md) | | Constructs a new instance of the <code>Connection</code> class |
## Properties ## Properties
| Property | Modifiers | Type | Description | | Property | Modifiers | Type | Description |
| --- | --- | --- | --- | | --- | --- | --- | --- |
| [channel](./iceshrimp-js.channelconnection.channel.md) | | string | | | [channel](./iceshrimp-js.channelconnection.channel.md) | | string | |
| [id](./iceshrimp-js.channelconnection.id.md) | <code>abstract</code> | string | | | [id](./iceshrimp-js.channelconnection.id.md) | <code>abstract</code> | string | |
| [inCount](./iceshrimp-js.channelconnection.incount.md) | | number | | | [inCount](./iceshrimp-js.channelconnection.incount.md) | | number | |
| [name?](./iceshrimp-js.channelconnection.name.md) | | string | _(Optional)_ | | [name?](./iceshrimp-js.channelconnection.name.md) | | string | _(Optional)_ |
| [outCount](./iceshrimp-js.channelconnection.outcount.md) | | number | | | [outCount](./iceshrimp-js.channelconnection.outcount.md) | | number | |
| [stream](./iceshrimp-js.channelconnection.stream.md) | <code>protected</code> | [Stream](./iceshrimp-js.stream.md) | | | [stream](./iceshrimp-js.channelconnection.stream.md) | <code>protected</code> | [Stream](./iceshrimp-js.stream.md) | |
## Methods ## Methods
| Method | Modifiers | Description | | Method | Modifiers | Description |
| --- | --- | --- | | --- | --- | --- |
| [dispose()](./iceshrimp-js.channelconnection.dispose.md) | <code>abstract</code> | | | [dispose()](./iceshrimp-js.channelconnection.dispose.md) | <code>abstract</code> | |
| [send(type, body)](./iceshrimp-js.channelconnection.send.md) | | | | [send(type, body)](./iceshrimp-js.channelconnection.send.md) | | |

View file

@ -1,11 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [ChannelConnection](./iceshrimp-js.channelconnection.md) &gt; [name](./iceshrimp-js.channelconnection.name.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [ChannelConnection](./iceshrimp-js.channelconnection.md) &gt; [name](./iceshrimp-js.channelconnection.name.md)
## ChannelConnection.name property ## ChannelConnection.name property
**Signature:** **Signature:**
```typescript ```typescript
name?: string; name?: string;
``` ```

View file

@ -1,11 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [ChannelConnection](./iceshrimp-js.channelconnection.md) &gt; [outCount](./iceshrimp-js.channelconnection.outcount.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [ChannelConnection](./iceshrimp-js.channelconnection.md) &gt; [outCount](./iceshrimp-js.channelconnection.outcount.md)
## ChannelConnection.outCount property ## ChannelConnection.outCount property
**Signature:** **Signature:**
```typescript ```typescript
outCount: number; outCount: number;
``` ```

View file

@ -1,26 +1,26 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [ChannelConnection](./iceshrimp-js.channelconnection.md) &gt; [send](./iceshrimp-js.channelconnection.send.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [ChannelConnection](./iceshrimp-js.channelconnection.md) &gt; [send](./iceshrimp-js.channelconnection.send.md)
## ChannelConnection.send() method ## ChannelConnection.send() method
**Signature:** **Signature:**
```typescript ```typescript
send<T extends keyof Channel["receives"]>( send<T extends keyof Channel["receives"]>(
type: T, type: T,
body: Channel["receives"][T], body: Channel["receives"][T],
): void; ): void;
``` ```
## Parameters ## Parameters
| Parameter | Type | Description | | Parameter | Type | Description |
| --- | --- | --- | | --- | --- | --- |
| type | T | | | type | T | |
| body | Channel\["receives"\]\[T\] | | | body | Channel\["receives"\]\[T\] | |
**Returns:** **Returns:**
void void

View file

@ -1,11 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [ChannelConnection](./iceshrimp-js.channelconnection.md) &gt; [stream](./iceshrimp-js.channelconnection.stream.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [ChannelConnection](./iceshrimp-js.channelconnection.md) &gt; [stream](./iceshrimp-js.channelconnection.stream.md)
## ChannelConnection.stream property ## ChannelConnection.stream property
**Signature:** **Signature:**
```typescript ```typescript
protected stream: Stream; protected stream: Stream;
``` ```

View file

@ -1,143 +1,143 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [Channels](./iceshrimp-js.channels.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [Channels](./iceshrimp-js.channels.md)
## Channels type ## Channels type
**Signature:** **Signature:**
```typescript ```typescript
export declare type Channels = { export declare type Channels = {
main: { main: {
params: null; params: null;
events: { events: {
notification: (payload: Notification) => void; notification: (payload: Notification) => void;
mention: (payload: Note) => void; mention: (payload: Note) => void;
reply: (payload: Note) => void; reply: (payload: Note) => void;
renote: (payload: Note) => void; renote: (payload: Note) => void;
follow: (payload: User) => void; follow: (payload: User) => void;
followed: (payload: User) => void; followed: (payload: User) => void;
unfollow: (payload: User) => void; unfollow: (payload: User) => void;
meUpdated: (payload: MeDetailed) => void; meUpdated: (payload: MeDetailed) => void;
pageEvent: (payload: PageEvent) => void; pageEvent: (payload: PageEvent) => void;
urlUploadFinished: (payload: { urlUploadFinished: (payload: {
marker: string; marker: string;
file: DriveFile; file: DriveFile;
}) => void; }) => void;
readAllNotifications: () => void; readAllNotifications: () => void;
unreadNotification: (payload: Notification) => void; unreadNotification: (payload: Notification) => void;
unreadMention: (payload: Note["id"]) => void; unreadMention: (payload: Note["id"]) => void;
readAllUnreadMentions: () => void; readAllUnreadMentions: () => void;
unreadSpecifiedNote: (payload: Note["id"]) => void; unreadSpecifiedNote: (payload: Note["id"]) => void;
readAllUnreadSpecifiedNotes: () => void; readAllUnreadSpecifiedNotes: () => void;
readAllMessagingMessages: () => void; readAllMessagingMessages: () => void;
messagingMessage: (payload: MessagingMessage) => void; messagingMessage: (payload: MessagingMessage) => void;
unreadMessagingMessage: (payload: MessagingMessage) => void; unreadMessagingMessage: (payload: MessagingMessage) => void;
readAllAntennas: () => void; readAllAntennas: () => void;
unreadAntenna: (payload: Antenna) => void; unreadAntenna: (payload: Antenna) => void;
readAllAnnouncements: () => void; readAllAnnouncements: () => void;
readAllChannels: () => void; readAllChannels: () => void;
unreadChannel: (payload: Note["id"]) => void; unreadChannel: (payload: Note["id"]) => void;
myTokenRegenerated: () => void; myTokenRegenerated: () => void;
reversiNoInvites: () => void; reversiNoInvites: () => void;
reversiInvited: (payload: FIXME) => void; reversiInvited: (payload: FIXME) => void;
signin: (payload: FIXME) => void; signin: (payload: FIXME) => void;
registryUpdated: (payload: { registryUpdated: (payload: {
scope?: string[]; scope?: string[];
key: string; key: string;
value: any | null; value: any | null;
}) => void; }) => void;
driveFileCreated: (payload: DriveFile) => void; driveFileCreated: (payload: DriveFile) => void;
readAntenna: (payload: Antenna) => void; readAntenna: (payload: Antenna) => void;
}; };
receives: null; receives: null;
}; };
homeTimeline: { homeTimeline: {
params: null; params: null;
events: { events: {
note: (payload: Note) => void; note: (payload: Note) => void;
}; };
receives: null; receives: null;
}; };
localTimeline: { localTimeline: {
params: null; params: null;
events: { events: {
note: (payload: Note) => void; note: (payload: Note) => void;
}; };
receives: null; receives: null;
}; };
hybridTimeline: { hybridTimeline: {
params: null; params: null;
events: { events: {
note: (payload: Note) => void; note: (payload: Note) => void;
}; };
receives: null; receives: null;
}; };
recommendedTimeline: { recommendedTimeline: {
params: null; params: null;
events: { events: {
note: (payload: Note) => void; note: (payload: Note) => void;
}; };
receives: null; receives: null;
}; };
globalTimeline: { globalTimeline: {
params: null; params: null;
events: { events: {
note: (payload: Note) => void; note: (payload: Note) => void;
}; };
receives: null; receives: null;
}; };
antenna: { antenna: {
params: { params: {
antennaId: Antenna["id"]; antennaId: Antenna["id"];
}; };
events: { events: {
note: (payload: Note) => void; note: (payload: Note) => void;
}; };
receives: null; receives: null;
}; };
messaging: { messaging: {
params: { params: {
otherparty?: User["id"] | null; otherparty?: User["id"] | null;
group?: UserGroup["id"] | null; group?: UserGroup["id"] | null;
}; };
events: { events: {
message: (payload: MessagingMessage) => void; message: (payload: MessagingMessage) => void;
deleted: (payload: MessagingMessage["id"]) => void; deleted: (payload: MessagingMessage["id"]) => void;
read: (payload: MessagingMessage["id"][]) => void; read: (payload: MessagingMessage["id"][]) => void;
typers: (payload: User[]) => void; typers: (payload: User[]) => void;
}; };
receives: { receives: {
read: { read: {
id: MessagingMessage["id"]; id: MessagingMessage["id"];
}; };
}; };
}; };
serverStats: { serverStats: {
params: null; params: null;
events: { events: {
stats: (payload: FIXME) => void; stats: (payload: FIXME) => void;
}; };
receives: { receives: {
requestLog: { requestLog: {
id: string | number; id: string | number;
length: number; length: number;
}; };
}; };
}; };
queueStats: { queueStats: {
params: null; params: null;
events: { events: {
stats: (payload: FIXME) => void; stats: (payload: FIXME) => void;
}; };
receives: { receives: {
requestLog: { requestLog: {
id: string | number; id: string | number;
length: number; length: number;
}; };
}; };
}; };
}; };
``` ```
**References:** [Note](./iceshrimp-js.entities.note.md)<!-- -->, [User](./iceshrimp-js.entities.user.md)<!-- -->, [MeDetailed](./iceshrimp-js.entities.medetailed.md)<!-- -->, [PageEvent](./iceshrimp-js.entities.pageevent.md)<!-- -->, [DriveFile](./iceshrimp-js.entities.drivefile.md)<!-- -->, [MessagingMessage](./iceshrimp-js.entities.messagingmessage.md)<!-- -->, [Antenna](./iceshrimp-js.entities.antenna.md)<!-- -->, [UserGroup](./iceshrimp-js.entities.usergroup.md) **References:** [Note](./iceshrimp-js.entities.note.md)<!-- -->, [User](./iceshrimp-js.entities.user.md)<!-- -->, [MeDetailed](./iceshrimp-js.entities.medetailed.md)<!-- -->, [PageEvent](./iceshrimp-js.entities.pageevent.md)<!-- -->, [DriveFile](./iceshrimp-js.entities.drivefile.md)<!-- -->, [MessagingMessage](./iceshrimp-js.entities.messagingmessage.md)<!-- -->, [Antenna](./iceshrimp-js.entities.antenna.md)<!-- -->, [UserGroup](./iceshrimp-js.entities.usergroup.md)

File diff suppressed because it is too large Load diff

View file

@ -1,11 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [Ad](./iceshrimp-js.entities.ad.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [Ad](./iceshrimp-js.entities.ad.md)
## entities.Ad type ## entities.Ad type
**Signature:** **Signature:**
```typescript ```typescript
export declare type Ad = TODO; export declare type Ad = TODO;
``` ```

View file

@ -1,21 +1,21 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [Announcement](./iceshrimp-js.entities.announcement.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [Announcement](./iceshrimp-js.entities.announcement.md)
## entities.Announcement type ## entities.Announcement type
**Signature:** **Signature:**
```typescript ```typescript
export declare type Announcement = { export declare type Announcement = {
id: ID; id: ID;
createdAt: DateString; createdAt: DateString;
updatedAt: DateString | null; updatedAt: DateString | null;
text: string; text: string;
title: string; title: string;
imageUrl: string | null; imageUrl: string | null;
isRead?: boolean; isRead?: boolean;
}; };
``` ```
**References:** [ID](./iceshrimp-js.entities.id.md)<!-- -->, [DateString](./iceshrimp-js.entities.datestring.md) **References:** [ID](./iceshrimp-js.entities.id.md)<!-- -->, [DateString](./iceshrimp-js.entities.datestring.md)

View file

@ -1,29 +1,29 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [Antenna](./iceshrimp-js.entities.antenna.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [Antenna](./iceshrimp-js.entities.antenna.md)
## entities.Antenna type ## entities.Antenna type
**Signature:** **Signature:**
```typescript ```typescript
export declare type Antenna = { export declare type Antenna = {
id: ID; id: ID;
createdAt: DateString; createdAt: DateString;
name: string; name: string;
keywords: string[][]; keywords: string[][];
excludeKeywords: string[][]; excludeKeywords: string[][];
src: "home" | "all" | "users" | "list" | "group" | "instances"; src: "home" | "all" | "users" | "list" | "group" | "instances";
userListId: ID | null; userListId: ID | null;
userGroupId: ID | null; userGroupId: ID | null;
users: string[]; users: string[];
instances: string[]; instances: string[];
caseSensitive: boolean; caseSensitive: boolean;
notify: boolean; notify: boolean;
withReplies: boolean; withReplies: boolean;
withFile: boolean; withFile: boolean;
hasUnreadNote: boolean; hasUnreadNote: boolean;
}; };
``` ```
**References:** [ID](./iceshrimp-js.entities.id.md)<!-- -->, [DateString](./iceshrimp-js.entities.datestring.md) **References:** [ID](./iceshrimp-js.entities.id.md)<!-- -->, [DateString](./iceshrimp-js.entities.datestring.md)

View file

@ -1,11 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [App](./iceshrimp-js.entities.app.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [App](./iceshrimp-js.entities.app.md)
## entities.App type ## entities.App type
**Signature:** **Signature:**
```typescript ```typescript
export declare type App = TODO; export declare type App = TODO;
``` ```

View file

@ -1,17 +1,17 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [AuthSession](./iceshrimp-js.entities.authsession.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [AuthSession](./iceshrimp-js.entities.authsession.md)
## entities.AuthSession type ## entities.AuthSession type
**Signature:** **Signature:**
```typescript ```typescript
export declare type AuthSession = { export declare type AuthSession = {
id: ID; id: ID;
app: App; app: App;
token: string; token: string;
}; };
``` ```
**References:** [ID](./iceshrimp-js.entities.id.md)<!-- -->, [App](./iceshrimp-js.entities.app.md) **References:** [ID](./iceshrimp-js.entities.id.md)<!-- -->, [App](./iceshrimp-js.entities.app.md)

View file

@ -1,18 +1,18 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [Blocking](./iceshrimp-js.entities.blocking.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [Blocking](./iceshrimp-js.entities.blocking.md)
## entities.Blocking type ## entities.Blocking type
**Signature:** **Signature:**
```typescript ```typescript
export declare type Blocking = { export declare type Blocking = {
id: ID; id: ID;
createdAt: DateString; createdAt: DateString;
blockeeId: User["id"]; blockeeId: User["id"];
blockee: UserDetailed; blockee: UserDetailed;
}; };
``` ```
**References:** [ID](./iceshrimp-js.entities.id.md)<!-- -->, [DateString](./iceshrimp-js.entities.datestring.md)<!-- -->, [User](./iceshrimp-js.entities.user.md)<!-- -->, [UserDetailed](./iceshrimp-js.entities.userdetailed.md) **References:** [ID](./iceshrimp-js.entities.id.md)<!-- -->, [DateString](./iceshrimp-js.entities.datestring.md)<!-- -->, [User](./iceshrimp-js.entities.user.md)<!-- -->, [UserDetailed](./iceshrimp-js.entities.userdetailed.md)

View file

@ -1,15 +1,15 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [Channel](./iceshrimp-js.entities.channel.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [Channel](./iceshrimp-js.entities.channel.md)
## entities.Channel type ## entities.Channel type
**Signature:** **Signature:**
```typescript ```typescript
export declare type Channel = { export declare type Channel = {
id: ID; id: ID;
}; };
``` ```
**References:** [ID](./iceshrimp-js.entities.id.md) **References:** [ID](./iceshrimp-js.entities.id.md)

View file

@ -1,11 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [Clip](./iceshrimp-js.entities.clip.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [Clip](./iceshrimp-js.entities.clip.md)
## entities.Clip type ## entities.Clip type
**Signature:** **Signature:**
```typescript ```typescript
export declare type Clip = TODO; export declare type Clip = TODO;
``` ```

View file

@ -1,17 +1,17 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [CustomEmoji](./iceshrimp-js.entities.customemoji.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [CustomEmoji](./iceshrimp-js.entities.customemoji.md)
## entities.CustomEmoji type ## entities.CustomEmoji type
**Signature:** **Signature:**
```typescript ```typescript
export declare type CustomEmoji = { export declare type CustomEmoji = {
id: string; id: string;
name: string; name: string;
url: string; url: string;
category: string; category: string;
aliases: string[]; aliases: string[];
}; };
``` ```

View file

@ -1,11 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [DateString](./iceshrimp-js.entities.datestring.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [DateString](./iceshrimp-js.entities.datestring.md)
## entities.DateString type ## entities.DateString type
**Signature:** **Signature:**
```typescript ```typescript
export declare type DateString = string; export declare type DateString = string;
``` ```

View file

@ -1,15 +1,15 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [DetailedInstanceMetadata](./iceshrimp-js.entities.detailedinstancemetadata.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [DetailedInstanceMetadata](./iceshrimp-js.entities.detailedinstancemetadata.md)
## entities.DetailedInstanceMetadata type ## entities.DetailedInstanceMetadata type
**Signature:** **Signature:**
```typescript ```typescript
export declare type DetailedInstanceMetadata = LiteInstanceMetadata & { export declare type DetailedInstanceMetadata = LiteInstanceMetadata & {
features: Record<string, any>; features: Record<string, any>;
}; };
``` ```
**References:** [LiteInstanceMetadata](./iceshrimp-js.entities.liteinstancemetadata.md) **References:** [LiteInstanceMetadata](./iceshrimp-js.entities.liteinstancemetadata.md)

View file

@ -1,26 +1,26 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [DriveFile](./iceshrimp-js.entities.drivefile.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [DriveFile](./iceshrimp-js.entities.drivefile.md)
## entities.DriveFile type ## entities.DriveFile type
**Signature:** **Signature:**
```typescript ```typescript
export declare type DriveFile = { export declare type DriveFile = {
id: ID; id: ID;
createdAt: DateString; createdAt: DateString;
isSensitive: boolean; isSensitive: boolean;
name: string; name: string;
thumbnailUrl: string; thumbnailUrl: string;
url: string; url: string;
type: string; type: string;
size: number; size: number;
md5: string; md5: string;
blurhash: string; blurhash: string;
comment: string | null; comment: string | null;
properties: Record<string, any>; properties: Record<string, any>;
}; };
``` ```
**References:** [ID](./iceshrimp-js.entities.id.md)<!-- -->, [DateString](./iceshrimp-js.entities.datestring.md) **References:** [ID](./iceshrimp-js.entities.id.md)<!-- -->, [DateString](./iceshrimp-js.entities.datestring.md)

View file

@ -1,11 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [DriveFolder](./iceshrimp-js.entities.drivefolder.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [DriveFolder](./iceshrimp-js.entities.drivefolder.md)
## entities.DriveFolder type ## entities.DriveFolder type
**Signature:** **Signature:**
```typescript ```typescript
export declare type DriveFolder = TODO; export declare type DriveFolder = TODO;
``` ```

View file

@ -1,18 +1,18 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [Following](./iceshrimp-js.entities.following.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [Following](./iceshrimp-js.entities.following.md)
## entities.Following type ## entities.Following type
**Signature:** **Signature:**
```typescript ```typescript
export declare type Following = { export declare type Following = {
id: ID; id: ID;
createdAt: DateString; createdAt: DateString;
followerId: User["id"]; followerId: User["id"];
followeeId: User["id"]; followeeId: User["id"];
}; };
``` ```
**References:** [ID](./iceshrimp-js.entities.id.md)<!-- -->, [DateString](./iceshrimp-js.entities.datestring.md)<!-- -->, [User](./iceshrimp-js.entities.user.md) **References:** [ID](./iceshrimp-js.entities.id.md)<!-- -->, [DateString](./iceshrimp-js.entities.datestring.md)<!-- -->, [User](./iceshrimp-js.entities.user.md)

View file

@ -1,15 +1,15 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [FollowingFolloweePopulated](./iceshrimp-js.entities.followingfolloweepopulated.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [FollowingFolloweePopulated](./iceshrimp-js.entities.followingfolloweepopulated.md)
## entities.FollowingFolloweePopulated type ## entities.FollowingFolloweePopulated type
**Signature:** **Signature:**
```typescript ```typescript
export declare type FollowingFolloweePopulated = Following & { export declare type FollowingFolloweePopulated = Following & {
followee: UserDetailed; followee: UserDetailed;
}; };
``` ```
**References:** [Following](./iceshrimp-js.entities.following.md)<!-- -->, [UserDetailed](./iceshrimp-js.entities.userdetailed.md) **References:** [Following](./iceshrimp-js.entities.following.md)<!-- -->, [UserDetailed](./iceshrimp-js.entities.userdetailed.md)

View file

@ -1,15 +1,15 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [FollowingFollowerPopulated](./iceshrimp-js.entities.followingfollowerpopulated.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [FollowingFollowerPopulated](./iceshrimp-js.entities.followingfollowerpopulated.md)
## entities.FollowingFollowerPopulated type ## entities.FollowingFollowerPopulated type
**Signature:** **Signature:**
```typescript ```typescript
export declare type FollowingFollowerPopulated = Following & { export declare type FollowingFollowerPopulated = Following & {
follower: UserDetailed; follower: UserDetailed;
}; };
``` ```
**References:** [Following](./iceshrimp-js.entities.following.md)<!-- -->, [UserDetailed](./iceshrimp-js.entities.userdetailed.md) **References:** [Following](./iceshrimp-js.entities.following.md)<!-- -->, [UserDetailed](./iceshrimp-js.entities.userdetailed.md)

View file

@ -1,17 +1,17 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [FollowRequest](./iceshrimp-js.entities.followrequest.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [FollowRequest](./iceshrimp-js.entities.followrequest.md)
## entities.FollowRequest type ## entities.FollowRequest type
**Signature:** **Signature:**
```typescript ```typescript
export declare type FollowRequest = { export declare type FollowRequest = {
id: ID; id: ID;
follower: User; follower: User;
followee: User; followee: User;
}; };
``` ```
**References:** [ID](./iceshrimp-js.entities.id.md)<!-- -->, [User](./iceshrimp-js.entities.user.md) **References:** [ID](./iceshrimp-js.entities.id.md)<!-- -->, [User](./iceshrimp-js.entities.user.md)

View file

@ -1,11 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [GalleryPost](./iceshrimp-js.entities.gallerypost.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [GalleryPost](./iceshrimp-js.entities.gallerypost.md)
## entities.GalleryPost type ## entities.GalleryPost type
**Signature:** **Signature:**
```typescript ```typescript
export declare type GalleryPost = TODO; export declare type GalleryPost = TODO;
``` ```

View file

@ -1,11 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [ID](./iceshrimp-js.entities.id.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [ID](./iceshrimp-js.entities.id.md)
## entities.ID type ## entities.ID type
**Signature:** **Signature:**
```typescript ```typescript
export declare type ID = string; export declare type ID = string;
``` ```

View file

@ -1,40 +1,40 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [Instance](./iceshrimp-js.entities.instance.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [Instance](./iceshrimp-js.entities.instance.md)
## entities.Instance type ## entities.Instance type
**Signature:** **Signature:**
```typescript ```typescript
export declare type Instance = { export declare type Instance = {
id: ID; id: ID;
caughtAt: DateString; caughtAt: DateString;
host: string; host: string;
usersCount: number; usersCount: number;
notesCount: number; notesCount: number;
followingCount: number; followingCount: number;
followersCount: number; followersCount: number;
driveUsage: number; driveUsage: number;
driveFiles: number; driveFiles: number;
latestRequestSentAt: DateString | null; latestRequestSentAt: DateString | null;
latestStatus: number | null; latestStatus: number | null;
latestRequestReceivedAt: DateString | null; latestRequestReceivedAt: DateString | null;
lastCommunicatedAt: DateString; lastCommunicatedAt: DateString;
isNotResponding: boolean; isNotResponding: boolean;
isSuspended: boolean; isSuspended: boolean;
softwareName: string | null; softwareName: string | null;
softwareVersion: string | null; softwareVersion: string | null;
openRegistrations: boolean | null; openRegistrations: boolean | null;
name: string | null; name: string | null;
description: string | null; description: string | null;
maintainerName: string | null; maintainerName: string | null;
maintainerEmail: string | null; maintainerEmail: string | null;
iconUrl: string | null; iconUrl: string | null;
faviconUrl: string | null; faviconUrl: string | null;
themeColor: string | null; themeColor: string | null;
infoUpdatedAt: DateString | null; infoUpdatedAt: DateString | null;
}; };
``` ```
**References:** [ID](./iceshrimp-js.entities.id.md)<!-- -->, [DateString](./iceshrimp-js.entities.datestring.md) **References:** [ID](./iceshrimp-js.entities.id.md)<!-- -->, [DateString](./iceshrimp-js.entities.datestring.md)

View file

@ -1,15 +1,15 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [InstanceMetadata](./iceshrimp-js.entities.instancemetadata.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [InstanceMetadata](./iceshrimp-js.entities.instancemetadata.md)
## entities.InstanceMetadata type ## entities.InstanceMetadata type
**Signature:** **Signature:**
```typescript ```typescript
export declare type InstanceMetadata = export declare type InstanceMetadata =
| LiteInstanceMetadata | LiteInstanceMetadata
| DetailedInstanceMetadata; | DetailedInstanceMetadata;
``` ```
**References:** [LiteInstanceMetadata](./iceshrimp-js.entities.liteinstancemetadata.md)<!-- -->, [DetailedInstanceMetadata](./iceshrimp-js.entities.detailedinstancemetadata.md) **References:** [LiteInstanceMetadata](./iceshrimp-js.entities.liteinstancemetadata.md)<!-- -->, [DetailedInstanceMetadata](./iceshrimp-js.entities.detailedinstancemetadata.md)

View file

@ -1,45 +1,45 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [LiteInstanceMetadata](./iceshrimp-js.entities.liteinstancemetadata.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [LiteInstanceMetadata](./iceshrimp-js.entities.liteinstancemetadata.md)
## entities.LiteInstanceMetadata type ## entities.LiteInstanceMetadata type
**Signature:** **Signature:**
```typescript ```typescript
export declare type LiteInstanceMetadata = { export declare type LiteInstanceMetadata = {
maintainerName: string | null; maintainerName: string | null;
maintainerEmail: string | null; maintainerEmail: string | null;
version: string; version: string;
name: string | null; name: string | null;
uri: string; uri: string;
description: string | null; description: string | null;
tosUrl: string | null; tosUrl: string | null;
disableRegistration: boolean; disableRegistration: boolean;
disableLocalTimeline: boolean; disableLocalTimeline: boolean;
disableRecommendedTimeline: boolean; disableRecommendedTimeline: boolean;
disableGlobalTimeline: boolean; disableGlobalTimeline: boolean;
driveCapacityPerLocalUserMb: number; driveCapacityPerLocalUserMb: number;
driveCapacityPerRemoteUserMb: number; driveCapacityPerRemoteUserMb: number;
enableHcaptcha: boolean; enableHcaptcha: boolean;
hcaptchaSiteKey: string | null; hcaptchaSiteKey: string | null;
enableRecaptcha: boolean; enableRecaptcha: boolean;
recaptchaSiteKey: string | null; recaptchaSiteKey: string | null;
swPublickey: string | null; swPublickey: string | null;
maxNoteTextLength: number; maxNoteTextLength: number;
enableEmail: boolean; enableEmail: boolean;
enableGithubIntegration: boolean; enableGithubIntegration: boolean;
enableDiscordIntegration: boolean; enableDiscordIntegration: boolean;
enableServiceWorker: boolean; enableServiceWorker: boolean;
emojis: CustomEmoji[]; emojis: CustomEmoji[];
ads: { ads: {
id: ID; id: ID;
ratio: number; ratio: number;
place: string; place: string;
url: string; url: string;
imageUrl: string; imageUrl: string;
}[]; }[];
}; };
``` ```
**References:** [CustomEmoji](./iceshrimp-js.entities.customemoji.md)<!-- -->, [ID](./iceshrimp-js.entities.id.md) **References:** [CustomEmoji](./iceshrimp-js.entities.customemoji.md)<!-- -->, [ID](./iceshrimp-js.entities.id.md)

View file

@ -1,51 +1,51 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md)
## entities namespace ## entities namespace
## Type Aliases ## Type Aliases
| Type Alias | Description | | Type Alias | Description |
| --- | --- | | --- | --- |
| [Ad](./iceshrimp-js.entities.ad.md) | | | [Ad](./iceshrimp-js.entities.ad.md) | |
| [Announcement](./iceshrimp-js.entities.announcement.md) | | | [Announcement](./iceshrimp-js.entities.announcement.md) | |
| [Antenna](./iceshrimp-js.entities.antenna.md) | | | [Antenna](./iceshrimp-js.entities.antenna.md) | |
| [App](./iceshrimp-js.entities.app.md) | | | [App](./iceshrimp-js.entities.app.md) | |
| [AuthSession](./iceshrimp-js.entities.authsession.md) | | | [AuthSession](./iceshrimp-js.entities.authsession.md) | |
| [Blocking](./iceshrimp-js.entities.blocking.md) | | | [Blocking](./iceshrimp-js.entities.blocking.md) | |
| [Channel](./iceshrimp-js.entities.channel.md) | | | [Channel](./iceshrimp-js.entities.channel.md) | |
| [Clip](./iceshrimp-js.entities.clip.md) | | | [Clip](./iceshrimp-js.entities.clip.md) | |
| [CustomEmoji](./iceshrimp-js.entities.customemoji.md) | | | [CustomEmoji](./iceshrimp-js.entities.customemoji.md) | |
| [DateString](./iceshrimp-js.entities.datestring.md) | | | [DateString](./iceshrimp-js.entities.datestring.md) | |
| [DetailedInstanceMetadata](./iceshrimp-js.entities.detailedinstancemetadata.md) | | | [DetailedInstanceMetadata](./iceshrimp-js.entities.detailedinstancemetadata.md) | |
| [DriveFile](./iceshrimp-js.entities.drivefile.md) | | | [DriveFile](./iceshrimp-js.entities.drivefile.md) | |
| [DriveFolder](./iceshrimp-js.entities.drivefolder.md) | | | [DriveFolder](./iceshrimp-js.entities.drivefolder.md) | |
| [Following](./iceshrimp-js.entities.following.md) | | | [Following](./iceshrimp-js.entities.following.md) | |
| [FollowingFolloweePopulated](./iceshrimp-js.entities.followingfolloweepopulated.md) | | | [FollowingFolloweePopulated](./iceshrimp-js.entities.followingfolloweepopulated.md) | |
| [FollowingFollowerPopulated](./iceshrimp-js.entities.followingfollowerpopulated.md) | | | [FollowingFollowerPopulated](./iceshrimp-js.entities.followingfollowerpopulated.md) | |
| [FollowRequest](./iceshrimp-js.entities.followrequest.md) | | | [FollowRequest](./iceshrimp-js.entities.followrequest.md) | |
| [GalleryPost](./iceshrimp-js.entities.gallerypost.md) | | | [GalleryPost](./iceshrimp-js.entities.gallerypost.md) | |
| [ID](./iceshrimp-js.entities.id.md) | | | [ID](./iceshrimp-js.entities.id.md) | |
| [Instance](./iceshrimp-js.entities.instance.md) | | | [Instance](./iceshrimp-js.entities.instance.md) | |
| [InstanceMetadata](./iceshrimp-js.entities.instancemetadata.md) | | | [InstanceMetadata](./iceshrimp-js.entities.instancemetadata.md) | |
| [LiteInstanceMetadata](./iceshrimp-js.entities.liteinstancemetadata.md) | | | [LiteInstanceMetadata](./iceshrimp-js.entities.liteinstancemetadata.md) | |
| [MeDetailed](./iceshrimp-js.entities.medetailed.md) | | | [MeDetailed](./iceshrimp-js.entities.medetailed.md) | |
| [MessagingMessage](./iceshrimp-js.entities.messagingmessage.md) | | | [MessagingMessage](./iceshrimp-js.entities.messagingmessage.md) | |
| [Note](./iceshrimp-js.entities.note.md) | | | [Note](./iceshrimp-js.entities.note.md) | |
| [NoteFavorite](./iceshrimp-js.entities.notefavorite.md) | | | [NoteFavorite](./iceshrimp-js.entities.notefavorite.md) | |
| [NoteReaction](./iceshrimp-js.entities.notereaction.md) | | | [NoteReaction](./iceshrimp-js.entities.notereaction.md) | |
| [Notification](./iceshrimp-js.entities.notification.md) | | | [Notification](./iceshrimp-js.entities.notification.md) | |
| [OriginType](./iceshrimp-js.entities.origintype.md) | | | [OriginType](./iceshrimp-js.entities.origintype.md) | |
| [Page](./iceshrimp-js.entities.page.md) | | | [Page](./iceshrimp-js.entities.page.md) | |
| [PageEvent](./iceshrimp-js.entities.pageevent.md) | | | [PageEvent](./iceshrimp-js.entities.pageevent.md) | |
| [ServerInfo](./iceshrimp-js.entities.serverinfo.md) | | | [ServerInfo](./iceshrimp-js.entities.serverinfo.md) | |
| [Signin](./iceshrimp-js.entities.signin.md) | | | [Signin](./iceshrimp-js.entities.signin.md) | |
| [Stats](./iceshrimp-js.entities.stats.md) | | | [Stats](./iceshrimp-js.entities.stats.md) | |
| [User](./iceshrimp-js.entities.user.md) | | | [User](./iceshrimp-js.entities.user.md) | |
| [UserDetailed](./iceshrimp-js.entities.userdetailed.md) | | | [UserDetailed](./iceshrimp-js.entities.userdetailed.md) | |
| [UserGroup](./iceshrimp-js.entities.usergroup.md) | | | [UserGroup](./iceshrimp-js.entities.usergroup.md) | |
| [UserList](./iceshrimp-js.entities.userlist.md) | | | [UserList](./iceshrimp-js.entities.userlist.md) | |
| [UserLite](./iceshrimp-js.entities.userlite.md) | | | [UserLite](./iceshrimp-js.entities.userlite.md) | |
| [UserSorting](./iceshrimp-js.entities.usersorting.md) | | | [UserSorting](./iceshrimp-js.entities.usersorting.md) | |

View file

@ -1,40 +1,40 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [MeDetailed](./iceshrimp-js.entities.medetailed.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [MeDetailed](./iceshrimp-js.entities.medetailed.md)
## entities.MeDetailed type ## entities.MeDetailed type
**Signature:** **Signature:**
```typescript ```typescript
export declare type MeDetailed = UserDetailed & { export declare type MeDetailed = UserDetailed & {
avatarId: DriveFile["id"]; avatarId: DriveFile["id"];
bannerId: DriveFile["id"]; bannerId: DriveFile["id"];
autoAcceptFollowed: boolean; autoAcceptFollowed: boolean;
alwaysMarkNsfw: boolean; alwaysMarkNsfw: boolean;
carefulBot: boolean; carefulBot: boolean;
emailNotificationTypes: string[]; emailNotificationTypes: string[];
hasPendingReceivedFollowRequest: boolean; hasPendingReceivedFollowRequest: boolean;
hasUnreadAnnouncement: boolean; hasUnreadAnnouncement: boolean;
hasUnreadAntenna: boolean; hasUnreadAntenna: boolean;
hasUnreadChannel: boolean; hasUnreadChannel: boolean;
hasUnreadMentions: boolean; hasUnreadMentions: boolean;
hasUnreadMessagingMessage: boolean; hasUnreadMessagingMessage: boolean;
hasUnreadNotification: boolean; hasUnreadNotification: boolean;
hasUnreadSpecifiedNotes: boolean; hasUnreadSpecifiedNotes: boolean;
hideOnlineStatus: boolean; hideOnlineStatus: boolean;
injectFeaturedNote: boolean; injectFeaturedNote: boolean;
integrations: Record<string, any>; integrations: Record<string, any>;
isDeleted: boolean; isDeleted: boolean;
isExplorable: boolean; isExplorable: boolean;
mutedWords: string[][]; mutedWords: string[][];
mutingNotificationTypes: string[]; mutingNotificationTypes: string[];
noCrawle: boolean; noCrawle: boolean;
preventAiLearning: boolean; preventAiLearning: boolean;
receiveAnnouncementEmail: boolean; receiveAnnouncementEmail: boolean;
usePasswordLessLogin: boolean; usePasswordLessLogin: boolean;
[other: string]: any; [other: string]: any;
}; };
``` ```
**References:** [UserDetailed](./iceshrimp-js.entities.userdetailed.md)<!-- -->, [DriveFile](./iceshrimp-js.entities.drivefile.md) **References:** [UserDetailed](./iceshrimp-js.entities.userdetailed.md)<!-- -->, [DriveFile](./iceshrimp-js.entities.drivefile.md)

View file

@ -1,27 +1,27 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [MessagingMessage](./iceshrimp-js.entities.messagingmessage.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [MessagingMessage](./iceshrimp-js.entities.messagingmessage.md)
## entities.MessagingMessage type ## entities.MessagingMessage type
**Signature:** **Signature:**
```typescript ```typescript
export declare type MessagingMessage = { export declare type MessagingMessage = {
id: ID; id: ID;
createdAt: DateString; createdAt: DateString;
file: DriveFile | null; file: DriveFile | null;
fileId: DriveFile["id"] | null; fileId: DriveFile["id"] | null;
isRead: boolean; isRead: boolean;
reads: User["id"][]; reads: User["id"][];
text: string | null; text: string | null;
user: User; user: User;
userId: User["id"]; userId: User["id"];
recipient?: User | null; recipient?: User | null;
recipientId: User["id"] | null; recipientId: User["id"] | null;
group?: UserGroup | null; group?: UserGroup | null;
groupId: UserGroup["id"] | null; groupId: UserGroup["id"] | null;
}; };
``` ```
**References:** [ID](./iceshrimp-js.entities.id.md)<!-- -->, [DateString](./iceshrimp-js.entities.datestring.md)<!-- -->, [DriveFile](./iceshrimp-js.entities.drivefile.md)<!-- -->, [User](./iceshrimp-js.entities.user.md)<!-- -->, [UserGroup](./iceshrimp-js.entities.usergroup.md) **References:** [ID](./iceshrimp-js.entities.id.md)<!-- -->, [DateString](./iceshrimp-js.entities.datestring.md)<!-- -->, [DriveFile](./iceshrimp-js.entities.drivefile.md)<!-- -->, [User](./iceshrimp-js.entities.user.md)<!-- -->, [UserGroup](./iceshrimp-js.entities.usergroup.md)

View file

@ -1,51 +1,51 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [Note](./iceshrimp-js.entities.note.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [Note](./iceshrimp-js.entities.note.md)
## entities.Note type ## entities.Note type
**Signature:** **Signature:**
```typescript ```typescript
export declare type Note = { export declare type Note = {
id: ID; id: ID;
createdAt: DateString; createdAt: DateString;
text: string | null; text: string | null;
cw: string | null; cw: string | null;
user: User; user: User;
userId: User["id"]; userId: User["id"];
reply?: Note; reply?: Note;
replyId: Note["id"]; replyId: Note["id"];
renote?: Note; renote?: Note;
renoteId: Note["id"]; renoteId: Note["id"];
files: DriveFile[]; files: DriveFile[];
fileIds: DriveFile["id"][]; fileIds: DriveFile["id"][];
visibility: "public" | "home" | "followers" | "specified"; visibility: "public" | "home" | "followers" | "specified";
visibleUserIds?: User["id"][]; visibleUserIds?: User["id"][];
localOnly?: boolean; localOnly?: boolean;
channel?: Channel["id"]; channel?: Channel["id"];
myReaction?: string; myReaction?: string;
reactions: Record<string, number>; reactions: Record<string, number>;
renoteCount: number; renoteCount: number;
repliesCount: number; repliesCount: number;
poll?: { poll?: {
expiresAt: DateString | null; expiresAt: DateString | null;
multiple: boolean; multiple: boolean;
choices: { choices: {
isVoted: boolean; isVoted: boolean;
text: string; text: string;
votes: number; votes: number;
}[]; }[];
}; };
emojis: { emojis: {
name: string; name: string;
url: string; url: string;
}[]; }[];
uri?: string; uri?: string;
url?: string; url?: string;
updatedAt?: DateString; updatedAt?: DateString;
isHidden?: boolean; isHidden?: boolean;
}; };
``` ```
**References:** [ID](./iceshrimp-js.entities.id.md)<!-- -->, [DateString](./iceshrimp-js.entities.datestring.md)<!-- -->, [User](./iceshrimp-js.entities.user.md)<!-- -->, [Note](./iceshrimp-js.entities.note.md)<!-- -->, [DriveFile](./iceshrimp-js.entities.drivefile.md)<!-- -->, [Channel](./iceshrimp-js.entities.channel.md) **References:** [ID](./iceshrimp-js.entities.id.md)<!-- -->, [DateString](./iceshrimp-js.entities.datestring.md)<!-- -->, [User](./iceshrimp-js.entities.user.md)<!-- -->, [Note](./iceshrimp-js.entities.note.md)<!-- -->, [DriveFile](./iceshrimp-js.entities.drivefile.md)<!-- -->, [Channel](./iceshrimp-js.entities.channel.md)

View file

@ -1,18 +1,18 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [NoteFavorite](./iceshrimp-js.entities.notefavorite.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [NoteFavorite](./iceshrimp-js.entities.notefavorite.md)
## entities.NoteFavorite type ## entities.NoteFavorite type
**Signature:** **Signature:**
```typescript ```typescript
export declare type NoteFavorite = { export declare type NoteFavorite = {
id: ID; id: ID;
createdAt: DateString; createdAt: DateString;
noteId: Note["id"]; noteId: Note["id"];
note: Note; note: Note;
}; };
``` ```
**References:** [ID](./iceshrimp-js.entities.id.md)<!-- -->, [DateString](./iceshrimp-js.entities.datestring.md)<!-- -->, [Note](./iceshrimp-js.entities.note.md) **References:** [ID](./iceshrimp-js.entities.id.md)<!-- -->, [DateString](./iceshrimp-js.entities.datestring.md)<!-- -->, [Note](./iceshrimp-js.entities.note.md)

View file

@ -1,18 +1,18 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [NoteReaction](./iceshrimp-js.entities.notereaction.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [NoteReaction](./iceshrimp-js.entities.notereaction.md)
## entities.NoteReaction type ## entities.NoteReaction type
**Signature:** **Signature:**
```typescript ```typescript
export declare type NoteReaction = { export declare type NoteReaction = {
id: ID; id: ID;
createdAt: DateString; createdAt: DateString;
user: UserLite; user: UserLite;
type: string; type: string;
}; };
``` ```
**References:** [ID](./iceshrimp-js.entities.id.md)<!-- -->, [DateString](./iceshrimp-js.entities.datestring.md)<!-- -->, [UserLite](./iceshrimp-js.entities.userlite.md) **References:** [ID](./iceshrimp-js.entities.id.md)<!-- -->, [DateString](./iceshrimp-js.entities.datestring.md)<!-- -->, [UserLite](./iceshrimp-js.entities.userlite.md)

View file

@ -1,82 +1,82 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [Notification](./iceshrimp-js.entities.notification.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [Notification](./iceshrimp-js.entities.notification.md)
## entities.Notification type ## entities.Notification type
**Signature:** **Signature:**
```typescript ```typescript
export declare type Notification = { export declare type Notification = {
id: ID; id: ID;
createdAt: DateString; createdAt: DateString;
isRead: boolean; isRead: boolean;
} & ( } & (
| { | {
type: "reaction"; type: "reaction";
reaction: string; reaction: string;
user: User; user: User;
userId: User["id"]; userId: User["id"];
note: Note; note: Note;
} }
| { | {
type: "reply"; type: "reply";
user: User; user: User;
userId: User["id"]; userId: User["id"];
note: Note; note: Note;
} }
| { | {
type: "renote"; type: "renote";
user: User; user: User;
userId: User["id"]; userId: User["id"];
note: Note; note: Note;
} }
| { | {
type: "quote"; type: "quote";
user: User; user: User;
userId: User["id"]; userId: User["id"];
note: Note; note: Note;
} }
| { | {
type: "mention"; type: "mention";
user: User; user: User;
userId: User["id"]; userId: User["id"];
note: Note; note: Note;
} }
| { | {
type: "pollVote"; type: "pollVote";
user: User; user: User;
userId: User["id"]; userId: User["id"];
note: Note; note: Note;
} }
| { | {
type: "follow"; type: "follow";
user: User; user: User;
userId: User["id"]; userId: User["id"];
} }
| { | {
type: "followRequestAccepted"; type: "followRequestAccepted";
user: User; user: User;
userId: User["id"]; userId: User["id"];
} }
| { | {
type: "receiveFollowRequest"; type: "receiveFollowRequest";
user: User; user: User;
userId: User["id"]; userId: User["id"];
} }
| { | {
type: "groupInvited"; type: "groupInvited";
invitation: UserGroup; invitation: UserGroup;
user: User; user: User;
userId: User["id"]; userId: User["id"];
} }
| { | {
type: "app"; type: "app";
header?: string | null; header?: string | null;
body: string; body: string;
icon?: string | null; icon?: string | null;
} }
); );
``` ```
**References:** [ID](./iceshrimp-js.entities.id.md)<!-- -->, [DateString](./iceshrimp-js.entities.datestring.md)<!-- -->, [User](./iceshrimp-js.entities.user.md)<!-- -->, [Note](./iceshrimp-js.entities.note.md)<!-- -->, [UserGroup](./iceshrimp-js.entities.usergroup.md) **References:** [ID](./iceshrimp-js.entities.id.md)<!-- -->, [DateString](./iceshrimp-js.entities.datestring.md)<!-- -->, [User](./iceshrimp-js.entities.user.md)<!-- -->, [Note](./iceshrimp-js.entities.note.md)<!-- -->, [UserGroup](./iceshrimp-js.entities.usergroup.md)

View file

@ -1,11 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [OriginType](./iceshrimp-js.entities.origintype.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [OriginType](./iceshrimp-js.entities.origintype.md)
## entities.OriginType type ## entities.OriginType type
**Signature:** **Signature:**
```typescript ```typescript
export declare type OriginType = "combined" | "local" | "remote"; export declare type OriginType = "combined" | "local" | "remote";
``` ```

View file

@ -1,33 +1,33 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [Page](./iceshrimp-js.entities.page.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [Page](./iceshrimp-js.entities.page.md)
## entities.Page type ## entities.Page type
**Signature:** **Signature:**
```typescript ```typescript
export declare type Page = { export declare type Page = {
id: ID; id: ID;
createdAt: DateString; createdAt: DateString;
updatedAt: DateString; updatedAt: DateString;
userId: User["id"]; userId: User["id"];
user: User; user: User;
content: Record<string, any>[]; content: Record<string, any>[];
variables: Record<string, any>[]; variables: Record<string, any>[];
title: string; title: string;
name: string; name: string;
summary: string | null; summary: string | null;
hideTitleWhenPinned: boolean; hideTitleWhenPinned: boolean;
alignCenter: boolean; alignCenter: boolean;
font: string; font: string;
script: string; script: string;
eyeCatchingImageId: DriveFile["id"] | null; eyeCatchingImageId: DriveFile["id"] | null;
eyeCatchingImage: DriveFile | null; eyeCatchingImage: DriveFile | null;
attachedFiles: any; attachedFiles: any;
likedCount: number; likedCount: number;
isLiked?: boolean; isLiked?: boolean;
}; };
``` ```
**References:** [ID](./iceshrimp-js.entities.id.md)<!-- -->, [DateString](./iceshrimp-js.entities.datestring.md)<!-- -->, [User](./iceshrimp-js.entities.user.md)<!-- -->, [DriveFile](./iceshrimp-js.entities.drivefile.md) **References:** [ID](./iceshrimp-js.entities.id.md)<!-- -->, [DateString](./iceshrimp-js.entities.datestring.md)<!-- -->, [User](./iceshrimp-js.entities.user.md)<!-- -->, [DriveFile](./iceshrimp-js.entities.drivefile.md)

View file

@ -1,19 +1,19 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [PageEvent](./iceshrimp-js.entities.pageevent.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [PageEvent](./iceshrimp-js.entities.pageevent.md)
## entities.PageEvent type ## entities.PageEvent type
**Signature:** **Signature:**
```typescript ```typescript
export declare type PageEvent = { export declare type PageEvent = {
pageId: Page["id"]; pageId: Page["id"];
event: string; event: string;
var: any; var: any;
userId: User["id"]; userId: User["id"];
user: User; user: User;
}; };
``` ```
**References:** [Page](./iceshrimp-js.entities.page.md)<!-- -->, [User](./iceshrimp-js.entities.user.md) **References:** [Page](./iceshrimp-js.entities.page.md)<!-- -->, [User](./iceshrimp-js.entities.user.md)

View file

@ -1,24 +1,24 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [ServerInfo](./iceshrimp-js.entities.serverinfo.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [ServerInfo](./iceshrimp-js.entities.serverinfo.md)
## entities.ServerInfo type ## entities.ServerInfo type
**Signature:** **Signature:**
```typescript ```typescript
export declare type ServerInfo = { export declare type ServerInfo = {
machine: string; machine: string;
cpu: { cpu: {
model: string; model: string;
cores: number; cores: number;
}; };
mem: { mem: {
total: number; total: number;
}; };
fs: { fs: {
total: number; total: number;
used: number; used: number;
}; };
}; };
``` ```

View file

@ -1,19 +1,19 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [Signin](./iceshrimp-js.entities.signin.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [Signin](./iceshrimp-js.entities.signin.md)
## entities.Signin type ## entities.Signin type
**Signature:** **Signature:**
```typescript ```typescript
export declare type Signin = { export declare type Signin = {
id: ID; id: ID;
createdAt: DateString; createdAt: DateString;
ip: string; ip: string;
headers: Record<string, any>; headers: Record<string, any>;
success: boolean; success: boolean;
}; };
``` ```
**References:** [ID](./iceshrimp-js.entities.id.md)<!-- -->, [DateString](./iceshrimp-js.entities.datestring.md) **References:** [ID](./iceshrimp-js.entities.id.md)<!-- -->, [DateString](./iceshrimp-js.entities.datestring.md)

View file

@ -1,19 +1,19 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [Stats](./iceshrimp-js.entities.stats.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [Stats](./iceshrimp-js.entities.stats.md)
## entities.Stats type ## entities.Stats type
**Signature:** **Signature:**
```typescript ```typescript
export declare type Stats = { export declare type Stats = {
notesCount: number; notesCount: number;
originalNotesCount: number; originalNotesCount: number;
usersCount: number; usersCount: number;
originalUsersCount: number; originalUsersCount: number;
instances: number; instances: number;
driveUsageLocal: number; driveUsageLocal: number;
driveUsageRemote: number; driveUsageRemote: number;
}; };
``` ```

View file

@ -1,13 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [User](./iceshrimp-js.entities.user.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [User](./iceshrimp-js.entities.user.md)
## entities.User type ## entities.User type
**Signature:** **Signature:**
```typescript ```typescript
export declare type User = UserLite | UserDetailed; export declare type User = UserLite | UserDetailed;
``` ```
**References:** [UserLite](./iceshrimp-js.entities.userlite.md)<!-- -->, [UserDetailed](./iceshrimp-js.entities.userdetailed.md) **References:** [UserLite](./iceshrimp-js.entities.userlite.md)<!-- -->, [UserDetailed](./iceshrimp-js.entities.userdetailed.md)

View file

@ -1,56 +1,56 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [UserDetailed](./iceshrimp-js.entities.userdetailed.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [UserDetailed](./iceshrimp-js.entities.userdetailed.md)
## entities.UserDetailed type ## entities.UserDetailed type
**Signature:** **Signature:**
```typescript ```typescript
export declare type UserDetailed = UserLite & { export declare type UserDetailed = UserLite & {
bannerBlurhash: string | null; bannerBlurhash: string | null;
bannerColor: string | null; bannerColor: string | null;
bannerUrl: string | null; bannerUrl: string | null;
birthday: string | null; birthday: string | null;
createdAt: DateString; createdAt: DateString;
description: string | null; description: string | null;
ffVisibility: "public" | "followers" | "private"; ffVisibility: "public" | "followers" | "private";
fields: { fields: {
name: string; name: string;
value: string; value: string;
}[]; }[];
followersCount: number; followersCount: number;
followingCount: number; followingCount: number;
hasPendingFollowRequestFromYou: boolean; hasPendingFollowRequestFromYou: boolean;
hasPendingFollowRequestToYou: boolean; hasPendingFollowRequestToYou: boolean;
isAdmin: boolean; isAdmin: boolean;
isBlocked: boolean; isBlocked: boolean;
isBlocking: boolean; isBlocking: boolean;
isBot: boolean; isBot: boolean;
isCat: boolean; isCat: boolean;
isFollowed: boolean; isFollowed: boolean;
isFollowing: boolean; isFollowing: boolean;
isLocked: boolean; isLocked: boolean;
isModerator: boolean; isModerator: boolean;
isMuted: boolean; isMuted: boolean;
isRenoteMuted: boolean; isRenoteMuted: boolean;
isSilenced: boolean; isSilenced: boolean;
isSuspended: boolean; isSuspended: boolean;
lang: string | null; lang: string | null;
lastFetchedAt?: DateString; lastFetchedAt?: DateString;
location: string | null; location: string | null;
notesCount: number; notesCount: number;
pinnedNoteIds: ID[]; pinnedNoteIds: ID[];
pinnedNotes: Note[]; pinnedNotes: Note[];
pinnedPage: Page | null; pinnedPage: Page | null;
pinnedPageId: string | null; pinnedPageId: string | null;
publicReactions: boolean; publicReactions: boolean;
securityKeys: boolean; securityKeys: boolean;
twoFactorEnabled: boolean; twoFactorEnabled: boolean;
updatedAt: DateString | null; updatedAt: DateString | null;
uri: string | null; uri: string | null;
url: string | null; url: string | null;
}; };
``` ```
**References:** [UserLite](./iceshrimp-js.entities.userlite.md)<!-- -->, [DateString](./iceshrimp-js.entities.datestring.md)<!-- -->, [ID](./iceshrimp-js.entities.id.md)<!-- -->, [Note](./iceshrimp-js.entities.note.md)<!-- -->, [Page](./iceshrimp-js.entities.page.md) **References:** [UserLite](./iceshrimp-js.entities.userlite.md)<!-- -->, [DateString](./iceshrimp-js.entities.datestring.md)<!-- -->, [ID](./iceshrimp-js.entities.id.md)<!-- -->, [Note](./iceshrimp-js.entities.note.md)<!-- -->, [Page](./iceshrimp-js.entities.page.md)

View file

@ -1,11 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [UserGroup](./iceshrimp-js.entities.usergroup.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [UserGroup](./iceshrimp-js.entities.usergroup.md)
## entities.UserGroup type ## entities.UserGroup type
**Signature:** **Signature:**
```typescript ```typescript
export declare type UserGroup = TODO; export declare type UserGroup = TODO;
``` ```

View file

@ -1,18 +1,18 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [UserList](./iceshrimp-js.entities.userlist.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [UserList](./iceshrimp-js.entities.userlist.md)
## entities.UserList type ## entities.UserList type
**Signature:** **Signature:**
```typescript ```typescript
export declare type UserList = { export declare type UserList = {
id: ID; id: ID;
createdAt: DateString; createdAt: DateString;
name: string; name: string;
userIds: User["id"][]; userIds: User["id"][];
}; };
``` ```
**References:** [ID](./iceshrimp-js.entities.id.md)<!-- -->, [DateString](./iceshrimp-js.entities.datestring.md)<!-- -->, [User](./iceshrimp-js.entities.user.md) **References:** [ID](./iceshrimp-js.entities.id.md)<!-- -->, [DateString](./iceshrimp-js.entities.datestring.md)<!-- -->, [User](./iceshrimp-js.entities.user.md)

View file

@ -1,35 +1,35 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [UserLite](./iceshrimp-js.entities.userlite.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [UserLite](./iceshrimp-js.entities.userlite.md)
## entities.UserLite type ## entities.UserLite type
**Signature:** **Signature:**
```typescript ```typescript
export declare type UserLite = { export declare type UserLite = {
id: ID; id: ID;
username: string; username: string;
host: string | null; host: string | null;
name: string; name: string;
onlineStatus: "online" | "active" | "offline" | "unknown"; onlineStatus: "online" | "active" | "offline" | "unknown";
avatarUrl: string; avatarUrl: string;
avatarBlurhash: string; avatarBlurhash: string;
alsoKnownAs: string[]; alsoKnownAs: string[];
movedToUri: any; movedToUri: any;
emojis: { emojis: {
name: string; name: string;
url: string; url: string;
}[]; }[];
instance?: { instance?: {
name: Instance["name"]; name: Instance["name"];
softwareName: Instance["softwareName"]; softwareName: Instance["softwareName"];
softwareVersion: Instance["softwareVersion"]; softwareVersion: Instance["softwareVersion"];
iconUrl: Instance["iconUrl"]; iconUrl: Instance["iconUrl"];
faviconUrl: Instance["faviconUrl"]; faviconUrl: Instance["faviconUrl"];
themeColor: Instance["themeColor"]; themeColor: Instance["themeColor"];
}; };
}; };
``` ```
**References:** [ID](./iceshrimp-js.entities.id.md)<!-- -->, [Instance](./iceshrimp-js.entities.instance.md) **References:** [ID](./iceshrimp-js.entities.id.md)<!-- -->, [Instance](./iceshrimp-js.entities.instance.md)

View file

@ -1,17 +1,17 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [UserSorting](./iceshrimp-js.entities.usersorting.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [entities](./iceshrimp-js.entities.md) &gt; [UserSorting](./iceshrimp-js.entities.usersorting.md)
## entities.UserSorting type ## entities.UserSorting type
**Signature:** **Signature:**
```typescript ```typescript
export declare type UserSorting = export declare type UserSorting =
| "+follower" | "+follower"
| "-follower" | "-follower"
| "+createdAt" | "+createdAt"
| "-createdAt" | "-createdAt"
| "+updatedAt" | "+updatedAt"
| "-updatedAt"; | "-updatedAt";
``` ```

View file

@ -1,11 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [ffVisibility](./iceshrimp-js.ffvisibility.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [ffVisibility](./iceshrimp-js.ffvisibility.md)
## ffVisibility variable ## ffVisibility variable
**Signature:** **Signature:**
```typescript ```typescript
ffVisibility: readonly ["public", "followers", "private"] ffVisibility: readonly ["public", "followers", "private"]
``` ```

View file

@ -1,42 +1,42 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md)
## iceshrimp-js package ## iceshrimp-js package
## Classes ## Classes
| Class | Description | | Class | Description |
| --- | --- | | --- | --- |
| [Stream](./iceshrimp-js.stream.md) | | | [Stream](./iceshrimp-js.stream.md) | |
## Abstract Classes ## Abstract Classes
| Abstract Class | Description | | Abstract Class | Description |
| --- | --- | | --- | --- |
| [ChannelConnection](./iceshrimp-js.channelconnection.md) | | | [ChannelConnection](./iceshrimp-js.channelconnection.md) | |
## Namespaces ## Namespaces
| Namespace | Description | | Namespace | Description |
| --- | --- | | --- | --- |
| [api](./iceshrimp-js.api.md) | | | [api](./iceshrimp-js.api.md) | |
| [entities](./iceshrimp-js.entities.md) | | | [entities](./iceshrimp-js.entities.md) | |
## Variables ## Variables
| Variable | Description | | Variable | Description |
| --- | --- | | --- | --- |
| [ffVisibility](./iceshrimp-js.ffvisibility.md) | | | [ffVisibility](./iceshrimp-js.ffvisibility.md) | |
| [noteVisibilities](./iceshrimp-js.notevisibilities.md) | | | [noteVisibilities](./iceshrimp-js.notevisibilities.md) | |
| [notificationTypes](./iceshrimp-js.notificationtypes.md) | | | [notificationTypes](./iceshrimp-js.notificationtypes.md) | |
| [permissions](./iceshrimp-js.permissions.md) | | | [permissions](./iceshrimp-js.permissions.md) | |
## Type Aliases ## Type Aliases
| Type Alias | Description | | Type Alias | Description |
| --- | --- | | --- | --- |
| [Acct](./iceshrimp-js.acct.md) | | | [Acct](./iceshrimp-js.acct.md) | |
| [Channels](./iceshrimp-js.channels.md) | | | [Channels](./iceshrimp-js.channels.md) | |
| [Endpoints](./iceshrimp-js.endpoints.md) | | | [Endpoints](./iceshrimp-js.endpoints.md) | |

View file

@ -1,16 +1,16 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. --> <!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [mutedNoteReasons](./iceshrimp-js.mutednotereasons.md) [Home](./index.md) &gt; [iceshrimp-js](./iceshrimp-js.md) &gt; [mutedNoteReasons](./iceshrimp-js.mutednotereasons.md)
## mutedNoteReasons variable ## mutedNoteReasons variable
**Signature:** **Signature:**
```typescript ```typescript
mutedNoteReasons: readonly [ mutedNoteReasons: readonly [
"word", "word",
"manual", "manual",
"spam", "spam",
"other", "other",
] ]
``` ```

Some files were not shown because too many files have changed in this diff Show more