@altravia/openapi
Version:
Official OpenApi NodeJS Client
35 lines • 1.57 kB
TypeScript
import { AxiosInstance } from "axios";
import { Environment, Service } from "..";
export interface SmsOptions {
flash?: boolean;
timestamp_send?: string;
custom?: string;
callback_url?: string;
callback_field?: string;
realtime?: boolean;
bulk?: boolean;
}
export interface SmsRecipient {
number: string;
fields: any;
}
export declare class Sms implements Service {
client: AxiosInstance;
readonly service = "sms";
readonly baseUrl = "ws.messaggisms.com";
environment: Environment;
constructor(client: AxiosInstance, environment: Environment);
/**
* @param id Se viene passato un id, ritorna un array contenente esclusivamente quel messaggio
* @returns Ritorna la lista di tutti i messaggi inviati
*/
getMessages(id?: string): Promise<Array<any>>;
/**
*
* @param recipients Phone number of the recipient and wanting the 'fields' object in which to insert the parameters that we want to enter in the 'body' like this: {'number':'+39-34xxxxx987', 'fields':{'name':'simone', 'surname':'rossi'}}. Mandatory is the international prefix which must be separated from the rest by '-' like this: '+39-number'. Any other format will be considered bad recipients and placed among the invalid
* @todo Supporto per le transazioni
*/
send(sender: string | number, message: string, recipients: string | Array<string | SmsRecipient>, priority: number | undefined, options: SmsOptions, test?: boolean): Promise<Array<any>>;
get url(): string;
}
//# sourceMappingURL=Sms.d.ts.map