Skip to content

feat(backend)!: Method to save provider agreements#12287

Merged
AntonioVentilii merged 8 commits intomainfrom
feat-backend/Method-to-save-provider-agreements
Apr 2, 2026
Merged

feat(backend)!: Method to save provider agreements#12287
AntonioVentilii merged 8 commits intomainfrom
feat-backend/Method-to-save-provider-agreements

Conversation

@AntonioVentilii
Copy link
Copy Markdown
Collaborator

@AntonioVentilii AntonioVentilii commented Apr 2, 2026

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.

@AntonioVentilii AntonioVentilii changed the title feat(backend): Method to save provider agreements feat(backend)!: Method to save provider agreements Apr 2, 2026
@AntonioVentilii AntonioVentilii marked this pull request as ready for review April 2, 2026 09:02
@AntonioVentilii AntonioVentilii requested a review from a team as a code owner April 2, 2026 09:02
Copilot AI review requested due to automatic review settings April 2, 2026 09:02
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_agreements update call and request type, wiring it through the user profile API/service layer.
  • Extends StoredUserProfile update 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.

Comment thread src/backend/src/user_profile/service.rs
Comment thread src/backend/src/user_profile/service.rs
Comment thread src/shared/src/impls.rs
@AntonioVentilii AntonioVentilii added this pull request to the merge queue Apr 2, 2026
Merged via the queue into main with commit ed93681 Apr 2, 2026
81 checks passed
@AntonioVentilii AntonioVentilii deleted the feat-backend/Method-to-save-provider-agreements branch April 2, 2026 10:39
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.

3 participants