mirror of
https://github.com/LibreSign/libresign.git
synced 2025-12-17 13:08:48 +01:00
feat: add signatureFlow parameter to PATCH endpoint
Add optional signatureFlow parameter to request-signature PATCH endpoint. Updates OpenAPI specs and TypeScript types. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
This commit is contained in:
parent
a0a58a0d8b
commit
8cf477fcbc
5 changed files with 25 additions and 2 deletions
|
|
@ -136,6 +136,7 @@ class RequestSignatureController extends AEnvironmentAwareController {
|
|||
* @param LibresignVisibleElement[]|null $visibleElements Visible elements on document
|
||||
* @param LibresignNewFile|array<empty>|null $file File object.
|
||||
* @param integer|null $status Numeric code of status * 0 - no signers * 1 - signed * 2 - pending
|
||||
* @param string|null $signatureFlow Signature flow mode: 'parallel' or 'ordered_numeric'. If not provided, uses global configuration
|
||||
* @return DataResponse<Http::STATUS_OK, array{message: string, data: LibresignValidateFile}, array{}>|DataResponse<Http::STATUS_UNPROCESSABLE_ENTITY, array{message?: string, action?: integer, errors?: list<array{message: string, title?: string}>}, array{}>
|
||||
*
|
||||
* 200: OK
|
||||
|
|
@ -145,7 +146,14 @@ class RequestSignatureController extends AEnvironmentAwareController {
|
|||
#[NoCSRFRequired]
|
||||
#[RequireManager]
|
||||
#[ApiRoute(verb: 'PATCH', url: '/api/{apiVersion}/request-signature', requirements: ['apiVersion' => '(v1)'])]
|
||||
public function updateSign(?array $users = [], ?string $uuid = null, ?array $visibleElements = null, ?array $file = [], ?int $status = null): DataResponse {
|
||||
public function updateSign(
|
||||
?array $users = [],
|
||||
?string $uuid = null,
|
||||
?array $visibleElements = null,
|
||||
?array $file = [],
|
||||
?int $status = null,
|
||||
?string $signatureFlow = null,
|
||||
): DataResponse {
|
||||
$user = $this->userSession->getUser();
|
||||
$data = [
|
||||
'uuid' => $uuid,
|
||||
|
|
@ -153,7 +161,8 @@ class RequestSignatureController extends AEnvironmentAwareController {
|
|||
'users' => $users,
|
||||
'userManager' => $user,
|
||||
'status' => $status,
|
||||
'visibleElements' => $visibleElements
|
||||
'visibleElements' => $visibleElements,
|
||||
'signatureFlow' => $signatureFlow,
|
||||
];
|
||||
try {
|
||||
$this->validateHelper->validateExistingFile($data);
|
||||
|
|
|
|||
|
|
@ -6679,6 +6679,11 @@
|
|||
"format": "int64",
|
||||
"nullable": true,
|
||||
"description": "Numeric code of status * 0 - no signers * 1 - signed * 2 - pending"
|
||||
},
|
||||
"signatureFlow": {
|
||||
"type": "string",
|
||||
"nullable": true,
|
||||
"description": "Signature flow mode: 'parallel' or 'ordered_numeric'. If not provided, uses global configuration"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6529,6 +6529,11 @@
|
|||
"format": "int64",
|
||||
"nullable": true,
|
||||
"description": "Numeric code of status * 0 - no signers * 1 - signed * 2 - pending"
|
||||
},
|
||||
"signatureFlow": {
|
||||
"type": "string",
|
||||
"nullable": true,
|
||||
"description": "Signature flow mode: 'parallel' or 'ordered_numeric'. If not provided, uses global configuration"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4106,6 +4106,8 @@ export interface operations {
|
|||
* @description Numeric code of status * 0 - no signers * 1 - signed * 2 - pending
|
||||
*/
|
||||
status?: number | null;
|
||||
/** @description Signature flow mode: 'parallel' or 'ordered_numeric'. If not provided, uses global configuration */
|
||||
signatureFlow?: string | null;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -3628,6 +3628,8 @@ export interface operations {
|
|||
* @description Numeric code of status * 0 - no signers * 1 - signed * 2 - pending
|
||||
*/
|
||||
status?: number | null;
|
||||
/** @description Signature flow mode: 'parallel' or 'ordered_numeric'. If not provided, uses global configuration */
|
||||
signatureFlow?: string | null;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue