feat(lfp): gmc lfp (Merchant API lfp/v1) — completes 11/11 sub-APIs#97
Merged
Conversation
Adds the lfp/v1 Local Feeds Partnership sub-API, the 11th and final Merchant API sub-API. Provider-side: the scoped account is the LFP provider and each resource names a targetAccount (the merchant). New LfpService: lfpStores list/get/insert/delete, lfpInventories insert, lfpSales insert, lfpMerchantStates get. CLI gmc lfp stores|inventory| sales|state with convenience flags or --file. Adds the lfp rate-limit bucket and OAuth-scope wiring. Resource shapes, the :insert colon-verb paths, the per-merchant targetAccount (a bare int64 id), and the required targetAccount list filter were verified against the lfp_v1 discovery document.
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 the
lfp/v1Local Feeds Partnership sub-API — the 11th and final Merchant API sub-API gmc covers (11/11).Provider-side API: the scoped account (
--account/profile) is the LFP provider; each resource names atargetAccount— the merchant's numeric Merchant Center id — that the data is submitted for. This is the one sub-API where the scoped account isn't the merchant.Commands
gmc lfp stores list --target-account <m> | get <id> | insert | delete <id>gmc lfp inventory insert(upsert)gmc lfp sales insertgmc lfp state get <merchant>(onboarding diagnostics)Inserts take convenience flags (
--target-account,--store-code,--offer-id,--price/--currency,--quantity, …) or a full--filebody.Implementation
LfpServicein@gmc-cli/api+ new-sub-API plumbing (thelfprate-limit bucket, OAuth scopes, SubApi lists in api + auth).:insertcolon-verb paths, the bare-int64targetAccount, and the requiredtargetAccountlist filter verified against thelfp_v1discovery document.LFP calls require an approved LFP-provider account, so this can't be verified against a live merchant account — the discovery doc is the sole ground truth. The 3-agent review weighted the API-correctness pass accordingly and caught a critical + a high (both fixed):
targetAccountis a bare id (notaccounts/{id}), andstores listrequires atargetAccountquery filter. Also switched the inventory/sale input types to explicitPick<>allowlists and tightened--target-accountvalidation.Tests
+21 (api 154, cli 295; 640 total). format/lint/typecheck/docs all clean. Patch bump (api + cli) → v1.0.14.