Skip to content

chore: Sync account schemas#301

Open
lightspark-copybara[bot] wants to merge 1 commit intomainfrom
auto/sync-grid-schemas-20260326-223005
Open

chore: Sync account schemas#301
lightspark-copybara[bot] wants to merge 1 commit intomainfrom
auto/sync-grid-schemas-20260326-223005

Conversation

@lightspark-copybara
Copy link
Copy Markdown
Contributor

Auto-synced account schemas.

These schemas are generated from VASP adapter field definitions in sparkcore.

Synced schemas:

  • common/ — per-currency account info, beneficiary, and payment account schemas
  • common/PaymentInstructions.yaml — payment instructions oneOf (new currencies added)
  • external_accounts/ — per-currency external account schemas (reference common/)

Please review the changes before merging.

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 26, 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 26, 2026 10:30pm

Request Review

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 26, 2026

Greptile Summary

This auto-synced PR expands the Grid API schema coverage for 8 new fiat currencies (BDT, COP, EGP, GHS, GTQ, HTG, JMD, PKR) by adding account info, beneficiary, payment account info, and external account info YAML schemas, and wiring them into the PaymentInstructions and ExternalAccountInfoOneOf discriminator registries. It also removes the registrationNumber optional field from ~20 existing beneficiary schemas, relaxes birthDate and nationality as required fields in UsdBeneficiary, and adds BANK_TRANSFER as a supported rail for USD accounts.\n\nKey changes:\n- 8 new *AccountInfo.yaml schemas (BDT, COP, EGP, GHS, GTQ, HTG, JMD, PKR) with payment rail, account number, and optional IBAN/SWIFT/branch constraints\n- 8 new *Beneficiary.yaml schemas following the standard Individual Beneficiary oneOf pattern\n- 8 new Payment*AccountInfo.yaml and *ExternalAccountInfo.yaml schemas composing the above via allOf\n- PaymentInstructions.yaml and ExternalAccountInfoOneOf.yaml updated with all new discriminator entries\n- registrationNumber removed from ~20 existing beneficiary schemas — intentional upstream sync\n- ⚠️ ExternalAccountInfoOneOf.yaml gains an undocumented LIGHTNING_ACCOUNT discriminator alias alongside the new currency entries — not present in the oneOf list; needs confirmation it is intentional\n- EgpAccountInfo.yaml and PkrAccountInfo.yaml use a German IBAN (DE89370400440532013000) as the iban example — should use country-appropriate examples

Confidence Score: 4/5

Safe to merge after confirming the LIGHTNING_ACCOUNT alias addition is intentional; all other changes are well-structured schema additions and backwards-compatible relaxations.

The bulk of the PR is a clean, consistent expansion of 8 new currency schemas that follow established patterns exactly. The only meaningful question mark is the unexplained LIGHTNING_ACCOUNT discriminator alias in ExternalAccountInfoOneOf.yaml — if confirmed intentional, the PR is ready to merge. The IBAN example issues are cosmetic P2s. The registrationNumber removal is a deliberate upstream sync.

openapi/components/schemas/external_accounts/ExternalAccountInfoOneOf.yaml — verify the LIGHTNING_ACCOUNT mapping addition is intentional

Important Files Changed

