Skip to content

feat(dpi_ng/consent): add Data Privacy Integration NextGen Consent service integration to sdk#199

Open
Ashwith-N wants to merge 24 commits into
SAP:mainfrom
Ashwith-N:main
Open

feat(dpi_ng/consent): add Data Privacy Integration NextGen Consent service integration to sdk#199
Ashwith-N wants to merge 24 commits into
SAP:mainfrom
Ashwith-N:main

Conversation

@Ashwith-N

Copy link
Copy Markdown

Disclaimer: Do not include SAP-internal or customer-specific information in this PR (e.g. internal system URLs, customer names, tenant IDs, or confidential configurations). This is a public repository.

Description

To introduce the sap_cloud_sdk.core.dpi_ng.consent capability to the SAP Cloud SDK for Python. It provides a unified API for managing consents, purposes, templates, retention rules, and configuration reference data exposed by the DPI NextGen Consent Repository OData V4 service.

Key components included:

  • Client Factory: A public create_client() function with a typed ConsentClient API
  • Authentication strategies: BearerTokenAuth, ClientCredentialsAuth, and ClientCertificateAuth (mTLS)
  • Request/Result Models: Typed DTOs for consent operations
  • Service layer: Five service attributes (consents, purposes, templates, retention, configuration) each covering full CRUD and lifecycle operations against the respective OData endpoints.
  • Exception hierarchy: ConsentSDKError base with typed subclasses for 401, 403, 400/422, 404, 409, and other OData errors.
  • Documentation: Module guidance in user-guide.md.
  • Test coverage: Unit tests and BDD integration tests under tests/core/unit/dpi_ng/consent and tests/core/integration/dpi_ng/consent

Related Issue

N/A

Type of Change

Please check the relevant option:

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Code refactoring
  • Dependency update

How to Test

  1. Install dependencies: uv sync --all-extras
  2. Configure credentials per docs/INTEGRATION_TESTS.md
  3. Run unit tests: uv run pytest tests/core/unit/dpi_ng/consent/ -v
  4. Run integration tests: uv run pytest tests/core/integration/dpi_ng/consent/ -v
  5. Expected result: all tests pass

Checklist

Before submitting your PR, please review and check the following:

  • I have read the Contributing Guidelines
  • I have verified that my changes solve the issue
  • I have added/updated automated tests to cover my changes
  • All tests pass locally
  • I have verified that my code follows the Code Guidelines
  • I have updated documentation (if applicable)
  • I have added type hints for all public APIs
  • My code does not contain sensitive information (credentials, tokens, etc.)
  • I have followed Conventional Commits for commit messages

Breaking Changes

If this PR introduces breaking changes, please describe:

  • What breaks
    None.
  • Migration path for users
    No migration required.
  • Alternative approaches considered
    N/A

Additional Notes

This feature follows the existing SDK module structure described in CONTRIBUTING.md and aligns with the integration test setup documented in INTEGRATION_TESTS.md. It is intended as an additive capability and does not change existing public APIs.

@Ashwith-N Ashwith-N requested a review from a team as a code owner July 6, 2026 07:39
@cla-assistant

cla-assistant Bot commented Jul 6, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Comment thread tests/core/unit/dpi_ng/consent/unit/test_config.py Fixed
Ashwith-N added 24 commits July 10, 2026 01:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants