Evo Voice

<back to all web services

AppGetHomeInformation

Requires Authentication
The following routes are available for this service:
GET/portal/home
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<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> 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<String, dynamic> 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<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        endpointId = json['endpointId'];
        otherAddress = json['otherAddress'];
        mostRecentMessage = JsonConverters.fromJson(json['mostRecentMessage'],'MessageInfo',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'endpointId': endpointId,
        'otherAddress': otherAddress,
        'mostRecentMessage': JsonConverters.toJson(mostRecentMessage,'MessageInfo',context!)
    };

    getTypeName() => "ConversationInfo";
    TypeContext? context = _ctx;
}

abstract class EntityInfo
{
    /**
    * The ID of the object
    */
    // @ApiMember(Description="The ID of the object")
    String? id;

    /**
    * The date the object was created
    */
    // @ApiMember(Description="The date the object was created")
    String? dateCreated;

    /**
    * The date the object was last modified
    */
    // @ApiMember(Description="The date the object was last modified")
    String? dateLastModified;

    /**
    * The user that created this object
    */
    // @ApiMember(Description="The user that created this object")
    String? createdBy;

    /**
    * The user that last modified this object
    */
    // @ApiMember(Description="The user that last modified this object")
    String? lastModifiedBy;

    EntityInfo({this.id,this.dateCreated,this.dateLastModified,this.createdBy,this.lastModifiedBy});
    EntityInfo.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        dateCreated = json['dateCreated'];
        dateLastModified = json['dateLastModified'];
        createdBy = json['createdBy'];
        lastModifiedBy = json['lastModifiedBy'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'dateCreated': dateCreated,
        'dateLastModified': dateLastModified,
        'createdBy': createdBy,
        'lastModifiedBy': lastModifiedBy
    };

    getTypeName() => "EntityInfo";
    TypeContext? context = _ctx;
}

enum SessionDialState
{
    None,
    Active,
}

enum SessionCallState
{
    Disconnected,
    Ringing,
    Connected,
    Hold,
    Passive,
}

enum SessionQueueStates
{
    None,
    Queued,
    Ringing,
    Connected,
    Hold,
    Disconnected,
}

class CustomerBreadcrumb implements IConvertible
{
    String? id;
    String? name;

    CustomerBreadcrumb({this.id,this.name});
    CustomerBreadcrumb.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        name = json['name'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'name': name
    };

    getTypeName() => "CustomerBreadcrumb";
    TypeContext? context = _ctx;
}

enum FlowChannels
{
    Voice,
    Chat,
    Fax,
}

enum SessionHoldReasons
{
    None,
    Transferring,
}

class SessionLogInfo implements IConvertible
{
    String? date;
    String? message;

    SessionLogInfo({this.date,this.message});
    SessionLogInfo.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        date = json['date'];
        message = json['message'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'date': date,
        'message': message
    };

    getTypeName() => "SessionLogInfo";
    TypeContext? context = _ctx;
}

enum SessionMemberCallState
{
    None,
    Ringing,
    Connected,
    Hold,
}

enum SessionMemberRoles
{
    None,
    Caller,
    Agent,
    Transfer,
}

class SessionMemberInfo implements IConvertible
{
    String? identity;
    String? endpointId;
    String? displayName;
    bool? isOriginalMember;
    String? avatarUrl;
    Map<String,String?>? applicationData;
    SessionMemberCallState? callState;
    SessionMemberRoles? role;
    String? callSid;
    bool? muted;

    SessionMemberInfo({this.identity,this.endpointId,this.displayName,this.isOriginalMember,this.avatarUrl,this.applicationData,this.callState,this.role,this.callSid,this.muted});
    SessionMemberInfo.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        identity = json['identity'];
        endpointId = json['endpointId'];
        displayName = json['displayName'];
        isOriginalMember = json['isOriginalMember'];
        avatarUrl = json['avatarUrl'];
        applicationData = JsonConverters.toStringMap(json['applicationData']);
        callState = JsonConverters.fromJson(json['callState'],'SessionMemberCallState',context!);
        role = JsonConverters.fromJson(json['role'],'SessionMemberRoles',context!);
        callSid = json['callSid'];
        muted = json['muted'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'identity': identity,
        'endpointId': endpointId,
        'displayName': displayName,
        'isOriginalMember': isOriginalMember,
        'avatarUrl': avatarUrl,
        'applicationData': applicationData,
        'callState': JsonConverters.toJson(callState,'SessionMemberCallState',context!),
        'role': JsonConverters.toJson(role,'SessionMemberRoles',context!),
        'callSid': callSid,
        'muted': muted
    };

    getTypeName() => "SessionMemberInfo";
    TypeContext? context = _ctx;
}

