attlaz-client 1.9.64 → 1.9.66

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
@@ -21,7 +21,7 @@ npm install attlaz-client
21
21
  Getting Help
22
22
  ------------
23
23
 
24
- Check the [Attlaz Documentation](https://attlaz.com/docs).
25
-
26
- Please ask usage and debugging questions on [StackOverflow](http://stackoverflow.com/questions/tagged/attlaz) (use the ["attlaz"](http://stackoverflow.com/questions/ask?tags=attlaz) tag).
27
- (Please do not ask support questions here on Bitbucket.)
24
+ * [Issue Tracker](https://github.com/Attlaz-Platform) for questions, feature requests, bug reports and
25
+ general discussion related to these packages. Try searching before you create a new issue.
26
+ * Check the [Attlaz Documentation](https://docs.attlaz.com).
27
+ * [Email us](developers@attlaz.com) in Attlaz developer support: `developers@attlaz.com`
@@ -39,11 +39,13 @@ class HttpClient {
39
39
  const rawData = await response.text();
40
40
  if (contentType.type === 'application/json') {
41
41
  let jsonData = null;
42
- try {
43
- jsonData = JSON.parse(rawData);
44
- }
45
- catch (e) {
46
- console.error('Unable to parse response data to JSON', { statusText: httpResponse.statusText, error: e });
42
+ if (rawData !== '') {
43
+ try {
44
+ jsonData = JSON.parse(rawData);
45
+ }
46
+ catch (e) {
47
+ console.error('Unable to parse response data to JSON', { statusText: httpResponse.statusText, error: e });
48
+ }
47
49
  }
48
50
  httpResponse.body = jsonData;
49
51
  }
@@ -78,6 +80,7 @@ class HttpClient {
78
80
  return { type: input, options: null };
79
81
  }
80
82
  }
83
+ exports.HttpClient = HttpClient;
81
84
  HttpClient.HTTP_BAD_REQUEST = 400;
82
85
  HttpClient.HTTP_UNAUTHORIZED = 401;
83
86
  HttpClient.HTTP_FORBIDDEN = 403;
@@ -88,4 +91,3 @@ HttpClient.HTTP_INTERNAL_SERVER_ERROR = 500;
88
91
  HttpClient.HTTP_BAD_GATEWAY = 502;
89
92
  HttpClient.HTTP_UNAVAILABLE = 503;
90
93
  HttpClient.HTTP_TIMEOUT = 504;
91
- exports.HttpClient = HttpClient;
@@ -35,7 +35,7 @@ class HttpClientRequest {
35
35
  return result;
36
36
  }
37
37
  }
38
+ exports.HttpClientRequest = HttpClientRequest;
38
39
  HttpClientRequest.GET = 'GET';
39
40
  HttpClientRequest.POST = 'POST';
40
41
  HttpClientRequest.PUT = 'PUT';
41
- exports.HttpClientRequest = HttpClientRequest;
@@ -18,4 +18,4 @@ var EventType;
18
18
  EventType[EventType["FlowRunFailed"] = "FlowRunFailed"] = "FlowRunFailed";
19
19
  EventType[EventType["FlowRunComplete"] = "FlowRunComplete"] = "FlowRunComplete";
20
20
  EventType[EventType["FlowRunRetry"] = "FlowRunRetry"] = "FlowRunRetry";
21
- })(EventType = exports.EventType || (exports.EventType = {}));
21
+ })(EventType || (exports.EventType = EventType = {}));
@@ -8,7 +8,7 @@ var FlowRunPriority;
8
8
  FlowRunPriority[FlowRunPriority["Low"] = 1] = "Low";
9
9
  FlowRunPriority[FlowRunPriority["Medium"] = 2] = "Medium";
10
10
  FlowRunPriority[FlowRunPriority["High"] = 3] = "High";
