attlaz-client 1.9.13 → 1.9.14
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/Core/MetaDataAware.d.ts +4 -0
- package/dist/Core/MetaDataAware.js +6 -0
- package/dist/Model/Flow/Flow.d.ts +3 -2
- package/dist/Model/Flow/Flow.js +14 -10
- package/dist/Model/Flow/FlowRun.d.ts +3 -2
- package/dist/Model/Flow/FlowRun.js +17 -15
- package/dist/Model/Messaging/Channel/Channel.d.ts +2 -1
- package/dist/Model/Messaging/Channel/Channel.js +5 -1
- package/dist/Model/Messaging/Subscriber.d.ts +2 -1
- package/dist/Model/Messaging/Subscriber.js +5 -1
- package/dist/Model/Trigger/Trigger.d.ts +2 -1
- package/dist/Model/Trigger/Trigger.js +5 -1
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { State } from '../State';
|
|
2
2
|
import { StateAware } from '../StateAware';
|
|
3
|
-
|
|
3
|
+
import { MetaDataAware } from '../../Core/MetaDataAware';
|
|
4
|
+
export declare class Flow extends MetaDataAware implements StateAware {
|
|
4
5
|
id: string;
|
|
5
6
|
key: string;
|
|
6
7
|
name: string;
|
|
@@ -10,5 +11,5 @@ export declare class Flow implements StateAware {
|
|
|
10
11
|
state: State;
|
|
11
12
|
/** The maximum number of tasks to run at any time (0 = no limit) **/
|
|
12
13
|
parallelLimit: number;
|
|
13
|
-
static parse(
|
|
14
|
+
static parse(rawFlow: any): Flow;
|
|
14
15
|
}
|
package/dist/Model/Flow/Flow.js
CHANGED
|
@@ -3,23 +3,27 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Flow = void 0;
|
|
4
4
|
const State_1 = require("../State");
|
|
5
5
|
const Utils_1 = require("../../Utils");
|
|
6
|
-
|
|
6
|
+
const MetaDataAware_1 = require("../../Core/MetaDataAware");
|
|
7
|
+
const DataValueCollection_1 = require("../DataValueCollection");
|
|
8
|
+
class Flow extends MetaDataAware_1.MetaDataAware {
|
|
7
9
|
constructor() {
|
|
10
|
+
super(...arguments);
|
|
8
11
|
this.isDirect = false;
|
|
9
12
|
this.state = State_1.State.Active;
|
|
10
13
|
/** The maximum number of tasks to run at any time (0 = no limit) **/
|
|
11
14
|
this.parallelLimit = 0;
|
|
12
15
|
}
|
|
13
|
-
static parse(
|
|
16
|
+
static parse(rawFlow) {
|
|
14
17
|
const task = new Flow();
|
|
15
|
-
task.id =
|
|
16
|
-
task.key =
|
|
17
|
-
task.projectId =
|
|
18
|
-
task.name =
|
|
19
|
-
task.description =
|
|
20
|
-
task.isDirect = Utils_1.Utils.isTrue(
|
|
21
|
-
task.state = State_1.State.fromString(
|
|
22
|
-
task.parallelLimit = Utils_1.Utils.parseInt(
|
|
18
|
+
task.id = rawFlow.id;
|
|
19
|
+
task.key = rawFlow.key;
|
|
20
|
+
task.projectId = rawFlow.project;
|
|
21
|
+
task.name = rawFlow.name;
|
|
22
|
+
task.description = rawFlow.description;
|
|
23
|
+
task.isDirect = Utils_1.Utils.isTrue(rawFlow.is_direct);
|
|
24
|
+
task.state = State_1.State.fromString(rawFlow.state);
|
|
25
|
+
task.parallelLimit = Utils_1.Utils.parseInt(rawFlow.parallel_limit);
|
|
26
|
+
task.metadata = DataValueCollection_1.DataValueCollection.fromObject(rawFlow.metadata);
|
|
23
27
|
return task;
|
|
24
28
|
}
|
|
25
29
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { LogLevel } from '../Log/LogLevel';
|
|
2
2
|
import { FlowRunPriority } from './FlowRunPriority';
|
|
3
|
-
|
|
3
|
+
import { MetaDataAware } from '../../Core/MetaDataAware';
|
|
4
|
+
export declare class FlowRun extends MetaDataAware {
|
|
4
5
|
id: string;
|
|
5
6
|
flowId: string;
|
|
6
7
|
name: string;
|
|
@@ -11,5 +12,5 @@ export declare class FlowRun {
|
|
|
11
12
|
deployId: string;
|
|
12
13
|
logLevelCount: Map<LogLevel, number>;
|
|
13
14
|
logsPurged: boolean;
|
|
14
|
-
static parse(
|
|
15
|
+
static parse(rawFlowRun: any): FlowRun;
|
|
15
16
|
}
|
|
@@ -3,26 +3,28 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.FlowRun = void 0;
|
|
4
4
|
const Utils_1 = require("../../Utils");
|
|
5
5
|
const FlowRunPriority_1 = require("./FlowRunPriority");
|
|
6
|
-
|
|
6
|
+
const MetaDataAware_1 = require("../../Core/MetaDataAware");
|
|
7
|
+
const DataValueCollection_1 = require("../DataValueCollection");
|
|
8
|
+
class FlowRun extends MetaDataAware_1.MetaDataAware {
|
|
7
9
|
constructor() {
|
|
10
|
+
super(...arguments);
|
|
8
11
|
// TODO: implement priority object
|
|
9
12
|
this.priority = FlowRunPriority_1.FlowRunPriority.None;
|
|
10
13
|
this.logsPurged = false;
|
|
11
14
|
}
|
|
12
|
-
static parse(
|
|
13
|
-
let
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return taskExecution;
|
|
15
|
+
static parse(rawFlowRun) {
|
|
16
|
+
let flowRun = new FlowRun();
|
|
17
|
+
flowRun.id = rawFlowRun.id;
|
|
18
|
+
flowRun.flowId = rawFlowRun.flow;
|
|
19
|
+
flowRun.arguments = rawFlowRun.arguments;
|
|
20
|
+
flowRun.projectEnvironmentId = rawFlowRun.project_environment;
|
|
21
|
+
flowRun.priority = FlowRunPriority_1.FlowRunPriority.fromString(rawFlowRun.priority);
|
|
22
|
+
flowRun.triggerId = rawFlowRun.trigger;
|
|
23
|
+
flowRun.deployId = rawFlowRun.deploy;
|
|
24
|
+
flowRun.logLevelCount = rawFlowRun.log_level_count;
|
|
25
|
+
flowRun.logsPurged = Utils_1.Utils.isTrue(rawFlowRun.logs_purged);
|
|
26
|
+
flowRun.metadata = DataValueCollection_1.DataValueCollection.fromObject(rawFlowRun.metadata);
|
|
27
|
+
return flowRun;
|
|
26
28
|
}
|
|
27
29
|
}
|
|
28
30
|
exports.FlowRun = FlowRun;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ChannelType } from './ChannelType';
|
|
2
2
|
import { State } from '../../State';
|
|
3
3
|
import { StateAware } from '../../StateAware';
|
|
4
|
-
|
|
4
|
+
import { MetaDataAware } from '../../../Core/MetaDataAware';
|
|
5
|
+
export declare class Channel extends MetaDataAware implements StateAware {
|
|
5
6
|
id: string;
|
|
6
7
|
owner: string;
|
|
7
8
|
label: string;
|
|
@@ -4,8 +4,11 @@ exports.Channel = void 0;
|
|
|
4
4
|
const ChannelType_1 = require("./ChannelType");
|
|
5
5
|
const State_1 = require("../../State");
|
|
6
6
|
const Utils_1 = require("../../../Utils");
|
|
7
|
-
|
|
7
|
+
const MetaDataAware_1 = require("../../../Core/MetaDataAware");
|
|
8
|
+
const DataValueCollection_1 = require("../../DataValueCollection");
|
|
9
|
+
class Channel extends MetaDataAware_1.MetaDataAware {
|
|
8
10
|
constructor(id, owner, label, type, data) {
|
|
11
|
+
super();
|
|
9
12
|
this.state = State_1.State.Active;
|
|
10
13
|
this.private = false;
|
|
11
14
|
this.id = id;
|
|
@@ -19,6 +22,7 @@ class Channel {
|
|
|
19
22
|
const channel = new Channel(rawChannel.id, rawChannel.owner, rawChannel.label, type, rawChannel.data);
|
|
20
23
|
channel.state = State_1.State.fromString(rawChannel.state);
|
|
21
24
|
channel.private = Utils_1.Utils.isTrue(rawChannel.private);
|
|
25
|
+
channel.metadata = DataValueCollection_1.DataValueCollection.fromObject(rawChannel.metadata);
|
|
22
26
|
return channel;
|
|
23
27
|
}
|
|
24
28
|
}
|
|
@@ -2,7 +2,8 @@ import { State } from '../State';
|
|
|
2
2
|
import { EventType } from '../Event/EventType';
|
|
3
3
|
import { LogLevel } from '../Log/LogLevel';
|
|
4
4
|
import { StateAware } from '../StateAware';
|
|
5
|
-
|
|
5
|
+
import { MetaDataAware } from '../../Core/MetaDataAware';
|
|
6
|
+
export declare class Subscriber extends MetaDataAware implements StateAware {
|
|
6
7
|
id: string;
|
|
7
8
|
eventTypes: EventType[];
|
|
8
9
|
projectEnvironment: string;
|
|
@@ -3,8 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Subscriber = void 0;
|
|
4
4
|
const State_1 = require("../State");
|
|
5
5
|
const LogLevel_1 = require("../Log/LogLevel");
|
|
6
|
-
|
|
6
|
+
const MetaDataAware_1 = require("../../Core/MetaDataAware");
|
|
7
|
+
const DataValueCollection_1 = require("../DataValueCollection");
|
|
8
|
+
class Subscriber extends MetaDataAware_1.MetaDataAware {
|
|
7
9
|
constructor(id, eventTypes, projectEnvironment, task, taskExecution, channels, logLevelThreshold = LogLevel_1.LogLevel.Debug) {
|
|
10
|
+
super();
|
|
8
11
|
this.state = State_1.State.Active;
|
|
9
12
|
this.id = id;
|
|
10
13
|
this.eventTypes = eventTypes;
|
|
@@ -17,6 +20,7 @@ class Subscriber {
|
|
|
17
20
|
static parseRaw(rawSubscriber) {
|
|
18
21
|
let subscriber = new Subscriber(rawSubscriber.id, rawSubscriber.eventTypes, rawSubscriber.projectEnvironment, rawSubscriber.task, rawSubscriber.task_execution, rawSubscriber.channels, rawSubscriber.logLevelThreshold);
|
|
19
22
|
subscriber.state = State_1.State.fromString(rawSubscriber.state);
|
|
23
|
+
subscriber.metadata = DataValueCollection_1.DataValueCollection.fromObject(rawSubscriber.metadata);
|
|
20
24
|
return subscriber;
|
|
21
25
|
}
|
|
22
26
|
getLogLevelThreshold() {
|
|
@@ -2,7 +2,8 @@ import { TriggerData } from "./TriggerData";
|
|
|
2
2
|
import { State } from '../State';
|
|
3
3
|
import { TriggerType } from './TriggerType';
|
|
4
4
|
import { StateAware } from '../StateAware';
|
|
5
|
-
|
|
5
|
+
import { MetaDataAware } from '../../Core/MetaDataAware';
|
|
6
|
+
export declare class Trigger extends MetaDataAware implements StateAware {
|
|
6
7
|
id: string;
|
|
7
8
|
type: TriggerType;
|
|
8
9
|
projectEnvironmentId: string;
|
|
@@ -6,8 +6,11 @@ const TriggerType_1 = require("./TriggerType");
|
|
|
6
6
|
const ScheduleTriggerData_1 = require("./ScheduleTriggerData");
|
|
7
7
|
const WebhookTriggerData_1 = require("./WebhookTriggerData");
|
|
8
8
|
const ApiTriggerData_1 = require("./ApiTriggerData");
|
|
9
|
-
|
|
9
|
+
const MetaDataAware_1 = require("../../Core/MetaDataAware");
|
|
10
|
+
const DataValueCollection_1 = require("../DataValueCollection");
|
|
11
|
+
class Trigger extends MetaDataAware_1.MetaDataAware {
|
|
10
12
|
constructor(id, type, projectEnvironmentId, flowId, data) {
|
|
13
|
+
super();
|
|
11
14
|
this.state = State_1.State.Active;
|
|
12
15
|
this.id = id;
|
|
13
16
|
this.type = type;
|
|
@@ -37,6 +40,7 @@ class Trigger {
|
|
|
37
40
|
let trigger = new Trigger(rawTrigger.id, type, rawTrigger.project_environment, flowId, triggerData);
|
|
38
41
|
trigger.arguments = rawTrigger.arguments;
|
|
39
42
|
trigger.state = State_1.State.fromString(rawTrigger.state);
|
|
43
|
+
trigger.metadata = DataValueCollection_1.DataValueCollection.fromObject(rawTrigger.metadata);
|
|
40
44
|
return trigger;
|
|
41
45
|
}
|
|
42
46
|
getData() {
|