@ludeo/cloud-common 1.2.91 → 1.2.93
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/machine-allocated-response.d.ts +3 -2
- package/dist/v4/events/machine-allocated-response.js +4 -0
- package/dist/v4/events/machine-allocated-response.js.map +1 -1
- package/dist/v4/events/monitor-game-resource-task.d.ts +2 -2
- package/dist/v4/events/monitor-game-resource-task.js.map +1 -1
- package/dist/v4/events/set-pools-state.d.ts +1 -0
- package/dist/v4/events/set-pools-state.js +5 -0
- package/dist/v4/events/set-pools-state.js.map +1 -1
- package/dist/v4/types/cloud/mock/allocation-data.d.ts +0 -1
- package/dist/v4/types/cloud/mock/allocation-data.js +0 -4
- package/dist/v4/types/cloud/mock/allocation-data.js.map +1 -1
- package/package.json +1 -1
- package/src/v4/events/machine-allocated-response.ts +7 -2
- package/src/v4/events/monitor-game-resource-task.ts +4 -2
- package/src/v4/events/set-pools-state.ts +5 -1
- package/src/v4/types/cloud/mock/allocation-data.ts +0 -3
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { CloudResourceContext } from "../contexts";
|
|
2
2
|
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
3
|
-
import { CloudProviderSettings, CloudProvider } from "../types";
|
|
4
|
-
export declare class MachineAllocatedResponsePayload<T extends CloudProviderSettings = CloudProviderSettings> {
|
|
3
|
+
import { CloudProviderSettings, CloudProvider, MachineResourceProviderSettings } from "../types";
|
|
4
|
+
export declare class MachineAllocatedResponsePayload<T extends CloudProviderSettings = CloudProviderSettings, K extends MachineResourceProviderSettings = MachineResourceProviderSettings> {
|
|
5
5
|
machineResourceId: string;
|
|
6
6
|
machinePoolId: string;
|
|
7
7
|
gameResourceId: string;
|
|
8
8
|
gamePoolId: string;
|
|
9
9
|
providerSettings: T;
|
|
10
10
|
cloudProvider: CloudProvider;
|
|
11
|
+
machineProviderSettings?: K;
|
|
11
12
|
}
|
|
12
13
|
export declare class MachineAllocatedResponse extends LudeoEvent {
|
|
13
14
|
static readonly EVENT_NAME = "cloud-pools.machine-allocated-response";
|
|
@@ -42,6 +42,10 @@ __decorate([
|
|
|
42
42
|
(0, class_validator_1.IsEnum)(types_1.CloudProvider),
|
|
43
43
|
__metadata("design:type", String)
|
|
44
44
|
], MachineAllocatedResponsePayload.prototype, "cloudProvider", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, class_validator_1.IsOptional)(),
|
|
47
|
+
__metadata("design:type", Object)
|
|
48
|
+
], MachineAllocatedResponsePayload.prototype, "machineProviderSettings", void 0);
|
|
45
49
|
class MachineAllocatedResponse extends ludeo_event_1.LudeoEvent {
|
|
46
50
|
constructor(payload, context) {
|
|
47
51
|
super(MachineAllocatedResponse.EVENT_NAME);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"machine-allocated-response.js","sourceRoot":"","sources":["../../../src/v4/events/machine-allocated-response.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"machine-allocated-response.js","sourceRoot":"","sources":["../../../src/v4/events/machine-allocated-response.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA6D;AAE7D,0CAAmD;AACnD,yDAAqD;AACrD,oGAAqF;AACrF,oCAKkB;AAElB,MAAa,+BAA+B;CAwB3C;AAxBD,0EAwBC;AAnBC;IADC,IAAA,wBAAM,GAAE;;0EACiB;AAG1B;IADC,IAAA,wBAAM,GAAE;;sEACa;AAGtB;IADC,IAAA,wBAAM,GAAE;;uEACc;AAGvB;IADC,IAAA,wBAAM,GAAE;;mEACU;AAGnB;IADC,IAAA,mDAAkB,EAAC,+BAAuB,CAAC;;yEACxB;AAGpB;IADC,IAAA,wBAAM,EAAC,qBAAa,CAAC;;sEACO;AAG7B;IADC,IAAA,4BAAU,GAAE;;gFACe;AAG9B,MAAa,wBAAyB,SAAQ,wBAAU;IAGtD,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;;AAVH,4DAiBC;AAhBiB,mCAAU,GAAG,wCAAwC,CAAC;AAYtE;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,+BAAoB,CAAC;8BACtC,+BAAoB;yDAAC;AAG9B;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,+BAA+B,CAAC;8BACjD,+BAA+B;yDAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
2
2
|
import { CloudProvider, CloudResourceProviderSettings } from "../types";
|
|
3
|
-
export declare class MonitorGameResourceTaskEventPayload {
|
|
3
|
+
export declare class MonitorGameResourceTaskEventPayload<T extends CloudResourceProviderSettings = CloudResourceProviderSettings> {
|
|
4
4
|
gameResourceId: string;
|
|
5
5
|
gamePoolId: string;
|
|
6
|
-
providerSettings:
|
|
6
|
+
providerSettings: T;
|
|
7
7
|
cloudProvider: CloudProvider;
|
|
8
8
|
}
|
|
9
9
|
export declare class MonitorGameResourceTaskEvent extends LudeoEvent {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"monitor-game-resource-task.js","sourceRoot":"","sources":["../../../src/v4/events/monitor-game-resource-task.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAiD;AACjD,yDAAqD;AACrD,oCAIkB;AAClB,iDAAsD;AAEtD,MAAa,mCAAmC;
|
|
1
|
+
{"version":3,"file":"monitor-game-resource-task.js","sourceRoot":"","sources":["../../../src/v4/events/monitor-game-resource-task.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAiD;AACjD,yDAAqD;AACrD,oCAIkB;AAClB,iDAAsD;AAEtD,MAAa,mCAAmC;CAc/C;AAdD,kFAcC;AAVC;IADC,IAAA,wBAAM,GAAE;;2EACc;AAGvB;IADC,IAAA,wBAAM,GAAE;;uEACU;AAGnB;IADC,IAAA,+BAAkB,EAAC,uCAA+B,CAAC;;6EAChC;AAGpB;IADC,IAAA,wBAAM,EAAC,qBAAa,CAAC;;0EACO;AAG/B,MAAa,4BAA6B,SAAQ,wBAAU;IAG1D,YAAY,OAA4C;QACtD,KAAK,CAAC,4BAA4B,CAAC,UAAU,CAAC,CAAC;QAC/C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AANH,oEAYC;AAXiB,uCAAU,GAAG,4CAA4C,CAAC;AAU1E;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,mCAAmC,CAAC;8BACrD,mCAAmC;6DAAC"}
|
|
@@ -10,6 +10,7 @@ export declare class LudeoPoolAttributesWithQuantity extends BasePoolAttributesW
|
|
|
10
10
|
}
|
|
11
11
|
export declare class GamePoolAttributesWithQuantity extends BasePoolAttributesWithQuantity {
|
|
12
12
|
ludeos: LudeoPoolAttributesWithQuantity[];
|
|
13
|
+
postCreationDelay?: number;
|
|
13
14
|
}
|
|
14
15
|
export declare class MachinePoolAttributesWithQuantity extends BasePoolAttributesWithQuantity {
|
|
15
16
|
games: GamePoolAttributesWithQuantity[];
|
|
@@ -22,6 +22,11 @@ exports.LudeoPoolAttributesWithQuantity = LudeoPoolAttributesWithQuantity;
|
|
|
22
22
|
class GamePoolAttributesWithQuantity extends BasePoolAttributesWithQuantity {
|
|
23
23
|
}
|
|
24
24
|
exports.GamePoolAttributesWithQuantity = GamePoolAttributesWithQuantity;
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_validator_1.IsOptional)(),
|
|
27
|
+
(0, class_validator_1.IsNumber)(),
|
|
28
|
+
__metadata("design:type", Number)
|
|
29
|
+
], GamePoolAttributesWithQuantity.prototype, "postCreationDelay", void 0);
|
|
25
30
|
class MachinePoolAttributesWithQuantity extends BasePoolAttributesWithQuantity {
|
|
26
31
|
}
|
|
27
32
|
exports.MachinePoolAttributesWithQuantity = MachinePoolAttributesWithQuantity;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"set-pools-state.js","sourceRoot":"","sources":["../../../src/v4/events/set-pools-state.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"set-pools-state.js","sourceRoot":"","sources":["../../../src/v4/events/set-pools-state.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAwE;AAExE,yDAAqD;AACrD,oGAAqF;AAIrF,MAAa,8BAA8B;CAQ1C;AARD,wEAQC;AAED,MAAa,+BAAgC,SAAQ,8BAA8B;CAAG;AAAtF,0EAAsF;AAEtF,MAAa,8BAA+B,SAAQ,8BAA8B;CAMjF;AAND,wEAMC;AADC;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;yEACgB;AAG7B,MAAa,iCAAkC,SAAQ,8BAA8B;CAEpF;AAFD,8EAEC;AAED,MAAa,2BAA2B;CAMvC;AAND,kEAMC;AAJC;IADC,IAAA,wBAAM,GAAE;;yEACoB;AAG7B;IADC,IAAA,wBAAM,GAAE;;4EACuB;AAGlC,MAAa,wBAAwB;CAQpC;AARD,4DAQC;AALC;IAFC,IAAA,yBAAO,GAAE;IACT,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,KAAwC,CAAC;;0DACrB;AAI9C;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,2BAA2B,CAAC;8BAC1C,2BAA2B;2DAAC;AAG1C,MAAa,kBAAmB,SAAQ,wBAAU;IAGhD,YAAY,OAAiC;QAC3C,KAAK,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC;QACrC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AANH,gDAUC;AATiB,6BAAU,GAAG,2BAA2B,CAAC;AAQzD;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,wBAAwB,CAAC;8BAC1C,wBAAwB;mDAAC"}
|
|
@@ -14,10 +14,6 @@ const class_validator_1 = require("class-validator");
|
|
|
14
14
|
class MockAllocationData {
|
|
15
15
|
}
|
|
16
16
|
exports.MockAllocationData = MockAllocationData;
|
|
17
|
-
__decorate([
|
|
18
|
-
(0, class_validator_1.IsString)(),
|
|
19
|
-
__metadata("design:type", String)
|
|
20
|
-
], MockAllocationData.prototype, "machineId", void 0);
|
|
21
17
|
__decorate([
|
|
22
18
|
(0, class_validator_1.IsString)(),
|
|
23
19
|
__metadata("design:type", String)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allocation-data.js","sourceRoot":"","sources":["../../../../../src/v4/types/cloud/mock/allocation-data.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA2C;AAE3C,MAAa,kBAAkB;
|
|
1
|
+
{"version":3,"file":"allocation-data.js","sourceRoot":"","sources":["../../../../../src/v4/types/cloud/mock/allocation-data.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA2C;AAE3C,MAAa,kBAAkB;CAM9B;AAND,gDAMC;AAJC;IADC,IAAA,0BAAQ,GAAE;;oDACM;AAGjB;IADC,IAAA,0BAAQ,GAAE;;0DACY"}
|
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IsUUID, IsEnum } from "class-validator";
|
|
1
|
+
import { IsUUID, IsEnum, IsOptional } from "class-validator";
|
|
2
2
|
|
|
3
3
|
import { CloudResourceContext } from "../contexts";
|
|
4
4
|
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
@@ -7,10 +7,12 @@ import {
|
|
|
7
7
|
CloudProviderSettings,
|
|
8
8
|
CloudProvider,
|
|
9
9
|
getProviderSettingsType,
|
|
10
|
+
MachineResourceProviderSettings,
|
|
10
11
|
} from "../types";
|
|
11
12
|
|
|
12
13
|
export class MachineAllocatedResponsePayload<
|
|
13
|
-
T extends CloudProviderSettings = CloudProviderSettings
|
|
14
|
+
T extends CloudProviderSettings = CloudProviderSettings,
|
|
15
|
+
K extends MachineResourceProviderSettings = MachineResourceProviderSettings
|
|
14
16
|
> {
|
|
15
17
|
@IsUUID()
|
|
16
18
|
machineResourceId: string;
|
|
@@ -29,6 +31,9 @@ export class MachineAllocatedResponsePayload<
|
|
|
29
31
|
|
|
30
32
|
@IsEnum(CloudProvider)
|
|
31
33
|
cloudProvider: CloudProvider;
|
|
34
|
+
|
|
35
|
+
@IsOptional()
|
|
36
|
+
machineProviderSettings?: K;
|
|
32
37
|
}
|
|
33
38
|
|
|
34
39
|
export class MachineAllocatedResponse extends LudeoEvent {
|
|
@@ -7,7 +7,9 @@ import {
|
|
|
7
7
|
} from "../types";
|
|
8
8
|
import { ValidateNestedType } from "../../decorators";
|
|
9
9
|
|
|
10
|
-
export class MonitorGameResourceTaskEventPayload
|
|
10
|
+
export class MonitorGameResourceTaskEventPayload<
|
|
11
|
+
T extends CloudResourceProviderSettings = CloudResourceProviderSettings
|
|
12
|
+
> {
|
|
11
13
|
@IsUUID()
|
|
12
14
|
gameResourceId: string;
|
|
13
15
|
|
|
@@ -15,7 +17,7 @@ export class MonitorGameResourceTaskEventPayload {
|
|
|
15
17
|
gamePoolId: string;
|
|
16
18
|
|
|
17
19
|
@ValidateNestedType(getResourceProviderSettingsType)
|
|
18
|
-
providerSettings:
|
|
20
|
+
providerSettings: T;
|
|
19
21
|
|
|
20
22
|
@IsEnum(CloudProvider)
|
|
21
23
|
cloudProvider: CloudProvider;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IsArray, IsOptional, IsUUID } from "class-validator";
|
|
1
|
+
import { IsArray, IsNumber, IsOptional, IsUUID } from "class-validator";
|
|
2
2
|
|
|
3
3
|
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
4
4
|
import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
|
|
@@ -19,6 +19,10 @@ export class LudeoPoolAttributesWithQuantity extends BasePoolAttributesWithQuant
|
|
|
19
19
|
|
|
20
20
|
export class GamePoolAttributesWithQuantity extends BasePoolAttributesWithQuantity {
|
|
21
21
|
ludeos: LudeoPoolAttributesWithQuantity[];
|
|
22
|
+
|
|
23
|
+
@IsOptional()
|
|
24
|
+
@IsNumber()
|
|
25
|
+
postCreationDelay?: number;
|
|
22
26
|
}
|
|
23
27
|
|
|
24
28
|
export class MachinePoolAttributesWithQuantity extends BasePoolAttributesWithQuantity {
|