11
- })(FlowRunPriority = exports.FlowRunPriority || (exports.FlowRunPriority = {}));
11
+ })(FlowRunPriority || (exports.FlowRunPriority = FlowRunPriority = {}));
12
12
  (function (FlowRunPriority) {
13
13
  function fromString(input) {
14
14
  const result = Utils_1.Utils.parseEnum(input, FlowRunPriority);
@@ -18,4 +18,4 @@ var FlowRunPriority;
18
18
  return result;
19
19
  }
20
20
  FlowRunPriority.fromString = fromString;
21
- })(FlowRunPriority = exports.FlowRunPriority || (exports.FlowRunPriority = {}));
21
+ })(FlowRunPriority || (exports.FlowRunPriority = FlowRunPriority = {}));
@@ -11,7 +11,7 @@ var FlowRunStatus;
11
11
  FlowRunStatus[FlowRunStatus["Failed"] = "failed"] = "Failed";
12
12
  FlowRunStatus[FlowRunStatus["Stopped"] = "stopped"] = "Stopped";
13
13
  FlowRunStatus[FlowRunStatus["Complete"] = "complete"] = "Complete";
14
- })(FlowRunStatus = exports.FlowRunStatus || (exports.FlowRunStatus = {}));
14
+ })(FlowRunStatus || (exports.FlowRunStatus = FlowRunStatus = {}));
15
15
  (function (FlowRunStatus) {
16
16
  function fromString(input) {
17
17
  const result = Utils_1.Utils.parseEnum(input, FlowRunStatus);
@@ -21,4 +21,4 @@ var FlowRunStatus;
21
21
  return result;
22
22
  }
23
23
  FlowRunStatus.fromString = fromString;
24
- })(FlowRunStatus = exports.FlowRunStatus || (exports.FlowRunStatus = {}));
24
+ })(FlowRunStatus || (exports.FlowRunStatus = FlowRunStatus = {}));
@@ -7,7 +7,7 @@ var HealthAlertStatus;
7
7
  HealthAlertStatus["PASSED"] = "pass";
8
8
  HealthAlertStatus["SKIPPED"] = "skip";
9
9
  HealthAlertStatus["FAILED"] = "fail";
10
- })(HealthAlertStatus = exports.HealthAlertStatus || (exports.HealthAlertStatus = {}));
10
+ })(HealthAlertStatus || (exports.HealthAlertStatus = HealthAlertStatus = {}));
11
11
  (function (HealthAlertStatus) {
12
12
  function fromString(input) {
13
13
  const result = Utils_1.Utils.parseEnum(input, HealthAlertStatus);
@@ -17,4 +17,4 @@ var HealthAlertStatus;
17
17
  return result;
18
18
  }
19
19
  HealthAlertStatus.fromString = fromString;
20
- })(HealthAlertStatus = exports.HealthAlertStatus || (exports.HealthAlertStatus = {}));
20
+ })(HealthAlertStatus || (exports.HealthAlertStatus = HealthAlertStatus = {}));
@@ -10,7 +10,7 @@ var HealthTestType;
10
10
  /** @deprecated **/
11
11
  HealthTestType["TASK_EXECUTIONS_ARE_SUCCESSFUL"] = "task_executions_are_successful";
12
12
  HealthTestType["FLOW_RUNS_ARE_SUCCESSFUL"] = "flow_runs_are_successful";
13
- })(HealthTestType = exports.HealthTestType || (exports.HealthTestType = {}));
13
+ })(HealthTestType || (exports.HealthTestType = HealthTestType = {}));
14
14
  (function (HealthTestType) {
15
15
  function fromString(input) {
16
16
  const result = Utils_1.Utils.parseEnum(input, HealthTestType);
@@ -20,4 +20,4 @@ var HealthTestType;
20
20
  return result;
21
21
  }
22
22
  HealthTestType.fromString = fromString;
23
- })(HealthTestType = exports.HealthTestType || (exports.HealthTestType = {}));
23
+ })(HealthTestType || (exports.HealthTestType = HealthTestType = {}));
@@ -12,7 +12,7 @@ var LogLevel;
12
12
  LogLevel["Critical"] = "critical";
13
13
  LogLevel["Alert"] = "alert";
14
14
  LogLevel["Emergency"] = "emergency";
