import { SmsVerificationType } from '../../domain/entities/sms-verification.entity';

export interface SmsDeliveryResult {
  success: boolean;
  providerId?: string;
  errorMsg?: string;
}

export interface ISmsProvider {
  /**
   * 发送短信验证码
   * @param phone E.164 格式手机号
   * @param code 6位验证码
   * @param type 验证码类型
   */
  send(
    phone: string,
    code: string,
    type: SmsVerificationType,
  ): Promise<SmsDeliveryResult>;
}

export const SMS_PROVIDER = Symbol('ISmsProvider');
