| POST | /v1/forms/submissions/{SubmissionUID}/decide |
|---|
<?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};
class FormStageInfo implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $Id=null,
/** @var string|null */
public ?string $Label=null,
/** @var string|null */
public ?string $Tone=null,
/** @var string|null */
public ?string $Kind=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['Label'])) $this->Label = $o['Label'];
if (isset($o['Tone'])) $this->Tone = $o['Tone'];
if (isset($o['Kind'])) $this->Kind = $o['Kind'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->Label)) $o['Label'] = $this->Label;
if (isset($this->Tone)) $o['Tone'] = $this->Tone;
if (isset($this->Kind)) $o['Kind'] = $this->Kind;
return empty($o) ? new class(){} : $o;
}
}
class FormPerson implements JsonSerializable
{
public function __construct(
/** @var int */
public int $AgentId=0,
/** @var string|null */
public ?string $AgentName=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['AgentId'])) $this->AgentId = $o['AgentId'];
if (isset($o['AgentName'])) $this->AgentName = $o['AgentName'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->AgentId)) $o['AgentId'] = $this->AgentId;
if (isset($this->AgentName)) $o['AgentName'] = $this->AgentName;
return empty($o) ? new class(){} : $o;
}
}
class FormRecordFile implements JsonSerializable
{
public function __construct(
/** @var string */
public string $AttachmentId='',
/** @var string|null */
public ?string $Name=null,
/** @var string|null */
public ?string $Kind=null,
/** @var string|null */
public ?string $Size=null,
/** @var bool|null */
public ?bool $Sensitive=null,
/** @var bool|null */
public ?bool $Locked=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['AttachmentId'])) $this->AttachmentId = $o['AttachmentId'];
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['Kind'])) $this->Kind = $o['Kind'];
if (isset($o['Size'])) $this->Size = $o['Size'];
if (isset($o['Sensitive'])) $this->Sensitive = $o['Sensitive'];
if (isset($o['Locked'])) $this->Locked = $o['Locked'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->AttachmentId)) $o['AttachmentId'] = $this->AttachmentId;
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->Kind)) $o['Kind'] = $this->Kind;
if (isset($this->Size)) $o['Size'] = $this->Size;
if (isset($this->Sensitive)) $o['Sensitive'] = $this->Sensitive;
if (isset($this->Locked)) $o['Locked'] = $this->Locked;
return empty($o) ? new class(){} : $o;
}
}
class FormRecordSig implements JsonSerializable
{
public function __construct(
/** @var bool|null */
public ?bool $Pending=null,
/** @var string|null */
public ?string $Mode=null,
/** @var string|null */
public ?string $SignerName=null,
/** @var string|null */
public ?string $Role=null,
/** @var int */
public int $RecordId=0,
/** @var string|null */
public ?string $ImageHash=null,
/** @var string|null */
public ?string $DocumentDigest=null,
/** @var string|null */
public ?string $Ip=null,
/** @var string|null */
public ?string $Browser=null,
/** @var bool|null */
public ?bool $ConsentStored=null,
/** @var string|null */
public ?string $SignedText=null,
/** @var bool|null */
public ?bool $HasImage=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Pending'])) $this->Pending = $o['Pending'];
if (isset($o['Mode'])) $this->Mode = $o['Mode'];
if (isset($o['SignerName'])) $this->SignerName = $o['SignerName'];
if (isset($o['Role'])) $this->Role = $o['Role'];
if (isset($o['RecordId'])) $this->RecordId = $o['RecordId'];
if (isset($o['ImageHash'])) $this->ImageHash = $o['ImageHash'];
if (isset($o['DocumentDigest'])) $this->DocumentDigest = $o['DocumentDigest'];
if (isset($o['Ip'])) $this->Ip = $o['Ip'];
if (isset($o['Browser'])) $this->Browser = $o['Browser'];
if (isset($o['ConsentStored'])) $this->ConsentStored = $o['ConsentStored'];
if (isset($o['SignedText'])) $this->SignedText = $o['SignedText'];
if (isset($o['HasImage'])) $this->HasImage = $o['HasImage'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Pending)) $o['Pending'] = $this->Pending;
if (isset($this->Mode)) $o['Mode'] = $this->Mode;
if (isset($this->SignerName)) $o['SignerName'] = $this->SignerName;
if (isset($this->Role)) $o['Role'] = $this->Role;
if (isset($this->RecordId)) $o['RecordId'] = $this->RecordId;
if (isset($this->ImageHash)) $o['ImageHash'] = $this->ImageHash;
if (isset($this->DocumentDigest)) $o['DocumentDigest'] = $this->DocumentDigest;
if (isset($this->Ip)) $o['Ip'] = $this->Ip;
if (isset($this->Browser)) $o['Browser'] = $this->Browser;
if (isset($this->ConsentStored)) $o['ConsentStored'] = $this->ConsentStored;
if (isset($this->SignedText)) $o['SignedText'] = $this->SignedText;
if (isset($this->HasImage)) $o['HasImage'] = $this->HasImage;
return empty($o) ? new class(){} : $o;
}
}
class FormRecordRow implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $K=null,
/** @var string|null */
public ?string $L=null,
/** @var string|null */
public ?string $T=null,
/** @var string|null */
public ?string $Kind=null,
/** @var string|null */
public ?string $V=null,
/** @var bool|null */
public ?bool $Sensitive=null,
/** @var bool|null */
public ?bool $CanReveal=null,
/** @var bool|null */
public ?bool $Locked=null,
/** @var array<FormRecordFile>|null */
public ?array $Files=null,
/** @var bool|null */
public ?bool $NoFiles=null,
/** @var FormRecordSig|null */
public ?FormRecordSig $Sig=null,
/** @var bool|null */
public ?bool $Asked=null,
/** @var bool|null */
public ?bool $Changed=null,
/** @var string|null */
public ?string $Prev=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['K'])) $this->K = $o['K'];
if (isset($o['L'])) $this->L = $o['L'];
if (isset($o['T'])) $this->T = $o['T'];
if (isset($o['Kind'])) $this->Kind = $o['Kind'];
if (isset($o['V'])) $this->V = $o['V'];
if (isset($o['Sensitive'])) $this->Sensitive = $o['Sensitive'];
if (isset($o['CanReveal'])) $this->CanReveal = $o['CanReveal'];
if (isset($o['Locked'])) $this->Locked = $o['Locked'];
if (isset($o['Files'])) $this->Files = JsonConverters::fromArray('FormRecordFile', $o['Files']);
if (isset($o['NoFiles'])) $this->NoFiles = $o['NoFiles'];
if (isset($o['Sig'])) $this->Sig = JsonConverters::from('FormRecordSig', $o['Sig']);
if (isset($o['Asked'])) $this->Asked = $o['Asked'];
if (isset($o['Changed'])) $this->Changed = $o['Changed'];
if (isset($o['Prev'])) $this->Prev = $o['Prev'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->K)) $o['K'] = $this->K;
if (isset($this->L)) $o['L'] = $this->L;
if (isset($this->T)) $o['T'] = $this->T;
if (isset($this->Kind)) $o['Kind'] = $this->Kind;
if (isset($this->V)) $o['V'] = $this->V;
if (isset($this->Sensitive)) $o['Sensitive'] = $this->Sensitive;
if (isset($this->CanReveal)) $o['CanReveal'] = $this->CanReveal;
if (isset($this->Locked)) $o['Locked'] = $this->Locked;
if (isset($this->Files)) $o['Files'] = JsonConverters::toArray('FormRecordFile', $this->Files);
if (isset($this->NoFiles)) $o['NoFiles'] = $this->NoFiles;
if (isset($this->Sig)) $o['Sig'] = JsonConverters::to('FormRecordSig', $this->Sig);
if (isset($this->Asked)) $o['Asked'] = $this->Asked;
if (isset($this->Changed)) $o['Changed'] = $this->Changed;
if (isset($this->Prev)) $o['Prev'] = $this->Prev;
return empty($o) ? new class(){} : $o;
}
}
class FormRecordSection implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $Title=null,
/** @var array<FormRecordRow>|null */
public ?array $Rows=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Title'])) $this->Title = $o['Title'];
if (isset($o['Rows'])) $this->Rows = JsonConverters::fromArray('FormRecordRow', $o['Rows']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Title)) $o['Title'] = $this->Title;
if (isset($this->Rows)) $o['Rows'] = JsonConverters::toArray('FormRecordRow', $this->Rows);
return empty($o) ? new class(){} : $o;
}
}
class FormRecordDoc implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $Name=null,
/** @var bool|null */
public ?bool $Ok=null,
/** @var string|null */
public ?string $Tag=null,
/** @var string|null */
public ?string $Tone=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['Ok'])) $this->Ok = $o['Ok'];
if (isset($o['Tag'])) $this->Tag = $o['Tag'];
if (isset($o['Tone'])) $this->Tone = $o['Tone'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->Ok)) $o['Ok'] = $this->Ok;
if (isset($this->Tag)) $o['Tag'] = $this->Tag;
if (isset($this->Tone)) $o['Tone'] = $this->Tone;
return empty($o) ? new class(){} : $o;
}
}
class FormRecordComputed implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $L=null,
/** @var string|null */
public ?string $V=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['L'])) $this->L = $o['L'];
if (isset($o['V'])) $this->V = $o['V'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->L)) $o['L'] = $this->L;
if (isset($this->V)) $o['V'] = $this->V;
return empty($o) ? new class(){} : $o;
}
}
class FormRecordEvent implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $Who=null,
/** @var string|null */
public ?string $X=null,
/** @var string|null */
public ?string $T=null,
/** @var DateTime */
public DateTime $At=new DateTime(),
/** @var string|null */
public ?string $Dot=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Who'])) $this->Who = $o['Who'];
if (isset($o['X'])) $this->X = $o['X'];
if (isset($o['T'])) $this->T = $o['T'];
if (isset($o['At'])) $this->At = JsonConverters::from('DateTime', $o['At']);
if (isset($o['Dot'])) $this->Dot = $o['Dot'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Who)) $o['Who'] = $this->Who;
if (isset($this->X)) $o['X'] = $this->X;
if (isset($this->T)) $o['T'] = $this->T;
if (isset($this->At)) $o['At'] = JsonConverters::to('DateTime', $this->At);
if (isset($this->Dot)) $o['Dot'] = $this->Dot;
return empty($o) ? new class(){} : $o;
}
}
class FormRecordRequest implements JsonSerializable
{
public function __construct(
/** @var string */
public string $RequestUID='',
/** @var array<string>|null */
public ?array $Keys=null,
/** @var array<string>|null */
public ?array $Resign=null,
/** @var string|null */
public ?string $Note=null,
/** @var string|null */
public ?string $By=null,
/** @var string|null */
public ?string $At=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['RequestUID'])) $this->RequestUID = $o['RequestUID'];
if (isset($o['Keys'])) $this->Keys = JsonConverters::fromArray('string', $o['Keys']);
if (isset($o['Resign'])) $this->Resign = JsonConverters::fromArray('string', $o['Resign']);
if (isset($o['Note'])) $this->Note = $o['Note'];
if (isset($o['By'])) $this->By = $o['By'];
if (isset($o['At'])) $this->At = $o['At'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->RequestUID)) $o['RequestUID'] = $this->RequestUID;
if (isset($this->Keys)) $o['Keys'] = JsonConverters::toArray('string', $this->Keys);
if (isset($this->Resign)) $o['Resign'] = JsonConverters::toArray('string', $this->Resign);
if (isset($this->Note)) $o['Note'] = $this->Note;
if (isset($this->By)) $o['By'] = $this->By;
if (isset($this->At)) $o['At'] = $this->At;
return empty($o) ? new class(){} : $o;
}
}
class FormRecordDecision implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $Outcome=null,
/** @var string|null */
public ?string $Tone=null,
/** @var string|null */
public ?string $Reason=null,
/** @var string|null */
public ?string $Note=null,
/** @var string|null */
public ?string $Text=null,
/** @var bool|null */
public ?bool $HasCounter=null,
/** @var bool|null */
public ?bool $Typed=null,
/** @var bool|null */
public ?bool $Drawn=null,
/** @var string|null */
public ?string $SigName=null,
/** @var string|null */
public ?string $SigMeta=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Outcome'])) $this->Outcome = $o['Outcome'];
if (isset($o['Tone'])) $this->Tone = $o['Tone'];
if (isset($o['Reason'])) $this->Reason = $o['Reason'];
if (isset($o['Note'])) $this->Note = $o['Note'];
if (isset($o['Text'])) $this->Text = $o['Text'];
if (isset($o['HasCounter'])) $this->HasCounter = $o['HasCounter'];
if (isset($o['Typed'])) $this->Typed = $o['Typed'];
if (isset($o['Drawn'])) $this->Drawn = $o['Drawn'];
if (isset($o['SigName'])) $this->SigName = $o['SigName'];
if (isset($o['SigMeta'])) $this->SigMeta = $o['SigMeta'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Outcome)) $o['Outcome'] = $this->Outcome;
if (isset($this->Tone)) $o['Tone'] = $this->Tone;
if (isset($this->Reason)) $o['Reason'] = $this->Reason;
if (isset($this->Note)) $o['Note'] = $this->Note;
if (isset($this->Text)) $o['Text'] = $this->Text;
if (isset($this->HasCounter)) $o['HasCounter'] = $this->HasCounter;
if (isset($this->Typed)) $o['Typed'] = $this->Typed;
if (isset($this->Drawn)) $o['Drawn'] = $this->Drawn;
if (isset($this->SigName)) $o['SigName'] = $this->SigName;
if (isset($this->SigMeta)) $o['SigMeta'] = $this->SigMeta;
return empty($o) ? new class(){} : $o;
}
}
class FormRecordEarlierDecision implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $Outcome=null,
/** @var string|null */
public ?string $Tone=null,
/** @var string|null */
public ?string $Reason=null,
/** @var string|null */
public ?string $Note=null,
/** @var string|null */
public ?string $Text=null,
/** @var string|null */
public ?string $Counter=null,
/** @var string|null */
public ?string $Reopened=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Outcome'])) $this->Outcome = $o['Outcome'];
if (isset($o['Tone'])) $this->Tone = $o['Tone'];
if (isset($o['Reason'])) $this->Reason = $o['Reason'];
if (isset($o['Note'])) $this->Note = $o['Note'];
if (isset($o['Text'])) $this->Text = $o['Text'];
if (isset($o['Counter'])) $this->Counter = $o['Counter'];
if (isset($o['Reopened'])) $this->Reopened = $o['Reopened'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Outcome)) $o['Outcome'] = $this->Outcome;
if (isset($this->Tone)) $o['Tone'] = $this->Tone;
if (isset($this->Reason)) $o['Reason'] = $this->Reason;
if (isset($this->Note)) $o['Note'] = $this->Note;
if (isset($this->Text)) $o['Text'] = $this->Text;
if (isset($this->Counter)) $o['Counter'] = $this->Counter;
if (isset($this->Reopened)) $o['Reopened'] = $this->Reopened;
return empty($o) ? new class(){} : $o;
}
}
class FormRecordSigEntry implements JsonSerializable
{
public function __construct(
/** @var int */
public int $RecordId=0,
/** @var string|null */
public ?string $Key=null,
/** @var string|null */
public ?string $Label=null,
/** @var string|null */
public ?string $Role=null,
/** @var string|null */
public ?string $SignerName=null,
/** @var string|null */
public ?string $Mode=null,
/** @var bool|null */
public ?bool $HasImage=null,
/** @var bool|null */
public ?bool $ConsentStored=null,
/** @var bool|null */
public ?bool $Replaced=null,
/** @var bool|null */
public ?bool $Counter=null,
/** @var bool|null */
public ?bool $Reopened=null,
/** @var string|null */
public ?string $Meta=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['RecordId'])) $this->RecordId = $o['RecordId'];
if (isset($o['Key'])) $this->Key = $o['Key'];
if (isset($o['Label'])) $this->Label = $o['Label'];
if (isset($o['Role'])) $this->Role = $o['Role'];
if (isset($o['SignerName'])) $this->SignerName = $o['SignerName'];
if (isset($o['Mode'])) $this->Mode = $o['Mode'];
if (isset($o['HasImage'])) $this->HasImage = $o['HasImage'];
if (isset($o['ConsentStored'])) $this->ConsentStored = $o['ConsentStored'];
if (isset($o['Replaced'])) $this->Replaced = $o['Replaced'];
if (isset($o['Counter'])) $this->Counter = $o['Counter'];
if (isset($o['Reopened'])) $this->Reopened = $o['Reopened'];
if (isset($o['Meta'])) $this->Meta = $o['Meta'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->RecordId)) $o['RecordId'] = $this->RecordId;
if (isset($this->Key)) $o['Key'] = $this->Key;
if (isset($this->Label)) $o['Label'] = $this->Label;
if (isset($this->Role)) $o['Role'] = $this->Role;
if (isset($this->SignerName)) $o['SignerName'] = $this->SignerName;
if (isset($this->Mode)) $o['Mode'] = $this->Mode;
if (isset($this->HasImage)) $o['HasImage'] = $this->HasImage;
if (isset($this->ConsentStored)) $o['ConsentStored'] = $this->ConsentStored;
if (isset($this->Replaced)) $o['Replaced'] = $this->Replaced;
if (isset($this->Counter)) $o['Counter'] = $this->Counter;
if (isset($this->Reopened)) $o['Reopened'] = $this->Reopened;
if (isset($this->Meta)) $o['Meta'] = $this->Meta;
return empty($o) ? new class(){} : $o;
}
}
class FormRecordReplacedRow implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $K=null,
/** @var string|null */
public ?string $L=null,
/** @var string|null */
public ?string $Kind=null,
/** @var string|null */
public ?string $V=null,
/** @var bool|null */
public ?bool $Sensitive=null,
/** @var bool|null */
public ?bool $CanReveal=null,
/** @var bool|null */
public ?bool $Locked=null,
/** @var array<FormRecordFile>|null */
public ?array $Files=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['K'])) $this->K = $o['K'];
if (isset($o['L'])) $this->L = $o['L'];
if (isset($o['Kind'])) $this->Kind = $o['Kind'];
if (isset($o['V'])) $this->V = $o['V'];
if (isset($o['Sensitive'])) $this->Sensitive = $o['Sensitive'];
if (isset($o['CanReveal'])) $this->CanReveal = $o['CanReveal'];
if (isset($o['Locked'])) $this->Locked = $o['Locked'];
if (isset($o['Files'])) $this->Files = JsonConverters::fromArray('FormRecordFile', $o['Files']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->K)) $o['K'] = $this->K;
if (isset($this->L)) $o['L'] = $this->L;
if (isset($this->Kind)) $o['Kind'] = $this->Kind;
if (isset($this->V)) $o['V'] = $this->V;
if (isset($this->Sensitive)) $o['Sensitive'] = $this->Sensitive;
if (isset($this->CanReveal)) $o['CanReveal'] = $this->CanReveal;
if (isset($this->Locked)) $o['Locked'] = $this->Locked;
if (isset($this->Files)) $o['Files'] = JsonConverters::toArray('FormRecordFile', $this->Files);
return empty($o) ? new class(){} : $o;
}
}
class FormRecordReplaced implements JsonSerializable
{
public function __construct(
/** @var string */
public string $RequestUID='',
/** @var string|null */
public ?string $AskedBy=null,
/** @var string|null */
public ?string $AskedAt=null,
/** @var string|null */
public ?string $AnsweredAt=null,
/** @var string|null */
public ?string $Covering=null,
/** @var array<FormRecordReplacedRow>|null */
public ?array $Rows=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['RequestUID'])) $this->RequestUID = $o['RequestUID'];
if (isset($o['AskedBy'])) $this->AskedBy = $o['AskedBy'];
if (isset($o['AskedAt'])) $this->AskedAt = $o['AskedAt'];
if (isset($o['AnsweredAt'])) $this->AnsweredAt = $o['AnsweredAt'];
if (isset($o['Covering'])) $this->Covering = $o['Covering'];
if (isset($o['Rows'])) $this->Rows = JsonConverters::fromArray('FormRecordReplacedRow', $o['Rows']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->RequestUID)) $o['RequestUID'] = $this->RequestUID;
if (isset($this->AskedBy)) $o['AskedBy'] = $this->AskedBy;
if (isset($this->AskedAt)) $o['AskedAt'] = $this->AskedAt;
if (isset($this->AnsweredAt)) $o['AnsweredAt'] = $this->AnsweredAt;
if (isset($this->Covering)) $o['Covering'] = $this->Covering;
if (isset($this->Rows)) $o['Rows'] = JsonConverters::toArray('FormRecordReplacedRow', $this->Rows);
return empty($o) ? new class(){} : $o;
}
}
class FormSubmissionRecord implements JsonSerializable
{
public function __construct(
/** @var string */
public string $SubmissionUID='',
/** @var string */
public string $FormUID='',
/** @var string|null */
public ?string $FormName=null,
/** @var string|null */
public ?string $Noun=null,
/** @var string|null */
public ?string $Number=null,
/** @var string|null */
public ?string $ApplicantName=null,
/** @var FormStageInfo|null */
public ?FormStageInfo $Stage=null,
/** @var array<string>|null */
public ?array $Tags=null,
/** @var int|null */
public ?int $AssigneeAgentId=null,
/** @var string|null */
public ?string $AssigneeName=null,
/** @var string|null */
public ?string $BranchName=null,
/** @var DateTime|null */
public ?DateTime $SubmittedAt=null,
/** @var int */
public int $VersionNo=0,
/** @var int */
public int $CurrentVersionNo=0,
/** @var string|null */
public ?string $Email=null,
/** @var string|null */
public ?string $Phone=null,
/** @var string|null */
public ?string $ContactName=null,
/** @var string|null */
public ?string $Meta=null,
/** @var array<FormStageInfo>|null */
public ?array $Stages=null,
/** @var array<FormStageInfo>|null */
public ?array $Moves=null,
/** @var array<FormPerson>|null */
public ?array $People=null,
/** @var bool|null */
public ?bool $CanEdit=null,
/** @var bool|null */
public ?bool $CanSensitive=null,
/** @var array<FormRecordSection>|null */
public ?array $Sections=null,
/** @var array<FormRecordDoc>|null */
public ?array $Docs=null,
/** @var string|null */
public ?string $DocCount=null,
/** @var array<FormRecordComputed>|null */
public ?array $Computed=null,
/** @var array<FormRecordEvent>|null */
public ?array $Timeline=null,
/** @var array<FormRecordEvent>|null */
public ?array $Notes=null,
/** @var array<FormRecordEvent>|null */
public ?array $Audit=null,
/** @var bool|null */
public ?bool $IsTest=null,
/** @var string|null */
public ?string $VersionText=null,
/** @var string|null */
public ?string $TenantName=null,
/** @var string|null */
public ?string $SubmittedIso=null,
/** @var FormRecordRequest|null */
public ?FormRecordRequest $OpenRequest=null,
/** @var bool|null */
public ?bool $CanRequest=null,
/** @var string|null */
public ?string $RequestTip=null,
/** @var FormRecordDecision|null */
public ?FormRecordDecision $Decision=null,
/** @var array<FormRecordEarlierDecision>|null */
public ?array $Earlier=null,
/** @var bool|null */
public ?bool $CanDecide=null,
/** @var string|null */
public ?string $DecideTip=null,
/** @var string|null */
public ?string $MoveTip=null,
/** @var DateTime|null */
public ?DateTime $DueAt=null,
/** @var bool|null */
public ?bool $Overdue=null,
/** @var string|null */
public ?string $AgeText=null,
/** @var string|null */
public ?string $DueText=null,
/** @var array<FormRecordSigEntry>|null */
public ?array $Signatures=null,
/** @var array<FormRecordReplaced>|null */
public ?array $Replaced=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['SubmissionUID'])) $this->SubmissionUID = $o['SubmissionUID'];
if (isset($o['FormUID'])) $this->FormUID = $o['FormUID'];
if (isset($o['FormName'])) $this->FormName = $o['FormName'];
if (isset($o['Noun'])) $this->Noun = $o['Noun'];
if (isset($o['Number'])) $this->Number = $o['Number'];
if (isset($o['ApplicantName'])) $this->ApplicantName = $o['ApplicantName'];
if (isset($o['Stage'])) $this->Stage = JsonConverters::from('FormStageInfo', $o['Stage']);
if (isset($o['Tags'])) $this->Tags = JsonConverters::fromArray('string', $o['Tags']);
if (isset($o['AssigneeAgentId'])) $this->AssigneeAgentId = $o['AssigneeAgentId'];
if (isset($o['AssigneeName'])) $this->AssigneeName = $o['AssigneeName'];
if (isset($o['BranchName'])) $this->BranchName = $o['BranchName'];
if (isset($o['SubmittedAt'])) $this->SubmittedAt = JsonConverters::from('DateTime', $o['SubmittedAt']);
if (isset($o['VersionNo'])) $this->VersionNo = $o['VersionNo'];
if (isset($o['CurrentVersionNo'])) $this->CurrentVersionNo = $o['CurrentVersionNo'];
if (isset($o['Email'])) $this->Email = $o['Email'];
if (isset($o['Phone'])) $this->Phone = $o['Phone'];
if (isset($o['ContactName'])) $this->ContactName = $o['ContactName'];
if (isset($o['Meta'])) $this->Meta = $o['Meta'];
if (isset($o['Stages'])) $this->Stages = JsonConverters::fromArray('FormStageInfo', $o['Stages']);
if (isset($o['Moves'])) $this->Moves = JsonConverters::fromArray('FormStageInfo', $o['Moves']);
if (isset($o['People'])) $this->People = JsonConverters::fromArray('FormPerson', $o['People']);
if (isset($o['CanEdit'])) $this->CanEdit = $o['CanEdit'];
if (isset($o['CanSensitive'])) $this->CanSensitive = $o['CanSensitive'];
if (isset($o['Sections'])) $this->Sections = JsonConverters::fromArray('FormRecordSection', $o['Sections']);
if (isset($o['Docs'])) $this->Docs = JsonConverters::fromArray('FormRecordDoc', $o['Docs']);
if (isset($o['DocCount'])) $this->DocCount = $o['DocCount'];
if (isset($o['Computed'])) $this->Computed = JsonConverters::fromArray('FormRecordComputed', $o['Computed']);
if (isset($o['Timeline'])) $this->Timeline = JsonConverters::fromArray('FormRecordEvent', $o['Timeline']);
if (isset($o['Notes'])) $this->Notes = JsonConverters::fromArray('FormRecordEvent', $o['Notes']);
if (isset($o['Audit'])) $this->Audit = JsonConverters::fromArray('FormRecordEvent', $o['Audit']);
if (isset($o['IsTest'])) $this->IsTest = $o['IsTest'];
if (isset($o['VersionText'])) $this->VersionText = $o['VersionText'];
if (isset($o['TenantName'])) $this->TenantName = $o['TenantName'];
if (isset($o['SubmittedIso'])) $this->SubmittedIso = $o['SubmittedIso'];
if (isset($o['OpenRequest'])) $this->OpenRequest = JsonConverters::from('FormRecordRequest', $o['OpenRequest']);
if (isset($o['CanRequest'])) $this->CanRequest = $o['CanRequest'];
if (isset($o['RequestTip'])) $this->RequestTip = $o['RequestTip'];
if (isset($o['Decision'])) $this->Decision = JsonConverters::from('FormRecordDecision', $o['Decision']);
if (isset($o['Earlier'])) $this->Earlier = JsonConverters::fromArray('FormRecordEarlierDecision', $o['Earlier']);
if (isset($o['CanDecide'])) $this->CanDecide = $o['CanDecide'];
if (isset($o['DecideTip'])) $this->DecideTip = $o['DecideTip'];
if (isset($o['MoveTip'])) $this->MoveTip = $o['MoveTip'];
if (isset($o['DueAt'])) $this->DueAt = JsonConverters::from('DateTime', $o['DueAt']);
if (isset($o['Overdue'])) $this->Overdue = $o['Overdue'];
if (isset($o['AgeText'])) $this->AgeText = $o['AgeText'];
if (isset($o['DueText'])) $this->DueText = $o['DueText'];
if (isset($o['Signatures'])) $this->Signatures = JsonConverters::fromArray('FormRecordSigEntry', $o['Signatures']);
if (isset($o['Replaced'])) $this->Replaced = JsonConverters::fromArray('FormRecordReplaced', $o['Replaced']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->SubmissionUID)) $o['SubmissionUID'] = $this->SubmissionUID;
if (isset($this->FormUID)) $o['FormUID'] = $this->FormUID;
if (isset($this->FormName)) $o['FormName'] = $this->FormName;
if (isset($this->Noun)) $o['Noun'] = $this->Noun;
if (isset($this->Number)) $o['Number'] = $this->Number;
if (isset($this->ApplicantName)) $o['ApplicantName'] = $this->ApplicantName;
if (isset($this->Stage)) $o['Stage'] = JsonConverters::to('FormStageInfo', $this->Stage);
if (isset($this->Tags)) $o['Tags'] = JsonConverters::toArray('string', $this->Tags);
if (isset($this->AssigneeAgentId)) $o['AssigneeAgentId'] = $this->AssigneeAgentId;
if (isset($this->AssigneeName)) $o['AssigneeName'] = $this->AssigneeName;
if (isset($this->BranchName)) $o['BranchName'] = $this->BranchName;
if (isset($this->SubmittedAt)) $o['SubmittedAt'] = JsonConverters::to('DateTime', $this->SubmittedAt);
if (isset($this->VersionNo)) $o['VersionNo'] = $this->VersionNo;
if (isset($this->CurrentVersionNo)) $o['CurrentVersionNo'] = $this->CurrentVersionNo;
if (isset($this->Email)) $o['Email'] = $this->Email;
if (isset($this->Phone)) $o['Phone'] = $this->Phone;
if (isset($this->ContactName)) $o['ContactName'] = $this->ContactName;
if (isset($this->Meta)) $o['Meta'] = $this->Meta;
if (isset($this->Stages)) $o['Stages'] = JsonConverters::toArray('FormStageInfo', $this->Stages);
if (isset($this->Moves)) $o['Moves'] = JsonConverters::toArray('FormStageInfo', $this->Moves);
if (isset($this->People)) $o['People'] = JsonConverters::toArray('FormPerson', $this->People);
if (isset($this->CanEdit)) $o['CanEdit'] = $this->CanEdit;
if (isset($this->CanSensitive)) $o['CanSensitive'] = $this->CanSensitive;
if (isset($this->Sections)) $o['Sections'] = JsonConverters::toArray('FormRecordSection', $this->Sections);
if (isset($this->Docs)) $o['Docs'] = JsonConverters::toArray('FormRecordDoc', $this->Docs);
if (isset($this->DocCount)) $o['DocCount'] = $this->DocCount;
if (isset($this->Computed)) $o['Computed'] = JsonConverters::toArray('FormRecordComputed', $this->Computed);
if (isset($this->Timeline)) $o['Timeline'] = JsonConverters::toArray('FormRecordEvent', $this->Timeline);
if (isset($this->Notes)) $o['Notes'] = JsonConverters::toArray('FormRecordEvent', $this->Notes);
if (isset($this->Audit)) $o['Audit'] = JsonConverters::toArray('FormRecordEvent', $this->Audit);
if (isset($this->IsTest)) $o['IsTest'] = $this->IsTest;
if (isset($this->VersionText)) $o['VersionText'] = $this->VersionText;
if (isset($this->TenantName)) $o['TenantName'] = $this->TenantName;
if (isset($this->SubmittedIso)) $o['SubmittedIso'] = $this->SubmittedIso;
if (isset($this->OpenRequest)) $o['OpenRequest'] = JsonConverters::to('FormRecordRequest', $this->OpenRequest);
if (isset($this->CanRequest)) $o['CanRequest'] = $this->CanRequest;
if (isset($this->RequestTip)) $o['RequestTip'] = $this->RequestTip;
if (isset($this->Decision)) $o['Decision'] = JsonConverters::to('FormRecordDecision', $this->Decision);
if (isset($this->Earlier)) $o['Earlier'] = JsonConverters::toArray('FormRecordEarlierDecision', $this->Earlier);
if (isset($this->CanDecide)) $o['CanDecide'] = $this->CanDecide;
if (isset($this->DecideTip)) $o['DecideTip'] = $this->DecideTip;
if (isset($this->MoveTip)) $o['MoveTip'] = $this->MoveTip;
if (isset($this->DueAt)) $o['DueAt'] = JsonConverters::to('DateTime', $this->DueAt);
if (isset($this->Overdue)) $o['Overdue'] = $this->Overdue;
if (isset($this->AgeText)) $o['AgeText'] = $this->AgeText;
if (isset($this->DueText)) $o['DueText'] = $this->DueText;
if (isset($this->Signatures)) $o['Signatures'] = JsonConverters::toArray('FormRecordSigEntry', $this->Signatures);
if (isset($this->Replaced)) $o['Replaced'] = JsonConverters::toArray('FormRecordReplaced', $this->Replaced);
return empty($o) ? new class(){} : $o;
}
}
class FormSubmissionRecordResponse implements JsonSerializable
{
public function __construct(
/** @var FormSubmissionRecord|null */
public ?FormSubmissionRecord $Record=null,
/** @var ResponseStatus|null */
public ?ResponseStatus $ResponseStatus=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Record'])) $this->Record = JsonConverters::from('FormSubmissionRecord', $o['Record']);
if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Record)) $o['Record'] = JsonConverters::to('FormSubmissionRecord', $this->Record);
if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
return empty($o) ? new class(){} : $o;
}
}
class FormFillReceiptLine implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $Channel=null,
/** @var string|null */
public ?string $To=null,
/** @var string|null */
public ?string $Outcome=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Channel'])) $this->Channel = $o['Channel'];
if (isset($o['To'])) $this->To = $o['To'];
if (isset($o['Outcome'])) $this->Outcome = $o['Outcome'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Channel)) $o['Channel'] = $this->Channel;
if (isset($this->To)) $o['To'] = $this->To;
if (isset($this->Outcome)) $o['Outcome'] = $this->Outcome;
return empty($o) ? new class(){} : $o;
}
}
class FormSubmissionRequestInfoResponse extends FormSubmissionRecordResponse implements JsonSerializable
{
/**
* @param FormSubmissionRecord|null $Record
* @param ResponseStatus|null $ResponseStatus
*/
public function __construct(
?FormSubmissionRecord $Record=null,
?ResponseStatus $ResponseStatus=null,
/** @var array<FormFillReceiptLine>|null */
public ?array $Sent=null
) {
parent::__construct($Record,$ResponseStatus);
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['Sent'])) $this->Sent = JsonConverters::fromArray('FormFillReceiptLine', $o['Sent']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->Sent)) $o['Sent'] = JsonConverters::toArray('FormFillReceiptLine', $this->Sent);
return empty($o) ? new class(){} : $o;
}
}
class FormCounterSignature implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $Mode=null,
/** @var string|null */
public ?string $Name=null,
/** @var string|null */
public ?string $Png=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Mode'])) $this->Mode = $o['Mode'];
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['Png'])) $this->Png = $o['Png'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Mode)) $o['Mode'] = $this->Mode;
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->Png)) $o['Png'] = $this->Png;
return empty($o) ? new class(){} : $o;
}
}
class FormSubmissionDecideRequest implements JsonSerializable
{
public function __construct(
/** @var string */
public string $SubmissionUID='',
/** @var string|null */
public ?string $Outcome=null,
/** @var string|null */
public ?string $Reason=null,
/** @var string|null */
public ?string $Note=null,
/** @var FormCounterSignature|null */
public ?FormCounterSignature $Counter=null,
/** @var string|null */
public ?string $From=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['SubmissionUID'])) $this->SubmissionUID = $o['SubmissionUID'];
if (isset($o['Outcome'])) $this->Outcome = $o['Outcome'];
if (isset($o['Reason'])) $this->Reason = $o['Reason'];
if (isset($o['Note'])) $this->Note = $o['Note'];
if (isset($o['Counter'])) $this->Counter = JsonConverters::from('FormCounterSignature', $o['Counter']);
if (isset($o['From'])) $this->From = $o['From'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->SubmissionUID)) $o['SubmissionUID'] = $this->SubmissionUID;
if (isset($this->Outcome)) $o['Outcome'] = $this->Outcome;
if (isset($this->Reason)) $o['Reason'] = $this->Reason;
if (isset($this->Note)) $o['Note'] = $this->Note;
if (isset($this->Counter)) $o['Counter'] = JsonConverters::to('FormCounterSignature', $this->Counter);
if (isset($this->From)) $o['From'] = $this->From;
return empty($o) ? new class(){} : $o;
}
}
PHP FormSubmissionDecideRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/forms/submissions/{SubmissionUID}/decide HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
SubmissionUID: 00000000000000000000000000000000,
Outcome: String,
Reason: String,
Note: String,
Counter:
{
Mode: String,
Name: String,
Png: String
},
From: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Sent:
[
{
Channel: String,
To: String,
Outcome: String
}
],
Record:
{
SubmissionUID: 00000000000000000000000000000000,
FormUID: 00000000000000000000000000000000,
FormName: String,
Noun: String,
Number: String,
ApplicantName: String,
Stage:
{
Id: String,
Label: String,
Tone: String,
Kind: String
},
Tags:
[
String
],
AssigneeAgentId: 0,
AssigneeName: String,
BranchName: String,
SubmittedAt: 0001-01-01,
VersionNo: 0,
CurrentVersionNo: 0,
Email: String,
Phone: String,
ContactName: String,
Meta: String,
Stages:
[
{
Id: String,
Label: String,
Tone: String,
Kind: String
}
],
Moves:
[
{
Id: String,
Label: String,
Tone: String,
Kind: String
}
],
People:
[
{
AgentId: 0,
AgentName: String
}
],
CanEdit: False,
CanSensitive: False,
Sections:
[
{
Title: String,
Rows:
[
{
K: String,
L: String,
T: String,
Kind: String,
V: String,
Sensitive: False,
CanReveal: False,
Locked: False,
Files:
[
{
AttachmentId: 00000000000000000000000000000000,
Name: String,
Kind: String,
Size: String,
Sensitive: False,
Locked: False
}
],
NoFiles: False,
Sig:
{
Pending: False,
Mode: String,
SignerName: String,
Role: String,
RecordId: 0,
ImageHash: String,
DocumentDigest: String,
Ip: String,
Browser: String,
ConsentStored: False,
SignedText: String,
HasImage: False
},
Asked: False,
Changed: False,
Prev: String
}
]
}
],
Docs:
[
{
Name: String,
Ok: False,
Tag: String,
Tone: String
}
],
DocCount: String,
Computed:
[
{
L: String,
V: String
}
],
Timeline:
[
{
Who: String,
X: String,
T: String,
At: 0001-01-01,
Dot: String
}
],
Notes:
[
{
Who: String,
X: String,
T: String,
At: 0001-01-01,
Dot: String
}
],
Audit:
[
{
Who: String,
X: String,
T: String,
At: 0001-01-01,
Dot: String
}
],
IsTest: False,
VersionText: String,
TenantName: String,
SubmittedIso: String,
OpenRequest:
{
RequestUID: 00000000000000000000000000000000,
Keys:
[
String
],
Resign:
[
String
],
Note: String,
By: String,
At: String
},
CanRequest: False,
RequestTip: String,
Decision:
{
Outcome: String,
Tone: String,
Reason: String,
Note: String,
Text: String,
HasCounter: False,
Typed: False,
Drawn: False,
SigName: String,
SigMeta: String
},
Earlier:
[
{
Outcome: String,
Tone: String,
Reason: String,
Note: String,
Text: String,
Counter: String,
Reopened: String
}
],
CanDecide: False,
DecideTip: String,
MoveTip: String,
DueAt: 0001-01-01,
Overdue: False,
AgeText: String,
DueText: String,
Signatures:
[
{
RecordId: 0,
Key: String,
Label: String,
Role: String,
SignerName: String,
Mode: String,
HasImage: False,
ConsentStored: False,
Replaced: False,
Counter: False,
Reopened: False,
Meta: String
}
],
Replaced:
[
{
RequestUID: 00000000000000000000000000000000,
AskedBy: String,
AskedAt: String,
AnsweredAt: String,
Covering: String,
Rows:
[
{
K: String,
L: String,
Kind: String,
V: String,
Sensitive: False,
CanReveal: False,
Locked: False,
Files:
[
{
AttachmentId: 00000000000000000000000000000000,
Name: String,
Kind: String,
Size: String,
Sensitive: False,
Locked: False
}
]
}
]
}
]
},
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
}