Skip to content

feat(clients): add collections #5224

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Conversation

dhayab
Copy link
Member

@dhayab dhayab commented Aug 6, 2025

🧭 What and Why

This PR creates a client and describes endpoints for the Collections API.

🎟 JIRA Ticket: FX-3433

Changes included:

  • new Collections OpenAPI specs
  • Standalone JavaScript Collections API client

🧪 Test

  • added requests tests
  • added JavaScript playground

@algolia-bot
Copy link
Collaborator

algolia-bot commented Aug 6, 2025

🪓 The generated code will be pushed at the end of the CI.

Action triggered by commit bbb7f04a533ebd294dc50d8f989aace63adf7280.

Please do not push any generated code to this pull request.

@dhayab dhayab force-pushed the feat/clients-add-collections branch 5 times, most recently from 7f4b6dc to e3f542b Compare August 7, 2025 15:10
@dhayab dhayab force-pushed the feat/clients-add-collections branch from e3f542b to 2f29689 Compare August 7, 2025 15:11
@dhayab dhayab marked this pull request as ready for review August 8, 2025 09:28
@dhayab dhayab requested a review from a team as a code owner August 8, 2025 09:28
@dhayab dhayab added the do not merge the pull request is not yet ready label Aug 8, 2025
Copy link
Contributor

@Haroenv Haroenv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v cool


The base URL for requests to the Collections API is:

- `https://experiences.algolia.com`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe

Suggested change
- `https://experiences.algolia.com`
- `https://experiences.algolia.com/1/collections`

as in theory we use this endpoint for other things too

# #############################
# ### Collections Endpoints ###
# #############################
/1/collections:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same question here

# ### Collections Endpoints ###
# #############################
/1/collections:
$ref: 'paths/collections.yml'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is the yaml always based on the path? If not I think we should call this one list, next one upsert, third one commit makes sense

title: getCollectionResponse
$ref: '../common/schemas/collection.yml#/Collection'

delete:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe unrelated, but really this is soft-deleting. I wonder if we could build in a "active" status in the collection separate from whether it's existing or not, and a separate endpoint that really deletes the collection. Maybe doesn't matter as we can use a different endpoint for that

facetFilters:
$ref: '../../../common/schemas/SearchParams.yml#/facetFilters'
numericFilters:
$ref: '../../../common/schemas/SearchParams.yml#/numericFilters'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we actually support everything? I think the no-code/go transformation didn't implement TO in numeric right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do not merge the pull request is not yet ready
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants