export = initializer; /** * @param {String} [applicationID=process.env.PINPOINT_APP_ID] The PinPoint application/project ID. defaults to PINPOINT_APP_ID environment variable. * @param {Object} [options={}] Optional options object * @param {String} [options.originationNumber=process.env.PINPOINT_ORIGINATION_NUMBER] Origination number to use when sending a SMS text message. Defaults to the PINPOINT_ORIGINATION_NUMBER environment variable. If no value is provided, and PINPOINT_ORIGINATION_NUMBER isn't set, a randomly available number will be used * @param {PinpointClient} [options.pinPoint] A AWS PinPoint client to use instead of creating a new one. * @param {SNSClient} [options.sns] A AWS SNS client to use instead of creating a new one */ declare function initializer(applicationId?: string, options?: { originationNumber?: string; pinPoint?: PinpointClient; sns?: SNSClient; }): SMS; declare namespace initializer { export { SMS as class }; } import { PinpointClient } from "@aws-sdk/client-pinpoint/dist-types/PinpointClient"; import { SNSClient } from "@aws-sdk/client-sns/dist-types/SNSClient"; declare class SMS { /** * @param {String} [applicationID=process.env.PINPOINT_APP_ID] The PinPoint application/project ID. defaults to PINPOINT_APP_ID environment variable. * @param {Object} [options={}] Optional options object * @param {String} [options.originationNumber=process.env.PINPOINT_ORIGINATION_NUMBER] Origination number to use when sending a SMS text message. Defaults to the PINPOINT_ORIGINATION_NUMBER environment variable. If no value is provided, and PINPOINT_ORIGINATION_NUMBER isn't set, a randomly available number will be used * @param {PinpointClient} [options.pinPoint] A AWS PinPoint client to use instead of creating a new one. * @param {SNSClient} [options.sns] A AWS SNS client to use instead of creating a new one. */ constructor(applicationID?: string, options?: { originationNumber?: string; pinPoint?: PinpointClient; sns?: SNSClient; }); applicationID: string; originationNumber: string; pinPoint: PinpointClient; sns: SNSClient; /** * @param {Array|string} destinationNumbers An array or numbers or a single number in E.164 format (+12345678901) * @param {String} message Message to send * @param {Object} [options] Optional options * @param {String} [options.messageType='PROMOTION'] Message type. Either 'PROMOTION' or 'TRANSACTION' * @param {String} [options.originationNumber] Origination number in E.164 format (+12345678901). Class level number is used if not set. * @returns {Promise} Object containing any failed number(s) * @async */ send(destinationNumbers: Array | string, message: string, options?: { messageType?: string; originationNumber?: string; }): Promise; /** * * @param {string} phoneNumber The phone number to opt back in * @returns {Promise} returns true on success optIn * @throws Throws error if the phone number can't be opted out. 'Invalid parameter: Opted Out Phone number can be opted in only once in 30 days' * @async */ optIn(phoneNumber: string): Promise; /** * * @param {Object} handlers Object containing functions to trigger on specific events * @param {Function} handlers.success Function to be called on message SMS success event * @param {Function} handlers.failure Function to be called on message SMS failure event * @param {Function} handlers.optOut Function to be called on message SMS opt out event * @param {Object} [options] Optional options * @param {String} [options.accessKey] Access Key used for authentication. If no key is provided, the endpoint is considered public * https://docs.aws.amazon.com/firehose/latest/dev/httpdeliveryrequestresponse.html * https://docs.aws.amazon.com/pinpoint/latest/developerguide/event-streams-data-sms.html * https://docs.aws.amazon.com/firehose/latest/dev/httpdeliveryrequestresponse.html#requestformat * https://github.com/awsdocs/amazon-kinesis-data-firehose-developer-guide/blob/master/doc_source/httpdeliveryrequestresponse.md */ eventHandler(handlers: { success: Function; failure: Function; optOut: Function; }, options?: { accessKey?: string; }): (req: any, res: any) => Promise; } //# sourceMappingURL=index.d.ts.map