Commit graph

56 commits

Author SHA1 Message Date
Vitor Mattos
68eada5682
docs: update API response definitions
Add description, displayName, notify, and acceptsEmailNotifications
fields to OpenAPI response type definitions for LibresignNewSigner
and LibresignIdentifyAccount.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
2025-12-16 19:12:58 -03:00
Vitor Mattos
114b4eabd1
test: fix unit tests for DocMDP per-file feature
- Add docmdpLevel to LibresignValidateFile schema in ResponseDefinitions
- Add DocMdpConfigService mock to RequestSignatureServiceTest
- Fix constructor parameter order in RequestSignatureServiceTest
- Mock validateDocMdpAllowsSignatures in SignFileServiceTest
- Mock getDocmdpLevelEnum to return NOT_CERTIFIED in test scenarios
- Fixes OpenAPI schema validation errors
- Fixes ArgumentCountError in RequestSignatureService tests
- Fixes enum mocking issues in SignFileService tests

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
2025-12-14 16:38:34 -03:00
Vitor Mattos
df44227af1
fix: add signatureFlow to ValidateFile schema
Add signatureFlow field to ValidateFile schema in OpenAPI specs and
ResponseDefinitions.

- Update openapi.json and openapi-full.json schemas
- Add signatureFlow to LibresignValidateFile psalm type
- Mark as required field with integer type

This fixes OpenAPI validation errors in API tests.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
2025-12-12 17:18:55 -03:00
Vitor Mattos
8602edfb4e
feat: add status and statusText to LibresignSigner type
Update the LibresignSigner psalm type definition to include status
and statusText as required fields (not optional). These fields will
always be present in API responses for signer data.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
2025-12-11 14:34:26 -03:00
Vitor Mattos
3c223a06c2
feat: introduce FileStatus enum for type-safe status handling
Add FileStatus backed enum to provide compile-time type safety for file
status values. This replaces the previous int-based approach with a
proper enum that:

- Eliminates the need for default fallback in match expressions
- Provides IDE autocomplete for all valid status values
- Throws ValueError for invalid status codes instead of silently
  returning unknown status
- Accepts both int and FileStatus for backward compatibility

Updated getTextOfStatus() to use FileStatus enum with automatic
conversion from int via FileStatus::from(). Removed null return type
as status column is NOT NULL in database, ensuring statusText is
always a string.

This improves code maintainability and prevents invalid status values
from being used throughout the codebase.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
2025-12-11 11:08:20 -03:00
Vitor Mattos
8bc72d9616
docs: update LibresignNextcloudFile type definition
Update psalm type to reflect the actual fields returned by the
file upload endpoint: status, statusText, and created_at instead
of etag, path, and type.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
2025-12-11 09:46:45 -03:00
Vitor Mattos
70e7c3533c
feat: add signingOrder to OpenAPI schema definitions
Add signingOrder field to LibresignSigner and LibresignNewSigner
schemas to support ordered signature flow in API documentation.

This fixes OpenAPI validation errors in API tests that were failing
because the signingOrder field was being returned but not defined
in the schema.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
2025-12-10 12:19:40 -03:00
David Lima
68d5cfc6ff
feat(files-app-integration): show status on signed and original files
Add the property signedNodeId to the /file/list end-point to show an
icon on the original and signed file, according to the signing status

Signed-off-by: David Lima <antdavidlima@gmail.com>
2025-12-03 00:40:10 -03:00
Vitor Mattos
bd9a08a7ab
feat: add IdDocs entity, mapper and service
Introduces new IdDocs system to manage identification documents
for digital signatures, replacing the AccountFile system.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
2025-12-02 13:55:45 -03:00
Vitor Mattos
2321d6d475
feat: implement serial number with random number
Will be necessary refactor this to replace the random number by another
algorithm without colision

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
2025-10-17 09:12:58 -03:00
Vitor Mattos
65130b8d80 feat: return next scheduled date
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
2025-10-07 20:02:43 -03:00
Vitor Mattos
adb624de8a
feat: implement reminders at back and frontend
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
2025-09-08 14:24:26 -03:00
Vitor Mattos
d7e3e59e3e
fix: documentation
Signed-off-by: Vitor Mattos <vitor@php.rio>
2025-04-17 15:30:12 -03:00
Vitor Mattos
6f32e6aadf
chore: change URL to CPS
CPS is the right name of this

Signed-off-by: Vitor Mattos <vitor@php.rio>
2025-04-17 15:00:52 -03:00
Vitor Mattos
b507df970b
chore: rename URL to CPS and return this at get certificate details endpoint
Signed-off-by: Vitor Mattos <vitor@php.rio>
2025-04-17 14:12:41 -03:00
Vitor Mattos
7ca63a3c8b
chore: make frontend compatible with custom width and height
- Signature component at frontend was replaced by a best maintained
  package
- Addded more capabilities

