attlaz-client 1.4.7 → 1.4.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/dist/Client.js +55 -51
- package/dist/Http/HttpClient.js +17 -13
- package/dist/Http/HttpClientRequest.js +7 -3
- package/dist/Http/HttpClientRequest.spec.js +5 -3
- package/dist/Http/HttpClientResponse.js +5 -1
- package/dist/Http/OAuthClient.js +17 -13
- package/dist/Http/OAuthClient.spec.js +6 -4
- package/dist/Http/OAuthClientOptions.js +5 -1
- package/dist/Http/OAuthClientToken.js +5 -1
- package/dist/Model/Adapter/Adapter.js +5 -1
- package/dist/Model/Adapter/AdapterConfiguration.js +5 -1
- package/dist/Model/Adapter/AdapterConnection.js +5 -1
- package/dist/Model/Config.js +11 -7
- package/dist/Model/DataValue.d.ts +5 -0
- package/dist/Model/DataValue.js +6 -0
- package/dist/Model/Error/ClientError.js +16 -12
- package/dist/Model/Event/EventType.js +5 -2
- package/dist/Model/HealthAlert/HealthAlert.d.ts +3 -5
- package/dist/Model/HealthAlert/HealthAlert.js +8 -4
- package/dist/Model/HealthAlert/HealthAlertStatus.js +9 -6
- package/dist/Model/HealthAlert/HealthTestType.js +9 -6
- package/dist/Model/Log/Log.d.ts +6 -6
- package/dist/Model/Log/Log.js +14 -5
- package/dist/Model/Log/LogLevel.js +9 -6
- package/dist/Model/Log/LogQuery.d.ts +2 -1
- package/dist/Model/Log/LogQuery.js +5 -1
- package/dist/Model/Log/LogStatus.d.ts +8 -0
- package/dist/Model/Log/LogStatus.js +20 -0
- package/dist/Model/Log/LogStreamId.js +5 -1
- package/dist/Model/Messaging/Channel/Channel.js +12 -8
- package/dist/Model/Messaging/Channel/ChannelData.js +5 -1
- package/dist/Model/Messaging/Channel/ChannelType.js +9 -6
- package/dist/Model/Messaging/Channel/EmailChannelData.js +8 -4
- package/dist/Model/Messaging/Channel/PushChannelData.js +8 -4
- package/dist/Model/Messaging/Channel/SlackChannelData.js +8 -4
- package/dist/Model/Messaging/Channel/SmsChannelData.js +8 -4
- package/dist/Model/Messaging/Channel/WebhookChannelData.js +8 -4
- package/dist/Model/Messaging/ChannelHistory.js +7 -3
- package/dist/Model/Messaging/Subscriber.js +8 -4
- package/dist/Model/Notification.js +5 -1
- package/dist/Model/PagedResult.js +8 -4
- package/dist/Model/Project/Language.js +8 -4
- package/dist/Model/Project/Project.js +8 -4
- package/dist/Model/Project/ProjectDeploy.js +12 -8
- package/dist/Model/Project/ProjectDeployCommit.js +5 -1
- package/dist/Model/Project/ProjectDeployStatus.js +9 -6
- package/dist/Model/Project/ProjectEnvironment.js +10 -6
- package/dist/Model/Queue/QueueStatus.js +5 -1
- package/dist/Model/Result/DataResult.js +5 -1
- package/dist/Model/Result/DataResultCollection.js +5 -1
- package/dist/Model/Result/ResultError.js +5 -1
- package/dist/Model/SourcesAccount.js +5 -1
- package/dist/Model/SourcesAccountRepository.js +5 -1
- package/dist/Model/State.js +9 -6
- package/dist/Model/StateAware.js +2 -0
- package/dist/Model/Storage/Storage.js +5 -1
- package/dist/Model/Storage/StorageType.js +9 -6
- package/dist/Model/Task.js +8 -4
- package/dist/Model/TaskExecution.js +5 -1
- package/dist/Model/TaskExecutionHistory.js +7 -3
- package/dist/Model/TaskExecutionResponse.js +5 -1
- package/dist/Model/TaskExecutionStatus.js +9 -6
- package/dist/Model/TaskExecutionSummary.js +11 -7
- package/dist/Model/TaskSummary.js +12 -8
- package/dist/Model/Team/Team.js +5 -1
- package/dist/Model/Team/TeamMember.js +5 -1
- package/dist/Model/Team/TeamMemberInvite.js +7 -3
- package/dist/Model/Team/TeamMemberInvite2.js +5 -1
- package/dist/Model/Team/TeamMemberInviteState.js +9 -6
- package/dist/Model/Team/TeamMemberRole.js +8 -5
- package/dist/Model/Trigger/ApiTrigger.js +8 -4
- package/dist/Model/Trigger/ApiTriggerData.js +6 -2
- package/dist/Model/Trigger/ScheduleTrigger.js +8 -4
- package/dist/Model/Trigger/ScheduleTriggerData.js +6 -2
- package/dist/Model/Trigger/Trigger.js +19 -15
- package/dist/Model/Trigger/TriggerData.js +5 -1
- package/dist/Model/Trigger/TriggerType.js +9 -6
- package/dist/Model/Trigger/WebhookTrigger.js +8 -4
- package/dist/Model/Trigger/WebhookTriggerData.js +6 -2
- package/dist/Model/User/UserAuthProvider.js +10 -6
- package/dist/Model/User.js +10 -6
- package/dist/Model/Worker/Worker.js +11 -7
- package/dist/Model/Worker/WorkerConfig.js +5 -1
- package/dist/Model/Worker/WorkerImage.js +8 -4
- package/dist/Model/Worker/WorkerInstance.js +7 -3
- package/dist/Model/Worker/WorkerInstanceState.js +9 -6
- package/dist/Model/Worker/WorkerState.js +9 -6
- package/dist/Service/AdapterEndpoint.js +14 -10
- package/dist/Service/ChannelEndpoint.js +15 -11
- package/dist/Service/ConfigEndpoint.js +12 -8
- package/dist/Service/Endpoint.js +7 -3
- package/dist/Service/HealthAlertEndpoint.js +10 -6
- package/dist/Service/LanguageEndpoint.js +10 -6
- package/dist/Service/LogEndpoint.d.ts +2 -1
- package/dist/Service/LogEndpoint.js +26 -20
- package/dist/Service/NotificationsEndpoint.js +8 -4
- package/dist/Service/ProjectDeployEndpoint.js +11 -7
- package/dist/Service/ProjectEndpoint.js +13 -9
- package/dist/Service/ProjectEnvironmentEndpoint.js +6 -2
- package/dist/Service/QueueEndpoint.js +10 -6
- package/dist/Service/SourcesAccountEndpoint.js +10 -6
- package/dist/Service/StorageEndpoint.js +13 -9
- package/dist/Service/SubscriberEndpoint.js +11 -7
- package/dist/Service/TaskEndpoint.js +18 -14
- package/dist/Service/TaskExecutionEndpoint.js +24 -20
- package/dist/Service/TaskExecutionRequestEndpoint.js +6 -2
- package/dist/Service/TeamMemberEndpoint.js +19 -15
- package/dist/Service/TeamsEndpoint.js +10 -6
- package/dist/Service/TriggerEndpoint.js +13 -9
- package/dist/Service/UserEndpoint.js +15 -11
- package/dist/Service/WorkerConfigEndpoint.js +11 -7
- package/dist/Service/WorkerEndpoint.js +12 -8
- package/dist/Utils.js +5 -1
- package/dist/Utils.spec.js +23 -21
- package/dist/auth.spec.js +24 -22
- package/dist/data.spec.js +5 -3
- package/dist/index.d.ts +2 -1
- package/dist/index.js +207 -100
- package/dist/test.js +13 -11
- package/package.json +9 -7
- package/dist/Model/Log/LogType.d.ts +0 -10
- package/dist/Model/Log/LogType.js +0 -20
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 = {}));
|
package/dist/Model/Log/Log.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { LogLevel } from "./LogLevel";
|
|
2
2
|
import { LogStreamId } from './LogStreamId';
|
|
3
|
+
import { DataValue, DataValueValue } from '../DataValue';
|
|
4
|
+
import { LogStatus } from './LogStatus';
|
|
3
5
|
export declare class Log {
|
|
4
6
|
id: string;
|
|
5
7
|
readonly logStream: LogStreamId;
|
|
@@ -7,13 +9,11 @@ export declare class Log {
|
|
|
7
9
|
readonly level: LogLevel;
|
|
8
10
|
message: string;
|
|
9
11
|
context: object;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
value: string;
|
|
13
|
-
}>;
|
|
12
|
+
status: LogStatus;
|
|
13
|
+
tags: DataValue[];
|
|
14
14
|
_version: string;
|
|
15
15
|
constructor(logStream: LogStreamId, level: LogLevel, date: Date);
|
|
16
16
|
static parse(rawLog: any): Log;
|
|
17
|
-
setTag(key: string, value:
|
|
18
|
-
getTagValue(key: string):
|
|
17
|
+
setTag(key: string, value: DataValueValue): void;
|
|
18
|
+
getTagValue(key: string): DataValueValue | null;
|
|
19
19
|
}
|
package/dist/Model/Log/Log.js
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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
|
+
class Log {
|
|
4
8
|
constructor(logStream, level, date) {
|
|
9
|
+
this.status = LogStatus_1.LogStatus.Normal;
|
|
5
10
|
this.tags = [];
|
|
6
11
|
this.logStream = logStream;
|
|
7
12
|
this.level = level;
|
|
@@ -9,12 +14,15 @@ export class Log {
|
|
|
9
14
|
}
|
|
10
15
|
static parse(rawLog) {
|
|
11
16
|
const date = new Date(rawLog.date);
|
|
12
|
-
const level = LogLevel.fromString(rawLog.level);
|
|
13
|
-
const logStream = new LogStreamId(rawLog.logStream.id);
|
|
17
|
+
const level = LogLevel_1.LogLevel.fromString(rawLog.level);
|
|
18
|
+
const logStream = new LogStreamId_1.LogStreamId(rawLog.logStream.id);
|
|
14
19
|
let log = new Log(logStream, level, date);
|
|
15
20
|
log.id = rawLog.id;
|
|
16
21
|
log.message = rawLog.message;
|
|
17
22
|
log.context = rawLog.context;
|
|
23
|
+
if (rawLog.status !== null && rawLog.status !== undefined && rawLog.status !== '') {
|
|
24
|
+
log.status = LogStatus_1.LogStatus.fromString(rawLog.status);
|
|
25
|
+
}
|
|
18
26
|
log.tags = rawLog.tags;
|
|
19
27
|
log._version = rawLog._version;
|
|
20
28
|
return log;
|
|
@@ -31,3 +39,4 @@ export class Log {
|
|
|
31
39
|
return null;
|
|
32
40
|
}
|
|
33
41
|
}
|
|
42
|
+
exports.Log = Log;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
-
|
|
11
|
+
values: DataValueValue[];
|
|
11
12
|
}>;
|
|
12
13
|
pageSize: number;
|
|
13
14
|
pageNum: number;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
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;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LogStatus = void 0;
|
|
4
|
+
const __1 = require("../..");
|
|
5
|
+
var LogStatus;
|
|
6
|
+
(function (LogStatus) {
|
|
7
|
+
LogStatus["Normal"] = "normal";
|
|
8
|
+
LogStatus["Ignored"] = "ignored";
|
|
9
|
+
LogStatus["Resolved"] = "resolved";
|
|
10
|
+
})(LogStatus = exports.LogStatus || (exports.LogStatus = {}));
|
|
11
|
+
(function (LogStatus) {
|
|
12
|
+
function fromString(input) {
|
|
13
|
+
const result = __1.Utils.parseEnum(input, LogStatus);
|
|
14
|
+
if (result === null) {
|
|
15
|
+
throw new Error('Unable to parse LogStatus from string: Unknown LogStatus "' + input + '"');
|
|
16
|
+
}
|
|
17
|
+
return result;
|
|
18
|
+
}
|
|
19
|
+
LogStatus.fromString = fromString;
|
|
20
|
+
})(LogStatus = exports.LogStatus || (exports.LogStatus = {}));
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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
|
-
|
|
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
|
-
|
|
2
|
-
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
|
|
2
|
-
|
|
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
|
-
|
|
2
|
-
|
|
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,14 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
-
|
|
2
|
-
|
|
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
|
-
|
|
2
|
-
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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,5 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
|
|
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;
|