/* Options: Date: 2025-05-05 01:31:08 Version: 8.71 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://team.evovoice.io //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: ListConversations.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart,dart:typed_data */ import 'package:servicestack/servicestack.dart'; import 'dart:typed_data'; class MessageInfo implements IConvertible { String? id; String? accountId; String? customerId; String? endpointId; String? endpointDisplayName; String? date; MessageDirections? direction; String? otherAddress; String? sender; String? text; bool? isUnread; MessageInfo({this.id,this.accountId,this.customerId,this.endpointId,this.endpointDisplayName,this.date,this.direction,this.otherAddress,this.sender,this.text,this.isUnread}); MessageInfo.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; accountId = json['accountId']; customerId = json['customerId']; endpointId = json['endpointId']; endpointDisplayName = json['endpointDisplayName']; date = json['date']; direction = JsonConverters.fromJson(json['direction'],'MessageDirections',context!); otherAddress = json['otherAddress']; sender = json['sender']; text = json['text']; isUnread = json['isUnread']; return this; } Map toJson() => { 'id': id, 'accountId': accountId, 'customerId': customerId, 'endpointId': endpointId, 'endpointDisplayName': endpointDisplayName, 'date': date, 'direction': JsonConverters.toJson(direction,'MessageDirections',context!), 'otherAddress': otherAddress, 'sender': sender, 'text': text, 'isUnread': isUnread }; getTypeName() => "MessageInfo"; TypeContext? context = _ctx; } class ConversationInfo implements IConvertible { String? id; String? endpointId; String? otherAddress; MessageInfo? mostRecentMessage; ConversationInfo({this.id,this.endpointId,this.otherAddress,this.mostRecentMessage}); ConversationInfo.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; endpointId = json['endpointId']; otherAddress = json['otherAddress']; mostRecentMessage = JsonConverters.fromJson(json['mostRecentMessage'],'MessageInfo',context!); return this; } Map toJson() => { 'id': id, 'endpointId': endpointId, 'otherAddress': otherAddress, 'mostRecentMessage': JsonConverters.toJson(mostRecentMessage,'MessageInfo',context!) }; getTypeName() => "ConversationInfo"; TypeContext? context = _ctx; } class ListConversationsResponse implements IConvertible { List? conversations; ListConversationsResponse({this.conversations}); ListConversationsResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { conversations = JsonConverters.fromJson(json['conversations'],'List',context!); return this; } Map toJson() => { 'conversations': JsonConverters.toJson(conversations,'List',context!) }; getTypeName() => "ListConversationsResponse"; TypeContext? context = _ctx; } // @Route("/conversations", "GET") class ListConversations implements IReturn, IConvertible, IGet { /** * The IDs of the account whose conversations you want to retrieve */ // @ApiMember(Description="The IDs of the account whose conversations you want to retrieve") List? accountIds; /** * The list of endpoint IDs whose conversations you want to retrieve */ // @ApiMember(Description="The list of endpoint IDs whose conversations you want to retrieve") List? endpointIds; /** * The list of customer IDs whose conversations you want to retrieve */ // @ApiMember(Description="The list of customer IDs whose conversations you want to retrieve") List? customerIds; /** * The start date for the conversations you want to retrieve */ // @ApiMember(Description="The start date for the conversations you want to retrieve") String? afterDate; ListConversations({this.accountIds,this.endpointIds,this.customerIds,this.afterDate}); ListConversations.fromJson(Map json) { fromMap(json); } fromMap(Map json) { accountIds = JsonConverters.fromJson(json['accountIds'],'List',context!); endpointIds = JsonConverters.fromJson(json['endpointIds'],'List',context!); customerIds = JsonConverters.fromJson(json['customerIds'],'List',context!); afterDate = json['afterDate']; return this; } Map toJson() => { 'accountIds': JsonConverters.toJson(accountIds,'List',context!), 'endpointIds': JsonConverters.toJson(endpointIds,'List',context!), 'customerIds': JsonConverters.toJson(customerIds,'List',context!), 'afterDate': afterDate }; createResponse() => ListConversationsResponse(); getResponseTypeName() => "ListConversationsResponse"; getTypeName() => "ListConversations"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'team.evovoice.io', types: { 'MessageInfo': TypeInfo(TypeOf.Class, create:() => MessageInfo()), 'MessageDirections': TypeInfo(TypeOf.Class, create:() => MessageDirections()), 'ConversationInfo': TypeInfo(TypeOf.Class, create:() => ConversationInfo()), 'ListConversationsResponse': TypeInfo(TypeOf.Class, create:() => ListConversationsResponse()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'ListConversations': TypeInfo(TypeOf.Class, create:() => ListConversations()), });