| GET,POST,OPTIONS | /v1/worker/messages |
|---|
"use strict";
export class WorkerCrew {
/** @param {{CrewID?:number,CrewName?:string,IsManager?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
CrewID;
/** @type {string} */
CrewName;
/** @type {boolean} */
IsManager;
}
export class WorkerCrewMessage {
/** @param {{CrewMessageID?:number,CrewID?:number,CrewName?:string,SenderContactID?:number,SenderName?:string,Body?:string,IsAlert?:boolean,CreatedAtLabel?:string,Mine?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
CrewMessageID;
/** @type {number} */
CrewID;
/** @type {string} */
CrewName;
/** @type {number} */
SenderContactID;
/** @type {string} */
SenderName;
/** @type {string} */
Body;
/** @type {boolean} */
IsAlert;
/** @type {string} */
CreatedAtLabel;
/** @type {boolean} */
Mine;
}
export class WorkerMessagesResponse {
/** @param {{ResponseStatus?:ResponseStatus,Crews?:WorkerCrew[],Messages?:WorkerCrewMessage[],Sent?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {ResponseStatus} */
ResponseStatus;
/** @type {WorkerCrew[]} */
Crews = [];
/** @type {WorkerCrewMessage[]} */
Messages = [];
/** @type {boolean} */
Sent;
}
export class WorkerMessagesRequest {
/** @param {{CrewID?:number,Body?:string,IsAlert?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
CrewID;
/** @type {string} */
Body;
/** @type {boolean} */
IsAlert;
}
JavaScript WorkerMessagesRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/worker/messages HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"CrewID":0,"Body":"String","IsAlert":false}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"Crews":[{"CrewID":0,"CrewName":"String","IsManager":false}],"Messages":[{"CrewMessageID":0,"CrewID":0,"CrewName":"String","SenderContactID":0,"SenderName":"String","Body":"String","IsAlert":false,"CreatedAtLabel":"String","Mine":false}],"Sent":false}