All Verbs | /not-used |
---|
<?php namespace dtos;
use DateTime;
use Exception;
use DateInterval;
use JsonSerializable;
use ServiceStack\{IReturn,IReturnVoid,IGet,IPost,IPut,IDelete,IPatch,IMeta,IHasSessionId,IHasBearerToken,IHasVersion};
use ServiceStack\{ICrud,ICreateDb,IUpdateDb,IPatchDb,IDeleteDb,ISaveDb,AuditBase,QueryDb,QueryDb2,QueryData,QueryData2,QueryResponse};
use ServiceStack\{ResponseStatus,ResponseError,EmptyResponse,IdResponse,ArrayList,KeyValuePair2,StringResponse,StringsResponse,Tuple2,Tuple3,ByteArray};
use ServiceStack\{JsonConverters,Returns,TypeContext};
enum PushNotificationTypes : string
{
case SessionDisconnected = 'SessionDisconnected';
case SessionInvite = 'SessionInvite';
case ChatMessage = 'ChatMessage';
case SessionInactivated = 'SessionInactivated';
case AgentStateChanged = 'AgentStateChanged';
case SessionHeld = 'SessionHeld';
case SessionAnswered = 'SessionAnswered';
case ActiveSessionsChanged = 'ActiveSessionsChanged';
case Ping = 'Ping';
case SessionScreenChanged = 'SessionScreenChanged';
case Toast = 'Toast';
case SessionInfoChanged = 'SessionInfoChanged';
case MessageReceived = 'MessageReceived';
case SessionHolding = 'SessionHolding';
}
enum FlowChannels : string
{
case Voice = 'Voice';
case Chat = 'Chat';
case Fax = 'Fax';
}
enum AgentStates : string
{
case Unknown = 'Unknown';
case Ready = 'Ready';
case NotReady = 'NotReady';
case LoggedOut = 'LoggedOut';
case WrapUp = 'WrapUp';
case Outgoing = 'Outgoing';
case Other = 'Other';
}
enum AgentStateReasons : string
{
case Unknown = 'Unknown';
case SetByUser = 'SetByUser';
case MissedCall = 'MissedCall';
case SetBySystem = 'SetBySystem';
}
class PushNotification implements JsonSerializable
{
public function __construct(
/** @var PushNotificationTypes|null */
public ?PushNotificationTypes $type=null,
/** @var FlowChannels|null */
public ?FlowChannels $channel=null,
/** @var string|null */
public ?string $endpointId=null,
/** @var string|null */
public ?string $endpointUserName=null,
/** @var string|null */
public ?string $sessionId=null,
/** @var string|null */
public ?string $sender=null,
/** @var string|null */
public ?string $title=null,
/** @var string|null */
public ?string $body=null,
/** @var int|null */
public ?int $badge=null,
/** @var string|null */
public ?string $attachmentUri=null,
/** @var string|null */
public ?string $attachmentContentType=null,
/** @var AgentStates|null */
public ?AgentStates $agentState=null,
/** @var AgentStateReasons|null */
public ?AgentStateReasons $agentStateReason=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['type'])) $this->type = JsonConverters::from('PushNotificationTypes', $o['type']);
if (isset($o['channel'])) $this->channel = JsonConverters::from('FlowChannels', $o['channel']);
if (isset($o['endpointId'])) $this->endpointId = $o['endpointId'];
if (isset($o['endpointUserName'])) $this->endpointUserName = $o['endpointUserName'];
if (isset($o['sessionId'])) $this->sessionId = $o['sessionId'];
if (isset($o['sender'])) $this->sender = $o['sender'];
if (isset($o['title'])) $this->title = $o['title'];
if (isset($o['body'])) $this->body = $o['body'];
if (isset($o['badge'])) $this->badge = $o['badge'];
if (isset($o['attachmentUri'])) $this->attachmentUri = $o['attachmentUri'];
if (isset($o['attachmentContentType'])) $this->attachmentContentType = $o['attachmentContentType'];
if (isset($o['agentState'])) $this->agentState = JsonConverters::from('AgentStates', $o['agentState']);
if (isset($o['agentStateReason'])) $this->agentStateReason = JsonConverters::from('AgentStateReasons', $o['agentStateReason']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->type)) $o['type'] = JsonConverters::to('PushNotificationTypes', $this->type);
if (isset($this->channel)) $o['channel'] = JsonConverters::to('FlowChannels', $this->channel);
if (isset($this->endpointId)) $o['endpointId'] = $this->endpointId;
if (isset($this->endpointUserName)) $o['endpointUserName'] = $this->endpointUserName;
if (isset($this->sessionId)) $o['sessionId'] = $this->sessionId;
if (isset($this->sender)) $o['sender'] = $this->sender;
if (isset($this->title)) $o['title'] = $this->title;
if (isset($this->body)) $o['body'] = $this->body;
if (isset($this->badge)) $o['badge'] = $this->badge;
if (isset($this->attachmentUri)) $o['attachmentUri'] = $this->attachmentUri;
if (isset($this->attachmentContentType)) $o['attachmentContentType'] = $this->attachmentContentType;
if (isset($this->agentState)) $o['agentState'] = JsonConverters::to('AgentStates', $this->agentState);
if (isset($this->agentStateReason)) $o['agentStateReason'] = JsonConverters::to('AgentStateReasons', $this->agentStateReason);
return empty($o) ? new class(){} : $o;
}
}
class EntityInfo implements JsonSerializable
{
public function __construct(
/** @description The ID of the object */
// @ApiMember(Description="The ID of the object")
/** @var string|null */
public ?string $id=null,
/** @description The date the object was created */
// @ApiMember(Description="The date the object was created")
/** @var string|null */
public ?string $dateCreated=null,
/** @description The date the object was last modified */
// @ApiMember(Description="The date the object was last modified")
/** @var string|null */
public ?string $dateLastModified=null,
/** @description The user that created this object */
// @ApiMember(Description="The user that created this object")
/** @var string|null */
public ?string $createdBy=null,
/** @description The user that last modified this object */
// @ApiMember(Description="The user that last modified this object")
/** @var string|null */
public ?string $lastModifiedBy=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['id'])) $this->id = $o['id'];
if (isset($o['dateCreated'])) $this->dateCreated = $o['dateCreated'];
if (isset($o['dateLastModified'])) $this->dateLastModified = $o['dateLastModified'];
if (isset($o['createdBy'])) $this->createdBy = $o['createdBy'];
if (isset($o['lastModifiedBy'])) $this->lastModifiedBy = $o['lastModifiedBy'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->id)) $o['id'] = $this->id;
if (isset($this->dateCreated)) $o['dateCreated'] = $this->dateCreated;
if (isset($this->dateLastModified)) $o['dateLastModified'] = $this->dateLastModified;
if (isset($this->createdBy)) $o['createdBy'] = $this->createdBy;
if (isset($this->lastModifiedBy)) $o['lastModifiedBy'] = $this->lastModifiedBy;
return empty($o) ? new class(){} : $o;
}
}
class CustomerBreadcrumb implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $id=null,
/** @var string|null */
public ?string $name=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['id'])) $this->id = $o['id'];
if (isset($o['name'])) $this->name = $o['name'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->id)) $o['id'] = $this->id;
if (isset($this->name)) $o['name'] = $this->name;
return empty($o) ? new class(){} : $o;
}
}
enum NotificationTypes : string
{
case Email = 'Email';
case Sms = 'Sms';
case Push = 'Push';
case IncomingCall = 'IncomingCall';
case OutgoingCall = 'OutgoingCall';
}
class NotificationRecipientInfo implements JsonSerializable
{
public function __construct(
/** @description The address of the recipient */
// @ApiMember(Description="The address of the recipient")
/** @var string|null */
public ?string $address=null,
/** @description Extra info about the recipient e.g. CC, BCC */
// @ApiMember(Description="Extra info about the recipient e.g. CC, BCC")
/** @var string|null */
public ?string $extra=null,
/** @description The name of the recipient */
// @ApiMember(Description="The name of the recipient")
/** @var string|null */
public ?string $name=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['address'])) $this->address = $o['address'];
if (isset($o['extra'])) $this->extra = $o['extra'];
if (isset($o['name'])) $this->name = $o['name'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->address)) $o['address'] = $this->address;
if (isset($this->extra)) $o['extra'] = $this->extra;
if (isset($this->name)) $o['name'] = $this->name;
return empty($o) ? new class(){} : $o;
}
}
enum FileTypes : string
{
case Upload = 'Upload';
case VoiceMessage = 'VoiceMessage';
case CallRecording = 'CallRecording';
case Fax = 'Fax';
case Attachment = 'Attachment';
case FaxOutgoing = 'FaxOutgoing';
}
class FileInfo extends EntityInfo implements JsonSerializable
{
/**
* @param string|null $id
* @param string|null $dateCreated
* @param string|null $dateLastModified
* @param string|null $createdBy
* @param string|null $lastModifiedBy
*/
public function __construct(
?string $id=null,
?string $dateCreated=null,
?string $dateLastModified=null,
?string $createdBy=null,
?string $lastModifiedBy=null,
/** @description The type of file this is */
// @ApiMember(Description="The type of file this is")
/** @var FileTypes|null */
public ?FileTypes $type=null,
/** @description The account ID this file is associated with */
// @ApiMember(Description="The account ID this file is associated with")
/** @var string|null */
public ?string $accountId=null,
/** @description The name of the account this file is associated with */
// @ApiMember(Description="The name of the account this file is associated with")
/** @var string|null */
public ?string $accountName=null,
/** @description The ID of the customer this file is associated with */
// @ApiMember(Description="The ID of the customer this file is associated with")
/** @var string|null */
public ?string $customerId=null,
/** @description The name of the customer this file is associated with */
// @ApiMember(Description="The name of the customer this file is associated with")
/** @var string|null */
public ?string $customerName=null,
/** @description The breadcrumb to the customer for this file */
// @ApiMember(Description="The breadcrumb to the customer for this file")
/** @var array<CustomerBreadcrumb>|null */
public ?array $customerBreadcrumb=null,
/** @description The ID of the user this file is assocaited with */
// @ApiMember(Description="The ID of the user this file is assocaited with")
/** @var string|null */
public ?string $userId=null,
/** @description The name of the user this file is associated with */
// @ApiMember(Description="The name of the user this file is associated with")
/** @var string|null */
public ?string $userName=null,
/** @description The original file name for the file */
// @ApiMember(Description="The original file name for the file")
/** @var string|null */
public ?string $fileName=null,
/** @description The URI of the file */
// @ApiMember(Description="The URI of the file")
/** @var string|null */
public ?string $uri=null,
/** @description The Content type of the file */
// @ApiMember(Description="The Content type of the file")
/** @var string|null */
public ?string $contentType=null,
/** @description The size of the file */
// @ApiMember(Description="The size of the file")
/** @var int */
public int $contentLength=0,
/** @description The Twilio ID of the recording */
// @ApiMember(Description="The Twilio ID of the recording")
/** @var string|null */
public ?string $recordingSid=null,
/** @description The duration of the recording in seconds */
// @ApiMember(Description="The duration of the recording in seconds")
/** @var int */
public int $recordingDuration=0,
/** @description Who is the recording from? */
// @ApiMember(Description="Who is the recording from?")
/** @var string|null */
public ?string $recordingFrom=null,
/** @description Transcription (if available) */
// @ApiMember(Description="Transcription (if available)")
/** @var string|null */
public ?string $transcription=null,
/** @description From Address (e.g. caller ID) for incoming calls */
// @ApiMember(Description="From Address (e.g. caller ID) for incoming calls")
/** @var string|null */
public ?string $fromAddress=null,
/** @description To Address (e.g. dialed number) for outgoing calls */
// @ApiMember(Description="To Address (e.g. dialed number) for outgoing calls")
/** @var string|null */
public ?string $toAddress=null,
/** @description The AI transcription for this call */
// @ApiMember(Description="The AI transcription for this call")
/** @var string|null */
public ?string $aiTranscription=null
) {
parent::__construct($id,$dateCreated,$dateLastModified,$createdBy,$lastModifiedBy);
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['type'])) $this->type = JsonConverters::from('FileTypes', $o['type']);
if (isset($o['accountId'])) $this->accountId = $o['accountId'];
if (isset($o['accountName'])) $this->accountName = $o['accountName'];
if (isset($o['customerId'])) $this->customerId = $o['customerId'];
if (isset($o['customerName'])) $this->customerName = $o['customerName'];
if (isset($o['customerBreadcrumb'])) $this->customerBreadcrumb = JsonConverters::fromArray('CustomerBreadcrumb', $o['customerBreadcrumb']);
if (isset($o['userId'])) $this->userId = $o['userId'];
if (isset($o['userName'])) $this->userName = $o['userName'];
if (isset($o['fileName'])) $this->fileName = $o['fileName'];
if (isset($o['uri'])) $this->uri = $o['uri'];
if (isset($o['contentType'])) $this->contentType = $o['contentType'];
if (isset($o['contentLength'])) $this->contentLength = $o['contentLength'];
if (isset($o['recordingSid'])) $this->recordingSid = $o['recordingSid'];
if (isset($o['recordingDuration'])) $this->recordingDuration = $o['recordingDuration'];
if (isset($o['recordingFrom'])) $this->recordingFrom = $o['recordingFrom'];
if (isset($o['transcription'])) $this->transcription = $o['transcription'];
if (isset($o['fromAddress'])) $this->fromAddress = $o['fromAddress'];
if (isset($o['toAddress'])) $this->toAddress = $o['toAddress'];
if (isset($o['aiTranscription'])) $this->aiTranscription = $o['aiTranscription'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->type)) $o['type'] = JsonConverters::to('FileTypes', $this->type);
if (isset($this->accountId)) $o['accountId'] = $this->accountId;
if (isset($this->accountName)) $o['accountName'] = $this->accountName;
if (isset($this->customerId)) $o['customerId'] = $this->customerId;
if (isset($this->customerName)) $o['customerName'] = $this->customerName;
if (isset($this->customerBreadcrumb)) $o['customerBreadcrumb'] = JsonConverters::toArray('CustomerBreadcrumb', $this->customerBreadcrumb);
if (isset($this->userId)) $o['userId'] = $this->userId;
if (isset($this->userName)) $o['userName'] = $this->userName;
if (isset($this->fileName)) $o['fileName'] = $this->fileName;
if (isset($this->uri)) $o['uri'] = $this->uri;
if (isset($this->contentType)) $o['contentType'] = $this->contentType;
if (isset($this->contentLength)) $o['contentLength'] = $this->contentLength;
if (isset($this->recordingSid)) $o['recordingSid'] = $this->recordingSid;
if (isset($this->recordingDuration)) $o['recordingDuration'] = $this->recordingDuration;
if (isset($this->recordingFrom)) $o['recordingFrom'] = $this->recordingFrom;
if (isset($this->transcription)) $o['transcription'] = $this->transcription;
if (isset($this->fromAddress)) $o['fromAddress'] = $this->fromAddress;
if (isset($this->toAddress)) $o['toAddress'] = $this->toAddress;
if (isset($this->aiTranscription)) $o['aiTranscription'] = $this->aiTranscription;
return empty($o) ? new class(){} : $o;
}
}
class NotificationInfo extends EntityInfo implements JsonSerializable
{
/**
* @param string|null $id
* @param string|null $dateCreated
* @param string|null $dateLastModified
* @param string|null $createdBy
* @param string|null $lastModifiedBy
*/
public function __construct(
?string $id=null,
?string $dateCreated=null,
?string $dateLastModified=null,
?string $createdBy=null,
?string $lastModifiedBy=null,
/** @description The account ID this endpoint is associated with */
// @ApiMember(Description="The account ID this endpoint is associated with")
/** @var string|null */
public ?string $accountId=null,
/** @description The name of the account this endpoint is associated with */
// @ApiMember(Description="The name of the account this endpoint is associated with")
/** @var string|null */
public ?string $accountName=null,
/** @description The ID of the customer this endpoint is associated with */
// @ApiMember(Description="The ID of the customer this endpoint is associated with")
/** @var string|null */
public ?string $customerId=null,
/** @description The name of the customer this endpoint is associated with */
// @ApiMember(Description="The name of the customer this endpoint is associated with")
/** @var string|null */
public ?string $customerName=null,
/** @description The breadcrumb to the customer for this endpoint */
// @ApiMember(Description="The breadcrumb to the customer for this endpoint")
/** @var array<CustomerBreadcrumb>|null */
public ?array $customerBreadcrumb=null,
/** @description The type of notification */
// @ApiMember(Description="The type of notification")
/** @var NotificationTypes|null */
public ?NotificationTypes $type=null,
/** @description The subject of the notification */
// @ApiMember(Description="The subject of the notification")
/** @var string|null */
public ?string $subject=null,
/** @description The body of the notification */
// @ApiMember(Description="The body of the notification")
/** @var string|null */
public ?string $body=null,
/** @description The recipients of this notification */
// @ApiMember(Description="The recipients of this notification")
/** @var array<NotificationRecipientInfo>|null */
public ?array $recipients=null,
/** @description The list of attachments */
// @ApiMember(Description="The list of attachments")
/** @var array<FileInfo>|null */
public ?array $attachments=null,
/** @description The original from for the session */
// @ApiMember(Description="The original from for the session")
/** @var string|null */
public ?string $from=null,
/** @description The original To for the session */
// @ApiMember(Description="The original To for the session")
/** @var string|null */
public ?string $to=null,
/** @description Was there an error? */
// @ApiMember(Description="Was there an error?")
/** @var bool|null */
public ?bool $error=null,
/** @description The error message */
// @ApiMember(Description="The error message")
/** @var string|null */
public ?string $errorMessage=null
) {
parent::__construct($id,$dateCreated,$dateLastModified,$createdBy,$lastModifiedBy);
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['accountId'])) $this->accountId = $o['accountId'];
if (isset($o['accountName'])) $this->accountName = $o['accountName'];
if (isset($o['customerId'])) $this->customerId = $o['customerId'];
if (isset($o['customerName'])) $this->customerName = $o['customerName'];
if (isset($o['customerBreadcrumb'])) $this->customerBreadcrumb = JsonConverters::fromArray('CustomerBreadcrumb', $o['customerBreadcrumb']);
if (isset($o['type'])) $this->type = JsonConverters::from('NotificationTypes', $o['type']);
if (isset($o['subject'])) $this->subject = $o['subject'];
if (isset($o['body'])) $this->body = $o['body'];
if (isset($o['recipients'])) $this->recipients = JsonConverters::fromArray('NotificationRecipientInfo', $o['recipients']);
if (isset($o['attachments'])) $this->attachments = JsonConverters::fromArray('FileInfo', $o['attachments']);
if (isset($o['from'])) $this->from = $o['from'];
if (isset($o['to'])) $this->to = $o['to'];
if (isset($o['error'])) $this->error = $o['error'];
if (isset($o['errorMessage'])) $this->errorMessage = $o['errorMessage'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->accountId)) $o['accountId'] = $this->accountId;
if (isset($this->accountName)) $o['accountName'] = $this->accountName;
if (isset($this->customerId)) $o['customerId'] = $this->customerId;
if (isset($this->customerName)) $o['customerName'] = $this->customerName;
if (isset($this->customerBreadcrumb)) $o['customerBreadcrumb'] = JsonConverters::toArray('CustomerBreadcrumb', $this->customerBreadcrumb);
if (isset($this->type)) $o['type'] = JsonConverters::to('NotificationTypes', $this->type);
if (isset($this->subject)) $o['subject'] = $this->subject;
if (isset($this->body)) $o['body'] = $this->body;
if (isset($this->recipients)) $o['recipients'] = JsonConverters::toArray('NotificationRecipientInfo', $this->recipients);
if (isset($this->attachments)) $o['attachments'] = JsonConverters::toArray('FileInfo', $this->attachments);
if (isset($this->from)) $o['from'] = $this->from;
if (isset($this->to)) $o['to'] = $this->to;
if (isset($this->error)) $o['error'] = $this->error;
if (isset($this->errorMessage)) $o['errorMessage'] = $this->errorMessage;
return empty($o) ? new class(){} : $o;
}
}
enum ValueTypes : string
{
case NotSpecified = 'NotSpecified';
case String = 'String';
case Boolean = 'Boolean';
case Number = 'Number';
case List = 'List';
case Struct = 'Struct';
case Transition = 'Transition';
case Custom = 'Custom';
case Date = 'Date';
case AudioFile = 'AudioFile';
case TimeZoneId = 'TimeZoneId';
case PhoneNumber = 'PhoneNumber';
case User = 'User';
case Endpoint = 'Endpoint';
case Time = 'Time';
case File = 'File';
case FaxNumber = 'FaxNumber';
case EmailAccount = 'EmailAccount';
case Customer = 'Customer';
case Flow = 'Flow';
case Team = 'Team';
case FlowReference = 'FlowReference';
case Integration = 'Integration';
case Assistant = 'Assistant';
}
enum ValueSources : string
{
case Value = 'Value';
case Flow = 'Flow';
case System = 'System';
case Customer = 'Customer';
case Session = 'Session';
case Endpoint = 'Endpoint';
case Expression = 'Expression';
case User = 'User';
}
/**
* @template array of String
* @template array1 of Value
*/
class Struct extends array implements JsonSerializable
{
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
return empty($o) ? new class(){} : $o;
}
}
class Value implements JsonSerializable
{
public function __construct(
/** @var bool|null */
public ?bool $boolValue=null,
/** @var string|null */
public ?string $stringValue=null,
/** @var float|null */
public ?float $numberValue=null,
/** @var array<Struct>|null */
public ?array $listValue=null,
/** @var Struct|null */
public ?Struct $structValue=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['boolValue'])) $this->boolValue = $o['boolValue'];
if (isset($o['stringValue'])) $this->stringValue = $o['stringValue'];
if (isset($o['numberValue'])) $this->numberValue = $o['numberValue'];
if (isset($o['listValue'])) $this->listValue = JsonConverters::fromArray('Struct', $o['listValue']);
if (isset($o['structValue'])) $this->structValue = JsonConverters::from('Struct', $o['structValue']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->boolValue)) $o['boolValue'] = $this->boolValue;
if (isset($this->stringValue)) $o['stringValue'] = $this->stringValue;
if (isset($this->numberValue)) $o['numberValue'] = $this->numberValue;
if (isset($this->listValue)) $o['listValue'] = JsonConverters::toArray('Struct', $this->listValue);
if (isset($this->structValue)) $o['structValue'] = JsonConverters::to('Struct', $this->structValue);
return empty($o) ? new class(){} : $o;
}
}
/**
* @template array of String
* @template array1 of NodeParameter
*/
class NodeParameterMap extends array implements JsonSerializable
{
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
return empty($o) ? new class(){} : $o;
}
}
enum UIHints : string
{
case None = 'None';
case LargeText = 'LargeText';
case InlineForm = 'InlineForm';
case Password = 'Password';
case InlineStruct = 'InlineStruct';
}
enum DataFieldUniqueness : string
{
case NotUnique = 'NotUnique';
case Unique = 'Unique';
case UniqueToCustomer = 'UniqueToCustomer';
}
enum UserDataFieldModes : string
{
case Hidden = 'Hidden';
case ReadOnly = 'ReadOnly';
case ReadWrite = 'ReadWrite';
}
class DataField implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $id=null,
/** @var string|null */
public ?string $name=null,
/** @var ValueTypes|null */
public ?ValueTypes $type=null,
/** @var UIHints|null */
public ?UIHints $uiHint=null,
/** @var string|null */
public ?string $uiTab=null,
/** @var bool|null */
public ?bool $isAsync=null,
/** @var bool|null */
public ?bool $disableBinding=null,
/** @var DataType|null */
public ?DataType $structType=null,
/** @var DataType|null */
public ?DataType $listType=null,
/** @var string|null */
public ?string $description=null,
/** @var array<string>|null */
public ?array $possibleValues=null,
/** @var bool|null */
public ?bool $isOutput=null,
/** @var string|null */
public ?string $customFieldValuesUrl=null,
/** @var Value|null */
public ?Value $defaultValue=null,
/** @var string|null */
public ?string $transitionNameFormat=null,
/** @var DataFieldUniqueness|null */
public ?DataFieldUniqueness $uniqueness=null,
/** @var bool|null */
public ?bool $voiceOnly=null,
/** @var string|null */
public ?string $conditionalVisibilityField=null,
/** @var string|null */
public ?string $conditionalVisibilityValue=null,
/** @var bool|null */
public ?bool $noEvalTemplate=null,
/** @var UserDataFieldModes|null */
public ?UserDataFieldModes $userMode=null,
/** @var bool|null */
public ?bool $anyValueType=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['id'])) $this->id = $o['id'];
if (isset($o['name'])) $this->name = $o['name'];
if (isset($o['type'])) $this->type = JsonConverters::from('ValueTypes', $o['type']);
if (isset($o['uiHint'])) $this->uiHint = JsonConverters::from('UIHints', $o['uiHint']);
if (isset($o['uiTab'])) $this->uiTab = $o['uiTab'];
if (isset($o['isAsync'])) $this->isAsync = $o['isAsync'];
if (isset($o['disableBinding'])) $this->disableBinding = $o['disableBinding'];
if (isset($o['structType'])) $this->structType = JsonConverters::from('DataType', $o['structType']);
if (isset($o['listType'])) $this->listType = JsonConverters::from('DataType', $o['listType']);
if (isset($o['description'])) $this->description = $o['description'];
if (isset($o['possibleValues'])) $this->possibleValues = JsonConverters::fromArray('string', $o['possibleValues']);
if (isset($o['isOutput'])) $this->isOutput = $o['isOutput'];
if (isset($o['customFieldValuesUrl'])) $this->customFieldValuesUrl = $o['customFieldValuesUrl'];
if (isset($o['defaultValue'])) $this->defaultValue = JsonConverters::from('Value', $o['defaultValue']);
if (isset($o['transitionNameFormat'])) $this->transitionNameFormat = $o['transitionNameFormat'];
if (isset($o['uniqueness'])) $this->uniqueness = JsonConverters::from('DataFieldUniqueness', $o['uniqueness']);
if (isset($o['voiceOnly'])) $this->voiceOnly = $o['voiceOnly'];
if (isset($o['conditionalVisibilityField'])) $this->conditionalVisibilityField = $o['conditionalVisibilityField'];
if (isset($o['conditionalVisibilityValue'])) $this->conditionalVisibilityValue = $o['conditionalVisibilityValue'];
if (isset($o['noEvalTemplate'])) $this->noEvalTemplate = $o['noEvalTemplate'];
if (isset($o['userMode'])) $this->userMode = JsonConverters::from('UserDataFieldModes', $o['userMode']);
if (isset($o['anyValueType'])) $this->anyValueType = $o['anyValueType'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->id)) $o['id'] = $this->id;
if (isset($this->name)) $o['name'] = $this->name;
if (isset($this->type)) $o['type'] = JsonConverters::to('ValueTypes', $this->type);
if (isset($this->uiHint)) $o['uiHint'] = JsonConverters::to('UIHints', $this->uiHint);
if (isset($this->uiTab)) $o['uiTab'] = $this->uiTab;
if (isset($this->isAsync)) $o['isAsync'] = $this->isAsync;
if (isset($this->disableBinding)) $o['disableBinding'] = $this->disableBinding;
if (isset($this->structType)) $o['structType'] = JsonConverters::to('DataType', $this->structType);
if (isset($this->listType)) $o['listType'] = JsonConverters::to('DataType', $this->listType);
if (isset($this->description)) $o['description'] = $this->description;
if (isset($this->possibleValues)) $o['possibleValues'] = JsonConverters::toArray('string', $this->possibleValues);
if (isset($this->isOutput)) $o['isOutput'] = $this->isOutput;
if (isset($this->customFieldValuesUrl)) $o['customFieldValuesUrl'] = $this->customFieldValuesUrl;
if (isset($this->defaultValue)) $o['defaultValue'] = JsonConverters::to('Value', $this->defaultValue);
if (isset($this->transitionNameFormat)) $o['transitionNameFormat'] = $this->transitionNameFormat;
if (isset($this->uniqueness)) $o['uniqueness'] = JsonConverters::to('DataFieldUniqueness', $this->uniqueness);
if (isset($this->voiceOnly)) $o['voiceOnly'] = $this->voiceOnly;
if (isset($this->conditionalVisibilityField)) $o['conditionalVisibilityField'] = $this->conditionalVisibilityField;
if (isset($this->conditionalVisibilityValue)) $o['conditionalVisibilityValue'] = $this->conditionalVisibilityValue;
if (isset($this->noEvalTemplate)) $o['noEvalTemplate'] = $this->noEvalTemplate;
if (isset($this->userMode)) $o['userMode'] = JsonConverters::to('UserDataFieldModes', $this->userMode);
if (isset($this->anyValueType)) $o['anyValueType'] = $this->anyValueType;
return empty($o) ? new class(){} : $o;
}
}
class DataType implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $typeName=null,
/** @var array<DataField>|null */
public ?array $fields=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['typeName'])) $this->typeName = $o['typeName'];
if (isset($o['fields'])) $this->fields = JsonConverters::fromArray('DataField', $o['fields']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->typeName)) $o['typeName'] = $this->typeName;
if (isset($this->fields)) $o['fields'] = JsonConverters::toArray('DataField', $this->fields);
return empty($o) ? new class(){} : $o;
}
}
class NodeParameter implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $id=null,
/** @var ValueTypes|null */
public ?ValueTypes $type=null,
/** @var ValueSources|null */
public ?ValueSources $source=null,
/** @var bool|null */
public ?bool $isAsync=null,
/** @var string|null */
public ?string $referenceId=null,
/** @var Value|null */
public ?Value $value=null,
/** @var bool|null */
public ?bool $noEvalTemplate=null,
/** @var array<NodeParameterMap>|null */
public ?array $listParameters=null,
/** @var NodeParameterMap|null */
public ?NodeParameterMap $structParameters=null,
/** @var bool|null */
public ?bool $isOutput=null,
/** @var string|null */
public ?string $expression=null,
/** @var DataType|null */
public ?DataType $listType=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['id'])) $this->id = $o['id'];
if (isset($o['type'])) $this->type = JsonConverters::from('ValueTypes', $o['type']);
if (isset($o['source'])) $this->source = JsonConverters::from('ValueSources', $o['source']);
if (isset($o['isAsync'])) $this->isAsync = $o['isAsync'];
if (isset($o['referenceId'])) $this->referenceId = $o['referenceId'];
if (isset($o['value'])) $this->value = JsonConverters::from('Value', $o['value']);
if (isset($o['noEvalTemplate'])) $this->noEvalTemplate = $o['noEvalTemplate'];
if (isset($o['listParameters'])) $this->listParameters = JsonConverters::fromArray('NodeParameterMap', $o['listParameters']);
if (isset($o['structParameters'])) $this->structParameters = JsonConverters::from('NodeParameterMap', $o['structParameters']);
if (isset($o['isOutput'])) $this->isOutput = $o['isOutput'];
if (isset($o['expression'])) $this->expression = $o['expression'];
if (isset($o['listType'])) $this->listType = JsonConverters::from('DataType', $o['listType']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->id)) $o['id'] = $this->id;
if (isset($this->type)) $o['type'] = JsonConverters::to('ValueTypes', $this->type);
if (isset($this->source)) $o['source'] = JsonConverters::to('ValueSources', $this->source);
if (isset($this->isAsync)) $o['isAsync'] = $this->isAsync;
if (isset($this->referenceId)) $o['referenceId'] = $this->referenceId;
if (isset($this->value)) $o['value'] = JsonConverters::to('Value', $this->value);
if (isset($this->noEvalTemplate)) $o['noEvalTemplate'] = $this->noEvalTemplate;
if (isset($this->listParameters)) $o['listParameters'] = JsonConverters::toArray('NodeParameterMap', $this->listParameters);
if (isset($this->structParameters)) $o['structParameters'] = JsonConverters::to('NodeParameterMap', $this->structParameters);
if (isset($this->isOutput)) $o['isOutput'] = $this->isOutput;
if (isset($this->expression)) $o['expression'] = $this->expression;
if (isset($this->listType)) $o['listType'] = JsonConverters::to('DataType', $this->listType);
return empty($o) ? new class(){} : $o;
}
}
class NotUsedRequest implements JsonSerializable
{
public function __construct(
/** @var PushNotification|null */
public ?PushNotification $pushNotification=null,
/** @var array<NotificationInfo>|null */
public ?array $notifications=null,
/** @var NodeParameter|null */
public ?NodeParameter $nodeParameter=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['pushNotification'])) $this->pushNotification = JsonConverters::from('PushNotification', $o['pushNotification']);
if (isset($o['notifications'])) $this->notifications = JsonConverters::fromArray('NotificationInfo', $o['notifications']);
if (isset($o['nodeParameter'])) $this->nodeParameter = JsonConverters::from('NodeParameter', $o['nodeParameter']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->pushNotification)) $o['pushNotification'] = JsonConverters::to('PushNotification', $this->pushNotification);
if (isset($this->notifications)) $o['notifications'] = JsonConverters::toArray('NotificationInfo', $this->notifications);
if (isset($this->nodeParameter)) $o['nodeParameter'] = JsonConverters::to('NodeParameter', $this->nodeParameter);
return empty($o) ? new class(){} : $o;
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /not-used HTTP/1.1
Host: team.evovoice.io
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"pushNotification":{"type":"SessionDisconnected","channel":"Voice","endpointId":"String","endpointUserName":"String","sessionId":"String","sender":"String","title":"String","body":"String","badge":0,"attachmentUri":"String","attachmentContentType":"String","agentState":"Unknown","agentStateReason":"Unknown"},"notifications":[{"accountId":"String","accountName":"String","customerId":"String","customerName":"String","customerBreadcrumb":[{"id":"String","name":"String"}],"type":"Email","subject":"String","body":"String","recipients":[{"address":"String","extra":"String","name":"String"}],"attachments":[{"type":"Upload","accountId":"String","accountName":"String","customerId":"String","customerName":"String","customerBreadcrumb":[{"id":"String","name":"String"}],"userId":"String","userName":"String","fileName":"String","uri":"String","contentType":"String","contentLength":0,"recordingSid":"String","recordingDuration":0,"recordingFrom":"String","transcription":"String","fromAddress":"String","toAddress":"String","aiTranscription":"String","id":"String","dateCreated":"String","dateLastModified":"String","createdBy":"String","lastModifiedBy":"String"}],"from":"String","to":"String","error":false,"errorMessage":"String","id":"String","dateCreated":"String","dateLastModified":"String","createdBy":"String","lastModifiedBy":"String"}]}