Skip to content

Split the Lead agreements by customer kind and drop the consent-count cap - #1053

Closed
ls-bolt[bot] wants to merge 1 commit into
mainfrom
09-23-split-lead-agreements-by-customer-kind
Closed

ls-bolt[bot] wants to merge 1 commit into
mainfrom
09-23-split-lead-agreements-by-customer-kind

Conversation

@ls-bolt

@ls-bolt ls-bolt Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

This PR has been claimed. The active PR is now #1061.

Summary

  • Splits LEAD_CARDHOLDER_AGREEMENT and LEAD_ACCOUNTHOLDER_AGREEMENT into consumer and commercial variants. A consumer and a commercial customer accept different documents, so a single type cannot identify which one was accepted.
  • Removes the maxItems: 7 cap on agreementConsents in the customer create and update requests.

Why the cap goes

It restated a bound the type list already implies, and it silently became wrong the moment a type was added — as this change demonstrates, since the list is now nine. A caller reading maxItems: 7 learns nothing they could act on.

The constraint that matters is already stated in the field description and enforced server-side: at most one entry per type. That one does not drift when the enum grows.

Compatibility

The two replaced values are not yet recorded against any customer, so no existing consent evidence refers to them.

LEAD_ACCOUNTHOLDER_AGREEMENT  →  LEAD_ACCOUNTHOLDER_CONSUMER_AGREEMENT
                                 LEAD_ACCOUNTHOLDER_COMMERCIAL_AGREEMENT
LEAD_CARDHOLDER_AGREEMENT     →  LEAD_CARDHOLDER_CONSUMER_AGREEMENT
                                 LEAD_CARDHOLDER_COMMERCIAL_AGREEMENT

Test plan

  • npm run build:openapi regenerates both bundles; verified the new values are present and the replaced ones are gone from openapi.yaml and mintlify/openapi.yaml.
  • npm run lint:openapi exits 0. The only agreement-related output is a pre-existing informational note about a missing example on AgreementConsentRequest.acceptedAt, untouched by this change.

… cap

A consumer and a commercial customer accept different Lead cardholder and
accountholder documents, so each is its own agreement type rather than one
type covering both.

The array cap went with them. It restated a bound the type list already
implies, and any new agreement silently invalidated it. The per-type
uniqueness the description states is the real constraint.
@mintlify

mintlify Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
Grid 🟢 Ready View Preview Sep 23, 2026, 12:43 AM

@vercel

vercel Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

3 Skipped Deployments
Project Deployment Actions Updated
grid-cards-demo Ignored Ignored Preview Sep 23, 2026 12:42am UTC
grid-flow-builder Ignored Ignored Preview Sep 23, 2026 12:42am UTC
grid-wallet-demo Ignored Ignored Preview Sep 23, 2026 12:42am UTC

Request Review

@ls-bolt ls-bolt Bot added the bolt label Sep 23, 2026
@github-actions github-actions Bot added the breaking-change Introduces a breaking change to the OpenAPI spec label Sep 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Breaking OpenAPI changes detected

oasdiff reports 12 error / 52 warning changes to openapi.yaml.
This PR will need approval from an API reviewer before merge.

