Skip to content
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

Restructure ListItemAccessControl types #8915

Merged
merged 2 commits into from Nov 15, 2023
Merged

Restructure ListItemAccessControl types #8915

merged 2 commits into from Nov 15, 2023

Conversation

dcousens
Copy link
Member

@dcousens dcousens commented Nov 15, 2023

For an attempt at DRY, and trying to read these types, I have opted to merge the CreateListItemAccessControl, UpdateListItemAccessControl and DeleteListItemAccessControl types into the ListItemAccessControl type, as we have for other types in packages/core/src/types/config/access-control.ts.

This will help in scenarios where you might want to use ListItemAccessControl, but for example only need ListItemAccessControl<'create' | 'update'>.

I have additionally unpacked the KeystoneListsAPI and KeystoneDbAPI for future work, which were previously inlined into their respective index signature types.

@dcousens dcousens marked this pull request as ready for review November 15, 2023 03:56
@dcousens dcousens self-assigned this Nov 15, 2023
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 5a7637b:

Sandbox Source
@keystone-6/sandbox Configuration

@dcousens dcousens merged commit eead43e into main Nov 15, 2023
58 checks passed
@dcousens dcousens deleted the types-unpack branch November 15, 2023 04:12
@dcousens dcousens mentioned this pull request Dec 4, 2023
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.

None yet

1 participant