attlaz-client 1.5.2 → 1.5.3

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,7 +1,7 @@
1
1
  import { TaskExecutionStatus } from "./TaskExecutionStatus";
2
2
  import { TaskExecution } from './TaskExecution';
3
3
  export declare class TaskExecutionSummary extends TaskExecution {
4
- time: Date;
4
+ time: Date | null;
5
5
  duration: number;
6
6
  status: TaskExecutionStatus;
7
7
  static parse(rawTaskExecutionSummary: any): TaskExecutionSummary;
@@ -7,6 +7,7 @@ const Utils_1 = require("../Utils");
7
7
  class TaskExecutionSummary extends TaskExecution_1.TaskExecution {
8
8
  constructor() {
9
9
  super(...arguments);
10
+ this.time = null;
10
11
  this.status = TaskExecutionStatus_1.TaskExecutionStatus.Unknown;
11
12
  }
12
13
  static parse(rawTaskExecutionSummary) {
@@ -2,7 +2,7 @@ import { TaskExecutionStatus } from "./TaskExecutionStatus";
2
2
  import { Task } from './Task';
3
3
  export declare class TaskSummary extends Task {
4
4
  status: TaskExecutionStatus;
5
- lastExecution: Date;
5
+ lastExecution: Date | null;
6
6
  averageExecutionDuration: number;
7
7
  executionCount: number;
8
8
  static parse(rawTask: any): TaskSummary;
@@ -8,11 +8,14 @@ class TaskSummary extends Task_1.Task {
8
8
  constructor() {
9
9
  super(...arguments);
10
10
  this.status = TaskExecutionStatus_1.TaskExecutionStatus.Unknown;
11
+ this.lastExecution = null;
11
12
  }
12
13
  static parse(rawTask) {
13
14
  let task = Task_1.Task.parse(rawTask);
14
15
  task.status = TaskExecutionStatus_1.TaskExecutionStatus.fromString(rawTask.status);
15
- task.lastExecution = Utils_1.Utils.parseRawDate(rawTask.lastExecution);
16
+ if (rawTask.lastExecution !== null && rawTask.lastExecution !== undefined) {
17
+ task.lastExecution = Utils_1.Utils.parseRawDate(rawTask.lastExecution);
18
+ }
16
19
  task.averageExecutionDuration = rawTask.averageExecutionDuration;
17
20
  task.executionCount = rawTask.executionCount;
18
21
  return task;
@@ -2,5 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TeamMember = void 0;
4
4
  class TeamMember {
5
+ constructor() {
6
+ this.last_login = null;
7
+ }
5
8
  }
6
9
  exports.TeamMember = TeamMember;
@@ -6,7 +6,7 @@ export declare class UserAuthProvider implements StateAware {
6
6
  provider: string;
7
7
  providerUserId: string;
8
8
  providerUserEmail: string;
9
- lastUsed: Date;
9
+ lastUsed: Date | null;
10
10
  state: State;
11
11
  static parse(raw: any): UserAuthProvider;
12
12
  }
@@ -5,6 +5,7 @@ const State_1 = require("../State");
5
5
  const Utils_1 = require("../../Utils");
6
6
  class UserAuthProvider {
7
7
  constructor() {
8
+ this.lastUsed = null;
8
9
  this.state = State_1.State.Active;
9
10
  }
10
11
  static parse(raw) {
@@ -14,7 +15,9 @@ class UserAuthProvider {
14
15
  userAuthProvider.provider = raw.provider;
15
16
  userAuthProvider.providerUserId = raw.providerUserId;
16
17
  userAuthProvider.providerUserEmail = raw.providerUserEmail;
17
- userAuthProvider.lastUsed = Utils_1.Utils.parseRawDate(raw.lastUsed);
18
+ if (raw.lastUsed !== null && raw.lastUsed !== undefined) {
19
+ userAuthProvider.lastUsed = Utils_1.Utils.parseRawDate(raw.lastUsed);
20
+ }
18
21
  userAuthProvider.state = State_1.State.fromString(raw.state);
19
22
  return userAuthProvider;
20
23
  }
@@ -14,6 +14,6 @@ export declare class User implements StateAware {
14
14
  time_format: string;
15
15
  picture: string;
16
16
  state: State;
17
- last_active: Date;
17
+ last_active: Date | null;
18
18
  static parse(rawUser: any): User;
19
19
  }
@@ -6,6 +6,7 @@ const State_1 = require("./State");
6
6
  class User {
7
7
  constructor() {
8
8
  this.state = State_1.State.Active;
9
+ this.last_active = null;
9
10
  }
10
11
  static parse(rawUser) {
11
12
  let user = new User();
@@ -21,7 +22,9 @@ class User {
21
22
  user.time_format = rawUser.time_format;
22
23
  user.picture = rawUser.picture;
23
24
  user.state = State_1.State.fromString(rawUser.state);
24
- user.last_active = Utils_1.Utils.parseRawDate(rawUser.last_active);
25
+ if (rawUser.last_active !== null && rawUser.last_active !== undefined) {
26
+ user.last_active = Utils_1.Utils.parseRawDate(rawUser.last_active);
27
+ }
25
28
  return user;
26
29
  }
27
30
  }
@@ -17,7 +17,9 @@ class TeamMemberEndpoint extends Endpoint_1.Endpoint {
17
17
  member.id = rawMember.id;
18
18
  member.email = rawMember.email;
19
19
  member.invite = Utils_1.Utils.isTrue(rawMember.invite);
20
- member.last_login = Utils_1.Utils.parseRawDate(rawMember.last_login);
20
+ if (rawMember.last_login !== null && rawMember.last_login !== undefined) {
21
+ member.last_login = Utils_1.Utils.parseRawDate(rawMember.last_login);
22
+ }
21
23
  member.name = rawMember.name;
22
24
  member.role = TeamMemberRole_1.TeamMemberRole.fromString(rawMember.role);
23
25
  if (member.invite) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "attlaz-client",
3
- "version": "1.5.2",
3
+ "version": "1.5.3",
4
4
  "description": "Javascript Client to access Attlaz API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",