Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@bettercorp/service-base-plugin-betterportal

Package Overview
Dependencies
Maintainers
2
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bettercorp/service-base-plugin-betterportal - npm Package Compare versions

Comparing version 1.8.6 to 1.8.7

5

lib/clients/service-betterportal/plugin.d.ts

@@ -13,6 +13,11 @@ import { ServiceCallable, ServicesBase, ServicesClient } from "@bettercorp/service-base";

get<Path extends string>(path: Path, permissionRequired: string, listener: FastifyNoBodyRequestHandler<Path>, roles?: Array<string>, allowedTokenTypes?: EJWTTokenType, optionalAuth?: boolean): Promise<void>;
get<Path extends string>(path: Path, permissionRequired: null, listener: FastifyNoBodyRequestHandler<Path>): Promise<void>;
post<Path extends string>(path: Path, permissionRequired: string, listener: FastifyBodyRequestHandler<Path>, roles?: Array<string>, allowedTokenTypes?: EJWTTokenType, optionalAuth?: boolean): Promise<void>;
post<Path extends string>(path: Path, permissionRequired: null, listener: FastifyBodyRequestHandler<Path>): Promise<void>;
put<Path extends string>(path: Path, permissionRequired: string, listener: FastifyBodyRequestHandler<Path>, roles?: Array<string>, allowedTokenTypes?: EJWTTokenType, optionalAuth?: boolean): Promise<void>;
put<Path extends string>(path: Path, permissionRequired: null, listener: FastifyBodyRequestHandler<Path>): Promise<void>;
delete<Path extends string>(path: Path, permissionRequired: string, listener: FastifyBodyRequestHandler<Path>, roles?: Array<string>, allowedTokenTypes?: EJWTTokenType, optionalAuth?: boolean): Promise<void>;
delete<Path extends string>(path: Path, permissionRequired: null, listener: FastifyBodyRequestHandler<Path>): Promise<void>;
patch<Path extends string>(path: Path, permissionRequired: string, listener: FastifyBodyRequestHandler<Path>, roles?: Array<string>, allowedTokenTypes?: EJWTTokenType, optionalAuth?: boolean): Promise<void>;
patch<Path extends string>(path: Path, permissionRequired: null, listener: FastifyBodyRequestHandler<Path>): Promise<void>;
emitEvent<T extends BetterPortalBasicEvents = any>(tenantId: string, category: string, action: string, meta: T): Promise<void>;

