1.2.3 - Added user group and role types after enriching the "user-info" result
parent
ddb2b4449e
commit
0c83d8c404
|
@ -42,3 +42,4 @@ All tests in the package can be executed by running: `npm test`.
|
|||
1.2.0 - Has been implemented the "user-info" method exposed by the Tuitio API.
|
||||
1.2.1 - Added decodeToken function. The token is obtained directly by the function from local storage. If the token is missing, the function returns null.
|
||||
1.2.2 - Upgraded @flare/js-utils package.
|
||||
1.2.3 - Added user group and role types after enriching the "user-info" result
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "@flare/tuitio-client",
|
||||
"version": "1.2.2",
|
||||
"version": "1.2.3",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@flare/tuitio-client",
|
||||
"version": "1.2.2",
|
||||
"version": "1.2.3",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@flare/js-utils": "^1.1.0",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@flare/tuitio-client",
|
||||
"version": "1.2.2",
|
||||
"version": "1.2.3",
|
||||
"description": "Tuitio client is an npm package written in typescript that facilitates the integration of a javascript application with Tuitio.",
|
||||
"main": "./lib/index.js",
|
||||
"types": "./lib/index.d.ts",
|
||||
|
|
18
src/types.ts
18
src/types.ts
|
@ -2,13 +2,25 @@ export type TuitioLoginResponse = { result: { token: string; expiresIn: number;
|
|||
export type TuitioLogoutResponse = { result: { userId: number; userName: string; logoutDate: Date } | null; error: string };
|
||||
export type TuitioState = { token: string | null; validUntil: Date | null; userName: string | null };
|
||||
|
||||
export type TuitioUserContactOption = {
|
||||
export type UserContactOption = {
|
||||
id: number;
|
||||
contactTypeCode: string;
|
||||
contactTypeName: string;
|
||||
contactValue: string;
|
||||
};
|
||||
|
||||
export type UserGroup = {
|
||||
id: number;
|
||||
code: string;
|
||||
name: string;
|
||||
};
|
||||
|
||||
export type UserRole = {
|
||||
id: number;
|
||||
code: string;
|
||||
name: string;
|
||||
};
|
||||
|
||||
export type TuitioUserInfo = {
|
||||
userId: number;
|
||||
userName: string;
|
||||
|
@ -21,7 +33,9 @@ export type TuitioUserInfo = {
|
|||
failedLoginAttempts?: number;
|
||||
lastLoginDate?: Date;
|
||||
claim?: object;
|
||||
contactOptions?: [TuitioUserContactOption];
|
||||
userRoles: [UserRole];
|
||||
userGroups: [UserGroup];
|
||||
contactOptions?: [UserContactOption];
|
||||
};
|
||||
|
||||
export type TuitioTokenData = {
|
||||
|
|
Loading…
Reference in New Issue