15
- })(LogLevel = exports.LogLevel || (exports.LogLevel = {}));
15
+ })(LogLevel || (exports.LogLevel = LogLevel = {}));
16
16
  (function (LogLevel) {
17
17
  function compare(logLevelA, logLevelB) {
18
18
  let logLevelANumeric = LogLevel.toNumeric(logLevelA);
@@ -57,4 +57,4 @@ var LogLevel;
57
57
  return result;
58
58
  }
59
59
  LogLevel.fromString = fromString;
60
- })(LogLevel = exports.LogLevel || (exports.LogLevel = {}));
60
+ })(LogLevel || (exports.LogLevel = LogLevel = {}));
@@ -7,7 +7,7 @@ var LogStatus;
7
7
  LogStatus["Normal"] = "normal";
8
8
  LogStatus["Ignored"] = "ignored";
9
9
  LogStatus["Resolved"] = "resolved";
10
- })(LogStatus = exports.LogStatus || (exports.LogStatus = {}));
10
+ })(LogStatus || (exports.LogStatus = LogStatus = {}));
11
11
  (function (LogStatus) {
12
12
  function fromString(input) {
13
13
  const result = __1.Utils.parseEnum(input, LogStatus);
@@ -17,4 +17,4 @@ var LogStatus;
17
17
  return result;
18
18
  }
19
19
  LogStatus.fromString = fromString;
20
- })(LogStatus = exports.LogStatus || (exports.LogStatus = {}));
20
+ })(LogStatus || (exports.LogStatus = LogStatus = {}));
@@ -9,7 +9,7 @@ var ChannelType;
9
9
  ChannelType["Slack"] = "slack";
10
10
  ChannelType["SMS"] = "sms";
11
11
  ChannelType["Webhook"] = "webhook";
12
- })(ChannelType = exports.ChannelType || (exports.ChannelType = {}));
12
+ })(ChannelType || (exports.ChannelType = ChannelType = {}));
13
13
  (function (ChannelType) {
14
14
  function fromString(input) {
15
15
  const result = Utils_1.Utils.parseEnum(input, ChannelType);
@@ -19,4 +19,4 @@ var ChannelType;
19
19
  return result;
20
20
  }
21
21
  ChannelType.fromString = fromString;
22
- })(ChannelType = exports.ChannelType || (exports.ChannelType = {}));
22
+ })(ChannelType || (exports.ChannelType = ChannelType = {}));
@@ -11,7 +11,7 @@ var ProjectDeployStatus;
11
11
  ProjectDeployStatus["Failed"] = "failed";
12
12
  ProjectDeployStatus["Stopped"] = "stopped";
13
13
  ProjectDeployStatus["Complete"] = "complete";
14
- })(ProjectDeployStatus = exports.ProjectDeployStatus || (exports.ProjectDeployStatus = {}));
14
+ })(ProjectDeployStatus || (exports.ProjectDeployStatus = ProjectDeployStatus = {}));
15
15
  (function (ProjectDeployStatus) {
16
16
  function fromString(input) {
17
17
  const result = Utils_1.Utils.parseEnum(input, ProjectDeployStatus);
@@ -21,4 +21,4 @@ var ProjectDeployStatus;
21
21
  return result;
22
22
  }
23
23
  ProjectDeployStatus.fromString = fromString;
24
- })(ProjectDeployStatus = exports.ProjectDeployStatus || (exports.ProjectDeployStatus = {}));
24
+ })(ProjectDeployStatus || (exports.ProjectDeployStatus = ProjectDeployStatus = {}));
@@ -7,7 +7,7 @@ var State;
7
7
  State["Active"] = "active";
8
8
  State["Inactive"] = "inactive";
9
9
  State["Removed"] = "removed";
10
- })(State = exports.State || (exports.State = {}));
10
+ })(State || (exports.State = State = {}));
11
11
  (function (State) {
12
12
  function fromString(input) {
13
13
  const result = Utils_1.Utils.parseEnum(input, State);
@@ -17,4 +17,4 @@ var State;
17
17
  return result;
18
18
  }
19
19
  State.fromString = fromString;
20
- })(State = exports.State || (exports.State = {}));
20
+ })(State || (exports.State = State = {}));
@@ -8,7 +8,7 @@ var StorageType;
8
8
  StorageType["Persistent"] = "persistent";
9
9
  StorageType["Vault"] = "vault";
10
10
  StorageType["Infrastructure"] = "infrastructure";
