Skip to content

docs: Sync documentation with new account types#283

Open
claude[bot] wants to merge 1 commit intomainfrom
docs/sync-20260320
Open

docs: Sync documentation with new account types#283
claude[bot] wants to merge 1 commit intomainfrom
docs/sync-20260320

Conversation

@claude
Copy link
Contributor

@claude claude bot commented Mar 20, 2026

Summary

  • Add BWP_ACCOUNT (Botswana Pula) support - mobile money
  • Add XAF_ACCOUNT (Central African CFA Franc) support - mobile money with region field
  • Add AED_ACCOUNT (UAE Dirham) support - IBAN-based bank transfer
  • Add region field to XOF_ACCOUNT (required for West African CFA Franc)

Changes by Area

Grid Visualizer (components/grid-visualizer/src/data/)

  • account-types.ts: Added BWP_ACCOUNT, XAF_ACCOUNT, AED_ACCOUNT specs; added region field to XOF_ACCOUNT
  • currencies.ts: Added BWP, XAF, AED currency entries with account types and example persons

Mintlify Docs (mintlify/snippets/)

  • external-accounts.mdx: Added tabs for West Africa (XOF), Central Africa (XAF), Botswana (BWP), and UAE (AED) with code examples and validation patterns

Related OpenAPI Changes

Test plan

  • Verify Grid Visualizer builds successfully
  • Verify new currencies appear in Grid Visualizer currency selector
  • Verify generated API calls include correct field structure for new account types
  • Verify Mintlify docs render new tabs correctly

🤖 Generated with Claude Code

Add support for BWP, XAF, and AED account types and update XOF
to include required region field, matching OpenAPI schema changes.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Mar 20, 2026

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

Project Deployment Actions Updated (UTC)
grid-flow-builder Ready Ready Preview, Comment Mar 20, 2026 8:19am

Request Review

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Mar 20, 2026

Greptile Summary

This PR syncs documentation with four new account types (BWP_ACCOUNT, XAF_ACCOUNT, AED_ACCOUNT) and adds a required region field to the existing XOF_ACCOUNT. Changes span the Grid Visualizer data layer and the Mintlify docs snippet for external accounts.

  • account-types.ts: Added BWP_ACCOUNT (mobile money, Botswana), XAF_ACCOUNT (mobile money + region, Central Africa), and AED_ACCOUNT (IBAN bank transfer, UAE); region field added to XOF_ACCOUNT.
  • currencies.ts: Added corresponding BWP, XAF, and AED currency entries with realistic example persons, correct country codes, and proper rail labels.
  • external-accounts.mdx: Added four new tabs (West Africa/XOF, Central Africa/XAF, Botswana/BWP, UAE/AED) with complete cURL examples, <Note> callouts, and JavaScript validation snippets — all following established doc patterns.
  • Minor inconsistency: The BWP <Note> documents the phone format as +267XXXXXXXX (8 digits), but the validation regex uses \+267\d{7,8} (7 or 8 digits). One of the two should be updated to match the actual accepted format.

Confidence Score: 4/5

  • Safe to merge after resolving the minor BWP phone number format inconsistency between the Note and the validation regex.
  • The changes are purely additive documentation/data updates that follow established patterns closely. The only issue is a low-severity discrepancy between a Note's stated format (+267XXXXXXXX, 8 digits) and the regex validator (\d{7,8}, 7–8 digits) for Botswana phone numbers. No runtime logic, API behaviour, or existing functionality is affected.
  • mintlify/snippets/external-accounts.mdx — phone number format inconsistency at line 750 (BWP regex vs. Note text)

Important Files Changed

