mirror of
https://github.com/misskey-dev/misskey
synced 2024-05-20 02:09:53 +02:00
39748ea0c3
* feat: アンテナのエクスポートに対応 (misskey-dev/misskey#10690) * feat: アンテナのインポートに対応 (misskey-dev/misskey#10690) * fix: タイポを修正 * feat: ユーザーリストをサポート * fix: バグを直した * fix: バグを直した * fix: 適当に決めた変数名を変更 * fix * fix: 変数の変更、リファクタリング
113 lines
2.6 KiB
TypeScript
113 lines
2.6 KiB
TypeScript
import type { Antenna } from '@/server/api/endpoints/i/import-antennas.js';
|
|
import type { DriveFile } from '@/models/entities/DriveFile.js';
|
|
import type { Note } from '@/models/entities/Note.js';
|
|
import type { User } from '@/models/entities/User.js';
|
|
import type { Webhook } from '@/models/entities/Webhook.js';
|
|
import type { IActivity } from '@/core/activitypub/type.js';
|
|
import type httpSignature from '@peertube/http-signature';
|
|
|
|
export type DeliverJobData = {
|
|
/** Actor */
|
|
user: ThinUser;
|
|
/** Activity */
|
|
content: unknown;
|
|
/** inbox URL to deliver */
|
|
to: string;
|
|
/** whether it is sharedInbox */
|
|
isSharedInbox: boolean;
|
|
};
|
|
|
|
export type InboxJobData = {
|
|
activity: IActivity;
|
|
signature: httpSignature.IParsedSignature;
|
|
};
|
|
|
|
export type RelationshipJobData = {
|
|
from: ThinUser;
|
|
to: ThinUser;
|
|
silent?: boolean;
|
|
requestId?: string;
|
|
}
|
|
|
|
export type DbJobData<T extends keyof DbJobMap> = DbJobMap[T];
|
|
|
|
export type DbJobMap = {
|
|
deleteDriveFiles: DbJobDataWithUser;
|
|
exportCustomEmojis: DbJobDataWithUser;
|
|
exportAntennas: DBExportAntennasData;
|
|
exportNotes: DbJobDataWithUser;
|
|
exportFavorites: DbJobDataWithUser;
|
|
exportFollowing: DbExportFollowingData;
|
|
exportMuting: DbJobDataWithUser;
|
|
exportBlocking: DbJobDataWithUser;
|
|
exportUserLists: DbJobDataWithUser;
|
|
importAntennas: DBAntennaImportJobData;
|
|
importFollowing: DbUserImportJobData;
|
|
importFollowingToDb: DbUserImportToDbJobData;
|
|
importMuting: DbUserImportJobData;
|
|
importBlocking: DbUserImportJobData;
|
|
importBlockingToDb: DbUserImportToDbJobData;
|
|
importUserLists: DbUserImportJobData;
|
|
importCustomEmojis: DbUserImportJobData;
|
|
deleteAccount: DbUserDeleteJobData;
|
|
}
|
|
|
|
export type DbJobDataWithUser = {
|
|
user: ThinUser;
|
|
}
|
|
|
|
export type DbExportFollowingData = {
|
|
user: ThinUser;
|
|
excludeMuting: boolean;
|
|
excludeInactive: boolean;
|
|
};
|
|
|
|
export type DBExportAntennasData = {
|
|
user: ThinUser
|
|
}
|
|
|
|
export type DbUserDeleteJobData = {
|
|
user: ThinUser;
|
|
soft?: boolean;
|
|
};
|
|
|
|
export type DbUserImportJobData = {
|
|
user: ThinUser;
|
|
fileId: DriveFile['id'];
|
|
};
|
|
|
|
export type DBAntennaImportJobData = {
|
|
user: ThinUser,
|
|
antenna: Antenna
|
|
}
|
|
|
|
export type DbUserImportToDbJobData = {
|
|
user: ThinUser;
|
|
target: string;
|
|
};
|
|
|
|
export type ObjectStorageJobData = ObjectStorageFileJobData | Record<string, unknown>;
|
|
|
|
export type ObjectStorageFileJobData = {
|
|
key: string;
|
|
};
|
|
|
|
export type EndedPollNotificationJobData = {
|
|
noteId: Note['id'];
|
|
};
|
|
|
|
export type WebhookDeliverJobData = {
|
|
type: string;
|
|
content: unknown;
|
|
webhookId: Webhook['id'];
|
|
userId: User['id'];
|
|
to: string;
|
|
secret: string;
|
|
createdAt: number;
|
|
eventId: string;
|
|
};
|
|
|
|
export type ThinUser = {
|
|
id: User['id'];
|
|
};
|