weverse
Version:
Wrapper for weverse private API
57 lines (56 loc) • 1.87 kB
TypeScript
import { NotifContentKeys, Notification } from "../types";
import { WeverseCommunity, WeverseArtist } from ".";
declare const WeverseNotification_base: new (t: {
id: number;
message: string;
boldElement: string;
communityId: number;
communityName: string;
contentsExtraInfo: {
replyCommentId: number | undefined;
originContentId: number | undefined;
originContentType: import("../types").NotificationType | undefined;
};
contentsType: import("../types").NotificationType;
contentsId: number;
notifiedAt: Date;
iconImageUrl: URL;
artistId: number | undefined;
isMembershipContent: boolean;
isWebOnly: boolean;
platform: string;
}) => {
id: number;
message: string;
boldElement: string;
communityId: number;
communityName: string;
contentsExtraInfo: {
replyCommentId: number | undefined;
originContentId: number | undefined;
originContentType: import("../types").NotificationType | undefined;
};
contentsType: import("../types").NotificationType;
contentsId: number;
notifiedAt: Date;
iconImageUrl: URL;
artistId: number | undefined;
isMembershipContent: boolean;
isWebOnly: boolean;
platform: string;
};
export declare class WeverseNotification extends WeverseNotification_base {
community: WeverseCommunity;
artist?: WeverseArtist;
type?: NotifContentKeys;
constructor(props: Notification, community: WeverseCommunity, artist?: WeverseArtist);
toJSON(): Partial<WeverseNotification>;
}
export declare class ClientNotifications {
all: WeverseNotification[];
new: WeverseNotification[];
allMap: Map<number, WeverseNotification>;
get(id: number): WeverseNotification | undefined;
addMany(notifications: WeverseNotification[]): WeverseNotification[];
}
export {};