import type { Store } from 'n3';
import type { Credentials } from '../../../authentication/Credentials';
import type { InteractionRoute } from '../../../identity/interaction/routing/InteractionRoute';
import { NOTIFY } from '../../../util/Vocabularies';
import { BaseChannelType } from '../BaseChannelType';
import type { NotificationChannel } from '../NotificationChannel';
import type { SubscriptionService } from '../NotificationChannelType';
import type { StateHandler } from '../StateHandler';
/**
 * A {@link NotificationChannel} containing the necessary fields for a WebHookSubscription2021 channel.
 */
export interface WebHookSubscription2021Channel extends NotificationChannel {
    /**
     * The "WebHookSubscription2021" type.
     */
    type: typeof NOTIFY.WebHookSubscription2021;
    /**
     * Where the notifications have to be sent.
     */
    target: string;
    /**
     * The WebID of the agent subscribing to the channel.
     */
    webId: string;
    /**
     * Where the agent can unsubscribe from the channel.
     */
    unsubscribe_endpoint: string;
}
/**
 * An extension of {@link SubscriptionService} adding the necessary `webid` field.
 * This is currently not part of a context so the terms are added in full to make sure the resulting RDF is valid.
 */
export interface WebHookSubscriptionService extends SubscriptionService {
    [NOTIFY.webid]: {
        id: string;
    };
}
export declare function isWebHook2021Channel(channel: NotificationChannel): channel is WebHookSubscription2021Channel;
/**
 * The notification channel type WebHookSubscription2021 as described in
 * https://github.com/solid/notifications/blob/main/webhook-subscription-2021.md
 *
 * Requires read permissions on a resource to be able to receive notifications.
 *
 * Also handles the `state` feature if present.
 */
export declare class WebHookSubscription2021 extends BaseChannelType {
    protected readonly logger: import("../../..").Logger;
    private readonly stateHandler;
    private readonly webId;
    /**
     * @param route - The route corresponding to the URL of the subscription service of this channel type.
     * @param webIdRoute - The route to the WebID that needs to be used when generating DPoP tokens for notifications.
     * @param stateHandler - The {@link StateHandler} that will be called after a successful subscription.
     * @param features - The features that need to be enabled for this channel type.
     */
    constructor(route: InteractionRoute, webIdRoute: InteractionRoute, stateHandler: StateHandler, features?: string[]);
    getDescription(): WebHookSubscriptionService;
    initChannel(data: Store, credentials: Credentials): Promise<WebHookSubscription2021Channel>;
    toJsonLd(channel: NotificationChannel): Promise<Record<string, unknown>>;
    completeChannel(channel: NotificationChannel): Promise<void>;
}