Errors (12)

  • POST /customers — removed the enum value LEAD_ACCOUNTHOLDER_AGREEMENT of the request property oneOf[subschema #1: Individual Customer Create Request]/allOf[#/components/schemas/CustomerCreateRequest]/agreementConsents/items/type [request-property-enum-value-removed].
  • POST /customers — removed the enum value LEAD_ACCOUNTHOLDER_AGREEMENT of the request property oneOf[subschema #2: Business Customer Create Request]/allOf[#/components/schemas/CustomerCreateRequest]/agreementConsents/items/type [request-property-enum-value-removed].
  • POST /customers — removed the enum value LEAD_CARDHOLDER_AGREEMENT of the request property oneOf[subschema #1: Individual Customer Create Request]/allOf[#/components/schemas/CustomerCreateRequest]/agreementConsents/items/type [request-property-enum-value-removed].
  • POST /customers — removed the enum value LEAD_CARDHOLDER_AGREEMENT of the request property oneOf[subschema #2: Business Customer Create Request]/allOf[#/components/schemas/CustomerCreateRequest]/agreementConsents/items/type [request-property-enum-value-removed].
  • PATCH /customers/{customerId} — removed the enum value LEAD_ACCOUNTHOLDER_AGREEMENT of the request property oneOf[subschema #1: Individual Customer Update Request]/allOf[subschema #1: Customer Update Request]/agreementConsents/items/type [request-property-enum-value-removed].
  • PATCH /customers/{customerId} — removed the enum value LEAD_ACCOUNTHOLDER_AGREEMENT of the request property oneOf[subschema #2: Business Customer Update Request]/allOf[subschema #1: Customer Update Request]/agreementConsents/items/type [request-property-enum-value-removed].
  • PATCH /customers/{customerId} — removed the enum value LEAD_CARDHOLDER_AGREEMENT of the request property oneOf[subschema #1: Individual Customer Update Request]/allOf[subschema #1: Customer Update Request]/agreementConsents/items/type [request-property-enum-value-removed].
  • PATCH /customers/{customerId} — removed the enum value LEAD_CARDHOLDER_AGREEMENT of the request property oneOf[subschema #2: Business Customer Update Request]/allOf[subschema #1: Customer Update Request]/agreementConsents/items/type [request-property-enum-value-removed].
  • POST webhook:customer-update — removed the enum value LEAD_ACCOUNTHOLDER_AGREEMENT of the request property allOf[subschema #2]/data/oneOf[subschema #1: Individual Customer]/allOf[#/components/schemas/Customer]/agreementConsents/items/allOf[#/components/schemas/AgreementConsentRequest]/type [request-property-enum-value-removed].
  • POST webhook:customer-update — removed the enum value LEAD_ACCOUNTHOLDER_AGREEMENT of the request property allOf[subschema #2]/data/oneOf[subschema #2: Business Customer]/allOf[#/components/schemas/Customer]/agreementConsents/items/allOf[#/components/schemas/AgreementConsentRequest]/type [request-property-enum-value-removed].
  • POST webhook:customer-update — removed the enum value LEAD_CARDHOLDER_AGREEMENT of the request property allOf[subschema #2]/data/oneOf[subschema #1: Individual Customer]/allOf[#/components/schemas/Customer]/agreementConsents/items/allOf[#/components/schemas/AgreementConsentRequest]/type [request-property-enum-value-removed].
  • POST webhook:customer-update — removed the enum value LEAD_CARDHOLDER_AGREEMENT of the request property allOf[subschema #2]/data/oneOf[subschema #2: Business Customer]/allOf[#/components/schemas/Customer]/agreementConsents/items/allOf[#/components/schemas/AgreementConsentRequest]/type [request-property-enum-value-removed].

Warnings (52)

Show sample
  • GET /customers — added the new LEAD_ACCOUNTHOLDER_COMMERCIAL_AGREEMENT enum value to the data/items/oneOf[subschema #1: Individual Customer]/allOf[#/components/schemas/Customer]/agreementConsents/items/allOf[#/components/schemas/AgreementConsentRequest]/type response property for the response status 200 [response-property-enum-value-added]. Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead.
  • GET /customers — added the new LEAD_ACCOUNTHOLDER_COMMERCIAL_AGREEMENT enum value to the data/items/oneOf[subschema #2: Business Customer]/allOf[#/components/schemas/Customer]/agreementConsents/items/allOf[#/components/schemas/AgreementConsentRequest]/type response property for the response status 200 [response-property-enum-value-added]. Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead.
  • GET /customers — added the new LEAD_ACCOUNTHOLDER_CONSUMER_AGREEMENT enum value to the data/items/oneOf[subschema #1: Individual Customer]/allOf[#/components/schemas/Customer]/agreementConsents/items/allOf[#/components/schemas/AgreementConsentRequest]/type response property for the response status 200 [response-property-enum-value-added]. Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead.
  • GET /customers — added the new LEAD_ACCOUNTHOLDER_CONSUMER_AGREEMENT enum value to the data/items/oneOf[subschema #2: Business Customer]/allOf[#/components/schemas/Customer]/agreementConsents/items/allOf[#/components/schemas/AgreementConsentRequest]/type response property for the response status 200 [response-property-enum-value-added]. Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead.
  • GET /customers — added the new LEAD_CARDHOLDER_COMMERCIAL_AGREEMENT enum value to the data/items/oneOf[subschema #1: Individual Customer]/allOf[#/components/schemas/Customer]/agreementConsents/items/allOf[#/components/schemas/AgreementConsentRequest]/type response property for the response status 200 [response-property-enum-value-added]. Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead.
  • GET /customers — added the new LEAD_CARDHOLDER_COMMERCIAL_AGREEMENT enum value to the data/items/oneOf[subschema #2: Business Customer]/allOf[#/components/schemas/Customer]/agreementConsents/items/allOf[#/components/schemas/AgreementConsentRequest]/type response property for the response status 200 [response-property-enum-value-added]. Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead.
  • GET /customers — added the new LEAD_CARDHOLDER_CONSUMER_AGREEMENT enum value to the data/items/oneOf[subschema #1: Individual Customer]/allOf[#/components/schemas/Customer]/agreementConsents/items/allOf[#/components/schemas/AgreementConsentRequest]/type response property for the response status 200 [response-property-enum-value-added]. Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead.
  • GET /customers — added the new LEAD_CARDHOLDER_CONSUMER_AGREEMENT enum value to the data/items/oneOf[subschema #2: Business Customer]/allOf[#/components/schemas/Customer]/agreementConsents/items/allOf[#/components/schemas/AgreementConsentRequest]/type response property for the response status 200 [response-property-enum-value-added]. Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead.
  • POST /customers — added the new LEAD_ACCOUNTHOLDER_COMMERCIAL_AGREEMENT enum value to the oneOf[subschema #1: Individual Customer]/allOf[#/components/schemas/Customer]/agreementConsents/items/allOf[#/components/schemas/AgreementConsentRequest]/type response property for the response status 201 [response-property-enum-value-added]. Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead.
  • POST /customers — added the new LEAD_ACCOUNTHOLDER_COMMERCIAL_AGREEMENT enum value to the oneOf[subschema #2: Business Customer]/allOf[#/components/schemas/Customer]/agreementConsents/items/allOf[#/components/schemas/AgreementConsentRequest]/type response property for the response status 201 [response-property-enum-value-added]. Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead.
  • POST /customers — added the new LEAD_ACCOUNTHOLDER_CONSUMER_AGREEMENT enum value to the oneOf[subschema #1: Individual Customer]/allOf[#/components/schemas/Customer]/agreementConsents/items/allOf[#/components/schemas/AgreementConsentRequest]/type response property for the response status 201 [response-property-enum-value-added]. Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead.
  • POST /customers — added the new LEAD_ACCOUNTHOLDER_CONSUMER_AGREEMENT enum value to the oneOf[subschema #2: Business Customer]/allOf[#/components/schemas/Customer]/agreementConsents/items/allOf[#/components/schemas/AgreementConsentRequest]/type response property for the response status 201 [response-property-enum-value-added]. Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead.
  • POST /customers — added the new LEAD_CARDHOLDER_COMMERCIAL_AGREEMENT enum value to the oneOf[subschema #1: Individual Customer]/allOf[#/components/schemas/Customer]/agreementConsents/items/allOf[#/components/schemas/AgreementConsentRequest]/type response property for the response status 201 [response-property-enum-value-added]. Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead.
  • POST /customers — added the new LEAD_CARDHOLDER_COMMERCIAL_AGREEMENT enum value to the oneOf[subschema #2: Business Customer]/allOf[#/components/schemas/Customer]/agreementConsents/items/allOf[#/components/schemas/AgreementConsentRequest]/type response property for the response status 201 [response-property-enum-value-added]. Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead.
  • POST /customers — added the new LEAD_CARDHOLDER_CONSUMER_AGREEMENT enum value to the oneOf[subschema #1: Individual Customer]/allOf[#/components/schemas/Customer]/agreementConsents/items/allOf[#/components/schemas/AgreementConsentRequest]/type response property for the response status 201 [response-property-enum-value-added]. Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead.
  • POST /customers — added the new LEAD_CARDHOLDER_CONSUMER_AGREEMENT enum value to the oneOf[subschema #2: Business Customer]/allOf[#/components/schemas/Customer]/agreementConsents/items/allOf[#/components/schemas/AgreementConsentRequest]/type response property for the response status 201 [response-property-enum-value-added]. Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead.
  • GET /customers/agreements — added the new LEAD_ACCOUNTHOLDER_COMMERCIAL_AGREEMENT enum value to the data/items/type response property for the response status 200 [response-property-enum-value-added]. Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead.
  • GET /customers/agreements — added the new LEAD_ACCOUNTHOLDER_CONSUMER_AGREEMENT enum value to the data/items/type response property for the response status 200 [response-property-enum-value-added]. Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead.
  • GET /customers/agreements — added the new LEAD_CARDHOLDER_COMMERCIAL_AGREEMENT enum value to the data/items/type response property for the response status 200 [response-property-enum-value-added]. Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead.
  • GET /customers/agreements — added the new LEAD_CARDHOLDER_CONSUMER_AGREEMENT enum value to the data/items/type response property for the response status 200 [response-property-enum-value-added]. Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead.
  • DELETE /customers/{customerId} — added the new LEAD_ACCOUNTHOLDER_COMMERCIAL_AGREEMENT enum value to the oneOf[subschema #1: Individual Customer]/allOf[#/components/schemas/Customer]/agreementConsents/items/allOf[#/components/schemas/AgreementConsentRequest]/type response property for the response status 200 [response-property-enum-value-added]. Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead.
  • DELETE /customers/{customerId} — added the new LEAD_ACCOUNTHOLDER_COMMERCIAL_AGREEMENT enum value to the oneOf[subschema #2: Business Customer]/allOf[#/components/schemas/Customer]/agreementConsents/items/allOf[#/components/schemas/AgreementConsentRequest]/type response property for the response status 200 [response-property-enum-value-added]. Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead.
  • DELETE /customers/{customerId} — added the new LEAD_ACCOUNTHOLDER_CONSUMER_AGREEMENT enum value to the oneOf[subschema #1: Individual Customer]/allOf[#/components/schemas/Customer]/agreementConsents/items/allOf[#/components/schemas/AgreementConsentRequest]/type response property for the response status 200 [response-property-enum-value-added]. Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead.
  • DELETE /customers/{customerId} — added the new LEAD_ACCOUNTHOLDER_CONSUMER_AGREEMENT enum value to the oneOf[subschema #2: Business Customer]/allOf[#/components/schemas/Customer]/agreementConsents/items/allOf[#/components/schemas/AgreementConsentRequest]/type response property for the response status 200 [response-property-enum-value-added]. Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead.
  • DELETE /customers/{customerId} — added the new LEAD_CARDHOLDER_COMMERCIAL_AGREEMENT enum value to the oneOf[subschema #1: Individual Customer]/allOf[#/components/schemas/Customer]/agreementConsents/items/allOf[#/components/schemas/AgreementConsentRequest]/type response property for the response status 200 [response-property-enum-value-added]. Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead.
  • …and 27 more warnings.

Detected by oasdiff. Full report: job summary or the oasdiff-report artifact.

Copy link
Copy Markdown

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions

github-actions Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

✱ Stainless preview builds for grid

This PR will update the grid SDKs with the following commit messages.

cli

chore(internal): regenerate SDK with no functional changes

go

feat(api): split AgreementType into consumer/commercial variants

kotlin

feat(api): add consumer/commercial variants to cardholder/accountholder agreement types

openapi

feat(api): add consumer/commercial agreement types, remove agreementConsents maxItems

php

feat(types): add commercial variants, rename to consumer in AgreementType enum

python

fix(types): split agreement_type into consumer/commercial variants

ruby

feat(api): split accountholder/cardholder agreement types into consumer/commercial

typescript

feat(types): split accountholder/cardholder agreement types into consumer/commercial in customers

Edit this comment to update them. They will appear in their respective SDK's changelogs.

✅ grid-typescript studio · code · diff

Your SDK build had at least one "error" diagnostic, but this did not represent a regression.
generate ❗ → build ⏭️ → lint ⏭️ → test ⏭️

✅ grid-openapi studio · code · diff

Your SDK build had at least one "error" diagnostic, but this did not represent a regression.
generate ❗

✅ grid-kotlin studio · code · diff

Your SDK build had at least one "error" diagnostic, but this did not represent a regression.
generate ❗ → build ⏭️ → lint ⏭️ → test ⏭️ (prev: test ❗)

✅ grid-ruby studio · code · diff

Your SDK build had at least one "error" diagnostic, but this did not represent a regression.
generate ❗ → build ⏭️ → lint ⏭️ → test ⏭️

✅ grid-go studio · code · diff

Your SDK build had at least one "error" diagnostic, but this did not represent a regression.
generate ❗ → build ⏭️ → lint ⏭️ → test ⏭️

go get github.com/stainless-sdks/grid-go@9af7f720cc8bd7f899f22f12223d8e5ac5248b15
✅ grid-python studio · code · diff

Your SDK build had at least one "error" diagnostic, but this did not represent a regression.
generate ❗ → build ⏭️ → lint ⏭️ → test ⏭️

✅ grid-php studio · code · diff

Your SDK build had at least one "error" diagnostic, but this did not represent a regression.
generate ❗ → lint ⏭️ → test ⏭️

✅ grid-cli studio · code · diff

Your SDK build had at least one "error" diagnostic, but this did not represent a regression.
generate ❗ → build ⏭️ → lint ⏭️ → test ⏭️


This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push.
If you push custom code to the preview branch, re-run this workflow to update the comment.
Last updated: 2026-09-23 00:46:50 UTC

bsiaotickchong added a commit that referenced this pull request Sep 23, 2026
… cap (#1061)

## Summary

- Splits `LEAD_CARDHOLDER_AGREEMENT` and `LEAD_ACCOUNTHOLDER_AGREEMENT`
into consumer and commercial variants. A consumer and a commercial
customer accept different documents, so a single type cannot identify
which one was accepted.
- Removes the `maxItems: 7` cap on `agreementConsents` in the customer
create and update requests.

## Why the cap goes

It restated a bound the type list already implies, and it silently
became wrong the moment a type was added — as this change demonstrates,
since the list is now nine. A caller reading `maxItems: 7` learns
nothing they could act on.

The constraint that matters is already stated in the field description
and enforced server-side: **at most one entry per type**. That one does
not drift when the enum grows.

## Compatibility

The two replaced values are not yet recorded against any customer, so no
existing consent evidence refers to them.

```
LEAD_ACCOUNTHOLDER_AGREEMENT  →  LEAD_ACCOUNTHOLDER_CONSUMER_AGREEMENT
                                 LEAD_ACCOUNTHOLDER_COMMERCIAL_AGREEMENT
LEAD_CARDHOLDER_AGREEMENT     →  LEAD_CARDHOLDER_CONSUMER_AGREEMENT
                                 LEAD_CARDHOLDER_COMMERCIAL_AGREEMENT
```

## Test plan

- `npm run build:openapi` regenerates both bundles; verified the new
values are present and the replaced ones are gone from `openapi.yaml`
and `mintlify/openapi.yaml`.
- `npm run lint:openapi` exits 0. The only agreement-related output is a
pre-existing informational note about a missing example on
`AgreementConsentRequest.acceptedAt`, untouched by this change.

Original PR: #1053

---------

Co-authored-by: bsiaotickchong <bsiaotickchong@users.noreply.github.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>

This branch was successfully deployed

1 active deployment
staging - mintlify — e4fdcdf8 Deployed Sep 23, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bolt breaking-change Introduces a breaking change to the OpenAPI spec

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants