attlaz-client 1.7.6 → 1.7.7

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.
Files changed (122) hide show
  1. package/dist/Client.js +59 -55
  2. package/dist/Http/HttpClient.js +13 -9
  3. package/dist/Http/HttpClientRequest.js +9 -5
  4. package/dist/Http/HttpClientRequest.spec.js +5 -3
  5. package/dist/Http/HttpClientResponse.js +5 -1
  6. package/dist/Http/OAuthClient.js +26 -19
  7. package/dist/Http/OAuthClient.spec.js +6 -4
  8. package/dist/Http/OAuthClientOptions.js +5 -1
  9. package/dist/Http/OAuthClientToken.js +5 -1
  10. package/dist/Model/Adapter/Adapter.js +5 -1
  11. package/dist/Model/Adapter/AdapterConfiguration.js +5 -1
  12. package/dist/Model/Adapter/AdapterConnection.js +8 -4
  13. package/dist/Model/Config.js +11 -7
  14. package/dist/Model/DataValue.js +5 -1
  15. package/dist/Model/DataValueCollection.js +10 -6
  16. package/dist/Model/Error/ClientError.js +17 -13
  17. package/dist/Model/Event/EventType.js +5 -2
  18. package/dist/Model/HealthAlert/HealthAlert.js +8 -4
  19. package/dist/Model/HealthAlert/HealthAlertStatus.js +8 -5
  20. package/dist/Model/HealthAlert/HealthTestType.js +8 -5
  21. package/dist/Model/JsonSerializable.js +5 -1
  22. package/dist/Model/Log/Log.js +15 -11
  23. package/dist/Model/Log/LogLevel.js +8 -5
  24. package/dist/Model/Log/LogQuery.js +5 -1
  25. package/dist/Model/Log/LogStatus.js +8 -5
  26. package/dist/Model/Log/LogStreamId.js +5 -1
  27. package/dist/Model/Messaging/Channel/Channel.js +12 -8
  28. package/dist/Model/Messaging/Channel/ChannelData.js +5 -1
  29. package/dist/Model/Messaging/Channel/ChannelType.js +8 -5
  30. package/dist/Model/Messaging/Channel/EmailChannelData.js +8 -4
  31. package/dist/Model/Messaging/Channel/PushChannelData.js +8 -4
  32. package/dist/Model/Messaging/Channel/SlackChannelData.js +8 -4
  33. package/dist/Model/Messaging/Channel/SmsChannelData.js +8 -4
  34. package/dist/Model/Messaging/Channel/WebhookChannelData.js +8 -4
  35. package/dist/Model/Messaging/ChannelHistory.js +7 -3
  36. package/dist/Model/Messaging/Subscriber.js +10 -6
  37. package/dist/Model/Notification.js +5 -1
  38. package/dist/Model/PagedResult.js +5 -1
  39. package/dist/Model/Project/PlatformLanguage.js +8 -4
  40. package/dist/Model/Project/Project.js +8 -4
  41. package/dist/Model/Project/ProjectDeploy.js +12 -8
  42. package/dist/Model/Project/ProjectDeployCommit.js +5 -1
  43. package/dist/Model/Project/ProjectDeployStatus.js +8 -5
  44. package/dist/Model/Project/ProjectEnvironment.js +10 -6
  45. package/dist/Model/Queue/QueueStatus.js +5 -1
  46. package/dist/Model/Result/DataResult.js +5 -1
  47. package/dist/Model/Result/DataResult.spec.js +4 -2
  48. package/dist/Model/Result/DataResultCollection.js +5 -1
  49. package/dist/Model/Result/ResultError.js +5 -1
  50. package/dist/Model/SourcesAccount.js +5 -1
  51. package/dist/Model/SourcesAccountRepository.js +5 -1
  52. package/dist/Model/State.js +8 -5
  53. package/dist/Model/StateAware.js +2 -1
  54. package/dist/Model/Storage/StorageInformation.js +5 -1
  55. package/dist/Model/Storage/StorageType.js +8 -5
  56. package/dist/Model/Task.js +8 -4
  57. package/dist/Model/TaskExecution/TaskExecutionStats.js +5 -1
  58. package/dist/Model/TaskExecution.js +5 -1
  59. package/dist/Model/TaskExecutionHistory.js +7 -3
  60. package/dist/Model/TaskExecutionResponse.js +5 -1
  61. package/dist/Model/TaskExecutionStatus.js +8 -5
  62. package/dist/Model/TaskExecutionSummary.js +11 -7
  63. package/dist/Model/TaskSummary.js +12 -8
  64. package/dist/Model/Team/Team.js +5 -1
  65. package/dist/Model/Team/TeamMember.js +5 -1
  66. package/dist/Model/Team/TeamMemberInvite.js +7 -3
  67. package/dist/Model/Team/TeamMemberInvite2.js +5 -1
  68. package/dist/Model/Team/TeamMemberInviteState.js +8 -5
  69. package/dist/Model/Team/TeamMemberRole.js +8 -5
  70. package/dist/Model/Trigger/ApiTrigger.js +8 -4
  71. package/dist/Model/Trigger/ApiTriggerData.js +6 -2
  72. package/dist/Model/Trigger/ScheduleTrigger.js +8 -4
  73. package/dist/Model/Trigger/ScheduleTriggerData.js +6 -2
  74. package/dist/Model/Trigger/Trigger.js +19 -15
  75. package/dist/Model/Trigger/TriggerData.js +5 -1
  76. package/dist/Model/Trigger/TriggerType.js +8 -5
  77. package/dist/Model/Trigger/WebhookTrigger.js +8 -4
  78. package/dist/Model/Trigger/WebhookTriggerData.js +6 -2
  79. package/dist/Model/User/UserAuthProvider.js +10 -6
  80. package/dist/Model/User.js +10 -6
  81. package/dist/Model/Worker/Platform.js +12 -8
  82. package/dist/Model/Worker/PlatformImage.js +10 -6
  83. package/dist/Model/Worker/Worker.js +11 -7
  84. package/dist/Model/Worker/WorkerConfig.js +5 -1
  85. package/dist/Model/Worker/WorkerInstance.js +7 -3
  86. package/dist/Model/Worker/WorkerInstanceState.js +8 -5
  87. package/dist/Model/Worker/WorkerState.js +8 -5
  88. package/dist/Service/AdapterEndpoint.js +15 -11
  89. package/dist/Service/ChannelEndpoint.js +15 -11
  90. package/dist/Service/ConfigEndpoint.js +12 -8
  91. package/dist/Service/Endpoint.js +7 -3
  92. package/dist/Service/HealthAlertEndpoint.js +8 -4
  93. package/dist/Service/LogEndpoint.js +19 -15
  94. package/dist/Service/NotificationsEndpoint.js +8 -4
  95. package/dist/Service/PlatformEndpoint.js +10 -6
  96. package/dist/Service/PlatformLanguageEndpoint.js +8 -4
  97. package/dist/Service/ProjectDeployEndpoint.js +11 -7
  98. package/dist/Service/ProjectEndpoint.js +13 -9
  99. package/dist/Service/ProjectEnvironmentEndpoint.js +6 -2
  100. package/dist/Service/QueueEndpoint.js +10 -6
  101. package/dist/Service/SourcesAccountEndpoint.js +12 -8
  102. package/dist/Service/StorageEndpoint.js +6 -2
  103. package/dist/Service/SubscriberEndpoint.js +11 -7
  104. package/dist/Service/TaskEndpoint.js +18 -14
  105. package/dist/Service/TaskExecutionEndpoint.js +18 -14
  106. package/dist/Service/TaskExecutionRequestEndpoint.js +6 -2
  107. package/dist/Service/TaskExecutionStatsEndpoint.js +8 -4
  108. package/dist/Service/TeamMemberEndpoint.js +18 -14
  109. package/dist/Service/TeamsEndpoint.js +10 -6
  110. package/dist/Service/TriggerEndpoint.js +13 -9
  111. package/dist/Service/UserEndpoint.js +14 -10
  112. package/dist/Service/WorkerConfigEndpoint.js +11 -7
  113. package/dist/Service/WorkerEndpoint.js +11 -7
  114. package/dist/Utils.js +5 -1
  115. package/dist/Utils.spec.js +34 -32
  116. package/dist/auth.spec.js +24 -22
  117. package/dist/data.spec.js +5 -3
  118. package/dist/index.js +217 -106
  119. package/dist/test.js +13 -11
  120. package/dist/version.d.ts +1 -1
  121. package/dist/version.js +4 -1
  122. package/package.json +1 -2
