import { ISMSCreateBatchRequest, ISMSCreateRequest, ISMSGetParams, ISMSGetReceivedParams, ISMSListResponse, ISMSResponse, ISMSStatusObject, ISMSUpdateRequest } from '../Intellipush.types'; import ApiBase from './Base'; export interface ISMSModule { create(params: ISMSCreateRequest): Promise; createScheduled(dateTime: Date | string, params: ISMSCreateRequest): Promise; createBatch(params: ISMSCreateBatchRequest): Promise; getPlanned(id: string): Promise; getUnsent(params: ISMSGetParams): Promise; getSent(params: ISMSGetParams): Promise; getReceived(params: ISMSGetReceivedParams): Promise; update(params: ISMSUpdateRequest): Promise; status(ids: number[] | string[]): Promise; delete(id: string): Promise; } export default class SMS extends ApiBase implements ISMSModule { prefix: string; /** * Create an SMS, for immediate or future sending. * * @param params */ create(params: ISMSCreateRequest): Promise; /** * Create an SMS, for future sending. * * @param dateTime * @param params */ createScheduled(dateTime: Date | string, params: ISMSCreateRequest): Promise; /** * Create SMS Batch * * @param params */ createBatch(params: ISMSCreateBatchRequest): Promise; /** * Update an SMS that is not yet sent. * * @param params */ update(params: ISMSUpdateRequest): Promise; /** * Getting a notification that is still unsent. * * @param id */ getPlanned(id: string): Promise; /** * Get a list of sent SMS messages * * @param params */ getSent(params: ISMSGetParams): Promise; /** * Get a list of unsent SMS messages * * @param params */ getUnsent(params: ISMSGetParams): Promise; /** * Get received SMS messages * * @param params */ getReceived(params: ISMSGetReceivedParams): Promise; /** * Get status for a number of SMS messages * * @param ids */ status(ids: number[] | string[]): Promise; /** * Delete an SMS that is not yet sent. * * @param id */ delete(id: string): Promise; }