Skip to content

feat(cli): add customer contact-verification commands#710

Merged
jklein24 merged 1 commit into
mainfrom
07-18-grid-cli-contact-verification
Jul 21, 2026
Merged

feat(cli): add customer contact-verification commands#710
jklein24 merged 1 commit into
mainfrom
07-18-grid-cli-contact-verification

Conversation

@jklein24

Copy link
Copy Markdown
Contributor

Summary

Adds customer contact-verification commands to the Grid CLI — the email/phone verification flow required in some regulatory jurisdictions (e.g. EU). Stacked on the CLI drift-fix PR.

New commands:

  • grid customers verify-email <customerId>POST /customers/{id}/verify-email
  • grid customers confirm-email <customerId> --code <code>POST /customers/{id}/verify-email/confirm
  • grid customers verify-phone <customerId>POST /customers/{id}/verify-phone
  • grid customers confirm-phone <customerId> --code <code>POST /customers/{id}/verify-phone/confirm

Test plan

  • cd cli && npm run build — clean compile.
  • npm test — includes 4 new boundary tests asserting each command's method/path/body (34 tests total with the parent branch).

Original PR: #703

@vercel

vercel Bot commented Jul 19, 2026

Copy link
Copy Markdown

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

2 Skipped Deployments
Project Deployment Actions Updated (UTC)
grid-flow-builder Ignored Ignored Preview Jul 20, 2026 10:16pm
grid-wallet-demo Ignored Ignored Preview Jul 20, 2026 10:16pm

Request Review

@ls-bolt

ls-bolt Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

@greptileai review

@greptile-apps

greptile-apps Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

⚡ \m/ RIFFS OF RIGHTEOUS CODE \m/ ⚡
  ___   ____  ____  ____  ____  __ 
 / _ \ |  _ \|  _ \|  _ \|  _ \ \ \ 
| | | || | | || | | || | | || | | || |
| |_| || |_| || |_| || |_| || |_| || |
 \___/ |____/ |____/ |____/ |____/ /_/
  THE VERIFICATION RECKONING HAS BEGUN

Adds four customer contact-verification CLI commands (verify-email, confirm-email, verify-phone, confirm-phone) that wire directly to the corresponding REST endpoints — required in EU regulatory jurisdictions. The implementation follows the established pattern in customers.ts and is backed by four new boundary tests.

  • verify-email and verify-phone issue a body-less POST; confirm-email and confirm-phone post { code } from --code (a requiredOption), returning a Customer object on success.
  • All four tests assert method and path; the confirm tests additionally assert the body shape, giving good coverage of the new paths.

Confidence Score: 5/5

Safe to merge — four additive commands with no changes to existing logic and matching boundary tests.

The change is purely additive: four new CLI commands that follow the established pattern in the file exactly. Client usage is correct (body-less POSTs for the initiate commands, { code } body for the confirm commands), the requiredOption guard prevents missing-code invocations, and all four paths are tested. No existing commands are touched.

No files require special attention.

Important Files Changed

Filename Overview
cli/src/commands/customers.ts Adds four contact-verification commands following the exact same patterns as existing commands; no logic issues found.
cli/test/customers-verification.test.ts New boundary test file; four tests cover method, path, and body (for confirm commands). Clean and consistent with existing test style.
cli/README.md Adds usage examples for all four new commands and fixes the update example to include the required --type discriminator.

Sequence Diagram

