Skip to content

Releases: ItemConsulting/enonic-types

Add support for lib-static

21 Apr 16:38
8ccce67
Compare
Choose a tag to compare

New Features

Improvements

  • Use same filter type for nodeLib as in contentLib
  • Fix types for RecaptchaLibrary
  • Let adminLib.getPhrases() return string

ES6 module import support

16 Apr 10:36
9ff2a56
Compare
Choose a tag to compare

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

30 Mar 08:32
44d6735
Compare
Choose a tag to compare
  • Also remove PageConfig type parameter from contentLib.get(), since Enonic always returns an empty object here.
  • Adds some documentation to ContentLibrary

Add support for lib-cron and freemarker

19 Mar 15:21
a8fe2f8
Compare
Choose a tag to compare

New Features:

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

04 Feb 09:01
55e874c
Compare
Choose a tag to compare

Added new functions:

  • ContentLibrary.resetInheritance()
  • WebsocketLibrary.getGroupSize()

Added new parameter for ProjectLibary interface

  • Project.parent.

Simplify `Response`.

01 Feb 13:29
591fd00
Compare
Choose a tag to compare

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

20 Jan 15:20
860b66a
Compare
Choose a tag to compare

Added types for "base:shortcut" and "base:media".

Add support for "lib-cache"

20 Jan 14:20
99e9e9c
Compare
Choose a tag to compare

This release adds support for "lib-cache". #12

Add updated types for `TurboStreamsLibrary`

13 Jan 15:26
248eeb4
Compare
Choose a tag to compare

Add support for returning Turbo Streams over http instead of web socket.

Add support for "lib-xp-turbo"

06 Jan 12:24
5f8623a
Compare
Choose a tag to compare

This release adds support for lib-xp-turbo, which is an integration with Turbo Streams.