@ludeo/cloud-common 1.0.6 → 1.0.8
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/v2/events/monitor-resource-task.event.js +1 -1
- package/dist/v2/events/monitor-resource-task.event.js.map +1 -1
- package/dist/v2/events/pool-created.event.d.ts +1 -1
- package/dist/v2/events/pool-created.event.js +3 -3
- package/dist/v2/events/pool-created.event.js.map +1 -1
- package/dist/v2/events/pool-updated.event.d.ts +1 -1
- package/dist/v2/events/pool-updated.event.js +3 -3
- package/dist/v2/events/pool-updated.event.js.map +1 -1
- package/dist/v2/index.d.ts +1 -2
- package/dist/v2/index.js +2 -3
- package/dist/v2/index.js.map +1 -1
- package/dist/v2/types/cloud.d.ts +1 -0
- package/dist/v2/types/cloud.js +4 -0
- package/dist/v2/types/cloud.js.map +1 -1
- package/dist/v2/types/pools.d.ts +11 -3
- package/dist/v2/types/pools.js +10 -7
- package/dist/v2/types/pools.js.map +1 -1
- package/package.json +1 -1
- package/src/v2/events/monitor-resource-task.event.ts +2 -2
- package/src/v2/events/pool-created.event.ts +1 -1
- package/src/v2/events/pool-updated.event.ts +1 -1
- package/src/v2/index.ts +1 -2
- package/src/v2/types/cloud.ts +4 -0
- package/src/v2/types/pools.ts +14 -5
- package/src/v2/models/cloud-pool.ts +0 -14
- package/src/v2/models/index.ts +0 -1
|
@@ -26,7 +26,7 @@ __decorate([
|
|
|
26
26
|
__metadata("design:type", String)
|
|
27
27
|
], MonitorResourceTaskEventPayload.prototype, "poolId", void 0);
|
|
28
28
|
__decorate([
|
|
29
|
-
(0,
|
|
29
|
+
(0, decorators_1.ValidateNestedType)(() => types_1.AWSResourceProviderSettings),
|
|
30
30
|
__metadata("design:type", types_1.AWSResourceProviderSettings)
|
|
31
31
|
], MonitorResourceTaskEventPayload.prototype, "providerSettings", void 0);
|
|
32
32
|
class MonitorResourceTaskEvent extends ludeo_event_1.LudeoEvent {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"monitor-resource-task.event.js","sourceRoot":"","sources":["../../../src/v2/events/monitor-resource-task.event.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"monitor-resource-task.event.js","sourceRoot":"","sources":["../../../src/v2/events/monitor-resource-task.event.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAyC;AACzC,yDAAqD;AACrD,oCAAuD;AACvD,iDAAsD;AAEtD,MAAa,+BAA+B;CAS3C;AATD,0EASC;AAPC;IADC,IAAA,wBAAM,GAAE;;mEACU;AAGnB;IADC,IAAA,wBAAM,GAAE;;+DACM;AAGf;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,mCAA2B,CAAC;8BACpC,mCAA2B;yEAAC;AAGhD,MAAa,wBAAyB,SAAQ,wBAAU;IAGtD,YAAY,OAAwC;QAClD,KAAK,CAAC,wBAAwB,CAAC,UAAU,CAAC,CAAC;QAC3C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AANH,4DAYC;AAXiB,mCAAU,GAAG,uCAAuC,CAAC;AAUrE;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,+BAA+B,CAAC;8BACjD,+BAA+B;yDAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
2
2
|
import { PoolContext } from "../contexts/pool-context";
|
|
3
|
-
import { CloudPool } from "../
|
|
3
|
+
import { CloudPool } from "../types/pools";
|
|
4
4
|
export declare class PoolCreatedEvent extends LudeoEvent {
|
|
5
5
|
static readonly EVENT_NAME = "cloud-pools.pool-created";
|
|
6
6
|
constructor(payload: CloudPool, context: PoolContext);
|
|
@@ -13,7 +13,7 @@ exports.PoolCreatedEvent = void 0;
|
|
|
13
13
|
const ludeo_event_1 = require("../../infra/ludeo-event");
|
|
14
14
|
const pool_context_1 = require("../contexts/pool-context");
|
|
15
15
|
const validate_nested_type_decorator_1 = require("../../decorators/validate-nested-type.decorator");
|
|
16
|
-
const
|
|
16
|
+
const pools_1 = require("../types/pools");
|
|
17
17
|
class PoolCreatedEvent extends ludeo_event_1.LudeoEvent {
|
|
18
18
|
constructor(payload, context) {
|
|
19
19
|
super(PoolCreatedEvent.EVENT_NAME);
|
|
@@ -28,7 +28,7 @@ __decorate([
|
|
|
28
28
|
__metadata("design:type", pool_context_1.PoolContext)
|
|
29
29
|
], PoolCreatedEvent.prototype, "context", void 0);
|
|
30
30
|
__decorate([
|
|
31
|
-
(0, validate_nested_type_decorator_1.ValidateNestedType)(() =>
|
|
32
|
-
__metadata("design:type",
|
|
31
|
+
(0, validate_nested_type_decorator_1.ValidateNestedType)(() => pools_1.CloudPool),
|
|
32
|
+
__metadata("design:type", pools_1.CloudPool)
|
|
33
33
|
], PoolCreatedEvent.prototype, "payload", void 0);
|
|
34
34
|
//# sourceMappingURL=pool-created.event.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pool-created.event.js","sourceRoot":"","sources":["../../../src/v2/events/pool-created.event.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAqD;AACrD,2DAAuD;AACvD,oGAAqF;AACrF,
|
|
1
|
+
{"version":3,"file":"pool-created.event.js","sourceRoot":"","sources":["../../../src/v2/events/pool-created.event.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAqD;AACrD,2DAAuD;AACvD,oGAAqF;AACrF,0CAA2C;AAE3C,MAAa,gBAAiB,SAAQ,wBAAU;IAG9C,YAAY,OAAkB,EAAE,OAAoB;QAClD,KAAK,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;QACnC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAPH,4CAcC;AAbiB,2BAAU,GAAG,0BAA0B,CAAC;AASxD;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,0BAAW,CAAC;8BAC7B,0BAAW;iDAAC;AAGrB;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,iBAAS,CAAC;8BAC3B,iBAAS;iDAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
2
2
|
import { PoolContext } from "../contexts/pool-context";
|
|
3
|
-
import { CloudPool } from "../
|
|
3
|
+
import { CloudPool } from "../types/pools";
|
|
4
4
|
export declare class PoolUpdatedEvent extends LudeoEvent {
|
|
5
5
|
static readonly EVENT_NAME = "cloud-pools.pool-updated";
|
|
6
6
|
constructor(payload: CloudPool, context: PoolContext);
|
|
@@ -12,8 +12,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.PoolUpdatedEvent = void 0;
|
|
13
13
|
const ludeo_event_1 = require("../../infra/ludeo-event");
|
|
14
14
|
const pool_context_1 = require("../contexts/pool-context");
|
|
15
|
-
const cloud_pool_1 = require("../models/cloud-pool");
|
|
16
15
|
const validate_nested_type_decorator_1 = require("../../decorators/validate-nested-type.decorator");
|
|
16
|
+
const pools_1 = require("../types/pools");
|
|
17
17
|
class PoolUpdatedEvent extends ludeo_event_1.LudeoEvent {
|
|
18
18
|
constructor(payload, context) {
|
|
19
19
|
super(PoolUpdatedEvent.EVENT_NAME);
|
|
@@ -28,7 +28,7 @@ __decorate([
|
|
|
28
28
|
__metadata("design:type", pool_context_1.PoolContext)
|
|
29
29
|
], PoolUpdatedEvent.prototype, "context", void 0);
|
|
30
30
|
__decorate([
|
|
31
|
-
(0, validate_nested_type_decorator_1.ValidateNestedType)(() =>
|
|
32
|
-
__metadata("design:type",
|
|
31
|
+
(0, validate_nested_type_decorator_1.ValidateNestedType)(() => pools_1.CloudPool),
|
|
32
|
+
__metadata("design:type", pools_1.CloudPool)
|
|
33
33
|
], PoolUpdatedEvent.prototype, "payload", void 0);
|
|
34
34
|
//# sourceMappingURL=pool-updated.event.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pool-updated.event.js","sourceRoot":"","sources":["../../../src/v2/events/pool-updated.event.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAqD;AACrD,2DAAuD;AACvD,
|
|
1
|
+
{"version":3,"file":"pool-updated.event.js","sourceRoot":"","sources":["../../../src/v2/events/pool-updated.event.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAqD;AACrD,2DAAuD;AACvD,oGAAqF;AACrF,0CAA2C;AAE3C,MAAa,gBAAiB,SAAQ,wBAAU;IAG9C,YAAY,OAAkB,EAAE,OAAoB;QAClD,KAAK,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;QACnC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAPH,4CAcC;AAbiB,2BAAU,GAAG,0BAA0B,CAAC;AASxD;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,0BAAW,CAAC;8BAC7B,0BAAW;iDAAC;AAGrB;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,iBAAS,CAAC;8BAC3B,iBAAS;iDAAC"}
|
package/dist/v2/index.d.ts
CHANGED
package/dist/v2/index.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.Events = exports.Contexts = exports.Types = void 0;
|
|
4
|
+
exports.Types = require("./types");
|
|
4
5
|
exports.Contexts = require("./contexts");
|
|
5
|
-
exports.Models = require("./models");
|
|
6
6
|
exports.Events = require("./events");
|
|
7
|
-
exports.Types = require("./types");
|
|
8
7
|
//# sourceMappingURL=index.js.map
|
package/dist/v2/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/v2/index.ts"],"names":[],"mappings":";;;AAAA,yCAAuC;AACvC,qCAAmC
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/v2/index.ts"],"names":[],"mappings":";;;AAAA,mCAAiC;AACjC,yCAAuC;AACvC,qCAAmC"}
|
package/dist/v2/types/cloud.d.ts
CHANGED
|
@@ -31,6 +31,7 @@ export type CloudProviderAllocationData = AwsAllocationData;
|
|
|
31
31
|
export declare class AWSResourceProviderSettings {
|
|
32
32
|
streamSessionId: string;
|
|
33
33
|
streamGroupId: string;
|
|
34
|
+
cloudProvider: CloudProvider;
|
|
34
35
|
}
|
|
35
36
|
export declare class AWSCreationResponse {
|
|
36
37
|
signalResponse?: GameCast.SignalResponse;
|
package/dist/v2/types/cloud.js
CHANGED
|
@@ -70,6 +70,10 @@ __decorate([
|
|
|
70
70
|
(0, class_validator_1.IsString)(),
|
|
71
71
|
__metadata("design:type", String)
|
|
72
72
|
], AWSResourceProviderSettings.prototype, "streamGroupId", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, class_validator_1.IsEnum)(CloudProvider),
|
|
75
|
+
__metadata("design:type", String)
|
|
76
|
+
], AWSResourceProviderSettings.prototype, "cloudProvider", void 0);
|
|
73
77
|
class AWSCreationResponse {
|
|
74
78
|
}
|
|
75
79
|
exports.AWSCreationResponse = AWSCreationResponse;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloud.js","sourceRoot":"","sources":["../../../src/v2/types/cloud.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,8DAAmD;AACnD,
|
|
1
|
+
{"version":3,"file":"cloud.js","sourceRoot":"","sources":["../../../src/v2/types/cloud.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,8DAAmD;AACnD,qDAOyB;AACzB,iDAAsD;AAEtD,MAAa,cAAc;CAI1B;AAJD,wCAIC;AADC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;qDACS;AAKxB,MAAa,wBAAwB;CAUpC;AAVD,4DAUC;AARC;IADC,IAAA,wBAAM,GAAE;;2DACS;AAGlB;IADC,IAAA,wBAAM,GAAE;;0DACQ;AAIjB;IAFC,IAAA,2BAAS,GAAE;IACX,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,cAAc,CAAC;;sEACE;AAG7C,IAAY,aAEX;AAFD,WAAY,aAAa;IACvB,4BAAW,CAAA;AACb,CAAC,EAFW,aAAa,6BAAb,aAAa,QAExB;AAED,MAAa,yBAAyB;CASrC;AATD,8DASC;AAID,MAAa,iBAAiB;CAS7B;AATD,8CASC;AAPC;IADC,IAAA,0BAAQ,GAAE;;wDACW;AAGtB;IADC,IAAA,0BAAQ,GAAE;;0DACa;AAGxB;IADC,IAAA,0BAAQ,GAAE;;yDACY;AAKzB,MAAa,2BAA2B;CASvC;AATD,kEASC;AAPC;IADC,IAAA,0BAAQ,GAAE;;oEACa;AAGxB;IADC,IAAA,0BAAQ,GAAE;;kEACW;AAGtB;IADC,IAAA,wBAAM,EAAC,aAAa,CAAC;;kEACO;AAG/B,MAAa,mBAAmB;CAO/B;AAPD,kDAOC;AALC;IADC,IAAA,4BAAU,GAAE;;2DAC4B;AAIzC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;4DACW;AAK1B,MAAa,qBAAqB;CASjC;AATD,sDASC;AAPC;IADC,IAAA,0BAAQ,GAAE;;wDACO;AAGlB;IADC,IAAA,0BAAQ,GAAE;;uDACM;AAGjB;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,wBAAwB,CAAC;;mEACR"}
|
package/dist/v2/types/pools.d.ts
CHANGED
|
@@ -13,6 +13,9 @@ export declare enum CloudPoolStatus {
|
|
|
13
13
|
Scaling = "scaling",
|
|
14
14
|
Terminated = "terminated"
|
|
15
15
|
}
|
|
16
|
+
export declare class PoolScaleConfiguration {
|
|
17
|
+
size: number;
|
|
18
|
+
}
|
|
16
19
|
export declare class CloudPoolConfiguration {
|
|
17
20
|
providerSettings?: CloudResourceCreationConfig;
|
|
18
21
|
cloudProvider: CloudProvider;
|
|
@@ -22,7 +25,12 @@ export declare class CloudPoolConfiguration {
|
|
|
22
25
|
export type CloudResourcesMap = Record<string, {
|
|
23
26
|
status: CloudResourceStatus;
|
|
24
27
|
}>;
|
|
25
|
-
export declare class PoolScaleConfiguration {
|
|
26
|
-
size: number;
|
|
27
|
-
}
|
|
28
28
|
export type CloudResourcesStatusMap = Record<CloudResourceStatus, number>;
|
|
29
|
+
export declare class CloudPool {
|
|
30
|
+
id: string;
|
|
31
|
+
status: CloudPoolStatus;
|
|
32
|
+
createdAt: number;
|
|
33
|
+
updatedAt?: number;
|
|
34
|
+
config: CloudPoolConfiguration;
|
|
35
|
+
resources?: CloudResourcesMap;
|
|
36
|
+
}
|
package/dist/v2/types/pools.js
CHANGED
|
@@ -9,7 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.CloudPool = exports.CloudPoolConfiguration = exports.PoolScaleConfiguration = exports.CloudPoolStatus = exports.CloudResourceStatus = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
14
|
const cloud_1 = require("./cloud");
|
|
15
15
|
const decorators_1 = require("../../decorators");
|
|
@@ -29,6 +29,13 @@ var CloudPoolStatus;
|
|
|
29
29
|
CloudPoolStatus["Scaling"] = "scaling";
|
|
30
30
|
CloudPoolStatus["Terminated"] = "terminated";
|
|
31
31
|
})(CloudPoolStatus || (exports.CloudPoolStatus = CloudPoolStatus = {}));
|
|
32
|
+
class PoolScaleConfiguration {
|
|
33
|
+
}
|
|
34
|
+
exports.PoolScaleConfiguration = PoolScaleConfiguration;
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, class_validator_1.IsNumber)(),
|
|
37
|
+
__metadata("design:type", Number)
|
|
38
|
+
], PoolScaleConfiguration.prototype, "size", void 0);
|
|
32
39
|
class CloudPoolConfiguration {
|
|
33
40
|
}
|
|
34
41
|
exports.CloudPoolConfiguration = CloudPoolConfiguration;
|
|
@@ -44,11 +51,7 @@ __decorate([
|
|
|
44
51
|
(0, decorators_1.ValidateNestedType)(() => PoolScaleConfiguration),
|
|
45
52
|
__metadata("design:type", PoolScaleConfiguration)
|
|
46
53
|
], CloudPoolConfiguration.prototype, "poolScaleConfiguration", void 0);
|
|
47
|
-
class
|
|
54
|
+
class CloudPool {
|
|
48
55
|
}
|
|
49
|
-
exports.
|
|
50
|
-
__decorate([
|
|
51
|
-
(0, class_validator_1.IsNumber)(),
|
|
52
|
-
__metadata("design:type", Number)
|
|
53
|
-
], PoolScaleConfiguration.prototype, "size", void 0);
|
|
56
|
+
exports.CloudPool = CloudPool;
|
|
54
57
|
//# sourceMappingURL=pools.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pools.js","sourceRoot":"","sources":["../../../src/v2/types/pools.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA2D;AAC3D,mCAAqE;AACrE,iDAAsD;AAEtD,IAAY,mBAQX;AARD,WAAY,mBAAmB;IAC7B,8CAAuB,CAAA;IACvB,8CAAuB,CAAA;IACvB,4CAAqB,CAAA;IACrB,gDAAyB,CAAA;IACzB,sCAAe,CAAA;IACf,gDAAyB,CAAA;IACzB,kDAA2B,CAAA;AAC7B,CAAC,EARW,mBAAmB,mCAAnB,mBAAmB,QAQ9B;AAED,IAAY,eAIX;AAJD,WAAY,eAAe;IACzB,oCAAiB,CAAA;IACjB,sCAAmB,CAAA;IACnB,4CAAyB,CAAA;AAC3B,CAAC,EAJW,eAAe,+BAAf,eAAe,QAI1B;AAED,MAAa,sBAAsB;CAWlC;AAXD,wDAWC;AAPC;IADC,IAAA,wBAAM,EAAC,qBAAa,CAAC;;6DACO;AAG7B;IADC,IAAA,wBAAM,GAAE;;sDACM;AAGf;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,sBAAsB,CAAC;8BACzB,sBAAsB;sEAAC;
|
|
1
|
+
{"version":3,"file":"pools.js","sourceRoot":"","sources":["../../../src/v2/types/pools.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA2D;AAC3D,mCAAqE;AACrE,iDAAsD;AAEtD,IAAY,mBAQX;AARD,WAAY,mBAAmB;IAC7B,8CAAuB,CAAA;IACvB,8CAAuB,CAAA;IACvB,4CAAqB,CAAA;IACrB,gDAAyB,CAAA;IACzB,sCAAe,CAAA;IACf,gDAAyB,CAAA;IACzB,kDAA2B,CAAA;AAC7B,CAAC,EARW,mBAAmB,mCAAnB,mBAAmB,QAQ9B;AAED,IAAY,eAIX;AAJD,WAAY,eAAe;IACzB,oCAAiB,CAAA;IACjB,sCAAmB,CAAA;IACnB,4CAAyB,CAAA;AAC3B,CAAC,EAJW,eAAe,+BAAf,eAAe,QAI1B;AAED,MAAa,sBAAsB;CAGlC;AAHD,wDAGC;AADC;IADC,IAAA,0BAAQ,GAAE;;oDACE;AAGf,MAAa,sBAAsB;CAWlC;AAXD,wDAWC;AAPC;IADC,IAAA,wBAAM,EAAC,qBAAa,CAAC;;6DACO;AAG7B;IADC,IAAA,wBAAM,GAAE;;sDACM;AAGf;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,sBAAsB,CAAC;8BACzB,sBAAsB;sEAAC;AAOjD,MAAa,SAAS;CAOrB;AAPD,8BAOC"}
|
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IsUUID
|
|
1
|
+
import { IsUUID } from "class-validator";
|
|
2
2
|
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
3
3
|
import { AWSResourceProviderSettings } from "../types";
|
|
4
4
|
import { ValidateNestedType } from "../../decorators";
|
|
@@ -10,7 +10,7 @@ export class MonitorResourceTaskEventPayload {
|
|
|
10
10
|
@IsUUID()
|
|
11
11
|
poolId: string;
|
|
12
12
|
|
|
13
|
-
@
|
|
13
|
+
@ValidateNestedType(() => AWSResourceProviderSettings)
|
|
14
14
|
providerSettings: AWSResourceProviderSettings;
|
|
15
15
|
}
|
|
16
16
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
2
2
|
import { PoolContext } from "../contexts/pool-context";
|
|
3
3
|
import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
|
|
4
|
-
import { CloudPool } from "../
|
|
4
|
+
import { CloudPool } from "../types/pools";
|
|
5
5
|
|
|
6
6
|
export class PoolCreatedEvent extends LudeoEvent {
|
|
7
7
|
static readonly EVENT_NAME = "cloud-pools.pool-created";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
2
2
|
import { PoolContext } from "../contexts/pool-context";
|
|
3
|
-
import { CloudPool } from "../models/cloud-pool";
|
|
4
3
|
import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
|
|
4
|
+
import { CloudPool } from "../types/pools";
|
|
5
5
|
|
|
6
6
|
export class PoolUpdatedEvent extends LudeoEvent {
|
|
7
7
|
static readonly EVENT_NAME = "cloud-pools.pool-updated";
|
package/src/v2/index.ts
CHANGED
package/src/v2/types/cloud.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { GameCast } from "@ludeo/aws-gamecast-sdk";
|
|
2
2
|
import {
|
|
3
3
|
IsDefined,
|
|
4
|
+
IsEnum,
|
|
4
5
|
IsNotEmpty,
|
|
5
6
|
IsOptional,
|
|
6
7
|
IsString,
|
|
@@ -64,6 +65,9 @@ export class AWSResourceProviderSettings {
|
|
|
64
65
|
|
|
65
66
|
@IsString()
|
|
66
67
|
streamGroupId: string;
|
|
68
|
+
|
|
69
|
+
@IsEnum(CloudProvider)
|
|
70
|
+
cloudProvider: CloudProvider;
|
|
67
71
|
}
|
|
68
72
|
|
|
69
73
|
export class AWSCreationResponse {
|
package/src/v2/types/pools.ts
CHANGED
|
@@ -18,6 +18,11 @@ export enum CloudPoolStatus {
|
|
|
18
18
|
Terminated = "terminated",
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
export class PoolScaleConfiguration {
|
|
22
|
+
@IsNumber()
|
|
23
|
+
size: number;
|
|
24
|
+
}
|
|
25
|
+
|
|
21
26
|
export class CloudPoolConfiguration {
|
|
22
27
|
providerSettings?: CloudResourceCreationConfig;
|
|
23
28
|
|
|
@@ -33,9 +38,13 @@ export class CloudPoolConfiguration {
|
|
|
33
38
|
|
|
34
39
|
export type CloudResourcesMap = Record<string, { status: CloudResourceStatus }>;
|
|
35
40
|
|
|
36
|
-
export class PoolScaleConfiguration {
|
|
37
|
-
@IsNumber()
|
|
38
|
-
size: number;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
41
|
export type CloudResourcesStatusMap = Record<CloudResourceStatus, number>;
|
|
42
|
+
|
|
43
|
+
export class CloudPool {
|
|
44
|
+
id: string;
|
|
45
|
+
status: CloudPoolStatus;
|
|
46
|
+
createdAt: number;
|
|
47
|
+
updatedAt?: number;
|
|
48
|
+
config: CloudPoolConfiguration;
|
|
49
|
+
resources?: CloudResourcesMap;
|
|
50
|
+
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
CloudPoolConfiguration,
|
|
3
|
-
CloudPoolStatus,
|
|
4
|
-
CloudResourcesMap,
|
|
5
|
-
} from "../types";
|
|
6
|
-
|
|
7
|
-
export class CloudPool {
|
|
8
|
-
id: string;
|
|
9
|
-
status: CloudPoolStatus;
|
|
10
|
-
createdAt: number;
|
|
11
|
-
updatedAt?: number;
|
|
12
|
-
config: CloudPoolConfiguration;
|
|
13
|
-
resources?: CloudResourcesMap;
|
|
14
|
-
}
|
package/src/v2/models/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./cloud-pool";
|