jormungandr-bite/packages/iceshrimp-js/markdown/iceshrimp-js.entities.notification.md
limepotato 4410989fa2
revert ba0e5eec93
revert ?
2024-06-17 18:18:03 +02:00

1.7 KiB

Home > iceshrimp-js > entities > Notification

entities.Notification type

Signature:

export declare type Notification = {
	id: ID;
	createdAt: DateString;
	isRead: boolean;
} & (
	| {
			type: "reaction";
			reaction: string;
			user: User;
			userId: User["id"];
			note: Note;
	  }
	| {
			type: "reply";
			user: User;
			userId: User["id"];
			note: Note;
	  }
	| {
			type: "renote";
			user: User;
			userId: User["id"];
			note: Note;
	  }
	| {
			type: "quote";
			user: User;
			userId: User["id"];
			note: Note;
	  }
	| {
			type: "mention";
			user: User;
			userId: User["id"];
			note: Note;
	  }
	| {
			type: "pollVote";
			user: User;
			userId: User["id"];
			note: Note;
	  }
	| {
			type: "follow";
			user: User;
			userId: User["id"];
	  }
	| {
			type: "followRequestAccepted";
			user: User;
			userId: User["id"];
	  }
	| {
			type: "receiveFollowRequest";
			user: User;
			userId: User["id"];
	  }
	| {
			type: "groupInvited";
			invitation: UserGroup;
			user: User;
			userId: User["id"];
	  }
	| {
			type: "app";
			header?: string | null;
			body: string;
			icon?: string | null;
	  }
);

References: ID, DateString, User, Note, UserGroup