attlaz-client 1.4.5 → 1.4.9

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 (119) hide show
  1. package/dist/Client.js +55 -51
  2. package/dist/Http/HttpClient.js +17 -13
  3. package/dist/Http/HttpClientRequest.js +7 -3
  4. package/dist/Http/HttpClientRequest.spec.js +5 -3
  5. package/dist/Http/HttpClientResponse.js +5 -1
  6. package/dist/Http/OAuthClient.js +17 -15
  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 +5 -1
  13. package/dist/Model/Config.js +11 -7
  14. package/dist/Model/DataValue.d.ts +5 -0
  15. package/dist/Model/DataValue.js +6 -0
  16. package/dist/Model/Error/ClientError.js +16 -12
  17. package/dist/Model/Event/EventType.js +5 -2
  18. package/dist/Model/HealthAlert/HealthAlert.d.ts +3 -5
  19. package/dist/Model/HealthAlert/HealthAlert.js +8 -4
  20. package/dist/Model/HealthAlert/HealthAlertStatus.js +9 -6
  21. package/dist/Model/HealthAlert/HealthTestType.js +9 -6
  22. package/dist/Model/Log/Log.d.ts +4 -6
  23. package/dist/Model/Log/Log.js +9 -5
  24. package/dist/Model/Log/LogLevel.js +9 -6
  25. package/dist/Model/Log/LogQuery.d.ts +2 -1
  26. package/dist/Model/Log/LogQuery.js +5 -1
  27. package/dist/Model/Log/LogStreamId.js +5 -1
  28. package/dist/Model/Log/LogType.js +10 -7
  29. package/dist/Model/Messaging/Channel/Channel.js +12 -8
  30. package/dist/Model/Messaging/Channel/ChannelData.js +5 -1
  31. package/dist/Model/Messaging/Channel/ChannelType.js +9 -6
  32. package/dist/Model/Messaging/Channel/EmailChannelData.js +8 -4
  33. package/dist/Model/Messaging/Channel/PushChannelData.js +8 -4
  34. package/dist/Model/Messaging/Channel/SlackChannelData.js +8 -4
  35. package/dist/Model/Messaging/Channel/SmsChannelData.js +8 -4
  36. package/dist/Model/Messaging/Channel/WebhookChannelData.js +8 -4
  37. package/dist/Model/Messaging/ChannelHistory.js +7 -3
  38. package/dist/Model/Messaging/Subscriber.js +8 -4
  39. package/dist/Model/Notification.js +5 -1
  40. package/dist/Model/PagedResult.js +8 -4
  41. package/dist/Model/Project/Language.js +8 -4
  42. package/dist/Model/Project/Project.js +8 -4
  43. package/dist/Model/Project/ProjectDeploy.js +12 -8
  44. package/dist/Model/Project/ProjectDeployCommit.js +5 -1
  45. package/dist/Model/Project/ProjectDeployStatus.js +9 -6
  46. package/dist/Model/Project/ProjectEnvironment.js +10 -6
  47. package/dist/Model/Queue/QueueStatus.js +5 -1
  48. package/dist/Model/Result/DataResult.js +5 -1
  49. package/dist/Model/Result/DataResultCollection.js +5 -1
  50. package/dist/Model/Result/ResultError.js +5 -1
  51. package/dist/Model/SourcesAccount.js +5 -1
  52. package/dist/Model/SourcesAccountRepository.js +5 -1
  53. package/dist/Model/State.js +9 -6
  54. package/dist/Model/StateAware.js +2 -0
  55. package/dist/Model/Storage/Storage.js +5 -1
  56. package/dist/Model/Storage/StorageType.js +9 -6
  57. package/dist/Model/Task.js +8 -4
  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 +9 -6
  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 +9 -6
  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 +9 -6
  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/Worker.js +11 -7
  82. package/dist/Model/Worker/WorkerConfig.js +5 -1
  83. package/dist/Model/Worker/WorkerImage.js +8 -4
  84. package/dist/Model/Worker/WorkerInstance.js +7 -3
  85. package/dist/Model/Worker/WorkerInstanceState.js +9 -6
  86. package/dist/Model/Worker/WorkerState.js +9 -6
  87. package/dist/Service/AdapterEndpoint.js +14 -10
  88. package/dist/Service/ChannelEndpoint.js +15 -11
  89. package/dist/Service/ConfigEndpoint.js +12 -8
  90. package/dist/Service/Endpoint.js +7 -3
  91. package/dist/Service/HealthAlertEndpoint.js +10 -6
  92. package/dist/Service/LanguageEndpoint.js +10 -6
  93. package/dist/Service/LogEndpoint.d.ts +2 -1
  94. package/dist/Service/LogEndpoint.js +29 -23
  95. package/dist/Service/NotificationsEndpoint.js +8 -4
  96. package/dist/Service/ProjectDeployEndpoint.js +11 -7
  97. package/dist/Service/ProjectEndpoint.js +13 -9
  98. package/dist/Service/ProjectEnvironmentEndpoint.js +6 -2
  99. package/dist/Service/QueueEndpoint.js +10 -6
  100. package/dist/Service/SourcesAccountEndpoint.js +10 -6
  101. package/dist/Service/StorageEndpoint.js +13 -9
  102. package/dist/Service/SubscriberEndpoint.js +11 -7
  103. package/dist/Service/TaskEndpoint.js +18 -14
  104. package/dist/Service/TaskExecutionEndpoint.js +24 -20
  105. package/dist/Service/TaskExecutionRequestEndpoint.js +6 -2
  106. package/dist/Service/TeamMemberEndpoint.js +19 -15
  107. package/dist/Service/TeamsEndpoint.js +10 -6
  108. package/dist/Service/TriggerEndpoint.js +13 -9
  109. package/dist/Service/UserEndpoint.js +15 -11
  110. package/dist/Service/WorkerConfigEndpoint.js +11 -7
  111. package/dist/Service/WorkerEndpoint.js +12 -8
  112. package/dist/Utils.js +5 -1
  113. package/dist/Utils.spec.js +23 -21
  114. package/dist/auth.spec.js +24 -22
  115. package/dist/data.spec.js +5 -3
  116. package/dist/index.d.ts +1 -0
  117. package/dist/index.js +207 -100
  118. package/dist/test.js +13 -11
  119. package/package.json +9 -7
