Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@egose/deco

egose346MIT0.47.0TypeScript support: included

Decorators of @egose/acl

express, mongoose, access control list, api endpoints, decorators

readme

@egose/deco

The @egose/deco package offers TypeScript Decorators that allow developers to define @egose/acl configurations and options through class and method annotations. By leveraging these decorators, developers can significantly enhance the readability and maintainability of their backend codebase. Overall, @egose/deco provides a powerful way to streamline authorization logic and improve code organization.

NPM Version Package License NPM Downloads

Documentation

please see Egose documentation for more details.

Installation

npm install express mongoose @egose/deco
npm install @types/express reflect-metadata --save-dev
yarn add express mongoose @egose/deco
yarn add @types/express reflect-metadata --dev

MIT Licensed

changelog

0.47.0 (2025-05-04)

Bug Fixes

  • acl: resolve issue with passing sort parameter to findOne (2e3b928)

    0.46.1 (2025-05-03)

    0.46.0 (2025-05-03)

Features

  • acl: add sort validation (45a879c)
  • adapter-js: add data type definitions for service methods (241297b)

    0.45.1 (2024-11-04)

    0.45.0 (2024-10-22)

Features

  • acl, adapter-js: add upsert routes (57b5bfc)
  • acl: add public route (2abf21c)
  • acl: add options for overriding filters (6aa8ea1)
  • add sorting capability to readAdvancedFilter function (8d0fbdd)

    0.44.7 (2024-10-05)

Bug Fixes

  • adapter-js: include filter argument in operation metadata (72fc328)

    0.44.6 (2024-10-05)

    0.44.5 (2024-10-05)

Bug Fixes

  • adapter-js: include filter argument in operation metadata (78c1d39)

    0.44.4 (2024-09-26)

    0.44.3 (2024-09-23)

    0.44.2 (2024-09-22)

Bug Fixes

Bug Fixes

  • acl: retrieve permission properly in middleware (2fd2f07)

    0.44.0 (2024-05-13)

Features

Features

  • acl: parse client data of update data (4405854)

    0.43.0 (2024-05-08)

Features

  • react-pagination-hook: use useCallback (baf0a06)
  • support suppressError option in each request (bad7cf6)

    0.42.0 (2024-05-05)

Features

  • acl: parse client data of update data (4405854)

    0.41.2 (2024-03-20)

Features

  • react-pagination-hook: export UsePaginationResult type (0bba983)

    0.41.1 (2024-03-18)

    0.41.0 (2024-02-25)

Features

  • adapter-js: add option to supress errors (7a87b85)

    0.40.2 (2024-02-21)

Bug Fixes

Features

  • deco: add foreignFilter option in cascadeDeletePlugin (40fb97e)
  • include context as changes middleware arguments (d137e21)
  • moo: add findOrphans in cascadeDeletePlugin (c88a746)
  • moo: add findOrphans method on cascadeDeletePlugin (599d538)

Bug Fixes

Features

  • acl: add 'change' model router option (3c1c24c)

    0.39.0 (2023-12-28)

Features

  • acl: add default contexts; model, modelName (5b9f35a)

    0.38.0 (2023-12-28)

Features

Features

  • moo: add uniqueEmptiableString schema helpers (5e25425)

    0.36.0 (2023-12-22)

Features

Docs

Bug Fixes

  • acl: capture the top path only in changes in update middleware (ccbbcb9)

    0.35.0 (2023-12-07)

⚠ BREAKING CHANGES

  • acl: rename diff to changes in update middleware

Features

  • acl: rename diff to changes in update middleware (040e560)

    0.34.0 (2023-12-06)

Features

  • acl: add diff data in update context (07ed8c4)

Docs

Docs

Features

  • acl: add date filter operator (3be477c)
  • acl: include originalDocObject in decorate middleware (16cd775)

    0.32.0 (2023-11-27)

Features

  • moo: add cascade delete plugin (d84af74)

Bug Fixes

Features

  • adapter-js: support params in wrap methods (98ccbad)

    0.30.0 (2023-11-23)

Features

  • acl: support additional filters in include arg (438609e)
  • acl: support count op in include arg (78c04bc)
  • adapter-js: support cache in custom GET routes (60bcee8)

    0.29.1 (2023-11-21)

    0.29.0 (2023-11-20)

Features

  • adapter-js: support cache response (41d6e0c)

    0.28.1 (2023-11-20)

Features

  • moo: set mongoose as the this object of the plugin func (35689cc)

Docs

Features

  • moo: add uniqueNullableString schema helper (e5c724e)
  • moo: support 'byId' static method in plugin (9054d03)

    0.27.2 (2023-11-15)

Features

  • adapter-js: include total count as data by default (050b34f)

    0.27.1 (2023-11-15)

    0.27.0 (2023-11-15)

Features

  • acl: add sub bulk update endpoint (433ca1b)
  • adapter-js: add sub bulk update service (6a2bd05)
  • adapter-js: add wrap axios endpoints in multiple scopes (29845a4)

    0.26.0 (2023-11-13)

Refactors

  • acl: clean up sub service logic (cf8f45f)
  • acl: move common router options to dep level (a97a690)
  • acl: use sift for better mongodb-like filter support (3ba2e86)

    0.25.0 (2023-11-13)

Features

Features

Features

Bug Fixes

  • acl: include permissions if requested in list (f7fa7eb)

    0.22.0 (2023-11-04)

Features

  • adapter-js: support sub documents routes & services (03075ab)

Refactors

  • acl: organize sub document routes & services (e57d302)

    0.21.2 (2023-11-03)

Docs

Features

  • acl: add include argument & logic (97d9345)
  • adapter-js: add include argument & logic (f0fc382)

    0.20.1 (2023-10-31)

    0.20.0 (2023-10-31)

Features

  • acl: add modelPermissionPrefix option (963c421)
  • adapter-js: add read advanced filter endpoint (5663e19)
  • adapter-js: support subquery with model func (c3f9025)

    0.19.1 (2023-09-20)

    0.19.0 (2023-09-20)

Features

  • acl: cache base filter results (445b909)

Refactors

  • acl: rename controller to service (276da76)
  • transform core functions into a class (0039f0e)

    0.18.2 (2023-09-14)

Features

  • acl: add auto field permissions (036daae)
  • acl: add read filter controller (890124a)
  • acl: pick allowed fields in inner controller (25dced2)
  • acl: support skim permission option (d65e811)
  • adapter-js: add defaults option in model service (0b49fd1)

    0.17.2 (2023-07-25)

Features

  • react-pagination-hook: add react-pagination-hook package (209e552)

    0.15.1 (2023-05-06)

Features

  • adapter-js: add js adapter package (7ff0633)
  • adapter-js: support root router (af10a20)

    0.14.1 (2023-04-27)

⚠ BREAKING CHANGES

  • acl: update context definition in update operation

  • acl: update context definition in update operation (931c28c)

Features

Bug Fixes

⚠ BREAKING CHANGES

  • use PATCH methods for partial update endpoints
  • rename baseUrl to basePath

Features

  • acl: add model option parentPath (65010bf)
  • acl: log router endpoints (2a0dbed)
  • acl: send error status codes properly (1f98afe)
  • swagger: add swagger package (bfea7bc)
  • use PATCH methods for partial update endpoints (f28b0da)

Refactors

Features

Features

Features