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 interface EmailApiSendBulkRequest { /** * Parameters of the messages to send * @type SendBulkMailRequest * @memberof EmailApisendBulk */ sendBulkMailRequest: SendBulkMailRequest } export interface EmailApiSendEmailRequest { /** * Parameters of the message to send * @type SendMailRequest * @memberof EmailApisendEmail */ sendMailRequest: SendMailRequest } export class ObjectEmailApi { 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 param the request object */ public sendBulkWithHttpInfo(param: EmailApiSendBulkRequest, options?: Configuration): Promise> { return this.api.sendBulkWithHttpInfo(param.sendBulkMailRequest, options).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 param the request object */ public sendBulk(param: EmailApiSendBulkRequest, options?: Configuration): Promise { return this.api.sendBulk(param.sendBulkMailRequest, options).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 param the request object */ public sendEmailWithHttpInfo(param: EmailApiSendEmailRequest, options?: Configuration): Promise> { return this.api.sendEmailWithHttpInfo(param.sendMailRequest, options).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 param the request object */ public sendEmail(param: EmailApiSendEmailRequest, options?: Configuration): Promise { return this.api.sendEmail(param.sendMailRequest, options).toPromise(); } } import { ObservableHealthApi } from "./ObservableAPI"; import { HealthApiRequestFactory, HealthApiResponseProcessor} from "../apis/HealthApi"; export interface HealthApiReadyCheckRequest { } export class ObjectHealthApi { 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 * @param param the request object */ public readyCheckWithHttpInfo(param: HealthApiReadyCheckRequest = {}, options?: Configuration): Promise> { return this.api.readyCheckWithHttpInfo( options).toPromise(); } /** * Readiness check - the service is ready to handle work * @param param the request object */ public readyCheck(param: HealthApiReadyCheckRequest = {}, options?: Configuration): Promise { return this.api.readyCheck( options).toPromise(); } } import { ObservableNotificationApi } from "./ObservableAPI"; import { NotificationApiRequestFactory, NotificationApiResponseProcessor} from "../apis/NotificationApi"; export interface NotificationApiSendSlackNotificationRequest { /** * Parameters of the message to send * @type SendSlackMessageRequest * @memberof NotificationApisendSlackNotification */ sendSlackMessageRequest: SendSlackMessageRequest } export class ObjectNotificationApi { private api: ObservableNotificationApi public constructor(configuration: Configuration, requestFactory?: NotificationApiRequestFactory, responseProcessor?: NotificationApiResponseProcessor) { this.api = new ObservableNotificationApi(configuration, requestFactory, responseProcessor); } /** * Send a Slack message * @param param the request object */ public sendSlackNotificationWithHttpInfo(param: NotificationApiSendSlackNotificationRequest, options?: Configuration): Promise> { return this.api.sendSlackNotificationWithHttpInfo(param.sendSlackMessageRequest, options).toPromise(); } /** * Send a Slack message * @param param the request object */ public sendSlackNotification(param: NotificationApiSendSlackNotificationRequest, options?: Configuration): Promise { return this.api.sendSlackNotification(param.sendSlackMessageRequest, options).toPromise(); } } import { ObservableSmsApi } from "./ObservableAPI"; import { SmsApiRequestFactory, SmsApiResponseProcessor} from "../apis/SmsApi"; export interface SmsApiSendSMSRequest { /** * Parameters of the message to send * @type SendSMSRequest * @memberof SmsApisendSMS */ sendSMSRequest: SendSMSRequest } export class ObjectSmsApi { private api: ObservableSmsApi public constructor(configuration: Configuration, requestFactory?: SmsApiRequestFactory, responseProcessor?: SmsApiResponseProcessor) { this.api = new ObservableSmsApi(configuration, requestFactory, responseProcessor); } /** * Send an SMS * @param param the request object */ public sendSMSWithHttpInfo(param: SmsApiSendSMSRequest, options?: Configuration): Promise> { return this.api.sendSMSWithHttpInfo(param.sendSMSRequest, options).toPromise(); } /** * Send an SMS * @param param the request object */ public sendSMS(param: SmsApiSendSMSRequest, options?: Configuration): Promise { return this.api.sendSMS(param.sendSMSRequest, options).toPromise(); } }