import { SdkClient } from "../common/sdk-client" ; import { MessageBrokerModels } from "./messagebroker-models" ; export class MessageBrokerClient extends SdkClient { private _baseUrl : string = "/api/messagebroker/v4" ; param { string } id param { string } versionId param { string } topicId example param { MessageBrokerModels . SubscriberTopicInput } subscription returns { Promise < MessageBrokerModels . SubscriberTopicInput > } memberOf public async PutSubscription ( id , versionId , topicId , subscription ) { const result = await this . HttpAction ( { verb : "PUT" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , body : subscription , baseUrl : `${ this . _baseUrl }/subscribers/${ id }/versions/${ versionId }/topics/${ topicId }` , } ) ; return result as MessageBrokerModels . SubscriberTopicInput ; } param { string } id param { string } versionId param { string } topicId example returns { Promise < MessageBrokerModels . SubscriberTopicInput > } memberOf public async GetSubscription ( id , versionId , topicId ) { const result = await this . HttpAction ( { verb : "GET" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/subscribers/${ id }/versions/${ versionId }/topics/${ topicId }` , } ) ; return result as MessageBrokerModels . SubscriberTopicInput ; } param { string } id param { string } versionId param { string } topicId example memberOf public async DeleteSubscription ( id , versionId , topicId ) { await this . HttpAction ( { verb : "DELETE" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/subscribers/${ id }/versions/${ versionId }/topics/${ topicId }` , noResponse : true , } ) ; } param { string } id param { MessageBrokerModels . Messages } message memberOf public async SendMessage ( id , message ) { await this . HttpAction ( { verb : "GET" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/topics/${ id }/sendmessage` , noResponse : true , } ) ; } }