11
- })(StorageType = exports.StorageType || (exports.StorageType = {}));
11
+ })(StorageType || (exports.StorageType = StorageType = {}));
12
12
  (function (StorageType) {
13
13
  function fromString(input) {
14
14
  const result = Utils_1.Utils.parseEnum(input, StorageType);
@@ -18,4 +18,4 @@ var StorageType;
18
18
  return result;
19
19
  }
20
20
  StorageType.fromString = fromString;
21
- })(StorageType = exports.StorageType || (exports.StorageType = {}));
21
+ })(StorageType || (exports.StorageType = StorageType = {}));
@@ -7,7 +7,7 @@ var TriggerType;
7
7
  TriggerType["Schedule"] = "schedule";
8
8
  TriggerType["Webhook"] = "webhook";
9
9
  TriggerType["Api"] = "api";
10
- })(TriggerType = exports.TriggerType || (exports.TriggerType = {}));
10
+ })(TriggerType || (exports.TriggerType = TriggerType = {}));
11
11
  (function (TriggerType) {
12
12
  function fromString(input) {
13
13
  const result = Utils_1.Utils.parseEnum(input, TriggerType);
@@ -17,4 +17,4 @@ var TriggerType;
17
17
  return result;
18
18
  }
19
19
  TriggerType.fromString = fromString;
20
- })(TriggerType = exports.TriggerType || (exports.TriggerType = {}));
20
+ })(TriggerType || (exports.TriggerType = TriggerType = {}));
@@ -11,6 +11,7 @@ class WorkerConfig {
11
11
  return new WorkerConfig(raw.project_environment, raw.key, raw.value);
12
12
  }
13
13
  }
14
+ exports.WorkerConfig = WorkerConfig;
14
15
  WorkerConfig.KEY_STATE = 'state';
15
16
  WorkerConfig.KEY_SCALE = 'scale';
16
17
  WorkerConfig.KEY_MEMORY_LIMIT = 'memory_limit';
@@ -20,4 +21,3 @@ WorkerConfig.KEY_WORKER_VERSION = 'worker_version';
20
21
  WorkerConfig.KEY_API_ENDPOINT = 'api_endpoint';
21
22
  WorkerConfig.KEY_API_CLIENT_ID = 'api_client_id';
22
23
  WorkerConfig.KEY_API_CLIENT_SECRET = 'api_client_secret';
23
- exports.WorkerConfig = WorkerConfig;
@@ -7,7 +7,7 @@ var WorkerInstanceState;
7
7
  WorkerInstanceState["Started"] = "Started";
8
8
  WorkerInstanceState["Stopped"] = "Stopped";
9
9
  WorkerInstanceState["Error"] = "Error";
10
- })(WorkerInstanceState = exports.WorkerInstanceState || (exports.WorkerInstanceState = {}));
10
+ })(WorkerInstanceState || (exports.WorkerInstanceState = WorkerInstanceState = {}));
11
11
  (function (WorkerInstanceState) {
12
12
  function fromString(input) {
13
13
  const result = Utils_1.Utils.parseEnum(input, WorkerInstanceState);
@@ -17,4 +17,4 @@ var WorkerInstanceState;
17
17
  return result;
18
18
  }
19
19
  WorkerInstanceState.fromString = fromString;
20
- })(WorkerInstanceState = exports.WorkerInstanceState || (exports.WorkerInstanceState = {}));
20
+ })(WorkerInstanceState || (exports.WorkerInstanceState = WorkerInstanceState = {}));
@@ -9,7 +9,7 @@ var WorkerState;
9
9
  WorkerState["Active_Upgraded"] = "Upgraded";
10
10
  WorkerState["Inactive"] = "Inactive";
11
11
  WorkerState["NonExisting"] = "NonExisting";
12
- })(WorkerState = exports.WorkerState || (exports.WorkerState = {}));
12
+ })(WorkerState || (exports.WorkerState = WorkerState = {}));
13
13
  (function (WorkerState) {
14
14
  function fromString(input) {
15
15
  const result = Utils_1.Utils.parseEnum(input, WorkerState);
@@ -19,4 +19,4 @@ var WorkerState;
19
19
  return result;
20
20
  }
21
21
  WorkerState.fromString = fromString;
22
- })(WorkerState = exports.WorkerState || (exports.WorkerState = {}));
22
+ })(WorkerState || (exports.WorkerState = WorkerState = {}));
@@ -10,7 +10,7 @@ var WorkspaceMemberInviteState;
10
10
  WorkspaceMemberInviteState["Revoked"] = "revoked";
