-
-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Type System v1 #16917
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
Merged
+2,207
−1,546
Merged
Type System v1 #16917
Changes from 1 commit
Commits
Show all changes
122 commits
Select commit
Hold shift + click to select a range
3455f95
Upgrade to TS V5 and fix related breaking changes
Convly 4ef4651
Merge branch 'main' into chore/upgrade-ts-v5
Convly 8c6a17c
Add collectionName to literal properties
christiancp100 2560c57
Merge pull request #16487 from strapi/ts-basic-info
Convly c7d9ee1
Merge branch 'main' into features/ts-support-2
Convly e270ec0
Add more flexibility to controller types
christiancp100 6d38d13
Init type system basis
Convly f3cde5d
Co-authored-by: Jean-Sébastien Herbaux <Convly@users.noreply.github.com>
christiancp100 6be11d9
Update types for router
christiancp100 204114d
Fix services typings
christiancp100 094aa40
Implement the type system from within strapi/strapi
Convly fc8ea40
Merge branch 'main' into features/ts-support-2
Convly d239356
Merge branch 'features/ts-support-2' into ts-support-2/type-system
Convly a58b981
Add missing assert test for the global namespace
Convly cbab931
Remove invalid import
Convly 44b15c6
Add comments & rename some utilities
Convly 9b043be
Fix typo
Convly 8f1f784
Update the controller type to make it more generic
Convly 92f84af
Undo not necessary changes
christiancp100 d7fa412
Scope types with modules
Convly 4e60b8a
Fix typo in jsdoc
Convly e33d360
Add todo comment
christiancp100 d73bb18
Improve typings
christiancp100 1254018
Add default value to RouterConfig
christiancp100 73ef6a5
Merge pull request #16697 from strapi/feature/ts-factories
christiancp100 2d32cb1
Remove the possibility to select a filename and a directory for the g…
Convly e0b3603
Remove global interface type and uids definitions from global.d.ts
Convly c1a3193
Remove SchemaUID from the strapi/strapi ts utils
Convly aa9cb05
Fix the base registry types to fix keyof set to never for empty regis…
Convly 015dd9f
Allow UID.Component to be generic for inferrence
Convly 2a14902
Export dynamic UIDs union types based on the registry values
Convly 3ef8a8d
Move core types to namespaces and use new UIDs
Convly 7761efd
Update the ts generators to fit the new type system
Convly 32e6856
Fix utils/typescript unit tests
Convly 4f8161c
Introduce Attribute.Any
Convly e63e3be
Add default type values for component and dynamic zone
Convly b799705
Set the base for the new typings for controllers
christiancp100 d2be844
Fix Attribute.Any definition
Convly 35357db
Update packages/core/strapi/lib/types/core/namespace.d.ts
Convly f1593c2
Update packages/core/strapi/lib/types/core/uid.d.ts
Convly 221fbaf
Merge branch 'ts-support-2/type-system' into ts-support/controllers
christiancp100 9fca32a
Update data transfer types
Convly 9bd29e3
Update data transfer code to adapt with new types
Convly b30a3b4
Update ControllerHandler return type to accept void
Convly 1b50667
Use ColonsSeparator for api & plugin namespace (origin <> scope)
Convly 90b5fa8
Rename AssertNamespaceIs to EnsureNamespaceMatches for uids
Convly 2cdc6b0
Rename Contains to Includes
Convly f0841f6
Merge branch 'ts-support-2/type-system' into ts-support-2/update-type…
Convly 94e3595
Move utils to namespaces & fix types
Convly 2a75f0b
Merge branch 'main' into ts-support-2/type-system
Convly 2eb6b5c
Merge branch 'main' into features/ts-support-2
Convly 9b8fb00
Merge branch 'main' into ts-support-2/update-type-gen
Convly 0b15df5
Merge branch 'ts-support-2/type-system' into ts-support-2/update-type…
Convly 489e422
Revert breaking change & adapt the feature behavior
Convly 7738d67
Fix the autogenerate experimental features to match the new generate …
Convly c7576cd
Merge branch 'main' into features/ts-support-2
Convly f947680
Merge branch 'main' into ts-support-2/type-system
Convly 7969d71
Merge branch 'ts-support-2/type-system' into ts-support-2/update-type…
Convly 12c767c
Init type system basis
Convly 976b098
Implement the type system from within strapi/strapi
Convly cf0fa4e
Add missing assert test for the global namespace
Convly 39c2ffa
Remove invalid import
Convly 03910de
Add comments & rename some utilities
Convly 4761d9c
Fix typo
Convly b585434
Update the controller type to make it more generic
Convly 47e48cc
Scope types with modules
Convly 88efe3c
Fix typo in jsdoc
Convly a3052b6
Update packages/core/strapi/lib/types/core/namespace.d.ts
Convly 4f76e65
Update packages/core/strapi/lib/types/core/uid.d.ts
Convly 2f65385
Update ControllerHandler return type to accept void
Convly a13398e
Use ColonsSeparator for api & plugin namespace (origin <> scope)
Convly fef81ec
Rename AssertNamespaceIs to EnsureNamespaceMatches for uids
Convly a59719c
Rename Contains to Includes
Convly 672dfab
Merge branch 'ts-support-2/type-system' into ts-support-2/update-type…
Convly ee84754
Revert mistakes for dts changes
Convly 5340ba8
Merge branch 'ts-support-2/update-type-gen' into ts-support/controllers
christiancp100 da4b873
Merge branch 'ts-support/controllers' of https://github.com/strapi/st…
christiancp100 26a138b
Merge branch 'ts-support-2/update-type-gen' into ts-support/controllers
christiancp100 efc6f1b
Revert factories > Factories
Convly 99e4b4a
Merge branch 'ts-support-2/update-type-gen' into ts-support/controllers
christiancp100 dcd1ef1
Remove unused import
Convly 2a194c2
Merge pull request #16724 from strapi/ts-support-2/type-system
Convly ce62bbc
Improve typings in the strapi.controllers
christiancp100 7162234
Merge branch 'features/ts-support-2' into ts-support/controllers
christiancp100 7e74748
Merge pull request #16757 from strapi/ts-support-2/update-type-gen
Convly 9fc3537
Use component uid instead of content type uid
Convly 8d67544
Merge pull request #16883 from strapi/ts-support-2/fix-get-dynamic-zo…
Convly 9ba81c8
Use getSchemas to fetch providers' schemas
Convly d0e4691
Use Knex.Transaction instead of exporting it from DTS
Convly 2375e5c
Fix space typo
Convly c371765
Change import paths, update the core api types
Convly b1503aa
Rename artefact to artifact
Convly ee37896
Rename Attribute.Attribute to Attribute.OfType when using a generic
Convly 2b8d9de
Update wording for relation types
Convly eff2db3
Add example for Component UID warning
Convly 6bcd972
Remove pluralize usage
Convly 595a4c8
Use better generic parameter names to follow new Strapi x TS conventions
Convly 199ed9f
Merge branch 'features/type-system' into ts-support/controllers
christiancp100 dd8f98c
Improve types for controllers, services and routes
christiancp100 132ecc5
Add more expression types
Convly b85963f
Update types with new Utils
christiancp100 8a5ac95
Rename uid file
christiancp100 9bb046f
Remove unexisting import
christiancp100 98baf79
Fix controllerhandler
christiancp100 0296587
Update packages/core/strapi/lib/types/core-api/router.d.ts
christiancp100 e903193
Update packages/core/strapi/lib/types/core-api/router.d.ts
christiancp100 4211eca
Update packages/core/strapi/lib/types/core-api/service.d.ts
christiancp100 4500d4c
Update packages/core/strapi/lib/types/core/strapi/index.d.ts
christiancp100 86128b9
Update packages/core/strapi/lib/types/core-api/service.d.ts
christiancp100 af61b69
Replace types for interfaces where needed
christiancp100 f0aaefb
Merge branch 'ts-support/controllers' of https://github.com/strapi/st…
christiancp100 6494068
Update packages/core/strapi/lib/types/core-api/controller.d.ts
christiancp100 517212d
Merge pull request #16837 from strapi/ts-support/controllers
78e6952
Fix relation attribute type, add back relation and target properties
Convly 4726734
Add back the common service type
Convly 820da82
Fix relation attribute type (mappedBy and inversedBy), make it compat…
Convly 7e901ba
Update app & types generation for javascript projects, fix empty augm…
Convly f427c24
Merge branch 'main' into features/type-system
Convly a238c97
Fix js support
Convly 72d8734
Use types instead of scalar for boolean values
Convly 2f6b153
Merge branch 'releases/4.11.1' into features/type-system
Convly 1e91d9b
Review comments
Convly File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update data transfer types
- Loading branch information
commit 9fca32a25e21b64c8f2664b2d1153f2eb8ae4314
There are no files selected for viewing
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
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
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
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
2 changes: 1 addition & 1 deletion
2
packages/core/data-transfer/types/remote/protocol/client/transfer/pull.d.ts
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
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
8 changes: 8 additions & 0 deletions
8
packages/core/data-transfer/types/remote/protocol/client/transfer/utils.d.ts
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,13 @@ | ||
| import type { IAsset } from '../../../../common-entities'; | ||
|
|
||
| export type CreateTransferMessage<T extends string, U = unknown> = { | ||
| type: 'transfer'; | ||
| kind: T; | ||
| transferID: string; | ||
| } & U; | ||
|
|
||
| export type TransferAssetFlow = { assetID: string } & ( | ||
| | { action: 'start'; data: Omit<IAsset, 'stream'> } | ||
| | { action: 'stream'; data: Buffer } | ||
| | { action: 'end' } | ||
| ); |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,2 @@ | ||
| export * as client from './client'; | ||
| export * as server from './server'; | ||
| export * as Client from './client'; | ||
| export * as Server from './server'; |
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
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
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.
Uh oh!
There was an error while loading. Please reload this page.