| POST,OPTIONS | /v1/dashboard/kpiv2 |
|---|
"use strict";
export class DashboardStatTile {
/** @param {{Key?:string,Label?:string,Value?:number,PreviousValue?:number,Unit?:string,DeltaPct?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Key;
/** @type {string} */
Label;
/** @type {number} */
Value;
/** @type {?number} */
PreviousValue;
/** @type {string} */
Unit;
/** @type {?number} */
DeltaPct;
}
export class DashboardSeriesPoint {
/** @param {{Label?:string,Value?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Label;
/** @type {number} */
Value;
}
export class DashboardSeries {
/** @param {{Name?:string,Points?:DashboardSeriesPoint[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Name;
/** @type {DashboardSeriesPoint[]} */
Points = [];
}
export class KpiV2LocationRow {
/** @param {{LocationName?:string,Walkins?:number,Completed?:number,AvgServiceMinutes?:number,AbandonmentPct?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
LocationName;
/** @type {number} */
Walkins;
/** @type {number} */
Completed;
/** @type {number} */
AvgServiceMinutes;
/** @type {number} */
AbandonmentPct;
}
export class KpiV2WorkerRow {
/** @param {{WorkerName?:string,Completed?:number,AvgServiceMinutes?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
WorkerName;
/** @type {number} */
Completed;
/** @type {number} */
AvgServiceMinutes;
}
export class KpiV2HeatPoint {
/** @param {{Dow?:number,Hr?:number,Cnt?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
Dow;
/** @type {number} */
Hr;
/** @type {number} */
Cnt;
}
export class KpiV2LiveRow {
/** @param {{LocationName?:string,Waiting?:number,InProgress?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
LocationName;
/** @type {number} */
Waiting;
/** @type {number} */
InProgress;
}
export class KpiV2Response {
/** @param {{ResponseStatus?:ResponseStatus,Stats?:DashboardStatTile[],Trend?:DashboardSeries[],ServicesByType?:DashboardSeries,LocationLeaderboard?:KpiV2LocationRow[],WorkerProductivity?:KpiV2WorkerRow[],Heatmap?:KpiV2HeatPoint[],LiveQueue?:KpiV2LiveRow[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {ResponseStatus} */
ResponseStatus;
/** @type {DashboardStatTile[]} */
Stats = [];
/** @type {DashboardSeries[]} */
Trend = [];
/** @type {DashboardSeries} */
ServicesByType;
/** @type {KpiV2LocationRow[]} */
LocationLeaderboard = [];
/** @type {KpiV2WorkerRow[]} */
WorkerProductivity = [];
/** @type {KpiV2HeatPoint[]} */
Heatmap = [];
/** @type {KpiV2LiveRow[]} */
LiveQueue = [];
}
export class KpiV2Request {
/** @param {{FromDate?:string,ToDate?:string,LocationIds?:string[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
FromDate;
/** @type {string} */
ToDate;
/** @type {string[]} */
LocationIds = [];
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/dashboard/kpiv2 HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
FromDate: 0001-01-01,
ToDate: 0001-01-01,
LocationIds:
[
00000000000000000000000000000000
]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
},
Stats:
[
{
Key: String,
Label: String,
Value: 0,
PreviousValue: 0,
Unit: String
}
],
Trend:
[
{
Name: String,
Points:
[
{
Label: String,
Value: 0
}
]
}
],
ServicesByType:
{
Name: String,
Points:
[
{
Label: String,
Value: 0
}
]
},
LocationLeaderboard:
[
{
LocationName: String,
Walkins: 0,
Completed: 0,
AvgServiceMinutes: 0,
AbandonmentPct: 0
}
],
WorkerProductivity:
[
{
WorkerName: String,
Completed: 0,
AvgServiceMinutes: 0
}
],
Heatmap:
[
{
Dow: 0,
Hr: 0,
Cnt: 0
}
],
LiveQueue:
[
{
LocationName: String,
Waiting: 0,
InProgress: 0
}
]
}