enum SessionDirections
{
    Incoming,
    Outgoing,
}

class SessionInfo extends EntityInfo implements IConvertible
{
    /**
    * The state of the session
    */
    // @ApiMember(Description="The state of the session")
    SessionDialState? dialState;

    /**
    * The call state of the session
    */
    // @ApiMember(Description="The call state of the session")
    SessionCallState? callState;

    /**
    * The queue state of the session
    */
    // @ApiMember(Description="The queue state of the session")
    SessionQueueStates? queueState;

    /**
    * The ID of the account associated with the flow
    */
    // @ApiMember(Description="The ID of the account associated with the flow")
    String? accountId;

    /**
    * The name of the account associated with the session
    */
    // @ApiMember(Description="The name of the account associated with the session")
    String? accountName;

    /**
    * The ID of the customer this session is associated with
    */
    // @ApiMember(Description="The ID of the customer this session is associated with")
    String? customerId;

    /**
    * The customer breadcrumb this session is associated with
    */
    // @ApiMember(Description="The customer breadcrumb this session is associated with")
    List<CustomerBreadcrumb>? customerBreadcrumb;

    /**
    * The name of the customer this session is associated with
    */
    // @ApiMember(Description="The name of the customer this session is associated with")
    String? customerName;

    /**
    * The ID of the endpoint associated with this session
    */
    // @ApiMember(Description="The ID of the endpoint associated with this session")
    String? endpointId;

    /**
    * The name of the endpoint associated with this session
    */
    // @ApiMember(Description="The name of the endpoint associated with this session")
    String? endpointName;

    /**
    * The date the call completed
    */
    // @ApiMember(Description="The date the call completed")
    String? dateCompleted;

    /**
    * The destination of the session (e.g. what was entered into the Dial box)
    */
    // @ApiMember(Description="The destination of the session (e.g. what was entered into the Dial box)")
    String? destination;

    /**
    * The to address if any
    */
    // @ApiMember(Description="The to address if any")
    String? toAddress;

    /**
    * The from address if any
    */
    // @ApiMember(Description="The from address if any")
    String? fromAddress;

    /**
    * The from name if any
    */
    // @ApiMember(Description="The from name if any")
    String? fromName;

    /**
    * Answered by name (if any)
    */
    // @ApiMember(Description="Answered by name (if any)")
    String? answeredByName;

    /**
    * The ID of the queue member assigned to this call
    */
    // @ApiMember(Description="The ID of the queue member assigned to this call")
    String? queueMemberId;

    /**
    * The flow channel
    */
    // @ApiMember(Description="The flow channel")
    FlowChannels? channel;

    /**
    * Has the session ended
    */
    // @ApiMember(Description="Has the session ended")
    bool? ended;

    /**
    * The outcome of the call
    */
    // @ApiMember(Description="The outcome of the call")
    String? outcome;

    /**
    * The twilio Call SID of this session
    */
    // @ApiMember(Description="The twilio Call SID of this session")
    String? callSid;

    /**
    * Any console data for this session
    */
    // @ApiMember(Description="Any console data for this session")
    String? consoleData;

    /**
    * The name of the hold queue for this call
    */
    // @ApiMember(Description="The name of the hold queue for this call")
    String? holdQueueName;

    /**
    * The user ID who put this call on hold
    */
    // @ApiMember(Description="The user ID who put this call on hold")
    String? heldByUserId;

    /**
    * The reason for the hold
    */
    // @ApiMember(Description="The reason for the hold")
    SessionHoldReasons? holdReason;

    /**
    * The SID of the conference if in a conference call
    */
    // @ApiMember(Description="The SID of the conference if in a conference call")
    String? conferenceSid;

    /**
    * The display name for this session
    */
    // @ApiMember(Description="The display name for this session")
    String? displayName;

    /**
    * The log entries for this session
    */
    // @ApiMember(Description="The log entries for this session")
    List<SessionLogInfo>? log;

    /**
    * The members of this session
    */
    // @ApiMember(Description="The members of this session")
    List<SessionMemberInfo>? members;

    /**
    * The callback number (typically used for SIP to User calls)
    */
    // @ApiMember(Description="The callback number (typically used for SIP to User calls)")
    String? callbackNumber;

    /**
    * The ID of the endpoint that answered
    */
    // @ApiMember(Description="The ID of the endpoint that answered")
    String? answeredById;

    /**
    * Is this session incoming or outgoing?
    */
    // @ApiMember(Description="Is this session incoming or outgoing?")
    SessionDirections? direction;

    /**
    * The phone number that this session is coming from (used with SMS chats)
    */
    // @ApiMember(Description="The phone number that this session is coming from (used with SMS chats)")
    String? fromPhoneNumber;

