UNPKG

mammoth-api

Version:

Typescript types for the mammoth server.

56 lines (55 loc) 1.75 kB
import type { Activity, ObjectRef, ObjectRefs, ObjectType } from 'mammoth-activitystreams'; import type { Actor, APObject } from 'mammoth-activitypub'; export interface User { userId: string; password: string; hashedPassword: string; email: string; userDb: string; publicKey: string; privateKey: string; admin: boolean; } export declare enum NotificationType { LikedUsersPost = "LikedUsersPost", LikedUsersReply = "LikedUsersReply", LikedUser = "LikedUser", RepliedToUsersPost = "RepliedToUsersPost", RepliedToUsersReply = "RepliedToUsersReply", EditedAPostUserRespondedTo = "EditedAPostUserRespondedTo", EditedAReplyUserRespondedTo = "EditedAReplyUserRespondedTo", SentUserAFollowRequest = "SentUserAFollowRequest", AcceptedUsersFollowRequest = "AcceptedUsersFollowRequest", SharedUsersPost = "SharedUsersPost", SentUserAFriendRequest = "SentUserAFriendRequest", AcceptedUsersFriendRequest = "AcceptedUsersFriendRequest" } export interface Notification { id: string; type: 'Notification'; activity: NotificationType; published: string; object: ObjectRefs<APObject>; target: ObjectRef<APObject>; actor: ObjectRefs<Actor>; aggregation: string; read: boolean; } export interface NotificationAggregation { id: string; type: 'NotificationAggregation'; activity: ObjectType; object: ObjectRef<Activity>; read: boolean; } export declare enum FetchInstruction { Resolve = "Resolve", PopulateCollection = "PopulateCollection" } export declare type FetchInstructions = { recursive?: boolean; type?: 'Object' | 'Collection'; fetch?: { [key: string]: FetchInstruction | FetchInstructions; }; };