@ludeo/cloud-common 1.1.17 → 1.1.20
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/contexts/cloud-resource-context.d.ts +4 -2
- package/dist/v3/contexts/cloud-resource-context.js +20 -8
- package/dist/v3/contexts/cloud-resource-context.js.map +1 -1
- package/dist/v3/contexts/cloud-session-context.d.ts +6 -2
- package/dist/v3/contexts/cloud-session-context.js +25 -5
- package/dist/v3/contexts/cloud-session-context.js.map +1 -1
- package/dist/v3/contexts/getCloudContextType.d.ts +2 -2
- package/dist/v3/events/deallocate-machine-request.d.ts +3 -4
- package/dist/v3/events/deallocate-machine-request.js +1 -1
- package/dist/v3/events/deallocate-machine-request.js.map +1 -1
- package/dist/v3/events/machine-deallocated-response.d.ts +3 -4
- package/dist/v3/events/machine-deallocated-response.js +1 -1
- package/dist/v3/events/machine-deallocated-response.js.map +1 -1
- package/dist/v3/events/machine-deallocation-failed-response.d.ts +3 -4
- package/dist/v3/events/machine-deallocation-failed-response.js +1 -1
- package/dist/v3/events/machine-deallocation-failed-response.js.map +1 -1
- package/package.json +1 -1
- package/src/v3/contexts/cloud-resource-context.ts +16 -6
- package/src/v3/contexts/cloud-session-context.ts +22 -5
- package/src/v3/events/deallocate-machine-request.ts +4 -5
- package/src/v3/events/machine-deallocated-response.ts +7 -4
- package/src/v3/events/machine-deallocation-failed-response.ts +7 -4
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { CloudProvider } from "../types/cloud";
|
|
2
2
|
export declare class CloudResourceContext {
|
|
3
|
-
resourceId: string;
|
|
4
|
-
poolId: string;
|
|
5
3
|
streamGroupId?: string;
|
|
6
4
|
streamSessionId?: string;
|
|
7
5
|
cloudProvider: CloudProvider;
|
|
6
|
+
gamePoolId?: string;
|
|
7
|
+
gameResourceId?: string;
|
|
8
|
+
machinePoolId?: string;
|
|
9
|
+
machineResourceId?: string;
|
|
8
10
|
}
|
|
@@ -15,14 +15,6 @@ const cloud_1 = require("../types/cloud");
|
|
|
15
15
|
class CloudResourceContext {
|
|
16
16
|
}
|
|
17
17
|
exports.CloudResourceContext = CloudResourceContext;
|
|
18
|
-
__decorate([
|
|
19
|
-
(0, class_validator_1.IsUUID)(),
|
|
20
|
-
__metadata("design:type", String)
|
|
21
|
-
], CloudResourceContext.prototype, "resourceId", void 0);
|
|
22
|
-
__decorate([
|
|
23
|
-
(0, class_validator_1.IsUUID)(),
|
|
24
|
-
__metadata("design:type", String)
|
|
25
|
-
], CloudResourceContext.prototype, "poolId", void 0);
|
|
26
18
|
__decorate([
|
|
27
19
|
(0, class_validator_1.IsString)(),
|
|
28
20
|
(0, class_validator_1.IsOptional)(),
|
|
@@ -37,4 +29,24 @@ __decorate([
|
|
|
37
29
|
(0, class_validator_1.IsEnum)(cloud_1.CloudProvider),
|
|
38
30
|
__metadata("design:type", String)
|
|
39
31
|
], CloudResourceContext.prototype, "cloudProvider", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, class_validator_1.IsUUID)(),
|
|
34
|
+
(0, class_validator_1.IsOptional)(),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], CloudResourceContext.prototype, "gamePoolId", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, class_validator_1.IsUUID)(),
|
|
39
|
+
(0, class_validator_1.IsOptional)(),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], CloudResourceContext.prototype, "gameResourceId", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, class_validator_1.IsUUID)(),
|
|
44
|
+
(0, class_validator_1.IsOptional)(),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], CloudResourceContext.prototype, "machinePoolId", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, class_validator_1.IsUUID)(),
|
|
49
|
+
(0, class_validator_1.IsOptional)(),
|
|
50
|
+
__metadata("design:type", String)
|
|
51
|
+
], CloudResourceContext.prototype, "machineResourceId", void 0);
|
|
40
52
|
//# sourceMappingURL=cloud-resource-context.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloud-resource-context.js","sourceRoot":"","sources":["../../../src/v3/contexts/cloud-resource-context.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAuE;AACvE,0CAA+C;AAE/C,MAAa,oBAAoB;
|
|
1
|
+
{"version":3,"file":"cloud-resource-context.js","sourceRoot":"","sources":["../../../src/v3/contexts/cloud-resource-context.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAuE;AACvE,0CAA+C;AAE/C,MAAa,oBAAoB;CA2BhC;AA3BD,oDA2BC;AAxBC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;2DACU;AAIvB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;6DACY;AAGzB;IADC,IAAA,wBAAM,EAAC,qBAAa,CAAC;;2DACO;AAI7B;IAFC,IAAA,wBAAM,GAAE;IACR,IAAA,4BAAU,GAAE;;wDACO;AAIpB;IAFC,IAAA,wBAAM,GAAE;IACR,IAAA,4BAAU,GAAE;;4DACW;AAIxB;IAFC,IAAA,wBAAM,GAAE;IACR,IAAA,4BAAU,GAAE;;2DACU;AAIvB;IAFC,IAAA,wBAAM,GAAE;IACR,IAAA,4BAAU,GAAE;;+DACc"}
|
|
@@ -6,9 +6,13 @@ export declare class CloudSessionContext {
|
|
|
6
6
|
userId?: string;
|
|
7
7
|
gameId?: string;
|
|
8
8
|
ludeoId?: string;
|
|
9
|
-
poolId?: string;
|
|
10
9
|
cloudProvider: CloudProvider;
|
|
11
|
-
|
|
10
|
+
gamePoolId?: string;
|
|
11
|
+
gameResourceId?: string;
|
|
12
|
+
machinePoolId?: string;
|
|
13
|
+
machineResourceId?: string;
|
|
12
14
|
streamGroupId?: string;
|
|
13
15
|
streamSessionId?: string;
|
|
16
|
+
poolId?: string;
|
|
17
|
+
resourceId?: string;
|
|
14
18
|
}
|
|
@@ -45,19 +45,29 @@ __decorate([
|
|
|
45
45
|
__metadata("design:type", String)
|
|
46
46
|
], CloudSessionContext.prototype, "ludeoId", void 0);
|
|
47
47
|
__decorate([
|
|
48
|
-
(0, class_validator_1.
|
|
48
|
+
(0, class_validator_1.IsEnum)(types_1.CloudProvider),
|
|
49
|
+
__metadata("design:type", String)
|
|
50
|
+
], CloudSessionContext.prototype, "cloudProvider", void 0);
|
|
51
|
+
__decorate([
|
|
49
52
|
(0, class_validator_1.IsUUID)(),
|
|
53
|
+
(0, class_validator_1.IsOptional)(),
|
|
50
54
|
__metadata("design:type", String)
|
|
51
|
-
], CloudSessionContext.prototype, "
|
|
55
|
+
], CloudSessionContext.prototype, "gamePoolId", void 0);
|
|
52
56
|
__decorate([
|
|
53
|
-
(0, class_validator_1.
|
|
57
|
+
(0, class_validator_1.IsUUID)(),
|
|
58
|
+
(0, class_validator_1.IsOptional)(),
|
|
54
59
|
__metadata("design:type", String)
|
|
55
|
-
], CloudSessionContext.prototype, "
|
|
60
|
+
], CloudSessionContext.prototype, "gameResourceId", void 0);
|
|
56
61
|
__decorate([
|
|
62
|
+
(0, class_validator_1.IsUUID)(),
|
|
57
63
|
(0, class_validator_1.IsOptional)(),
|
|
64
|
+
__metadata("design:type", String)
|
|
65
|
+
], CloudSessionContext.prototype, "machinePoolId", void 0);
|
|
66
|
+
__decorate([
|
|
58
67
|
(0, class_validator_1.IsUUID)(),
|
|
68
|
+
(0, class_validator_1.IsOptional)(),
|
|
59
69
|
__metadata("design:type", String)
|
|
60
|
-
], CloudSessionContext.prototype, "
|
|
70
|
+
], CloudSessionContext.prototype, "machineResourceId", void 0);
|
|
61
71
|
__decorate([
|
|
62
72
|
(0, class_validator_1.IsOptional)(),
|
|
63
73
|
(0, class_validator_1.IsString)(),
|
|
@@ -68,4 +78,14 @@ __decorate([
|
|
|
68
78
|
(0, class_validator_1.IsString)(),
|
|
69
79
|
__metadata("design:type", String)
|
|
70
80
|
], CloudSessionContext.prototype, "streamSessionId", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
(0, class_validator_1.IsOptional)(),
|
|
83
|
+
(0, class_validator_1.IsUUID)(),
|
|
84
|
+
__metadata("design:type", String)
|
|
85
|
+
], CloudSessionContext.prototype, "poolId", void 0);
|
|
86
|
+
__decorate([
|
|
87
|
+
(0, class_validator_1.IsOptional)(),
|
|
88
|
+
(0, class_validator_1.IsUUID)(),
|
|
89
|
+
__metadata("design:type", String)
|
|
90
|
+
], CloudSessionContext.prototype, "resourceId", void 0);
|
|
71
91
|
//# sourceMappingURL=cloud-session-context.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloud-session-context.js","sourceRoot":"","sources":["../../../src/v3/contexts/cloud-session-context.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAuE;AACvE,oCAAyC;AAEzC,MAAa,mBAAmB;
|
|
1
|
+
{"version":3,"file":"cloud-session-context.js","sourceRoot":"","sources":["../../../src/v3/contexts/cloud-session-context.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAuE;AACvE,oCAAyC;AAEzC,MAAa,mBAAmB;CA2D/B;AA3DD,kDA2DC;AAxDC;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;gEACoB;AAI7B;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;4DACgB;AAGzB;IADC,IAAA,wBAAM,GAAE;;2DACc;AAIvB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;mDACO;AAIhB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;mDACO;AAIhB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;oDACQ;AAGjB;IADC,IAAA,wBAAM,EAAC,qBAAa,CAAC;;0DACO;AAI7B;IAFC,IAAA,wBAAM,GAAE;IACR,IAAA,4BAAU,GAAE;;uDACO;AAIpB;IAFC,IAAA,wBAAM,GAAE;IACR,IAAA,4BAAU,GAAE;;2DACW;AAIxB;IAFC,IAAA,wBAAM,GAAE;IACR,IAAA,4BAAU,GAAE;;0DACU;AAIvB;IAFC,IAAA,wBAAM,GAAE;IACR,IAAA,4BAAU,GAAE;;8DACc;AAI3B;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;0DACY;AAIvB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;4DACc;AAKzB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;mDACO;AAIhB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;uDACW"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { TypeHelpOptions } from "class-transformer";
|
|
2
2
|
import { CloudPoolContext } from "./cloud-pool-context";
|
|
3
|
-
import {
|
|
4
|
-
export declare const getCloudContextType: ({ object }: TypeHelpOptions) => typeof
|
|
3
|
+
import { CloudResourceContext } from "./cloud-resource-context";
|
|
4
|
+
export declare const getCloudContextType: ({ object }: TypeHelpOptions) => typeof CloudResourceContext | typeof CloudPoolContext;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { CloudPoolContext } from "../contexts";
|
|
2
1
|
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
3
|
-
import { CloudSessionContext } from "../contexts";
|
|
2
|
+
import { CloudSessionContext, CloudResourceContext } from "../contexts";
|
|
4
3
|
export declare class DeallocateMachineRequestPayload {
|
|
5
4
|
machinePoolId: string;
|
|
6
5
|
machineResourceId: string;
|
|
@@ -9,7 +8,7 @@ export declare class DeallocateMachineRequestPayload {
|
|
|
9
8
|
}
|
|
10
9
|
export declare class DeallocateMachineRequest extends LudeoEvent {
|
|
11
10
|
static readonly EVENT_NAME = "cloud-pools.deallocate-machine-request";
|
|
12
|
-
constructor(payload: DeallocateMachineRequestPayload, context: CloudSessionContext);
|
|
13
|
-
context: CloudSessionContext |
|
|
11
|
+
constructor(payload: DeallocateMachineRequestPayload, context: CloudSessionContext | CloudResourceContext);
|
|
12
|
+
context: CloudSessionContext | CloudResourceContext;
|
|
14
13
|
payload: DeallocateMachineRequestPayload;
|
|
15
14
|
}
|
|
@@ -12,8 +12,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.DeallocateMachineRequest = exports.DeallocateMachineRequestPayload = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
14
|
const ludeo_event_1 = require("../../infra/ludeo-event");
|
|
15
|
-
const validate_nested_type_decorator_1 = require("../../decorators/validate-nested-type.decorator");
|
|
16
15
|
const getCloudContextType_1 = require("../contexts/getCloudContextType");
|
|
16
|
+
const validate_nested_type_decorator_1 = require("../../decorators/validate-nested-type.decorator");
|
|
17
17
|
class DeallocateMachineRequestPayload {
|
|
18
18
|
}
|
|
19
19
|
exports.DeallocateMachineRequestPayload = DeallocateMachineRequestPayload;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deallocate-machine-request.js","sourceRoot":"","sources":["../../../src/v3/events/deallocate-machine-request.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAyC;
|
|
1
|
+
{"version":3,"file":"deallocate-machine-request.js","sourceRoot":"","sources":["../../../src/v3/events/deallocate-machine-request.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAyC;AAEzC,yDAAqD;AACrD,yEAAsE;AAEtE,oGAAqF;AAErF,MAAa,+BAA+B;CAY3C;AAZD,0EAYC;AAVC;IADC,IAAA,wBAAM,GAAE;;sEACa;AAGtB;IADC,IAAA,wBAAM,GAAE;;0EACiB;AAG1B;IADC,IAAA,wBAAM,GAAE;;mEACU;AAGnB;IADC,IAAA,wBAAM,GAAE;;uEACc;AAGzB,MAAa,wBAAyB,SAAQ,wBAAU;IAGtD,YACE,OAAwC,EACxC,OAAmD;QAEnD,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,yCAAmB,CAAC;;yDACY;AAGpD;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,+BAA+B,CAAC;8BACjD,+BAA+B;yDAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
2
|
-
import { CloudSessionContext } from "../contexts";
|
|
3
|
-
import { CloudPoolContext } from "../contexts";
|
|
2
|
+
import { CloudResourceContext, CloudSessionContext } from "../contexts";
|
|
4
3
|
export declare class MachineDeallocatedResponsePayload {
|
|
5
4
|
machinePoolId: string;
|
|
6
5
|
machineResourceId: string;
|
|
@@ -9,7 +8,7 @@ export declare class MachineDeallocatedResponsePayload {
|
|
|
9
8
|
}
|
|
10
9
|
export declare class MachineDeallocatedResponse extends LudeoEvent {
|
|
11
10
|
static readonly EVENT_NAME = "cloud-pools.machine-deallocated-response";
|
|
12
|
-
constructor(payload: MachineDeallocatedResponsePayload, context: CloudSessionContext);
|
|
13
|
-
context: CloudSessionContext |
|
|
11
|
+
constructor(payload: MachineDeallocatedResponsePayload, context: CloudSessionContext | CloudResourceContext);
|
|
12
|
+
context: CloudSessionContext | CloudResourceContext;
|
|
14
13
|
payload: MachineDeallocatedResponsePayload;
|
|
15
14
|
}
|
|
@@ -12,8 +12,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.MachineDeallocatedResponse = exports.MachineDeallocatedResponsePayload = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
14
|
const ludeo_event_1 = require("../../infra/ludeo-event");
|
|
15
|
-
const contexts_1 = require("../contexts");
|
|
16
15
|
const validate_nested_type_decorator_1 = require("../../decorators/validate-nested-type.decorator");
|
|
16
|
+
const contexts_1 = require("../contexts");
|
|
17
17
|
class MachineDeallocatedResponsePayload {
|
|
18
18
|
}
|
|
19
19
|
exports.MachineDeallocatedResponsePayload = MachineDeallocatedResponsePayload;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"machine-deallocated-response.js","sourceRoot":"","sources":["../../../src/v3/events/machine-deallocated-response.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAyC;AAEzC,yDAAqD;
|
|
1
|
+
{"version":3,"file":"machine-deallocated-response.js","sourceRoot":"","sources":["../../../src/v3/events/machine-deallocated-response.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAyC;AAEzC,yDAAqD;AACrD,oGAAqF;AACrF,0CAIqB;AAErB,MAAa,iCAAiC;CAY7C;AAZD,8EAYC;AAVC;IADC,IAAA,wBAAM,GAAE;;wEACa;AAGtB;IADC,IAAA,wBAAM,GAAE;;4EACiB;AAG1B;IADC,IAAA,wBAAM,GAAE;;qEACU;AAGnB;IADC,IAAA,wBAAM,GAAE;;yEACc;AAGzB,MAAa,0BAA2B,SAAQ,wBAAU;IAGxD,YACE,OAA0C,EAC1C,OAAmD;QAEnD,KAAK,CAAC,0BAA0B,CAAC,UAAU,CAAC,CAAC;QAC7C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAVH,gEAiBC;AAhBiB,qCAAU,GAAG,0CAA0C,CAAC;AAYxE;IADC,IAAA,mDAAkB,EAAC,8BAAmB,CAAC;;2DACY;AAGpD;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,iCAAiC,CAAC;8BACnD,iCAAiC;2DAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
2
|
-
import { CloudSessionContext } from "../contexts";
|
|
3
|
-
import { CloudPoolContext } from "../contexts";
|
|
2
|
+
import { CloudResourceContext, CloudSessionContext } from "../contexts";
|
|
4
3
|
export declare class MachineDeallocatedFailedResponsePayload {
|
|
5
4
|
machinePoolId: string;
|
|
6
5
|
machineResourceId: string;
|
|
@@ -10,7 +9,7 @@ export declare class MachineDeallocatedFailedResponsePayload {
|
|
|
10
9
|
}
|
|
11
10
|
export declare class MachineDeallocationFailedResponse extends LudeoEvent {
|
|
12
11
|
static readonly EVENT_NAME = "cloud-pools.machine-deallocation-failed-response";
|
|
13
|
-
constructor(payload: MachineDeallocatedFailedResponsePayload, context: CloudSessionContext);
|
|
14
|
-
context: CloudSessionContext |
|
|
12
|
+
constructor(payload: MachineDeallocatedFailedResponsePayload, context: CloudSessionContext | CloudResourceContext);
|
|
13
|
+
context: CloudSessionContext | CloudResourceContext;
|
|
15
14
|
payload: MachineDeallocatedFailedResponsePayload;
|
|
16
15
|
}
|
|
@@ -12,8 +12,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.MachineDeallocationFailedResponse = exports.MachineDeallocatedFailedResponsePayload = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
14
|
const ludeo_event_1 = require("../../infra/ludeo-event");
|
|
15
|
-
const contexts_1 = require("../contexts");
|
|
16
15
|
const validate_nested_type_decorator_1 = require("../../decorators/validate-nested-type.decorator");
|
|
16
|
+
const contexts_1 = require("../contexts");
|
|
17
17
|
class MachineDeallocatedFailedResponsePayload {
|
|
18
18
|
}
|
|
19
19
|
exports.MachineDeallocatedFailedResponsePayload = MachineDeallocatedFailedResponsePayload;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"machine-deallocation-failed-response.js","sourceRoot":"","sources":["../../../src/v3/events/machine-deallocation-failed-response.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAmD;AAEnD,yDAAqD;
|
|
1
|
+
{"version":3,"file":"machine-deallocation-failed-response.js","sourceRoot":"","sources":["../../../src/v3/events/machine-deallocation-failed-response.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAmD;AAEnD,yDAAqD;AACrD,oGAAqF;AACrF,0CAIqB;AAErB,MAAa,uCAAuC;CAenD;AAfD,0FAeC;AAbC;IADC,IAAA,wBAAM,GAAE;;8EACa;AAGtB;IADC,IAAA,wBAAM,GAAE;;kFACiB;AAG1B;IADC,IAAA,wBAAM,GAAE;;2EACU;AAGnB;IADC,IAAA,wBAAM,GAAE;;+EACc;AAGvB;IADC,IAAA,0BAAQ,GAAE;;6EACU;AAGvB,MAAa,iCAAkC,SAAQ,wBAAU;IAI/D,YACE,OAAgD,EAChD,OAAmD;QAEnD,KAAK,CAAC,iCAAiC,CAAC,UAAU,CAAC,CAAC;QACpD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAXH,8EAkBC;AAjBiB,4CAAU,GACxB,kDAAkD,CAAC;AAYrD;IADC,IAAA,mDAAkB,EAAC,8BAAmB,CAAC;;kEACY;AAGpD;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,uCAAuC,CAAC;8BACzD,uCAAuC;kEAAC"}
|
package/package.json
CHANGED
|
@@ -2,12 +2,6 @@ import { IsEnum, IsOptional, IsString, IsUUID } from "class-validator";
|
|
|
2
2
|
import { CloudProvider } from "../types/cloud";
|
|
3
3
|
|
|
4
4
|
export class CloudResourceContext {
|
|
5
|
-
@IsUUID()
|
|
6
|
-
resourceId: string;
|
|
7
|
-
|
|
8
|
-
@IsUUID()
|
|
9
|
-
poolId: string;
|
|
10
|
-
|
|
11
5
|
@IsString()
|
|
12
6
|
@IsOptional()
|
|
13
7
|
streamGroupId?: string;
|
|
@@ -18,4 +12,20 @@ export class CloudResourceContext {
|
|
|
18
12
|
|
|
19
13
|
@IsEnum(CloudProvider)
|
|
20
14
|
cloudProvider: CloudProvider;
|
|
15
|
+
|
|
16
|
+
@IsUUID()
|
|
17
|
+
@IsOptional()
|
|
18
|
+
gamePoolId?: string;
|
|
19
|
+
|
|
20
|
+
@IsUUID()
|
|
21
|
+
@IsOptional()
|
|
22
|
+
gameResourceId?: string;
|
|
23
|
+
|
|
24
|
+
@IsUUID()
|
|
25
|
+
@IsOptional()
|
|
26
|
+
machinePoolId?: string;
|
|
27
|
+
|
|
28
|
+
@IsUUID()
|
|
29
|
+
@IsOptional()
|
|
30
|
+
machineResourceId?: string;
|
|
21
31
|
}
|
|
@@ -25,16 +25,24 @@ export class CloudSessionContext {
|
|
|
25
25
|
@IsUUID()
|
|
26
26
|
ludeoId?: string;
|
|
27
27
|
|
|
28
|
-
@IsOptional()
|
|
29
|
-
@IsUUID()
|
|
30
|
-
poolId?: string;
|
|
31
|
-
|
|
32
28
|
@IsEnum(CloudProvider)
|
|
33
29
|
cloudProvider: CloudProvider;
|
|
34
30
|
|
|
31
|
+
@IsUUID()
|
|
35
32
|
@IsOptional()
|
|
33
|
+
gamePoolId?: string;
|
|
34
|
+
|
|
36
35
|
@IsUUID()
|
|
37
|
-
|
|
36
|
+
@IsOptional()
|
|
37
|
+
gameResourceId?: string;
|
|
38
|
+
|
|
39
|
+
@IsUUID()
|
|
40
|
+
@IsOptional()
|
|
41
|
+
machinePoolId?: string;
|
|
42
|
+
|
|
43
|
+
@IsUUID()
|
|
44
|
+
@IsOptional()
|
|
45
|
+
machineResourceId?: string;
|
|
38
46
|
|
|
39
47
|
@IsOptional()
|
|
40
48
|
@IsString()
|
|
@@ -43,4 +51,13 @@ export class CloudSessionContext {
|
|
|
43
51
|
@IsOptional()
|
|
44
52
|
@IsString()
|
|
45
53
|
streamSessionId?: string;
|
|
54
|
+
|
|
55
|
+
// Backwards compatibility for V2 of cloud-sessions and cloud-session-allocator
|
|
56
|
+
@IsOptional()
|
|
57
|
+
@IsUUID()
|
|
58
|
+
poolId?: string;
|
|
59
|
+
|
|
60
|
+
@IsOptional()
|
|
61
|
+
@IsUUID()
|
|
62
|
+
resourceId?: string;
|
|
46
63
|
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { IsUUID } from "class-validator";
|
|
2
2
|
|
|
3
|
-
import { CloudPoolContext } from "../contexts";
|
|
4
3
|
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
5
|
-
import { CloudSessionContext } from "../contexts";
|
|
6
|
-
import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
|
|
7
4
|
import { getCloudContextType } from "../contexts/getCloudContextType";
|
|
5
|
+
import { CloudSessionContext, CloudResourceContext } from "../contexts";
|
|
6
|
+
import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
|
|
8
7
|
|
|
9
8
|
export class DeallocateMachineRequestPayload {
|
|
10
9
|
@IsUUID()
|
|
@@ -25,7 +24,7 @@ export class DeallocateMachineRequest extends LudeoEvent {
|
|
|
25
24
|
|
|
26
25
|
constructor(
|
|
27
26
|
payload: DeallocateMachineRequestPayload,
|
|
28
|
-
context: CloudSessionContext
|
|
27
|
+
context: CloudSessionContext | CloudResourceContext
|
|
29
28
|
) {
|
|
30
29
|
super(DeallocateMachineRequest.EVENT_NAME);
|
|
31
30
|
this.payload = payload;
|
|
@@ -33,7 +32,7 @@ export class DeallocateMachineRequest extends LudeoEvent {
|
|
|
33
32
|
}
|
|
34
33
|
|
|
35
34
|
@ValidateNestedType(getCloudContextType)
|
|
36
|
-
context: CloudSessionContext |
|
|
35
|
+
context: CloudSessionContext | CloudResourceContext;
|
|
37
36
|
|
|
38
37
|
@ValidateNestedType(() => DeallocateMachineRequestPayload)
|
|
39
38
|
payload: DeallocateMachineRequestPayload;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { IsUUID } from "class-validator";
|
|
2
2
|
|
|
3
3
|
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
4
|
-
import { CloudSessionContext } from "../contexts";
|
|
5
|
-
import { CloudPoolContext, getCloudContextType } from "../contexts";
|
|
6
4
|
import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
|
|
5
|
+
import {
|
|
6
|
+
CloudResourceContext,
|
|
7
|
+
CloudSessionContext,
|
|
8
|
+
getCloudContextType,
|
|
9
|
+
} from "../contexts";
|
|
7
10
|
|
|
8
11
|
export class MachineDeallocatedResponsePayload {
|
|
9
12
|
@IsUUID()
|
|
@@ -24,7 +27,7 @@ export class MachineDeallocatedResponse extends LudeoEvent {
|
|
|
24
27
|
|
|
25
28
|
constructor(
|
|
26
29
|
payload: MachineDeallocatedResponsePayload,
|
|
27
|
-
context: CloudSessionContext
|
|
30
|
+
context: CloudSessionContext | CloudResourceContext
|
|
28
31
|
) {
|
|
29
32
|
super(MachineDeallocatedResponse.EVENT_NAME);
|
|
30
33
|
this.payload = payload;
|
|
@@ -32,7 +35,7 @@ export class MachineDeallocatedResponse extends LudeoEvent {
|
|
|
32
35
|
}
|
|
33
36
|
|
|
34
37
|
@ValidateNestedType(getCloudContextType)
|
|
35
|
-
context: CloudSessionContext |
|
|
38
|
+
context: CloudSessionContext | CloudResourceContext;
|
|
36
39
|
|
|
37
40
|
@ValidateNestedType(() => MachineDeallocatedResponsePayload)
|
|
38
41
|
payload: MachineDeallocatedResponsePayload;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { IsString, IsUUID } from "class-validator";
|
|
2
2
|
|
|
3
3
|
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
4
|
-
import { CloudSessionContext } from "../contexts";
|
|
5
|
-
import { CloudPoolContext, getCloudContextType } from "../contexts";
|
|
6
4
|
import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
|
|
5
|
+
import {
|
|
6
|
+
CloudResourceContext,
|
|
7
|
+
CloudSessionContext,
|
|
8
|
+
getCloudContextType,
|
|
9
|
+
} from "../contexts";
|
|
7
10
|
|
|
8
11
|
export class MachineDeallocatedFailedResponsePayload {
|
|
9
12
|
@IsUUID()
|
|
@@ -28,7 +31,7 @@ export class MachineDeallocationFailedResponse extends LudeoEvent {
|
|
|
28
31
|
|
|
29
32
|
constructor(
|
|
30
33
|
payload: MachineDeallocatedFailedResponsePayload,
|
|
31
|
-
context: CloudSessionContext
|
|
34
|
+
context: CloudSessionContext | CloudResourceContext
|
|
32
35
|
) {
|
|
33
36
|
super(MachineDeallocationFailedResponse.EVENT_NAME);
|
|
34
37
|
this.payload = payload;
|
|
@@ -36,7 +39,7 @@ export class MachineDeallocationFailedResponse extends LudeoEvent {
|
|
|
36
39
|
}
|
|
37
40
|
|
|
38
41
|
@ValidateNestedType(getCloudContextType)
|
|
39
|
-
context: CloudSessionContext |
|
|
42
|
+
context: CloudSessionContext | CloudResourceContext;
|
|
40
43
|
|
|
41
44
|
@ValidateNestedType(() => MachineDeallocatedFailedResponsePayload)
|
|
42
45
|
payload: MachineDeallocatedFailedResponsePayload;
|