import type { ToJSONSerializable } from '../../lib/utils/json.js';
import type { HTTPSignedField } from '../../lib/http-server/common.js';
import type { Signable } from '../../lib/utils/signing.js';
import type { Account, GenericAccount } from '@keetanetwork/keetanet-client/lib/account.js';
import { KeetaAnchorCertificateRequiredError, KeetaAnchorUserError } from '../../lib/error.js';
export * from './common.generated.js';
interface BaseNotificationChannelArguments<T extends string> {
    type: T;
}
interface FCMNotificationChannelArguments extends BaseNotificationChannelArguments<'FCM'> {
    appId: string;
    fcmToken: string;
}
export type NotificationChannelArguments = FCMNotificationChannelArguments;
export type NotificationChannelType = NotificationChannelArguments['type'];
interface NotificationChannelServiceMetadata {
    FCM: {
        projectId: string;
        messagingSenderId: string;
        appId: string;
        apiKey: string;
        vapidKey?: string;
        bundleId?: string;
    };
}
interface BaseNotificationSubscriptionArguments<T extends string> {
    type: T;
    locale?: Intl.Locale;
    target: {
        provider?: string | undefined;
        ids: string[];
    };
}
interface ReceiveFundsNotificationSubscriptionArguments extends BaseNotificationSubscriptionArguments<'RECEIVE_FUNDS'> {
    toAddress?: GenericAccount;
}
export type NotificationSubscriptionArguments = ReceiveFundsNotificationSubscriptionArguments;
export type NotificationSubscriptionArgumentsJSON = ToJSONSerializable<Omit<NotificationSubscriptionArguments, 'locale'>> & {
    locale?: string | undefined;
};
export type NotificationSubscriptionType = NotificationSubscriptionArguments['type'];
export type SupportedChannelConfigurationMetadata = {
    FCM: NotificationChannelServiceMetadata['FCM'][];
};
export interface NotificationTargetWithIDResponse {
    id: string;
    channel: NotificationChannelArguments;
}
export interface KeetaNotificationAnchorRegisterTargetClientRequest {
    account?: Account;
    channel: NotificationChannelArguments;
}
export interface KeetaNotificationAnchorRegisterTargetRequest extends KeetaNotificationAnchorRegisterTargetClientRequest {
    account: Account;
    signed: HTTPSignedField;
}
export type KeetaNotificationAnchorRegisterTargetRequestJSON = ToJSONSerializable<KeetaNotificationAnchorRegisterTargetRequest>;
export type KeetaNotificationAnchorRegisterTargetResponseJSON = ({
    ok: true;
    id: string;
}) | ({
    ok: false;
    error: string;
});
export declare function getNotificationRegisterTargetRequestSignable(request: Pick<KeetaNotificationAnchorRegisterTargetClientRequest, 'channel'>): Signable;
export interface KeetaNotificationAnchorListTargetsClientRequest {
    account?: Account;
}
interface KeetaNotificationAnchorListTargetsRequest extends KeetaNotificationAnchorListTargetsClientRequest {
    account: Account;
    signed: HTTPSignedField;
}
export type KeetaNotificationAnchorListTargetsRequestJSON = ToJSONSerializable<KeetaNotificationAnchorListTargetsRequest>;
export type KeetaNotificationAnchorListTargetsResponse = ({
    ok: true;
    targets: NotificationTargetWithIDResponse[];
}) | ({
    ok: false;
    error: string;
});
export type KeetaNotificationAnchorListTargetsResponseJSON = ToJSONSerializable<KeetaNotificationAnchorListTargetsResponse>;
export declare function getNotificationListTargetsRequestSignable(_ignore_request?: KeetaNotificationAnchorListTargetsClientRequest): Signable;
export interface KeetaNotificationAnchorDeleteTargetClientRequest {
    account?: Account;
    id: string;
}
export interface KeetaNotificationAnchorDeleteTargetRequest extends KeetaNotificationAnchorDeleteTargetClientRequest {
    account: Account;
    signed: HTTPSignedField;
}
export type KeetaNotificationAnchorDeleteTargetRequestJSON = ToJSONSerializable<KeetaNotificationAnchorDeleteTargetRequest>;
export type KeetaNotificationAnchorDeleteTargetResponse = ({
    ok: true;
}) | ({
    ok: false;
    error: string;
});
export type KeetaNotificationAnchorDeleteTargetResponseJSON = ToJSONSerializable<KeetaNotificationAnchorDeleteTargetResponse>;
export declare function getNotificationDeleteTargetRequestSignable(request: Pick<KeetaNotificationAnchorDeleteTargetClientRequest, 'id'>): Signable;
export interface KeetaNotificationAnchorCreateSubscriptionClientRequest {
    account?: Account;
    subscription: NotificationSubscriptionArguments;
}
export type KeetaNotificationAnchorCreateSubscriptionRequestJSON = {
    subscription: NotificationSubscriptionArgumentsJSON;
    account: string;
    signed: HTTPSignedField;
};
export type KeetaNotificationAnchorCreateSubscriptionResponse = ({
    ok: true;
    id: string;
}) | ({
    ok: false;
    error: string;
});
export type KeetaNotificationAnchorCreateSubscriptionResponseJSON = ToJSONSerializable<KeetaNotificationAnchorCreateSubscriptionResponse>;
export declare function getNotificationCreateSubscriptionRequestSignable(request: Pick<KeetaNotificationAnchorCreateSubscriptionClientRequest, 'subscription'>): Signable;
export interface KeetaNotificationAnchorDeleteSubscriptionClientRequest {
    account?: Account;
    id: string;
}
export interface KeetaNotificationAnchorDeleteSubscriptionRequest extends KeetaNotificationAnchorDeleteSubscriptionClientRequest {
    account: Account;
    signed: HTTPSignedField;
}
export type KeetaNotificationAnchorDeleteSubscriptionRequestJSON = ToJSONSerializable<KeetaNotificationAnchorDeleteSubscriptionRequest>;
export type KeetaNotificationAnchorDeleteSubscriptionResponse = ({
    ok: true;
}) | ({
    ok: false;
    error: string;
});
export type KeetaNotificationAnchorDeleteSubscriptionResponseJSON = ToJSONSerializable<KeetaNotificationAnchorDeleteSubscriptionResponse>;
export declare function getNotificationDeleteSubscriptionRequestSignable(request: Pick<KeetaNotificationAnchorDeleteSubscriptionClientRequest, 'id'>): Signable;
export interface SubscriptionDetails {
    id: string;
    subscription: NotificationSubscriptionArguments;
}
export type SubscriptionDetailsJSON = ToJSONSerializable<Omit<SubscriptionDetails, 'subscription'>> & {
    subscription: NotificationSubscriptionArgumentsJSON;
};
export declare function parseSubscriptionDetailsWithID(input: SubscriptionDetailsJSON | SubscriptionDetails): SubscriptionDetails;
export interface KeetaNotificationAnchorListSubscriptionsClientRequest {
    account?: Account;
}
interface KeetaNotificationAnchorListSubscriptionsRequest extends KeetaNotificationAnchorListSubscriptionsClientRequest {
    account: Account;
    signed: HTTPSignedField;
}
export type KeetaNotificationAnchorListSubscriptionsRequestJSON = ToJSONSerializable<KeetaNotificationAnchorListSubscriptionsRequest>;
export type KeetaNotificationAnchorListSubscriptionsResponse = ({
    ok: true;
    subscriptions: SubscriptionDetailsJSON[];
}) | ({
    ok: false;
    error: string;
});
export type KeetaNotificationAnchorListSubscriptionsResponseJSON = ToJSONSerializable<KeetaNotificationAnchorListSubscriptionsResponse>;
export declare function getNotificationListSubscriptionsRequestSignable(_ignore_request?: KeetaNotificationAnchorListSubscriptionsClientRequest): Signable;
interface KeetaNotificationAnchorMethodNotSupportedErrorProperties {
    channelType?: NotificationChannelType | undefined;
    subscriptionType?: NotificationSubscriptionType | undefined;
}
type KeetaNotificationAnchorMethodNotSupportedErrorJSON = ReturnType<KeetaAnchorUserError['toJSON']> & KeetaNotificationAnchorMethodNotSupportedErrorProperties;
declare class KeetaNotificationAnchorMethodNotSupportedError extends KeetaAnchorUserError implements KeetaNotificationAnchorMethodNotSupportedErrorProperties {
    static readonly name: string;
    private readonly KeetaNotificationAnchorMethodNotSupportedErrorObjectTypeID;
    private static readonly KeetaNotificationAnchorMethodNotSupportedErrorObjectTypeID;
    readonly logLevel = "INFO";
    readonly channelType?: NotificationChannelType | undefined;
    readonly subscriptionType?: NotificationSubscriptionType | undefined;
    constructor(properties: KeetaNotificationAnchorMethodNotSupportedErrorProperties, message?: string);
    static isInstance(input: unknown): input is KeetaNotificationAnchorMethodNotSupportedError;
    toJSON(): KeetaNotificationAnchorMethodNotSupportedErrorJSON;
    static fromJSON(input: unknown): Promise<KeetaNotificationAnchorMethodNotSupportedError>;
}
export declare const Errors: {
    MethodNotSupported: typeof KeetaNotificationAnchorMethodNotSupportedError;
    CertificateRequired: typeof KeetaAnchorCertificateRequiredError;
};
//# sourceMappingURL=common.d.ts.map