dynamicsmobile
Version:
Allows development of off-line mobile and web business apps over the Dynamics Mobile platform. More info on https://www.dynamicsmobile.com
48 lines (47 loc) • 1.83 kB
TypeScript
import { DmsApplicationService } from './application-context-service';
type WhatsAppMessageTemplateComponent = {
type: 'string';
sub_type?: 'string';
index?: string;
parameters: Array<{
type: 'text' | 'currency' | 'date_time';
text: string;
currency: {
fallback_value: string;
code: string;
amount_1000: number;
};
date_time: {
fallback_value: string;
};
}>;
};
type WhatsAppMessageTemplate = {
name: string;
components?: Array<WhatsAppMessageTemplateComponent>;
language: string;
};
type WhatsAppMessageLocation = {
name: string;
location: {
longitude: number;
latitude: number;
name: string;
address: string;
};
};
export type WhatsAppMessageContent = WhatsAppMessageTemplate | WhatsAppMessageLocation;
export declare class NotificationService {
protected dms: DmsApplicationService;
constructor(dms: DmsApplicationService);
sendSms(recipient: string, content: string): Promise<void>;
sendEmail(recipient: string, subject: string, content: string, attachments: Array<{
filePath: string;
fileName: string;
}>, sender?: string): Promise<void>;
sendViber(appCode: string, recipient: string, type: 'text' | 'url' | 'rich' | 'picture' | 'location' | 'contact', content: string): Promise<void>;
sendWhatsApp(appCode: string, recipient: string, type: 'template' | 'location', content: string | WhatsAppMessageContent): Promise<void>;
sendMessenger(appCode: string, recipient: string, type: 'text' | 'url' | 'rich' | 'picture' | 'location' | 'contact', content: string): Promise<void>;
sendDevicePush(recipient: string, type: 'custommessage' | 'sync' | 'wipeout', content: string): Promise<void>;
}
export {};