PDFCLOUD-5547 Add PDF encryption and restriction client methods#11
Merged
datalogics-kam merged 11 commits intopdfrest:mainfrom Feb 11, 2026
Merged
Conversation
68745c8 to
3ec89be
Compare
Assisted-by: Codex
Assisted-by: Codex
Assisted-by: Codex
Assisted-by: Codex
Assisted-by: Codex
…rmissions - Added `test_live_add_permissions_password_invalid_restriction` to verify that invalid restrictions raise `PdfRestApiError` in sync client. - Added `test_live_async_add_permissions_password_invalid_restriction` to ensure async client correctly handles invalid restrictions. Assisted-by: Codex
f90f5b8 to
67e9fad
Compare
datalogics-kam
requested changes
Feb 10, 2026
- import `PdfRestFile` from `models.public` inside `_internal.py` to avoid circular imports - update encrypt/restrict unit tests to build expected request payloads through `PdfEncryptPayload`/`PdfDecryptPayload`/`PdfRestrictPayload`/`PdfUnrestrictPayload` - replace hand-built payload dicts with `model_validate(...).model_dump(mode="json", by_alias=True, exclude_none=True, exclude_unset=True)` Assisted-by: Codex
- add shared `assert_pdf_file_response` helpers to live encryption and permissions-password suites - assert additional response attributes on success paths, including file size, `.pdf` suffix, and `response.warning is None` - keep existing MIME type, output-prefix, and input-id checks while reducing repeated assertion blocks - align live assertions with repository testing guidelines for richer server-response verification Assisted-by: Codex
Assisted-by: Codex
Assisted-by: Codex
67e9fad to
85ff431
Compare
datalogics-kam
approved these changes
Feb 11, 2026
Contributor
datalogics-kam
left a comment
There was a problem hiding this comment.
- Requested changes were made
- Tests passing
- Codex PR review found no issues (except the commit messages, but that's not critical)
Thanks, Chris!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PDFCLOUD-5547
Overview
This PR adds new client functionality for PDF restriction and encryption workflows, along with full sync/async unit test coverage for each new endpoint.
What’s included