'documentTypeId' =>
$documentTypeId,
'fileType' =>
$operation->
getFileType(),
'orderId' =>
$orderId,
'orderVersionId' =>
$operation->
getOrderVersionId(),
'static' =>
$operation->
isStatic(),
'documentMediaFileId' =>
$mediaId,
'config' =>
$document->
getConfig(),
'deepLinkCode' =>
$deepLinkCode,
'referencedDocumentId' =>
$operation->
getReferencedDocumentId(),
];
$result->
addSuccess(new DocumentIdStruct($id,
$deepLinkCode,
$mediaId));
} catch (\Throwable
$exception) { $result->
addError($orderId,
$exception);
} } $this->
writeRecords($records,
$context);
return $result;
} public function upload(string
$documentId, Context
$context, Request
$uploadedFileRequest): DocumentIdStruct
{