11
11
  WorkspaceMemberInviteState["Expired"] = "expired";
12
12
  WorkspaceMemberInviteState["Removed"] = "removed";
13
- })(WorkspaceMemberInviteState = exports.WorkspaceMemberInviteState || (exports.WorkspaceMemberInviteState = {}));
13
+ })(WorkspaceMemberInviteState || (exports.WorkspaceMemberInviteState = WorkspaceMemberInviteState = {}));
14
14
  (function (WorkspaceMemberInviteState) {
15
15
  function fromString(input) {
16
16
  const result = Utils_1.Utils.parseEnum(input, WorkspaceMemberInviteState);
@@ -20,4 +20,4 @@ var WorkspaceMemberInviteState;
20
20
  return result;
21
21
  }
22
22
  WorkspaceMemberInviteState.fromString = fromString;
23
- })(WorkspaceMemberInviteState = exports.WorkspaceMemberInviteState || (exports.WorkspaceMemberInviteState = {}));
23
+ })(WorkspaceMemberInviteState || (exports.WorkspaceMemberInviteState = WorkspaceMemberInviteState = {}));
@@ -10,7 +10,7 @@ var WorkspaceMemberRole;
10
10
  WorkspaceMemberRole["Analyst"] = "analyst";
11
11
  WorkspaceMemberRole["Support"] = "support";
12
12
  WorkspaceMemberRole["ViewOnly"] = "view_only";
13
- })(WorkspaceMemberRole = exports.WorkspaceMemberRole || (exports.WorkspaceMemberRole = {}));
13
+ })(WorkspaceMemberRole || (exports.WorkspaceMemberRole = WorkspaceMemberRole = {}));
14
14
  (function (WorkspaceMemberRole) {
15
15
  function fromString(input) {
16
16
  const result = Utils_1.Utils.parseEnum(input, WorkspaceMemberRole);
@@ -20,4 +20,4 @@ var WorkspaceMemberRole;
20
20
  return result;
21
21
  }
22
22
  WorkspaceMemberRole.fromString = fromString;
23
- })(WorkspaceMemberRole = exports.WorkspaceMemberRole || (exports.WorkspaceMemberRole = {}));
23
+ })(WorkspaceMemberRole || (exports.WorkspaceMemberRole = WorkspaceMemberRole = {}));
@@ -7,7 +7,6 @@ const HttpClient_1 = require("../Http/HttpClient");
7
7
  const FlowRun_1 = require("../Model/Flow/FlowRun");
8
8
  const FlowRunSummary_1 = require("../Model/Flow/FlowRunSummary");
9
9
  const FlowRunHistory_1 = require("../Model/Flow/FlowRunHistory");
10
- const QueryString_1 = require("../Http/Data/QueryString");
11
10
  class FlowRunEndpoint extends Endpoint_1.Endpoint {
12
11
  async getFlowRuns(flowId) {
13
12
  const result = await this.requestCollection('/flows/' + flowId + '/runs', FlowRun_1.FlowRun.parse);
@@ -15,7 +14,7 @@ class FlowRunEndpoint extends Endpoint_1.Endpoint {
15
14
  }
16
15
  async getFlowRunSummaries(flowId, flowRunStatuses = null, pagination = null, projectEnvironmentId = null) {
17
16
  try {
18
- const queryString = new QueryString_1.QueryString();
17
+ const queryString = this.buildQuery(pagination);
19
18
  // if (from !== null && from !== undefined) {
20
19
  //
21
20
  // params = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "attlaz-client",
3
- "version": "1.9.64",
3
+ "version": "1.9.66",
4
4
  "description": "Javascript Client to access Attlaz API",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.js",
@@ -9,6 +9,12 @@
9
9
  "url": "git+https://bitbucket.org/attlaz/javascript-client.git"
10
10
  },
11
11
  "homepage": "https://attlaz.com",
12
+ "keywords": [
13
+ "attlaz",
14
+ "client",
15
+ "http",
16
+ "api"
17
+ ],
12
18
  "files": [
13
19
  "dist/*"
14
20
  ],