/* Options: Date: 2025-05-04 23:41:55 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: SendMessage.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart,dart:typed_data */ import 'package:servicestack/servicestack.dart'; import 'dart:typed_data'; enum MessageDirections { Incoming, Outgoing, } 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; } // @Route("/sessions/{sessionId}/messages", "POST") // @Route("/messages") class SendMessage implements IReturn, IConvertible, IPost { /** * The ID of the session you want to post a message to. Specify either this or EndpointId+ToAddress */ // @ApiMember(Description="The ID of the session you want to post a message to. Specify either this or EndpointId+ToAddress") String? sessionId; /** * The ID of the endpoint you want to post a message to. Typically the ID of a phone number endpoint. Not used if SessionId is specified */ // @ApiMember(Description="The ID of the endpoint you want to post a message to. Typically the ID of a phone number endpoint. Not used if SessionId is specified") String? endpointId; /** * The address of the party you want to send a message to, e.g. +15556667777. Not used if SessionId is specified */ // @ApiMember(Description="The address of the party you want to send a message to, e.g. +15556667777. Not used if SessionId is specified") String? toAddress; /** * The body of the message */ // @ApiMember(Description="The body of the message") String? body; SendMessage({this.sessionId,this.endpointId,this.toAddress,this.body}); SendMessage.fromJson(Map json) { fromMap(json); } fromMap(Map json) { sessionId = json['sessionId']; endpointId = json['endpointId']; toAddress = json['toAddress']; body = json['body']; return this; } Map toJson() => { 'sessionId': sessionId, 'endpointId': endpointId, 'toAddress': toAddress, 'body': body }; createResponse() => MessageInfo(); getResponseTypeName() => "MessageInfo"; getTypeName() => "SendMessage"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'team.evovoice.io', types: { 'MessageDirections': TypeInfo(TypeOf.Enum, enumValues:MessageDirections.values), 'MessageInfo': TypeInfo(TypeOf.Class, create:() => MessageInfo()), 'SendMessage': TypeInfo(TypeOf.Class, create:() => SendMessage()), });