@ludeo/cloud-common 1.1.78 → 1.1.79-beta1
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/v3/events/index.d.ts +1 -1
- package/dist/v3/events/index.js +1 -1
- package/dist/v3/events/index.js.map +1 -1
- package/dist/v3/events/pool-status.d.ts +16 -0
- package/dist/v3/events/{pools-status.js → pool-status.js} +14 -18
- package/dist/v3/events/pool-status.js.map +1 -0
- package/dist/v3/types/pools/configuration/attributes/base.d.ts +2 -0
- package/dist/v3/types/pools/configuration/attributes/base.js +15 -0
- package/dist/v3/types/pools/configuration/attributes/base.js.map +1 -1
- package/package.json +1 -1
- package/src/v3/events/index.ts +1 -1
- package/src/v3/events/pool-status.ts +34 -0
- package/src/v3/types/pools/configuration/attributes/base.ts +7 -1
- package/dist/v3/events/pools-status.d.ts +0 -14
- package/dist/v3/events/pools-status.js.map +0 -1
- package/src/v3/events/pools-status.ts +0 -27
|
@@ -26,7 +26,7 @@ export * from "./machine-pool-resizing-task";
|
|
|
26
26
|
export * from "./machine-resource-created-response";
|
|
27
27
|
export * from "./machine-resource-creation-failed-response";
|
|
28
28
|
export * from "./monitor-game-resource-task";
|
|
29
|
-
export * from "./
|
|
29
|
+
export * from "./pool-status";
|
|
30
30
|
export * from "./set-pool.event";
|
|
31
31
|
export * from "./set-pools-state";
|
|
32
32
|
export * from "./swap-cloud-user-completed";
|
package/dist/v3/events/index.js
CHANGED
|
@@ -42,7 +42,7 @@ __exportStar(require("./machine-pool-resizing-task"), exports);
|
|
|
42
42
|
__exportStar(require("./machine-resource-created-response"), exports);
|
|
43
43
|
__exportStar(require("./machine-resource-creation-failed-response"), exports);
|
|
44
44
|
__exportStar(require("./monitor-game-resource-task"), exports);
|
|
45
|
-
__exportStar(require("./
|
|
45
|
+
__exportStar(require("./pool-status"), exports);
|
|
46
46
|
__exportStar(require("./set-pool.event"), exports);
|
|
47
47
|
__exportStar(require("./set-pools-state"), exports);
|
|
48
48
|
__exportStar(require("./swap-cloud-user-completed"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/v3/events/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,mEAAiD;AACjD,6DAA2C;AAC3C,iEAA+C;AAC/C,yDAAuC;AACvC,0EAAwD;AACxD,oEAAkD;AAClD,4DAA0C;AAC1C,+DAA6C;AAC7C,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,sEAAoD;AACpD,8EAA4D;AAC5D,+DAA6C;AAC7C,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/v3/events/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,mEAAiD;AACjD,6DAA2C;AAC3C,iEAA+C;AAC/C,yDAAuC;AACvC,0EAAwD;AACxD,oEAAkD;AAClD,4DAA0C;AAC1C,+DAA6C;AAC7C,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,sEAAoD;AACpD,8EAA4D;AAC5D,+DAA6C;AAC7C,gDAA8B;AAC9B,mDAAiC;AACjC,oDAAkC;AAClC,8DAA4C;AAC5C,mEAAiD;AACjD,4DAA0C;AAC1C,2DAAyC;AACzC,oEAAkD;AAClD,4DAA0C;AAC1C,6EAA2D;AAC3D,+DAA6C;AAC7C,+DAA6C;AAC7C,sEAAoD;AACpD,yDAAuC;AACvC,6DAA2C"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
2
|
+
import { CloudResourcesStatusMap, BasePoolAttributes } from "../types";
|
|
3
|
+
export declare class PoolStatusEventPoolV2 {
|
|
4
|
+
attributes: BasePoolAttributes;
|
|
5
|
+
statusMap: CloudResourcesStatusMap;
|
|
6
|
+
}
|
|
7
|
+
export type PoolStatusEventPayloadV1 = Record<string, string | number>;
|
|
8
|
+
export declare class PoolStatusEventPayload {
|
|
9
|
+
games: PoolStatusEventPayloadV1[];
|
|
10
|
+
machines: PoolStatusEventPayloadV1[];
|
|
11
|
+
}
|
|
12
|
+
export declare class PoolStatusEvent extends LudeoEvent {
|
|
13
|
+
static readonly EVENT_NAME = "cloud-pools.pool-status";
|
|
14
|
+
constructor(payload: PoolStatusEventPayload);
|
|
15
|
+
payload: PoolStatusEventPayload;
|
|
16
|
+
}
|
|
@@ -9,34 +9,30 @@ 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.PoolStatusEvent = exports.PoolStatusEventPayload = exports.PoolStatusEventPoolV2 = void 0;
|
|
13
13
|
const ludeo_event_1 = require("../../infra/ludeo-event");
|
|
14
14
|
const types_1 = require("../types");
|
|
15
15
|
const validate_nested_type_decorator_1 = require("../../decorators/validate-nested-type.decorator");
|
|
16
|
-
class
|
|
16
|
+
class PoolStatusEventPoolV2 {
|
|
17
17
|
}
|
|
18
|
-
exports.
|
|
18
|
+
exports.PoolStatusEventPoolV2 = PoolStatusEventPoolV2;
|
|
19
19
|
__decorate([
|
|
20
20
|
(0, validate_nested_type_decorator_1.ValidateNestedType)(() => types_1.BasePoolAttributes),
|
|
21
21
|
__metadata("design:type", types_1.BasePoolAttributes)
|
|
22
|
-
],
|
|
23
|
-
class
|
|
22
|
+
], PoolStatusEventPoolV2.prototype, "attributes", void 0);
|
|
23
|
+
class PoolStatusEventPayload {
|
|
24
24
|
}
|
|
25
|
-
exports.
|
|
26
|
-
|
|
27
|
-
(0, validate_nested_type_decorator_1.ValidateNestedType)(() => Array),
|
|
28
|
-
__metadata("design:type", Array)
|
|
29
|
-
], PoolsStatusEventPayload.prototype, "pools", void 0);
|
|
30
|
-
class PoolsStatusEvent extends ludeo_event_1.LudeoEvent {
|
|
25
|
+
exports.PoolStatusEventPayload = PoolStatusEventPayload;
|
|
26
|
+
class PoolStatusEvent extends ludeo_event_1.LudeoEvent {
|
|
31
27
|
constructor(payload) {
|
|
32
|
-
super(
|
|
28
|
+
super(PoolStatusEvent.EVENT_NAME);
|
|
33
29
|
this.payload = payload;
|
|
34
30
|
}
|
|
35
31
|
}
|
|
36
|
-
exports.
|
|
37
|
-
|
|
32
|
+
exports.PoolStatusEvent = PoolStatusEvent;
|
|
33
|
+
PoolStatusEvent.EVENT_NAME = "cloud-pools.pool-status";
|
|
38
34
|
__decorate([
|
|
39
|
-
(0, validate_nested_type_decorator_1.ValidateNestedType)(() =>
|
|
40
|
-
__metadata("design:type",
|
|
41
|
-
],
|
|
42
|
-
//# sourceMappingURL=
|
|
35
|
+
(0, validate_nested_type_decorator_1.ValidateNestedType)(() => PoolStatusEventPayload),
|
|
36
|
+
__metadata("design:type", PoolStatusEventPayload)
|
|
37
|
+
], PoolStatusEvent.prototype, "payload", void 0);
|
|
38
|
+
//# sourceMappingURL=pool-status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pool-status.js","sourceRoot":"","sources":["../../../src/v3/events/pool-status.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAqD;AACrD,oCAAuE;AACvE,oGAAqF;AAKrF,MAAa,qBAAqB;CAKjC;AALD,sDAKC;AAHC;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,0BAAkB,CAAC;8BACjC,0BAAkB;yDAAC;AAQjC,MAAa,sBAAsB;CAIlC;AAJD,wDAIC;AAED,MAAa,eAAgB,SAAQ,wBAAU;IAG7C,YAAY,OAA+B;QACzC,KAAK,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;QAClC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AANH,0CAUC;AATiB,0BAAU,GAAG,yBAAyB,CAAC;AAQvD;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,sBAAsB,CAAC;8BACxC,sBAAsB;gDAAC"}
|
|
@@ -1,7 +1,22 @@
|
|
|
1
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
|
+
};
|
|
2
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
12
|
exports.BasePoolAttributes = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const cloud_1 = require("../../../cloud");
|
|
4
15
|
class BasePoolAttributes {
|
|
5
16
|
}
|
|
6
17
|
exports.BasePoolAttributes = BasePoolAttributes;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, class_validator_1.IsEnum)(cloud_1.CloudProvider),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], BasePoolAttributes.prototype, "cloudProvider", void 0);
|
|
7
22
|
//# sourceMappingURL=base.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.js","sourceRoot":"","sources":["../../../../../../src/v3/types/pools/configuration/attributes/base.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"base.js","sourceRoot":"","sources":["../../../../../../src/v3/types/pools/configuration/attributes/base.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAyC;AACzC,0CAA+C;AAE/C,MAAa,kBAAkB;CAG9B;AAHD,gDAGC;AADC;IADC,IAAA,wBAAM,EAAC,qBAAa,CAAC;;yDACO"}
|
package/package.json
CHANGED
package/src/v3/events/index.ts
CHANGED
|
@@ -26,7 +26,7 @@ export * from "./machine-pool-resizing-task";
|
|
|
26
26
|
export * from "./machine-resource-created-response";
|
|
27
27
|
export * from "./machine-resource-creation-failed-response";
|
|
28
28
|
export * from "./monitor-game-resource-task";
|
|
29
|
-
export * from "./
|
|
29
|
+
export * from "./pool-status";
|
|
30
30
|
export * from "./set-pool.event";
|
|
31
31
|
export * from "./set-pools-state";
|
|
32
32
|
export * from "./swap-cloud-user-completed";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
2
|
+
import { CloudResourcesStatusMap, BasePoolAttributes } from "../types";
|
|
3
|
+
import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Will be used later on in a newer version of the predictor
|
|
7
|
+
*/
|
|
8
|
+
export class PoolStatusEventPoolV2 {
|
|
9
|
+
@ValidateNestedType(() => BasePoolAttributes)
|
|
10
|
+
attributes: BasePoolAttributes;
|
|
11
|
+
|
|
12
|
+
statusMap: CloudResourcesStatusMap;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// something like {...attributes, ...statusMap}
|
|
16
|
+
export type PoolStatusEventPayloadV1 = Record<string, string | number>;
|
|
17
|
+
|
|
18
|
+
export class PoolStatusEventPayload {
|
|
19
|
+
games: PoolStatusEventPayloadV1[];
|
|
20
|
+
|
|
21
|
+
machines: PoolStatusEventPayloadV1[];
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export class PoolStatusEvent extends LudeoEvent {
|
|
25
|
+
static readonly EVENT_NAME = "cloud-pools.pool-status";
|
|
26
|
+
|
|
27
|
+
constructor(payload: PoolStatusEventPayload) {
|
|
28
|
+
super(PoolStatusEvent.EVENT_NAME);
|
|
29
|
+
this.payload = payload;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@ValidateNestedType(() => PoolStatusEventPayload)
|
|
33
|
+
payload: PoolStatusEventPayload;
|
|
34
|
+
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
2
|
-
import { CloudResourcesStatusMap, BasePoolAttributes } from "../types";
|
|
3
|
-
export declare class PoolsStatusEventPool {
|
|
4
|
-
attributes: BasePoolAttributes;
|
|
5
|
-
statusMap: CloudResourcesStatusMap;
|
|
6
|
-
}
|
|
7
|
-
export declare class PoolsStatusEventPayload {
|
|
8
|
-
pools: PoolsStatusEventPool[];
|
|
9
|
-
}
|
|
10
|
-
export declare class PoolsStatusEvent extends LudeoEvent {
|
|
11
|
-
static readonly EVENT_NAME = "cloud-pools.pools-status";
|
|
12
|
-
constructor(payload: PoolsStatusEventPayload);
|
|
13
|
-
payload: PoolsStatusEventPayload;
|
|
14
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pools-status.js","sourceRoot":"","sources":["../../../src/v3/events/pools-status.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAqD;AACrD,oCAAuE;AACvE,oGAAqF;AAErF,MAAa,oBAAoB;CAKhC;AALD,oDAKC;AAHC;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,0BAAkB,CAAC;8BACjC,0BAAkB;wDAAC;AAKjC,MAAa,uBAAuB;CAGnC;AAHD,0DAGC;AADC;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,KAA2B,CAAC;;sDACxB;AAGhC,MAAa,gBAAiB,SAAQ,wBAAU;IAG9C,YAAY,OAAgC;QAC1C,KAAK,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;QACnC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AANH,4CAUC;AATiB,2BAAU,GAAG,0BAA0B,CAAC;AAQxD;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,uBAAuB,CAAC;8BACzC,uBAAuB;iDAAC"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
2
|
-
import { CloudResourcesStatusMap, BasePoolAttributes } from "../types";
|
|
3
|
-
import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
|
|
4
|
-
|
|
5
|
-
export class PoolsStatusEventPool {
|
|
6
|
-
@ValidateNestedType(() => BasePoolAttributes)
|
|
7
|
-
attributes: BasePoolAttributes;
|
|
8
|
-
|
|
9
|
-
statusMap: CloudResourcesStatusMap;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export class PoolsStatusEventPayload {
|
|
13
|
-
@ValidateNestedType(() => Array<PoolsStatusEventPool>)
|
|
14
|
-
pools: PoolsStatusEventPool[];
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export class PoolsStatusEvent extends LudeoEvent {
|
|
18
|
-
static readonly EVENT_NAME = "cloud-pools.pools-status";
|
|
19
|
-
|
|
20
|
-
constructor(payload: PoolsStatusEventPayload) {
|
|
21
|
-
super(PoolsStatusEvent.EVENT_NAME);
|
|
22
|
-
this.payload = payload;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
@ValidateNestedType(() => PoolsStatusEventPayload)
|
|
26
|
-
payload: PoolsStatusEventPayload;
|
|
27
|
-
}
|