@ludeo/cloud-common 1.2.142 → 1.2.143-ygbeta3
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/tsconfig.tsbuildinfo +1 -1
- package/dist/v4/events/index.d.ts +4 -0
- package/dist/v4/events/index.js +4 -0
- package/dist/v4/events/index.js.map +1 -1
- package/dist/v4/events/ludeocast-resource-updated.d.ts +14 -0
- package/dist/v4/events/ludeocast-resource-updated.js +54 -0
- package/dist/v4/events/ludeocast-resource-updated.js.map +1 -0
- package/dist/v4/events/machine-resource-status-changed.d.ts +16 -0
- package/dist/v4/events/machine-resource-status-changed.js +61 -0
- package/dist/v4/events/machine-resource-status-changed.js.map +1 -0
- package/dist/v4/events/pool-status-map-changed.d.ts +12 -0
- package/dist/v4/events/pool-status-map-changed.js +36 -0
- package/dist/v4/events/pool-status-map-changed.js.map +1 -0
- package/dist/v4/events/pool-status-publish-cooldown-task.d.ts +10 -0
- package/dist/v4/events/pool-status-publish-cooldown-task.js +36 -0
- package/dist/v4/events/pool-status-publish-cooldown-task.js.map +1 -0
- package/package.json +1 -1
- package/src/v4/events/index.ts +4 -0
- package/src/v4/events/ludeocast-resource-updated.ts +39 -0
- package/src/v4/events/machine-resource-status-changed.ts +45 -0
- package/src/v4/events/pool-status-map-changed.ts +27 -0
- package/src/v4/events/pool-status-publish-cooldown-task.ts +23 -0
|
@@ -150,3 +150,7 @@ export * from "./machine-resource-terminated-batch-response";
|
|
|
150
150
|
export * from "./cloud-log-uploaded";
|
|
151
151
|
export * from "./disable-pool";
|
|
152
152
|
export * from "./pool-disabled";
|
|
153
|
+
export * from "./pool-status-map-changed";
|
|
154
|
+
export * from "./pool-status-publish-cooldown-task";
|
|
155
|
+
export * from "./machine-resource-status-changed";
|
|
156
|
+
export * from "./ludeocast-resource-updated";
|
package/dist/v4/events/index.js
CHANGED
|
@@ -166,4 +166,8 @@ __exportStar(require("./machine-resource-terminated-batch-response"), exports);
|
|
|
166
166
|
__exportStar(require("./cloud-log-uploaded"), exports);
|
|
167
167
|
__exportStar(require("./disable-pool"), exports);
|
|
168
168
|
__exportStar(require("./pool-disabled"), exports);
|
|
169
|
+
__exportStar(require("./pool-status-map-changed"), exports);
|
|
170
|
+
__exportStar(require("./pool-status-publish-cooldown-task"), exports);
|
|
171
|
+
__exportStar(require("./machine-resource-status-changed"), exports);
|
|
172
|
+
__exportStar(require("./ludeocast-resource-updated"), exports);
|
|
169
173
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/v4/events/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,mEAAiD;AACjD,6DAA2C;AAC3C,uEAAqD;AACrD,4EAA0D;AAC1D,6DAA2C;AAC3C,qEAAmD;AACnD,iEAA+C;AAC/C,yDAAuC;AACvC,0EAAwD;AACxD,oEAAkD;AAClD,4DAA0C;AAC1C,+DAA6C;AAC7C,mDAAiC;AACjC,4DAA0C;AAC1C,oEAAkD;AAClD,qEAAmD;AACnD,6EAA2D;AAC3D,mEAAiD;AACjD,2EAAyD;AACzD,sEAAoD;AACpD,8EAA4D;AAC5D,6DAA2C;AAC3C,qEAAmD;AACnD,iEAA+C;AAC/C,+DAA6C;AAC7C,uEAAqD;AACrD,iEAA+C;AAC/C,yEAAuD;AACvD,+DAA6C;AAC7C,oFAAkE;AAClE,uFAAqE;AACrE,sEAAoD;AACpD,8EAA4D;AAC5D,yEAAuD;AACvD,6DAA2C;AAC3C,+DAA6C;AAC7C,gDAA8B;AAC9B,4DAA0C;AAC1C,6CAA2B;AAC3B,oDAAkC;AAClC,8DAA4C;AAC5C,mEAAiD;AACjD,4DAA0C;AAC1C,2DAAyC;AACzC,oEAAkD;AAClD,4DAA0C;AAC1C,uEAAqD;AACrD,6EAA2D;AAC3D,+DAA6C;AAC7C,0DAAwC;AACxC,6DAA2C;AAC3C,+DAA6C;A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D,wEAAsD;AACtD,yDAAuC;AACvC,2DAAyC;AACzC,wDAAsC;AACtC,mDAAiC;AACjC,4EAA0D;AAC1D,+EAA6D;AAC7D,uDAAqC;AACrC,iDAA+B;AAC/B,kDAAgC;AAChC,4DAA0C;AAC1C,sEAAoD;AACpD,oEAAkD;AAClD,+DAA6C"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
2
|
+
import { CloudResourceContext } from "../contexts/cloud-resource-context";
|
|
3
|
+
export declare class LudeocastResourceUpdatedPayload {
|
|
4
|
+
resourceType: string;
|
|
5
|
+
status: string;
|
|
6
|
+
reason?: string;
|
|
7
|
+
resourceId: string;
|
|
8
|
+
}
|
|
9
|
+
export declare class LudeocastResourceUpdated extends LudeoEvent {
|
|
10
|
+
static readonly EVENT_NAME = "cloud-resource-monitor.ludeocast-controller.resource-updated";
|
|
11
|
+
constructor(payload: LudeocastResourceUpdatedPayload, context: CloudResourceContext);
|
|
12
|
+
context: CloudResourceContext;
|
|
13
|
+
payload: LudeocastResourceUpdatedPayload;
|
|
14
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.LudeocastResourceUpdated = exports.LudeocastResourceUpdatedPayload = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const ludeo_event_1 = require("../../infra/ludeo-event");
|
|
15
|
+
const cloud_resource_context_1 = require("../contexts/cloud-resource-context");
|
|
16
|
+
const validate_nested_type_decorator_1 = require("../../decorators/validate-nested-type.decorator");
|
|
17
|
+
class LudeocastResourceUpdatedPayload {
|
|
18
|
+
}
|
|
19
|
+
exports.LudeocastResourceUpdatedPayload = LudeocastResourceUpdatedPayload;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, class_validator_1.IsString)(),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], LudeocastResourceUpdatedPayload.prototype, "resourceType", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, class_validator_1.IsString)(),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], LudeocastResourceUpdatedPayload.prototype, "status", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, class_validator_1.IsString)(),
|
|
30
|
+
(0, class_validator_1.IsOptional)(),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], LudeocastResourceUpdatedPayload.prototype, "reason", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, class_validator_1.IsString)(),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], LudeocastResourceUpdatedPayload.prototype, "resourceId", void 0);
|
|
37
|
+
class LudeocastResourceUpdated extends ludeo_event_1.LudeoEvent {
|
|
38
|
+
constructor(payload, context) {
|
|
39
|
+
super(LudeocastResourceUpdated.EVENT_NAME);
|
|
40
|
+
this.payload = payload;
|
|
41
|
+
this.context = context;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.LudeocastResourceUpdated = LudeocastResourceUpdated;
|
|
45
|
+
LudeocastResourceUpdated.EVENT_NAME = "cloud-resource-monitor.ludeocast-controller.resource-updated";
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, validate_nested_type_decorator_1.ValidateNestedType)(() => cloud_resource_context_1.CloudResourceContext),
|
|
48
|
+
__metadata("design:type", cloud_resource_context_1.CloudResourceContext)
|
|
49
|
+
], LudeocastResourceUpdated.prototype, "context", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, validate_nested_type_decorator_1.ValidateNestedType)(() => LudeocastResourceUpdatedPayload),
|
|
52
|
+
__metadata("design:type", LudeocastResourceUpdatedPayload)
|
|
53
|
+
], LudeocastResourceUpdated.prototype, "payload", void 0);
|
|
54
|
+
//# sourceMappingURL=ludeocast-resource-updated.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ludeocast-resource-updated.js","sourceRoot":"","sources":["../../../src/v4/events/ludeocast-resource-updated.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAuD;AACvD,yDAAqD;AACrD,+EAA0E;AAC1E,oGAAqF;AAErF,MAAa,+BAA+B;CAa3C;AAbD,0EAaC;AAXC;IADC,IAAA,0BAAQ,GAAE;;qEACU;AAGrB;IADC,IAAA,0BAAQ,GAAE;;+DACI;AAIf;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;+DACG;AAGhB;IADC,IAAA,0BAAQ,GAAE;;mEACQ;AAGrB,MAAa,wBAAyB,SAAQ,wBAAU;IAItD,YACE,OAAwC,EACxC,OAA6B;QAE7B,KAAK,CAAC,wBAAwB,CAAC,UAAU,CAAC,CAAC;QAC3C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAXH,4DAkBC;AAjBiB,mCAAU,GACxB,8DAA8D,CAAC;AAYjE;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,6CAAoB,CAAC;8BACtC,6CAAoB;yDAAC;AAG9B;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,+BAA+B,CAAC;8BACjD,+BAA+B;yDAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
2
|
+
import { CloudResourceContext } from "../contexts/cloud-resource-context";
|
|
3
|
+
import { CloudResourceStatus } from "../types";
|
|
4
|
+
export declare class MachineResourceStatusChangedPayload {
|
|
5
|
+
machineResourceId: string;
|
|
6
|
+
machinePoolId?: string;
|
|
7
|
+
status: CloudResourceStatus;
|
|
8
|
+
previousStatus?: CloudResourceStatus;
|
|
9
|
+
error?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare class MachineResourceStatusChanged extends LudeoEvent {
|
|
12
|
+
static readonly EVENT_NAME = "cloud-resource-monitor.machine-resource-status-changed";
|
|
13
|
+
constructor(payload: MachineResourceStatusChangedPayload, context: CloudResourceContext);
|
|
14
|
+
context: CloudResourceContext;
|
|
15
|
+
payload: MachineResourceStatusChangedPayload;
|
|
16
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.MachineResourceStatusChanged = exports.MachineResourceStatusChangedPayload = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const ludeo_event_1 = require("../../infra/ludeo-event");
|
|
15
|
+
const cloud_resource_context_1 = require("../contexts/cloud-resource-context");
|
|
16
|
+
const types_1 = require("../types");
|
|
17
|
+
const validate_nested_type_decorator_1 = require("../../decorators/validate-nested-type.decorator");
|
|
18
|
+
class MachineResourceStatusChangedPayload {
|
|
19
|
+
}
|
|
20
|
+
exports.MachineResourceStatusChangedPayload = MachineResourceStatusChangedPayload;
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, class_validator_1.IsUUID)(),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], MachineResourceStatusChangedPayload.prototype, "machineResourceId", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_validator_1.IsUUID)(),
|
|
27
|
+
(0, class_validator_1.IsOptional)(),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], MachineResourceStatusChangedPayload.prototype, "machinePoolId", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, class_validator_1.IsString)(),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], MachineResourceStatusChangedPayload.prototype, "status", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, class_validator_1.IsOptional)(),
|
|
36
|
+
(0, class_validator_1.IsString)(),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], MachineResourceStatusChangedPayload.prototype, "previousStatus", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, class_validator_1.IsOptional)(),
|
|
41
|
+
(0, class_validator_1.IsString)(),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], MachineResourceStatusChangedPayload.prototype, "error", void 0);
|
|
44
|
+
class MachineResourceStatusChanged extends ludeo_event_1.LudeoEvent {
|
|
45
|
+
constructor(payload, context) {
|
|
46
|
+
super(MachineResourceStatusChanged.EVENT_NAME);
|
|
47
|
+
this.payload = payload;
|
|
48
|
+
this.context = context;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
exports.MachineResourceStatusChanged = MachineResourceStatusChanged;
|
|
52
|
+
MachineResourceStatusChanged.EVENT_NAME = "cloud-resource-monitor.machine-resource-status-changed";
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, validate_nested_type_decorator_1.ValidateNestedType)(() => cloud_resource_context_1.CloudResourceContext),
|
|
55
|
+
__metadata("design:type", cloud_resource_context_1.CloudResourceContext)
|
|
56
|
+
], MachineResourceStatusChanged.prototype, "context", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, validate_nested_type_decorator_1.ValidateNestedType)(() => MachineResourceStatusChangedPayload),
|
|
59
|
+
__metadata("design:type", MachineResourceStatusChangedPayload)
|
|
60
|
+
], MachineResourceStatusChanged.prototype, "payload", void 0);
|
|
61
|
+
//# sourceMappingURL=machine-resource-status-changed.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"machine-resource-status-changed.js","sourceRoot":"","sources":["../../../src/v4/events/machine-resource-status-changed.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA+D;AAC/D,yDAAqD;AACrD,+EAA0E;AAC1E,oCAA+C;AAC/C,oGAAqF;AAErF,MAAa,mCAAmC;CAkB/C;AAlBD,kFAkBC;AAhBC;IADC,IAAA,wBAAM,GAAE;;8EACiB;AAI1B;IAFC,IAAA,wBAAM,GAAE;IACR,IAAA,4BAAU,GAAE;;0EACU;AAGvB;IADC,IAAA,0BAAQ,GAAE;;mEACiB;AAI5B;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;2EAC0B;AAIrC;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;kEACI;AAGjB,MAAa,4BAA6B,SAAQ,wBAAU;IAI1D,YACE,OAA4C,EAC5C,OAA6B;QAE7B,KAAK,CAAC,4BAA4B,CAAC,UAAU,CAAC,CAAC;QAC/C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAXH,oEAkBC;AAjBiB,uCAAU,GACxB,wDAAwD,CAAC;AAY3D;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,6CAAoB,CAAC;8BACtC,6CAAoB;6DAAC;AAG9B;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,mCAAmC,CAAC;8BACrD,mCAAmC;6DAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
2
|
+
import { CloudResourcesStatusMap } from "../types";
|
|
3
|
+
export declare class PoolStatusMapChangedPayload {
|
|
4
|
+
poolId: string;
|
|
5
|
+
statusMap: CloudResourcesStatusMap;
|
|
6
|
+
}
|
|
7
|
+
export declare class PoolStatusMapChanged extends LudeoEvent {
|
|
8
|
+
static readonly EVENT_NAME = "cloud-pools.pool-status-map-changed";
|
|
9
|
+
constructor(payload: PoolStatusMapChangedPayload, context?: never);
|
|
10
|
+
payload: PoolStatusMapChangedPayload;
|
|
11
|
+
context?: never;
|
|
12
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.PoolStatusMapChanged = exports.PoolStatusMapChangedPayload = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const ludeo_event_1 = require("../../infra/ludeo-event");
|
|
15
|
+
const validate_nested_type_decorator_1 = require("../../decorators/validate-nested-type.decorator");
|
|
16
|
+
class PoolStatusMapChangedPayload {
|
|
17
|
+
}
|
|
18
|
+
exports.PoolStatusMapChangedPayload = PoolStatusMapChangedPayload;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, class_validator_1.IsUUID)(),
|
|
21
|
+
__metadata("design:type", String)
|
|
22
|
+
], PoolStatusMapChangedPayload.prototype, "poolId", void 0);
|
|
23
|
+
class PoolStatusMapChanged extends ludeo_event_1.LudeoEvent {
|
|
24
|
+
constructor(payload, context) {
|
|
25
|
+
super(PoolStatusMapChanged.EVENT_NAME);
|
|
26
|
+
this.payload = payload;
|
|
27
|
+
this.context = context;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.PoolStatusMapChanged = PoolStatusMapChanged;
|
|
31
|
+
PoolStatusMapChanged.EVENT_NAME = "cloud-pools.pool-status-map-changed";
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, validate_nested_type_decorator_1.ValidateNestedType)(() => PoolStatusMapChangedPayload),
|
|
34
|
+
__metadata("design:type", PoolStatusMapChangedPayload)
|
|
35
|
+
], PoolStatusMapChanged.prototype, "payload", void 0);
|
|
36
|
+
//# sourceMappingURL=pool-status-map-changed.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pool-status-map-changed.js","sourceRoot":"","sources":["../../../src/v4/events/pool-status-map-changed.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAyC;AAEzC,yDAAqD;AAErD,oGAAqF;AAErF,MAAa,2BAA2B;CAKvC;AALD,kEAKC;AAHC;IADC,IAAA,wBAAM,GAAE;;2DACM;AAKjB,MAAa,oBAAqB,SAAQ,wBAAU;IAGlD,YAAY,OAAoC,EAAE,OAAe;QAC/D,KAAK,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC;QACvC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAPH,oDAaC;AAZiB,+BAAU,GAAG,qCAAqC,CAAC;AASnE;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,2BAA2B,CAAC;8BAC7C,2BAA2B;qDAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
2
|
+
export declare class PoolStatusPublishCooldownTaskPayload {
|
|
3
|
+
poolId: string;
|
|
4
|
+
}
|
|
5
|
+
export declare class PoolStatusPublishCooldownTask extends LudeoEvent {
|
|
6
|
+
static readonly EVENT_NAME = "cloud-pools.pool-status-publish-cooldown-task";
|
|
7
|
+
constructor(payload: PoolStatusPublishCooldownTaskPayload, context: never);
|
|
8
|
+
context: never;
|
|
9
|
+
payload: PoolStatusPublishCooldownTaskPayload;
|
|
10
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.PoolStatusPublishCooldownTask = exports.PoolStatusPublishCooldownTaskPayload = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const ludeo_event_1 = require("../../infra/ludeo-event");
|
|
15
|
+
const validate_nested_type_decorator_1 = require("../../decorators/validate-nested-type.decorator");
|
|
16
|
+
class PoolStatusPublishCooldownTaskPayload {
|
|
17
|
+
}
|
|
18
|
+
exports.PoolStatusPublishCooldownTaskPayload = PoolStatusPublishCooldownTaskPayload;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, class_validator_1.IsUUID)(),
|
|
21
|
+
__metadata("design:type", String)
|
|
22
|
+
], PoolStatusPublishCooldownTaskPayload.prototype, "poolId", void 0);
|
|
23
|
+
class PoolStatusPublishCooldownTask extends ludeo_event_1.LudeoEvent {
|
|
24
|
+
constructor(payload, context) {
|
|
25
|
+
super(PoolStatusPublishCooldownTask.EVENT_NAME);
|
|
26
|
+
this.payload = payload;
|
|
27
|
+
this.context = context;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.PoolStatusPublishCooldownTask = PoolStatusPublishCooldownTask;
|
|
31
|
+
PoolStatusPublishCooldownTask.EVENT_NAME = "cloud-pools.pool-status-publish-cooldown-task";
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, validate_nested_type_decorator_1.ValidateNestedType)(() => PoolStatusPublishCooldownTaskPayload),
|
|
34
|
+
__metadata("design:type", PoolStatusPublishCooldownTaskPayload)
|
|
35
|
+
], PoolStatusPublishCooldownTask.prototype, "payload", void 0);
|
|
36
|
+
//# sourceMappingURL=pool-status-publish-cooldown-task.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pool-status-publish-cooldown-task.js","sourceRoot":"","sources":["../../../src/v4/events/pool-status-publish-cooldown-task.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAyC;AACzC,yDAAqD;AACrD,oGAAqF;AAErF,MAAa,oCAAoC;CAGhD;AAHD,oFAGC;AADC;IADC,IAAA,wBAAM,GAAE;;oEACM;AAGjB,MAAa,6BAA8B,SAAQ,wBAAU;IAG3D,YAAY,OAA6C,EAAE,OAAc;QACvE,KAAK,CAAC,6BAA6B,CAAC,UAAU,CAAC,CAAC;QAChD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAPH,sEAaC;AAZiB,wCAAU,GAAG,+CAA+C,CAAC;AAW7E;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,oCAAoC,CAAC;8BACtD,oCAAoC;8DAAC"}
|
package/package.json
CHANGED
package/src/v4/events/index.ts
CHANGED
|
@@ -150,3 +150,7 @@ export * from "./machine-resource-terminated-batch-response";
|
|
|
150
150
|
export * from "./cloud-log-uploaded";
|
|
151
151
|
export * from "./disable-pool";
|
|
152
152
|
export * from "./pool-disabled";
|
|
153
|
+
export * from "./pool-status-map-changed";
|
|
154
|
+
export * from "./pool-status-publish-cooldown-task";
|
|
155
|
+
export * from "./machine-resource-status-changed";
|
|
156
|
+
export * from "./ludeocast-resource-updated";
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { IsOptional, IsString } from "class-validator";
|
|
2
|
+
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
3
|
+
import { CloudResourceContext } from "../contexts/cloud-resource-context";
|
|
4
|
+
import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
|
|
5
|
+
|
|
6
|
+
export class LudeocastResourceUpdatedPayload {
|
|
7
|
+
@IsString()
|
|
8
|
+
resourceType: string;
|
|
9
|
+
|
|
10
|
+
@IsString()
|
|
11
|
+
status: string;
|
|
12
|
+
|
|
13
|
+
@IsString()
|
|
14
|
+
@IsOptional()
|
|
15
|
+
reason?: string;
|
|
16
|
+
|
|
17
|
+
@IsString()
|
|
18
|
+
resourceId: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export class LudeocastResourceUpdated extends LudeoEvent {
|
|
22
|
+
static readonly EVENT_NAME =
|
|
23
|
+
"cloud-resource-monitor.ludeocast-controller.resource-updated";
|
|
24
|
+
|
|
25
|
+
constructor(
|
|
26
|
+
payload: LudeocastResourceUpdatedPayload,
|
|
27
|
+
context: CloudResourceContext
|
|
28
|
+
) {
|
|
29
|
+
super(LudeocastResourceUpdated.EVENT_NAME);
|
|
30
|
+
this.payload = payload;
|
|
31
|
+
this.context = context;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@ValidateNestedType(() => CloudResourceContext)
|
|
35
|
+
context: CloudResourceContext;
|
|
36
|
+
|
|
37
|
+
@ValidateNestedType(() => LudeocastResourceUpdatedPayload)
|
|
38
|
+
payload: LudeocastResourceUpdatedPayload;
|
|
39
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { IsOptional, IsString, IsUUID } from "class-validator";
|
|
2
|
+
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
3
|
+
import { CloudResourceContext } from "../contexts/cloud-resource-context";
|
|
4
|
+
import { CloudResourceStatus } from "../types";
|
|
5
|
+
import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
|
|
6
|
+
|
|
7
|
+
export class MachineResourceStatusChangedPayload {
|
|
8
|
+
@IsUUID()
|
|
9
|
+
machineResourceId: string;
|
|
10
|
+
|
|
11
|
+
@IsUUID()
|
|
12
|
+
@IsOptional()
|
|
13
|
+
machinePoolId?: string;
|
|
14
|
+
|
|
15
|
+
@IsString()
|
|
16
|
+
status: CloudResourceStatus;
|
|
17
|
+
|
|
18
|
+
@IsOptional()
|
|
19
|
+
@IsString()
|
|
20
|
+
previousStatus?: CloudResourceStatus;
|
|
21
|
+
|
|
22
|
+
@IsOptional()
|
|
23
|
+
@IsString()
|
|
24
|
+
error?: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export class MachineResourceStatusChanged extends LudeoEvent {
|
|
28
|
+
static readonly EVENT_NAME =
|
|
29
|
+
"cloud-resource-monitor.machine-resource-status-changed";
|
|
30
|
+
|
|
31
|
+
constructor(
|
|
32
|
+
payload: MachineResourceStatusChangedPayload,
|
|
33
|
+
context: CloudResourceContext
|
|
34
|
+
) {
|
|
35
|
+
super(MachineResourceStatusChanged.EVENT_NAME);
|
|
36
|
+
this.payload = payload;
|
|
37
|
+
this.context = context;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@ValidateNestedType(() => CloudResourceContext)
|
|
41
|
+
context: CloudResourceContext;
|
|
42
|
+
|
|
43
|
+
@ValidateNestedType(() => MachineResourceStatusChangedPayload)
|
|
44
|
+
payload: MachineResourceStatusChangedPayload;
|
|
45
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { IsUUID } from "class-validator";
|
|
2
|
+
|
|
3
|
+
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
4
|
+
import { CloudResourcesStatusMap } from "../types";
|
|
5
|
+
import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
|
|
6
|
+
|
|
7
|
+
export class PoolStatusMapChangedPayload {
|
|
8
|
+
@IsUUID()
|
|
9
|
+
poolId: string;
|
|
10
|
+
|
|
11
|
+
statusMap: CloudResourcesStatusMap;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export class PoolStatusMapChanged extends LudeoEvent {
|
|
15
|
+
static readonly EVENT_NAME = "cloud-pools.pool-status-map-changed";
|
|
16
|
+
|
|
17
|
+
constructor(payload: PoolStatusMapChangedPayload, context?: never) {
|
|
18
|
+
super(PoolStatusMapChanged.EVENT_NAME);
|
|
19
|
+
this.payload = payload;
|
|
20
|
+
this.context = context;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@ValidateNestedType(() => PoolStatusMapChangedPayload)
|
|
24
|
+
payload: PoolStatusMapChangedPayload;
|
|
25
|
+
|
|
26
|
+
context?: never;
|
|
27
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { IsUUID } from "class-validator";
|
|
2
|
+
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
3
|
+
import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
|
|
4
|
+
|
|
5
|
+
export class PoolStatusPublishCooldownTaskPayload {
|
|
6
|
+
@IsUUID()
|
|
7
|
+
poolId: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export class PoolStatusPublishCooldownTask extends LudeoEvent {
|
|
11
|
+
static readonly EVENT_NAME = "cloud-pools.pool-status-publish-cooldown-task";
|
|
12
|
+
|
|
13
|
+
constructor(payload: PoolStatusPublishCooldownTaskPayload, context: never) {
|
|
14
|
+
super(PoolStatusPublishCooldownTask.EVENT_NAME);
|
|
15
|
+
this.payload = payload;
|
|
16
|
+
this.context = context;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
context: never;
|
|
20
|
+
|
|
21
|
+
@ValidateNestedType(() => PoolStatusPublishCooldownTaskPayload)
|
|
22
|
+
payload: PoolStatusPublishCooldownTaskPayload;
|
|
23
|
+
}
|