@@ -19,0 +24,0 @@ _onBPEvent(listener: {

20

lib/plugins/service-betterportal/plugin.d.ts

@@ -14,7 +14,7 @@ import { IPluginLogger, ServiceCallable, ServicesBase } from "@bettercorp/service-base";

initBPUI(serviceName: string, path: string): Promise<void>;
get<Path extends string>(serviceName: string, path: Path, permissionRequired: string, listener: FastifyNoBodyRequestHandler<Path>, roles?: Array<string>, allowedTokenTypes?: EJWTTokenType, optionalAuth?: boolean, require2FA?: boolean): Promise<void>;
post<Path extends string>(serviceName: string, path: Path, permissionRequired: string, listener: FastifyBodyRequestHandler<Path>, roles?: Array<string>, allowedTokenTypes?: EJWTTokenType, optionalAuth?: boolean, require2FA?: boolean): Promise<void>;
put<Path extends string>(serviceName: string, path: Path, permissionRequired: string, listener: FastifyBodyRequestHandler<Path>, roles?: Array<string>, allowedTokenTypes?: EJWTTokenType, optionalAuth?: boolean, require2FA?: boolean): Promise<void>;
delete<Path extends string>(serviceName: string, path: Path, permissionRequired: string, listener: FastifyBodyRequestHandler<Path>, roles?: Array<string>, allowedTokenTypes?: EJWTTokenType, optionalAuth?: boolean, require2FA?: boolean): Promise<void>;
patch<Path extends string>(serviceName: string, path: Path, permissionRequired: string, listener: FastifyBodyRequestHandler<Path>, roles?: Array<string>, allowedTokenTypes?: EJWTTokenType, optionalAuth?: boolean, require2FA?: boolean): Promise<void>;
get<Path extends string>(serviceName: string, path: Path, permissionRequired: string | null, listener: FastifyNoBodyRequestHandler<Path>, roles?: Array<string>, allowedTokenTypes?: EJWTTokenType, optionalAuth?: boolean, require2FA?: boolean): Promise<void>;
post<Path extends string>(serviceName: string, path: Path, permissionRequired: string | null, listener: FastifyBodyRequestHandler<Path>, roles?: Array<string>, allowedTokenTypes?: EJWTTokenType, optionalAuth?: boolean, require2FA?: boolean): Promise<void>;
put<Path extends string>(serviceName: string, path: Path, permissionRequired: string | null, listener: FastifyBodyRequestHandler<Path>, roles?: Array<string>, allowedTokenTypes?: EJWTTokenType, optionalAuth?: boolean, require2FA?: boolean): Promise<void>;
delete<Path extends string>(serviceName: string, path: Path, permissionRequired: string | null, listener: FastifyBodyRequestHandler<Path>, roles?: Array<string>, allowedTokenTypes?: EJWTTokenType, optionalAuth?: boolean, require2FA?: boolean): Promise<void>;
patch<Path extends string>(serviceName: string, path: Path, permissionRequired: string | null, listener: FastifyBodyRequestHandler<Path>, roles?: Array<string>, allowedTokenTypes?: EJWTTokenType, optionalAuth?: boolean, require2FA?: boolean): Promise<void>;
}

@@ -34,7 +34,7 @@ export declare class Service extends ServicesBase<BetterPortalEvents, ServiceCallable, ServiceCallable, ServiceCallable, ServiceCallable, MyPluginConfig> implements BSBFastifyCallable {

init(): Promise<void>;
get<Path extends string>(serviceName: string, path: Path, permissionRequired: string, listener: FastifyNoBodyRequestHandler<Path>, roles?: Array<string>, allowedTokenTypes?: EJWTTokenType, optionalAuth?: boolean, require2FA?: boolean): Promise<void>;
post<Path extends string>(serviceName: string, path: Path, permissionRequired: string, listener: FastifyBodyRequestHandler<Path>, roles?: Array<string>, allowedTokenTypes?: EJWTTokenType, optionalAuth?: boolean, require2FA?: boolean): Promise<void>;
put<Path extends string>(serviceName: string, path: Path, permissionRequired: string, listener: FastifyBodyRequestHandler<Path>, roles?: Array<string>, allowedTokenTypes?: EJWTTokenType, optionalAuth?: boolean, require2FA?: boolean): Promise<void>;
delete<Path extends string>(serviceName: string, path: Path, permissionRequired: string, listener: FastifyBodyRequestHandler<Path>, roles?: Array<string>, allowedTokenTypes?: EJWTTokenType, optionalAuth?: boolean, require2FA?: boolean): Promise<void>;
patch<Path extends string>(serviceName: string, path: Path, permissionRequired: string, listener: FastifyBodyRequestHandler<Path>, roles?: Array<string>, allowedTokenTypes?: EJWTTokenType, optionalAuth?: boolean, require2FA?: boolean): Promise<void>;
get<Path extends string>(serviceName: string, path: Path, permissionRequired: string | null, listener: FastifyNoBodyRequestHandler<Path>, roles?: Array<string>, allowedTokenTypes?: EJWTTokenType, optionalAuth?: boolean, require2FA?: boolean): Promise<void>;
post<Path extends string>(serviceName: string, path: Path, permissionRequired: string | null, listener: FastifyBodyRequestHandler<Path>, roles?: Array<string>, allowedTokenTypes?: EJWTTokenType, optionalAuth?: boolean, require2FA?: boolean): Promise<void>;
put<Path extends string>(serviceName: string, path: Path, permissionRequired: string | null, listener: FastifyBodyRequestHandler<Path>, roles?: Array<string>, allowedTokenTypes?: EJWTTokenType, optionalAuth?: boolean, require2FA?: boolean): Promise<void>;
delete<Path extends string>(serviceName: string, path: Path, permissionRequired: string | null, listener: FastifyBodyRequestHandler<Path>, roles?: Array<string>, allowedTokenTypes?: EJWTTokenType, optionalAuth?: boolean, require2FA?: boolean): Promise<void>;
patch<Path extends string>(serviceName: string, path: Path, permissionRequired: string | null, listener: FastifyBodyRequestHandler<Path>, roles?: Array<string>, allowedTokenTypes?: EJWTTokenType, optionalAuth?: boolean, require2FA?: boolean): Promise<void>;
private handleRequest;

@@ -41,0 +41,0 @@ private _userHasPermission;

@@ -169,3 +169,3 @@ "use strict";

];
this.get(serviceName, "/bpui/:assetKey/*", "*", async (reply, token, clientId, roles, params, query, checkCacheCanSendData, request) => {
this.get(serviceName, "/bpui/:assetKey/*", null, async (reply, token, clientId, roles, params, query, checkCacheCanSendData, request) => {
let specDir = specialityDirs.filter((x) => x.dir === params.assetKey);

@@ -205,3 +205,3 @@ let pathReplacementUrl = `${params.assetKey}/`;

requestedFile = requestedFile + "." + dir.defaultExtension;
redirect = linePaths.join('/') + '/' + requestedFile;
redirect = linePaths.join("/") + "/" + requestedFile;
}

@@ -265,3 +265,3 @@ else if (!Tools_1.Tools.isString(dir.defaultFile))

return;
}, undefined, undefined, true, false);
});
}

@@ -272,4 +272,4 @@ }

this.webJwt.init({
bearerStr: "BPAuth",
queryKey: "BPT",
bearerStr: "Bearer",
queryKey: "auth",
defaultTokenType: sec_config_1.EJWTTokenType.req,

@@ -374,2 +374,10 @@ allowedTokenTypes: [

reply.header("Cache-Control", "no-store, no-cache, max-age=0, must-revalidate");
if (permissionRequired === null) {
return {
success: true,
token: undefined,
clientId: undefined,
roles: undefined,
};
}
try {

@@ -376,0 +384,0 @@ let tempToken = await this.webJwt.verifyWebRequest(request, tokenType);

@@ -18,3 +18,3 @@ {

"main": "lib/index.js",
"version": "1.8.6",
"version": "1.8.7",
"bsb_project": true,

@@ -32,3 +32,3 @@ "devDependencies": {

"@bettercorp/service-base": "^8.3.19",
"@bettercorp/service-base-plugin-web-server": "^6.5.1",
"@bettercorp/service-base-plugin-web-server": "^6.5.2",
"@bettercorp/tools": "^2.1.30",

@@ -35,0 +35,0 @@ "@types/node": "^18.15.0",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc