BokaMera.API.Host

<back to all web services

ListWebhookMessages

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin
The following routes are available for this service:
GET/webhook/messagesList webhook message
"use strict";
export class ClientWebhookRequestBase {
    /** @param {{ClientId?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    ClientId;
}
/** @typedef {'ascending'|'descending'} */
export var Ordering;
(function (Ordering) {
    Ordering["Ascending"] = "ascending"
    Ordering["Descending"] = "descending"
})(Ordering || (Ordering = {}));
export class ListMessagesRequestDto extends ClientWebhookRequestBase {
    /** @param {{Before?:string,After?:string,Channel?:string,Iterator?:string,Limit?:number,Order?:Ordering,EventTypes?:string[],WithContent?:boolean,ClientId?:string}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /** @type {?string} */
    Before;
    /** @type {?string} */
    After;
    /** @type {?string} */
    Channel;
    /** @type {?string} */
    Iterator;
    /** @type {?number} */
    Limit;
    /** @type {?Ordering} */
    Order;
    /** @type {?string[]} */
    EventTypes;
    /** @type {?boolean} */
    WithContent;
}
export class ListMessagesResponseDto {
    /** @param {{Data?:GetMessageResponseDto[],Done?:boolean,Iterator?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {GetMessageResponseDto[]} */
    Data;
    /** @type {boolean} */
    Done;
    /** @type {string} */
    Iterator;
}
export class ListWebhookMessages extends ListMessagesRequestDto {
    /** @param {{CompanyId?:string,Before?:string,After?:string,Channel?:string,Iterator?:string,Limit?:number,Order?:Ordering,EventTypes?:string[],WithContent?:boolean,ClientId?:string}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /**
     * @type {string}
     * @description The company id, if empty will use the company id for the user you are logged in with. */
    CompanyId;
}
export class GetMessageResponseDto {
    /** @param {{Id?:string,Channels?:string[],EventType?:string,Metadata?:{ [index: string]: string; },Payload?:Object,EventId?:string,Timestamp?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Id;
    /** @type {string[]} */
    Channels;
    /** @type {string} */
    EventType;
    /** @type {?{ [index: string]: string; }} */
    Metadata;
    /** @type {Object} */
    Payload;
    /** @type {string} */
    EventId;
    /** @type {string} */
    Timestamp;
}

JavaScript ListWebhookMessages DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /webhook/messages HTTP/1.1 
Host: testapi.bokamera.se 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Data: 
	[
		{
			Id: String,
			Channels: 
			[
				String
			],
			EventType: String,
			Metadata: 
			{
				String: String
			},
			Payload: {},
			EventId: String
		}
	],
	Done: False,
	Iterator: String
}