@@ -43,6 +43,7 @@ public function __construct(
4343 * @param string $uuid UUID of sign request. The signer UUID is what the person receives via email when asked to sign. This is not the file UUID.
4444 * @param integer $signRequestId Id of sign request
4545 * @param integer|null $elementId ID of visible element. Each element has an ID that is returned on validation endpoints.
46+ * @param integer|null $fileId File ID when using node identifier instead of UUID
4647 * @param string $type The type of element to create, sginature, sinitial, date, datetime, text
4748 * @param array{} $metadata Metadata of visible elements to associate with the document
4849 * @param LibresignCoordinate $coordinates Coortinates of a visible element on PDF
@@ -54,14 +55,15 @@ public function __construct(
5455 #[NoAdminRequired]
5556 #[NoCSRFRequired]
5657 #[ApiRoute(verb: 'POST ' , url: '/api/{apiVersion}/file-element/{uuid} ' , requirements: ['apiVersion ' => '(v1) ' ])]
57- public function post (string $ uuid , int $ signRequestId , ?int $ elementId = null , string $ type = '' , array $ metadata = [], array $ coordinates = []): DataResponse {
58+ public function post (string $ uuid , int $ signRequestId , ?int $ elementId = null , ? int $ fileId = null , string $ type = '' , array $ metadata = [], array $ coordinates = []): DataResponse {
5859 $ visibleElement = [
5960 'elementId ' => $ elementId ,
6061 'type ' => $ type ,
6162 'signRequestId ' => $ signRequestId ,
6263 'coordinates ' => $ coordinates ,
6364 'metadata ' => $ metadata ,
6465 'fileUuid ' => $ uuid ,
66+ 'fileId ' => $ fileId ,
6567 ];
6668 try {
6769 $ this ->validateHelper ->validateVisibleElement ($ visibleElement , ValidateHelper::TYPE_VISIBLE_ELEMENT_PDF );
@@ -92,6 +94,7 @@ public function post(string $uuid, int $signRequestId, ?int $elementId = null, s
9294 * @param string $uuid UUID of sign request. The signer UUID is what the person receives via email when asked to sign. This is not the file UUID.
9395 * @param integer $signRequestId Id of sign request
9496 * @param integer|null $elementId ID of visible element. Each element has an ID that is returned on validation endpoints.
97+ * @param integer|null $fileId File ID when using node identifier instead of UUID
9598 * @param string $type The type of element to create, sginature, sinitial, date, datetime, text
9699 * @param array{} $metadata Metadata of visible elements to associate with the document
97100 * @param LibresignCoordinate $coordinates Coortinates of a visible element on PDF
@@ -103,8 +106,8 @@ public function post(string $uuid, int $signRequestId, ?int $elementId = null, s
103106 #[NoAdminRequired]
104107 #[NoCSRFRequired]
105108 #[ApiRoute(verb: 'PATCH ' , url: '/api/{apiVersion}/file-element/{uuid}/{elementId} ' , requirements: ['apiVersion ' => '(v1) ' ])]
106- public function patch (string $ uuid , int $ signRequestId , ?int $ elementId = null , string $ type = '' , array $ metadata = [], array $ coordinates = []): DataResponse {
107- return $ this ->post ($ uuid , $ signRequestId , $ elementId , $ type , $ metadata , $ coordinates );
109+ public function patch (string $ uuid , int $ signRequestId , ?int $ elementId = null , ? int $ fileId = null , string $ type = '' , array $ metadata = [], array $ coordinates = []): DataResponse {
110+ return $ this ->post ($ uuid , $ signRequestId , $ elementId , $ fileId , $ type , $ metadata , $ coordinates );
108111 }
109112
110113 /**
0 commit comments