Skip to content

feat(gbp): capture owner-set Business Profile attributes (any category)#731

Merged
arberx merged 1 commit into
mainfrom
feat/gbp-attributes
Jun 22, 2026
Merged

feat(gbp): capture owner-set Business Profile attributes (any category)#731
arberx merged 1 commit into
mainfrom
feat/gbp-attributes

Conversation

@arberx

@arberx arberx commented Jun 22, 2026

Copy link
Copy Markdown
Member

What

A generic owner-attributes capture pipeline, alongside the existing hotels-only lodging surface. Every gbp sync now calls the Business Information API's getAttributes for each selected location and snapshots the result on change.

Why

The Lodging API only covers hotels and is commonly empty even for complete ones (the "Hotel details" panel is a separate surface). getAttributes works for any business category and returns only the attributes the owner has set, so attributeCount is a reliable owner-readable completeness signal, not a verify-nudge. Live recon confirmed real data: a roofing contractor exposes has_onsite_services / offers_online_estimates / is_owned_by_women / social URLs; a hotel exposes welcomes_lgbtq / url_instagram.

Changes

  • integration: attributes-client (getAttributes / countAttributes / hashAttributes), built + tested from real captured API responses; flattens the BOOL/ENUM/URL/REPEATED_ENUM value carriers into {values, uris}; returns [] on 404; no readMask, no pagination
  • db: gbp_attributes_snapshots table + migration v82 (snapshot-on-change, mirrors gbp_lodging_snapshots)
  • gbp-sync: fetch in the per-location batch + snapshot-on-change write (insert when changed, else re-stamp syncedAt)
  • read surface: GET /projects/:name/gbp/attributes, cnry gbp attributes, MCP canonry_gbp_attributes, contracts DTO; regenerated @ainyc/canonry-api-client
  • docs: data-model, integration + root AGENTS.md (tool count 114), GBP skill reference

Tests

  • client: normalizes the real BOOL+URL response, flattens REPEATED_ENUM/ENUM, [] on no-attributes / 404, rethrows non-404, asserts the host+path
  • gbp-sync: first-sync writes a snapshot with count + content, unchanged re-stamps (no duplicate), changed appends
  • bumped the MCP tool-count (114/77), toolkit-count (gbp 13), stdio (116), and DB↔DTO coverage assertions

Minor bump to 4.93.0.

🤖 Generated with Claude Code

Adds a generic owner-attributes capture pipeline alongside the hotels-only
lodging surface. Every gbp-sync now calls the Business Information API's
getAttributes for each selected location and snapshots the result on change.

Unlike the Lodging API, getAttributes works for any business category and
returns ONLY the attributes the owner has set (amenities, service options,
accessibility, identity tags, social URLs), so attributeCount is a reliable
owner-readable completeness signal.

- integration: attributes-client (getAttributes/countAttributes/hashAttributes),
  built + tested from real captured API responses; flattens BOOL/ENUM/URL/
  REPEATED_ENUM carriers into {values, uris}
- db: gbp_attributes_snapshots table + migration v82
- gbp-sync: fetch + snapshot-on-change (mirrors lodging)
- read surface: GET /gbp/attributes, cnry gbp attributes, MCP
  canonry_gbp_attributes, contracts DTO; regenerated SDK
- docs: data-model, integration + root AGENTS.md, GBP skill reference

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@arberx arberx force-pushed the feat/gbp-attributes branch from bdfc5bd to f29536a Compare June 22, 2026 00:20
@arberx arberx merged commit f164516 into main Jun 22, 2026
12 checks passed
@arberx arberx deleted the feat/gbp-attributes branch June 22, 2026 00:24
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