%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
    participant User
    participant CLI
    participant GridAPI

    User->>CLI: grid customers verify-email cust_1
    CLI->>GridAPI: POST /customers/cust_1/verify-email
    GridAPI-->>CLI: 200 OK (void)
    CLI-->>User: output response

    User->>CLI: grid customers confirm-email cust_1 --code 123456
    CLI->>GridAPI: "POST /customers/cust_1/verify-email/confirm {code}"
    GridAPI-->>CLI: 200 OK (Customer)
    CLI-->>User: output response

    User->>CLI: grid customers verify-phone cust_1
    CLI->>GridAPI: POST /customers/cust_1/verify-phone
    GridAPI-->>CLI: 200 OK (void)
    CLI-->>User: output response

    User->>CLI: grid customers confirm-phone cust_1 --code 654321
    CLI->>GridAPI: "POST /customers/cust_1/verify-phone/confirm {code}"
    GridAPI-->>CLI: 200 OK (Customer)
    CLI-->>User: output response
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
    participant User
    participant CLI
    participant GridAPI

    User->>CLI: grid customers verify-email cust_1
    CLI->>GridAPI: POST /customers/cust_1/verify-email
    GridAPI-->>CLI: 200 OK (void)
    CLI-->>User: output response

    User->>CLI: grid customers confirm-email cust_1 --code 123456
    CLI->>GridAPI: "POST /customers/cust_1/verify-email/confirm {code}"
    GridAPI-->>CLI: 200 OK (Customer)
    CLI-->>User: output response

    User->>CLI: grid customers verify-phone cust_1
    CLI->>GridAPI: POST /customers/cust_1/verify-phone
    GridAPI-->>CLI: 200 OK (void)
    CLI-->>User: output response

    User->>CLI: grid customers confirm-phone cust_1 --code 654321
    CLI->>GridAPI: "POST /customers/cust_1/verify-phone/confirm {code}"
    GridAPI-->>CLI: 200 OK (Customer)
    CLI-->>User: output response
Loading

Reviews (3): Last reviewed commit: "feat(cli): add customer contact-verifica..." | Re-trigger Greptile

@ls-bolt
ls-bolt Bot force-pushed the 07-18-grid-cli-contact-verification branch from 876fe21 to daec001 Compare July 19, 2026 18:46
@ls-bolt
ls-bolt Bot force-pushed the 07-18-grid-cli-drift-fixes branch from 0364499 to 5e3d38f Compare July 19, 2026 18:46
@ls-bolt

ls-bolt Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

@greptileai review

@jklein24
jklein24 marked this pull request as ready for review July 20, 2026 21:50
@jklein24
jklein24 requested review from pengying and shreyav July 20, 2026 21:50
@jklein24
jklein24 changed the base branch from 07-18-grid-cli-drift-fixes to graphite-base/710 July 20, 2026 22:15
@jklein24
jklein24 force-pushed the 07-18-grid-cli-contact-verification branch from daec001 to 7deef2d Compare July 20, 2026 22:15
@jklein24
jklein24 force-pushed the graphite-base/710 branch from 5e3d38f to 21e79e4 Compare July 20, 2026 22:15
@graphite-app
graphite-app Bot changed the base branch from graphite-base/710 to main July 20, 2026 22:16
@ls-bolt

ls-bolt Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

📌 Bolt Status

2026-07-20 22:16:15 UTC — ⚡ Agent locked-bulwark-4(#4) started
2026-07-20 22:40:03 UTC⚠️ Failed to start agent: timeout of 30000ms exceeded

@jklein24
jklein24 force-pushed the 07-18-grid-cli-contact-verification branch from 7deef2d to 94287e3 Compare July 20, 2026 22:16
@jklein24
jklein24 enabled auto-merge (squash) July 20, 2026 22:25

Copy link
Copy Markdown
Contributor Author

Merge activity

  • Jul 20, 10:39 PM UTC: Graphite couldn't merge this PR because it failed for an unknown reason (GitHub is reporting that this PR is not mergeable, despite passing required status checks defined by your branch protection rules. Please check your rulesets for additional blocking criteria. Graphite Merge Queue does not currently support rulesets. Please contact Graphite support for further assistance.).

@jklein24
jklein24 merged commit 334578f into main Jul 21, 2026
8 checks passed
@jklein24
jklein24 deleted the 07-18-grid-cli-contact-verification branch July 21, 2026 23:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants