Conversation
Adds an `upsert` method on the Contacts client as a semantic alias for `create` — both hit POST /contacts, which is already an upsert by email on the backend. The dedicated name makes it discoverable for signup flows where callers don't have a contact ID yet.
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, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 15af3d3. Configure here.
| */ | ||
| async upsert(options: ContactCreateOptions): Promise<Contact> { | ||
| return this.create(options); | ||
| } |
There was a problem hiding this comment.
Upsert method is identical to create, missing upsert behavior
High Severity
The upsert method is documented to "create or update a contact by email" if one already exists, but its implementation just delegates to this.create(options), which POSTs to /contacts — the exact same behavior as create. Since the codebase has a separate update method that PUTs to /contacts/{id}, the POST endpoint likely doesn't perform upsert logic. Users relying on upsert in signup flows would likely get duplicate-key errors for existing contacts instead of the documented update behavior.
Reviewed by Cursor Bugbot for commit 15af3d3. Configure here.


adding our new groups functionality that allows you to assign users to "groups", this is awesome for multi-tenant workspaces or "teams" to get insights at the "workspace" level
Note
Medium Risk
Introduces a new public SDK surface area and new endpoint wiring (including contact membership paths), which could cause breaking behavior if API paths/types are wrong; changes are otherwise additive and well-tested.
Overview
Adds a new
GroupsAPI client (smashsend.groups) with methods tocreate,list,get,update, anddeletegroups, plus endpoints toaddContact,removeContact, andlistContacts.Exports new group-related TypeScript interfaces from
index.tsand adds comprehensive Jest coverage for all group methods using a mockedHttpClient.Also adds
contacts.upsert()as a documented alias ofcontacts.create()for create-or-update-by-email flows.Reviewed by Cursor Bugbot for commit 15af3d3. Bugbot is set up for automated code reviews on this repo. Configure here.