feat(backend)!: Method to save provider agreements#12287
Merged
AntonioVentilii merged 8 commits intomainfrom Apr 2, 2026
Merged
feat(backend)!: Method to save provider agreements#12287AntonioVentilii merged 8 commits intomainfrom
AntonioVentilii merged 8 commits intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new backend update method to persist per-provider agreement acknowledgements (with audit history), alongside the necessary Candid/TypeScript declaration updates and integration tests.
Changes:
- Introduces
update_provider_agreementsupdate call and request type, wiring it through the user profile API/service layer. - Extends
StoredUserProfileupdate logic to merge provider agreements into the stored profile state. - Adds integration tests covering provider agreement updates, version mismatch, validation, coexistence with internal agreements, and history recording.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/shared/src/impls.rs |
Adjusts provider-agreement update API on StoredUserProfile to accept an owned map. |
src/backend/src/user_profile/service.rs |
Implements service-layer handler and history entry collection for provider agreements. |
src/backend/src/api/user_profile.rs |
Exposes update_provider_agreements as a canister update method. |
src/backend/src/lib.rs |
Wires new request/response types into the backend crate exports/imports. |
src/backend/backend.did |
Adds UpdateProviderAgreementsRequest type and update_provider_agreements service method. |
src/declarations/backend/backend.factory.did.js |
Updates generated JS IDL factory with the new request type and method. |
src/declarations/backend/backend.factory.certified.did.js |
Updates generated certified JS IDL factory with the new request type and method. |
src/declarations/backend/backend.did.d.ts |
Updates generated TS declarations with the new request type and method docs. |
src/backend/tests/it/agreements.rs |
Adds integration tests for provider agreements behavior and audit history. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
DenysKarmazynDFINITY
approved these changes
Apr 2, 2026
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.
Motivation
To persist the acknowledgment of terms and agreements of providers by our suers, we need some methods to update the provider agreements of a user's profile.
BREAKING CHANGE: new method to update the provider agreements.