Add App API customer & object methods#228
Merged
Merged
Conversation
Batch 1 of the App API backfill. Adds twelve read/query methods to APIClient: - getCustomerActivities / getCustomerMessages / getCustomerRelationships / getCustomerSegments / getCustomerSubscriptionPreferences - searchCustomers (POST /customers) and getCustomersAttributes (bulk lookup) - getObjectAttributes / getObjectRelationships / findObjects - listObjectTypes / listActivities Introduces a shared buildQueryString() helper in utils for the pagination and filter query params (start/limit/id_type/etc.) that the rest of the App API list endpoints will reuse. Includes unit tests (100% coverage), live integration coverage, and docs in docs/app.md. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ce Filter (CDP-6265 review) Addresses review feedback on the customers/objects batch: - getObjectAttributes/getObjectRelationships now validate id_type at runtime via a new isObjectIdType guard (object_id | cio_object_id), matching the isIdentifierType checks used for customer id types. Previously an invalid value like 'id' was sent silently. - findObjects no longer types its filter as the audience Filter (which allowed segment conditions the objects API rejects and lacked top-level not). It is typed loosely for now with a doc note; a dedicated ObjectFilter type and top-level not support are tracked as a follow-up. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit d08aec5. Configure here.
sydneycollins-cio
approved these changes
Jul 6, 2026
sydneycollins-cio
approved these changes
Jul 6, 2026
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.

Batch 1 of the App API backfill. Adds twelve read/query methods to APIClient:
getCustomerActivities/getCustomerMessages/getCustomerRelationships/getCustomerSegments/getCustomerSubscriptionPreferencessearchCustomers(POST /customers) andgetCustomersAttributes(bulk lookup)getObjectAttributes/getObjectRelationships/findObjectslistObjectTypes/listActivitiesIntroduces a shared
buildQueryString()helper in utils for the pagination and filter query params (start/limit/id_type/etc.) that the rest of the App API list endpoints will reuse.Note
Low Risk
Additive read-only SDK methods with consistent validation patterns; no changes to sends, auth, or existing method behavior.
Overview
Expands
APIClientwith twelve read/query App API methods (batch 1 of the backfill): person lookups (getCustomerActivities,getCustomerMessages,getCustomerRelationships,getCustomerSegments,getCustomerSubscriptionPreferences), audience search (searchCustomers,getCustomersAttributes), object APIs (getObjectAttributes,getObjectRelationships,findObjects,listObjectTypes), and workspace-widelistActivities.Shared
buildQueryStringandisObjectIdTypeinutilscentralize optional query params and object id validation; new option types (PaginationOptions, etc.) document pagination and filters.findObjectsintentionally types filters asRecord<string, any>until a dedicated object filter type lands.docs/app.mddocuments all new methods. Unit tests intest/api.tsassert URLs, validation, and query serialization;test/integration/live.tsadds live smoke tests plus optionalCIO_TEST_OBJECT_TYPE_ID/CIO_TEST_OBJECT_IDenv vars.Reviewed by Cursor Bugbot for commit d08aec5. Bugbot is set up for automated code reviews on this repo. Configure here.