docs: Sync documentation with new account types#283
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile SummaryThis PR syncs documentation with four new account types (
Confidence Score: 4/5
|
| 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
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)) { |
There was a problem hiding this 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:
| 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.
Summary
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_ACCOUNTcurrencies.ts: Added BWP, XAF, AED currency entries with account types and example personsMintlify 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 patternsRelated OpenAPI Changes
3de05db- chore: Sync account schemas (chore: Sync account schemas #276)a205da8- Move counterparty information to the top-level of the quotes response (Move counterparty information to the top-level of the quotes response #281)Test plan
🤖 Generated with Claude Code