Releases: ItemConsulting/enonic-types
Add support for lib-static
New Features
- Add types for the new Lib-static.
Improvements
- Use same filter type for nodeLib as in contentLib
- Fix types for
RecaptchaLibrary
- Let
adminLib.getPhrases()
returnstring
ES6 module import support
Support for import
🎉 🎈
Finally we have support for getting typed libraries when using the import
keyword with the XP Standard libraries!
To enable this feature you need to add "enonic-types"
to the "types"
array in your tsconfig.json or tsconfig.server.json (see README.md for more information about how to do this).
You can now write code like this, and get fully typed variables out (both in TypeScript and JavaScript).
import portalLib from "/lib/xp/portal";
import {render} from "/lib/thymeleaf";
export function get() {
...
}
Braking changes:
EnonicLibraryMap
(probably used by__non_webpack_require__()
) has been moved to ./libs.ts, and be referenced likes this:
type LibMap = import("enonic-types/libs").EnonicLibraryMap;
Add types for contentLib.query filters
- Also remove
PageConfig
type parameter fromcontentLib.get()
, since Enonic always returns an empty object here. - Adds some documentation to
ContentLibrary
Add support for lib-cron and freemarker
New Features:
- Support for lib-cron
- Support for freemarker library
Other changes:
- Improve types for http-lib
- Make count mandatory in
getChildren()
- Remove constants, we should only deal with types
- Add default roles and permissions to contentLib
- Add missing "principals" to context.authInfo
- Fix issue with
Response
generics
Add changes from XP 7.6.0
Added new functions:
ContentLibrary.resetInheritance()
WebsocketLibrary.getGroupSize()
Added new parameter for ProjectLibary
interface
Project.parent
.
Simplify `Response`.
Remove readonly
fields on Response
to make it easier for different programming styles to use it.
Have Response
just be the http-response again. If you want to return a web socket, use: Response | WebSocketResponse
explicitly.
Add types for Shortcut and BaseMedia
Added types for "base:shortcut" and "base:media".
Add support for "lib-cache"
This release adds support for "lib-cache". #12
Add updated types for `TurboStreamsLibrary`
Add support for returning Turbo Streams over http instead of web socket.
Add support for "lib-xp-turbo"
This release adds support for lib-xp-turbo, which is an integration with Turbo Streams.