@ludeo/cloud-common 1.2.1 → 1.2.3
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/contexts/cloud-resource-context.d.ts +2 -0
- package/dist/v4/contexts/cloud-resource-context.js +10 -0
- package/dist/v4/contexts/cloud-resource-context.js.map +1 -1
- package/dist/v4/contexts/cloud-session-context.d.ts +2 -0
- package/dist/v4/contexts/cloud-session-context.js +10 -0
- package/dist/v4/contexts/cloud-session-context.js.map +1 -1
- package/dist/v4/events/allocate-game-request.d.ts +5 -5
- package/dist/v4/events/allocate-game-request.js +9 -6
- package/dist/v4/events/allocate-game-request.js.map +1 -1
- package/dist/v4/events/allocate-ludeo-request.d.ts +13 -0
- package/dist/v4/events/allocate-ludeo-request.js +46 -0
- package/dist/v4/events/allocate-ludeo-request.js.map +1 -0
- package/dist/v4/events/allocate-ludeo-resource-request.d.ts +13 -7
- package/dist/v4/events/allocate-ludeo-resource-request.js +35 -14
- package/dist/v4/events/allocate-ludeo-resource-request.js.map +1 -1
- package/dist/v4/events/game-allocated-response.d.ts +10 -5
- package/dist/v4/events/game-allocated-response.js +25 -4
- package/dist/v4/events/game-allocated-response.js.map +1 -1
- package/dist/v4/events/game-allocation-failed-response.d.ts +6 -5
- package/dist/v4/events/game-allocation-failed-response.js +13 -6
- package/dist/v4/events/game-allocation-failed-response.js.map +1 -1
- package/dist/v4/events/index.d.ts +5 -1
- package/dist/v4/events/index.js +5 -1
- package/dist/v4/events/index.js.map +1 -1
- package/dist/v4/events/load-ludeo-resource.d.ts +6 -0
- package/dist/v4/events/load-ludeo-resource.js +21 -0
- package/dist/v4/events/load-ludeo-resource.js.map +1 -1
- package/dist/v4/events/ludeo-allocated-response.d.ts +5 -4
- package/dist/v4/events/ludeo-allocated-response.js +6 -6
- package/dist/v4/events/ludeo-allocated-response.js.map +1 -1
- package/dist/v4/events/ludeo-allocation-failed.d.ts +6 -4
- package/dist/v4/events/ludeo-allocation-failed.js +10 -5
- package/dist/v4/events/ludeo-allocation-failed.js.map +1 -1
- package/dist/v4/events/ludeo-resource-allocated-response.d.ts +7 -3
- package/dist/v4/events/ludeo-resource-allocated-response.js +15 -2
- package/dist/v4/events/ludeo-resource-allocated-response.js.map +1 -1
- package/dist/v4/events/ludeo-resource-allocation-failed.d.ts +4 -0
- package/dist/v4/events/ludeo-resource-allocation-failed.js +13 -0
- package/dist/v4/events/ludeo-resource-allocation-failed.js.map +1 -1
- package/dist/v4/events/ludeo-resource-allocation-timeout-task.d.ts +11 -0
- package/dist/v4/events/ludeo-resource-allocation-timeout-task.js +39 -0
- package/dist/v4/events/ludeo-resource-allocation-timeout-task.js.map +1 -0
- package/dist/v4/events/ludeo-status-updated.d.ts +14 -0
- package/dist/v4/events/ludeo-status-updated.js +50 -0
- package/dist/v4/events/ludeo-status-updated.js.map +1 -0
- package/dist/v4/events/terminate-ludeos-request.d.ts +12 -0
- package/dist/v4/events/terminate-ludeos-request.js +45 -0
- package/dist/v4/events/terminate-ludeos-request.js.map +1 -0
- package/package.json +1 -1
- package/src/v4/contexts/cloud-resource-context.ts +8 -0
- package/src/v4/contexts/cloud-session-context.ts +8 -0
- package/src/v4/events/allocate-game-request.ts +10 -8
- package/src/v4/events/allocate-ludeo-request.ts +32 -0
- package/src/v4/events/allocate-ludeo-resource-request.ts +35 -12
- package/src/v4/events/game-allocated-response.ts +27 -7
- package/src/v4/events/game-allocation-failed-response.ts +13 -8
- package/src/v4/events/index.ts +5 -1
- package/src/v4/events/load-ludeo-resource.ts +21 -1
- package/src/v4/events/ludeo-allocated-response.ts +7 -7
- package/src/v4/events/ludeo-allocation-failed.ts +11 -7
- package/src/v4/events/ludeo-resource-allocated-response.ts +18 -4
- package/src/v4/events/ludeo-resource-allocation-failed.ts +11 -1
- package/src/v4/events/ludeo-resource-allocation-timeout-task.ts +26 -0
- package/src/v4/events/ludeo-status-updated.ts +35 -0
- package/src/v4/events/terminate-ludeos-request.ts +32 -0
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
2
|
-
import {
|
|
2
|
+
import { CloudSessionContext } from "../contexts";
|
|
3
|
+
import { AllocationRequestData } from "../types";
|
|
3
4
|
export declare class LudeoAllocationFailedPayload {
|
|
4
|
-
|
|
5
|
+
requestData: AllocationRequestData;
|
|
6
|
+
errorMessage: string;
|
|
5
7
|
}
|
|
6
8
|
export declare class LudeoAllocationFailed extends LudeoEvent {
|
|
7
9
|
static readonly EVENT_NAME = "cloud-pools.ludeo-allocation-failed";
|
|
8
|
-
constructor(payload: LudeoAllocationFailedPayload, context:
|
|
9
|
-
context:
|
|
10
|
+
constructor(payload: LudeoAllocationFailedPayload, context: CloudSessionContext);
|
|
11
|
+
context: CloudSessionContext;
|
|
10
12
|
payload: LudeoAllocationFailedPayload;
|
|
11
13
|
}
|
|
@@ -10,17 +10,22 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.LudeoAllocationFailed = exports.LudeoAllocationFailedPayload = void 0;
|
|
13
|
-
const class_validator_1 = require("class-validator");
|
|
14
13
|
const ludeo_event_1 = require("../../infra/ludeo-event");
|
|
15
14
|
const validate_nested_type_decorator_1 = require("../../decorators/validate-nested-type.decorator");
|
|
16
15
|
const contexts_1 = require("../contexts");
|
|
16
|
+
const types_1 = require("../types");
|
|
17
|
+
const class_validator_1 = require("class-validator");
|
|
17
18
|
class LudeoAllocationFailedPayload {
|
|
18
19
|
}
|
|
19
20
|
exports.LudeoAllocationFailedPayload = LudeoAllocationFailedPayload;
|
|
20
21
|
__decorate([
|
|
21
|
-
(0,
|
|
22
|
+
(0, validate_nested_type_decorator_1.ValidateNestedType)(() => types_1.AllocationRequestData),
|
|
23
|
+
__metadata("design:type", types_1.AllocationRequestData)
|
|
24
|
+
], LudeoAllocationFailedPayload.prototype, "requestData", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_validator_1.IsString)(),
|
|
22
27
|
__metadata("design:type", String)
|
|
23
|
-
], LudeoAllocationFailedPayload.prototype, "
|
|
28
|
+
], LudeoAllocationFailedPayload.prototype, "errorMessage", void 0);
|
|
24
29
|
class LudeoAllocationFailed extends ludeo_event_1.LudeoEvent {
|
|
25
30
|
constructor(payload, context) {
|
|
26
31
|
super(LudeoAllocationFailed.EVENT_NAME);
|
|
@@ -31,8 +36,8 @@ class LudeoAllocationFailed extends ludeo_event_1.LudeoEvent {
|
|
|
31
36
|
exports.LudeoAllocationFailed = LudeoAllocationFailed;
|
|
32
37
|
LudeoAllocationFailed.EVENT_NAME = "cloud-pools.ludeo-allocation-failed";
|
|
33
38
|
__decorate([
|
|
34
|
-
(0, validate_nested_type_decorator_1.ValidateNestedType)(() => contexts_1.
|
|
35
|
-
__metadata("design:type", contexts_1.
|
|
39
|
+
(0, validate_nested_type_decorator_1.ValidateNestedType)(() => contexts_1.CloudSessionContext),
|
|
40
|
+
__metadata("design:type", contexts_1.CloudSessionContext)
|
|
36
41
|
], LudeoAllocationFailed.prototype, "context", void 0);
|
|
37
42
|
__decorate([
|
|
38
43
|
(0, validate_nested_type_decorator_1.ValidateNestedType)(() => LudeoAllocationFailedPayload),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ludeo-allocation-failed.js","sourceRoot":"","sources":["../../../src/v4/events/ludeo-allocation-failed.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"ludeo-allocation-failed.js","sourceRoot":"","sources":["../../../src/v4/events/ludeo-allocation-failed.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAqD;AACrD,oGAAqF;AACrF,0CAAkD;AAClD,oCAAiD;AACjD,qDAA2C;AAE3C,MAAa,4BAA4B;CAMxC;AAND,oEAMC;AAJC;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,6BAAqB,CAAC;8BACnC,6BAAqB;iEAAC;AAGnC;IADC,IAAA,0BAAQ,GAAE;;kEACU;AAGvB,MAAa,qBAAsB,SAAQ,wBAAU;IAGnD,YACE,OAAqC,EACrC,OAA4B;QAE5B,KAAK,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC;QACxC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAVH,sDAiBC;AAhBiB,gCAAU,GAAG,qCAAqC,CAAC;AAYnE;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,8BAAmB,CAAC;8BACrC,8BAAmB;sDAAC;AAG7B;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,4BAA4B,CAAC;8BAC9C,4BAA4B;sDAAC"}
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
2
|
-
import {
|
|
2
|
+
import { CloudSessionContext } from "../contexts";
|
|
3
|
+
import { AllocationRequestData, CloudProviderAllocationData } from "../types";
|
|
3
4
|
export declare class LudeoResourceAllocatedResponsePayload {
|
|
4
5
|
ludeoResourceId: string;
|
|
6
|
+
ludeoPoolId: string;
|
|
7
|
+
allocationData: CloudProviderAllocationData;
|
|
8
|
+
requestData: AllocationRequestData;
|
|
5
9
|
}
|
|
6
10
|
export declare class LudeoResourceAllocatedResponse extends LudeoEvent {
|
|
7
11
|
static readonly EVENT_NAME = "cloud-resources.ludeo-resource-allocated-response";
|
|
8
|
-
constructor(payload: LudeoResourceAllocatedResponsePayload, context:
|
|
9
|
-
context:
|
|
12
|
+
constructor(payload: LudeoResourceAllocatedResponsePayload, context: CloudSessionContext);
|
|
13
|
+
context: CloudSessionContext;
|
|
10
14
|
payload: LudeoResourceAllocatedResponsePayload;
|
|
11
15
|
}
|
|
@@ -14,6 +14,7 @@ const class_validator_1 = require("class-validator");
|
|
|
14
14
|
const ludeo_event_1 = require("../../infra/ludeo-event");
|
|
15
15
|
const validate_nested_type_decorator_1 = require("../../decorators/validate-nested-type.decorator");
|
|
16
16
|
const contexts_1 = require("../contexts");
|
|
17
|
+
const types_1 = require("../types");
|
|
17
18
|
class LudeoResourceAllocatedResponsePayload {
|
|
18
19
|
}
|
|
19
20
|
exports.LudeoResourceAllocatedResponsePayload = LudeoResourceAllocatedResponsePayload;
|
|
@@ -21,6 +22,18 @@ __decorate([
|
|
|
21
22
|
(0, class_validator_1.IsUUID)(),
|
|
22
23
|
__metadata("design:type", String)
|
|
23
24
|
], LudeoResourceAllocatedResponsePayload.prototype, "ludeoResourceId", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_validator_1.IsUUID)(),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], LudeoResourceAllocatedResponsePayload.prototype, "ludeoPoolId", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, validate_nested_type_decorator_1.ValidateNestedType)(() => types_1.AwsAllocationData),
|
|
31
|
+
__metadata("design:type", Object)
|
|
32
|
+
], LudeoResourceAllocatedResponsePayload.prototype, "allocationData", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, validate_nested_type_decorator_1.ValidateNestedType)(() => types_1.AllocationRequestData),
|
|
35
|
+
__metadata("design:type", types_1.AllocationRequestData)
|
|
36
|
+
], LudeoResourceAllocatedResponsePayload.prototype, "requestData", void 0);
|
|
24
37
|
class LudeoResourceAllocatedResponse extends ludeo_event_1.LudeoEvent {
|
|
25
38
|
constructor(payload, context) {
|
|
26
39
|
super(LudeoResourceAllocatedResponse.EVENT_NAME);
|
|
@@ -31,8 +44,8 @@ class LudeoResourceAllocatedResponse extends ludeo_event_1.LudeoEvent {
|
|
|
31
44
|
exports.LudeoResourceAllocatedResponse = LudeoResourceAllocatedResponse;
|
|
32
45
|
LudeoResourceAllocatedResponse.EVENT_NAME = "cloud-resources.ludeo-resource-allocated-response";
|
|
33
46
|
__decorate([
|
|
34
|
-
(0, validate_nested_type_decorator_1.ValidateNestedType)(() => contexts_1.
|
|
35
|
-
__metadata("design:type", contexts_1.
|
|
47
|
+
(0, validate_nested_type_decorator_1.ValidateNestedType)(() => contexts_1.CloudSessionContext),
|
|
48
|
+
__metadata("design:type", contexts_1.CloudSessionContext)
|
|
36
49
|
], LudeoResourceAllocatedResponse.prototype, "context", void 0);
|
|
37
50
|
__decorate([
|
|
38
51
|
(0, validate_nested_type_decorator_1.ValidateNestedType)(() => LudeoResourceAllocatedResponsePayload),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ludeo-resource-allocated-response.js","sourceRoot":"","sources":["../../../src/v4/events/ludeo-resource-allocated-response.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAyC;AACzC,yDAAqD;AACrD,oGAAqF;AACrF,
|
|
1
|
+
{"version":3,"file":"ludeo-resource-allocated-response.js","sourceRoot":"","sources":["../../../src/v4/events/ludeo-resource-allocated-response.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAyC;AACzC,yDAAqD;AACrD,oGAAqF;AACrF,0CAAwE;AACxE,oCAIkB;AAElB,MAAa,qCAAqC;CAYjD;AAZD,sFAYC;AAVC;IADC,IAAA,wBAAM,GAAE;;8EACe;AAGxB;IADC,IAAA,wBAAM,GAAE;;0EACW;AAGpB;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,yBAAiB,CAAC;;6EACA;AAG5C;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,6BAAqB,CAAC;8BACnC,6BAAqB;0EAAC;AAGrC,MAAa,8BAA+B,SAAQ,wBAAU;IAI5D,YACE,OAA8C,EAC9C,OAA4B;QAE5B,KAAK,CAAC,8BAA8B,CAAC,UAAU,CAAC,CAAC;QACjD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAXH,wEAkBC;AAjBiB,yCAAU,GACxB,mDAAmD,CAAC;AAYtD;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,8BAAmB,CAAC;8BACrC,8BAAmB;+DAAC;AAG7B;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,qCAAqC,CAAC;8BACvD,qCAAqC;+DAAC"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
2
2
|
import { CloudResourceContext } from "../contexts";
|
|
3
|
+
import { AllocationRequestData } from "../types";
|
|
3
4
|
export declare class LudeoResourceAllocationFailedPayload {
|
|
4
5
|
ludeoResourceId: string;
|
|
6
|
+
ludeoPoolId: string;
|
|
7
|
+
errorMessage: string;
|
|
8
|
+
requestData: AllocationRequestData;
|
|
5
9
|
}
|
|
6
10
|
export declare class LudeoResourceAllocationFailedResponse extends LudeoEvent {
|
|
7
11
|
static readonly EVENT_NAME = "cloud-resources.ludeo-resource-allocation-failed";
|
|
@@ -14,6 +14,7 @@ const class_validator_1 = require("class-validator");
|
|
|
14
14
|
const ludeo_event_1 = require("../../infra/ludeo-event");
|
|
15
15
|
const validate_nested_type_decorator_1 = require("../../decorators/validate-nested-type.decorator");
|
|
16
16
|
const contexts_1 = require("../contexts");
|
|
17
|
+
const types_1 = require("../types");
|
|
17
18
|
class LudeoResourceAllocationFailedPayload {
|
|
18
19
|
}
|
|
19
20
|
exports.LudeoResourceAllocationFailedPayload = LudeoResourceAllocationFailedPayload;
|
|
@@ -21,6 +22,18 @@ __decorate([
|
|
|
21
22
|
(0, class_validator_1.IsUUID)(),
|
|
22
23
|
__metadata("design:type", String)
|
|
23
24
|
], LudeoResourceAllocationFailedPayload.prototype, "ludeoResourceId", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_validator_1.IsUUID)(),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], LudeoResourceAllocationFailedPayload.prototype, "ludeoPoolId", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, class_validator_1.IsString)(),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], LudeoResourceAllocationFailedPayload.prototype, "errorMessage", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, validate_nested_type_decorator_1.ValidateNestedType)(() => types_1.AllocationRequestData),
|
|
35
|
+
__metadata("design:type", types_1.AllocationRequestData)
|
|
36
|
+
], LudeoResourceAllocationFailedPayload.prototype, "requestData", void 0);
|
|
24
37
|
class LudeoResourceAllocationFailedResponse extends ludeo_event_1.LudeoEvent {
|
|
25
38
|
constructor(payload, context) {
|
|
26
39
|
super(LudeoResourceAllocationFailedResponse.EVENT_NAME);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ludeo-resource-allocation-failed.js","sourceRoot":"","sources":["../../../src/v4/events/ludeo-resource-allocation-failed.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"ludeo-resource-allocation-failed.js","sourceRoot":"","sources":["../../../src/v4/events/ludeo-resource-allocation-failed.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAmD;AACnD,yDAAqD;AACrD,oGAAqF;AACrF,0CAAmD;AACnD,oCAAiD;AAEjD,MAAa,oCAAoC;CAYhD;AAZD,oFAYC;AAVC;IADC,IAAA,wBAAM,GAAE;;6EACe;AAGxB;IADC,IAAA,wBAAM,GAAE;;yEACW;AAGpB;IADC,IAAA,0BAAQ,GAAE;;0EACU;AAGrB;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,6BAAqB,CAAC;8BACnC,6BAAqB;yEAAC;AAGrC,MAAa,qCAAsC,SAAQ,wBAAU;IAInE,YACE,OAA6C,EAC7C,OAA6B;QAE7B,KAAK,CAAC,qCAAqC,CAAC,UAAU,CAAC,CAAC;QACxD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAXH,sFAkBC;AAjBiB,gDAAU,GACxB,kDAAkD,CAAC;AAYrD;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,+BAAoB,CAAC;8BACtC,+BAAoB;sEAAC;AAG9B;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,oCAAoC,CAAC;8BACtD,oCAAoC;sEAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
2
|
+
export declare class LudeoResourceAllocationTimeoutTaskPayload {
|
|
3
|
+
ludeoResourceId: string;
|
|
4
|
+
ludeoPoolId: string;
|
|
5
|
+
}
|
|
6
|
+
export declare class LudeoResourceAllocationTimeoutTask extends LudeoEvent {
|
|
7
|
+
static readonly EVENT_NAME = "cloud-pools.ludeo-resource-allocation-timeout-task";
|
|
8
|
+
constructor(payload: LudeoResourceAllocationTimeoutTaskPayload);
|
|
9
|
+
context: never;
|
|
10
|
+
payload: LudeoResourceAllocationTimeoutTaskPayload;
|
|
11
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
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.LudeoResourceAllocationTimeoutTask = exports.LudeoResourceAllocationTimeoutTaskPayload = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const ludeo_event_1 = require("../../infra/ludeo-event");
|
|
15
|
+
const decorators_1 = require("../../decorators");
|
|
16
|
+
class LudeoResourceAllocationTimeoutTaskPayload {
|
|
17
|
+
}
|
|
18
|
+
exports.LudeoResourceAllocationTimeoutTaskPayload = LudeoResourceAllocationTimeoutTaskPayload;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, class_validator_1.IsUUID)(),
|
|
21
|
+
__metadata("design:type", String)
|
|
22
|
+
], LudeoResourceAllocationTimeoutTaskPayload.prototype, "ludeoResourceId", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, class_validator_1.IsUUID)(),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], LudeoResourceAllocationTimeoutTaskPayload.prototype, "ludeoPoolId", void 0);
|
|
27
|
+
class LudeoResourceAllocationTimeoutTask extends ludeo_event_1.LudeoEvent {
|
|
28
|
+
constructor(payload) {
|
|
29
|
+
super(LudeoResourceAllocationTimeoutTask.EVENT_NAME);
|
|
30
|
+
this.payload = payload;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.LudeoResourceAllocationTimeoutTask = LudeoResourceAllocationTimeoutTask;
|
|
34
|
+
LudeoResourceAllocationTimeoutTask.EVENT_NAME = "cloud-pools.ludeo-resource-allocation-timeout-task";
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, decorators_1.ValidateNestedType)(() => LudeoResourceAllocationTimeoutTaskPayload),
|
|
37
|
+
__metadata("design:type", LudeoResourceAllocationTimeoutTaskPayload)
|
|
38
|
+
], LudeoResourceAllocationTimeoutTask.prototype, "payload", void 0);
|
|
39
|
+
//# sourceMappingURL=ludeo-resource-allocation-timeout-task.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ludeo-resource-allocation-timeout-task.js","sourceRoot":"","sources":["../../../src/v4/events/ludeo-resource-allocation-timeout-task.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAyC;AACzC,yDAAqD;AACrD,iDAAsD;AAEtD,MAAa,yCAAyC;CAMrD;AAND,8FAMC;AAJC;IADC,IAAA,wBAAM,GAAE;;kFACe;AAGxB;IADC,IAAA,wBAAM,GAAE;;8EACW;AAGtB,MAAa,kCAAmC,SAAQ,wBAAU;IAIhE,YAAY,OAAkD;QAC5D,KAAK,CAAC,kCAAkC,CAAC,UAAU,CAAC,CAAC;QACrD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAPH,gFAaC;AAZiB,6CAAU,GACxB,oDAAoD,CAAC;AAUvD;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,yCAAyC,CAAC;8BAC3D,yCAAyC;mEAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
2
|
+
import { CloudResourceContext } from "../contexts/cloud-resource-context";
|
|
3
|
+
import { CloudResourceStatus } from "../types";
|
|
4
|
+
export declare class LudeoStatusUpdatedPayload {
|
|
5
|
+
ludeoResourceId: string;
|
|
6
|
+
ludeoPoolId: string;
|
|
7
|
+
status: CloudResourceStatus;
|
|
8
|
+
}
|
|
9
|
+
export declare class LudeoStatusUpdatedEvent extends LudeoEvent {
|
|
10
|
+
static readonly EVENT_NAME = "cloud-pools.game-resource-status-changed";
|
|
11
|
+
constructor(payload: LudeoStatusUpdatedPayload, context: CloudResourceContext);
|
|
12
|
+
context: CloudResourceContext;
|
|
13
|
+
payload: LudeoStatusUpdatedPayload;
|
|
14
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
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.LudeoStatusUpdatedEvent = exports.LudeoStatusUpdatedPayload = 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 LudeoStatusUpdatedPayload {
|
|
19
|
+
}
|
|
20
|
+
exports.LudeoStatusUpdatedPayload = LudeoStatusUpdatedPayload;
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, class_validator_1.IsUUID)(),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], LudeoStatusUpdatedPayload.prototype, "ludeoResourceId", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_validator_1.IsUUID)(),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], LudeoStatusUpdatedPayload.prototype, "ludeoPoolId", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, class_validator_1.IsString)(),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], LudeoStatusUpdatedPayload.prototype, "status", void 0);
|
|
33
|
+
class LudeoStatusUpdatedEvent extends ludeo_event_1.LudeoEvent {
|
|
34
|
+
constructor(payload, context) {
|
|
35
|
+
super(LudeoStatusUpdatedEvent.EVENT_NAME);
|
|
36
|
+
this.payload = payload;
|
|
37
|
+
this.context = context;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
exports.LudeoStatusUpdatedEvent = LudeoStatusUpdatedEvent;
|
|
41
|
+
LudeoStatusUpdatedEvent.EVENT_NAME = "cloud-pools.game-resource-status-changed";
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, validate_nested_type_decorator_1.ValidateNestedType)(() => cloud_resource_context_1.CloudResourceContext),
|
|
44
|
+
__metadata("design:type", cloud_resource_context_1.CloudResourceContext)
|
|
45
|
+
], LudeoStatusUpdatedEvent.prototype, "context", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, validate_nested_type_decorator_1.ValidateNestedType)(() => LudeoStatusUpdatedPayload),
|
|
48
|
+
__metadata("design:type", LudeoStatusUpdatedPayload)
|
|
49
|
+
], LudeoStatusUpdatedEvent.prototype, "payload", void 0);
|
|
50
|
+
//# sourceMappingURL=ludeo-status-updated.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ludeo-status-updated.js","sourceRoot":"","sources":["../../../src/v4/events/ludeo-status-updated.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAmD;AACnD,yDAAqD;AACrD,+EAA0E;AAC1E,oCAA+C;AAC/C,oGAAqF;AAErF,MAAa,yBAAyB;CASrC;AATD,8DASC;AAPC;IADC,IAAA,wBAAM,GAAE;;kEACe;AAGxB;IADC,IAAA,wBAAM,GAAE;;8DACW;AAGpB;IADC,IAAA,0BAAQ,GAAE;;yDACiB;AAG9B,MAAa,uBAAwB,SAAQ,wBAAU;IAGrD,YACE,OAAkC,EAClC,OAA6B;QAE7B,KAAK,CAAC,uBAAuB,CAAC,UAAU,CAAC,CAAC;QAC1C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAVH,0DAiBC;AAhBiB,kCAAU,GAAG,0CAA0C,CAAC;AAYxE;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,6CAAoB,CAAC;8BACtC,6CAAoB;wDAAC;AAG9B;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,yBAAyB,CAAC;8BAC3C,yBAAyB;wDAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CloudPoolContext } from "../contexts";
|
|
2
|
+
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
3
|
+
export declare class TerminateLudoesRequestPayload {
|
|
4
|
+
poolId: string;
|
|
5
|
+
quantity: number;
|
|
6
|
+
}
|
|
7
|
+
export declare class TerminateLudeosRequest extends LudeoEvent {
|
|
8
|
+
static readonly EVENT_NAME = "cloud-pools.terminate-ludeos-request";
|
|
9
|
+
constructor(payload: TerminateLudoesRequestPayload, context: CloudPoolContext);
|
|
10
|
+
context: CloudPoolContext;
|
|
11
|
+
payload: TerminateLudoesRequestPayload;
|
|
12
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
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.TerminateLudeosRequest = exports.TerminateLudoesRequestPayload = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const contexts_1 = require("../contexts");
|
|
15
|
+
const ludeo_event_1 = require("../../infra/ludeo-event");
|
|
16
|
+
const validate_nested_type_decorator_1 = require("../../decorators/validate-nested-type.decorator");
|
|
17
|
+
class TerminateLudoesRequestPayload {
|
|
18
|
+
}
|
|
19
|
+
exports.TerminateLudoesRequestPayload = TerminateLudoesRequestPayload;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, class_validator_1.IsUUID)(),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], TerminateLudoesRequestPayload.prototype, "poolId", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, class_validator_1.IsNumber)(),
|
|
26
|
+
__metadata("design:type", Number)
|
|
27
|
+
], TerminateLudoesRequestPayload.prototype, "quantity", void 0);
|
|
28
|
+
class TerminateLudeosRequest extends ludeo_event_1.LudeoEvent {
|
|
29
|
+
constructor(payload, context) {
|
|
30
|
+
super(TerminateLudeosRequest.EVENT_NAME);
|
|
31
|
+
this.payload = payload;
|
|
32
|
+
this.context = context;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.TerminateLudeosRequest = TerminateLudeosRequest;
|
|
36
|
+
TerminateLudeosRequest.EVENT_NAME = "cloud-pools.terminate-ludeos-request";
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, validate_nested_type_decorator_1.ValidateNestedType)(() => contexts_1.CloudPoolContext),
|
|
39
|
+
__metadata("design:type", contexts_1.CloudPoolContext)
|
|
40
|
+
], TerminateLudeosRequest.prototype, "context", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, validate_nested_type_decorator_1.ValidateNestedType)(() => TerminateLudoesRequestPayload),
|
|
43
|
+
__metadata("design:type", TerminateLudoesRequestPayload)
|
|
44
|
+
], TerminateLudeosRequest.prototype, "payload", void 0);
|
|
45
|
+
//# sourceMappingURL=terminate-ludeos-request.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terminate-ludeos-request.js","sourceRoot":"","sources":["../../../src/v4/events/terminate-ludeos-request.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAmD;AAEnD,0CAA+C;AAC/C,yDAAqD;AACrD,oGAAqF;AAErF,MAAa,6BAA6B;CAMzC;AAND,sEAMC;AAJC;IADC,IAAA,wBAAM,GAAE;;6DACM;AAGf;IADC,IAAA,0BAAQ,GAAE;;+DACM;AAGnB,MAAa,sBAAuB,SAAQ,wBAAU;IAGpD,YACE,OAAsC,EACtC,OAAyB;QAEzB,KAAK,CAAC,sBAAsB,CAAC,UAAU,CAAC,CAAC;QACzC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAVH,wDAiBC;AAhBiB,iCAAU,GAAG,sCAAsC,CAAC;AAYpE;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,2BAAgB,CAAC;8BAClC,2BAAgB;uDAAC;AAG1B;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,6BAA6B,CAAC;8BAC/C,6BAA6B;uDAAC"}
|
package/package.json
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IsUUID } from "class-validator";
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import { CloudSessionContext } from "../contexts";
|
|
3
|
+
import { CloudResourceContext } from "../contexts";
|
|
5
4
|
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
6
5
|
import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
|
|
7
6
|
|
|
8
7
|
export class AllocateGameRequestPayload {
|
|
8
|
+
@IsUUID()
|
|
9
|
+
ludeoResourceId: string;
|
|
10
|
+
|
|
9
11
|
@IsUUID()
|
|
10
12
|
gamePoolId: string;
|
|
11
13
|
|
|
12
|
-
@
|
|
13
|
-
|
|
14
|
+
@IsUUID()
|
|
15
|
+
ludeoPoolId: string;
|
|
14
16
|
}
|
|
15
17
|
|
|
16
18
|
export class AllocateGameRequest extends LudeoEvent {
|
|
@@ -18,15 +20,15 @@ export class AllocateGameRequest extends LudeoEvent {
|
|
|
18
20
|
|
|
19
21
|
constructor(
|
|
20
22
|
payload: AllocateGameRequestPayload,
|
|
21
|
-
context:
|
|
23
|
+
context: CloudResourceContext
|
|
22
24
|
) {
|
|
23
25
|
super(AllocateGameRequest.EVENT_NAME);
|
|
24
26
|
this.payload = payload;
|
|
25
27
|
this.context = context;
|
|
26
28
|
}
|
|
27
29
|
|
|
28
|
-
@ValidateNestedType(() =>
|
|
29
|
-
context:
|
|
30
|
+
@ValidateNestedType(() => CloudResourceContext)
|
|
31
|
+
context: CloudResourceContext;
|
|
30
32
|
|
|
31
33
|
@ValidateNestedType(() => AllocateGameRequestPayload)
|
|
32
34
|
payload: AllocateGameRequestPayload;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { IsUUID } from "class-validator";
|
|
2
|
+
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
3
|
+
import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
|
|
4
|
+
import { CloudSessionContext } from "../contexts";
|
|
5
|
+
import { AllocationRequestData } from "../types";
|
|
6
|
+
|
|
7
|
+
export class AllocateLudeoRequestPayload {
|
|
8
|
+
@IsUUID()
|
|
9
|
+
ludeoPoolId: string;
|
|
10
|
+
|
|
11
|
+
@ValidateNestedType(() => AllocationRequestData)
|
|
12
|
+
requestData: AllocationRequestData;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export class AllocateLudeoRequest extends LudeoEvent {
|
|
16
|
+
static readonly EVENT_NAME = "cloud-session-allocator.allocate-ludeo-request";
|
|
17
|
+
|
|
18
|
+
constructor(
|
|
19
|
+
payload: AllocateLudeoRequestPayload,
|
|
20
|
+
context: CloudSessionContext
|
|
21
|
+
) {
|
|
22
|
+
super(AllocateLudeoRequest.EVENT_NAME);
|
|
23
|
+
this.payload = payload;
|
|
24
|
+
this.context = context;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@ValidateNestedType(() => CloudSessionContext)
|
|
28
|
+
context: CloudSessionContext;
|
|
29
|
+
|
|
30
|
+
@ValidateNestedType(() => AllocateLudeoRequestPayload)
|
|
31
|
+
payload: AllocateLudeoRequestPayload;
|
|
32
|
+
}
|
|
@@ -1,28 +1,51 @@
|
|
|
1
|
-
import { IsUUID } from "class-validator";
|
|
1
|
+
import { IsEnum, IsUUID } from "class-validator";
|
|
2
2
|
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
3
3
|
import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
|
|
4
|
-
import {
|
|
4
|
+
import { CloudSessionContext } from "../contexts";
|
|
5
|
+
import {
|
|
6
|
+
AllocationRequestData,
|
|
7
|
+
AWSProviderSettings,
|
|
8
|
+
AWSResourceProviderSettings,
|
|
9
|
+
CloudProvider,
|
|
10
|
+
CloudProviderSettings,
|
|
11
|
+
CloudResourceProviderSettings,
|
|
12
|
+
} from "../types";
|
|
5
13
|
|
|
6
|
-
export class
|
|
14
|
+
export class AllocateLudeoResourceRequestPayload {
|
|
7
15
|
@IsUUID()
|
|
8
16
|
ludeoResourceId: string;
|
|
17
|
+
|
|
18
|
+
@IsUUID()
|
|
19
|
+
ludeoPoolId: string;
|
|
20
|
+
|
|
21
|
+
@ValidateNestedType(() => AWSProviderSettings)
|
|
22
|
+
providerSettings: CloudProviderSettings;
|
|
23
|
+
|
|
24
|
+
@IsEnum(CloudProvider)
|
|
25
|
+
cloudProvider: CloudProvider;
|
|
26
|
+
|
|
27
|
+
@ValidateNestedType(() => AllocationRequestData)
|
|
28
|
+
requestData: AllocationRequestData;
|
|
29
|
+
|
|
30
|
+
@ValidateNestedType(() => AWSResourceProviderSettings)
|
|
31
|
+
resourceProviderSettings: CloudResourceProviderSettings;
|
|
9
32
|
}
|
|
10
33
|
|
|
11
|
-
export class
|
|
12
|
-
static readonly EVENT_NAME = "cloud-pools.allocate-ludeo-resource";
|
|
34
|
+
export class AllocateLudeoResourceRequest extends LudeoEvent {
|
|
35
|
+
static readonly EVENT_NAME = "cloud-pools.allocate-ludeo-resource-request";
|
|
13
36
|
|
|
14
37
|
constructor(
|
|
15
|
-
payload:
|
|
16
|
-
context:
|
|
38
|
+
payload: AllocateLudeoResourceRequestPayload,
|
|
39
|
+
context: CloudSessionContext
|
|
17
40
|
) {
|
|
18
|
-
super(
|
|
41
|
+
super(AllocateLudeoResourceRequest.EVENT_NAME);
|
|
19
42
|
this.payload = payload;
|
|
20
43
|
this.context = context;
|
|
21
44
|
}
|
|
22
45
|
|
|
23
|
-
@ValidateNestedType(() =>
|
|
24
|
-
context:
|
|
46
|
+
@ValidateNestedType(() => CloudSessionContext)
|
|
47
|
+
context: CloudSessionContext;
|
|
25
48
|
|
|
26
|
-
@ValidateNestedType(() =>
|
|
27
|
-
payload:
|
|
49
|
+
@ValidateNestedType(() => AllocateLudeoResourceRequestPayload)
|
|
50
|
+
payload: AllocateLudeoResourceRequestPayload;
|
|
28
51
|
}
|
|
@@ -1,11 +1,31 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CloudResourceContext } from "../contexts";
|
|
2
2
|
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
AWSProviderSettings,
|
|
5
|
+
CloudProvider,
|
|
6
|
+
CloudProviderSettings,
|
|
7
|
+
} from "../types";
|
|
4
8
|
import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
|
|
9
|
+
import { IsEnum, IsUUID } from "class-validator";
|
|
5
10
|
|
|
6
11
|
export class GameAllocatedResponsePayload {
|
|
7
|
-
@
|
|
8
|
-
|
|
12
|
+
@IsUUID()
|
|
13
|
+
gameResourceId: string;
|
|
14
|
+
|
|
15
|
+
@IsUUID()
|
|
16
|
+
gamePoolId: string;
|
|
17
|
+
|
|
18
|
+
@IsUUID()
|
|
19
|
+
ludeoResourceId: string;
|
|
20
|
+
|
|
21
|
+
@IsUUID()
|
|
22
|
+
ludeoPoolId: string;
|
|
23
|
+
|
|
24
|
+
@ValidateNestedType(() => AWSProviderSettings)
|
|
25
|
+
providerSettings: CloudProviderSettings;
|
|
26
|
+
|
|
27
|
+
@IsEnum(CloudProvider)
|
|
28
|
+
cloudProvider: CloudProvider;
|
|
9
29
|
}
|
|
10
30
|
|
|
11
31
|
export class GameAllocatedResponse extends LudeoEvent {
|
|
@@ -13,15 +33,15 @@ export class GameAllocatedResponse extends LudeoEvent {
|
|
|
13
33
|
|
|
14
34
|
constructor(
|
|
15
35
|
payload: GameAllocatedResponsePayload,
|
|
16
|
-
context:
|
|
36
|
+
context: CloudResourceContext
|
|
17
37
|
) {
|
|
18
38
|
super(GameAllocatedResponse.EVENT_NAME);
|
|
19
39
|
this.payload = payload;
|
|
20
40
|
this.context = context;
|
|
21
41
|
}
|
|
22
42
|
|
|
23
|
-
@ValidateNestedType(() =>
|
|
24
|
-
context:
|
|
43
|
+
@ValidateNestedType(() => CloudResourceContext)
|
|
44
|
+
context: CloudResourceContext;
|
|
25
45
|
|
|
26
46
|
@ValidateNestedType(() => GameAllocatedResponsePayload)
|
|
27
47
|
payload: GameAllocatedResponsePayload;
|
|
@@ -1,13 +1,18 @@
|
|
|
1
|
-
import { IsString } from "class-validator";
|
|
1
|
+
import { IsString, IsUUID } from "class-validator";
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import { CloudSessionContext } from "../contexts";
|
|
3
|
+
import { CloudResourceContext } from "../contexts";
|
|
5
4
|
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
6
5
|
import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
|
|
7
6
|
|
|
8
7
|
export class GameAllocationFailedResponsePayload {
|
|
9
|
-
@
|
|
10
|
-
|
|
8
|
+
@IsUUID()
|
|
9
|
+
ludeoResourceId: string;
|
|
10
|
+
|
|
11
|
+
@IsUUID()
|
|
12
|
+
gamePoolId: string;
|
|
13
|
+
|
|
14
|
+
@IsUUID()
|
|
15
|
+
ludeoPoolId: string;
|
|
11
16
|
|
|
12
17
|
@IsString()
|
|
13
18
|
errorMessage: string;
|
|
@@ -18,15 +23,15 @@ export class GameAllocationFailedResponse extends LudeoEvent {
|
|
|
18
23
|
|
|
19
24
|
constructor(
|
|
20
25
|
payload: GameAllocationFailedResponsePayload,
|
|
21
|
-
context:
|
|
26
|
+
context: CloudResourceContext
|
|
22
27
|
) {
|
|
23
28
|
super(GameAllocationFailedResponse.EVENT_NAME);
|
|
24
29
|
this.payload = payload;
|
|
25
30
|
this.context = context;
|
|
26
31
|
}
|
|
27
32
|
|
|
28
|
-
@ValidateNestedType(() =>
|
|
29
|
-
context:
|
|
33
|
+
@ValidateNestedType(() => CloudResourceContext)
|
|
34
|
+
context: CloudResourceContext;
|
|
30
35
|
|
|
31
36
|
@ValidateNestedType(() => GameAllocationFailedResponsePayload)
|
|
32
37
|
payload: GameAllocationFailedResponsePayload;
|