attlaz-client 1.7.0 → 1.7.3
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 -59
- package/dist/Http/HttpClient.d.ts +0 -1
- package/dist/Http/HttpClient.js +27 -39
- package/dist/Http/HttpClientRequest.js +5 -9
- package/dist/Http/HttpClientRequest.spec.js +3 -5
- package/dist/Http/HttpClientResponse.js +1 -5
- package/dist/Http/OAuthClient.js +18 -22
- package/dist/Http/OAuthClient.spec.js +4 -6
- package/dist/Http/OAuthClientOptions.js +1 -5
- package/dist/Http/OAuthClientToken.js +1 -5
- package/dist/Model/Adapter/Adapter.js +1 -5
- package/dist/Model/Adapter/AdapterConfiguration.js +1 -5
- package/dist/Model/Adapter/AdapterConnection.js +4 -8
- package/dist/Model/Config.js +7 -11
- package/dist/Model/DataValue.js +1 -5
- package/dist/Model/DataValueCollection.js +6 -10
- package/dist/Model/Error/ClientError.js +13 -17
- package/dist/Model/Event/EventType.js +2 -5
- package/dist/Model/HealthAlert/HealthAlert.js +4 -8
- package/dist/Model/HealthAlert/HealthAlertStatus.js +5 -8
- package/dist/Model/HealthAlert/HealthTestType.js +5 -8
- package/dist/Model/JsonSerializable.js +1 -5
- package/dist/Model/Log/Log.js +11 -15
- package/dist/Model/Log/LogLevel.js +5 -8
- package/dist/Model/Log/LogQuery.js +1 -5
- package/dist/Model/Log/LogStatus.js +5 -8
- package/dist/Model/Log/LogStreamId.js +1 -5
- package/dist/Model/Messaging/Channel/Channel.js +8 -12
- package/dist/Model/Messaging/Channel/ChannelData.js +1 -5
- package/dist/Model/Messaging/Channel/ChannelType.js +5 -8
- package/dist/Model/Messaging/Channel/EmailChannelData.js +4 -8
- package/dist/Model/Messaging/Channel/PushChannelData.js +4 -8
- package/dist/Model/Messaging/Channel/SlackChannelData.js +4 -8
- package/dist/Model/Messaging/Channel/SmsChannelData.js +4 -8
- package/dist/Model/Messaging/Channel/WebhookChannelData.js +4 -8
- package/dist/Model/Messaging/ChannelHistory.js +3 -7
- package/dist/Model/Messaging/Subscriber.js +6 -10
- package/dist/Model/Notification.js +1 -5
- package/dist/Model/PagedResult.js +1 -5
- package/dist/Model/Project/PlatformLanguage.js +4 -8
- package/dist/Model/Project/Project.js +4 -8
- package/dist/Model/Project/ProjectDeploy.js +8 -12
- package/dist/Model/Project/ProjectDeployCommit.js +1 -5
- package/dist/Model/Project/ProjectDeployStatus.js +5 -8
- package/dist/Model/Project/ProjectEnvironment.js +6 -10
- package/dist/Model/Queue/QueueStatus.js +1 -5
- package/dist/Model/Result/DataResult.js +1 -5
- package/dist/Model/Result/DataResult.spec.js +2 -4
- package/dist/Model/Result/DataResultCollection.js +1 -5
- package/dist/Model/Result/ResultError.js +1 -5
- package/dist/Model/SourcesAccount.js +1 -5
- package/dist/Model/SourcesAccountRepository.js +1 -5
- package/dist/Model/State.js +5 -8
- package/dist/Model/StateAware.js +1 -2
- package/dist/Model/Storage/StorageInformation.js +1 -5
- package/dist/Model/Storage/StorageType.js +5 -8
- package/dist/Model/Task.js +4 -8
- package/dist/Model/TaskExecution/TaskExecutionStats.js +1 -5
- package/dist/Model/TaskExecution.js +1 -5
- package/dist/Model/TaskExecutionHistory.js +3 -7
- package/dist/Model/TaskExecutionResponse.js +1 -5
- package/dist/Model/TaskExecutionStatus.js +5 -8
- package/dist/Model/TaskExecutionSummary.js +7 -11
- package/dist/Model/TaskSummary.js +8 -12
- package/dist/Model/Team/Team.js +1 -5
- package/dist/Model/Team/TeamMember.js +1 -5
- package/dist/Model/Team/TeamMemberInvite.js +3 -7
- package/dist/Model/Team/TeamMemberInvite2.js +1 -5
- package/dist/Model/Team/TeamMemberInviteState.js +5 -8
- package/dist/Model/Team/TeamMemberRole.js +5 -8
- package/dist/Model/Trigger/ApiTrigger.js +4 -8
- package/dist/Model/Trigger/ApiTriggerData.js +2 -6
- package/dist/Model/Trigger/ScheduleTrigger.js +4 -8
- package/dist/Model/Trigger/ScheduleTriggerData.js +2 -6
- package/dist/Model/Trigger/Trigger.js +15 -19
- package/dist/Model/Trigger/TriggerData.js +1 -5
- package/dist/Model/Trigger/TriggerType.js +5 -8
- package/dist/Model/Trigger/WebhookTrigger.js +4 -8
- package/dist/Model/Trigger/WebhookTriggerData.js +2 -6
- package/dist/Model/User/UserAuthProvider.js +6 -10
- package/dist/Model/User.js +6 -10
- package/dist/Model/Worker/Platform.js +8 -12
- package/dist/Model/Worker/PlatformImage.js +6 -10
- package/dist/Model/Worker/Worker.js +7 -11
- package/dist/Model/Worker/WorkerConfig.js +1 -5
- package/dist/Model/Worker/WorkerInstance.js +3 -7
- package/dist/Model/Worker/WorkerInstanceState.js +5 -8
- package/dist/Model/Worker/WorkerState.js +5 -8
- package/dist/Service/AdapterEndpoint.js +11 -15
- package/dist/Service/ChannelEndpoint.js +11 -15
- package/dist/Service/ConfigEndpoint.js +8 -12
- package/dist/Service/Endpoint.js +3 -7
- package/dist/Service/HealthAlertEndpoint.js +4 -8
- package/dist/Service/LogEndpoint.js +15 -19
- package/dist/Service/NotificationsEndpoint.js +4 -8
- package/dist/Service/PlatformEndpoint.js +6 -10
- package/dist/Service/PlatformLanguageEndpoint.js +4 -8
- package/dist/Service/ProjectDeployEndpoint.js +7 -11
- package/dist/Service/ProjectEndpoint.js +9 -13
- package/dist/Service/ProjectEnvironmentEndpoint.js +2 -6
- package/dist/Service/QueueEndpoint.js +6 -10
- package/dist/Service/SourcesAccountEndpoint.js +8 -12
- package/dist/Service/StorageEndpoint.js +2 -6
- package/dist/Service/SubscriberEndpoint.js +7 -11
- package/dist/Service/TaskEndpoint.js +14 -18
- package/dist/Service/TaskExecutionEndpoint.d.ts +1 -1
- package/dist/Service/TaskExecutionEndpoint.js +16 -20
- package/dist/Service/TaskExecutionRequestEndpoint.js +2 -6
- package/dist/Service/TaskExecutionStatsEndpoint.js +4 -8
- package/dist/Service/TeamMemberEndpoint.js +14 -18
- package/dist/Service/TeamsEndpoint.js +6 -10
- package/dist/Service/TriggerEndpoint.js +9 -13
- package/dist/Service/UserEndpoint.js +10 -14
- package/dist/Service/WorkerConfigEndpoint.js +7 -11
- package/dist/Service/WorkerEndpoint.js +7 -11
- package/dist/Utils.js +1 -5
- package/dist/Utils.spec.js +32 -34
- package/dist/auth.spec.js +22 -24
- package/dist/data.spec.js +3 -5
- package/dist/index.d.ts +1 -0
- package/dist/index.js +106 -215
- package/dist/test.js +11 -13
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -4
- package/package.json +4 -3
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const ProjectDeployCommit_1 = require("./ProjectDeployCommit");
|
|
6
|
-
const Utils_1 = require("../../Utils");
|
|
7
|
-
class ProjectDeploy {
|
|
1
|
+
import { ProjectDeployStatus } from './ProjectDeployStatus';
|
|
2
|
+
import { ProjectDeployCommit } from './ProjectDeployCommit';
|
|
3
|
+
import { Utils } from '../../Utils';
|
|
4
|
+
export class ProjectDeploy {
|
|
8
5
|
constructor() {
|
|
9
|
-
this.status =
|
|
6
|
+
this.status = ProjectDeployStatus.Unknown;
|
|
10
7
|
this.commits = [];
|
|
11
8
|
}
|
|
12
9
|
static parse(rawProjectDeploy) {
|
|
@@ -17,14 +14,14 @@ class ProjectDeploy {
|
|
|
17
14
|
projectDeploy.requested = new Date(rawProjectDeploy.requested);
|
|
18
15
|
projectDeploy.started = new Date(rawProjectDeploy.started);
|
|
19
16
|
projectDeploy.finished = new Date(rawProjectDeploy.finished);
|
|
20
|
-
projectDeploy.status =
|
|
21
|
-
if (!
|
|
17
|
+
projectDeploy.status = ProjectDeployStatus.fromString(rawProjectDeploy.status);
|
|
18
|
+
if (!Utils.isNullOrUndefined(rawProjectDeploy.bytes)) {
|
|
22
19
|
projectDeploy.bytes = parseInt(rawProjectDeploy.bytes);
|
|
23
20
|
}
|
|
24
21
|
projectDeploy.commit_hash = rawProjectDeploy.commit_hash;
|
|
25
22
|
const rawProjectDeployCommits = rawProjectDeploy.commits;
|
|
26
23
|
for (let rawProjectDeployCommit of rawProjectDeployCommits) {
|
|
27
|
-
let projectDeployCommit = new
|
|
24
|
+
let projectDeployCommit = new ProjectDeployCommit();
|
|
28
25
|
projectDeployCommit.commit_hash = rawProjectDeployCommit.commit_hash;
|
|
29
26
|
projectDeployCommit.commit_date = new Date(rawProjectDeployCommit.commit_date);
|
|
30
27
|
projectDeployCommit.commit_message = rawProjectDeployCommit.commit_message;
|
|
@@ -35,4 +32,3 @@ class ProjectDeploy {
|
|
|
35
32
|
return projectDeploy;
|
|
36
33
|
}
|
|
37
34
|
}
|
|
38
|
-
exports.ProjectDeploy = ProjectDeploy;
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.ProjectDeployStatus = void 0;
|
|
4
|
-
const Utils_1 = require("../../Utils");
|
|
5
|
-
var ProjectDeployStatus;
|
|
1
|
+
import { Utils } from '../../Utils';
|
|
2
|
+
export var ProjectDeployStatus;
|
|
6
3
|
(function (ProjectDeployStatus) {
|
|
7
4
|
ProjectDeployStatus["Unknown"] = "unknown";
|
|
8
5
|
ProjectDeployStatus["Pending"] = "pending";
|
|
@@ -11,14 +8,14 @@ var ProjectDeployStatus;
|
|
|
11
8
|
ProjectDeployStatus["Failed"] = "failed";
|
|
12
9
|
ProjectDeployStatus["Stopped"] = "stopped";
|
|
13
10
|
ProjectDeployStatus["Complete"] = "complete";
|
|
14
|
-
})(ProjectDeployStatus
|
|
11
|
+
})(ProjectDeployStatus || (ProjectDeployStatus = {}));
|
|
15
12
|
(function (ProjectDeployStatus) {
|
|
16
13
|
function fromString(input) {
|
|
17
|
-
const result =
|
|
14
|
+
const result = Utils.parseEnum(input, ProjectDeployStatus);
|
|
18
15
|
if (result === null) {
|
|
19
16
|
throw new Error('Unable to parse ProjectDeployStatus from string: Unknown ProjectDeployStatus "' + input + '"');
|
|
20
17
|
}
|
|
21
18
|
return result;
|
|
22
19
|
}
|
|
23
20
|
ProjectDeployStatus.fromString = fromString;
|
|
24
|
-
})(ProjectDeployStatus
|
|
21
|
+
})(ProjectDeployStatus || (ProjectDeployStatus = {}));
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const State_1 = require("../State");
|
|
5
|
-
const Utils_1 = require("../../Utils");
|
|
6
|
-
class ProjectEnvironment {
|
|
1
|
+
import { State } from '../State';
|
|
2
|
+
import { Utils } from '../../Utils';
|
|
3
|
+
export class ProjectEnvironment {
|
|
7
4
|
constructor() {
|
|
8
5
|
this.parent = null;
|
|
9
6
|
this.isLocal = false;
|
|
10
|
-
this.state =
|
|
7
|
+
this.state = State.Active;
|
|
11
8
|
}
|
|
12
9
|
static parse(rawProjectEnvironment) {
|
|
13
10
|
const projectEnvironment = new ProjectEnvironment();
|
|
@@ -17,9 +14,8 @@ class ProjectEnvironment {
|
|
|
17
14
|
projectEnvironment.name = rawProjectEnvironment.name;
|
|
18
15
|
projectEnvironment.sourceBranch = rawProjectEnvironment.source_branch;
|
|
19
16
|
projectEnvironment.parent = rawProjectEnvironment.parent;
|
|
20
|
-
projectEnvironment.isLocal =
|
|
21
|
-
projectEnvironment.state =
|
|
17
|
+
projectEnvironment.isLocal = Utils.isTrue(rawProjectEnvironment.is_local);
|
|
18
|
+
projectEnvironment.state = State.fromString(rawProjectEnvironment.state);
|
|
22
19
|
return projectEnvironment;
|
|
23
20
|
}
|
|
24
21
|
}
|
|
25
|
-
exports.ProjectEnvironment = ProjectEnvironment;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.QueueStatus = void 0;
|
|
4
|
-
class QueueStatus {
|
|
1
|
+
export class QueueStatus {
|
|
5
2
|
constructor(name) {
|
|
6
3
|
this.messages_ready = 0;
|
|
7
4
|
this.messages_handling = 0;
|
|
@@ -20,4 +17,3 @@ class QueueStatus {
|
|
|
20
17
|
return queue;
|
|
21
18
|
}
|
|
22
19
|
}
|
|
23
|
-
exports.QueueStatus = QueueStatus;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DataResult = void 0;
|
|
4
|
-
class DataResult {
|
|
1
|
+
export class DataResult {
|
|
5
2
|
constructor(data = null) {
|
|
6
3
|
this.data = data;
|
|
7
4
|
this.errors = [];
|
|
@@ -53,4 +50,3 @@ class DataResult {
|
|
|
53
50
|
return { data: this.data, errors: this.errors };
|
|
54
51
|
}
|
|
55
52
|
}
|
|
56
|
-
exports.DataResult = DataResult;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const DataResult_1 = require("./DataResult");
|
|
1
|
+
import { DataResult } from './DataResult';
|
|
4
2
|
test('Test parsing', () => {
|
|
5
|
-
expect(
|
|
3
|
+
expect(DataResult.parse(null)).toBe(null);
|
|
6
4
|
});
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DataResultCollection = void 0;
|
|
4
|
-
class DataResultCollection {
|
|
1
|
+
export class DataResultCollection {
|
|
5
2
|
constructor() {
|
|
6
3
|
this.data = [];
|
|
7
4
|
}
|
|
@@ -24,4 +21,3 @@ class DataResultCollection {
|
|
|
24
21
|
return this.data;
|
|
25
22
|
}
|
|
26
23
|
}
|
|
27
|
-
exports.DataResultCollection = DataResultCollection;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SourcesAccount = void 0;
|
|
4
|
-
class SourcesAccount {
|
|
1
|
+
export class SourcesAccount {
|
|
5
2
|
static parse(rawSourcesAccount) {
|
|
6
3
|
let sourcesAccount = new SourcesAccount();
|
|
7
4
|
sourcesAccount.id = rawSourcesAccount.id;
|
|
@@ -15,4 +12,3 @@ class SourcesAccount {
|
|
|
15
12
|
return sourcesAccount;
|
|
16
13
|
}
|
|
17
14
|
}
|
|
18
|
-
exports.SourcesAccount = SourcesAccount;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SourcesAccountRepository = void 0;
|
|
4
|
-
class SourcesAccountRepository {
|
|
1
|
+
export class SourcesAccountRepository {
|
|
5
2
|
static parse(rawSourcesAccountRepository) {
|
|
6
3
|
let sourcesAccountRepository = new SourcesAccountRepository();
|
|
7
4
|
sourcesAccountRepository.key = rawSourcesAccountRepository.key;
|
|
@@ -9,4 +6,3 @@ class SourcesAccountRepository {
|
|
|
9
6
|
return sourcesAccountRepository;
|
|
10
7
|
}
|
|
11
8
|
}
|
|
12
|
-
exports.SourcesAccountRepository = SourcesAccountRepository;
|
package/dist/Model/State.js
CHANGED
|
@@ -1,20 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.State = void 0;
|
|
4
|
-
const Utils_1 = require("../Utils");
|
|
5
|
-
var State;
|
|
1
|
+
import { Utils } from '../Utils';
|
|
2
|
+
export var State;
|
|
6
3
|
(function (State) {
|
|
7
4
|
State["Active"] = "active";
|
|
8
5
|
State["Inactive"] = "inactive";
|
|
9
6
|
State["Removed"] = "removed";
|
|
10
|
-
})(State
|
|
7
|
+
})(State || (State = {}));
|
|
11
8
|
(function (State) {
|
|
12
9
|
function fromString(input) {
|
|
13
|
-
const result =
|
|
10
|
+
const result = Utils.parseEnum(input, State);
|
|
14
11
|
if (result === null) {
|
|
15
12
|
throw new Error('Unable to parse State from string: Unknown State "' + input + '"');
|
|
16
13
|
}
|
|
17
14
|
return result;
|
|
18
15
|
}
|
|
19
16
|
State.fromString = fromString;
|
|
20
|
-
})(State
|
|
17
|
+
})(State || (State = {}));
|
package/dist/Model/StateAware.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,21 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.StorageType = void 0;
|
|
4
|
-
const Utils_1 = require("../../Utils");
|
|
5
|
-
var StorageType;
|
|
1
|
+
import { Utils } from '../../Utils';
|
|
2
|
+
export var StorageType;
|
|
6
3
|
(function (StorageType) {
|
|
7
4
|
StorageType["Cache"] = "cache";
|
|
8
5
|
StorageType["Persistent"] = "persistent";
|
|
9
6
|
StorageType["Vault"] = "vault";
|
|
10
7
|
StorageType["Infrastructure"] = "infrastructure";
|
|
11
|
-
})(StorageType
|
|
8
|
+
})(StorageType || (StorageType = {}));
|
|
12
9
|
(function (StorageType) {
|
|
13
10
|
function fromString(input) {
|
|
14
|
-
const result =
|
|
11
|
+
const result = Utils.parseEnum(input, StorageType);
|
|
15
12
|
if (result === null) {
|
|
16
13
|
throw new Error('Unable to parse StorageType from string: Unknown StorageType "' + input + '"');
|
|
17
14
|
}
|
|
18
15
|
return result;
|
|
19
16
|
}
|
|
20
17
|
StorageType.fromString = fromString;
|
|
21
|
-
})(StorageType
|
|
18
|
+
})(StorageType || (StorageType = {}));
|
package/dist/Model/Task.js
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.Task = void 0;
|
|
4
|
-
const State_1 = require("./State");
|
|
5
|
-
class Task {
|
|
1
|
+
import { State } from './State';
|
|
2
|
+
export class Task {
|
|
6
3
|
constructor() {
|
|
7
4
|
this.direct = false;
|
|
8
|
-
this.state =
|
|
5
|
+
this.state = State.Active;
|
|
9
6
|
}
|
|
10
7
|
static parse(rawTask) {
|
|
11
8
|
const task = new Task();
|
|
@@ -15,8 +12,7 @@ class Task {
|
|
|
15
12
|
task.name = rawTask.name;
|
|
16
13
|
task.description = rawTask.description;
|
|
17
14
|
task.direct = rawTask.direct;
|
|
18
|
-
task.state =
|
|
15
|
+
task.state = State.fromString(rawTask.state);
|
|
19
16
|
return task;
|
|
20
17
|
}
|
|
21
18
|
}
|
|
22
|
-
exports.Task = Task;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TaskExecutionStats = void 0;
|
|
4
|
-
class TaskExecutionStats {
|
|
1
|
+
export class TaskExecutionStats {
|
|
5
2
|
constructor() {
|
|
6
3
|
this.memory = null;
|
|
7
4
|
this.memoryLimit = null;
|
|
@@ -13,4 +10,3 @@ class TaskExecutionStats {
|
|
|
13
10
|
this.fileWrite = null;
|
|
14
11
|
}
|
|
15
12
|
}
|
|
16
|
-
exports.TaskExecutionStats = TaskExecutionStats;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TaskExecution = void 0;
|
|
4
|
-
class TaskExecution {
|
|
1
|
+
export class TaskExecution {
|
|
5
2
|
constructor() {
|
|
6
3
|
this.logsPurged = false;
|
|
7
4
|
}
|
|
@@ -19,4 +16,3 @@ class TaskExecution {
|
|
|
19
16
|
return taskExecution;
|
|
20
17
|
}
|
|
21
18
|
}
|
|
22
|
-
exports.TaskExecution = TaskExecution;
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.TaskExecutionHistory = void 0;
|
|
4
|
-
const TaskExecutionStatus_1 = require("./TaskExecutionStatus");
|
|
5
|
-
class TaskExecutionHistory {
|
|
1
|
+
import { TaskExecutionStatus } from './TaskExecutionStatus';
|
|
2
|
+
export class TaskExecutionHistory {
|
|
6
3
|
static parse(rawTaskExecutionHistory) {
|
|
7
4
|
let taskExecutionHistory = new TaskExecutionHistory();
|
|
8
5
|
taskExecutionHistory.id = rawTaskExecutionHistory.id;
|
|
9
6
|
taskExecutionHistory.time = new Date(rawTaskExecutionHistory.time);
|
|
10
|
-
taskExecutionHistory.status =
|
|
7
|
+
taskExecutionHistory.status = TaskExecutionStatus.fromString(rawTaskExecutionHistory.status);
|
|
11
8
|
return taskExecutionHistory;
|
|
12
9
|
}
|
|
13
10
|
}
|
|
14
|
-
exports.TaskExecutionHistory = TaskExecutionHistory;
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.TaskExecutionStatus = void 0;
|
|
4
|
-
const Utils_1 = require("../Utils");
|
|
5
|
-
var TaskExecutionStatus;
|
|
1
|
+
import { Utils } from '../Utils';
|
|
2
|
+
export var TaskExecutionStatus;
|
|
6
3
|
(function (TaskExecutionStatus) {
|
|
7
4
|
TaskExecutionStatus[TaskExecutionStatus["Unknown"] = "unknown"] = "Unknown";
|
|
8
5
|
TaskExecutionStatus[TaskExecutionStatus["Pending"] = "pending"] = "Pending";
|
|
@@ -11,14 +8,14 @@ var TaskExecutionStatus;
|
|
|
11
8
|
TaskExecutionStatus[TaskExecutionStatus["Failed"] = "failed"] = "Failed";
|
|
12
9
|
TaskExecutionStatus[TaskExecutionStatus["Stopped"] = "stopped"] = "Stopped";
|
|
13
10
|
TaskExecutionStatus[TaskExecutionStatus["Complete"] = "complete"] = "Complete";
|
|
14
|
-
})(TaskExecutionStatus
|
|
11
|
+
})(TaskExecutionStatus || (TaskExecutionStatus = {}));
|
|
15
12
|
(function (TaskExecutionStatus) {
|
|
16
13
|
function fromString(input) {
|
|
17
|
-
const result =
|
|
14
|
+
const result = Utils.parseEnum(input, TaskExecutionStatus);
|
|
18
15
|
if (result === null) {
|
|
19
16
|
throw new Error('Unable to parse TaskExecutionStatus from string: Unknown TaskExecutionStatus "' + input + '"');
|
|
20
17
|
}
|
|
21
18
|
return result;
|
|
22
19
|
}
|
|
23
20
|
TaskExecutionStatus.fromString = fromString;
|
|
24
|
-
})(TaskExecutionStatus
|
|
21
|
+
})(TaskExecutionStatus || (TaskExecutionStatus = {}));
|
|
@@ -1,23 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const TaskExecution_1 = require("./TaskExecution");
|
|
6
|
-
const Utils_1 = require("../Utils");
|
|
7
|
-
class TaskExecutionSummary extends TaskExecution_1.TaskExecution {
|
|
1
|
+
import { TaskExecutionStatus } from "./TaskExecutionStatus";
|
|
2
|
+
import { TaskExecution } from './TaskExecution';
|
|
3
|
+
import { Utils } from '../Utils';
|
|
4
|
+
export class TaskExecutionSummary extends TaskExecution {
|
|
8
5
|
constructor() {
|
|
9
6
|
super(...arguments);
|
|
10
|
-
this.status =
|
|
7
|
+
this.status = TaskExecutionStatus.Unknown;
|
|
11
8
|
}
|
|
12
9
|
static parse(rawTaskExecutionSummary) {
|
|
13
|
-
let taskExecutionSummary =
|
|
10
|
+
let taskExecutionSummary = TaskExecution.parse(rawTaskExecutionSummary);
|
|
14
11
|
if (rawTaskExecutionSummary.time === null || rawTaskExecutionSummary.time === undefined) {
|
|
15
12
|
throw new Error('Task execution time cannot be empty');
|
|
16
13
|
}
|
|
17
|
-
taskExecutionSummary.time =
|
|
14
|
+
taskExecutionSummary.time = Utils.parseRawDate(rawTaskExecutionSummary.time);
|
|
18
15
|
taskExecutionSummary.duration = rawTaskExecutionSummary.duration;
|
|
19
16
|
taskExecutionSummary.status = rawTaskExecutionSummary.status;
|
|
20
17
|
return taskExecutionSummary;
|
|
21
18
|
}
|
|
22
19
|
}
|
|
23
|
-
exports.TaskExecutionSummary = TaskExecutionSummary;
|
|
@@ -1,26 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const Task_1 = require("./Task");
|
|
6
|
-
const Utils_1 = require("../Utils");
|
|
7
|
-
class TaskSummary extends Task_1.Task {
|
|
1
|
+
import { TaskExecutionStatus } from "./TaskExecutionStatus";
|
|
2
|
+
import { Task } from './Task';
|
|
3
|
+
import { Utils } from '../Utils';
|
|
4
|
+
export class TaskSummary extends Task {
|
|
8
5
|
constructor() {
|
|
9
6
|
super(...arguments);
|
|
10
|
-
this.status =
|
|
7
|
+
this.status = TaskExecutionStatus.Unknown;
|
|
11
8
|
this.lastExecution = null;
|
|
12
9
|
this.averageExecutionDuration = null;
|
|
13
10
|
this.executionCount = 0;
|
|
14
11
|
}
|
|
15
12
|
static parse(rawTask) {
|
|
16
|
-
let task =
|
|
17
|
-
task.status =
|
|
13
|
+
let task = Task.parse(rawTask);
|
|
14
|
+
task.status = TaskExecutionStatus.fromString(rawTask.status);
|
|
18
15
|
if (rawTask.lastExecution !== null && rawTask.lastExecution !== undefined) {
|
|
19
|
-
task.lastExecution =
|
|
16
|
+
task.lastExecution = Utils.parseRawDate(rawTask.lastExecution);
|
|
20
17
|
}
|
|
21
18
|
task.averageExecutionDuration = rawTask.averageExecutionDuration;
|
|
22
19
|
task.executionCount = rawTask.executionCount;
|
|
23
20
|
return task;
|
|
24
21
|
}
|
|
25
22
|
}
|
|
26
|
-
exports.TaskSummary = TaskSummary;
|
package/dist/Model/Team/Team.js
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.TeamMemberInvite = void 0;
|
|
4
|
-
const TeamMemberInviteState_1 = require("./TeamMemberInviteState");
|
|
5
|
-
class TeamMemberInvite {
|
|
1
|
+
import { TeamMemberInviteState } from './TeamMemberInviteState';
|
|
2
|
+
export class TeamMemberInvite {
|
|
6
3
|
constructor() {
|
|
7
|
-
this.state =
|
|
4
|
+
this.state = TeamMemberInviteState.Accepted;
|
|
8
5
|
}
|
|
9
6
|
}
|
|
10
|
-
exports.TeamMemberInvite = TeamMemberInvite;
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.TeamMemberInviteState = void 0;
|
|
4
|
-
const Utils_1 = require("../../Utils");
|
|
5
|
-
var TeamMemberInviteState;
|
|
1
|
+
import { Utils } from '../../Utils';
|
|
2
|
+
export var TeamMemberInviteState;
|
|
6
3
|
(function (TeamMemberInviteState) {
|
|
7
4
|
TeamMemberInviteState["Pending"] = "pending";
|
|
8
5
|
TeamMemberInviteState["Declined"] = "declined";
|
|
@@ -10,14 +7,14 @@ var TeamMemberInviteState;
|
|
|
10
7
|
TeamMemberInviteState["Revoked"] = "revoked";
|
|
11
8
|
TeamMemberInviteState["Expired"] = "expired";
|
|
12
9
|
TeamMemberInviteState["Removed"] = "removed";
|
|
13
|
-
})(TeamMemberInviteState
|
|
10
|
+
})(TeamMemberInviteState || (TeamMemberInviteState = {}));
|
|
14
11
|
(function (TeamMemberInviteState) {
|
|
15
12
|
function fromString(input) {
|
|
16
|
-
const result =
|
|
13
|
+
const result = Utils.parseEnum(input, TeamMemberInviteState);
|
|
17
14
|
if (result === null) {
|
|
18
15
|
throw new Error('Unable to parse TeamMemberInviteState from string: Unknown TeamMemberInviteState "' + input + '"');
|
|
19
16
|
}
|
|
20
17
|
return result;
|
|
21
18
|
}
|
|
22
19
|
TeamMemberInviteState.fromString = fromString;
|
|
23
|
-
})(TeamMemberInviteState
|
|
20
|
+
})(TeamMemberInviteState || (TeamMemberInviteState = {}));
|
|
@@ -1,22 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.TeamMemberRole = void 0;
|
|
4
|
-
const Utils_1 = require("../../Utils");
|
|
5
|
-
var TeamMemberRole;
|
|
1
|
+
import { Utils } from '../../Utils';
|
|
2
|
+
export var TeamMemberRole;
|
|
6
3
|
(function (TeamMemberRole) {
|
|
7
4
|
TeamMemberRole["Administrator"] = "administrator";
|
|
8
5
|
TeamMemberRole["Developer"] = "developer";
|
|
9
6
|
TeamMemberRole["Analyst"] = "analyst";
|
|
10
7
|
TeamMemberRole["Support"] = "support";
|
|
11
8
|
TeamMemberRole["ViewOnly"] = "view_only";
|
|
12
|
-
})(TeamMemberRole
|
|
9
|
+
})(TeamMemberRole || (TeamMemberRole = {}));
|
|
13
10
|
(function (TeamMemberRole) {
|
|
14
11
|
function fromString(input) {
|
|
15
|
-
const result =
|
|
12
|
+
const result = Utils.parseEnum(input, TeamMemberRole);
|
|
16
13
|
if (result === null) {
|
|
17
14
|
throw new Error('Unable to parse TeamMemberRole from string: Unknown TeamMemberRole "' + input + '"');
|
|
18
15
|
}
|
|
19
16
|
return result;
|
|
20
17
|
}
|
|
21
18
|
TeamMemberRole.fromString = fromString;
|
|
22
|
-
})(TeamMemberRole
|
|
19
|
+
})(TeamMemberRole || (TeamMemberRole = {}));
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const Trigger_1 = require("./Trigger");
|
|
5
|
-
const TriggerType_1 = require("./TriggerType");
|
|
6
|
-
class ApiTrigger extends Trigger_1.Trigger {
|
|
1
|
+
import { Trigger } from './Trigger';
|
|
2
|
+
import { TriggerType } from './TriggerType';
|
|
3
|
+
export class ApiTrigger extends Trigger {
|
|
7
4
|
constructor(id, projectEnvironment, task, data) {
|
|
8
|
-
super(id,
|
|
5
|
+
super(id, TriggerType.Api, projectEnvironment, task, data);
|
|
9
6
|
}
|
|
10
7
|
getData() {
|
|
11
8
|
return super.getData();
|
|
12
9
|
}
|
|
13
10
|
}
|
|
14
|
-
exports.ApiTrigger = ApiTrigger;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.ApiTriggerData = void 0;
|
|
4
|
-
const TriggerData_1 = require("./TriggerData");
|
|
5
|
-
class ApiTriggerData extends TriggerData_1.TriggerData {
|
|
1
|
+
import { TriggerData } from './TriggerData';
|
|
2
|
+
export class ApiTriggerData extends TriggerData {
|
|
6
3
|
constructor() {
|
|
7
4
|
super();
|
|
8
5
|
}
|
|
9
6
|
}
|
|
10
|
-
exports.ApiTriggerData = ApiTriggerData;
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const Trigger_1 = require("./Trigger");
|
|
5
|
-
const TriggerType_1 = require("./TriggerType");
|
|
6
|
-
class ScheduleTrigger extends Trigger_1.Trigger {
|
|
1
|
+
import { Trigger } from './Trigger';
|
|
2
|
+
import { TriggerType } from './TriggerType';
|
|
3
|
+
export class ScheduleTrigger extends Trigger {
|
|
7
4
|
constructor(id, projectEnvironment, task, data) {
|
|
8
|
-
super(id,
|
|
5
|
+
super(id, TriggerType.Schedule, projectEnvironment, task, data);
|
|
9
6
|
}
|
|
10
7
|
getData() {
|
|
11
8
|
return super.getData();
|
|
12
9
|
}
|
|
13
10
|
}
|
|
14
|
-
exports.ScheduleTrigger = ScheduleTrigger;
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.ScheduleTriggerData = void 0;
|
|
4
|
-
const TriggerData_1 = require("./TriggerData");
|
|
5
|
-
class ScheduleTriggerData extends TriggerData_1.TriggerData {
|
|
1
|
+
import { TriggerData } from './TriggerData';
|
|
2
|
+
export class ScheduleTriggerData extends TriggerData {
|
|
6
3
|
constructor(expression) {
|
|
7
4
|
super();
|
|
8
5
|
this.expression = expression;
|
|
9
6
|
}
|
|
10
7
|
}
|
|
11
|
-
exports.ScheduleTriggerData = ScheduleTriggerData;
|