3.0.1 • Published 10 months ago
@phoenixreisen/user v3.0.1
Phoenix Reisen User
User Handler, der den typischen Umgang mit einem eingeloggten bzw. sich einloggenden Phoenix-User erleichtert.
API
export type UserData = {
[key: string]: any,
}
export const enum UserTypes {
'Mitarbeiter' = 'Mitarbeiter',
'Buchung' = 'Buchung',
'Agentur' = 'Agentur',
}
export interface UserProps {
online: boolean,
data: UserData | null,
jwt: string | undefined,
setJWTKey: (key: string) => void,
setUserKey: (key: string) => void,
setSessionOnly: (sessionOnly: boolean) => void,
load: () => UserProps,
persist: () => void,
getType: () => string | null,
getAgencyNr: () => number | null,
getPhxUsername: () => string | null,
hasRole: (role: string) => boolean,
isPhx: () => boolean,
isAdmin: () => boolean,
isAgency: () => boolean,
isLoggedIn: () => boolean,
isSessionOnly: () => boolean,
isServiceProvider: () => boolean,
isPasswordAuthenticated: () => boolean,
isInPrivileged: (names: Array<string>) => boolean,
logout: () => void,
login: (jwt: string, data?: UserData) => void,
}
Installation
npm install --save @phoenixreisen/user
Test
npm run test
Deployment
[npm install] # Abhängigkeiten installieren
npm version [major|minor|patch] # increase version x.x.x => major.minor.patch
npm publish # upload to npm
git push
3.0.1
10 months ago
3.0.0
10 months ago
2.0.2
10 months ago
2.0.1
11 months ago
2.0.0
11 months ago
1.5.1
2 years ago
1.5.0
3 years ago
1.3.4
4 years ago
1.3.3
4 years ago
1.3.2
4 years ago
1.4.0
4 years ago
1.3.1
4 years ago
1.3.0
4 years ago
1.2.0
5 years ago
1.1.0
5 years ago
1.0.3
5 years ago
1.0.2
5 years ago
1.0.1
5 years ago
1.0.0
5 years ago
0.1.3
5 years ago
0.1.2
6 years ago
0.1.1
6 years ago
0.1.0
6 years ago
0.0.5
6 years ago
0.0.4
6 years ago
0.0.3
6 years ago
0.0.2
6 years ago
0.0.1
6 years ago