Skip to content

feat(kyc-controller): add session disclaimer fetching without sessionId - #10011

Merged
jiexi merged 7 commits into
mainfrom
jl/kyc-controller-consents-fetching-without-sessionId
Aug 31, 2026
Merged

feat(kyc-controller): add session disclaimer fetching without sessionId#10011
jiexi merged 7 commits into
mainfrom
jl/kyc-controller-consents-fetching-without-sessionId

Conversation

@jiexi

@jiexi jiexi commented Aug 28, 2026

Copy link
Copy Markdown
Member

Explanation

  • rename fetchDisclaimers to fetchVendorDisclaimers
    • Breaking, but kyc-controller is unreleased still
  • add support for fetchSessionDisclaimers without sessionId, using only country code

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Note

Medium Risk
Breaking rename affects any consumer calling fetchDisclaimers; new catalog API is additive but splits consent validation paths for global vs session disclaimers.

Overview
BREAKING: Renames KycService.fetchDisclaimers / KycService:fetchDisclaimers to fetchVendorDisclaimers (vendor T&Cs at GET /vendors/{vendor}/disclaimers). KycController.loadDisclaimers and tests follow the new messenger action.

Adds fetchDisclaimersCatalog (GET /disclaimers?country=) for the pre-session idOS + SumSub legal catalog, exposed on KycService and messenger as KycService:fetchDisclaimersCatalog. Returns KycDisclaimersCatalog (idOS + kycProvider documents only). fetchSessionDisclaimers stays session-scoped and still requires sessionId; responses must include credentialReusabilityConsentGiven, validated separately from the global catalog.

Types/docs/exports updated (FetchDisclaimersCatalogParams, ARCHITECTURE, CHANGELOG). The controller is not wired to call fetchDisclaimersCatalog yet—only the service surface is added.

Reviewed by Cursor Bugbot for commit f8d8cfd. Bugbot is set up for automated code reviews on this repo. Configure here.

@jiexi
jiexi requested review from a team as code owners August 28, 2026 21:58
@jiexi
jiexi deployed to default-branch August 28, 2026 21:58 — with GitHub Actions Active
@jiexi jiexi changed the title feat(kyc-controller): a feat(kyc-controller): add session disclaimer fetching without sessionId Aug 28, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit d58a971. Configure here.

Comment thread packages/kyc-controller/src/KycService.ts
@cursor
cursor Bot requested review from Akaryatrh and georgeweiler August 28, 2026 22:03
jiexi and others added 5 commits August 31, 2026 10:00
…ing-without-sessionId' into jl/kyc-controller-consents-fetching-without-sessionId
Messenger action typing collapses method overloads, so sessionId callers
were typed as the country catalog path and broke the build. Expose
fetchDisclaimersCatalog separately from fetchSessionDisclaimers.

Co-authored-by: Cursor <cursoragent@cursor.com>

@Akaryatrh Akaryatrh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@jiexi
jiexi added this pull request to the merge queue Aug 31, 2026
Merged via the queue into main with commit 6edeb8a Aug 31, 2026
47 checks passed
@jiexi
jiexi deleted the jl/kyc-controller-consents-fetching-without-sessionId branch August 31, 2026 19:28
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