/* Options: Date: 2024-11-13 06:26:15 Version: 6.40 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://evovoice.io //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: ResendNotification.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; enum NotificationTypes { Email, Sms, Push, IncomingCall, OutgoingCall, } 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 json) { fromMap(json); } fromMap(Map json) { id = json['id']; dateCreated = json['dateCreated']; dateLastModified = json['dateLastModified']; createdBy = json['createdBy']; lastModifiedBy = json['lastModifiedBy']; return this; } Map toJson() => { 'id': id, 'dateCreated': dateCreated, 'dateLastModified': dateLastModified, 'createdBy': createdBy, 'lastModifiedBy': lastModifiedBy }; getTypeName() => "EntityInfo"; TypeContext? context = _ctx; } class CustomerBreadcrumb implements IConvertible { String? id; String? name; CustomerBreadcrumb({this.id,this.name}); CustomerBreadcrumb.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; name = json['name']; return this; } Map toJson() => { 'id': id, 'name': name }; getTypeName() => "CustomerBreadcrumb"; TypeContext? context = _ctx; } class NotificationRecipientInfo implements IConvertible { /** * The address of the recipient */ // @ApiMember(Description="The address of the recipient") String? address; /** * Extra info about the recipient e.g. CC, BCC */ // @ApiMember(Description="Extra info about the recipient e.g. CC, BCC") String? extra; /** * The name of the recipient */ // @ApiMember(Description="The name of the recipient") String? name; NotificationRecipientInfo({this.address,this.extra,this.name}); NotificationRecipientInfo.fromJson(Map json) { fromMap(json); } fromMap(Map json) { address = json['address']; extra = json['extra']; name = json['name']; return this; } Map toJson() => { 'address': address, 'extra': extra, 'name': name }; getTypeName() => "NotificationRecipientInfo"; TypeContext? context = _ctx; } 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; /** * 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; /** * The AI transcription for this call */ // @ApiMember(Description="The AI transcription for this call") String? aiTranscription; 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,this.aiTranscription}); FileInfo.fromJson(Map json) { fromMap(json); } fromMap(Map 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',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']; aiTranscription = json['aiTranscription']; return this; } Map toJson() => super.toJson()..addAll({ 'type': JsonConverters.toJson(type,'FileTypes',context!), 'accountId': accountId, 'accountName': accountName, 'customerId': customerId, 'customerName': customerName, 'customerBreadcrumb': JsonConverters.toJson(customerBreadcrumb,'List',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, 'aiTranscription': aiTranscription }); getTypeName() => "FileInfo"; TypeContext? context = _ctx; } class NotificationInfo extends EntityInfo implements IConvertible { /** * The account ID this endpoint is associated with */ // @ApiMember(Description="The account ID this endpoint is associated with") String? accountId; /** * The name of the account this endpoint is associated with */ // @ApiMember(Description="The name of the account this endpoint is associated with") String? accountName; /** * The ID of the customer this endpoint is associated with */ // @ApiMember(Description="The ID of the customer this endpoint is associated with") String? customerId; /** * The name of the customer this endpoint is associated with */ // @ApiMember(Description="The name of the customer this endpoint is associated with") String? customerName; /** * The breadcrumb to the customer for this endpoint */ // @ApiMember(Description="The breadcrumb to the customer for this endpoint") List? customerBreadcrumb; /** * The type of notification */ // @ApiMember(Description="The type of notification") NotificationTypes? type; /** * The subject of the notification */ // @ApiMember(Description="The subject of the notification") String? subject; /** * The body of the notification */ // @ApiMember(Description="The body of the notification") String? body; /** * The recipients of this notification */ // @ApiMember(Description="The recipients of this notification") List? recipients; /** * The list of attachments */ // @ApiMember(Description="The list of attachments") List? attachments; /** * The original from for the session */ // @ApiMember(Description="The original from for the session") String? from; /** * The original To for the session */ // @ApiMember(Description="The original To for the session") String? to; /** * Was there an error? */ // @ApiMember(Description="Was there an error?") bool? error; /** * The error message */ // @ApiMember(Description="The error message") String? errorMessage; NotificationInfo({this.accountId,this.accountName,this.customerId,this.customerName,this.customerBreadcrumb,this.type,this.subject,this.body,this.recipients,this.attachments,this.from,this.to,this.error,this.errorMessage}); NotificationInfo.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); accountId = json['accountId']; accountName = json['accountName']; customerId = json['customerId']; customerName = json['customerName']; customerBreadcrumb = JsonConverters.fromJson(json['customerBreadcrumb'],'List',context!); type = JsonConverters.fromJson(json['type'],'NotificationTypes',context!); subject = json['subject']; body = json['body']; recipients = JsonConverters.fromJson(json['recipients'],'List',context!); attachments = JsonConverters.fromJson(json['attachments'],'List',context!); from = json['from']; to = json['to']; error = json['error']; errorMessage = json['errorMessage']; return this; } Map toJson() => super.toJson()..addAll({ 'accountId': accountId, 'accountName': accountName, 'customerId': customerId, 'customerName': customerName, 'customerBreadcrumb': JsonConverters.toJson(customerBreadcrumb,'List',context!), 'type': JsonConverters.toJson(type,'NotificationTypes',context!), 'subject': subject, 'body': body, 'recipients': JsonConverters.toJson(recipients,'List',context!), 'attachments': JsonConverters.toJson(attachments,'List',context!), 'from': from, 'to': to, 'error': error, 'errorMessage': errorMessage }); getTypeName() => "NotificationInfo"; TypeContext? context = _ctx; } // @Route("/notifications/{notificationId}/resend", "POST") class ResendNotification implements IReturn, IConvertible { /** * The ID of the notification to resend */ // @ApiMember(Description="The ID of the notification to resend") String? notificationId; ResendNotification({this.notificationId}); ResendNotification.fromJson(Map json) { fromMap(json); } fromMap(Map json) { notificationId = json['notificationId']; return this; } Map toJson() => { 'notificationId': notificationId }; createResponse() => NotificationInfo(); getResponseTypeName() => "NotificationInfo"; getTypeName() => "ResendNotification"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'evovoice.io', types: { 'NotificationTypes': TypeInfo(TypeOf.Enum, enumValues:NotificationTypes.values), 'EntityInfo': TypeInfo(TypeOf.AbstractClass), 'CustomerBreadcrumb': TypeInfo(TypeOf.Class, create:() => CustomerBreadcrumb()), 'NotificationRecipientInfo': TypeInfo(TypeOf.Class, create:() => NotificationRecipientInfo()), 'FileInfo': TypeInfo(TypeOf.Class, create:() => FileInfo()), 'FileTypes': TypeInfo(TypeOf.Class, create:() => FileTypes()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'NotificationInfo': TypeInfo(TypeOf.Class, create:() => NotificationInfo()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'List': TypeInfo(TypeOf.Class, create:() => []), 'ResendNotification': TypeInfo(TypeOf.Class, create:() => ResendNotification()), });