Update outdated type definitions for directus_notifications, directus_permissions, directus_extensions, directus_fields, directus_activity, directus_collections, and directus_revisions - #28072
Draft
kheiner wants to merge 15 commits into
Conversation
ref: packages/schema/src/types/column.ts
13 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Caution
BLOCKED: Uses a pattern for StringLiteralUnion and CollectionName that are introduced in #27956
What's Changed
directus_notifications:idtypednumber(wasstring) in@directus/typesand@directus/sdk;status/timestampin@directus/typesnow match the DB (statusnot-nullable,timestampnullable)directus_permissions:policystays nullable in@directus/sdk(Thanks Judda!)directus_extensions:DirectusExtension['schema']in@directus/sdkexpanded to matchApiOutput.schema, including theentriesarray shapedirectus_fields:schema.schema,schema.comment, andschema.foreign_key_schemamarked optional in@directus/sdk(DB-specific, not always present);generation_expressioncorrected tostring | nulland made optionalnotification.ts,permission.ts,field.ts,collection.ts,revision.ts,activity.ts) narrowed from barestringtokeyof CompleteSchema<Schema>@directus/sdkREST commandsTested Scenarios
pnpm --filter @directus/sdk testdirectus_permissions, againstapi/src/services/permissions.ts+api/src/permissions/lib/with-app-minimal-permissions.tsReview Notes / Questions / Concerns
Permission.policyin@directus/typeswas intentionally left untouched (nullable) it's shared with synthetic permission objects built in memory, unrelated to this SDK fixChecklist
@directus/specs)@directus/sdk) updated to reflect the changes@directus/types) updated to reflect the changes@directus/system-data) updated for changes to system collections/fields/relations@directus/sdk/@directus/typesshape drift acrossdirectus_notifications,directus_permissions,directus_extensions, anddirectus_fields#28065