/**
 * `sns-service.js`
 * - encrypt/decrypt service api with KMS
 *
 *
 * @author      Steve Jung <steve@lemoncloud.io>
 * @date        2019-07-19 initial version
 * @date        2019-11-26 cleanup and optimized for `lemon-core#v2`
 *
 * @copyright (C) lemoncloud.io 2019 - All Rights Reserved.
 */
import { LemonEngine } from '../../engine';
import { CoreSnsService } from '../core-services';
import { AwsConfigParams } from '../../tools';
/**
 * main service instance.
 */
export declare class AWSSNSService implements CoreSnsService {
    /**
     * environ name of SNS KEY
     * - for self messaging.
     */
    static ENV_SNS_ENDPOINT: string;
    static DEF_SNS_ENDPOINT: string;
    private _arn;
    constructor(arn?: string);
    /**
     * get name of this
     */
    name: () => string;
    /**
     * hello
     */
    hello: () => string;
    /**
     * get target endpoint by name.
     */
    endpoint: (target?: string) => Promise<string>;
    /**
     * get current aws account-id.
     *
     * refer: `https://stackoverflow.com/questions/35563270/finding-my-aws-account-id-using-javascript`
     */
    accountID: (engine?: LemonEngine, $cfg?: AwsConfigParams) => Promise<string>;
    /**
     * publish message
     *
     * @return {string | object}     message-id
     */
    publish: (target: string, subject: string, payload: any) => Promise<string>;
    /**
     * report error via SNS with subject 'error'
     * - default to `lemon-hello-sns` or using `env[REPORT_ERROR_ARN]`
     *
     * @param e             Error instance
     * @param data          simple text message or object to override.
     * @param target        (optional) target SNS arn (default is `REPORT_ERROR_ARN`)
     */
    reportError: (e: Error, data: any, target?: string) => Promise<string>;
    /**
     * convert Error to payload.
     */
    asPayload: (e: any, data: string | object) => {
        'stack-trace'?: any;
        message: string;
        error: string;
        errorss?: any[];
    };
}