Signed-off-by: Vitor Mattos <vitor@php.rio>
2025-04-11 10:44:03 -03:00
Vitor Mattos
d3019cbe73
chore: create capability to say if signer can create signature
Signed-off-by: Vitor Mattos <vitor@php.rio>
2025-04-11 10:42:57 -03:00
Vitor Mattos
7f2e3b3661
feat: add support to capabilities
Signed-off-by: Vitor Mattos <vitor@php.rio>
2025-04-11 10:42:54 -03:00
Vitor Mattos
4ff9fe7775
fix: notification date
Signed-off-by: Vitor Mattos <vitor@php.rio>
2025-04-08 14:18:13 -03:00
Vitor Mattos
c9f14e36cb
feat: display hash algorithm
Signed-off-by: Vitor Mattos <vitor@php.rio>
2025-01-06 20:35:46 -03:00
Vitor Mattos
42f8153cd2
feat: add subject (Common Name) to API response
Signed-off-by: Vitor Mattos <vitor@php.rio>
2025-01-06 11:05:58 -03:00
Vitor Mattos
a2023399f0
chore: update documentation
Signed-off-by: Vitor Mattos <vitor@php.rio>
2025-01-04 18:54:39 -03:00
Vitor Mattos
6e466adf6d
feat: add pdf version
Signed-off-by: Vitor Mattos <vitor@php.rio>
2025-01-04 13:45:28 -03:00
Vitor Mattos
88e501a0d0
chore: update documentation
Signed-off-by: Vitor Mattos <vitor@php.rio>
2025-01-04 13:45:28 -03:00
Vitor Mattos
756263deff
feat: add totalPages to return of validate method
Signed-off-by: Vitor Mattos <vitor@php.rio>
2025-01-04 13:45:26 -03:00
Vitor Mattos
6a47cc0ac4
feat: add list of sent notifications to a signer
Signed-off-by: Vitor Mattos <vitor@php.rio>
2024-12-28 18:26:10 -03:00
Vitor Mattos
518dfe1ebc
feat: add user-agent and remote-address to signer data
Signed-off-by: Vitor Mattos <vitor@php.rio>
2024-12-28 17:56:52 -03:00
Vitor Mattos
047b89a452
chore: update documentation
Signed-off-by: Vitor Mattos <vitor@php.rio>
2024-12-23 20:15:09 -03:00
Vitor Mattos
401f7fb698
chore: update API documentation
Signed-off-by: Vitor Mattos <vitor@php.rio>
2024-12-13 00:20:20 -03:00
Vitor Mattos
7a74c36500 fix: list files from PostgreSQL
Signed-off-by: Vitor Mattos <vitor@php.rio>
2024-11-29 12:47:10 -03:00
Vitor Mattos
eb9ea14367
chore: update api documentation
Signed-off-by: Vitor Mattos <vitor@php.rio>
2024-11-19 17:01:57 -03:00
Vitor Mattos
c748950115
fix: cfsslUri is optional value
Signed-off-by: Vitor Mattos <vitor@php.rio>
2024-07-23 19:41:11 -03:00
Vitor Mattos
8d187ab4a5
fix: unit test
Signed-off-by: Vitor Mattos <vitor@php.rio>
2024-05-31 04:32:55 -03:00
Vitor Mattos
2c703ae3ca
fix: unit tests
Signed-off-by: Vitor Mattos <vitor@php.rio>
2024-05-31 04:28:01 -03:00
Vitor Mattos
6398ea883e
fix: unit tests
Signed-off-by: Vitor Mattos <vitor@php.rio>
2024-05-31 04:23:25 -03:00
Vitor Mattos
105db14e49
chore: replace uid by userId
Signed-off-by: Vitor Mattos <vitor@php.rio>
2024-05-31 02:55:56 -03:00
Vitor Mattos
6500c93a9a
fix: types
Signed-off-by: Vitor Mattos <vitor@php.rio>
2024-05-31 02:31:46 -03:00
Vitor Mattos
6f5cdbf3f7
fix: documentation
Signed-off-by: Vitor Mattos <vitor@php.rio>
2024-05-31 02:31:46 -03:00
Vitor Mattos
64015fd230
fix: documentation
Signed-off-by: Vitor Mattos <vitor@php.rio>
2024-05-31 02:31:46 -03:00
Vitor Mattos
86b4742292
fix: documentation
Signed-off-by: Vitor Mattos <vitor@php.rio>
2024-05-31 02:31:46 -03:00
Vitor Mattos
50a70f4cee
fix: types
Signed-off-by: Vitor Mattos <vitor@php.rio>
2024-05-31 02:31:46 -03:00
Vitor Mattos
390f6611f9
chore: order by usage
Signed-off-by: Vitor Mattos <vitor@php.rio>
2024-05-31 02:31:46 -03:00
Vitor Mattos
a1a2cf020d
fix: return type
Signed-off-by: Vitor Mattos <vitor@php.rio>
2024-05-31 02:31:45 -03:00
Vitor Mattos
4e42e7a697
feat: add pending type
Signed-off-by: Vitor Mattos <vitor@php.rio>
2024-05-31 02:31:45 -03:00
Vitor Mattos
2c437d676a
fix: remove call to undefined method
Signed-off-by: Vitor Mattos <vitor@php.rio>
2024-05-31 02:31:45 -03:00
Vitor Mattos
f5c02233d6
fix: remove duplicated
Signed-off-by: Vitor Mattos <vitor@php.rio>
2024-05-31 02:31:44 -03:00
Vitor Mattos
fc305804c7
feat: documentation api enhancements
Signed-off-by: Vitor Mattos <vitor@php.rio>
2024-05-31 02:31:44 -03:00
Vitor Mattos
4242cc5a11
fix: documentation
Signed-off-by: Vitor Mattos <vitor@php.rio>
2024-05-29 18:41:02 -03:00
Vitor Mattos
c01422b22f
fix: documentation
Signed-off-by: Vitor Mattos <vitor@php.rio>
2024-05-29 18:41:02 -03:00
Vitor Mattos
8a67b169cf
fix: documentation
Signed-off-by: Vitor Mattos <vitor@php.rio>
2024-05-29 18:41:01 -03:00