attlaz-client 1.6.5 → 1.6.8

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.
package/dist/Client.d.ts CHANGED
@@ -24,6 +24,7 @@ import { TaskExecutionEndpoint } from './Service/TaskExecutionEndpoint';
24
24
  import { LogEndpoint } from './Service/LogEndpoint';
25
25
  import { TriggerEndpoint } from './Service/TriggerEndpoint';
26
26
  import { PlatformEndpoint } from './Service/PlatformEndpoint';
27
+ import { TaskExecutionStatsEndpoint } from './Service/TaskExecutionStatsEndpoint';
27
28
  export declare class Client {
28
29
  private apiEndpoint;
29
30
  private clientId;
@@ -55,6 +56,7 @@ export declare class Client {
55
56
  getTaskEndpoint(): TaskEndpoint;
56
57
  getTaskExecutionEndpoint(): TaskExecutionEndpoint;
57
58
  getTaskExecutionRequestEndpoint(): TaskExecutionRequestEndpoint;
59
+ getTaskExecutionStatsEndpoint(): TaskExecutionStatsEndpoint;
58
60
  getTeamsEndpoint(): TeamsEndpoint;
59
61
  getTriggerEndpoint(): TriggerEndpoint;
60
62
  getUserEndpoint(): UserEndpoint;
package/dist/Client.js CHANGED
@@ -27,6 +27,7 @@ const TaskExecutionEndpoint_1 = require("./Service/TaskExecutionEndpoint");
27
27
  const LogEndpoint_1 = require("./Service/LogEndpoint");
28
28
  const TriggerEndpoint_1 = require("./Service/TriggerEndpoint");
29
29
  const PlatformEndpoint_1 = require("./Service/PlatformEndpoint");
30
+ const TaskExecutionStatsEndpoint_1 = require("./Service/TaskExecutionStatsEndpoint");
30
31
  class Client {
31
32
  // private test: Map<string, any>;
32
33
  // private socketService;
@@ -58,7 +59,8 @@ class Client {
58
59
  StorageEndpoint: StorageEndpoint_1.StorageEndpoint,
59
60
  WorkerConfigEndpoint: WorkerConfigEndpoint_1.WorkerConfigEndpoint,
60
61
  HealthAlertEndpoint: HealthAlertEndpoint_1.HealthAlertEndpoint,
61
- PlatformEndpoint: PlatformEndpoint_1.PlatformEndpoint
62
+ PlatformEndpoint: PlatformEndpoint_1.PlatformEndpoint,
63
+ TaskExecutionStatsEndpoint: TaskExecutionStatsEndpoint_1.TaskExecutionStatsEndpoint
62
64
  };
63
65
  const options = new OAuthClientOptions_1.OAuthClientOptions(apiEndpoint, clientId, clientSecret);
64
66
  this.httpClient = new OAuthClient_1.OAuthClient(options);
@@ -145,6 +147,9 @@ class Client {
145
147
  getTaskExecutionRequestEndpoint() {
146
148
  return this.getEndpoint('taskexecutionrequest', this.Store.TaskExecutionRequestEndpoint);
147
149
  }
150
+ getTaskExecutionStatsEndpoint() {
151
+ return this.getEndpoint('taskexecutionstats', this.Store.TaskExecutionStatsEndpoint);
152
+ }
148
153
  getTeamsEndpoint() {
149
154
  return this.getEndpoint('teams', this.Store.TeamsEndpoint);
150
155
  }
@@ -0,0 +1,12 @@
1
+ export declare class TaskExecutionStats {
2
+ taskExecution: string;
3
+ time: Date;
4
+ memory: number;
5
+ memoryLimit: number;
6
+ cpu: number;
7
+ cpuLimit: number;
8
+ networkOutbound: number;
9
+ networkInbound: number;
10
+ fileRead: number;
11
+ fileWrite: number;
12
+ }
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TaskExecutionStats = void 0;
4
+ class TaskExecutionStats {
5
+ }
6
+ exports.TaskExecutionStats = TaskExecutionStats;
@@ -0,0 +1,6 @@
1
+ import { Endpoint } from './Endpoint';
2
+ import { TaskExecutionStats } from '../Model/TaskExecution/TaskExecutionStats';
3
+ import { DataResult } from '../Model/Result/DataResult';
4
+ export declare class TaskExecutionStatsEndpoint extends Endpoint {
5
+ create(taskExecutionStats: TaskExecutionStats): Promise<DataResult<TaskExecutionStats>>;
6
+ }
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TaskExecutionStatsEndpoint = void 0;
4
+ const Endpoint_1 = require("./Endpoint");
5
+ const DataResult_1 = require("../Model/Result/DataResult");
6
+ class TaskExecutionStatsEndpoint extends Endpoint_1.Endpoint {
7
+ async create(taskExecutionStats) {
8
+ let url = '/taskexecutions/' + taskExecutionStats.taskExecution + '/stats';
9
+ try {
10
+ const result = await this.request(url, taskExecutionStats, 'POST');
11
+ return new DataResult_1.DataResult(taskExecutionStats);
12
+ }
13
+ catch (ex) {
14
+ if (this.httpClient.isDebugEnabled()) {
15
+ console.error('Failed to create task execution stats: ', ex);
16
+ }
17
+ throw ex;
18
+ }
19
+ }
20
+ }
21
+ exports.TaskExecutionStatsEndpoint = TaskExecutionStatsEndpoint;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "attlaz-client",
3
- "version": "1.6.5",
3
+ "version": "1.6.8",
4
4
  "description": "Javascript Client to access Attlaz API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",