feat(accounts): developer-registration commands + doctor registration hint#92
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
gmc accounts developer-registration(register/get/unregister) for the Merchant APIaccounts/v1developerRegistrationresource — 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 account401 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/api—AccountsService.registerGcp/unregisterGcp/getDeveloperRegistration, plus theDeveloperRegistrationtype. Field names and RPC paths (gcpIds,developerEmail,:registerGcp/:unregisterGcp) verified against theaccounts_v1discovery document.gmc doctor— recognizes the "not registered" 401 and points atgmc accounts developer-registration registerinstead of suggesting re-authentication (the token is fine — the project just isn't registered).registertakes an optional--developer-email(defaults to the authenticated principal);unregisteris gated behind--yes.accounts.md,doctor.md, and a smallissues.mdexample-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,
--yesgate, JSON output). Full suite green: api 138, cli 265.format:check,lint,typecheckall clean.Patch bump (api + cli) → v1.0.12.