Filename Overview
components/grid-visualizer/src/data/account-types.ts Added BWP_ACCOUNT, XAF_ACCOUNT, AED_ACCOUNT specs and region field to XOF_ACCOUNT; all fields, payment rails, and examples are internally consistent and follow existing patterns.
components/grid-visualizer/src/data/currencies.ts Added BWP, XAF, and AED currency entries; all entries follow existing patterns with correct country codes, account types, rails labels, and example persons.
mintlify/snippets/external-accounts.mdx Added four new tabs (XOF, XAF, BWP, UAE) with cURL examples and validation snippets; one inconsistency between the BWP Note format (+267XXXXXXXX, 8 digits) and the validation regex (\d{7,8}, 7 or 8 digits).

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[POST /customers/external-accounts] --> B{currency}

    B -->|XOF| C[XOF_ACCOUNT\nphoneNumber + provider + region]
    B -->|XAF| D[XAF_ACCOUNT\nphoneNumber + provider + region]
    B -->|BWP| E[BWP_ACCOUNT\nphoneNumber + provider]
    B -->|AED| F[AED_ACCOUNT\niban + swiftCode optional]

    C --> G{region valid?\nBJ, CI, SN, TG}
    D --> H{region valid?\nCM, CG}
    E --> I{phoneNumber valid?\n+267 + 7-8 digits}
    F --> J{IBAN valid?\nAE + 21 digits}

    G -->|yes| K[MOBILE_MONEY rail]
    H -->|yes| K
    I -->|yes| K
    J -->|yes| L[BANK_TRANSFER rail]

    G -->|no| M[Error: Invalid XOF region]
    H -->|no| N[Error: Invalid XAF region]
    I -->|no| O[Error: Invalid Botswana phone]
    J -->|no| P[Error: Invalid UAE IBAN]

    K --> Q[beneficiary required]
    L --> Q
Loading
Prompt To Fix All With AI
This is a comment left during a code review.
Path: mintlify/snippets/external-accounts.mdx
Line: 750

Comment:
**Botswana phone number format inconsistency between Note and regex**

The `Note` for the Botswana tab states the format is `+267XXXXXXXX` (implying exactly 8 digits after the country code), but the validation regex on line 750 is `\+267\d{7,8}` — which allows **7 or 8** digits. These two pieces of documentation contradict each other, which could confuse developers about the actual accepted format.

Botswana mobile numbers are 8 digits after the country code (`+267`), so the regex should be tightened to match the `Note`, or the `Note` should be updated to reflect both lengths:

```suggestion
if (!/^\+267\d{8}$/.test(bwpPhoneNumber)) {
```

If 7-digit numbers are genuinely valid (e.g. fixed-line numbers), the `Note` should be updated to reflect that:

```
Phone number must be in format `+267XXXXXXX` (7 digits) or `+267XXXXXXXX` (8 digits).
```

How can I resolve this? If you propose a fix, please make it concise.

Last reviewed commit: "docs: Sync documenta..."

if (!/^\+250\d{9}$/.test(rwfPhoneNumber)) {
throw new Error("Invalid Rwandan phone number");
}
if (!/^\+267\d{7,8}$/.test(bwpPhoneNumber)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

P2 Botswana phone number format inconsistency between Note and regex

The Note for the Botswana tab states the format is +267XXXXXXXX (implying exactly 8 digits after the country code), but the validation regex on line 750 is \+267\d{7,8} — which allows 7 or 8 digits. These two pieces of documentation contradict each other, which could confuse developers about the actual accepted format.

Botswana mobile numbers are 8 digits after the country code (+267), so the regex should be tightened to match the Note, or the Note should be updated to reflect both lengths:

Suggested change
if (!/^\+267\d{7,8}$/.test(bwpPhoneNumber)) {
if (!/^\+267\d{8}$/.test(bwpPhoneNumber)) {

If 7-digit numbers are genuinely valid (e.g. fixed-line numbers), the Note should be updated to reflect that:

Phone number must be in format `+267XXXXXXX` (7 digits) or `+267XXXXXXXX` (8 digits).
Prompt To Fix With AI
This is a comment left during a code review.
Path: mintlify/snippets/external-accounts.mdx
Line: 750

Comment:
**Botswana phone number format inconsistency between Note and regex**

The `Note` for the Botswana tab states the format is `+267XXXXXXXX` (implying exactly 8 digits after the country code), but the validation regex on line 750 is `\+267\d{7,8}` — which allows **7 or 8** digits. These two pieces of documentation contradict each other, which could confuse developers about the actual accepted format.

Botswana mobile numbers are 8 digits after the country code (`+267`), so the regex should be tightened to match the `Note`, or the `Note` should be updated to reflect both lengths:

```suggestion
if (!/^\+267\d{8}$/.test(bwpPhoneNumber)) {
```

If 7-digit numbers are genuinely valid (e.g. fixed-line numbers), the `Note` should be updated to reflect that:

```
Phone number must be in format `+267XXXXXXX` (7 digits) or `+267XXXXXXXX` (8 digits).
```

How can I resolve this? If you propose a fix, please make it concise.

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.

0 participants