/* Options: Date: 2025-12-06 07:06:14 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: SearchPlaceRequest.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ library BackofficeApi; import 'package:servicestack/servicestack.dart'; class PlaceAddress implements IConvertible { String? street; String? postalCode; String? region; String? countryCode; PlaceAddress({this.street,this.postalCode,this.region,this.countryCode}); PlaceAddress.fromJson(Map json) { fromMap(json); } fromMap(Map json) { street = json['street']; postalCode = json['postalCode']; region = json['region']; countryCode = json['countryCode']; return this; } Map toJson() => { 'street': street, 'postalCode': postalCode, 'region': region, 'countryCode': countryCode }; getTypeName() => "PlaceAddress"; TypeContext? context = _ctx; } enum PlaceState { Draft, Active, Paused, Archived, } class CategoryDto implements IConvertible { int? id; String? name; String? slug; String? absoluteSlug; int? parentId; String? state; int? position; CategoryDto({this.id,this.name,this.slug,this.absoluteSlug,this.parentId,this.state,this.position}); CategoryDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; name = json['name']; slug = json['slug']; absoluteSlug = json['absoluteSlug']; parentId = json['parentId']; state = json['state']; position = json['position']; return this; } Map toJson() => { 'id': id, 'name': name, 'slug': slug, 'absoluteSlug': absoluteSlug, 'parentId': parentId, 'state': state, 'position': position }; getTypeName() => "CategoryDto"; TypeContext? context = _ctx; } class TimeZoneDto implements IConvertible { Duration? baseUtcOffset; String? daylightName; String? displayName; String? id; String? standardName; bool? supportsDaylightSavingTime; TimeZoneDto({this.baseUtcOffset,this.daylightName,this.displayName,this.id,this.standardName,this.supportsDaylightSavingTime}); TimeZoneDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { baseUtcOffset = JsonConverters.fromJson(json['baseUtcOffset'],'Duration',context!); daylightName = json['daylightName']; displayName = json['displayName']; id = json['id']; standardName = json['standardName']; supportsDaylightSavingTime = json['supportsDaylightSavingTime']; return this; } Map toJson() => { 'baseUtcOffset': JsonConverters.toJson(baseUtcOffset,'Duration',context!), 'daylightName': daylightName, 'displayName': displayName, 'id': id, 'standardName': standardName, 'supportsDaylightSavingTime': supportsDaylightSavingTime }; getTypeName() => "TimeZoneDto"; TypeContext? context = _ctx; } class PlaceContact implements IConvertible { String? phone; String? email; String? website; String? webShop; PlaceContact({this.phone,this.email,this.website,this.webShop}); PlaceContact.fromJson(Map json) { fromMap(json); } fromMap(Map json) { phone = json['phone']; email = json['email']; website = json['website']; webShop = json['webShop']; return this; } Map toJson() => { 'phone': phone, 'email': email, 'website': website, 'webShop': webShop }; getTypeName() => "PlaceContact"; TypeContext? context = _ctx; } enum StaffRole { Owner, Admin, Regular, } enum BusinessRole { Owner, Manager, Sales, Marketing, Other, } class StaffDto implements IConvertible { int? id; String? firstName; String? lastName; String? email; StaffRole? role; int? placeId; int? businessId; int? userId; String? placeName; String? businessName; String? mobileNumber; BusinessRole? businessRole; DateTime? lastActiveOn; StaffDto({this.id,this.firstName,this.lastName,this.email,this.role,this.placeId,this.businessId,this.userId,this.placeName,this.businessName,this.mobileNumber,this.businessRole,this.lastActiveOn}); StaffDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; firstName = json['firstName']; lastName = json['lastName']; email = json['email']; role = JsonConverters.fromJson(json['role'],'StaffRole',context!); placeId = json['placeId']; businessId = json['businessId']; userId = json['userId']; placeName = json['placeName']; businessName = json['businessName']; mobileNumber = json['mobileNumber']; businessRole = JsonConverters.fromJson(json['businessRole'],'BusinessRole',context!); lastActiveOn = JsonConverters.fromJson(json['lastActiveOn'],'DateTime',context!); return this; } Map toJson() => { 'id': id, 'firstName': firstName, 'lastName': lastName, 'email': email, 'role': JsonConverters.toJson(role,'StaffRole',context!), 'placeId': placeId, 'businessId': businessId, 'userId': userId, 'placeName': placeName, 'businessName': businessName, 'mobileNumber': mobileNumber, 'businessRole': JsonConverters.toJson(businessRole,'BusinessRole',context!), 'lastActiveOn': JsonConverters.toJson(lastActiveOn,'DateTime',context!) }; getTypeName() => "StaffDto"; TypeContext? context = _ctx; } class BackofficePlaceDto implements IConvertible { int? id; String? guid; String? name; double? longitude; double? latitude; CategoryDto? rootCategory; bool? claimed; String? organizationNumber; PlaceState? state; String? countryCode; String? overview; TimeZoneDto? timeZoneDto; int? businessId; PlaceContact? contact; PlaceAddress? address; List? backofficeGrantedStaffAccess = []; BackofficePlaceDto({this.id,this.guid,this.name,this.longitude,this.latitude,this.rootCategory,this.claimed,this.organizationNumber,this.state,this.countryCode,this.overview,this.timeZoneDto,this.businessId,this.contact,this.address,this.backofficeGrantedStaffAccess}); BackofficePlaceDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; guid = json['guid']; name = json['name']; longitude = JsonConverters.toDouble(json['longitude']); latitude = JsonConverters.toDouble(json['latitude']); rootCategory = JsonConverters.fromJson(json['rootCategory'],'CategoryDto',context!); claimed = json['claimed']; organizationNumber = json['organizationNumber']; state = JsonConverters.fromJson(json['state'],'PlaceState',context!); countryCode = json['countryCode']; overview = json['overview']; timeZoneDto = JsonConverters.fromJson(json['timeZoneDto'],'TimeZoneDto',context!); businessId = json['businessId']; contact = JsonConverters.fromJson(json['contact'],'PlaceContact',context!); address = JsonConverters.fromJson(json['address'],'PlaceAddress',context!); backofficeGrantedStaffAccess = JsonConverters.fromJson(json['backofficeGrantedStaffAccess'],'List',context!); return this; } Map toJson() => { 'id': id, 'guid': guid, 'name': name, 'longitude': longitude, 'latitude': latitude, 'rootCategory': JsonConverters.toJson(rootCategory,'CategoryDto',context!), 'claimed': claimed, 'organizationNumber': organizationNumber, 'state': JsonConverters.toJson(state,'PlaceState',context!), 'countryCode': countryCode, 'overview': overview, 'timeZoneDto': JsonConverters.toJson(timeZoneDto,'TimeZoneDto',context!), 'businessId': businessId, 'contact': JsonConverters.toJson(contact,'PlaceContact',context!), 'address': JsonConverters.toJson(address,'PlaceAddress',context!), 'backofficeGrantedStaffAccess': JsonConverters.toJson(backofficeGrantedStaffAccess,'List',context!) }; getTypeName() => "BackofficePlaceDto"; TypeContext? context = _ctx; } class SearchPlaceResponse implements IConvertible { List? places = []; int? total; int? size; int? offset; SearchPlaceResponse({this.places,this.total,this.size,this.offset}); SearchPlaceResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { places = JsonConverters.fromJson(json['places'],'List',context!); total = json['total']; size = json['size']; offset = json['offset']; return this; } Map toJson() => { 'places': JsonConverters.toJson(places,'List',context!), 'total': total, 'size': size, 'offset': offset }; getTypeName() => "SearchPlaceResponse"; TypeContext? context = _ctx; } // @Route("/place/search", "GET") class SearchPlaceRequest implements IReturn, IGet, IConvertible { String? query; int? size; int? offset; SearchPlaceRequest({this.query,this.size,this.offset}); SearchPlaceRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { query = json['query']; size = json['size']; offset = json['offset']; return this; } Map toJson() => { 'query': query, 'size': size, 'offset': offset }; createResponse() => SearchPlaceResponse(); getResponseTypeName() => "SearchPlaceResponse"; getTypeName() => "SearchPlaceRequest"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'BackofficeApi', types: { 'PlaceAddress': TypeInfo(TypeOf.Class, create:() => PlaceAddress()), 'PlaceState': TypeInfo(TypeOf.Enum, enumValues:PlaceState.values), 'CategoryDto': TypeInfo(TypeOf.Class, create:() => CategoryDto()), 'TimeZoneDto': TypeInfo(TypeOf.Class, create:() => TimeZoneDto()), 'PlaceContact': TypeInfo(TypeOf.Class, create:() => PlaceContact()), 'StaffRole': TypeInfo(TypeOf.Enum, enumValues:StaffRole.values), 'BusinessRole': TypeInfo(TypeOf.Enum, enumValues:BusinessRole.values), 'StaffDto': TypeInfo(TypeOf.Class, create:() => StaffDto()), 'BackofficePlaceDto': TypeInfo(TypeOf.Class, create:() => BackofficePlaceDto()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'SearchPlaceResponse': TypeInfo(TypeOf.Class, create:() => SearchPlaceResponse()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'SearchPlaceRequest': TypeInfo(TypeOf.Class, create:() => SearchPlaceRequest()), });