hunk.code_window:   // This interface describes the options you want to pass to
     // NotifireModule.
     //
     providers: Array<any>;
     templates: Array<any>;
   }
hunk.labels: keep keep keep replace replace keep
hunk.after_edit:   providers: IProvider[];
     templates: ITemplate[];
  
hunk.file_path: packages/nest/src/interfaces/notifire-options.interface.ts
hunk.type: replace
file: import {
    ChannelTypeEnum,
    ISendMessageSuccessResponse,
    ISmsOptions,
    ISmsProvider,
  } from '@notifire/core';
  import { PublishCommand, SNSClient } from '@aws-sdk/client-sns';
  
  import { SNSConfig } from './sns.config';
  
  export class SNSSmsProvider implements ISmsProvider {
    id = 'sns';
    channelType = ChannelTypeEnum.SMS as ChannelTypeEnum.SMS;
    private client: SNSClient;
  
    constructor(private readonly config: SNSConfig) {
      this.client = new SNSClient({
        region: this.config.region,
        credentials: {
          accessKeyId: this.config.accessKeyId,
          secretAccessKey: this.config.secretAccessKey,
        },
      });
    }
  
    async sendMessage(
      options: ISmsOptions
    ): Promise<ISendMessageSuccessResponse> {
      const { to, content } = options;
  
      const publish = new PublishCommand({
        PhoneNumber: to,
        Message: content,
      });
  
      const snsResponse = await this.client.send(publish);
  
      return {
        id: snsResponse.MessageId,
        date: new Date().toISOString(),
      };
    }
  }
  