Skip to content

feat: type ExO query filter parameters for Template, Experience, and Fragment [DX-935]#3013

Open
Tyler Pina (tylerpina) wants to merge 4 commits intofeat/exofrom
dx-935-type-exo-query-filter-params
Open

feat: type ExO query filter parameters for Template, Experience, and Fragment [DX-935]#3013
Tyler Pina (tylerpina) wants to merge 4 commits intofeat/exofrom
dx-935-type-exo-query-filter-params

Conversation

@tylerpina
Copy link
Copy Markdown
Contributor

@tylerpina Tyler Pina (tylerpina) commented Apr 29, 2026

DX-935

Summary

  • Introduced shared ExoQueryFilters interface in lib/common-types.ts mirroring the four upstream filter schemas (SysFiltersSchema, TagFiltersSchema, TaxonomyConceptsFiltersSchema, TextFiltersSchema) from experiences-management-api-contract
  • Replaced [key: string]: unknown escape hatches on ComponentTypeQueryOptions, ExperienceQueryOptions, and TemplateQueryOptions with typed intersections of CursorPaginationParams & ExoQueryFilters & { order? }
  • Fragment will use ExoQueryFilters the same way when its entity file is created

Test plan

  • npx tsc --noEmit passes with no errors
  • Unit tests pass: npm run test:unit
  • Confirm passing an unknown filter key to any of the three query option types produces a compile error
  • Confirm all 40 upstream filter fields (sys.*, metadata.tags.*, metadata.concepts.*, name, name[match]) are accepted without error

Generated with Claude Code

@tylerpina Tyler Pina (tylerpina) requested a review from a team as a code owner April 29, 2026 17:06
@bito-code-review
Copy link
Copy Markdown

bito-code-review Bot commented Apr 29, 2026

Bito Automatic Review Skipped - Branch Excluded

Bito didn't auto-review because the source or target branch is excluded from automatic reviews.
No action is needed if you didn't intend for the agent to review it. Otherwise, to manually trigger a review, type /review in a comment and save.
You can change the branch exclusion settings here, or contact your Bito workspace admin at michael.pearce@contentful.com.

@tylerpina Tyler Pina (tylerpina) force-pushed the dx-935-type-exo-query-filter-params branch from c4ef6d0 to 8e9bea0 Compare April 29, 2026 19:20
Comment thread lib/entities/experience.ts Outdated
order?: string
[key: string]: unknown
// SysFiltersSchema
'sys.id'?: string
Copy link
Copy Markdown
Contributor

@michaelphamcf Michael Pham (michaelphamcf) Apr 29, 2026

Choose a reason for hiding this comment

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

I think we could make a shared filters type since these are identical, and use that for experiences and templates.

My bad on the PR description -- it missing information. Basically, we can also use the shared filters for component types and fragments in addition to experience and templates.

@tylerpina Tyler Pina (tylerpina) force-pushed the dx-935-type-exo-query-filter-params branch from 8e9bea0 to 845a4f7 Compare April 30, 2026 16:14
…X-935]

Replace catch-all `[key: string]: unknown` in `TemplateQueryOptions` and
`ExperienceQueryOptions` with 40 named fields mirroring the upstream
`TemplateListFiltersSchema` / `ExperienceListFilterSchema` from
`experiences-management-api-contract`:
- SysFiltersSchema (31 fields): sys.id, createdBy/updatedBy/publishedBy,
  date range filters, version, archivedAt[exists]
- TagFiltersSchema (3): metadata.tags.sys.id[in/all/nin]
- TaxonomyConceptsFiltersSchema (4): metadata.concepts.sys.id[in/all/nin],
  metadata.concepts.descendants[in]
- TextFiltersSchema (2): name, name[match]

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@tylerpina Tyler Pina (tylerpina) force-pushed the dx-935-type-exo-query-filter-params branch from 845a4f7 to 5050307 Compare April 30, 2026 16:16
Tyler Pina (tylerpina) and others added 3 commits April 30, 2026 10:19
Replace [key: string]: unknown catch-all in FragmentQueryOptions with
the shared ExoQueryFilters type, consistent with Template and Experience.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@tylerpina Tyler Pina (tylerpina) changed the title feat: type ExO query filter parameters for Template and Experience [DX-935] feat: type ExO query filter parameters for Template, Experience, and Fragment [DX-935] Apr 30, 2026
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