Skip to content

feat(accounts): developer-registration commands + doctor registration hint#92

Merged
yasserstudio merged 1 commit into
mainfrom
feat/developer-registration
Jun 14, 2026
Merged

feat(accounts): developer-registration commands + doctor registration hint#92
yasserstudio merged 1 commit into
mainfrom
feat/developer-registration

Conversation

@yasserstudio

Copy link
Copy Markdown
Owner

What

Adds gmc accounts developer-registration (register / get / unregister) for the Merchant API accounts/v1 developerRegistration resource — the one-time step that registers the calling Cloud project with a Merchant Center account.

Until a project is registered, the API returns a GCP project … is not registered with the merchant account 401 even though the access token is perfectly valid. Previously gmc had no command for this, so first-run setup required a raw API call.

Changes

  • @gmc-cli/apiAccountsService.registerGcp / unregisterGcp / getDeveloperRegistration, plus the DeveloperRegistration type. Field names and RPC paths (gcpIds, developerEmail, :registerGcp / :unregisterGcp) verified against the accounts_v1 discovery document.
  • gmc doctor — recognizes the "not registered" 401 and points at gmc accounts developer-registration register instead of suggesting re-authentication (the token is fine — the project just isn't registered).
  • CLI — new command group. register takes an optional --developer-email (defaults to the authenticated principal); unregister is gated behind --yes.
  • Docsaccounts.md, doctor.md, and a small issues.md example-output correction ([DISAPPROVED][ERROR], matching the real API value).

Tests

New API tests (path/method/body for all three RPCs) and CLI tests (flag plumbing, --yes gate, JSON output). Full suite green: api 138, cli 265. format:check, lint, typecheck all clean.

Patch bump (api + cli) → v1.0.12.

…stration hint

Add `gmc accounts developer-registration` (register / get / unregister)
for the Merchant API accounts/v1 developerRegistration resource — the
one-time step that registers the calling Cloud project with a Merchant
Center account. Until it is done the API returns a "GCP project is not
registered with the merchant account" 401 even though the token is valid;
gmc previously had no command for it, so the fix required a raw API call.

gmc doctor now recognizes that not-registered 401 and points at the new
register command instead of suggesting re-authentication.

register accepts an optional --developer-email; unregister requires --yes.
Field names and RPC paths verified against the accounts_v1 discovery doc.
@yasserstudio yasserstudio merged commit a454a48 into main Jun 14, 2026
7 checks passed
@yasserstudio yasserstudio deleted the feat/developer-registration branch June 14, 2026 17:10
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.

1 participant