Releases: BetterCorp/service-base-plugin-betterportal
Releases · BetterCorp/service-base-plugin-betterportal
v1.10.1
v1.10.0
chore(package.json): update dependencies and bump version to 2.0.0 refactor(service-betterportal): reorganize imports and remove unused imports feat(service-betterportal): add FieldPermission import from index feat(service-betterportal): add Tools import from @bettercorp/tools fix(service-betterportal): fix import of EJWTTokenType from @bettercorp/service-base-plugin-web-server/lib/plugins/service-webjwt/sec.config feat(plugin.ts): add new method to rewrite object based on permissions refactor(index.ts): remove unused imports and variables, reorganize types and interfaces feat(service-betterportal): add support for configurable BetterPortal capabilities This commit adds support for configurable BetterPortal capabilities. The `addCapability` method has been updated to accept a generic type `Capability` and a generic type `key` to define the capability and its key. The method also accepts a `capabilityHandler` function to handle the capability and a `permission` parameter to define the permission required to access the capability. Additionally, the commit adds a new capability `BetterPortalCapabilityInternal` and a new method `initBPUI` to initialize the BetterPortal UI. The method accepts a `serviceName` and a `path` parameter to define the service name and the path to the UI. The commit also includes some refactoring and code cleanup. feat(plugin.ts): add support for permissionRequired parameter in get and post methods of Service class. refactor(plugin.ts): simplify put, delete, and patch methods by removing unnecessary parameters and code feat(plugin.ts): add support for permissionRequired object instead of string in put, delete, and patch methods feat(plugin.ts): add capability for permissionRequired in put, delete, and patch methods refactor(service-betterportal): improve logging and permission checking - Add more information to the log message when a client request is invalid - Change the return type of _userHasPermission method to include the fields that the user has permission to access - Add support for permission fields in _userHasPermission method - Improve the permission checking in _userHasPermission method - Change the return type of _userHasPermission method to include a boolean indicating if the user has permission or not - Change the return type of getTokenInfo method to include a message indicating if the token is invalid or not - Change the message of the return object when the token is invalid in getTokenInfo method - Remove unused variables in getTokenInfo method
v1.9.3
v1.9.2
v1.9.1
feat(service-betterportal): add capability support Add support for adding new capabilities to the BetterPortal service. The `addCapability` method was added to the `BetterPortalCallable` interface and implemented in the `Service` class. The `BetterPortalCapabilityConfigurable` enum was added to the `index.ts` file to define the configurable capabilities. The `BetterPortalCapabilityInternal` enum was also added to define the internal capabilities. The `BetterPortalCapability` type was added to define the capabilities that can be used. The `capabilities` array was added to the `Service` class to store the added capabilities. The `/bp/capabilities/` and `/bp/capabilities/:capability/:optionalparam?/` routes were added to the `Service` class to handle the capabilities.