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

asma-types

Package Overview
Dependencies
Maintainers
6
Versions
151
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

asma-types - npm Package Compare versions

Comparing version 1.1.13 to 1.1.14

0

lib/index.d.ts

@@ -0,0 +0,0 @@ export type { IUploadedDocument } from './interfaces/api/advoca/IUploadedDocument';

export * from './interfaces/jwtClaims';
export * from './interfaces/enums';
//# sourceMappingURL=index.js.map

@@ -0,0 +0,0 @@ export interface ISaveToDataBase {

export {};
//# sourceMappingURL=ISaveToDataBase.js.map

@@ -0,0 +0,0 @@ export interface IUploadedDocument {

export {};
//# sourceMappingURL=IUploadedDocument.js.map

@@ -0,0 +0,0 @@ export declare enum InitiatorTypes {

@@ -0,0 +0,0 @@ // deprecated, replaced with QueriesInitiator

8

lib/interfaces/jwtClaims.d.ts

@@ -24,4 +24,2 @@ declare type roles_enum = 'RECIPIENT' | 'SUPER_USER' | 'THERAPIST' | 'USER';

services: IService;
journal_user_id: string | null;
brukerBrukerNavn: string | null;
features: feature_names_enum[];

@@ -36,6 +34,6 @@ srv_urls: ISrvUrls;

}
export declare function isRecipientJwtClaims(claims: IBaseJwtClaims): claims is IRecipientJwtClaims;
export declare function isTherapistJwtClaims(claims: IBaseJwtClaims): claims is ITherapistOrSuperUserJwtClaims;
export declare function isAdminJwtClaims(claims: IBaseJwtClaims): claims is IAdminJwtClaims;
export declare function isRecipientJwtClaims(claims?: IBaseJwtClaims): claims is IRecipientJwtClaims;
export declare function isTherapistJwtClaims(claims?: IBaseJwtClaims): claims is ITherapistOrSuperUserJwtClaims;
export declare function isAdminJwtClaims(claims?: IBaseJwtClaims): claims is IAdminJwtClaims;
export {};
//# sourceMappingURL=jwtClaims.d.ts.map
export function isRecipientJwtClaims(claims) {
return claims.role === 'RECIPIENT';
return (claims === null || claims === void 0 ? void 0 : claims.role.toUpperCase()) === 'RECIPIENT';
}
export function isTherapistJwtClaims(claims) {
return claims.role === 'THERAPIST' || claims.role === 'SUPER_USER';
var _a;
return (claims === null || claims === void 0 ? void 0 : claims.role.toUpperCase()) === 'THERAPIST' || ((_a = claims === null || claims === void 0 ? void 0 : claims.role) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === 'SUPER_USER';
}
export function isAdminJwtClaims(claims) {
return claims.role === 'ADMIN';
return (claims === null || claims === void 0 ? void 0 : claims.role.toUpperCase()) === 'ADMIN';
}
//# sourceMappingURL=jwtClaims.js.map
{
"name": "asma-types",
"version": "1.1.13",
"version": "1.1.14",
"description": "shared ts asma types",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -0,0 +0,0 @@ export type { IUploadedDocument } from './interfaces/api/advoca/IUploadedDocument'

@@ -0,0 +0,0 @@ export interface ISaveToDataBase {

@@ -0,0 +0,0 @@ export interface IUploadedDocument {

@@ -0,0 +0,0 @@ // deprecated, replaced with QueriesInitiator

type roles_enum = 'RECIPIENT' | 'SUPER_USER' | 'THERAPIST' | 'USER'
type feature_names_enum = 'autoImportableQnr' | 'dashboardTraceability' | 'ordersOverviewOnSelectedRecipientsForQnr' | 'predefinedUserForQnr' | 'rejectableQnr' | 'signByTherapistDocument' | 'test'
type feature_names_enum =
| 'autoImportableQnr'
| 'dashboardTraceability'
| 'ordersOverviewOnSelectedRecipientsForQnr'
| 'predefinedUserForQnr'
| 'rejectableQnr'
| 'signByTherapistDocument'
| 'test'

@@ -27,4 +34,2 @@ export interface IBaseJwtClaims {

services: IService
journal_user_id: string | null
brukerBrukerNavn: string | null
features: feature_names_enum[]

@@ -41,11 +46,11 @@ srv_urls: ISrvUrls

export function isRecipientJwtClaims(claims: IBaseJwtClaims): claims is IRecipientJwtClaims {
return claims.role === 'RECIPIENT'
export function isRecipientJwtClaims(claims?: IBaseJwtClaims): claims is IRecipientJwtClaims {
return claims?.role.toUpperCase() === 'RECIPIENT'
}
export function isTherapistJwtClaims(claims: IBaseJwtClaims): claims is ITherapistOrSuperUserJwtClaims {
return claims.role === 'THERAPIST' || claims.role === 'SUPER_USER'
export function isTherapistJwtClaims(claims?: IBaseJwtClaims): claims is ITherapistOrSuperUserJwtClaims {
return claims?.role.toUpperCase() === 'THERAPIST' || claims?.role?.toUpperCase() === 'SUPER_USER'
}
export function isAdminJwtClaims(claims: IBaseJwtClaims): claims is IAdminJwtClaims {
return claims.role === ('ADMIN' as roles_enum)
}
export function isAdminJwtClaims(claims?: IBaseJwtClaims): claims is IAdminJwtClaims {
return claims?.role.toUpperCase() === ('ADMIN' as roles_enum)
}

@@ -0,0 +0,0 @@ {

Sorry, the diff of this file is not supported yet

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