    /**
    * The Call SID of the most recently added conference participant
    */
    // @ApiMember(Description="The Call SID of the most recently added conference participant")
    String? mostRecentParticipantCallSid;

    /**
    * Was this session missed?
    */
    // @ApiMember(Description="Was this session missed?")
    bool? wasMissed;

    /**
    * The ring queue that the call is currently in
    */
    // @ApiMember(Description="The ring queue that the call is currently in")
    String? ringQueueId;

    SessionInfo({this.dialState,this.callState,this.queueState,this.accountId,this.accountName,this.customerId,this.customerBreadcrumb,this.customerName,this.endpointId,this.endpointName,this.dateCompleted,this.destination,this.toAddress,this.fromAddress,this.fromName,this.answeredByName,this.queueMemberId,this.channel,this.ended,this.outcome,this.callSid,this.consoleData,this.holdQueueName,this.heldByUserId,this.holdReason,this.conferenceSid,this.displayName,this.log,this.members,this.callbackNumber,this.answeredById,this.direction,this.fromPhoneNumber,this.mostRecentParticipantCallSid,this.wasMissed,this.ringQueueId});
    SessionInfo.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        dialState = JsonConverters.fromJson(json['dialState'],'SessionDialState',context!);
        callState = JsonConverters.fromJson(json['callState'],'SessionCallState',context!);
        queueState = JsonConverters.fromJson(json['queueState'],'SessionQueueStates',context!);
        accountId = json['accountId'];
        accountName = json['accountName'];
        customerId = json['customerId'];
        customerBreadcrumb = JsonConverters.fromJson(json['customerBreadcrumb'],'List<CustomerBreadcrumb>',context!);
        customerName = json['customerName'];
        endpointId = json['endpointId'];
        endpointName = json['endpointName'];
        dateCompleted = json['dateCompleted'];
        destination = json['destination'];
        toAddress = json['toAddress'];
        fromAddress = json['fromAddress'];
        fromName = json['fromName'];
        answeredByName = json['answeredByName'];
        queueMemberId = json['queueMemberId'];
        channel = JsonConverters.fromJson(json['channel'],'FlowChannels',context!);
        ended = json['ended'];
        outcome = json['outcome'];
        callSid = json['callSid'];
        consoleData = json['consoleData'];
        holdQueueName = json['holdQueueName'];
        heldByUserId = json['heldByUserId'];
        holdReason = JsonConverters.fromJson(json['holdReason'],'SessionHoldReasons',context!);
        conferenceSid = json['conferenceSid'];
        displayName = json['displayName'];
        log = JsonConverters.fromJson(json['log'],'List<SessionLogInfo>',context!);
        members = JsonConverters.fromJson(json['members'],'List<SessionMemberInfo>',context!);
        callbackNumber = json['callbackNumber'];
        answeredById = json['answeredById'];
        direction = JsonConverters.fromJson(json['direction'],'SessionDirections',context!);
        fromPhoneNumber = json['fromPhoneNumber'];
        mostRecentParticipantCallSid = json['mostRecentParticipantCallSid'];
        wasMissed = json['wasMissed'];
        ringQueueId = json['ringQueueId'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'dialState': JsonConverters.toJson(dialState,'SessionDialState',context!),
        'callState': JsonConverters.toJson(callState,'SessionCallState',context!),
        'queueState': JsonConverters.toJson(queueState,'SessionQueueStates',context!),
        'accountId': accountId,
        'accountName': accountName,
        'customerId': customerId,
        'customerBreadcrumb': JsonConverters.toJson(customerBreadcrumb,'List<CustomerBreadcrumb>',context!),
        'customerName': customerName,
        'endpointId': endpointId,
        'endpointName': endpointName,
        'dateCompleted': dateCompleted,
        'destination': destination,
        'toAddress': toAddress,
        'fromAddress': fromAddress,
        'fromName': fromName,
        'answeredByName': answeredByName,
        'queueMemberId': queueMemberId,
        'channel': JsonConverters.toJson(channel,'FlowChannels',context!),
        'ended': ended,
        'outcome': outcome,
        'callSid': callSid,
        'consoleData': consoleData,
        'holdQueueName': holdQueueName,
        'heldByUserId': heldByUserId,
        'holdReason': JsonConverters.toJson(holdReason,'SessionHoldReasons',context!),
        'conferenceSid': conferenceSid,
        'displayName': displayName,
        'log': JsonConverters.toJson(log,'List<SessionLogInfo>',context!),
        'members': JsonConverters.toJson(members,'List<SessionMemberInfo>',context!),
        'callbackNumber': callbackNumber,
        'answeredById': answeredById,
        'direction': JsonConverters.toJson(direction,'SessionDirections',context!),
        'fromPhoneNumber': fromPhoneNumber,
        'mostRecentParticipantCallSid': mostRecentParticipantCallSid,
        'wasMissed': wasMissed,
        'ringQueueId': ringQueueId
    });

    getTypeName() => "SessionInfo";
    TypeContext? context = _ctx;
}

