attlaz-client 1.9.28 → 1.9.30

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,6 +1,5 @@
1
1
  export declare class FlowRunResponse {
2
2
  flowRunRequestId: string;
3
3
  success: boolean;
4
- retry: boolean;
5
4
  result: any;
6
5
  }
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FlowRunRequestEndpoint = void 0;
4
4
  const Endpoint_1 = require("./Endpoint");
5
+ const FlowRunResponse_1 = require("../Model/Flow/FlowRunResponse");
5
6
  class FlowRunRequestEndpoint extends Endpoint_1.Endpoint {
6
7
  async postFlowRunRequest(taskId, params, wait = false) {
7
8
  let url = '/flows/' + taskId + '/flowrunrequests';
@@ -10,7 +11,11 @@ class FlowRunRequestEndpoint extends Endpoint_1.Endpoint {
10
11
  }
11
12
  try {
12
13
  const parser = (raw) => {
13
- return raw;
14
+ const flowRunResponse = new FlowRunResponse_1.FlowRunResponse();
15
+ flowRunResponse.flowRunRequestId = raw.flow_run_request;
16
+ flowRunResponse.result = raw.result;
17
+ flowRunResponse.success = raw.success;
18
+ return flowRunResponse;
14
19
  };
15
20
  const result = await this.requestObject(url, params, parser, 'POST');
16
21
  // console.log('TODO: parse postTaskExecutionRequest result', result);
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.StorageEndpoint = void 0;
4
4
  const Endpoint_1 = require("./Endpoint");
5
+ const StorageInformation_1 = require("../Model/Storage/StorageInformation");
5
6
  const StorageItem_1 = require("../Model/Storage/StorageItem");
6
7
  const StorageItemInformation_1 = require("../Model/Storage/StorageItemInformation");
7
8
  class StorageEndpoint extends Endpoint_1.Endpoint {
@@ -9,7 +10,12 @@ class StorageEndpoint extends Endpoint_1.Endpoint {
9
10
  let cmd = '/projectenvironments/' + projectEnvironmentId + '/storage/' + storageType;
10
11
  try {
11
12
  const parser = (raw) => {
12
- return raw;
13
+ const storageInformation = new StorageInformation_1.StorageInformation();
14
+ storageInformation.bytes = raw.bytes;
15
+ storageInformation.bytes_limit = raw.bytes_limit;
16
+ storageInformation.items = raw.items;
17
+ storageInformation.pools = raw.pools;
18
+ return storageInformation;
13
19
  };
14
20
  const result = await this.requestObject(cmd, null, parser, 'GET');
15
21
  return result.getData();
package/dist/Utils.js CHANGED
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Utils = void 0;
4
- const util_1 = require("util");
5
4
  class Utils {
6
5
  static isNullOrUndefined(variable) {
7
6
  return variable === null || variable === undefined;
@@ -10,7 +9,7 @@ class Utils {
10
9
  return (input === true || input === 'true' || input === 1 || input === '1');
11
10
  }
12
11
  static isDate(value) {
13
- return value !== null && util_1.types.isDate(value) && !isNaN(value.getTime());
12
+ return value !== null && value instanceof Date && !isNaN(value.getTime());
14
13
  }
15
14
  static parseRawDate(input) {
16
15
  if (input !== null && input !== undefined) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "attlaz-client",
3
- "version": "1.9.28",
3
+ "version": "1.9.30",
4
4
  "description": "Javascript Client to access Attlaz API",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.js",