@@ -1,8 +1,11 @@
1
- export var EventType;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EventType = void 0;
4
+ var EventType;
2
5
  (function (EventType) {
3
6
  EventType[EventType["TaskExecutionRequested"] = "TaskExecutionRequested"] = "TaskExecutionRequested";
4
7
  EventType[EventType["TaskExecutionStarted"] = "TaskExecutionStarted"] = "TaskExecutionStarted";
5
8
  EventType[EventType["TaskExecutionFailed"] = "TaskExecutionFailed"] = "TaskExecutionFailed";
6
9
  EventType[EventType["TaskExecutionComplete"] = "TaskExecutionComplete"] = "TaskExecutionComplete";
7
10
  EventType[EventType["TaskExecutionRetry"] = "TaskExecutionRetry"] = "TaskExecutionRetry";
8
- })(EventType || (EventType = {}));
11
+ })(EventType = exports.EventType || (exports.EventType = {}));
@@ -1,6 +1,9 @@
1
- import { HealthTestType } from './HealthTestType';
2
- import { HealthAlertStatus } from './HealthAlertStatus';
3
- export class HealthAlert {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HealthAlert = void 0;
4
+ const HealthTestType_1 = require("./HealthTestType");
5
+ const HealthAlertStatus_1 = require("./HealthAlertStatus");
6
+ class HealthAlert {
4
7
  constructor(healthTestType, status) {
5
8
  this.data = [];
6
9
  this.healthTestType = healthTestType;
@@ -9,7 +12,7 @@ export class HealthAlert {
9
12
  this.data = [];
10
13
  }
11
14
  static parse(raw) {
12
- let healthAlert = new HealthAlert(HealthTestType.fromString(raw.healthTestType), HealthAlertStatus.fromString(raw.status));
15
+ let healthAlert = new HealthAlert(HealthTestType_1.HealthTestType.fromString(raw.healthTestType), HealthAlertStatus_1.HealthAlertStatus.fromString(raw.status));
13
16
  healthAlert.id = raw.id;
14
17
  healthAlert.date = new Date(raw.date);
15
18
  healthAlert.data = raw.data;
@@ -24,3 +27,4 @@ export class HealthAlert {
24
27
  return null;
25
28
  }
26
29
  }
30
+ exports.HealthAlert = HealthAlert;
@@ -1,17 +1,20 @@
1
- import { Utils } from '../../Utils';
2
- export var HealthAlertStatus;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HealthAlertStatus = void 0;
4
+ const Utils_1 = require("../../Utils");
5
+ var HealthAlertStatus;
3
6
  (function (HealthAlertStatus) {
4
7
  HealthAlertStatus["PASSED"] = "pass";
5
8
  HealthAlertStatus["SKIPPED"] = "skip";
6
9
  HealthAlertStatus["FAILED"] = "fail";
7
- })(HealthAlertStatus || (HealthAlertStatus = {}));
10
+ })(HealthAlertStatus = exports.HealthAlertStatus || (exports.HealthAlertStatus = {}));
8
11
  (function (HealthAlertStatus) {
9
12
  function fromString(input) {
10
- const result = Utils.parseEnum(input, HealthAlertStatus);
13
+ const result = Utils_1.Utils.parseEnum(input, HealthAlertStatus);
11
14
  if (result === null) {
12
15
  throw new Error('Unable to parse HealthAlertStatus from string: Unknown HealthAlertStatus "' + input + '"');
13
16
  }
14
17
  return result;
15
18
  }
16
19
  HealthAlertStatus.fromString = fromString;
17
- })(HealthAlertStatus || (HealthAlertStatus = {}));
20
+ })(HealthAlertStatus = exports.HealthAlertStatus || (exports.HealthAlertStatus = {}));
@@ -1,18 +1,21 @@
1
- import { Utils } from '../../Utils';
2
- export var HealthTestType;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HealthTestType = void 0;
4
+ const Utils_1 = require("../../Utils");
5
+ var HealthTestType;
3
6
  (function (HealthTestType) {
4
7
  HealthTestType["PROJECT_ENVIRONMENT_HAS_WORKERS"] = "project_environment_has_workers";
5
8
  HealthTestType["QUEUE_FLOW_IS_HEALTHY"] = "queue_flow_is_healthy";
6
9
  HealthTestType["WORKER_IS_UP_TO_DATE"] = "worker_is_up_to_date";
7
10
  HealthTestType["TASK_EXECUTIONS_ARE_SUCCESSFUL"] = "task_executions_are_successful";
8
- })(HealthTestType || (HealthTestType = {}));
11
+ })(HealthTestType = exports.HealthTestType || (exports.HealthTestType = {}));
9
12
  (function (HealthTestType) {
10
13
  function fromString(input) {
11
- const result = Utils.parseEnum(input, HealthTestType);
14
+ const result = Utils_1.Utils.parseEnum(input, HealthTestType);
12
15
  if (result === null) {
13
16
  throw new Error('Unable to parse HealthTestType from string: Unknown HealthTestType "' + input + '"');
14
17
  }
15
18
  return result;
16
19
  }
17
20
  HealthTestType.fromString = fromString;
18
- })(HealthTestType || (HealthTestType = {}));
21
+ })(HealthTestType = exports.HealthTestType || (exports.HealthTestType = {}));
@@ -1,4 +1,7 @@
1
- export class JsonSerializable {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.JsonSerializable = void 0;
4
+ class JsonSerializable {
2
5
  static stringify(object) {
3
6
  const replacer = (key, value) => {
4
7
  // Filtering out properties
@@ -10,3 +13,4 @@ export class JsonSerializable {
10
13
  return JSON.stringify(object, replacer);
11
14
  }
12
15
  }
16
+ exports.JsonSerializable = JsonSerializable;
@@ -1,29 +1,33 @@
1
- import { LogLevel } from "./LogLevel";
2
- import { LogStreamId } from './LogStreamId';
3
- import { LogStatus } from './LogStatus';
4
- import { DataValueCollection } from '../DataValueCollection';
5
- export class Log {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Log = void 0;
4
+ const LogLevel_1 = require("./LogLevel");
5
+ const LogStreamId_1 = require("./LogStreamId");
6
+ const LogStatus_1 = require("./LogStatus");
7
+ const DataValueCollection_1 = require("../DataValueCollection");
8
+ class Log {
6
9
  constructor(logStream, message, level, date) {
7
10
  this.id = null;
8
- this.status = LogStatus.Normal;
11
+ this.status = LogStatus_1.LogStatus.Normal;
9
12
  this.logStream = logStream;
10
13
  this.message = message;
11
14
  this.level = level;
12
15
  this.date = date;
13
- this.tags = new DataValueCollection();
16
+ this.tags = new DataValueCollection_1.DataValueCollection();
14
17
  }
15
18
  static parse(rawLog) {
16
19
  const date = new Date(rawLog.date);
17
- const level = LogLevel.fromString(rawLog.level);
18
- const logStream = new LogStreamId(rawLog.logStream.id);
20
+ const level = LogLevel_1.LogLevel.fromString(rawLog.level);
21
+ const logStream = new LogStreamId_1.LogStreamId(rawLog.logStream.id);
19
22
  let log = new Log(logStream, rawLog.message, level, date);
20
23
  log.id = rawLog.id;
21
24
  log.context = rawLog.context;
22
25
  if (rawLog.status !== null && rawLog.status !== undefined && rawLog.status !== '') {
23
- log.status = LogStatus.fromString(rawLog.status);
26
+ log.status = LogStatus_1.LogStatus.fromString(rawLog.status);
24
27
  }
25
- log.tags = DataValueCollection.fromObject(rawLog.tags);
28
+ log.tags = DataValueCollection_1.DataValueCollection.fromObject(rawLog.tags);
26
29
  log._version = rawLog._version;
27
30
  return log;
28
31
  }
29
32
  }
33
+ exports.Log = Log;
@@ -1,5 +1,8 @@
1
- import { Utils } from '../../Utils';
2
- export var LogLevel;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LogLevel = void 0;
4
+ const Utils_1 = require("../../Utils");
5
+ var LogLevel;
3
6
  (function (LogLevel) {
4
7
  LogLevel["Debug"] = "debug";
5
8
  LogLevel["Info"] = "info";
@@ -9,7 +12,7 @@ export var LogLevel;
9
12
  LogLevel["Critical"] = "critical";
10
13
  LogLevel["Alert"] = "alert";
11
14
  LogLevel["Emergency"] = "emergency";
12
- })(LogLevel || (LogLevel = {}));
15
+ })(LogLevel = exports.LogLevel || (exports.LogLevel = {}));
13
16
  (function (LogLevel) {
14
17
  function compare(logLevelA, logLevelB) {
15
18
  let logLevelANumeric = LogLevel.toNumeric(logLevelA);
@@ -47,11 +50,11 @@ export var LogLevel;
47
50
  }
48
51
  LogLevel.toNumeric = toNumeric;
49
52
  function fromString(input) {
50
- const result = Utils.parseEnum(input, LogLevel);
53
+ const result = Utils_1.Utils.parseEnum(input, LogLevel);
51
54
  if (result === null) {
52
55
  throw new Error('Unable to parse LogLevel from string: Unknown LogLevel "' + input + '"');
53
56
  }
54
57
  return result;
55
58
  }
56
59
  LogLevel.fromString = fromString;
57
- })(LogLevel || (LogLevel = {}));
60
+ })(LogLevel = exports.LogLevel || (exports.LogLevel = {}));
@@ -1,4 +1,7 @@
1
- export class LogQuery {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LogQuery = void 0;
4
+ class LogQuery {
2
5
  constructor(logStreamId) {
3
6
  this.message = null;
4
7
  this.hidden = null;
@@ -7,3 +10,4 @@ export class LogQuery {
7
10
  this.logStreamId = logStreamId;
8
11
  }
9
12
  }
13
+ exports.LogQuery = LogQuery;
@@ -1,17 +1,20 @@
1
- import { Utils } from '../..';
2
- export var LogStatus;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LogStatus = void 0;
4
+ const __1 = require("../..");
5
+ var LogStatus;
3
6
  (function (LogStatus) {
4
7
  LogStatus["Normal"] = "normal";
5
8
  LogStatus["Ignored"] = "ignored";
6
9
  LogStatus["Resolved"] = "resolved";
7
- })(LogStatus || (LogStatus = {}));
10
+ })(LogStatus = exports.LogStatus || (exports.LogStatus = {}));
8
11
  (function (LogStatus) {
9
12
  function fromString(input) {
10
- const result = Utils.parseEnum(input, LogStatus);
13
+ const result = __1.Utils.parseEnum(input, LogStatus);
11
14
  if (result === null) {
12
15
  throw new Error('Unable to parse LogStatus from string: Unknown LogStatus "' + input + '"');
13
16
  }
14
17
  return result;
15
18
  }
16
19
  LogStatus.fromString = fromString;
17
- })(LogStatus || (LogStatus = {}));
20
+ })(LogStatus = exports.LogStatus || (exports.LogStatus = {}));
@@ -1,5 +1,9 @@
1
- export class LogStreamId {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LogStreamId = void 0;
4
+ class LogStreamId {
2
5
  constructor(id) {
3
6
  this.id = id;
4
7
  }
5
8
  }
9
+ exports.LogStreamId = LogStreamId;
@@ -1,9 +1,12 @@
1
- import { ChannelType } from './ChannelType';
2
- import { State } from '../../State';
3
- import { Utils } from '../../../Utils';
4
- export class Channel {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Channel = void 0;
4
+ const ChannelType_1 = require("./ChannelType");
5
+ const State_1 = require("../../State");
6
+ const Utils_1 = require("../../../Utils");
7
+ class Channel {
5
8
  constructor(id, owner, label, type, data) {
6
- this.state = State.Active;
9
+ this.state = State_1.State.Active;
7
10
  this.private = false;
8
11
  this.id = id;
9
12
  this.owner = owner;
@@ -12,10 +15,11 @@ export class Channel {
12
15
  this.data = data;
13
16
  }
14
17
  static parse(rawChannel) {
15
- const type = ChannelType.fromString(rawChannel.type);
18
+ const type = ChannelType_1.ChannelType.fromString(rawChannel.type);
16
19
  const channel = new Channel(rawChannel.id, rawChannel.owner, rawChannel.label, type, rawChannel.data);
17
- channel.state = State.fromString(rawChannel.state);
18
- channel.private = Utils.isTrue(rawChannel.private);
20
+ channel.state = State_1.State.fromString(rawChannel.state);
21
+ channel.private = Utils_1.Utils.isTrue(rawChannel.private);
19
22
  return channel;
20
23
  }
21
24
  }
25
+ exports.Channel = Channel;
@@ -1,4 +1,7 @@
1
- export class ChannelData {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ChannelData = void 0;
4
+ class ChannelData {
2
5
  constructor(type) {
3
6
  this.type = type;
4
7
  }
@@ -6,3 +9,4 @@ export class ChannelData {
6
9
  return JSON.stringify(this);
7
10
  }
8
11
  }
12
+ exports.ChannelData = ChannelData;
@@ -1,19 +1,22 @@
1
- import { Utils } from '../../../Utils';
2
- export var ChannelType;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ChannelType = void 0;
4
+ const Utils_1 = require("../../../Utils");
5
+ var ChannelType;
3
6
  (function (ChannelType) {
4
7
  ChannelType["Email"] = "email";
5
8
  ChannelType["Push"] = "push";
6
9
  ChannelType["Slack"] = "slack";
7
10
  ChannelType["SMS"] = "sms";
8
11
  ChannelType["Webhook"] = "webhook";
9
- })(ChannelType || (ChannelType = {}));
12
+ })(ChannelType = exports.ChannelType || (exports.ChannelType = {}));
10
13
  (function (ChannelType) {
11
14
  function fromString(input) {
12
- const result = Utils.parseEnum(input, ChannelType);
15
+ const result = Utils_1.Utils.parseEnum(input, ChannelType);
13
16
  if (result === null) {
14
17
  throw new Error('Unable to parse ChannelType from string: Unknown ChannelType "' + input + '"');
15
18
  }
16
19
  return result;
17
20
  }
18
21
  ChannelType.fromString = fromString;
19
- })(ChannelType || (ChannelType = {}));
22
+ })(ChannelType = exports.ChannelType || (exports.ChannelType = {}));
@@ -1,8 +1,12 @@
1
- import { ChannelData } from "./ChannelData";
2
- import { ChannelType } from './ChannelType';
3
- export class EmailChannelData extends ChannelData {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EmailChannelData = void 0;
4
+ const ChannelData_1 = require("./ChannelData");
5
+ const ChannelType_1 = require("./ChannelType");
6
+ class EmailChannelData extends ChannelData_1.ChannelData {
4
7
  constructor(email) {
5
- super(ChannelType.Email);
8
+ super(ChannelType_1.ChannelType.Email);
6
9
  this.email = email;
7
10
  }
8
11
  }
12
+ exports.EmailChannelData = EmailChannelData;
@@ -1,9 +1,13 @@
1
- import { ChannelData } from './ChannelData';
2
- import { ChannelType } from './ChannelType';
3
- export class PushChannelData extends ChannelData {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PushChannelData = void 0;
4
+ const ChannelData_1 = require("./ChannelData");
5
+ const ChannelType_1 = require("./ChannelType");
6
+ class PushChannelData extends ChannelData_1.ChannelData {
4
7
  constructor(endpoint, keys) {
5
- super(ChannelType.Push);
8
+ super(ChannelType_1.ChannelType.Push);
6
9
  this.endpoint = endpoint;
7
10
  this.keys = keys;
8
11
  }
9
12
  }
13
+ exports.PushChannelData = PushChannelData;
@@ -1,8 +1,11 @@
1
- import { ChannelData } from './ChannelData';
2
- import { ChannelType } from './ChannelType';
3
- export class SlackChannelData extends ChannelData {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SlackChannelData = void 0;
4
+ const ChannelData_1 = require("./ChannelData");
5
+ const ChannelType_1 = require("./ChannelType");
6
+ class SlackChannelData extends ChannelData_1.ChannelData {
4
7
  constructor(access_token, webhook, channel_id, channel_name, team_id, team_name) {
5
- super(ChannelType.Slack);
8
+ super(ChannelType_1.ChannelType.Slack);
6
9
  this.access_token = access_token;
7
10
  this.webhook = webhook;
8
11
  this.channel_id = channel_id;
@@ -11,3 +14,4 @@ export class SlackChannelData extends ChannelData {
11
14
  this.team_name = team_name;
12
15
  }
13
16
  }
17
+ exports.SlackChannelData = SlackChannelData;
@@ -1,8 +1,12 @@
1
- import { ChannelData } from './ChannelData';
2
- import { ChannelType } from './ChannelType';
3
- export class SmsChannelData extends ChannelData {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SmsChannelData = void 0;
4
+ const ChannelData_1 = require("./ChannelData");
5
+ const ChannelType_1 = require("./ChannelType");
6
+ class SmsChannelData extends ChannelData_1.ChannelData {
4
7
  constructor(phonenumber) {
5
- super(ChannelType.SMS);
8
+ super(ChannelType_1.ChannelType.SMS);
6
9
  this.phonenumber = phonenumber;
7
10
  }
8
11
  }
12
+ exports.SmsChannelData = SmsChannelData;
@@ -1,9 +1,13 @@
1
- import { ChannelData } from './ChannelData';
2
- import { ChannelType } from './ChannelType';
3
- export class WebhookChannelData extends ChannelData {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WebhookChannelData = void 0;
4
+ const ChannelData_1 = require("./ChannelData");
5
+ const ChannelType_1 = require("./ChannelType");
6
+ class WebhookChannelData extends ChannelData_1.ChannelData {
4
7
  constructor(url, method = 'GET') {
5
- super(ChannelType.Webhook);
8
+ super(ChannelType_1.ChannelType.Webhook);
6
9
  this.url = url;
7
10
  this.method = method;
8
11
  }
9
12
  }
13
+ exports.WebhookChannelData = WebhookChannelData;
@@ -1,5 +1,8 @@
1
- import { Utils } from '../../Utils';
2
- export class ChannelHistory {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ChannelHistory = void 0;
4
+ const Utils_1 = require("../../Utils");
5
+ class ChannelHistory {
3
6
  // public constructor(id: number, subscriber: string, channel: number, time: Date, message: string = '', success: boolean = true, result: string = '') {
4
7
  // this.id = id;
5
8
  // this.subscriber = subscriber;
@@ -17,8 +20,9 @@ export class ChannelHistory {
17
20
  log.channel = rawLog.channel;
18
21
  log.time = new Date(rawLog.time);
19
22
  log.message = rawLog.message;
20
- log.success = Utils.isTrue(rawLog.success);
23
+ log.success = Utils_1.Utils.isTrue(rawLog.success);
21
24
  log.result = rawLog.result;
22
25
  return log;
23
26
  }
24
27
  }
28
+ exports.ChannelHistory = ChannelHistory;
@@ -1,8 +1,11 @@
1
- import { State } from '../State';
2
- import { LogLevel } from '../Log/LogLevel';
3
- export class Subscriber {
4
- constructor(id, eventTypes, projectEnvironment, task, taskExecution, channels, logLevelThreshold = LogLevel.Debug) {
5
- this.state = State.Active;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Subscriber = void 0;
4
+ const State_1 = require("../State");
5
+ const LogLevel_1 = require("../Log/LogLevel");
6
+ class Subscriber {
7
+ constructor(id, eventTypes, projectEnvironment, task, taskExecution, channels, logLevelThreshold = LogLevel_1.LogLevel.Debug) {
8
+ this.state = State_1.State.Active;
6
9
  this.id = id;
7
10
  this.eventTypes = eventTypes;
8
11
  this.projectEnvironment = projectEnvironment;
@@ -13,7 +16,7 @@ export class Subscriber {
13
16
  }
14
17
  static parseRaw(rawSubscriber) {
15
18
  let subscriber = new Subscriber(rawSubscriber.id, rawSubscriber.eventTypes, rawSubscriber.projectEnvironment, rawSubscriber.task, rawSubscriber.task_execution, rawSubscriber.channels, rawSubscriber.logLevelThreshold);
16
- subscriber.state = State.fromString(rawSubscriber.state);
19
+ subscriber.state = State_1.State.fromString(rawSubscriber.state);
17
20
  return subscriber;
18
21
  }
19
22
  getLogLevelThreshold() {
@@ -23,3 +26,4 @@ export class Subscriber {
23
26
  return this.logLevelThreshold !== null;
24
27
  }
25
28
  }
29
+ exports.Subscriber = Subscriber;
@@ -1,5 +1,9 @@
1
- export class Notification {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Notification = void 0;
4
+ class Notification {
2
5
  constructor() {
3
6
  this.acknowledged = false;
4
7
  }
5
8
  }
9
+ exports.Notification = Notification;
@@ -1,4 +1,7 @@
1
- export class PagedResult {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PagedResult = void 0;
4
+ class PagedResult {
2
5
  constructor(data, pageSize = null, totalCount = null) {
3
6
  this.data = data;
4
7
  if (pageSize === null) {
@@ -11,3 +14,4 @@ export class PagedResult {
11
14
  this.totalCount = totalCount;
12
15
  }
13
16
  }
17
+ exports.PagedResult = PagedResult;
@@ -1,15 +1,19 @@
1
- import { State } from '../State';
2
- export class PlatformLanguage {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PlatformLanguage = void 0;
4
+ const State_1 = require("../State");
5
+ class PlatformLanguage {
3
6
  constructor(id, name) {
4
7
  this.description = '';
5
- this.state = State.Active;
8
+ this.state = State_1.State.Active;
6
9
  this.id = id;
7
10
  this.name = name;
8
11
  }
9
12
  static parse(rawLanguage) {
10
13
  let language = new PlatformLanguage(rawLanguage.id, rawLanguage.name);
11
14
  language.description = rawLanguage.description;
12
- language.state = State.fromString(rawLanguage.state);
15
+ language.state = State_1.State.fromString(rawLanguage.state);
13
16
  return language;
14
17
  }
15
18
  }
19
+ exports.PlatformLanguage = PlatformLanguage;
@@ -1,8 +1,11 @@
1
- import { State } from '../State';
2
- export class Project {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Project = void 0;
4
+ const State_1 = require("../State");
5
+ class Project {
3
6
  constructor(id, key, name) {
4
7
  this.default = false;
5
- this.state = State.Active;
8
+ this.state = State_1.State.Active;
6
9
  this.id = id;
7
10
  this.key = key;
8
11
  this.name = name;
@@ -17,7 +20,8 @@ export class Project {
17
20
  project.source_account = rawProject.source_account;
18
21
  project.source_repository = rawProject.source_repository;
19
22
  project.language = rawProject.language;
20
- project.state = State.fromString(rawProject.state);
23
+ project.state = State_1.State.fromString(rawProject.state);
21
24
  return project;
22
25
  }
23
26
  }
27
+ exports.Project = Project;
@@ -1,9 +1,12 @@
1
- import { ProjectDeployStatus } from './ProjectDeployStatus';
2
- import { ProjectDeployCommit } from './ProjectDeployCommit';
3
- import { Utils } from '../../Utils';
4
- export class ProjectDeploy {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ProjectDeploy = void 0;
4
+ const ProjectDeployStatus_1 = require("./ProjectDeployStatus");
5
+ const ProjectDeployCommit_1 = require("./ProjectDeployCommit");
6
+ const Utils_1 = require("../../Utils");
7
+ class ProjectDeploy {
5
8
  constructor() {
6
- this.status = ProjectDeployStatus.Unknown;
9
+ this.status = ProjectDeployStatus_1.ProjectDeployStatus.Unknown;
7
10
  this.commits = [];
8
11
  }
9
12
  static parse(rawProjectDeploy) {
@@ -14,14 +17,14 @@ export class ProjectDeploy {
14
17
  projectDeploy.requested = new Date(rawProjectDeploy.requested);
15
18
  projectDeploy.started = new Date(rawProjectDeploy.started);
16
19
  projectDeploy.finished = new Date(rawProjectDeploy.finished);
17
- projectDeploy.status = ProjectDeployStatus.fromString(rawProjectDeploy.status);
18
- if (!Utils.isNullOrUndefined(rawProjectDeploy.bytes)) {
20
+ projectDeploy.status = ProjectDeployStatus_1.ProjectDeployStatus.fromString(rawProjectDeploy.status);
21
+ if (!Utils_1.Utils.isNullOrUndefined(rawProjectDeploy.bytes)) {
19
22
  projectDeploy.bytes = parseInt(rawProjectDeploy.bytes);
20
23
  }
21
24
  projectDeploy.commit_hash = rawProjectDeploy.commit_hash;
22
25
  const rawProjectDeployCommits = rawProjectDeploy.commits;
23
26
  for (let rawProjectDeployCommit of rawProjectDeployCommits) {
24
- let projectDeployCommit = new ProjectDeployCommit();
27
+ let projectDeployCommit = new ProjectDeployCommit_1.ProjectDeployCommit();
25
28
  projectDeployCommit.commit_hash = rawProjectDeployCommit.commit_hash;
26
29
  projectDeployCommit.commit_date = new Date(rawProjectDeployCommit.commit_date);
27
30
  projectDeployCommit.commit_message = rawProjectDeployCommit.commit_message;
@@ -32,3 +35,4 @@ export class ProjectDeploy {
32
35
  return projectDeploy;
33
36
  }
34
37
  }
38
+ exports.ProjectDeploy = ProjectDeploy;
@@ -1,2 +1,6 @@
1
- export class ProjectDeployCommit {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ProjectDeployCommit = void 0;
4
+ class ProjectDeployCommit {
2
5
  }
6
+ exports.ProjectDeployCommit = ProjectDeployCommit;
@@ -1,5 +1,8 @@
1
- import { Utils } from '../../Utils';
2
- export var ProjectDeployStatus;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ProjectDeployStatus = void 0;
4
+ const Utils_1 = require("../../Utils");
5
+ var ProjectDeployStatus;
3
6
  (function (ProjectDeployStatus) {
4
7
  ProjectDeployStatus["Unknown"] = "unknown";
5
8
  ProjectDeployStatus["Pending"] = "pending";
@@ -8,14 +11,14 @@ export var ProjectDeployStatus;
8
11
  ProjectDeployStatus["Failed"] = "failed";
9
12
  ProjectDeployStatus["Stopped"] = "stopped";
10
13
  ProjectDeployStatus["Complete"] = "complete";
11
- })(ProjectDeployStatus || (ProjectDeployStatus = {}));
14
+ })(ProjectDeployStatus = exports.ProjectDeployStatus || (exports.ProjectDeployStatus = {}));
12
15
  (function (ProjectDeployStatus) {
13
16
  function fromString(input) {
14
- const result = Utils.parseEnum(input, ProjectDeployStatus);
17
+ const result = Utils_1.Utils.parseEnum(input, ProjectDeployStatus);
15
18
  if (result === null) {
16
19
  throw new Error('Unable to parse ProjectDeployStatus from string: Unknown ProjectDeployStatus "' + input + '"');
17
20
  }
18
21
  return result;
19
22
  }
20
23
  ProjectDeployStatus.fromString = fromString;
21
- })(ProjectDeployStatus || (ProjectDeployStatus = {}));
24
+ })(ProjectDeployStatus = exports.ProjectDeployStatus || (exports.ProjectDeployStatus = {}));