class AppHomeCallMetric implements IConvertible
{
    String? metricKey;
    double? total;
    double? average;

    AppHomeCallMetric({this.metricKey,this.total,this.average});
    AppHomeCallMetric.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        metricKey = json['metricKey'];
        total = JsonConverters.toDouble(json['total']);
        average = JsonConverters.toDouble(json['average']);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'metricKey': metricKey,
        'total': total,
        'average': average
    };

    getTypeName() => "AppHomeCallMetric";
    TypeContext? context = _ctx;
}

enum FileTypes
{
    Upload,
    VoiceMessage,
    CallRecording,
    Fax,
    Attachment,
    FaxOutgoing,
}

class FileInfo extends EntityInfo implements IConvertible
{
    /**
    * The type of file this is
    */
    // @ApiMember(Description="The type of file this is")
    FileTypes? type;

    /**
    * The account ID this file is associated with
    */
    // @ApiMember(Description="The account ID this file is associated with")
    String? accountId;

    /**
    * The name of the account this file is associated with
    */
    // @ApiMember(Description="The name of the account this file is associated with")
    String? accountName;

    /**
    * The ID of the customer this file is associated with
    */
    // @ApiMember(Description="The ID of the customer this file is associated with")
    String? customerId;

    /**
    * The name of the customer this file is associated with
    */
    // @ApiMember(Description="The name of the customer this file is associated with")
    String? customerName;

    /**
    * The breadcrumb to the customer for this file
    */
    // @ApiMember(Description="The breadcrumb to the customer for this file")
    List<CustomerBreadcrumb>? customerBreadcrumb;

    /**
    * The ID of the user this file is assocaited with
    */
    // @ApiMember(Description="The ID of the user this file is assocaited with")
    String? userId;

    /**
    * The name of the user this file is associated with
    */
    // @ApiMember(Description="The name of the user this file is associated with")
    String? userName;

    /**
    * The original file name for the file
    */
    // @ApiMember(Description="The original file name for the file")
    String? fileName;

    /**
    * The URI of the file
    */
    // @ApiMember(Description="The URI of the file")
    String? uri;

    /**
    * The Content type of the file
    */
    // @ApiMember(Description="The Content type of the file")
    String? contentType;

    /**
    * The size of the file
    */
    // @ApiMember(Description="The size of the file")
    int? contentLength;

    /**
    * The Twilio ID of the recording
    */
    // @ApiMember(Description="The Twilio ID of the recording")
    String? recordingSid;

    /**
    * The duration of the recording in seconds
    */
    // @ApiMember(Description="The duration of the recording in seconds")
    int? recordingDuration;

    /**
    * Who is the recording from?
    */
    // @ApiMember(Description="Who is the recording from?")
    String? recordingFrom;

    /**
    * Transcription (if available)
    */
    // @ApiMember(Description="Transcription (if available)")
    String? transcription;

    /**
    * From Address (e.g. caller ID) for incoming calls
    */
    // @ApiMember(Description="From Address (e.g. caller ID) for incoming calls")
    String? fromAddress;

    /**
    * To Address (e.g. dialed number) for outgoing calls
    */
    // @ApiMember(Description="To Address (e.g. dialed number) for outgoing calls")
    String? toAddress;

    FileInfo({this.type,this.accountId,this.accountName,this.customerId,this.customerName,this.customerBreadcrumb,this.userId,this.userName,this.fileName,this.uri,this.contentType,this.contentLength,this.recordingSid,this.recordingDuration,this.recordingFrom,this.transcription,this.fromAddress,this.toAddress});
    FileInfo.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        type = JsonConverters.fromJson(json['type'],'FileTypes',context!);
        accountId = json['accountId'];
        accountName = json['accountName'];
        customerId = json['customerId'];
        customerName = json['customerName'];
        customerBreadcrumb = JsonConverters.fromJson(json['customerBreadcrumb'],'List<CustomerBreadcrumb>',context!);
        userId = json['userId'];
        userName = json['userName'];
        fileName = json['fileName'];
        uri = json['uri'];
        contentType = json['contentType'];
        contentLength = json['contentLength'];
        recordingSid = json['recordingSid'];
        recordingDuration = json['recordingDuration'];
        recordingFrom = json['recordingFrom'];
        transcription = json['transcription'];
        fromAddress = json['fromAddress'];
        toAddress = json['toAddress'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'type': JsonConverters.toJson(type,'FileTypes',context!),
        'accountId': accountId,
        'accountName': accountName,
        'customerId': customerId,
        'customerName': customerName,
        'customerBreadcrumb': JsonConverters.toJson(customerBreadcrumb,'List<CustomerBreadcrumb>',context!),
        'userId': userId,
        'userName': userName,
        'fileName': fileName,
        'uri': uri,
        'contentType': contentType,
        'contentLength': contentLength,
        'recordingSid': recordingSid,
        'recordingDuration': recordingDuration,
        'recordingFrom': recordingFrom,
        'transcription': transcription,
        'fromAddress': fromAddress,
        'toAddress': toAddress
    });

    getTypeName() => "FileInfo";
    TypeContext? context = _ctx;
}

