medusa-twilio-sms
Version:
Twilio SMS notification provider for Medusa v2
21 lines (20 loc) • 861 B
TypeScript
import { Logger, NotificationTypes } from "@medusajs/framework/types";
import { AbstractNotificationProviderService } from "@medusajs/framework/utils";
import { Twilio } from "twilio";
import { TwilioConfig } from "../types";
type InjectedDependencies = {
logger: Logger;
};
export declare class TwilioSmsService extends AbstractNotificationProviderService {
static identifier: string;
protected logger_: Logger;
protected twilioClient_: Twilio;
protected fromNumber_?: string;
protected messagingServiceSid_?: string;
protected maxRetries_: number;
protected retryDelay_: number;
constructor({ logger }: InjectedDependencies, options: TwilioConfig);
send(notification: NotificationTypes.ProviderSendNotificationDTO): Promise<NotificationTypes.ProviderSendNotificationResultsDTO>;
private sendWithRetry;
}
export {};