attlaz-client 1.10.9 → 1.10.11

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/README.md CHANGED
@@ -1,7 +1,10 @@
1
1
  Attlaz Javascript/Node client
2
2
  ==========
3
3
 
4
- [Attlaz](https://attlaz.com) is a cloud-based iPaas (Integration Platform as a Service), automation and data management platform.
4
+ [Attlaz](https://attlaz.com) is a cloud-based iPaas (Integration Platform as a Service), automation and data management
5
+ platform.
6
+
7
+ [![Latest Stable Version](https://img.shields.io/npm/v/attlaz-client.svg)](https://www.npmjs.com/package/attlaz-client)
5
8
 
6
9
  Getting Started
7
10
  ---------------
@@ -1,4 +1,4 @@
1
- import { DataValueCollection } from '../Model/DataValueCollection';
1
+ import { DataValueCollection } from '../Model/DataValueCollection.js';
2
2
  export declare abstract class MetaDataAware {
3
3
  metadata: DataValueCollection;
4
4
  }
@@ -5,10 +5,11 @@ import { Flow } from '../Flow/Flow.js';
5
5
  import { FlowRun } from '../Flow/FlowRun.js';
6
6
  import { Channel } from '../Messaging/Channel/Channel.js';
7
7
  import { Adapter } from '../Adapter/Adapter.js';
8
+ import { AdapterConnection } from '../Adapter/AdapterConnection.js';
8
9
  export declare class SearchResult {
9
10
  type: string;
10
11
  label: string;
11
12
  description: string;
12
- object: Workspace | Project | ProjectEnvironment | Flow | FlowRun | Channel | Adapter;
13
+ object: Workspace | Project | ProjectEnvironment | Flow | FlowRun | Channel | Adapter | AdapterConnection;
13
14
  static parse(rawResult: any): SearchResult;
14
15
  }
@@ -4,6 +4,7 @@ import { ProjectEnvironment } from '../Project/ProjectEnvironment.js';
4
4
  import { Flow } from '../Flow/Flow.js';
5
5
  import { FlowRun } from '../Flow/FlowRun.js';
6
6
  import { Adapter } from '../Adapter/Adapter.js';
7
+ import { AdapterConnection } from '../Adapter/AdapterConnection.js';
7
8
  export class SearchResult {
8
9
  type;
9
10
  label;
@@ -18,6 +19,7 @@ export class SearchResult {
18
19
  switch (rawResult.type) {
19
20
  case 'workspace':
20
21
  searchResult.object = Workspace.parse(rawResult.object);
22
+ searchResult.label = searchResult.object.name;
21
23
  break;
22
24
  case 'project':
23
25
  searchResult.object = Project.parse(rawResult.object);
@@ -39,6 +41,10 @@ export class SearchResult {
39
41
  searchResult.object = Adapter.parse(rawResult.object);
40
42
  searchResult.label = searchResult.object.id;
41
43
  break;
44
+ case 'adapter-connection':
45
+ searchResult.object = AdapterConnection.parse(rawResult.object);
46
+ searchResult.label = searchResult.object.name;
47
+ break;
42
48
  default:
43
49
  throw new Error('Unknown search result type "' + rawResult.type + '"');
44
50
  }
@@ -1,4 +1,4 @@
1
- import { TriggerData } from './TriggerData';
1
+ import { TriggerData } from './TriggerData.js';
2
2
  import { State } from '../State.js';
3
3
  import { TriggerType } from './TriggerType.js';
4
4
  import { StateAware } from '../StateAware.js';
@@ -133,15 +133,23 @@ export class Endpoint {
133
133
  throw new Error('Invalid data');
134
134
  }
135
135
  for (const rawDataEntry of rawData) {
136
- data.push(this.parseObject(rawDataEntry, parser));
136
+ const parsedObject = this.parseObject(rawDataEntry, parser);
137
+ if (parsedObject !== null) {
138
+ data.push(parsedObject);
139
+ }
137
140
  }
138
141
  return data;
139
142
  }
140
143
  parseObject(rawObject, parser) {
141
144
  // TODO: is it interesting to keep this wrapper, or only in develop mode?
142
145
  const wrappedData = ObjectWrapper.wrap(rawObject);
143
- const parsedData = parser(wrappedData);
144
- return parsedData;
146
+ try {
147
+ return parser(wrappedData);
148
+ }
149
+ catch (e) {
150
+ console.error('Unable to parse: ' + e.message);
151
+ }
152
+ return null;
145
153
  }
146
154
  buildQuery(pagination) {
147
155
  const queryString = new QueryString();
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const VERSION = "1.9.71";
1
+ export declare const VERSION = "1.10.10";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = '1.9.71';
1
+ export const VERSION = "1.10.10";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "attlaz-client",
3
- "version": "1.10.9",
3
+ "version": "1.10.11",
4
4
  "description": "Javascript Client to access Attlaz API",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.js",