/* Options: Date: 2026-03-26 02:45:11 Version: 8.80 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://backoffice-api.brovs.com //GlobalNamespace: BackofficeApi //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: GetInsightsRequest.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ library BackofficeApi; import 'package:servicestack/servicestack.dart'; enum InsightTimeFilter { Daily, Weekly, Monthly, } class InsightsOverview implements IConvertible { int? uniqueUsers; int? signIns; int? signUps; int? invitesSent; int? invitesClicked; InsightsOverview({this.uniqueUsers,this.signIns,this.signUps,this.invitesSent,this.invitesClicked}); InsightsOverview.fromJson(Map json) { fromMap(json); } fromMap(Map json) { uniqueUsers = json['uniqueUsers']; signIns = json['signIns']; signUps = json['signUps']; invitesSent = json['invitesSent']; invitesClicked = json['invitesClicked']; return this; } Map toJson() => { 'uniqueUsers': uniqueUsers, 'signIns': signIns, 'signUps': signUps, 'invitesSent': invitesSent, 'invitesClicked': invitesClicked }; getTypeName() => "InsightsOverview"; TypeContext? context = _ctx; } class InsightsTimeBucket implements IConvertible { DateTime? bucket; int? value; InsightsTimeBucket({this.bucket,this.value}); InsightsTimeBucket.fromJson(Map json) { fromMap(json); } fromMap(Map json) { bucket = JsonConverters.fromJson(json['bucket'],'DateTime',context!); value = json['value']; return this; } Map toJson() => { 'bucket': JsonConverters.toJson(bucket,'DateTime',context!), 'value': value }; getTypeName() => "InsightsTimeBucket"; TypeContext? context = _ctx; } class InsightsSeriesTotal implements IConvertible { int? total; double? changePercent; InsightsSeriesTotal({this.total,this.changePercent}); InsightsSeriesTotal.fromJson(Map json) { fromMap(json); } fromMap(Map json) { total = json['total']; changePercent = JsonConverters.toDouble(json['changePercent']); return this; } Map toJson() => { 'total': total, 'changePercent': changePercent }; getTypeName() => "InsightsSeriesTotal"; TypeContext? context = _ctx; } class InsightsAgeBucket implements IConvertible { String? ageGroup; String? sex; int? count; InsightsAgeBucket({this.ageGroup,this.sex,this.count}); InsightsAgeBucket.fromJson(Map json) { fromMap(json); } fromMap(Map json) { ageGroup = json['ageGroup']; sex = json['sex']; count = json['count']; return this; } Map toJson() => { 'ageGroup': ageGroup, 'sex': sex, 'count': count }; getTypeName() => "InsightsAgeBucket"; TypeContext? context = _ctx; } class InsightsDemographicsTotals implements IConvertible { int? totalUsers; int? maleCount; int? femaleCount; int? unspecifiedCount; InsightsDemographicsTotals({this.totalUsers,this.maleCount,this.femaleCount,this.unspecifiedCount}); InsightsDemographicsTotals.fromJson(Map json) { fromMap(json); } fromMap(Map json) { totalUsers = json['totalUsers']; maleCount = json['maleCount']; femaleCount = json['femaleCount']; unspecifiedCount = json['unspecifiedCount']; return this; } Map toJson() => { 'totalUsers': totalUsers, 'maleCount': maleCount, 'femaleCount': femaleCount, 'unspecifiedCount': unspecifiedCount }; getTypeName() => "InsightsDemographicsTotals"; TypeContext? context = _ctx; } class PointsBreakdown implements IConvertible { String? source; int? totalPoints; int? uniqueUsers; PointsBreakdown({this.source,this.totalPoints,this.uniqueUsers}); PointsBreakdown.fromJson(Map json) { fromMap(json); } fromMap(Map json) { source = json['source']; totalPoints = json['totalPoints']; uniqueUsers = json['uniqueUsers']; return this; } Map toJson() => { 'source': source, 'totalPoints': totalPoints, 'uniqueUsers': uniqueUsers }; getTypeName() => "PointsBreakdown"; TypeContext? context = _ctx; } class GetInsightsResponse implements IConvertible { InsightsOverview? overview; List? inviteFriendsSeries = []; InsightsSeriesTotal? inviteFriendsTotals; List? inviteAcceptedSeries = []; InsightsSeriesTotal? inviteAcceptedTotals; List? signUpsSeries = []; InsightsSeriesTotal? signUpsTotals; List? optOutsSeries = []; InsightsSeriesTotal? optOutsTotals; List? churnSeries = []; InsightsSeriesTotal? churnTotals; List? activeUsersSeries = []; InsightsSeriesTotal? activeUsersTotals; List? demographics = []; InsightsDemographicsTotals? demographicsTotals; int? lotteryUniqueParticipants; int? lotteryTotalPoints; List? rewardPointsBreakdown = []; int? rewardPointsTotalAll; int? rewardPointsUniqueUsersAll; GetInsightsResponse({this.overview,this.inviteFriendsSeries,this.inviteFriendsTotals,this.inviteAcceptedSeries,this.inviteAcceptedTotals,this.signUpsSeries,this.signUpsTotals,this.optOutsSeries,this.optOutsTotals,this.churnSeries,this.churnTotals,this.activeUsersSeries,this.activeUsersTotals,this.demographics,this.demographicsTotals,this.lotteryUniqueParticipants,this.lotteryTotalPoints,this.rewardPointsBreakdown,this.rewardPointsTotalAll,this.rewardPointsUniqueUsersAll}); GetInsightsResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { overview = JsonConverters.fromJson(json['overview'],'InsightsOverview',context!); inviteFriendsSeries = JsonConverters.fromJson(json['inviteFriendsSeries'],'List',context!); inviteFriendsTotals = JsonConverters.fromJson(json['inviteFriendsTotals'],'InsightsSeriesTotal',context!); inviteAcceptedSeries = JsonConverters.fromJson(json['inviteAcceptedSeries'],'List',context!); inviteAcceptedTotals = JsonConverters.fromJson(json['inviteAcceptedTotals'],'InsightsSeriesTotal',context!); signUpsSeries = JsonConverters.fromJson(json['signUpsSeries'],'List',context!); signUpsTotals = JsonConverters.fromJson(json['signUpsTotals'],'InsightsSeriesTotal',context!); optOutsSeries = JsonConverters.fromJson(json['optOutsSeries'],'List',context!); optOutsTotals = JsonConverters.fromJson(json['optOutsTotals'],'InsightsSeriesTotal',context!); churnSeries = JsonConverters.fromJson(json['churnSeries'],'List',context!); churnTotals = JsonConverters.fromJson(json['churnTotals'],'InsightsSeriesTotal',context!); activeUsersSeries = JsonConverters.fromJson(json['activeUsersSeries'],'List',context!); activeUsersTotals = JsonConverters.fromJson(json['activeUsersTotals'],'InsightsSeriesTotal',context!); demographics = JsonConverters.fromJson(json['demographics'],'List',context!); demographicsTotals = JsonConverters.fromJson(json['demographicsTotals'],'InsightsDemographicsTotals',context!); lotteryUniqueParticipants = json['lotteryUniqueParticipants']; lotteryTotalPoints = json['lotteryTotalPoints']; rewardPointsBreakdown = JsonConverters.fromJson(json['rewardPointsBreakdown'],'List',context!); rewardPointsTotalAll = json['rewardPointsTotalAll']; rewardPointsUniqueUsersAll = json['rewardPointsUniqueUsersAll']; return this; } Map toJson() => { 'overview': JsonConverters.toJson(overview,'InsightsOverview',context!), 'inviteFriendsSeries': JsonConverters.toJson(inviteFriendsSeries,'List',context!), 'inviteFriendsTotals': JsonConverters.toJson(inviteFriendsTotals,'InsightsSeriesTotal',context!), 'inviteAcceptedSeries': JsonConverters.toJson(inviteAcceptedSeries,'List',context!), 'inviteAcceptedTotals': JsonConverters.toJson(inviteAcceptedTotals,'InsightsSeriesTotal',context!), 'signUpsSeries': JsonConverters.toJson(signUpsSeries,'List',context!), 'signUpsTotals': JsonConverters.toJson(signUpsTotals,'InsightsSeriesTotal',context!), 'optOutsSeries': JsonConverters.toJson(optOutsSeries,'List',context!), 'optOutsTotals': JsonConverters.toJson(optOutsTotals,'InsightsSeriesTotal',context!), 'churnSeries': JsonConverters.toJson(churnSeries,'List',context!), 'churnTotals': JsonConverters.toJson(churnTotals,'InsightsSeriesTotal',context!), 'activeUsersSeries': JsonConverters.toJson(activeUsersSeries,'List',context!), 'activeUsersTotals': JsonConverters.toJson(activeUsersTotals,'InsightsSeriesTotal',context!), 'demographics': JsonConverters.toJson(demographics,'List',context!), 'demographicsTotals': JsonConverters.toJson(demographicsTotals,'InsightsDemographicsTotals',context!), 'lotteryUniqueParticipants': lotteryUniqueParticipants, 'lotteryTotalPoints': lotteryTotalPoints, 'rewardPointsBreakdown': JsonConverters.toJson(rewardPointsBreakdown,'List',context!), 'rewardPointsTotalAll': rewardPointsTotalAll, 'rewardPointsUniqueUsersAll': rewardPointsUniqueUsersAll }; getTypeName() => "GetInsightsResponse"; TypeContext? context = _ctx; } // @Route("/insights", "GET") class GetInsightsRequest implements IReturn, IGet, IConvertible { InsightTimeFilter? timeFilter; int? cacheVersion; GetInsightsRequest({this.timeFilter,this.cacheVersion}); GetInsightsRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { timeFilter = JsonConverters.fromJson(json['timeFilter'],'InsightTimeFilter',context!); cacheVersion = json['cacheVersion']; return this; } Map toJson() => { 'timeFilter': JsonConverters.toJson(timeFilter,'InsightTimeFilter',context!), 'cacheVersion': cacheVersion }; createResponse() => GetInsightsResponse(); getResponseTypeName() => "GetInsightsResponse"; getTypeName() => "GetInsightsRequest"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'BackofficeApi', types: { 'InsightTimeFilter': TypeInfo(TypeOf.Enum, enumValues:InsightTimeFilter.values), 'InsightsOverview': TypeInfo(TypeOf.Class, create:() => InsightsOverview()), 'InsightsTimeBucket': TypeInfo(TypeOf.Class, create:() => InsightsTimeBucket()), 'InsightsSeriesTotal': TypeInfo(TypeOf.Class, create:() => InsightsSeriesTotal()), 'InsightsAgeBucket': TypeInfo(TypeOf.Class, create:() => InsightsAgeBucket()), 'InsightsDemographicsTotals': TypeInfo(TypeOf.Class, create:() => InsightsDemographicsTotals()), 'PointsBreakdown': TypeInfo(TypeOf.Class, create:() => PointsBreakdown()), 'GetInsightsResponse': TypeInfo(TypeOf.Class, create:() => GetInsightsResponse()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'List': TypeInfo(TypeOf.Class, create:() => []), 'List': TypeInfo(TypeOf.Class, create:() => []), 'GetInsightsRequest': TypeInfo(TypeOf.Class, create:() => GetInsightsRequest()), });