@dative-gpi/foundation-shared-domain 0.0.149 → 0.0.151

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,15 +1,26 @@
1
1
  import { AuthTokenInfos, AuthTokenInfosDTO } from "./authTokenInfos";
2
2
 
3
3
  export class AuthTokenDetails extends AuthTokenInfos {
4
+
5
+ token: string;
6
+
4
7
  constructor(params: AuthTokenDetailsDTO) {
5
8
  super(params);
9
+ this.token = params.token;
6
10
  }
7
11
  }
8
12
 
9
13
  export interface AuthTokenDetailsDTO extends AuthTokenInfosDTO {
14
+
15
+ token: string;
10
16
  }
11
17
 
12
18
  export interface CreateAuthTokenDTO {
13
- userId: string;
19
+ extensionId: string;
20
+ label: string;
14
21
  lifetime: number;
22
+ }
23
+
24
+ export interface AuthTokenFilters {
25
+ userId?: string;
15
26
  }
@@ -1,20 +1,22 @@
1
1
  import { utcToEpoch } from "../../tools";
2
2
 
3
3
  export class AuthTokenInfos {
4
- id: string | null;
5
- token: string;
6
- dateMax: number | null;
4
+ id: string;
5
+ label: string;
6
+ creationDate: number;
7
+ dateMax: number;
7
8
 
8
9
  constructor(params: AuthTokenInfosDTO) {
9
10
  this.id = params.id;
10
- this.token = params.token;
11
- this.dateMax = params.dateMax ?
12
- utcToEpoch(params.dateMax) : null;
11
+ this.label = params.label;
12
+ this.creationDate = utcToEpoch(params.creationDate);
13
+ this.dateMax = utcToEpoch(params.dateMax);
13
14
  }
14
15
  }
15
16
 
16
17
  export interface AuthTokenInfosDTO {
17
- id: string | null;
18
- token: string;
19
- dateMax: string | null;
18
+ id: string;
19
+ label: string;
20
+ creationDate: string;
21
+ dateMax: string;
20
22
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dative-gpi/foundation-shared-domain",
3
3
  "sideEffects": false,
4
- "version": "0.0.149",
4
+ "version": "0.0.151",
5
5
  "description": "",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -12,5 +12,5 @@
12
12
  "dependencies": {
13
13
  "date-fns": "^3.6.0"
14
14
  },
15
- "gitHead": "530e113f98626a38763ac4afcc4d828d69bcfc2d"
15
+ "gitHead": "c90845bbbf6584636e0ccd69c59f209ec17fc00e"
16
16
  }