class HostedSuiteCompletedFormField implements IConvertible
{
    String? name;
    List<String>? values;

    HostedSuiteCompletedFormField({this.name,this.values});
    HostedSuiteCompletedFormField.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        name = json['name'];
        values = JsonConverters.fromJson(json['values'],'List<String>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'name': name,
        'values': JsonConverters.toJson(values,'List<String>',context!)
    };

    getTypeName() => "HostedSuiteCompletedFormField";
    TypeContext? context = _ctx;
}

class HostedSuiteCompletedForm implements IConvertible
{
    String? id;
    String? name;
    String? dateCreated;
    String? dateCompleted;
    String? formId;
    String? formName;
    String? clientId;
    String? clientName;
    String? contactId;
    String? contactName;
    List<String>? contactsIds;
    List<String>? contactsNames;
    String? emailSubject;
    String? callerNumber;
    List<HostedSuiteCompletedFormField>? fields;

    HostedSuiteCompletedForm({this.id,this.name,this.dateCreated,this.dateCompleted,this.formId,this.formName,this.clientId,this.clientName,this.contactId,this.contactName,this.contactsIds,this.contactsNames,this.emailSubject,this.callerNumber,this.fields});
    HostedSuiteCompletedForm.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        name = json['name'];
        dateCreated = json['dateCreated'];
        dateCompleted = json['dateCompleted'];
        formId = json['formId'];
        formName = json['formName'];
        clientId = json['clientId'];
        clientName = json['clientName'];
        contactId = json['contactId'];
        contactName = json['contactName'];
        contactsIds = JsonConverters.fromJson(json['contactsIds'],'List<String>',context!);
        contactsNames = JsonConverters.fromJson(json['contactsNames'],'List<String>',context!);
        emailSubject = json['emailSubject'];
        callerNumber = json['callerNumber'];
        fields = JsonConverters.fromJson(json['fields'],'List<HostedSuiteCompletedFormField>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'name': name,
        'dateCreated': dateCreated,
        'dateCompleted': dateCompleted,
        'formId': formId,
        'formName': formName,
        'clientId': clientId,
        'clientName': clientName,
        'contactId': contactId,
        'contactName': contactName,
        'contactsIds': JsonConverters.toJson(contactsIds,'List<String>',context!),
        'contactsNames': JsonConverters.toJson(contactsNames,'List<String>',context!),
        'emailSubject': emailSubject,
        'callerNumber': callerNumber,
        'fields': JsonConverters.toJson(fields,'List<HostedSuiteCompletedFormField>',context!)
    };

    getTypeName() => "HostedSuiteCompletedForm";
    TypeContext? context = _ctx;
}

class AppHomeInformation implements IConvertible
{
    bool? isHostedSuiteCustomer;
    List<ConversationInfo>? conversations;
    List<SessionInfo>? calls;
    List<AppHomeCallMetric>? callMetrics;
    List<FileInfo>? voicemail;
    List<HostedSuiteCompletedForm>? forms;

    AppHomeInformation({this.isHostedSuiteCustomer,this.conversations,this.calls,this.callMetrics,this.voicemail,this.forms});
    AppHomeInformation.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        isHostedSuiteCustomer = json['isHostedSuiteCustomer'];
        conversations = JsonConverters.fromJson(json['conversations'],'List<ConversationInfo>',context!);
        calls = JsonConverters.fromJson(json['calls'],'List<SessionInfo>',context!);
        callMetrics = JsonConverters.fromJson(json['callMetrics'],'List<AppHomeCallMetric>',context!);
        voicemail = JsonConverters.fromJson(json['voicemail'],'List<FileInfo>',context!);
        forms = JsonConverters.fromJson(json['forms'],'List<HostedSuiteCompletedForm>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'isHostedSuiteCustomer': isHostedSuiteCustomer,
        'conversations': JsonConverters.toJson(conversations,'List<ConversationInfo>',context!),
        'calls': JsonConverters.toJson(calls,'List<SessionInfo>',context!),
        'callMetrics': JsonConverters.toJson(callMetrics,'List<AppHomeCallMetric>',context!),
        'voicemail': JsonConverters.toJson(voicemail,'List<FileInfo>',context!),
        'forms': JsonConverters.toJson(forms,'List<HostedSuiteCompletedForm>',context!)
    };

