import { toQueryString } from "../../utils" ; import { SdkClient } from "../common/sdk-client" ; import { EventManagementModels } from "./event-models" ; export class EventManagementClient extends SdkClient { private _baseUrl : string = "/api/eventmanagement/v3" ; returns { Promise < EventManagementModels . Billboard > } memberOf public async GetBillboard ( ) { return ( await this . HttpAction ( { verb : "GET" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/` , } ) ) as EventManagementModels . InfoResponse ; } param { EventManagementModels . CustomEvent } event param { { includeShared ? : boolean ; * } } params param { { boolean } } params . includeShared returns { Promise < EventManagementModels . CustomEventCreated > } memberOf public async PostEvent ( event , params ? ) { const parameters = params || { } ; const { includeShared } = parameters ; return ( await this . HttpAction ( { verb : "POST" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/events?${ toQueryString ( { includeShared } ) }` , body : event , } ) ) as EventManagementModels . CustomEventCreated ; } param { { page ? : number ; size ? : number ; sort ? : string ; filter ? : string ; ifNoneMatch ? : string ; history ? : boolean ; includeShared ? : boolean ; * } } params param { number } params . size param { number } params . page param { string } params . filter param { string } params . sort param { string } params . ifNoneMatch param { boolean } params . history param { boolean } params . includeShared returns { Promise < EventManagementModels . QueryEventsResponse > } memberOf public async GetEvents ( params ? ) { const parameters = params || { } ; const { page , size , sort , filter , ifNoneMatch , history , includeShared } = parameters ; const result = await this . HttpAction ( { verb : "GET" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/events?${ toQueryString ( { page , size , sort , filter , history , includeShared } ) }` , additionalHeaders : { "If-None-Match" : ifNoneMatch } , } ) ; return result as EventManagementModels . QueryEventsResponse ; } param { string } eventId param { { ifNoneMatch ? : string ; includeShared ? : boolean } } params returns { Promise < EventManagementModels . CustomEventResponse > } memberOf public async GetEvent ( eventId , params ? ) { const parameters = params || { } ; const { ifNoneMatch , includeShared } = parameters ; return ( await this . HttpAction ( { verb : "GET" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/events/${ eventId }?${ toQueryString ( { includeShared } ) }` , additionalHeaders : { "If-None-Match" : ifNoneMatch } , } ) ) as EventManagementModels . CustomEventResponse ; } param { string } eventId param { EventManagementModels . CustomEvent } event param { { ifMatch : number } } params returns { Promise < EventManagementModels . CustomEvent > } memberOf public async PutEvent ( eventId , event , params ) { const parameters = params || { } ; const { ifMatch , includeShared } = parameters ; return ( await this . HttpAction ( { verb : "PUT" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/events/${ eventId }?${ toQueryString ( { includeShared } ) }` , body : event , additionalHeaders : { "If-Match" : ifMatch } , } ) ) as EventManagementModels . CustomEvent ; } param { EventManagementModels . EventType } eventType param { { includeShared ? : boolean ; * } } params param { { boolean } } params . includeShared returns { Promise < EventManagementModels . EventTypeResponse > } memberOf public async PostEventType ( eventType , params ? ) { const parameters = params || { } ; const { includeShared } = parameters ; return ( await this . HttpAction ( { verb : "POST" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/eventTypes?${ toQueryString ( { includeShared } ) }` , body : eventType , } ) ) as EventManagementModels . EventTypeResponse ; } param { { page ? : number ; size ? : number ; sort ? : string ; filter ? : string ; ifNoneMatch ? : string ; includeShared ? : boolean ; * } } params returns { Promise < EventManagementModels . QueryEventTypesResponse > } memberOf public async GetEventTypes ( params ? ) { const parameters = params || { } ; const { page , size , sort , filter , ifNoneMatch , includeShared } = parameters ; const result = await this . HttpAction ( { verb : "GET" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/eventTypes?${ toQueryString ( { page , size , sort , filter , includeShared } ) }` , additionalHeaders : { "If-None-Match" : ifNoneMatch } , } ) ; return result as EventManagementModels . QueryEventTypesResponse ; } param { string } eventTypeId param { { ifNoneMatch ? : string ; includeShared ? : boolean } } params returns { Promise < EventManagementModels . EventTypeResponse > } memberOf public async GetEventType ( eventTypeId , params ? ) { const parameters = params || { } ; const { ifNoneMatch , includeShared } = parameters ; return ( await this . HttpAction ( { verb : "GET" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/eventTypes/${ eventTypeId }?${ toQueryString ( { includeShared } ) }` , additionalHeaders : { "If-None-Match" : ifNoneMatch } , } ) ) as EventManagementModels . EventTypeResponse ; } param { string } eventTypeId param { EventManagementModels . EventTypePatch } eventTypePatch example param { { ifMatch : number } } params returns { Promise < EventManagementModels . EventType > } memberOf public async PatchEventType ( eventTypeId , eventTypePatch , params ) { const parameters = params || { } ; const { ifMatch , includeShared } = parameters ; return ( await this . HttpAction ( { verb : "PUT" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/eventTypes/${ eventTypeId }?${ toQueryString ( { includeShared } ) }` , body : eventTypePatch , additionalHeaders : { "If-Match" : ifMatch } , } ) ) as EventManagementModels . EventTypeResponse ; } param { string } eventTypeId param { { ifMatch : number } } params returns memberOf public async DeleteEventType ( eventTypeId , params ) { const parameters = params || { } ; const { ifMatch , includeShared } = parameters ; return await this . HttpAction ( { verb : "DELETE" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/eventTypes/${ eventTypeId }?${ toQueryString ( { includeShared } ) }` , additionalHeaders : { "If-Match" : ifMatch } , noResponse : true , } ) ; } param { EventManagementModels . DeleteEventsJob } deleteEventsJob returns { Promise < EventManagementModels . JobResource > } memberOf public async PostDeleteEventsJob ( deleteEventsJob ) { return ( await this . HttpAction ( { verb : "POST" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/deleteEventsJobs` , body : deleteEventsJob , } ) ) as EventManagementModels . JobResource ; } param { string } jobId returns { Promise < EventManagementModels . DeleteJobResource > } memberOf public async GetDeleteEventsJob ( jobId ) { return ( await this . HttpAction ( { verb : "GET" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/deleteEventsJobs/${ jobId }` , } ) ) as EventManagementModels . DeleteJobResource ; } param { EventManagementModels . DeleteEventsJob } createEventsJob returns { Promise < EventManagementModels . JobResource > } memberOf public async PostCreateEventsJob ( createEventsJob ) { return ( await this . HttpAction ( { verb : "POST" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/createEventsJobs` , body : createEventsJob , } ) ) as EventManagementModels . JobResource ; } param { string } jobId returns { Promise < EventManagementModels . CreateJobResource > } memberOf public async GetCreateEventsJob ( jobId ) { return ( await this . HttpAction ( { verb : "GET" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/createEventsJobs/${ jobId }` , } ) ) as EventManagementModels . CreateJobResource ; } }