Skip to content

feat: add items accessors to synonym sets and curation sets - #156

Merged
haydenhoang merged 2 commits into
typesense:masterfrom
tharropoulos:feat/set-items-accessor
Nov 10, 2026
Merged

haydenhoang merged 2 commits into
typesense:masterfrom
tharropoulos:feat/set-items-accessor

Conversation

@tharropoulos

Copy link
Copy Markdown
Collaborator
  • add SynonymSetItems and SynonymSetItem (sync and async) to support synonym_sets[name].items[id].retrieve(), .upsert() and .delete(), matching the docs snippets that currently raise AttributeError
  • add CurationSetItems and CurationSetItem (sync and async) with the same shape for curation_sets[name].items[id]
  • expose items.retrieve(limit=, offset=) for listing and items.upsert(id, item) as a shortcut for upserting by id
  • split SynonymItemUpsertSchema and CurationItemCreateSchema out as the body types without id, since the item endpoint takes the id from the path and mypy rejected the docs snippet
  • keep SynonymItemSchema and CurationItemUpsertSchema unchanged by making them subclasses that add id
  • route list_items, get_item, upsert_item and delete_item through the new accessor and widen upsert_item to accept bodies with or without id
  • add sync and async tests for the accessor paths and for the existing flat methods in tests/synonym_set_items_test.py and tests/curation_set_test.py

@haydenhoang

Copy link
Copy Markdown
Collaborator

lgtm!

@haydenhoang
haydenhoang merged commit b157953 into typesense:master Nov 10, 2026
5 checks passed
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.

2 participants