import { ResponseContext, RequestContext, HttpFile, HttpInfo } from '../http/http'; import { Configuration} from '../configuration' import { EmailRecipient } from '../models/EmailRecipient'; import { EmailSender } from '../models/EmailSender'; import { MailMessage } from '../models/MailMessage'; import { ModelError } from '../models/ModelError'; import { SendBulkMailRequest } from '../models/SendBulkMailRequest'; import { SendBulkMailResponse } from '../models/SendBulkMailResponse'; import { SendBulkMailResponseFailedInner } from '../models/SendBulkMailResponseFailedInner'; import { SendBulkMailResponseSuccessfulInner } from '../models/SendBulkMailResponseSuccessfulInner'; import { SendMailRequest } from '../models/SendMailRequest'; import { SendMailResponse } from '../models/SendMailResponse'; import { SendSMSRequest } from '../models/SendSMSRequest'; import { SendSMSResponse } from '../models/SendSMSResponse'; import { SendSlackMessageRequest } from '../models/SendSlackMessageRequest'; import { SendSlackMessageResponse } from '../models/SendSlackMessageResponse'; import { SlackMessage } from '../models/SlackMessage'; import { SlackRecipient } from '../models/SlackRecipient'; import { ObservableEmailApi } from './ObservableAPI'; import { EmailApiRequestFactory, EmailApiResponseProcessor} from "../apis/EmailApi"; export class PromiseEmailApi { private api: ObservableEmailApi public constructor( configuration: Configuration, requestFactory?: EmailApiRequestFactory, responseProcessor?: EmailApiResponseProcessor ) { this.api = new ObservableEmailApi(configuration, requestFactory, responseProcessor); } /** * Send a batch of multiple emails to individual recipients with the same content. Note that if cc or bcc address are provided, each email sent will also be sent to any addresses in these lists. Note that it is possible for only a subset of these to fail * @param sendBulkMailRequest Parameters of the messages to send */ public sendBulkWithHttpInfo(sendBulkMailRequest: SendBulkMailRequest, _options?: Configuration): Promise> { const result = this.api.sendBulkWithHttpInfo(sendBulkMailRequest, _options); return result.toPromise(); } /** * Send a batch of multiple emails to individual recipients with the same content. Note that if cc or bcc address are provided, each email sent will also be sent to any addresses in these lists. Note that it is possible for only a subset of these to fail * @param sendBulkMailRequest Parameters of the messages to send */ public sendBulk(sendBulkMailRequest: SendBulkMailRequest, _options?: Configuration): Promise { const result = this.api.sendBulk(sendBulkMailRequest, _options); return result.toPromise(); } /** * Send a single email. Note that if multiple to addresses are provided it will still only send a single email with multiple addresses in the to field. To send multiple emails to individual addresses, see the sendBulk endpoint. * @param sendMailRequest Parameters of the message to send */ public sendEmailWithHttpInfo(sendMailRequest: SendMailRequest, _options?: Configuration): Promise> { const result = this.api.sendEmailWithHttpInfo(sendMailRequest, _options); return result.toPromise(); } /** * Send a single email. Note that if multiple to addresses are provided it will still only send a single email with multiple addresses in the to field. To send multiple emails to individual addresses, see the sendBulk endpoint. * @param sendMailRequest Parameters of the message to send */ public sendEmail(sendMailRequest: SendMailRequest, _options?: Configuration): Promise { const result = this.api.sendEmail(sendMailRequest, _options); return result.toPromise(); } } import { ObservableHealthApi } from './ObservableAPI'; import { HealthApiRequestFactory, HealthApiResponseProcessor} from "../apis/HealthApi"; export class PromiseHealthApi { private api: ObservableHealthApi public constructor( configuration: Configuration, requestFactory?: HealthApiRequestFactory, responseProcessor?: HealthApiResponseProcessor ) { this.api = new ObservableHealthApi(configuration, requestFactory, responseProcessor); } /** * Readiness check - the service is ready to handle work */ public readyCheckWithHttpInfo(_options?: Configuration): Promise> { const result = this.api.readyCheckWithHttpInfo(_options); return result.toPromise(); } /** * Readiness check - the service is ready to handle work */ public readyCheck(_options?: Configuration): Promise { const result = this.api.readyCheck(_options); return result.toPromise(); } } import { ObservableNotificationApi } from './ObservableAPI'; import { NotificationApiRequestFactory, NotificationApiResponseProcessor} from "../apis/NotificationApi"; export class PromiseNotificationApi { private api: ObservableNotificationApi public constructor( configuration: Configuration, requestFactory?: NotificationApiRequestFactory, responseProcessor?: NotificationApiResponseProcessor ) { this.api = new ObservableNotificationApi(configuration, requestFactory, responseProcessor); } /** * Send a Slack message * @param sendSlackMessageRequest Parameters of the message to send */ public sendSlackNotificationWithHttpInfo(sendSlackMessageRequest: SendSlackMessageRequest, _options?: Configuration): Promise> { const result = this.api.sendSlackNotificationWithHttpInfo(sendSlackMessageRequest, _options); return result.toPromise(); } /** * Send a Slack message * @param sendSlackMessageRequest Parameters of the message to send */ public sendSlackNotification(sendSlackMessageRequest: SendSlackMessageRequest, _options?: Configuration): Promise { const result = this.api.sendSlackNotification(sendSlackMessageRequest, _options); return result.toPromise(); } } import { ObservableSmsApi } from './ObservableAPI'; import { SmsApiRequestFactory, SmsApiResponseProcessor} from "../apis/SmsApi"; export class PromiseSmsApi { private api: ObservableSmsApi public constructor( configuration: Configuration, requestFactory?: SmsApiRequestFactory, responseProcessor?: SmsApiResponseProcessor ) { this.api = new ObservableSmsApi(configuration, requestFactory, responseProcessor); } /** * Send an SMS * @param sendSMSRequest Parameters of the message to send */ public sendSMSWithHttpInfo(sendSMSRequest: SendSMSRequest, _options?: Configuration): Promise> { const result = this.api.sendSMSWithHttpInfo(sendSMSRequest, _options); return result.toPromise(); } /** * Send an SMS * @param sendSMSRequest Parameters of the message to send */ public sendSMS(sendSMSRequest: SendSMSRequest, _options?: Configuration): Promise { const result = this.api.sendSMS(sendSMSRequest, _options); return result.toPromise(); } }