feat(store): add id filtering to store collections endpoint (#13555)

* feat(store): add id filtering to store collections endpoint

* 🐛 Fix circular type reference

*  Add changeset
This commit is contained in:
Bastien
2025-09-23 10:37:32 -04:00
committed by GitHub
parent e074050e97
commit 513b352da3
5 changed files with 14 additions and 7 deletions
@@ -10,7 +10,7 @@ import {
} from "@medusajs/framework/utils"
export const GET = async (
req: AuthenticatedMedusaRequest<HttpTypes.StoreCollectionFilters>,
req: AuthenticatedMedusaRequest<HttpTypes.StoreCollectionListParams>,
res: MedusaResponse<HttpTypes.StoreCollectionListResponse>
) => {
const remoteQuery = req.scope.resolve(ContainerRegistrationKeys.REMOTE_QUERY)
@@ -10,6 +10,7 @@ export const StoreGetCollectionParams = createSelectParams()
export const StoreGetCollectionsParamsFields = z.object({
q: z.string().optional(),
id: z.union([z.string(), z.array(z.string())]).optional(),
title: z.union([z.string(), z.array(z.string())]).optional(),
handle: z.union([z.string(), z.array(z.string())]).optional(),
created_at: createOperatorMap().optional(),