Filename Overview
openapi/components/schemas/external_accounts/ExternalAccountInfoOneOf.yaml Adds 8 new currency account types to the oneOf list and discriminator mapping; also adds a LIGHTNING_ACCOUNT alias mapping that has no matching oneOf entry and no clear explanation — needs confirmation this is intentional.
openapi/components/schemas/common/PaymentInstructions.yaml Cleanly adds 8 new payment account types (BDT, COP, EGP, GHS, GTQ, HTG, JMD, PKR) to both the oneOf list and discriminator mapping — consistent with existing pattern.
openapi/components/schemas/common/EgpAccountInfo.yaml New EGP account schema with correct validation patterns; minor issue: IBAN example uses a German (DE) IBAN instead of an Egyptian (EG) one.
openapi/components/schemas/common/PkrAccountInfo.yaml New PKR account schema with correct validation patterns; minor issue: IBAN example uses a German (DE) IBAN instead of a Pakistani (PK) one.
openapi/components/schemas/common/UsdBeneficiary.yaml Removes birthDate and nationality from required fields (now optional) and removes the optional registrationNumber property — both are backwards-compatible relaxations.
openapi/components/schemas/common/UsdAccountInfo.yaml Adds BANK_TRANSFER as a new supported payment rail enum value for USD accounts — backwards-compatible addition.
openapi/components/schemas/common/BdtAccountInfo.yaml New BDT account schema with BANK_TRANSFER/MOBILE_MONEY rails, accountNumber, branchCode, optional swiftCode, and required phoneNumber — well-structured with appropriate constraints.
openapi/components/schemas/external_accounts/BdtExternalAccountInfo.yaml New BDT external account schema composing BaseExternalAccountInfo + BdtAccountInfo with an INDIVIDUAL/BUSINESS beneficiary discriminator — follows established pattern correctly.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[New Currency<br/>AccountInfo YAML] --> B[PaymentXxxAccountInfo<br/>allOf: Base + AccountInfo + reference]
    A --> C[XxxExternalAccountInfo<br/>allOf: Base + AccountInfo + beneficiary oneOf]
    B --> D[PaymentInstructions.yaml<br/>oneOf + discriminator mapping]
    C --> E[ExternalAccountInfoOneOf.yaml<br/>oneOf + discriminator mapping]
    F[New Beneficiary YAML<br/>BDT/COP/EGP/GHS/GTQ/HTG/JMD/PKR] --> C
    G[Existing Beneficiaries<br/>~20 currencies] -->|removed registrationNumber| H[Updated Beneficiary Schemas]
    I[UsdBeneficiary] -->|birthDate + nationality no longer required| H
    J[UsdAccountInfo] -->|added BANK_TRANSFER rail| K[Updated AccountInfo]
    E -->|Warning: Unexpected addition| L[LIGHTNING_ACCOUNT alias<br/>to LightningExternalAccountInfo]
Loading

Comments Outside Diff (1)

  1. openapi/components/schemas/common/EgpAccountInfo.yaml, line 253 (link)

    P2 German IBAN example used for an Egyptian account

    The iban field uses DE89370400440532013000 as an example value, which is a well-known German IBAN. For an Egyptian Pound (EGP) account, the example should use an Egyptian IBAN (starts with EG), e.g. EG380019000500000000263180002.

    The same issue exists in PkrAccountInfo.yaml where DE89370400440532013000 is used as an example for a Pakistani account — it should start with PK, e.g. PK36SCBL0000001123456702.

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: openapi/components/schemas/common/EgpAccountInfo.yaml
    Line: 253
    
    Comment:
    **German IBAN example used for an Egyptian account**
    
    The `iban` field uses `DE89370400440532013000` as an example value, which is a well-known German IBAN. For an Egyptian Pound (`EGP`) account, the example should use an Egyptian IBAN (starts with `EG`), e.g. `EG380019000500000000263180002`.
    
    
    
    The same issue exists in `PkrAccountInfo.yaml` where `DE89370400440532013000` is used as an example for a Pakistani account — it should start with `PK`, e.g. `PK36SCBL0000001123456702`.
    
    How can I resolve this? If you propose a fix, please make it concise.
Prompt To Fix All With AI
This is a comment left during a code review.
Path: openapi/components/schemas/external_accounts/ExternalAccountInfoOneOf.yaml
Line: 88

Comment:
**Unexpected `LIGHTNING_ACCOUNT` mapping added**

A new discriminator mapping entry `LIGHTNING_ACCOUNT: ./LightningExternalAccountInfo.yaml` was added alongside the new currency entries, but it doesn't follow the same pattern as every other new entry in this PR:

- Every new currency (BDT, COP, EGP, GHS, GTQ, HTG, JMD, PKR) gets both a new `$ref` in the `oneOf` list **and** a new discriminator `mapping` entry.
- `LIGHTNING_ACCOUNT` only gets a mapping entry — there is no new `$ref` added to the `oneOf` list.

`LIGHTNING` is already mapped at line 72 (`LIGHTNING: ./LightningExternalAccountInfo.yaml`). This new entry effectively creates an alias so that `accountType: "LIGHTNING_ACCOUNT"` resolves to the same schema as `accountType: "LIGHTNING"`.

Is this intentional (e.g., to support a renamed discriminator value for backward compatibility), or was it accidentally included alongside the new currencies?

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

---

This is a comment left during a code review.
Path: openapi/components/schemas/common/EgpAccountInfo.yaml
Line: 253

