@guestlinelabs/react-auth
Advanced tools
Comparing version 4.3.2 to 5.0.0
@@ -0,0 +0,0 @@ { |
import { AuthProvider, useAuth } from './auth'; | ||
import { AuthData, UserInfo, HandleRedirectCallbackFunction, LoginFunction, LogoutFunction, SubscriptionHandler, GetAccessTokenFunction } from './types'; | ||
import type { AuthData, UserInfo, HandleRedirectCallbackFunction, LoginFunction, LogoutFunction, SubscriptionHandler, GetAccessTokenFunction } from './types'; | ||
type Authentication = { | ||
@@ -18,2 +18,2 @@ subscriptions: SubscriptionHandler[]; | ||
} | ||
export { useAuth, AuthData, UserInfo, AuthProvider }; | ||
export { useAuth, type AuthData, type UserInfo, AuthProvider }; |
@@ -1,52 +0,6 @@ | ||
type LegacyRezlynxSiteAccess = { | ||
id: string; | ||
username: string; | ||
roles: string[]; | ||
}; | ||
type LegacyRezlynxGroupAccess = { | ||
username: string; | ||
roles: string[]; | ||
ssoManagedRoles: boolean; | ||
ssoManagedUser: boolean; | ||
}; | ||
type LegacyRoomlynxSiteAccess = { | ||
id: string; | ||
username: string; | ||
}; | ||
type LegacyRoomlynxGroupAccess = { | ||
role: string; | ||
}; | ||
type UserAuthentication = { | ||
rezlynx: LegacyRezlynxSiteAccess[]; | ||
roomlynx: LegacyRoomlynxSiteAccess[]; | ||
roomlynxGroupSettings: LegacyRoomlynxGroupAccess; | ||
rezlynxGroupSettings: LegacyRezlynxGroupAccess; | ||
}; | ||
type UsersPermissions = { | ||
read: boolean; | ||
create: boolean; | ||
update_permissions: boolean; | ||
delete: boolean; | ||
}; | ||
type InsightsPermissions = { | ||
read: boolean; | ||
allowExport: boolean; | ||
}; | ||
type EposPermissions = { | ||
allowAccess: boolean; | ||
}; | ||
type UserAuthorization = { | ||
users: UsersPermissions; | ||
insights: InsightsPermissions; | ||
epos: EposPermissions; | ||
}; | ||
type TenantMetadata = { | ||
authentication: UserAuthentication; | ||
authorization: UserAuthorization; | ||
}; | ||
interface LoginOptions { | ||
appState?: {}; | ||
appState?: Record<string, unknown>; | ||
loginHint?: string; | ||
redirect_uri?: string; | ||
[key: string]: any; | ||
[key: string]: unknown; | ||
} | ||
@@ -67,3 +21,3 @@ export type LoginFunction = (options?: LoginOptions) => Promise<void>; | ||
export type HandleRedirectCallbackFunction = (options?: HandleRedirectCallbackOptions) => Promise<{ | ||
appState?: any; | ||
appState?: Record<string, unknown>; | ||
}>; | ||
@@ -88,3 +42,2 @@ export interface LogoutOptions { | ||
isSuperuser: boolean; | ||
tenants: Record<string, TenantMetadata>; | ||
hasShopAccess: boolean; | ||
@@ -91,0 +44,0 @@ }; |
@@ -0,0 +0,0 @@ /** @type {import('jest').Config} */ |
{ | ||
"name": "@guestlinelabs/react-auth", | ||
"version": "4.3.2", | ||
"version": "5.0.0", | ||
"description": "TODO: Give a short introduction of your project. Let this section explain the objectives or the motivation behind this project.", | ||
@@ -30,2 +30,3 @@ "main": "dist/index.js", | ||
"babel-eslint": "10.1.0", | ||
"cross-spawn": "^7.0.6", | ||
"enzyme": "3.11.0", | ||
@@ -55,4 +56,4 @@ "enzyme-adapter-react-16": "1.15.5", | ||
"peerDependencies": { | ||
"react": "^16.9.0 || ^17 || ^18" | ||
"react": "^16.9.0 || ^17 || ^18 || ^19" | ||
} | ||
} | ||
} |
@@ -0,0 +0,0 @@ # ReactAuth |
@@ -0,0 +0,0 @@ import { AuthProvider, useAuth } from './'; |
import { AuthProvider, useAuth } from './auth'; | ||
import { | ||
import type { | ||
AuthData, | ||
@@ -37,2 +37,2 @@ UserInfo, | ||
export { useAuth, AuthData, UserInfo, AuthProvider }; | ||
export { useAuth, type AuthData, type UserInfo, AuthProvider }; |
@@ -0,0 +0,0 @@ import enzyme from 'enzyme'; |
@@ -1,62 +0,6 @@ | ||
type LegacyRezlynxSiteAccess = { | ||
id: string; | ||
username: string; | ||
roles: string[]; | ||
}; | ||
type LegacyRezlynxGroupAccess = { | ||
username: string; | ||
roles: string[]; | ||
ssoManagedRoles: boolean; | ||
ssoManagedUser: boolean; | ||
}; | ||
type LegacyRoomlynxSiteAccess = { | ||
id: string; | ||
username: string; | ||
}; | ||
type LegacyRoomlynxGroupAccess = { | ||
role: string; | ||
}; | ||
type UserAuthentication = { | ||
rezlynx: LegacyRezlynxSiteAccess[]; | ||
roomlynx: LegacyRoomlynxSiteAccess[]; | ||
roomlynxGroupSettings: LegacyRoomlynxGroupAccess; | ||
rezlynxGroupSettings: LegacyRezlynxGroupAccess; | ||
}; | ||
type UsersPermissions = { | ||
read: boolean; | ||
create: boolean; | ||
update_permissions: boolean; | ||
delete: boolean; | ||
}; | ||
type InsightsPermissions = { | ||
read: boolean; | ||
allowExport: boolean; | ||
}; | ||
type EposPermissions = { | ||
allowAccess: boolean; | ||
}; | ||
type UserAuthorization = { | ||
users: UsersPermissions; | ||
insights: InsightsPermissions; | ||
epos: EposPermissions; | ||
}; | ||
type TenantMetadata = { | ||
authentication: UserAuthentication; | ||
authorization: UserAuthorization; | ||
}; | ||
interface LoginOptions { | ||
appState?: {}; // State to get back on the login-callback (e.g. to store the page to redirect to after login) | ||
appState?: Record<string, unknown>; // State to get back on the login-callback (e.g. to store the page to redirect to after login) | ||
loginHint?: string; // To pre-fill the email/username on the Auth0 login page | ||
redirect_uri?: string; | ||
[key: string]: any; | ||
[key: string]: unknown; | ||
} | ||
@@ -82,3 +26,3 @@ export type LoginFunction = (options?: LoginOptions) => Promise<void>; | ||
options?: HandleRedirectCallbackOptions | ||
) => Promise<{ appState?: any }>; | ||
) => Promise<{ appState?: Record<string, unknown> }>; | ||
@@ -107,3 +51,2 @@ export interface LogoutOptions { | ||
isSuperuser: boolean; | ||
tenants: Record<string, TenantMetadata>; | ||
hasShopAccess: boolean; | ||
@@ -110,0 +53,0 @@ }; |
@@ -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
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
0
30944
32
728