    getTypeName() => "AppHomeInformation";
    TypeContext? context = _ctx;
}

class AppGetHomeInformation implements IConvertible
{
    String? accountId;
    String? customerId;
    String? fromDate;

    AppGetHomeInformation({this.accountId,this.customerId,this.fromDate});
    AppGetHomeInformation.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        accountId = json['accountId'];
        customerId = json['customerId'];
        fromDate = json['fromDate'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'accountId': accountId,
        'customerId': customerId,
        'fromDate': fromDate
    };

    getTypeName() => "AppGetHomeInformation";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'evovoice.io', types: <String, TypeInfo> {
    'MessageDirections': TypeInfo(TypeOf.Enum, enumValues:MessageDirections.values),
    'MessageInfo': TypeInfo(TypeOf.Class, create:() => MessageInfo()),
    'ConversationInfo': TypeInfo(TypeOf.Class, create:() => ConversationInfo()),
    'EntityInfo': TypeInfo(TypeOf.AbstractClass),
    'SessionDialState': TypeInfo(TypeOf.Enum, enumValues:SessionDialState.values),
    'SessionCallState': TypeInfo(TypeOf.Enum, enumValues:SessionCallState.values),
    'SessionQueueStates': TypeInfo(TypeOf.Enum, enumValues:SessionQueueStates.values),
    'CustomerBreadcrumb': TypeInfo(TypeOf.Class, create:() => CustomerBreadcrumb()),
    'FlowChannels': TypeInfo(TypeOf.Enum, enumValues:FlowChannels.values),
    'SessionHoldReasons': TypeInfo(TypeOf.Enum, enumValues:SessionHoldReasons.values),
    'SessionLogInfo': TypeInfo(TypeOf.Class, create:() => SessionLogInfo()),
    'SessionMemberCallState': TypeInfo(TypeOf.Enum, enumValues:SessionMemberCallState.values),
    'SessionMemberRoles': TypeInfo(TypeOf.Enum, enumValues:SessionMemberRoles.values),
    'SessionMemberInfo': TypeInfo(TypeOf.Class, create:() => SessionMemberInfo()),
    'SessionDirections': TypeInfo(TypeOf.Enum, enumValues:SessionDirections.values),
    'SessionInfo': TypeInfo(TypeOf.Class, create:() => SessionInfo()),
    'List<CustomerBreadcrumb>': TypeInfo(TypeOf.Class, create:() => <CustomerBreadcrumb>[]),
    'List<SessionLogInfo>': TypeInfo(TypeOf.Class, create:() => <SessionLogInfo>[]),
    'List<SessionMemberInfo>': TypeInfo(TypeOf.Class, create:() => <SessionMemberInfo>[]),
    'AppHomeCallMetric': TypeInfo(TypeOf.Class, create:() => AppHomeCallMetric()),
    'FileTypes': TypeInfo(TypeOf.Enum, enumValues:FileTypes.values),
    'FileInfo': TypeInfo(TypeOf.Class, create:() => FileInfo()),
    'HostedSuiteCompletedFormField': TypeInfo(TypeOf.Class, create:() => HostedSuiteCompletedFormField()),
    'HostedSuiteCompletedForm': TypeInfo(TypeOf.Class, create:() => HostedSuiteCompletedForm()),
    'List<HostedSuiteCompletedFormField>': TypeInfo(TypeOf.Class, create:() => <HostedSuiteCompletedFormField>[]),
    'AppHomeInformation': TypeInfo(TypeOf.Class, create:() => AppHomeInformation()),
    'List<ConversationInfo>': TypeInfo(TypeOf.Class, create:() => <ConversationInfo>[]),
    'List<SessionInfo>': TypeInfo(TypeOf.Class, create:() => <SessionInfo>[]),
    'List<AppHomeCallMetric>': TypeInfo(TypeOf.Class, create:() => <AppHomeCallMetric>[]),
    'List<FileInfo>': TypeInfo(TypeOf.Class, create:() => <FileInfo>[]),
    'List<HostedSuiteCompletedForm>': TypeInfo(TypeOf.Class, create:() => <HostedSuiteCompletedForm>[]),
    'AppGetHomeInformation': TypeInfo(TypeOf.Class, create:() => AppGetHomeInformation()),
});

