import * as API from "../../common/api"; import { CollectionDoc, Events, NewTask, QueryParams, Resource, ResourceId, Scope, SingleDoc, State, Task, Time } from "../../common/structures"; export declare function document(): typeof CollectionRequest; export declare function document(id: ResourceId): SingleRequest; export interface Collection extends CollectionDoc { data: Notification[]; meta?: CollectionMeta; } export interface Single extends SingleDoc { data: Notification | null; } export interface Notification extends Resource { creator: ResourceId; code: string; url: string; message: string; owner: Scope; events: Events & { read: Time; }; state: State; type: NotificationType; } export interface CollectionMeta { unread: number; } export declare type NotificationState = "new" | "read" | "hidden"; export declare type NotificationType = "success" | "error" | "warning" | "info"; export declare type CollectionAction = "mark_read"; export declare class CollectionRequest { static readonly target: string; static get(query?: QueryParams): Promise>; static markAllAsRead(): Promise>>; static task(t: NewTask, query?: QueryParams): Promise>>; } export declare class SingleRequest { private target; constructor(id: ResourceId); markAsRead(): Promise>>; task(t: NewTask, query?: QueryParams): Promise>>; get(query?: QueryParams): Promise>; }