oak-general-business/lib/utils/sms/tencent.d.ts

30 lines
1.0 KiB
TypeScript

import { BackendRuntimeContext } from '../../context/BackendRuntimeContext';
import Sms from "../../types/Sms";
import { EntityDict } from '../../oak-app-domain';
import { TencentSmsConfig } from '../../types/Config';
export default class Tencent implements Sms<EntityDict> {
name: string;
getConfig(context: BackendRuntimeContext<EntityDict>, systemId?: string): Promise<{
config: TencentSmsConfig;
mockSend: boolean | undefined;
}>;
syncTemplate(options: {
systemId: string;
pageIndex?: number;
pageSize?: number;
international?: number;
}, context: BackendRuntimeContext<EntityDict>): Promise<{
templateCode: string;
templateName: string;
templateContent: string;
}[]>;
sendSms(params: {
mobile: string;
templateParam?: Record<string, string>;
smsTemplate: Partial<EntityDict['smsTemplate']['Schema']>;
}, context: BackendRuntimeContext<EntityDict>): Promise<{
success: boolean;
res: any;
}>;
}