Dart AppGetHomeInformation DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /portal/home HTTP/1.1 
Host: evovoice.io 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<AppHomeInformation xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Voice.Api.Portal">
  <CallMetrics>
    <AppHomeCallMetric>
      <Average>0</Average>
      <MetricKey>String</MetricKey>
      <Total>0</Total>
    </AppHomeCallMetric>
  </CallMetrics>
  <Calls xmlns:d2p1="http://schemas.datacontract.org/2004/07/Voice.Api.Sessions">
    <d2p1:SessionInfo>
      <CreatedBy xmlns="http://schemas.datacontract.org/2004/07/Voice.Api">String</CreatedBy>
      <DateCreated xmlns="http://schemas.datacontract.org/2004/07/Voice.Api">String</DateCreated>
      <DateLastModified xmlns="http://schemas.datacontract.org/2004/07/Voice.Api">String</DateLastModified>
      <Id xmlns="http://schemas.datacontract.org/2004/07/Voice.Api">String</Id>
      <LastModifiedBy xmlns="http://schemas.datacontract.org/2004/07/Voice.Api">String</LastModifiedBy>
      <d2p1:AccountId>String</d2p1:AccountId>
      <d2p1:AccountName>String</d2p1:AccountName>
      <d2p1:AnsweredById>String</d2p1:AnsweredById>
      <d2p1:AnsweredByName>String</d2p1:AnsweredByName>
      <d2p1:CallSid>String</d2p1:CallSid>
      <d2p1:CallState>Disconnected</d2p1:CallState>
      <d2p1:CallbackNumber>String</d2p1:CallbackNumber>
      <d2p1:Channel>Voice</d2p1:Channel>
      <d2p1:ConferenceSid>String</d2p1:ConferenceSid>
      <d2p1:ConsoleData>String</d2p1:ConsoleData>
      <d2p1:CustomerBreadcrumb xmlns:d4p1="http://schemas.datacontract.org/2004/07/Voice.Api.Customers">
        <d4p1:CustomerBreadcrumb>
          <d4p1:Id>String</d4p1:Id>
          <d4p1:Name>String</d4p1:Name>
        </d4p1:CustomerBreadcrumb>
      </d2p1:CustomerBreadcrumb>
      <d2p1:CustomerId>String</d2p1:CustomerId>
      <d2p1:CustomerName>String</d2p1:CustomerName>
      <d2p1:DateCompleted>String</d2p1:DateCompleted>
      <d2p1:Destination>String</d2p1:Destination>
      <d2p1:DialState>None</d2p1:DialState>
      <d2p1:Direction>Incoming</d2p1:Direction>
      <d2p1:DisplayName>String</d2p1:DisplayName>
      <d2p1:Ended>false</d2p1:Ended>
      <d2p1:EndpointId>String</d2p1:EndpointId>
      <d2p1:EndpointName>String</d2p1:EndpointName>
      <d2p1:FromAddress>String</d2p1:FromAddress>
      <d2p1:FromName>String</d2p1:FromName>
      <d2p1:FromPhoneNumber>String</d2p1:FromPhoneNumber>
      <d2p1:HeldByUserId>String</d2p1:HeldByUserId>
      <d2p1:HoldQueueName>String</d2p1:HoldQueueName>
      <d2p1:HoldReason>None</d2p1:HoldReason>
      <d2p1:Log>
        <d2p1:SessionLogInfo>
          <d2p1:Date>String</d2p1:Date>
          <d2p1:Message>String</d2p1:Message>
        </d2p1:SessionLogInfo>
      </d2p1:Log>
      <d2p1:Members>
        <d2p1:SessionMemberInfo>
          <d2p1:ApplicationData xmlns:d6p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
            <d6p1:KeyValueOfstringstring>
              <d6p1:Key>String</d6p1:Key>
              <d6p1:Value>String</d6p1:Value>
            </d6p1:KeyValueOfstringstring>
          </d2p1:ApplicationData>
          <d2p1:AvatarUrl>String</d2p1:AvatarUrl>
          <d2p1:CallSid>String</d2p1:CallSid>
          <d2p1:CallState>None</d2p1:CallState>
          <d2p1:DisplayName>String</d2p1:DisplayName>
          <d2p1:EndpointId>String</d2p1:EndpointId>
          <d2p1:Identity>String</d2p1:Identity>
          <d2p1:IsOriginalMember>false</d2p1:IsOriginalMember>
          <d2p1:Muted>false</d2p1:Muted>
          <d2p1:Role>None</d2p1:Role>
        </d2p1:SessionMemberInfo>
      </d2p1:Members>
      <d2p1:MostRecentParticipantCallSid>String</d2p1:MostRecentParticipantCallSid>
      <d2p1:Outcome>String</d2p1:Outcome>
      <d2p1:QueueMemberId>String</d2p1:QueueMemberId>
      <d2p1:QueueState>None</d2p1:QueueState>
      <d2p1:RingQueueId>String</d2p1:RingQueueId>
      <d2p1:ToAddress>String</d2p1:ToAddress>
      <d2p1:WasMissed>false</d2p1:WasMissed>
    </d2p1:SessionInfo>
  </Calls>
  <Conversations xmlns:d2p1="http://schemas.datacontract.org/2004/07/Voice.Api.Messaging">
    <d2p1:ConversationInfo>
      <d2p1:EndpointId>String</d2p1:EndpointId>
      <d2p1:Id>String</d2p1:Id>
      <d2p1:MostRecentMessage>
        <d2p1:AccountId>String</d2p1:AccountId>
        <d2p1:CustomerId>String</d2p1:CustomerId>
        <d2p1:Date>String</d2p1:Date>
        <d2p1:Direction>Incoming</d2p1:Direction>
        <d2p1:EndpointDisplayName>String</d2p1:EndpointDisplayName>
        <d2p1:EndpointId>String</d2p1:EndpointId>
        <d2p1:Id>String</d2p1:Id>
        <d2p1:IsUnread>false</d2p1:IsUnread>
        <d2p1:OtherAddress>String</d2p1:OtherAddress>
        <d2p1:Sender>String</d2p1:Sender>
        <d2p1:Text>String</d2p1:Text>
      </d2p1:MostRecentMessage>
      <d2p1:OtherAddress>String</d2p1:OtherAddress>
    </d2p1:ConversationInfo>
  </Conversations>
  <Forms>
    <HostedSuiteCompletedForm>
      <CallerNumber>String</CallerNumber>
      <ClientId>String</ClientId>
      <ClientName>String</ClientName>
      <ContactId>String</ContactId>
      <ContactName>String</ContactName>
      <ContactsIds xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>String</d4p1:string>
      </ContactsIds>
      <ContactsNames xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>String</d4p1:string>
      </ContactsNames>
      <DateCompleted>String</DateCompleted>
      <DateCreated>String</DateCreated>
      <EmailSubject>String</EmailSubject>
      <Fields>
        <HostedSuiteCompletedFormField>
          <Name>String</Name>
          <Values xmlns:d6p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
            <d6p1:string>String</d6p1:string>
          </Values>
        </HostedSuiteCompletedFormField>
      </Fields>
      <FormId>String</FormId>
      <FormName>String</FormName>
      <Id>String</Id>
      <Name>String</Name>
    </HostedSuiteCompletedForm>
  </Forms>
  <IsHostedSuiteCustomer>false</IsHostedSuiteCustomer>
  <Voicemail xmlns:d2p1="http://schemas.datacontract.org/2004/07/Voice.Api.Files">
    <d2p1:FileInfo>
      <CreatedBy xmlns="http://schemas.datacontract.org/2004/07/Voice.Api">String</CreatedBy>
      <DateCreated xmlns="http://schemas.datacontract.org/2004/07/Voice.Api">String</DateCreated>
      <DateLastModified xmlns="http://schemas.datacontract.org/2004/07/Voice.Api">String</DateLastModified>
      <Id xmlns="http://schemas.datacontract.org/2004/07/Voice.Api">String</Id>
      <LastModifiedBy xmlns="http://schemas.datacontract.org/2004/07/Voice.Api">String</LastModifiedBy>
      <d2p1:AccountId>String</d2p1:AccountId>
      <d2p1:AccountName>String</d2p1:AccountName>
      <d2p1:ContentLength>0</d2p1:ContentLength>
      <d2p1:ContentType>String</d2p1:ContentType>
      <d2p1:CustomerBreadcrumb xmlns:d4p1="http://schemas.datacontract.org/2004/07/Voice.Api.Customers">
        <d4p1:CustomerBreadcrumb>
          <d4p1:Id>String</d4p1:Id>
          <d4p1:Name>String</d4p1:Name>
        </d4p1:CustomerBreadcrumb>
      </d2p1:CustomerBreadcrumb>
      <d2p1:CustomerId>String</d2p1:CustomerId>
      <d2p1:CustomerName>String</d2p1:CustomerName>
      <d2p1:FileName>String</d2p1:FileName>
      <d2p1:FromAddress>String</d2p1:FromAddress>
      <d2p1:RecordingDuration>0</d2p1:RecordingDuration>
      <d2p1:RecordingFrom>String</d2p1:RecordingFrom>
      <d2p1:RecordingSid>String</d2p1:RecordingSid>
      <d2p1:ToAddress>String</d2p1:ToAddress>
      <d2p1:Transcription>String</d2p1:Transcription>
      <d2p1:Type>Upload</d2p1:Type>
      <d2p1:Uri>String</d2p1:Uri>
      <d2p1:UserId>String</d2p1:UserId>
      <d2p1:UserName>String</d2p1:UserName>
    </d2p1:FileInfo>
  </Voicemail>
</AppHomeInformation>