| POST,OPTIONS | /v1/dashboard/kpiv2 |
|---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
class DashboardStatTile implements IConvertible
{
String? Key;
String? Label;
double? Value;
double? PreviousValue;
String? Unit;
double? DeltaPct;
DashboardStatTile({this.Key,this.Label,this.Value,this.PreviousValue,this.Unit,this.DeltaPct});
DashboardStatTile.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Key = json['Key'];
Label = json['Label'];
Value = JsonConverters.toDouble(json['Value']);
PreviousValue = JsonConverters.toDouble(json['PreviousValue']);
Unit = json['Unit'];
DeltaPct = JsonConverters.toDouble(json['DeltaPct']);
return this;
}
Map<String, dynamic> toJson() => {
'Key': Key,
'Label': Label,
'Value': Value,
'PreviousValue': PreviousValue,
'Unit': Unit,
'DeltaPct': DeltaPct
};
getTypeName() => "DashboardStatTile";
TypeContext? context = _ctx;
}
class DashboardSeriesPoint implements IConvertible
{
String? Label;
double? Value;
DashboardSeriesPoint({this.Label,this.Value});
DashboardSeriesPoint.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Label = json['Label'];
Value = JsonConverters.toDouble(json['Value']);
return this;
}
Map<String, dynamic> toJson() => {
'Label': Label,
'Value': Value
};
getTypeName() => "DashboardSeriesPoint";
TypeContext? context = _ctx;
}
class DashboardSeries implements IConvertible
{
String? Name;
List<DashboardSeriesPoint>? Points = [];
DashboardSeries({this.Name,this.Points});
DashboardSeries.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Name = json['Name'];
Points = JsonConverters.fromJson(json['Points'],'List<DashboardSeriesPoint>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Name': Name,
'Points': JsonConverters.toJson(Points,'List<DashboardSeriesPoint>',context!)
};
getTypeName() => "DashboardSeries";
TypeContext? context = _ctx;
}
class KpiV2LocationRow implements IConvertible
{
String? LocationName;
int? Walkins;
int? Completed;
double? AvgServiceMinutes;
double? AbandonmentPct;
KpiV2LocationRow({this.LocationName,this.Walkins,this.Completed,this.AvgServiceMinutes,this.AbandonmentPct});
KpiV2LocationRow.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
LocationName = json['LocationName'];
Walkins = json['Walkins'];
Completed = json['Completed'];
AvgServiceMinutes = JsonConverters.toDouble(json['AvgServiceMinutes']);
AbandonmentPct = JsonConverters.toDouble(json['AbandonmentPct']);
return this;
}
Map<String, dynamic> toJson() => {
'LocationName': LocationName,
'Walkins': Walkins,
'Completed': Completed,
'AvgServiceMinutes': AvgServiceMinutes,
'AbandonmentPct': AbandonmentPct
};
getTypeName() => "KpiV2LocationRow";
TypeContext? context = _ctx;
}
class KpiV2WorkerRow implements IConvertible
{
String? WorkerName;
int? Completed;
double? AvgServiceMinutes;
KpiV2WorkerRow({this.WorkerName,this.Completed,this.AvgServiceMinutes});
KpiV2WorkerRow.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
WorkerName = json['WorkerName'];
Completed = json['Completed'];
AvgServiceMinutes = JsonConverters.toDouble(json['AvgServiceMinutes']);
return this;
}
Map<String, dynamic> toJson() => {
'WorkerName': WorkerName,
'Completed': Completed,
'AvgServiceMinutes': AvgServiceMinutes
};
getTypeName() => "KpiV2WorkerRow";
TypeContext? context = _ctx;
}
class KpiV2HeatPoint implements IConvertible
{
int? Dow;
int? Hr;
int? Cnt;
KpiV2HeatPoint({this.Dow,this.Hr,this.Cnt});
KpiV2HeatPoint.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Dow = json['Dow'];
Hr = json['Hr'];
Cnt = json['Cnt'];
return this;
}
Map<String, dynamic> toJson() => {
'Dow': Dow,
'Hr': Hr,
'Cnt': Cnt
};
getTypeName() => "KpiV2HeatPoint";
TypeContext? context = _ctx;
}
class KpiV2LiveRow implements IConvertible
{
String? LocationName;
int? Waiting;
int? InProgress;
KpiV2LiveRow({this.LocationName,this.Waiting,this.InProgress});
KpiV2LiveRow.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
LocationName = json['LocationName'];
Waiting = json['Waiting'];
InProgress = json['InProgress'];
return this;
}
Map<String, dynamic> toJson() => {
'LocationName': LocationName,
'Waiting': Waiting,
'InProgress': InProgress
};
getTypeName() => "KpiV2LiveRow";
TypeContext? context = _ctx;
}
class SvcNamedTime implements IConvertible
{
String? Id;
String? Name;
int? SignedSec;
int? Served;
SvcNamedTime({this.Id,this.Name,this.SignedSec,this.Served});
SvcNamedTime.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Id = json['Id'];
Name = json['Name'];
SignedSec = json['SignedSec'];
Served = json['Served'];
return this;
}
Map<String, dynamic> toJson() => {
'Id': Id,
'Name': Name,
'SignedSec': SignedSec,
'Served': Served
};
getTypeName() => "SvcNamedTime";
TypeContext? context = _ctx;
}
class SvcTint implements IConvertible
{
String? Field;
String? Tone;
String? Reason;
double? Value;
double? Reference;
double? BranchValue;
SvcTint({this.Field,this.Tone,this.Reason,this.Value,this.Reference,this.BranchValue});
SvcTint.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Field = json['Field'];
Tone = json['Tone'];
Reason = json['Reason'];
Value = JsonConverters.toDouble(json['Value']);
Reference = JsonConverters.toDouble(json['Reference']);
BranchValue = JsonConverters.toDouble(json['BranchValue']);
return this;
}
Map<String, dynamic> toJson() => {
'Field': Field,
'Tone': Tone,
'Reason': Reason,
'Value': Value,
'Reference': Reference,
'BranchValue': BranchValue
};
getTypeName() => "SvcTint";
TypeContext? context = _ctx;
}
class SvcMetrics implements IConvertible
{
int? Checkins;
int? Walkins;
int? Appts;
int? Served;
int? NoShows;
int? ApptNoShows;
int? CancelledAtWindow;
int? Abandoned;
int? Called;
int? CalledUp;
double? AbandonRate;
double? NoShowRate;
double? AvgServiceSec;
double? MedianServiceSec;
double? AvgWaitSec;
int? MaxWaitSec;
double? AvgWalkUpSec;
double? ExpectedServiceSec;
int? SignedSec;
int? ServingSec;
int? PausedSec;
int? IdleSec;
int? UnstaffedSec;
double? Utilization;
double? IdleShare;
double? PausedShare;
int? Sessions;
int? OpenDays;
double? FeesEarned;
double? AvgFee;
double? FeesPerStaffedHour;
double? ExpectedFeesPerStaffedHour;
double? LaborCost;
bool? LaborPartial;
List<String>? MissingCostEmployeeIds = [];
List<SvcNamedTime>? MissingCost = [];
bool? LaborLocked;
double? Contribution;
double? LostFees;
double? LostNoShowFees;
Map<String,int?>? Mix = {};
List<int>? HourlyServed = [];
List<double>? HourlyFees = [];
List<double>? HourlyCost = [];
List<SvcTint>? Tints = [];
SvcMetrics({this.Checkins,this.Walkins,this.Appts,this.Served,this.NoShows,this.ApptNoShows,this.CancelledAtWindow,this.Abandoned,this.Called,this.CalledUp,this.AbandonRate,this.NoShowRate,this.AvgServiceSec,this.MedianServiceSec,this.AvgWaitSec,this.MaxWaitSec,this.AvgWalkUpSec,this.ExpectedServiceSec,this.SignedSec,this.ServingSec,this.PausedSec,this.IdleSec,this.UnstaffedSec,this.Utilization,this.IdleShare,this.PausedShare,this.Sessions,this.OpenDays,this.FeesEarned,this.AvgFee,this.FeesPerStaffedHour,this.ExpectedFeesPerStaffedHour,this.LaborCost,this.LaborPartial,this.MissingCostEmployeeIds,this.MissingCost,this.LaborLocked,this.Contribution,this.LostFees,this.LostNoShowFees,this.Mix,this.HourlyServed,this.HourlyFees,this.HourlyCost,this.Tints});
SvcMetrics.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Checkins = json['Checkins'];
Walkins = json['Walkins'];
Appts = json['Appts'];
Served = json['Served'];
NoShows = json['NoShows'];
ApptNoShows = json['ApptNoShows'];
CancelledAtWindow = json['CancelledAtWindow'];
Abandoned = json['Abandoned'];
Called = json['Called'];
CalledUp = json['CalledUp'];
AbandonRate = JsonConverters.toDouble(json['AbandonRate']);
NoShowRate = JsonConverters.toDouble(json['NoShowRate']);
AvgServiceSec = JsonConverters.toDouble(json['AvgServiceSec']);
MedianServiceSec = JsonConverters.toDouble(json['MedianServiceSec']);
AvgWaitSec = JsonConverters.toDouble(json['AvgWaitSec']);
MaxWaitSec = json['MaxWaitSec'];
AvgWalkUpSec = JsonConverters.toDouble(json['AvgWalkUpSec']);
ExpectedServiceSec = JsonConverters.toDouble(json['ExpectedServiceSec']);
SignedSec = json['SignedSec'];
ServingSec = json['ServingSec'];
PausedSec = json['PausedSec'];
IdleSec = json['IdleSec'];
UnstaffedSec = json['UnstaffedSec'];
Utilization = JsonConverters.toDouble(json['Utilization']);
IdleShare = JsonConverters.toDouble(json['IdleShare']);
PausedShare = JsonConverters.toDouble(json['PausedShare']);
Sessions = json['Sessions'];
OpenDays = json['OpenDays'];
FeesEarned = JsonConverters.toDouble(json['FeesEarned']);
AvgFee = JsonConverters.toDouble(json['AvgFee']);
FeesPerStaffedHour = JsonConverters.toDouble(json['FeesPerStaffedHour']);
ExpectedFeesPerStaffedHour = JsonConverters.toDouble(json['ExpectedFeesPerStaffedHour']);
LaborCost = JsonConverters.toDouble(json['LaborCost']);
LaborPartial = json['LaborPartial'];
MissingCostEmployeeIds = JsonConverters.fromJson(json['MissingCostEmployeeIds'],'List<String>',context!);
MissingCost = JsonConverters.fromJson(json['MissingCost'],'List<SvcNamedTime>',context!);
LaborLocked = json['LaborLocked'];
Contribution = JsonConverters.toDouble(json['Contribution']);
LostFees = JsonConverters.toDouble(json['LostFees']);
LostNoShowFees = JsonConverters.toDouble(json['LostNoShowFees']);
Mix = JsonConverters.fromJson(json['Mix'],'Map<String,int?>',context!);
HourlyServed = JsonConverters.fromJson(json['HourlyServed'],'List<int>',context!);
HourlyFees = JsonConverters.fromJson(json['HourlyFees'],'List<double>',context!);
HourlyCost = JsonConverters.fromJson(json['HourlyCost'],'List<double>',context!);
Tints = JsonConverters.fromJson(json['Tints'],'List<SvcTint>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Checkins': Checkins,
'Walkins': Walkins,
'Appts': Appts,
'Served': Served,
'NoShows': NoShows,
'ApptNoShows': ApptNoShows,
'CancelledAtWindow': CancelledAtWindow,
'Abandoned': Abandoned,
'Called': Called,
'CalledUp': CalledUp,
'AbandonRate': AbandonRate,
'NoShowRate': NoShowRate,
'AvgServiceSec': AvgServiceSec,
'MedianServiceSec': MedianServiceSec,
'AvgWaitSec': AvgWaitSec,
'MaxWaitSec': MaxWaitSec,
'AvgWalkUpSec': AvgWalkUpSec,
'ExpectedServiceSec': ExpectedServiceSec,
'SignedSec': SignedSec,
'ServingSec': ServingSec,
'PausedSec': PausedSec,
'IdleSec': IdleSec,
'UnstaffedSec': UnstaffedSec,
'Utilization': Utilization,
'IdleShare': IdleShare,
'PausedShare': PausedShare,
'Sessions': Sessions,
'OpenDays': OpenDays,
'FeesEarned': FeesEarned,
'AvgFee': AvgFee,
'FeesPerStaffedHour': FeesPerStaffedHour,
'ExpectedFeesPerStaffedHour': ExpectedFeesPerStaffedHour,
'LaborCost': LaborCost,
'LaborPartial': LaborPartial,
'MissingCostEmployeeIds': JsonConverters.toJson(MissingCostEmployeeIds,'List<String>',context!),
'MissingCost': JsonConverters.toJson(MissingCost,'List<SvcNamedTime>',context!),
'LaborLocked': LaborLocked,
'Contribution': Contribution,
'LostFees': LostFees,
'LostNoShowFees': LostNoShowFees,
'Mix': JsonConverters.toJson(Mix,'Map<String,int?>',context!),
'HourlyServed': JsonConverters.toJson(HourlyServed,'List<int>',context!),
'HourlyFees': JsonConverters.toJson(HourlyFees,'List<double>',context!),
'HourlyCost': JsonConverters.toJson(HourlyCost,'List<double>',context!),
'Tints': JsonConverters.toJson(Tints,'List<SvcTint>',context!)
};
getTypeName() => "SvcMetrics";
TypeContext? context = _ctx;
}
class SvcBranchRow implements IConvertible
{
String? BranchId;
String? Name;
String? StateCode;
String? ZoneCode;
String? TimeZone;
int? Windows;
DateTime? RecordingSinceUtc;
DateTime? SessionsSinceUtc;
SvcMetrics? Metrics;
SvcBranchRow({this.BranchId,this.Name,this.StateCode,this.ZoneCode,this.TimeZone,this.Windows,this.RecordingSinceUtc,this.SessionsSinceUtc,this.Metrics});
SvcBranchRow.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
BranchId = json['BranchId'];
Name = json['Name'];
StateCode = json['StateCode'];
ZoneCode = json['ZoneCode'];
TimeZone = json['TimeZone'];
Windows = json['Windows'];
RecordingSinceUtc = JsonConverters.fromJson(json['RecordingSinceUtc'],'DateTime',context!);
SessionsSinceUtc = JsonConverters.fromJson(json['SessionsSinceUtc'],'DateTime',context!);
Metrics = JsonConverters.fromJson(json['Metrics'],'SvcMetrics',context!);
return this;
}
Map<String, dynamic> toJson() => {
'BranchId': BranchId,
'Name': Name,
'StateCode': StateCode,
'ZoneCode': ZoneCode,
'TimeZone': TimeZone,
'Windows': Windows,
'RecordingSinceUtc': JsonConverters.toJson(RecordingSinceUtc,'DateTime',context!),
'SessionsSinceUtc': JsonConverters.toJson(SessionsSinceUtc,'DateTime',context!),
'Metrics': JsonConverters.toJson(Metrics,'SvcMetrics',context!)
};
getTypeName() => "SvcBranchRow";
TypeContext? context = _ctx;
}
class SvcStateRow implements IConvertible
{
String? StateCode;
String? StateName;
int? Branches;
SvcMetrics? Metrics;
SvcStateRow({this.StateCode,this.StateName,this.Branches,this.Metrics});
SvcStateRow.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
StateCode = json['StateCode'];
StateName = json['StateName'];
Branches = json['Branches'];
Metrics = JsonConverters.fromJson(json['Metrics'],'SvcMetrics',context!);
return this;
}
Map<String, dynamic> toJson() => {
'StateCode': StateCode,
'StateName': StateName,
'Branches': Branches,
'Metrics': JsonConverters.toJson(Metrics,'SvcMetrics',context!)
};
getTypeName() => "SvcStateRow";
TypeContext? context = _ctx;
}
class SvcComparison implements IConvertible
{
String? Mode;
DateTime? FromDate;
DateTime? ToDate;
int? CutoffMinute;
bool? HasData;
SvcMetrics? Metrics;
SvcComparison({this.Mode,this.FromDate,this.ToDate,this.CutoffMinute,this.HasData,this.Metrics});
SvcComparison.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Mode = json['Mode'];
FromDate = JsonConverters.fromJson(json['FromDate'],'DateTime',context!);
ToDate = JsonConverters.fromJson(json['ToDate'],'DateTime',context!);
CutoffMinute = json['CutoffMinute'];
HasData = json['HasData'];
Metrics = JsonConverters.fromJson(json['Metrics'],'SvcMetrics',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Mode': Mode,
'FromDate': JsonConverters.toJson(FromDate,'DateTime',context!),
'ToDate': JsonConverters.toJson(ToDate,'DateTime',context!),
'CutoffMinute': CutoffMinute,
'HasData': HasData,
'Metrics': JsonConverters.toJson(Metrics,'SvcMetrics',context!)
};
getTypeName() => "SvcComparison";
TypeContext? context = _ctx;
}
class SvcFeeChange implements IConvertible
{
String? LocationId;
DateTime? OnDate;
double? FromFee;
double? ToFee;
SvcFeeChange({this.LocationId,this.OnDate,this.FromFee,this.ToFee});
SvcFeeChange.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
LocationId = json['LocationId'];
OnDate = JsonConverters.fromJson(json['OnDate'],'DateTime',context!);
FromFee = JsonConverters.toDouble(json['FromFee']);
ToFee = JsonConverters.toDouble(json['ToFee']);
return this;
}
Map<String, dynamic> toJson() => {
'LocationId': LocationId,
'OnDate': JsonConverters.toJson(OnDate,'DateTime',context!),
'FromFee': FromFee,
'ToFee': ToFee
};
getTypeName() => "SvcFeeChange";
TypeContext? context = _ctx;
}
class SvcServiceRow implements IConvertible
{
String? LineId;
String? Name;
int? Completed;
double? AvgServiceSec;
double? BranchAvgServiceSec;
double? FeesEarned;
double? FeeCurrent;
double? FeeMin;
double? FeeMax;
double? FeePerMinute;
double? BranchFeePerMinute;
List<SvcFeeChange>? FeeChanges = [];
SvcServiceRow({this.LineId,this.Name,this.Completed,this.AvgServiceSec,this.BranchAvgServiceSec,this.FeesEarned,this.FeeCurrent,this.FeeMin,this.FeeMax,this.FeePerMinute,this.BranchFeePerMinute,this.FeeChanges});
SvcServiceRow.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
LineId = json['LineId'];
Name = json['Name'];
Completed = json['Completed'];
AvgServiceSec = JsonConverters.toDouble(json['AvgServiceSec']);
BranchAvgServiceSec = JsonConverters.toDouble(json['BranchAvgServiceSec']);
FeesEarned = JsonConverters.toDouble(json['FeesEarned']);
FeeCurrent = JsonConverters.toDouble(json['FeeCurrent']);
FeeMin = JsonConverters.toDouble(json['FeeMin']);
FeeMax = JsonConverters.toDouble(json['FeeMax']);
FeePerMinute = JsonConverters.toDouble(json['FeePerMinute']);
BranchFeePerMinute = JsonConverters.toDouble(json['BranchFeePerMinute']);
FeeChanges = JsonConverters.fromJson(json['FeeChanges'],'List<SvcFeeChange>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'LineId': LineId,
'Name': Name,
'Completed': Completed,
'AvgServiceSec': AvgServiceSec,
'BranchAvgServiceSec': BranchAvgServiceSec,
'FeesEarned': FeesEarned,
'FeeCurrent': FeeCurrent,
'FeeMin': FeeMin,
'FeeMax': FeeMax,
'FeePerMinute': FeePerMinute,
'BranchFeePerMinute': BranchFeePerMinute,
'FeeChanges': JsonConverters.toJson(FeeChanges,'List<SvcFeeChange>',context!)
};
getTypeName() => "SvcServiceRow";
TypeContext? context = _ctx;
}
class SvcHourRow implements IConvertible
{
int? LocalHour;
int? Served;
double? FeesEarned;
double? CostToStaff;
SvcHourRow({this.LocalHour,this.Served,this.FeesEarned,this.CostToStaff});
SvcHourRow.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
LocalHour = json['LocalHour'];
Served = json['Served'];
FeesEarned = JsonConverters.toDouble(json['FeesEarned']);
CostToStaff = JsonConverters.toDouble(json['CostToStaff']);
return this;
}
Map<String, dynamic> toJson() => {
'LocalHour': LocalHour,
'Served': Served,
'FeesEarned': FeesEarned,
'CostToStaff': CostToStaff
};
getTypeName() => "SvcHourRow";
TypeContext? context = _ctx;
}
class SvcWorkerRow implements IConvertible
{
String? EmployeeId;
String? BranchId;
String? BranchName;
String? Name;
int? Served;
double? AvgServiceSec;
double? Utilization;
SvcWorkerRow({this.EmployeeId,this.BranchId,this.BranchName,this.Name,this.Served,this.AvgServiceSec,this.Utilization});
SvcWorkerRow.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
EmployeeId = json['EmployeeId'];
BranchId = json['BranchId'];
BranchName = json['BranchName'];
Name = json['Name'];
Served = json['Served'];
AvgServiceSec = JsonConverters.toDouble(json['AvgServiceSec']);
Utilization = JsonConverters.toDouble(json['Utilization']);
return this;
}
Map<String, dynamic> toJson() => {
'EmployeeId': EmployeeId,
'BranchId': BranchId,
'BranchName': BranchName,
'Name': Name,
'Served': Served,
'AvgServiceSec': AvgServiceSec,
'Utilization': Utilization
};
getTypeName() => "SvcWorkerRow";
TypeContext? context = _ctx;
}
class SvcAlert implements IConvertible
{
String? Level;
String? View;
String? Code;
String? StationId;
String? EmployeeId;
String? BranchId;
String? LineId;
String? Name;
String? OtherLineId;
String? OtherName;
List<String>? StationIds = [];
Map<String,double?>? Values = {};
SvcAlert({this.Level,this.View,this.Code,this.StationId,this.EmployeeId,this.BranchId,this.LineId,this.Name,this.OtherLineId,this.OtherName,this.StationIds,this.Values});
SvcAlert.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Level = json['Level'];
View = json['View'];
Code = json['Code'];
StationId = json['StationId'];
EmployeeId = json['EmployeeId'];
BranchId = json['BranchId'];
LineId = json['LineId'];
Name = json['Name'];
OtherLineId = json['OtherLineId'];
OtherName = json['OtherName'];
StationIds = JsonConverters.fromJson(json['StationIds'],'List<String>',context!);
Values = JsonConverters.fromJson(json['Values'],'Map<String,double?>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Level': Level,
'View': View,
'Code': Code,
'StationId': StationId,
'EmployeeId': EmployeeId,
'BranchId': BranchId,
'LineId': LineId,
'Name': Name,
'OtherLineId': OtherLineId,
'OtherName': OtherName,
'StationIds': JsonConverters.toJson(StationIds,'List<String>',context!),
'Values': JsonConverters.toJson(Values,'Map<String,double?>',context!)
};
getTypeName() => "SvcAlert";
TypeContext? context = _ctx;
}
class SvcScope implements IConvertible
{
String? StateCode;
List<SvcBranchRow>? Branches = [];
List<SvcStateRow>? States = [];
SvcMetrics? Total;
SvcComparison? Comparison;
List<SvcServiceRow>? FeesByService = [];
List<SvcHourRow>? ByHour = [];
List<SvcWorkerRow>? Workers = [];
bool? MultiZone;
bool? MultiState;
DateTime? RecordingSinceUtc;
DateTime? SessionsSinceUtc;
List<SvcAlert>? Alerts = [];
bool? CanSeeStaff;
bool? CanSeeFinancial;
bool? CanSeePay;
SvcScope({this.StateCode,this.Branches,this.States,this.Total,this.Comparison,this.FeesByService,this.ByHour,this.Workers,this.MultiZone,this.MultiState,this.RecordingSinceUtc,this.SessionsSinceUtc,this.Alerts,this.CanSeeStaff,this.CanSeeFinancial,this.CanSeePay});
SvcScope.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
StateCode = json['StateCode'];
Branches = JsonConverters.fromJson(json['Branches'],'List<SvcBranchRow>',context!);
States = JsonConverters.fromJson(json['States'],'List<SvcStateRow>',context!);
Total = JsonConverters.fromJson(json['Total'],'SvcMetrics',context!);
Comparison = JsonConverters.fromJson(json['Comparison'],'SvcComparison',context!);
FeesByService = JsonConverters.fromJson(json['FeesByService'],'List<SvcServiceRow>',context!);
ByHour = JsonConverters.fromJson(json['ByHour'],'List<SvcHourRow>',context!);
Workers = JsonConverters.fromJson(json['Workers'],'List<SvcWorkerRow>',context!);
MultiZone = json['MultiZone'];
MultiState = json['MultiState'];
RecordingSinceUtc = JsonConverters.fromJson(json['RecordingSinceUtc'],'DateTime',context!);
SessionsSinceUtc = JsonConverters.fromJson(json['SessionsSinceUtc'],'DateTime',context!);
Alerts = JsonConverters.fromJson(json['Alerts'],'List<SvcAlert>',context!);
CanSeeStaff = json['CanSeeStaff'];
CanSeeFinancial = json['CanSeeFinancial'];
CanSeePay = json['CanSeePay'];
return this;
}
Map<String, dynamic> toJson() => {
'StateCode': StateCode,
'Branches': JsonConverters.toJson(Branches,'List<SvcBranchRow>',context!),
'States': JsonConverters.toJson(States,'List<SvcStateRow>',context!),
'Total': JsonConverters.toJson(Total,'SvcMetrics',context!),
'Comparison': JsonConverters.toJson(Comparison,'SvcComparison',context!),
'FeesByService': JsonConverters.toJson(FeesByService,'List<SvcServiceRow>',context!),
'ByHour': JsonConverters.toJson(ByHour,'List<SvcHourRow>',context!),
'Workers': JsonConverters.toJson(Workers,'List<SvcWorkerRow>',context!),
'MultiZone': MultiZone,
'MultiState': MultiState,
'RecordingSinceUtc': JsonConverters.toJson(RecordingSinceUtc,'DateTime',context!),
'SessionsSinceUtc': JsonConverters.toJson(SessionsSinceUtc,'DateTime',context!),
'Alerts': JsonConverters.toJson(Alerts,'List<SvcAlert>',context!),
'CanSeeStaff': CanSeeStaff,
'CanSeeFinancial': CanSeeFinancial,
'CanSeePay': CanSeePay
};
getTypeName() => "SvcScope";
TypeContext? context = _ctx;
}
class KpiV2Response implements IConvertible
{
ResponseStatus? ResponseStatus;
List<DashboardStatTile>? Stats = [];
List<DashboardSeries>? Trend = [];
DashboardSeries? ServicesByType;
List<KpiV2LocationRow>? LocationLeaderboard = [];
List<KpiV2WorkerRow>? WorkerProductivity = [];
List<KpiV2HeatPoint>? Heatmap = [];
List<KpiV2LiveRow>? LiveQueue = [];
SvcScope? Scope;
KpiV2Response({this.ResponseStatus,this.Stats,this.Trend,this.ServicesByType,this.LocationLeaderboard,this.WorkerProductivity,this.Heatmap,this.LiveQueue,this.Scope});
KpiV2Response.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
Stats = JsonConverters.fromJson(json['Stats'],'List<DashboardStatTile>',context!);
Trend = JsonConverters.fromJson(json['Trend'],'List<DashboardSeries>',context!);
ServicesByType = JsonConverters.fromJson(json['ServicesByType'],'DashboardSeries',context!);
LocationLeaderboard = JsonConverters.fromJson(json['LocationLeaderboard'],'List<KpiV2LocationRow>',context!);
WorkerProductivity = JsonConverters.fromJson(json['WorkerProductivity'],'List<KpiV2WorkerRow>',context!);
Heatmap = JsonConverters.fromJson(json['Heatmap'],'List<KpiV2HeatPoint>',context!);
LiveQueue = JsonConverters.fromJson(json['LiveQueue'],'List<KpiV2LiveRow>',context!);
Scope = JsonConverters.fromJson(json['Scope'],'SvcScope',context!);
return this;
}
Map<String, dynamic> toJson() => {
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!),
'Stats': JsonConverters.toJson(Stats,'List<DashboardStatTile>',context!),
'Trend': JsonConverters.toJson(Trend,'List<DashboardSeries>',context!),
'ServicesByType': JsonConverters.toJson(ServicesByType,'DashboardSeries',context!),
'LocationLeaderboard': JsonConverters.toJson(LocationLeaderboard,'List<KpiV2LocationRow>',context!),
'WorkerProductivity': JsonConverters.toJson(WorkerProductivity,'List<KpiV2WorkerRow>',context!),
'Heatmap': JsonConverters.toJson(Heatmap,'List<KpiV2HeatPoint>',context!),
'LiveQueue': JsonConverters.toJson(LiveQueue,'List<KpiV2LiveRow>',context!),
'Scope': JsonConverters.toJson(Scope,'SvcScope',context!)
};
getTypeName() => "KpiV2Response";
TypeContext? context = _ctx;
}
class KpiV2Request implements IConvertible
{
DateTime? FromDate;
DateTime? ToDate;
List<String>? LocationIds = [];
bool? IncludeScope;
String? StateCode;
String? Compare;
KpiV2Request({this.FromDate,this.ToDate,this.LocationIds,this.IncludeScope,this.StateCode,this.Compare});
KpiV2Request.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
FromDate = JsonConverters.fromJson(json['FromDate'],'DateTime',context!);
ToDate = JsonConverters.fromJson(json['ToDate'],'DateTime',context!);
LocationIds = JsonConverters.fromJson(json['LocationIds'],'List<String>',context!);
IncludeScope = json['IncludeScope'];
StateCode = json['StateCode'];
Compare = json['Compare'];
return this;
}
Map<String, dynamic> toJson() => {
'FromDate': JsonConverters.toJson(FromDate,'DateTime',context!),
'ToDate': JsonConverters.toJson(ToDate,'DateTime',context!),
'LocationIds': JsonConverters.toJson(LocationIds,'List<String>',context!),
'IncludeScope': IncludeScope,
'StateCode': StateCode,
'Compare': Compare
};
getTypeName() => "KpiV2Request";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'DashboardStatTile': TypeInfo(TypeOf.Class, create:() => DashboardStatTile()),
'DashboardSeriesPoint': TypeInfo(TypeOf.Class, create:() => DashboardSeriesPoint()),
'DashboardSeries': TypeInfo(TypeOf.Class, create:() => DashboardSeries()),
'List<DashboardSeriesPoint>': TypeInfo(TypeOf.Class, create:() => <DashboardSeriesPoint>[]),
'KpiV2LocationRow': TypeInfo(TypeOf.Class, create:() => KpiV2LocationRow()),
'KpiV2WorkerRow': TypeInfo(TypeOf.Class, create:() => KpiV2WorkerRow()),
'KpiV2HeatPoint': TypeInfo(TypeOf.Class, create:() => KpiV2HeatPoint()),
'KpiV2LiveRow': TypeInfo(TypeOf.Class, create:() => KpiV2LiveRow()),
'SvcNamedTime': TypeInfo(TypeOf.Class, create:() => SvcNamedTime()),
'SvcTint': TypeInfo(TypeOf.Class, create:() => SvcTint()),
'SvcMetrics': TypeInfo(TypeOf.Class, create:() => SvcMetrics()),
'List<SvcNamedTime>': TypeInfo(TypeOf.Class, create:() => <SvcNamedTime>[]),
'Map<String,int?>': TypeInfo(TypeOf.Class, create:() => Map<String,int?>()),
'List<SvcTint>': TypeInfo(TypeOf.Class, create:() => <SvcTint>[]),
'SvcBranchRow': TypeInfo(TypeOf.Class, create:() => SvcBranchRow()),
'SvcStateRow': TypeInfo(TypeOf.Class, create:() => SvcStateRow()),
'SvcComparison': TypeInfo(TypeOf.Class, create:() => SvcComparison()),
'SvcFeeChange': TypeInfo(TypeOf.Class, create:() => SvcFeeChange()),
'SvcServiceRow': TypeInfo(TypeOf.Class, create:() => SvcServiceRow()),
'List<SvcFeeChange>': TypeInfo(TypeOf.Class, create:() => <SvcFeeChange>[]),
'SvcHourRow': TypeInfo(TypeOf.Class, create:() => SvcHourRow()),
'SvcWorkerRow': TypeInfo(TypeOf.Class, create:() => SvcWorkerRow()),
'SvcAlert': TypeInfo(TypeOf.Class, create:() => SvcAlert()),
'Map<String,double?>': TypeInfo(TypeOf.Class, create:() => Map<String,double?>()),
'SvcScope': TypeInfo(TypeOf.Class, create:() => SvcScope()),
'List<SvcBranchRow>': TypeInfo(TypeOf.Class, create:() => <SvcBranchRow>[]),
'List<SvcStateRow>': TypeInfo(TypeOf.Class, create:() => <SvcStateRow>[]),
'List<SvcServiceRow>': TypeInfo(TypeOf.Class, create:() => <SvcServiceRow>[]),
'List<SvcHourRow>': TypeInfo(TypeOf.Class, create:() => <SvcHourRow>[]),
'List<SvcWorkerRow>': TypeInfo(TypeOf.Class, create:() => <SvcWorkerRow>[]),
'List<SvcAlert>': TypeInfo(TypeOf.Class, create:() => <SvcAlert>[]),
'KpiV2Response': TypeInfo(TypeOf.Class, create:() => KpiV2Response()),
'List<DashboardStatTile>': TypeInfo(TypeOf.Class, create:() => <DashboardStatTile>[]),
'List<DashboardSeries>': TypeInfo(TypeOf.Class, create:() => <DashboardSeries>[]),
'List<KpiV2LocationRow>': TypeInfo(TypeOf.Class, create:() => <KpiV2LocationRow>[]),
'List<KpiV2WorkerRow>': TypeInfo(TypeOf.Class, create:() => <KpiV2WorkerRow>[]),
'List<KpiV2HeatPoint>': TypeInfo(TypeOf.Class, create:() => <KpiV2HeatPoint>[]),
'List<KpiV2LiveRow>': TypeInfo(TypeOf.Class, create:() => <KpiV2LiveRow>[]),
'KpiV2Request': TypeInfo(TypeOf.Class, create:() => KpiV2Request()),
});
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
],
IncludeScope: False,
StateCode: String,
Compare: String
}
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
}
],
Scope:
{
StateCode: String,
Branches:
[
{
BranchId: 00000000000000000000000000000000,
Name: String,
StateCode: String,
ZoneCode: String,
TimeZone: String,
Windows: 0,
RecordingSinceUtc: 0001-01-01,
SessionsSinceUtc: 0001-01-01,
Metrics:
{
Checkins: 0,
Walkins: 0,
Appts: 0,
Served: 0,
NoShows: 0,
ApptNoShows: 0,
CancelledAtWindow: 0,
Abandoned: 0,
Called: 0,
CalledUp: 0,
AbandonRate: 0,
NoShowRate: 0,
AvgServiceSec: 0,
MedianServiceSec: 0,
AvgWaitSec: 0,
MaxWaitSec: 0,
AvgWalkUpSec: 0,
ExpectedServiceSec: 0,
SignedSec: 0,
ServingSec: 0,
PausedSec: 0,
IdleSec: 0,
UnstaffedSec: 0,
Utilization: 0,
IdleShare: 0,
PausedShare: 0,
Sessions: 0,
OpenDays: 0,
FeesEarned: 0,
AvgFee: 0,
FeesPerStaffedHour: 0,
ExpectedFeesPerStaffedHour: 0,
LaborCost: 0,
LaborPartial: False,
MissingCostEmployeeIds:
[
00000000000000000000000000000000
],
MissingCost:
[
{
Id: 00000000000000000000000000000000,
Name: String,
SignedSec: 0,
Served: 0
}
],
LaborLocked: False,
Contribution: 0,
LostFees: 0,
LostNoShowFees: 0,
Mix:
{
00000000000000000000000000000000: 0
},
HourlyServed:
[
0
],
HourlyFees:
[
0
],
HourlyCost:
[
0
],
Tints:
[
{
Field: String,
Tone: String,
Reason: String,
Value: 0,
Reference: 0,
BranchValue: 0
}
]
}
}
],
States:
[
{
StateCode: String,
StateName: String,
Branches: 0,
Metrics:
{
Checkins: 0,
Walkins: 0,
Appts: 0,
Served: 0,
NoShows: 0,
ApptNoShows: 0,
CancelledAtWindow: 0,
Abandoned: 0,
Called: 0,
CalledUp: 0,
AbandonRate: 0,
NoShowRate: 0,
AvgServiceSec: 0,
MedianServiceSec: 0,
AvgWaitSec: 0,
MaxWaitSec: 0,
AvgWalkUpSec: 0,
ExpectedServiceSec: 0,
SignedSec: 0,
ServingSec: 0,
PausedSec: 0,
IdleSec: 0,
UnstaffedSec: 0,
Utilization: 0,
IdleShare: 0,
PausedShare: 0,
Sessions: 0,
OpenDays: 0,
FeesEarned: 0,
AvgFee: 0,
FeesPerStaffedHour: 0,
ExpectedFeesPerStaffedHour: 0,
LaborCost: 0,
LaborPartial: False,
MissingCostEmployeeIds:
[
00000000000000000000000000000000
],
MissingCost:
[
{
Id: 00000000000000000000000000000000,
Name: String,
SignedSec: 0,
Served: 0
}
],
LaborLocked: False,
Contribution: 0,
LostFees: 0,
LostNoShowFees: 0,
Mix:
{
00000000000000000000000000000000: 0
},
HourlyServed:
[
0
],
HourlyFees:
[
0
],
HourlyCost:
[
0
],
Tints:
[
{
Field: String,
Tone: String,
Reason: String,
Value: 0,
Reference: 0,
BranchValue: 0
}
]
}
}
],
Total:
{
Checkins: 0,
Walkins: 0,
Appts: 0,
Served: 0,
NoShows: 0,
ApptNoShows: 0,
CancelledAtWindow: 0,
Abandoned: 0,
Called: 0,
CalledUp: 0,
AbandonRate: 0,
NoShowRate: 0,
AvgServiceSec: 0,
MedianServiceSec: 0,
AvgWaitSec: 0,
MaxWaitSec: 0,
AvgWalkUpSec: 0,
ExpectedServiceSec: 0,
SignedSec: 0,
ServingSec: 0,
PausedSec: 0,
IdleSec: 0,
UnstaffedSec: 0,
Utilization: 0,
IdleShare: 0,
PausedShare: 0,
Sessions: 0,
OpenDays: 0,
FeesEarned: 0,
AvgFee: 0,
FeesPerStaffedHour: 0,
ExpectedFeesPerStaffedHour: 0,
LaborCost: 0,
LaborPartial: False,
MissingCostEmployeeIds:
[
00000000000000000000000000000000
],
MissingCost:
[
{
Id: 00000000000000000000000000000000,
Name: String,
SignedSec: 0,
Served: 0
}
],
LaborLocked: False,
Contribution: 0,
LostFees: 0,
LostNoShowFees: 0,
Mix:
{
00000000000000000000000000000000: 0
},
HourlyServed:
[
0
],
HourlyFees:
[
0
],
HourlyCost:
[
0
],
Tints:
[
{
Field: String,
Tone: String,
Reason: String,
Value: 0,
Reference: 0,
BranchValue: 0
}
]
},
Comparison:
{
Mode: String,
FromDate: 0001-01-01,
ToDate: 0001-01-01,
CutoffMinute: 0,
HasData: False,
Metrics:
{
Checkins: 0,
Walkins: 0,
Appts: 0,
Served: 0,
NoShows: 0,
ApptNoShows: 0,
CancelledAtWindow: 0,
Abandoned: 0,
Called: 0,
CalledUp: 0,
AbandonRate: 0,
NoShowRate: 0,
AvgServiceSec: 0,
MedianServiceSec: 0,
AvgWaitSec: 0,
MaxWaitSec: 0,
AvgWalkUpSec: 0,
ExpectedServiceSec: 0,
SignedSec: 0,
ServingSec: 0,
PausedSec: 0,
IdleSec: 0,
UnstaffedSec: 0,
Utilization: 0,
IdleShare: 0,
PausedShare: 0,
Sessions: 0,
OpenDays: 0,
FeesEarned: 0,
AvgFee: 0,
FeesPerStaffedHour: 0,
ExpectedFeesPerStaffedHour: 0,
LaborCost: 0,
LaborPartial: False,
MissingCostEmployeeIds:
[
00000000000000000000000000000000
],
MissingCost:
[
{
Id: 00000000000000000000000000000000,
Name: String,
SignedSec: 0,
Served: 0
}
],
LaborLocked: False,
Contribution: 0,
LostFees: 0,
LostNoShowFees: 0,
Mix:
{
00000000000000000000000000000000: 0
},
HourlyServed:
[
0
],
HourlyFees:
[
0
],
HourlyCost:
[
0
],
Tints:
[
{
Field: String,
Tone: String,
Reason: String,
Value: 0,
Reference: 0,
BranchValue: 0
}
]
}
},
FeesByService:
[
{
LineId: 00000000000000000000000000000000,
Name: String,
Completed: 0,
AvgServiceSec: 0,
BranchAvgServiceSec: 0,
FeesEarned: 0,
FeeCurrent: 0,
FeeMin: 0,
FeeMax: 0,
FeePerMinute: 0,
BranchFeePerMinute: 0,
FeeChanges:
[
{
LocationId: 00000000000000000000000000000000,
OnDate: 0001-01-01,
FromFee: 0,
ToFee: 0
}
]
}
],
ByHour:
[
{
LocalHour: 0,
Served: 0,
FeesEarned: 0,
CostToStaff: 0
}
],
Workers:
[
{
EmployeeId: 00000000000000000000000000000000,
BranchId: 00000000000000000000000000000000,
BranchName: String,
Name: String,
Served: 0,
AvgServiceSec: 0,
Utilization: 0
}
],
MultiZone: False,
MultiState: False,
RecordingSinceUtc: 0001-01-01,
SessionsSinceUtc: 0001-01-01,
Alerts:
[
{
Level: String,
View: String,
Code: String,
StationId: 00000000000000000000000000000000,
EmployeeId: 00000000000000000000000000000000,
BranchId: 00000000000000000000000000000000,
LineId: 00000000000000000000000000000000,
Name: String,
OtherLineId: 00000000000000000000000000000000,
OtherName: String,
StationIds:
[
00000000000000000000000000000000
],
Values:
{
String: 0
}
}
],
CanSeeStaff: False,
CanSeeFinancial: False,
CanSeePay: False
}
}