@@ -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);
12
- if (Utils.isNullOrUndefined(result)) {
14
+ const result = Utils_1.Utils.parseEnum(input, HealthTestType);
15
+ if (Utils_1.Utils.isNullOrUndefined(result)) {
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,5 +1,6 @@
1
1
  import { LogLevel } from "./LogLevel";
2
2
  import { LogStreamId } from './LogStreamId';
3
+ import { DataValue, DataValueValue } from '../DataValue';
3
4
  export declare class Log {
4
5
  id: string;
5
6
  readonly logStream: LogStreamId;
@@ -7,13 +8,10 @@ export declare class Log {
7
8
  readonly level: LogLevel;
8
9
  message: string;
9
10
  context: object;
10
- tags: Array<{
11
- key: string;
12
- value: string;
13
- }>;
11
+ tags: DataValue[];
14
12
  _version: string;
15
13
  constructor(logStream: LogStreamId, level: LogLevel, date: Date);
16
14
  static parse(rawLog: any): Log;
17
- setTag(key: string, value: string): void;
18
- getTagValue(key: string): string | null;
15
+ setTag(key: string, value: DataValueValue): void;
16
+ getTagValue(key: string): DataValueValue | null;
19
17
  }
@@ -1,6 +1,9 @@
1
- import { LogLevel } from "./LogLevel";
2
- import { LogStreamId } from './LogStreamId';
3
- 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
+ class Log {
4
7
  constructor(logStream, level, date) {
5
8
  this.tags = [];
6
9
  this.logStream = logStream;
@@ -9,8 +12,8 @@ export class Log {
9
12
  }
10
13
  static parse(rawLog) {
11
14
  const date = new Date(rawLog.date);
12
- const level = LogLevel.fromString(rawLog.level);
13
- const logStream = new LogStreamId(rawLog.logStream.id);
15
+ const level = LogLevel_1.LogLevel.fromString(rawLog.level);
16
+ const logStream = new LogStreamId_1.LogStreamId(rawLog.logStream.id);
14
17
  let log = new Log(logStream, level, date);
15
18
  log.id = rawLog.id;
16
19
  log.message = rawLog.message;
@@ -31,3 +34,4 @@ export class Log {
31
34
  return null;
32
35
  }
33
36
  }
37
+ 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);
51
- if (Utils.isNullOrUndefined(result)) {
53
+ const result = Utils_1.Utils.parseEnum(input, LogLevel);
54
+ if (Utils_1.Utils.isNullOrUndefined(result)) {
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,5 +1,6 @@
1
1
  import { LogLevel } from './LogLevel';
2
2
  import { LogStreamId } from './LogStreamId';
3
+ import { DataValueValue } from '../DataValue';
3
4
  export declare class LogQuery {
4
5
  readonly logStreamId: LogStreamId;
5
6
  message: string;
@@ -7,7 +8,7 @@ export declare class LogQuery {
7
8
  logLevels: LogLevel[];
8
9
  tags: Array<{
9
10
  key: string;
10
- value: string;
11
+ values: DataValueValue;
11
12
  }>;
12
13
  pageSize: number;
13
14
  pageNum: number;
@@ -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,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,20 +1,23 @@
1
- import { Utils } from '../../Utils';
2
- import { State } from '../State';
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LogType = void 0;
4
+ const Utils_1 = require("../../Utils");
5
+ const State_1 = require("../State");
3
6
  /**
4
7
  * @deprecated
5
8
  */
6
- export var LogType;
9
+ var LogType;
7
10
  (function (LogType) {
8
11
  LogType["Infrastructure"] = "infrastructure";
9
12
  LogType["TaskExecution"] = "taskexecution";
10
- })(LogType || (LogType = {}));
13
+ })(LogType = exports.LogType || (exports.LogType = {}));
11
14
  (function (LogType) {
12
15
  function fromString(input) {
13
- const result = Utils.parseEnum(input, State);
14
- if (Utils.isNullOrUndefined(result)) {
16
+ const result = Utils_1.Utils.parseEnum(input, State_1.State);
17
+ if (Utils_1.Utils.isNullOrUndefined(result)) {
15
18
  throw new Error('Unable to parse LogType from string: Unknown LogType "' + input + '"');
16
19
  }
17
20
  return result;
18
21
  }
19
22
  LogType.fromString = fromString;
20
- })(LogType || (LogType = {}));
23
+ })(LogType = exports.LogType || (exports.LogType = {}));
@@ -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);
13
- if (Utils.isNullOrUndefined(result)) {
15
+ const result = Utils_1.Utils.parseEnum(input, ChannelType);
16
+ if (Utils_1.Utils.isNullOrUndefined(result)) {
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,7 +1,10 @@
1
- import { State } from '../State';
2
- export class Subscriber {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Subscriber = void 0;
4
+ const State_1 = require("../State");
5
+ class Subscriber {
3
6
  constructor(id, eventTypes, projectEnvironment, task, taskExecution, channels, logLevelThreshold = null) {
4
- this.state = State.Active;
7
+ this.state = State_1.State.Active;
5
8
  this.id = id;
6
9
  this.eventTypes = eventTypes;
7
10
  this.projectEnvironment = projectEnvironment;
@@ -12,7 +15,7 @@ export class Subscriber {
12
15
  }
13
16
  static parseRaw(rawSubscriber) {
14
17
  let subscriber = new Subscriber(rawSubscriber.id, rawSubscriber.eventTypes, rawSubscriber.projectEnvironment, rawSubscriber.task, rawSubscriber.task_execution, rawSubscriber.channels, rawSubscriber.logLevelThreshold);
15
- subscriber.state = State.fromString(rawSubscriber.state);
18
+ subscriber.state = State_1.State.fromString(rawSubscriber.state);
16
19
  return subscriber;
17
20
  }
18
21
  getLogLevelThreshold() {
@@ -22,3 +25,4 @@ export class Subscriber {
22
25
  return this.logLevelThreshold !== null;
23
26
  }
24
27
  }
28
+ 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,14 +1,18 @@
1
- import { Utils } from '../Utils';
2
- export class PagedResult {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PagedResult = void 0;
4
+ const Utils_1 = require("../Utils");
5
+ class PagedResult {
3
6
  constructor(data, pageSize = null, totalCount = null) {
4
7
  this.data = data;
5
- if (Utils.isNullOrUndefined(pageSize)) {
8
+ if (Utils_1.Utils.isNullOrUndefined(pageSize)) {
6
9
  pageSize = data.length;
7
10
  }
8
11
  this.pageSize = pageSize;
9
- if (Utils.isNullOrUndefined(totalCount)) {
12
+ if (Utils_1.Utils.isNullOrUndefined(totalCount)) {
10
13
  totalCount = data.length;
11
14
  }
12
15
  this.totalCount = totalCount;
13
16
  }
14
17
  }
18
+ exports.PagedResult = PagedResult;
@@ -1,14 +1,18 @@
1
- import { State } from '../State';
2
- export class Language {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Language = void 0;
4
+ const State_1 = require("../State");
5
+ class Language {
3
6
  constructor(id, name) {
4
- this.state = State.Active;
7
+ this.state = State_1.State.Active;
5
8
  this.id = id;
6
9
  this.name = name;
7
10
  }
8
11
  static parse(rawLanguage) {
9
12
  let language = new Language(rawLanguage.id, rawLanguage.name);
10
13
  language.description = rawLanguage.description;
11
- language.state = State.fromString(rawLanguage.state);
14
+ language.state = State_1.State.fromString(rawLanguage.state);
12
15
  return language;
13
16
  }
14
17
  }
18
+ exports.Language = Language;
@@ -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);
15
- if (Utils.isNullOrUndefined(result)) {
17
+ const result = Utils_1.Utils.parseEnum(input, ProjectDeployStatus);
18
+ if (Utils_1.Utils.isNullOrUndefined(result)) {
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 = {}));
@@ -1,10 +1,13 @@
1
- import { State } from '../State';
2
- import { Utils } from '../../Utils';
3
- export class ProjectEnvironment {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ProjectEnvironment = void 0;
4
+ const State_1 = require("../State");
5
+ const Utils_1 = require("../../Utils");
6
+ class ProjectEnvironment {
4
7
  constructor() {
5
8
  this.parent = null;
6
9
  this.isLocal = false;
7
- this.state = State.Active;
10
+ this.state = State_1.State.Active;
8
11
  }
9
12
  static parse(rawProjectEnvironment) {
10
13
  const projectEnvironment = new ProjectEnvironment();
@@ -14,8 +17,9 @@ export class ProjectEnvironment {
14
17
  projectEnvironment.name = rawProjectEnvironment.name;
15
18
  projectEnvironment.sourceBranch = rawProjectEnvironment.source_branch;
16
19
  projectEnvironment.parent = rawProjectEnvironment.parent;
17
- projectEnvironment.isLocal = Utils.isTrue(rawProjectEnvironment.is_local);
18
- projectEnvironment.state = State.fromString(rawProjectEnvironment.state);
20
+ projectEnvironment.isLocal = Utils_1.Utils.isTrue(rawProjectEnvironment.is_local);
21
+ projectEnvironment.state = State_1.State.fromString(rawProjectEnvironment.state);
19
22
  return projectEnvironment;
20
23
  }
21
24
  }
25
+ exports.ProjectEnvironment = ProjectEnvironment;
@@ -1,4 +1,7 @@
1
- export class QueueStatus {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.QueueStatus = void 0;
4
+ class QueueStatus {
2
5
  constructor(name) {
3
6
  this.messages_ready = 0;
4
7
  this.messages_handling = 0;
@@ -17,3 +20,4 @@ export class QueueStatus {
17
20
  return queue;
18
21
  }
19
22
  }
23
+ exports.QueueStatus = QueueStatus;
@@ -1,4 +1,7 @@
1
- export class DataResult {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DataResult = void 0;
4
+ class DataResult {
2
5
  constructor() {
3
6
  this.data = null;
4
7
  this.errors = [];
@@ -34,3 +37,4 @@ export class DataResult {
34
37
  return { data: this.data, errors: this.errors };
35
38
  }
36
39
  }
40
+ exports.DataResult = DataResult;