feat(customers): accept typed agreement consents for seven documents - #954
feat(customers): accept typed agreement consents for seven documents#954ls-bolt[bot] wants to merge 1 commit into
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
|
✱ Stainless preview builds for gridThis PR will update the cli go kotlin openapi php python ruby typescript Edit this comment to update them. They will appear in their respective SDK's changelogs. ✅ grid-typescript studio · code · diff
✅ grid-openapi studio · code · diff
✅ grid-ruby studio · code · diff
✅ grid-kotlin studio · code · diff
✅ grid-go studio · code · diff
✅ grid-python studio · code · diff
✅ grid-php studio · code · diff
✅ grid-cli studio · code · diff
This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push. |
4cc5e19 to
3caae81
Compare
|
⚡ Revision log — updated in place, latest first. Revision 1Reworked:
|
Summary
endUserTermsConsentfield withagreementConsents, a list carrying one entry per agreement, so each document's acceptance is recorded and auditable separately.AgreementTypeenum with the seven supported documents, and changesGET /customers/end-user-termsto return a catalog of all seven as{ data: [{ type, version, url }] }.The seven agreement types
AgreementTypeLIGHTSPARK_END_USER_TERMSLIGHTSPARK_E_SIGN_CONSENTLIGHTSPARK_PRIVACY_POLICYLEAD_E_SIGN_CONSENTLEAD_ACCOUNTHOLDER_AGREEMENTLEAD_PRIVACY_POLICYLEAD_CARDHOLDER_AGREEMENTEach consent entry carries
typeplus the four existing evidence fields (acceptedAt,ipAddress,termsVersion,acceptanceMethod), all required.termsVersionis theversionthe catalog returns for that type — versions are scoped per type, so a version valid for one agreement is not valid for another.Design decisions worth a reviewer's attention
The endpoint path is unchanged.
GET /customers/end-user-termskeeps its path and gains a list response (operationIdgetEndUserTerms→listAgreementDocuments). Renaming the path would be a second breaking change for no functional gain; happy to rename if you'd prefer to take both at once.The catalog is not a requirements list. Seven supported types does not mean every customer must accept all seven. Which documents are required, for which products and customers, is a legal decision this PR deliberately does not encode.
info.versionis intentionally not bumped. It tracks the published dated version — a live routing prefix, also hardcoded across the docs and the generated client — not each breaking merge. It has not moved since that rule landed in #679, across 36+breaking-changePRs. Thebreaking-changelabel and API-reviewer approval are the real gate; flagging it here so that decision is explicit rather than implied.Clients pinned to the dated version are not affected. The server change lands this shape on the
/grid/rcrelease-candidate surface only, leaving/grid/2025-10-13serving the existing contract. Cutting a new dated version is a separate, coordinated release.retrieve_end_user_termsin.stainless/stainless.ymlis left alone. It's a published SDK method name and its path is unchanged, so renaming it is an independent SDK-breaking decision. The three model mappings that pointed at now-deleted schemas are updated.Migration for existing consumers
LIGHTSPARK_END_USER_TERMS. Acceptance of one agreement never implies another, so the other six must be collected from each customer.Customer.agreementConsentsis read-only and returns the most recent acceptance per accepted type — an empty list until the first acceptance, where the old field was omitted.Changes: 21 files
openapi/components/schemas/customers/Agreement*.yaml— 6 new schemas (type, acceptance method, consent request/response, document, list response)openapi/components/schemas/customers/EndUserTerms*.yaml— 4 superseded schemas removedopenapi/components/schemas/customers/Customer{,CreateRequest,UpdateRequest}.yaml— field swapped to the listopenapi/paths/customers/customers_end-user-terms.yaml— catalog responseopenapi/webhooks/customer-update.yaml— 2 examples updated to matchCustomer.stainless/stainless.yml— model mappings repointedmintlify/— disclosures rewritten, snippet + changelog entry, regenerated bundlesTest plan
This repo has no test suite; it is spec + docs. Verified:
make buildbundles cleanly; both generated bundles regenerated and committed.make lintexits 0 with 2 warnings / 14 ignored — byte-identical to themainbaseline, confirmed by re-running lint on a stashed tree. No new lint problems.agreementConsentsand no longer exposeendUserTermsConsent; the 200 response resolves todata[]ofAgreementDocumentwith{type, version, url}all required; noEndUserTerms*schema remains;info.versionunchanged..stainlessmodel mappings, which are fixed here. Its remaining finding is the version-bump question addressed above.Public
Consent is now recorded per agreement type, and the agreements endpoint lists every supported document with its current version and URL.