New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

asma-types

Package Overview
Dependencies
Maintainers
6
Versions
155
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.30 to 1.1.31

0

lib/index.d.ts

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

@@ -0,0 +0,0 @@ export * from './interfaces/jwtClaims';

@@ -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 ArtifactPresenterTypes {

@@ -0,0 +0,0 @@ export var ArtifactPresenterTypes;

8

lib/interfaces/enums.d.ts

@@ -225,4 +225,4 @@ /**

};
export declare type TemplateStatusTypes = typeof TTemplateStatus[keyof typeof TTemplateStatus];
export declare type TemplateStatusIconTypes = typeof TemplateFilterStatusTypes[keyof typeof TemplateStatusIcon];
export type TemplateStatusTypes = typeof TTemplateStatus[keyof typeof TTemplateStatus];
export type TemplateStatusIconTypes = typeof TemplateFilterStatusTypes[keyof typeof TemplateStatusIcon];
export declare enum PortalRoutesPaths {

@@ -273,4 +273,4 @@ Overview = "overview",

}
export declare type IExpressionOperators = typeof ExpressionOperators[keyof typeof ExpressionOperators];
export declare type IExpressionPrefix = typeof ExpressionPrefix[keyof typeof ExpressionPrefix];
export type IExpressionOperators = typeof ExpressionOperators[keyof typeof ExpressionOperators];
export type IExpressionPrefix = typeof ExpressionPrefix[keyof typeof ExpressionPrefix];
export declare enum Language {

@@ -277,0 +277,0 @@ EN = "en",

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

@@ -1,12 +0,17 @@

import type { roles_enum, feature_names_enum } from "asma-genql-directory/src/generated";
export interface IBaseJwtClaims {
/**
* R roles_enum
*/
export interface IBaseJwtClaims<R extends string> {
user_id: string;
role: roles_enum;
role: R;
vt?: number;
exp?: number;
}
export interface IAdminJwtClaims extends IBaseJwtClaims {
export interface IAdminJwtClaims<R extends string> extends IBaseJwtClaims<R> {
name?: string;
}
export interface IRecipientJwtClaims extends IBaseJwtClaims {
/**
* R roles_enum
*/
export interface IRecipientJwtClaims<R extends string> extends IBaseJwtClaims<R> {
access_level: 1 | 2 | 3 | 4;

@@ -18,3 +23,7 @@ name: string;

}
export interface ITherapistOrSuperUserJwtClaims extends IBaseJwtClaims {
/**
* R roles_enum
* F feature_names_enum
*/
export interface ITherapistOrSuperUserJwtClaims<R extends string, F extends string> extends IBaseJwtClaims<R> {
name: string;

@@ -26,3 +35,3 @@ region: string;

services: IService;
features: feature_names_enum[];
features: F[];
srv_urls: ISrvUrls;

@@ -36,5 +45,19 @@ }

}
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;
/**
* R roles_enum
*/
export declare function isRecipientJwtClaims<R extends string>(claims?: IBaseJwtClaims<R>): claims is IRecipientJwtClaims<R>;
/**
*
* @param claims R roles_enum
* F feature_names_enum
* @returns
*/
export declare function isTherapistJwtClaims<R extends string, F extends string>(claims?: IBaseJwtClaims<R>): claims is ITherapistOrSuperUserJwtClaims<R, F>;
/**
*
* @param claims R roles_enum
* @returns
*/
export declare function isAdminJwtClaims<R extends string>(claims?: IBaseJwtClaims<R>): claims is IAdminJwtClaims<R>;
//# sourceMappingURL=jwtClaims.d.ts.map

@@ -0,4 +1,14 @@

//import type { roles_enum, feature_names_enum } from "asma-genql-directory/lib"
/**
* R roles_enum
*/
export function isRecipientJwtClaims(claims) {
return (claims === null || claims === void 0 ? void 0 : claims.role.toUpperCase()) === 'RECIPIENT';
}
/**
*
* @param claims R roles_enum
* F feature_names_enum
* @returns
*/
export function isTherapistJwtClaims(claims) {

@@ -8,2 +18,7 @@ var _a;

}
/**
*
* @param claims R roles_enum
* @returns
*/
export function isAdminJwtClaims(claims) {

@@ -10,0 +25,0 @@ return (claims === null || claims === void 0 ? void 0 : claims.role.toUpperCase()) === 'ADMIN';

{
"name": "asma-types",
"version": "1.1.30",
"version": "1.1.31",
"description": "shared ts asma types",

@@ -18,9 +18,6 @@ "main": "lib/index.js",

},
"dependencies": {
"@genql/runtime": "^2.10.0",
"asma-genql-directory": "^1.0.78"
},
"dependencies": {},
"devDependencies": {
"typescript": "^4.7.4"
"typescript": "^4.9.4"
}
}

@@ -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 @@ export enum ArtifactPresenterTypes {

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

@@ -1,2 +0,2 @@

import type { roles_enum, feature_names_enum } from "asma-genql-directory/src/generated"
//import type { roles_enum, feature_names_enum } from "asma-genql-directory/lib"

@@ -12,6 +12,9 @@ //type roles_enum = 'RECIPIENT' | 'SUPER_USER' | 'THERAPIST' | 'USER'

// | 'test'
export interface IBaseJwtClaims {
//
/**
* R roles_enum
*/
export interface IBaseJwtClaims<R extends string> {
user_id: string
role: roles_enum
role: R
vt?: number

@@ -21,7 +24,9 @@ exp?: number

export interface IAdminJwtClaims extends IBaseJwtClaims {
export interface IAdminJwtClaims<R extends string> extends IBaseJwtClaims<R> {
name?: string
}
export interface IRecipientJwtClaims extends IBaseJwtClaims {
/**
* R roles_enum
*/
export interface IRecipientJwtClaims<R extends string> extends IBaseJwtClaims<R> {
access_level: 1 | 2 | 3 | 4

@@ -33,3 +38,7 @@ name: string

}
export interface ITherapistOrSuperUserJwtClaims extends IBaseJwtClaims {
/**
* R roles_enum
* F feature_names_enum
*/
export interface ITherapistOrSuperUserJwtClaims<R extends string,F extends string> extends IBaseJwtClaims<R> {
name: string

@@ -41,3 +50,3 @@ region: string

services: IService
features: feature_names_enum[]
features: F[]
srv_urls: ISrvUrls

@@ -52,12 +61,24 @@ }

}
export function isRecipientJwtClaims(claims?: IBaseJwtClaims): claims is IRecipientJwtClaims {
/**
* R roles_enum
*/
export function isRecipientJwtClaims<R extends string>(claims?: IBaseJwtClaims<R>): claims is IRecipientJwtClaims<R> {
return claims?.role.toUpperCase() === 'RECIPIENT'
}
export function isTherapistJwtClaims(claims?: IBaseJwtClaims): claims is ITherapistOrSuperUserJwtClaims {
/**
*
* @param claims R roles_enum
* F feature_names_enum
* @returns
*/
export function isTherapistJwtClaims<R extends string, F extends string>(claims?: IBaseJwtClaims<R>): claims is ITherapistOrSuperUserJwtClaims<R,F> {
return claims?.role.toUpperCase() === 'THERAPIST' || claims?.role?.toUpperCase() === 'SUPER_USER'
}
export function isAdminJwtClaims(claims?: IBaseJwtClaims): claims is IAdminJwtClaims {
return claims?.role.toUpperCase() === ('ADMIN' as roles_enum)
/**
*
* @param claims R roles_enum
* @returns
*/
export function isAdminJwtClaims<R extends string>(claims?: IBaseJwtClaims<R>): claims is IAdminJwtClaims<R> {
return claims?.role.toUpperCase() === 'ADMIN'
}

@@ -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

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