/* Options: Date: 2026-06-13 04:14:26 Version: 8.80 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://api.dev.dynamics.trendsic.com //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: KpiV2Request.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; 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 json) { fromMap(json); } fromMap(Map 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 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 json) { fromMap(json); } fromMap(Map json) { Label = json['Label']; Value = JsonConverters.toDouble(json['Value']); return this; } Map toJson() => { 'Label': Label, 'Value': Value }; getTypeName() => "DashboardSeriesPoint"; TypeContext? context = _ctx; } class DashboardSeries implements IConvertible { String? Name; List? Points = []; DashboardSeries({this.Name,this.Points}); DashboardSeries.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Name = json['Name']; Points = JsonConverters.fromJson(json['Points'],'List',context!); return this; } Map toJson() => { 'Name': Name, 'Points': JsonConverters.toJson(Points,'List',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 json) { fromMap(json); } fromMap(Map json) { LocationName = json['LocationName']; Walkins = json['Walkins']; Completed = json['Completed']; AvgServiceMinutes = JsonConverters.toDouble(json['AvgServiceMinutes']); AbandonmentPct = JsonConverters.toDouble(json['AbandonmentPct']); return this; } Map 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 json) { fromMap(json); } fromMap(Map json) { WorkerName = json['WorkerName']; Completed = json['Completed']; AvgServiceMinutes = JsonConverters.toDouble(json['AvgServiceMinutes']); return this; } Map 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 json) { fromMap(json); } fromMap(Map json) { Dow = json['Dow']; Hr = json['Hr']; Cnt = json['Cnt']; return this; } Map 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 json) { fromMap(json); } fromMap(Map json) { LocationName = json['LocationName']; Waiting = json['Waiting']; InProgress = json['InProgress']; return this; } Map toJson() => { 'LocationName': LocationName, 'Waiting': Waiting, 'InProgress': InProgress }; getTypeName() => "KpiV2LiveRow"; TypeContext? context = _ctx; } class KpiV2Response implements IConvertible { ResponseStatus? ResponseStatus; List? Stats = []; List? Trend = []; DashboardSeries? ServicesByType; List? LocationLeaderboard = []; List? WorkerProductivity = []; List? Heatmap = []; List? LiveQueue = []; KpiV2Response({this.ResponseStatus,this.Stats,this.Trend,this.ServicesByType,this.LocationLeaderboard,this.WorkerProductivity,this.Heatmap,this.LiveQueue}); KpiV2Response.fromJson(Map json) { fromMap(json); } fromMap(Map json) { ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!); Stats = JsonConverters.fromJson(json['Stats'],'List',context!); Trend = JsonConverters.fromJson(json['Trend'],'List',context!); ServicesByType = JsonConverters.fromJson(json['ServicesByType'],'DashboardSeries',context!); LocationLeaderboard = JsonConverters.fromJson(json['LocationLeaderboard'],'List',context!); WorkerProductivity = JsonConverters.fromJson(json['WorkerProductivity'],'List',context!); Heatmap = JsonConverters.fromJson(json['Heatmap'],'List',context!); LiveQueue = JsonConverters.fromJson(json['LiveQueue'],'List',context!); return this; } Map toJson() => { 'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!), 'Stats': JsonConverters.toJson(Stats,'List',context!), 'Trend': JsonConverters.toJson(Trend,'List',context!), 'ServicesByType': JsonConverters.toJson(ServicesByType,'DashboardSeries',context!), 'LocationLeaderboard': JsonConverters.toJson(LocationLeaderboard,'List',context!), 'WorkerProductivity': JsonConverters.toJson(WorkerProductivity,'List',context!), 'Heatmap': JsonConverters.toJson(Heatmap,'List',context!), 'LiveQueue': JsonConverters.toJson(LiveQueue,'List',context!) }; getTypeName() => "KpiV2Response"; TypeContext? context = _ctx; } // @Route("/v1/dashboard/kpiv2", "POST,OPTIONS") class KpiV2Request implements IReturn, IConvertible, IPost { DateTime? FromDate; DateTime? ToDate; List? LocationIds = []; KpiV2Request({this.FromDate,this.ToDate,this.LocationIds}); KpiV2Request.fromJson(Map json) { fromMap(json); } fromMap(Map json) { FromDate = JsonConverters.fromJson(json['FromDate'],'DateTime',context!); ToDate = JsonConverters.fromJson(json['ToDate'],'DateTime',context!); LocationIds = JsonConverters.fromJson(json['LocationIds'],'List',context!); return this; } Map toJson() => { 'FromDate': JsonConverters.toJson(FromDate,'DateTime',context!), 'ToDate': JsonConverters.toJson(ToDate,'DateTime',context!), 'LocationIds': JsonConverters.toJson(LocationIds,'List',context!) }; createResponse() => KpiV2Response(); getResponseTypeName() => "KpiV2Response"; getTypeName() => "KpiV2Request"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: { 'DashboardStatTile': TypeInfo(TypeOf.Class, create:() => DashboardStatTile()), 'DashboardSeriesPoint': TypeInfo(TypeOf.Class, create:() => DashboardSeriesPoint()), 'DashboardSeries': TypeInfo(TypeOf.Class, create:() => DashboardSeries()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'KpiV2LocationRow': TypeInfo(TypeOf.Class, create:() => KpiV2LocationRow()), 'KpiV2WorkerRow': TypeInfo(TypeOf.Class, create:() => KpiV2WorkerRow()), 'KpiV2HeatPoint': TypeInfo(TypeOf.Class, create:() => KpiV2HeatPoint()), 'KpiV2LiveRow': TypeInfo(TypeOf.Class, create:() => KpiV2LiveRow()), 'KpiV2Response': TypeInfo(TypeOf.Class, create:() => KpiV2Response()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'List': TypeInfo(TypeOf.Class, create:() => []), 'List': TypeInfo(TypeOf.Class, create:() => []), 'List': TypeInfo(TypeOf.Class, create:() => []), 'List': TypeInfo(TypeOf.Class, create:() => []), 'List': TypeInfo(TypeOf.Class, create:() => []), 'KpiV2Request': TypeInfo(TypeOf.Class, create:() => KpiV2Request()), });