UNPKG

@lantsang/nestjs-ucpaas-sms

Version:

nestjs 云之讯平台短信集成插件

20 lines (19 loc) 890 B
import { HttpService } from '@nestjs/common'; import { UcpaasModuleOptions } from '../interfaces/options.interface'; import { SendSmsResponse } from '../interfaces/response/sms/send-sms.response.interface'; import { RegexUtil } from '../utils/regex.util'; export declare class UcpaasSendService { private readonly options; private readonly httpService; private readonly regexUtil; constructor(options: UcpaasModuleOptions, httpService: HttpService, regexUtil: RegexUtil); /** * 根据模板ID发送单条短信 * @param templateId 云之讯平台短信模板ID * @param mobile 接收人手机号码 * @param param 模板参数,中间以逗号(,)分割 * @param uid 透传uid,自定义 * @returns 单条短信发送结果 */ send(templateId: string, mobile: string, param: string, uid?: string): Promise<SendSmsResponse>; }