Comment:
**German IBAN example used for an Egyptian account**

The `iban` field uses `DE89370400440532013000` as an example value, which is a well-known German IBAN. For an Egyptian Pound (`EGP`) account, the example should use an Egyptian IBAN (starts with `EG`), e.g. `EG380019000500000000263180002`.

```suggestion
    example: EG380019000500000000263180002
```

The same issue exists in `PkrAccountInfo.yaml` where `DE89370400440532013000` is used as an example for a Pakistani account — it should start with `PK`, e.g. `PK36SCBL0000001123456702`.

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

---

This is a comment left during a code review.
Path: openapi/components/schemas/common/PkrAccountInfo.yaml
Line: 37

Comment:
**German IBAN example used for a Pakistani account**

The `iban` field uses `DE89370400440532013000` as an example, which is a German IBAN. A Pakistani IBAN starts with `PK`, e.g. `PK36SCBL0000001123456702`.

```suggestion
    example: PK36SCBL0000001123456702
```

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

Reviews (1): Last reviewed commit: "chore: Sync account schemas" | Re-trigger Greptile

GTQ_ACCOUNT: ./GtqExternalAccountInfo.yaml
HTG_ACCOUNT: ./HtgExternalAccountInfo.yaml
JMD_ACCOUNT: ./JmdExternalAccountInfo.yaml
LIGHTNING_ACCOUNT: ./LightningExternalAccountInfo.yaml
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.

P1 Unexpected LIGHTNING_ACCOUNT mapping added

A new discriminator mapping entry LIGHTNING_ACCOUNT: ./LightningExternalAccountInfo.yaml was added alongside the new currency entries, but it doesn't follow the same pattern as every other new entry in this PR:

  • Every new currency (BDT, COP, EGP, GHS, GTQ, HTG, JMD, PKR) gets both a new $ref in the oneOf list and a new discriminator mapping entry.
  • LIGHTNING_ACCOUNT only gets a mapping entry — there is no new $ref added to the oneOf list.

LIGHTNING is already mapped at line 72 (LIGHTNING: ./LightningExternalAccountInfo.yaml). This new entry effectively creates an alias so that accountType: "LIGHTNING_ACCOUNT" resolves to the same schema as accountType: "LIGHTNING".

Is this intentional (e.g., to support a renamed discriminator value for backward compatibility), or was it accidentally included alongside the new currencies?

Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/external_accounts/ExternalAccountInfoOneOf.yaml
Line: 88

Comment:
**Unexpected `LIGHTNING_ACCOUNT` mapping added**

A new discriminator mapping entry `LIGHTNING_ACCOUNT: ./LightningExternalAccountInfo.yaml` was added alongside the new currency entries, but it doesn't follow the same pattern as every other new entry in this PR:

- Every new currency (BDT, COP, EGP, GHS, GTQ, HTG, JMD, PKR) gets both a new `$ref` in the `oneOf` list **and** a new discriminator `mapping` entry.
- `LIGHTNING_ACCOUNT` only gets a mapping entry — there is no new `$ref` added to the `oneOf` list.

`LIGHTNING` is already mapped at line 72 (`LIGHTNING: ./LightningExternalAccountInfo.yaml`). This new entry effectively creates an alias so that `accountType: "LIGHTNING_ACCOUNT"` resolves to the same schema as `accountType: "LIGHTNING"`.

Is this intentional (e.g., to support a renamed discriminator value for backward compatibility), or was it accidentally included alongside the new currencies?

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

example: '+1234567890'
minLength: 7
maxLength: 15
pattern: ^\+[0-9]{6,14}$
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.

P2 German IBAN example used for a Pakistani account

The iban field uses DE89370400440532013000 as an example, which is a German IBAN. A Pakistani IBAN starts with PK, e.g. PK36SCBL0000001123456702.

Suggested change
pattern: ^\+[0-9]{6,14}$
example: PK36SCBL0000001123456702
Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/common/PkrAccountInfo.yaml
Line: 37

Comment:
**German IBAN example used for a Pakistani account**

The `iban` field uses `DE89370400440532013000` as an example, which is a German IBAN. A Pakistani IBAN starts with `PK`, e.g. `PK36SCBL0000001123456702`.

```suggestion
    example: PK36SCBL0000001123456702
```

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