@longears-mobile/rcs-sdk
Version:
Provider-agnostic SDK for RCS (Rich Communication Services) messaging
35 lines • 1.43 kB
TypeScript
import { Suggestion, SuggestionAction, RCSMessage } from '../interfaces/index.js';
/**
* Validates if a phone number is in E.164 format
*/
export declare function isValidE164(phoneNumber: string): boolean;
/**
* Formats a phone number to E.164 format
*/
export declare function formatPhoneNumber(phoneNumber: string, countryCode?: string): string | null;
/**
* Message builder for creating RCS messages
*/
export declare class MessageBuilder {
private message;
constructor(to?: string);
to(phoneNumber: string): this;
setText(text: string): this;
addMedia(url: string, type: 'image' | 'video' | 'audio' | 'file', thumbnailUrl?: string): this;
addReply(text: string, postbackData?: string): this;
addAction(text: string, actionType: SuggestionAction['type'], data?: string): this;
setMetadata(metadata: any): this;
build(): RCSMessage;
}
/**
* Suggestion builder for creating suggestions
*/
export declare class SuggestionBuilder {
static reply(text: string, postbackData?: string): Suggestion;
static action(text: string, actionType: SuggestionAction['type'], data?: string): Suggestion;
static dial(text: string, phoneNumber: string): Suggestion;
static openUrl(text: string, url: string): Suggestion;
static shareLocation(text: string): Suggestion;
static createCalendarEvent(text: string, eventData?: string): Suggestion;
}
//# sourceMappingURL=index.d.ts.map