@ludeo/cloud-common 1.2.52-ygarbage3 → 1.2.53-dodsheli
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/game-deallocated-response.d.ts +14 -0
- package/dist/v4/events/game-deallocated-response.js +53 -0
- package/dist/v4/events/game-deallocated-response.js.map +1 -0
- package/dist/v4/events/game-deallocation-failed-response.d.ts +15 -0
- package/dist/v4/events/game-deallocation-failed-response.js +57 -0
- package/dist/v4/events/game-deallocation-failed-response.js.map +1 -0
- package/dist/v4/events/index.d.ts +4 -0
- package/dist/v4/events/index.js +4 -0
- package/dist/v4/events/index.js.map +1 -1
- package/dist/v4/events/pool-status.d.ts +7 -6
- package/dist/v4/events/pool-status.js +1 -1
- package/dist/v4/events/pool-status.js.map +1 -1
- package/dist/v4/events/set-pools-state.d.ts +10 -11
- package/dist/v4/events/set-pools-state.js +10 -10
- package/dist/v4/events/set-pools-state.js.map +1 -1
- package/dist/v4/events/terminate-ludeo-request.d.ts +15 -0
- package/dist/v4/events/terminate-ludeo-request.js +60 -0
- package/dist/v4/events/terminate-ludeo-request.js.map +1 -0
- package/dist/v4/events/terminate-stale-ludeos.d.ts +11 -0
- package/dist/v4/events/terminate-stale-ludeos.js +41 -0
- package/dist/v4/events/terminate-stale-ludeos.js.map +1 -0
- package/package.json +1 -1
- package/src/v4/events/game-deallocated-response.ts +42 -0
- package/src/v4/events/game-deallocation-failed-response.ts +45 -0
- package/src/v4/events/index.ts +4 -0
- package/src/v4/events/pool-status.ts +14 -6
- package/src/v4/events/set-pools-state.ts +16 -13
- package/src/v4/events/terminate-ludeo-request.ts +49 -0
- package/src/v4/events/terminate-stale-ludeos.ts +28 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
2
|
+
import { CloudResourceContext, CloudSessionContext } from "../contexts";
|
|
3
|
+
export declare class GameDeallocatedResponsePayload {
|
|
4
|
+
gamePoolId: string;
|
|
5
|
+
gameResourceId: string;
|
|
6
|
+
ludeoPoolId: string;
|
|
7
|
+
ludeoResourceId: string;
|
|
8
|
+
}
|
|
9
|
+
export declare class GameDeallocatedResponse extends LudeoEvent {
|
|
10
|
+
static readonly EVENT_NAME = "cloud-pools.game-deallocated-response";
|
|
11
|
+
constructor(payload: GameDeallocatedResponsePayload, context: CloudSessionContext | CloudResourceContext);
|
|
12
|
+
context: CloudSessionContext | CloudResourceContext;
|
|
13
|
+
payload: GameDeallocatedResponsePayload;
|
|
14
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
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.GameDeallocatedResponse = exports.GameDeallocatedResponsePayload = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const ludeo_event_1 = require("../../infra/ludeo-event");
|
|
15
|
+
const validate_nested_type_decorator_1 = require("../../decorators/validate-nested-type.decorator");
|
|
16
|
+
const contexts_1 = require("../contexts");
|
|
17
|
+
class GameDeallocatedResponsePayload {
|
|
18
|
+
}
|
|
19
|
+
exports.GameDeallocatedResponsePayload = GameDeallocatedResponsePayload;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, class_validator_1.IsUUID)(),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], GameDeallocatedResponsePayload.prototype, "gamePoolId", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, class_validator_1.IsUUID)(),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], GameDeallocatedResponsePayload.prototype, "gameResourceId", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, class_validator_1.IsUUID)(),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], GameDeallocatedResponsePayload.prototype, "ludeoPoolId", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, class_validator_1.IsUUID)(),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], GameDeallocatedResponsePayload.prototype, "ludeoResourceId", void 0);
|
|
36
|
+
class GameDeallocatedResponse extends ludeo_event_1.LudeoEvent {
|
|
37
|
+
constructor(payload, context) {
|
|
38
|
+
super(GameDeallocatedResponse.EVENT_NAME);
|
|
39
|
+
this.payload = payload;
|
|
40
|
+
this.context = context;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
exports.GameDeallocatedResponse = GameDeallocatedResponse;
|
|
44
|
+
GameDeallocatedResponse.EVENT_NAME = "cloud-pools.game-deallocated-response";
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, validate_nested_type_decorator_1.ValidateNestedType)(contexts_1.getCloudContextType),
|
|
47
|
+
__metadata("design:type", Object)
|
|
48
|
+
], GameDeallocatedResponse.prototype, "context", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, validate_nested_type_decorator_1.ValidateNestedType)(() => GameDeallocatedResponsePayload),
|
|
51
|
+
__metadata("design:type", GameDeallocatedResponsePayload)
|
|
52
|
+
], GameDeallocatedResponse.prototype, "payload", void 0);
|
|
53
|
+
//# sourceMappingURL=game-deallocated-response.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"game-deallocated-response.js","sourceRoot":"","sources":["../../../src/v4/events/game-deallocated-response.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAyC;AAEzC,yDAAqD;AACrD,oGAAqF;AACrF,0CAIqB;AAErB,MAAa,8BAA8B;CAY1C;AAZD,wEAYC;AAVC;IADC,IAAA,wBAAM,GAAE;;kEACU;AAGnB;IADC,IAAA,wBAAM,GAAE;;sEACc;AAGvB;IADC,IAAA,wBAAM,GAAE;;mEACW;AAGpB;IADC,IAAA,wBAAM,GAAE;;uEACe;AAG1B,MAAa,uBAAwB,SAAQ,wBAAU;IAGrD,YACE,OAAuC,EACvC,OAAmD;QAEnD,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,uCAAuC,CAAC;AAYrE;IADC,IAAA,mDAAkB,EAAC,8BAAmB,CAAC;;wDACY;AAGpD;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,8BAA8B,CAAC;8BAChD,8BAA8B;wDAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
2
|
+
import { CloudResourceContext, CloudSessionContext } from "../contexts";
|
|
3
|
+
export declare class GameDeallocationFailedResponsePayload {
|
|
4
|
+
gamePoolId: string;
|
|
5
|
+
gameResourceId: string;
|
|
6
|
+
ludeoPoolId: string;
|
|
7
|
+
ludeoResourceId: string;
|
|
8
|
+
errorMessage: string;
|
|
9
|
+
}
|
|
10
|
+
export declare class GameDeallocationFailedResponse extends LudeoEvent {
|
|
11
|
+
static readonly EVENT_NAME = "cloud-pools.game-deallocation-failed-response";
|
|
12
|
+
constructor(payload: GameDeallocationFailedResponsePayload, context: CloudSessionContext | CloudResourceContext);
|
|
13
|
+
context: CloudSessionContext | CloudResourceContext;
|
|
14
|
+
payload: GameDeallocationFailedResponsePayload;
|
|
15
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
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.GameDeallocationFailedResponse = exports.GameDeallocationFailedResponsePayload = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const ludeo_event_1 = require("../../infra/ludeo-event");
|
|
15
|
+
const validate_nested_type_decorator_1 = require("../../decorators/validate-nested-type.decorator");
|
|
16
|
+
const contexts_1 = require("../contexts");
|
|
17
|
+
class GameDeallocationFailedResponsePayload {
|
|
18
|
+
}
|
|
19
|
+
exports.GameDeallocationFailedResponsePayload = GameDeallocationFailedResponsePayload;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, class_validator_1.IsUUID)(),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], GameDeallocationFailedResponsePayload.prototype, "gamePoolId", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, class_validator_1.IsUUID)(),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], GameDeallocationFailedResponsePayload.prototype, "gameResourceId", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, class_validator_1.IsUUID)(),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], GameDeallocationFailedResponsePayload.prototype, "ludeoPoolId", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, class_validator_1.IsUUID)(),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], GameDeallocationFailedResponsePayload.prototype, "ludeoResourceId", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, class_validator_1.IsString)(),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], GameDeallocationFailedResponsePayload.prototype, "errorMessage", void 0);
|
|
40
|
+
class GameDeallocationFailedResponse extends ludeo_event_1.LudeoEvent {
|
|
41
|
+
constructor(payload, context) {
|
|
42
|
+
super(GameDeallocationFailedResponse.EVENT_NAME);
|
|
43
|
+
this.payload = payload;
|
|
44
|
+
this.context = context;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
exports.GameDeallocationFailedResponse = GameDeallocationFailedResponse;
|
|
48
|
+
GameDeallocationFailedResponse.EVENT_NAME = "cloud-pools.game-deallocation-failed-response";
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, validate_nested_type_decorator_1.ValidateNestedType)(contexts_1.getCloudContextType),
|
|
51
|
+
__metadata("design:type", Object)
|
|
52
|
+
], GameDeallocationFailedResponse.prototype, "context", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, validate_nested_type_decorator_1.ValidateNestedType)(() => GameDeallocationFailedResponsePayload),
|
|
55
|
+
__metadata("design:type", GameDeallocationFailedResponsePayload)
|
|
56
|
+
], GameDeallocationFailedResponse.prototype, "payload", void 0);
|
|
57
|
+
//# sourceMappingURL=game-deallocation-failed-response.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"game-deallocation-failed-response.js","sourceRoot":"","sources":["../../../src/v4/events/game-deallocation-failed-response.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAmD;AAEnD,yDAAqD;AACrD,oGAAqF;AACrF,0CAIqB;AAErB,MAAa,qCAAqC;CAejD;AAfD,sFAeC;AAbC;IADC,IAAA,wBAAM,GAAE;;yEACU;AAGnB;IADC,IAAA,wBAAM,GAAE;;6EACc;AAGvB;IADC,IAAA,wBAAM,GAAE;;0EACW;AAGpB;IADC,IAAA,wBAAM,GAAE;;8EACe;AAGxB;IADC,IAAA,0BAAQ,GAAE;;2EACU;AAGvB,MAAa,8BAA+B,SAAQ,wBAAU;IAG5D,YACE,OAA8C,EAC9C,OAAmD;QAEnD,KAAK,CAAC,8BAA8B,CAAC,UAAU,CAAC,CAAC;QACjD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAVH,wEAiBC;AAhBiB,yCAAU,GAAG,+CAA+C,CAAC;AAY7E;IADC,IAAA,mDAAkB,EAAC,8BAAmB,CAAC;;+DACY;AAGpD;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,qCAAqC,CAAC;8BACvD,qCAAqC;+DAAC"}
|
|
@@ -97,3 +97,7 @@ export * from "./swap-cloud-user-gameplay-request-failed";
|
|
|
97
97
|
export * from "./deallocate-game-request";
|
|
98
98
|
export * from "./ludeo-available";
|
|
99
99
|
export * from "./ludeo-resource-status-changed";
|
|
100
|
+
export * from "./game-deallocated-response";
|
|
101
|
+
export * from "./game-deallocation-failed-response";
|
|
102
|
+
export * from "./terminate-stale-ludeos";
|
|
103
|
+
export * from "./terminate-ludeo-request";
|
package/dist/v4/events/index.js
CHANGED
|
@@ -113,4 +113,8 @@ __exportStar(require("./swap-cloud-user-gameplay-request-failed"), exports);
|
|
|
113
113
|
__exportStar(require("./deallocate-game-request"), exports);
|
|
114
114
|
__exportStar(require("./ludeo-available"), exports);
|
|
115
115
|
__exportStar(require("./ludeo-resource-status-changed"), exports);
|
|
116
|
+
__exportStar(require("./game-deallocated-response"), exports);
|
|
117
|
+
__exportStar(require("./game-deallocation-failed-response"), exports);
|
|
118
|
+
__exportStar(require("./terminate-stale-ludeos"), exports);
|
|
119
|
+
__exportStar(require("./terminate-ludeo-request"), exports);
|
|
116
120
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/v4/events/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,mEAAiD;AACjD,6DAA2C;AAC3C,uEAAqD;AACrD,4EAA0D;AAC1D,6DAA2C;AAC3C,qEAAmD;AACnD,iEAA+C;AAC/C,yDAAuC;AACvC,0EAAwD;AACxD,oEAAkD;AAClD,4DAA0C;AAC1C,+DAA6C;AAC7C,mDAAiC;AACjC,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,oFAAkE;AAClE,uFAAqE;AACrE,sEAAoD;AACpD,8EAA4D;AAC5D,yEAAuD;AACvD,6DAA2C;AAC3C,+DAA6C;AAC7C,gDAA8B;AAC9B,4DAA0C;AAC1C,6CAA2B;AAC3B,oDAAkC;AAClC,8DAA4C;AAC5C,mEAAiD;AACjD,4DAA0C;AAC1C,2DAAyC;AACzC,oEAAkD;AAClD,4DAA0C;AAC1C,uEAAqD;AACrD,6EAA2D;AAC3D,+DAA6C;AAC7C,0DAAwC;AACxC,6DAA2C;AAC3C,+DAA6C;AAC7C,sEAAoD;AACpD,yDAAuC;AACvC,6DAA2C;AAC3C,kEAAgD;AAChD,mEAAiD;AACjD,+DAA6C;AAC7C,gEAA8C;AAC9C,oEAAkD;AAClD,0DAAwC;AACxC,4DAA0C;AAC1C,mEAAiD;AACjD,wDAAsC;AACtC,0DAAwC;AACxC,2EAAyD;AACzD,iEAA+C;AAC/C,qEAAmD;AACnD,4EAA0D;AAC1D,8DAA4C;AAC5C,0EAAwD;AACxD,0DAAwC;AACxC,oEAAkD;AAClD,8DAA4C;AAC5C,wDAAsC;AACtC,6DAA2C;AAC3C,4DAA0C;AAC1C,sEAAoD;AACpD,qEAAmD;AACnD,0DAAwC;AACxC,kEAAgD;AAChD,yDAAuC;AACvC,mEAAiD;AACjD,2DAAyC;AACzC,oEAAkD;AAClD,6DAA2C;AAC3C,yEAAuD;AACvD,+DAA6C;AAC7C,wEAAsD;AACtD,+DAA6C;AAC7C,wDAAsC;AACtC,gEAA8C;AAC9C,oEAAkD;AAClD,qEAAmD;AACnD,4EAA0D;AAC1D,4DAA0C;AAC1C,oDAAkC;AAClC,kEAAgD"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/v4/events/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,mEAAiD;AACjD,6DAA2C;AAC3C,uEAAqD;AACrD,4EAA0D;AAC1D,6DAA2C;AAC3C,qEAAmD;AACnD,iEAA+C;AAC/C,yDAAuC;AACvC,0EAAwD;AACxD,oEAAkD;AAClD,4DAA0C;AAC1C,+DAA6C;AAC7C,mDAAiC;AACjC,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,oFAAkE;AAClE,uFAAqE;AACrE,sEAAoD;AACpD,8EAA4D;AAC5D,yEAAuD;AACvD,6DAA2C;AAC3C,+DAA6C;AAC7C,gDAA8B;AAC9B,4DAA0C;AAC1C,6CAA2B;AAC3B,oDAAkC;AAClC,8DAA4C;AAC5C,mEAAiD;AACjD,4DAA0C;AAC1C,2DAAyC;AACzC,oEAAkD;AAClD,4DAA0C;AAC1C,uEAAqD;AACrD,6EAA2D;AAC3D,+DAA6C;AAC7C,0DAAwC;AACxC,6DAA2C;AAC3C,+DAA6C;AAC7C,sEAAoD;AACpD,yDAAuC;AACvC,6DAA2C;AAC3C,kEAAgD;AAChD,mEAAiD;AACjD,+DAA6C;AAC7C,gEAA8C;AAC9C,oEAAkD;AAClD,0DAAwC;AACxC,4DAA0C;AAC1C,mEAAiD;AACjD,wDAAsC;AACtC,0DAAwC;AACxC,2EAAyD;AACzD,iEAA+C;AAC/C,qEAAmD;AACnD,4EAA0D;AAC1D,8DAA4C;AAC5C,0EAAwD;AACxD,0DAAwC;AACxC,oEAAkD;AAClD,8DAA4C;AAC5C,wDAAsC;AACtC,6DAA2C;AAC3C,4DAA0C;AAC1C,sEAAoD;AACpD,qEAAmD;AACnD,0DAAwC;AACxC,kEAAgD;AAChD,yDAAuC;AACvC,mEAAiD;AACjD,2DAAyC;AACzC,oEAAkD;AAClD,6DAA2C;AAC3C,yEAAuD;AACvD,+DAA6C;AAC7C,wEAAsD;AACtD,+DAA6C;AAC7C,wDAAsC;AACtC,gEAA8C;AAC9C,oEAAkD;AAClD,qEAAmD;AACnD,4EAA0D;AAC1D,4DAA0C;AAC1C,oDAAkC;AAClC,kEAAgD;AAChD,8DAA4C;AAC5C,sEAAoD;AACpD,2DAAyC;AACzC,4DAA0C"}
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
2
|
-
import { CloudResourcesStatusMap, BasePoolAttributes } from "../types";
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { CloudResourcesStatusMap, BasePoolAttributes, LudeoPoolAttributes, MachinePoolAttributes } from "../types";
|
|
3
|
+
import { GamePoolAttributes } from "../../v3/types";
|
|
4
|
+
export declare class PoolStatusEventBasePool<T extends BasePoolAttributes = BasePoolAttributes> {
|
|
5
|
+
attributes: T;
|
|
5
6
|
statusMap: CloudResourcesStatusMap;
|
|
6
7
|
poolId: string;
|
|
7
8
|
}
|
|
8
|
-
export declare class PoolStatusEventLudeoPool extends PoolStatusEventBasePool {
|
|
9
|
+
export declare class PoolStatusEventLudeoPool extends PoolStatusEventBasePool<LudeoPoolAttributes> {
|
|
9
10
|
gamePoolId: string;
|
|
10
11
|
ludeoId: string;
|
|
11
12
|
}
|
|
12
|
-
export declare class PoolStatusEventGamePool extends PoolStatusEventBasePool {
|
|
13
|
+
export declare class PoolStatusEventGamePool extends PoolStatusEventBasePool<GamePoolAttributes> {
|
|
13
14
|
machinePoolId: string;
|
|
14
15
|
ludeos: PoolStatusEventLudeoPool[];
|
|
15
16
|
}
|
|
16
|
-
export declare class PoolStatusEventMachinePool extends PoolStatusEventBasePool {
|
|
17
|
+
export declare class PoolStatusEventMachinePool extends PoolStatusEventBasePool<MachinePoolAttributes> {
|
|
17
18
|
games: PoolStatusEventGamePool[];
|
|
18
19
|
}
|
|
19
20
|
export declare class PoolStatusEventPayload {
|
|
@@ -19,7 +19,7 @@ class PoolStatusEventBasePool {
|
|
|
19
19
|
exports.PoolStatusEventBasePool = PoolStatusEventBasePool;
|
|
20
20
|
__decorate([
|
|
21
21
|
(0, validate_nested_type_decorator_1.ValidateNestedType)(() => types_1.BasePoolAttributes),
|
|
22
|
-
__metadata("design:type",
|
|
22
|
+
__metadata("design:type", Object)
|
|
23
23
|
], PoolStatusEventBasePool.prototype, "attributes", void 0);
|
|
24
24
|
__decorate([
|
|
25
25
|
(0, class_validator_1.IsUUID)(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pool-status.js","sourceRoot":"","sources":["../../../src/v4/events/pool-status.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAyC;AAEzC,yDAAqD;AACrD,
|
|
1
|
+
{"version":3,"file":"pool-status.js","sourceRoot":"","sources":["../../../src/v4/events/pool-status.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAyC;AAEzC,yDAAqD;AACrD,oCAKkB;AAClB,oGAAqF;AAGrF,MAAa,uBAAuB;CAUnC;AAVD,0DAUC;AANC;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,0BAAkB,CAAC;;2DAC/B;AAKd;IADC,IAAA,wBAAM,GAAE;;uDACM;AAGjB,MAAa,wBAAyB,SAAQ,uBAA4C;CAMzF;AAND,4DAMC;AAJC;IADC,IAAA,wBAAM,GAAE;;4DACU;AAGnB;IADC,IAAA,wBAAM,GAAE;;yDACO;AAGlB,MAAa,uBAAwB,SAAQ,uBAA2C;CAKvF;AALD,0DAKC;AAHC;IADC,IAAA,wBAAM,GAAE;;8DACa;AAKxB,MAAa,0BAA2B,SAAQ,uBAA8C;CAE7F;AAFD,gEAEC;AAED,MAAa,sBAAsB;CAKlC;AALD,wDAKC;AADC;IADC,IAAA,wBAAM,GAAE;;yDACS;AAGpB,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,18 +1,16 @@
|
|
|
1
1
|
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
2
|
-
|
|
3
|
-
export declare class
|
|
4
|
-
[attribute: string]: any;
|
|
2
|
+
import { MachinePoolAttributes, GamePoolAttributes } from "../types";
|
|
3
|
+
export declare class MachinePoolAttributesWithQuantity extends MachinePoolAttributes {
|
|
5
4
|
quantity: number;
|
|
6
5
|
poolId: string;
|
|
7
|
-
|
|
6
|
+
reason?: string;
|
|
7
|
+
context?: Record<string, string>;
|
|
8
8
|
}
|
|
9
|
-
export declare class
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export declare class MachinePoolAttributesWithQuantity extends BasePoolAttributesWithQuantity {
|
|
15
|
-
games: GamePoolAttributesWithQuantity[];
|
|
9
|
+
export declare class GamePoolAttributesWithQuantity extends GamePoolAttributes {
|
|
10
|
+
quantity: number;
|
|
11
|
+
poolId: string;
|
|
12
|
+
reason?: string;
|
|
13
|
+
context?: Record<string, string>;
|
|
16
14
|
}
|
|
17
15
|
export declare class SetPoolsStateEventRequestId {
|
|
18
16
|
poolMonitorRequestId: string;
|
|
@@ -20,6 +18,7 @@ export declare class SetPoolsStateEventRequestId {
|
|
|
20
18
|
}
|
|
21
19
|
export declare class SetPoolStateEventPayload {
|
|
22
20
|
machines: MachinePoolAttributesWithQuantity[];
|
|
21
|
+
games: GamePoolAttributesWithQuantity[];
|
|
23
22
|
requestId?: SetPoolsStateEventRequestId;
|
|
24
23
|
}
|
|
25
24
|
export declare class SetPoolsStateEvent extends LudeoEvent {
|
|
@@ -9,22 +9,17 @@ 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.SetPoolsStateEvent = exports.SetPoolStateEventPayload = exports.SetPoolsStateEventRequestId = exports.
|
|
12
|
+
exports.SetPoolsStateEvent = exports.SetPoolStateEventPayload = exports.SetPoolsStateEventRequestId = exports.GamePoolAttributesWithQuantity = exports.MachinePoolAttributesWithQuantity = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
14
|
const ludeo_event_1 = require("../../infra/ludeo-event");
|
|
15
|
+
const types_1 = require("../types");
|
|
15
16
|
const validate_nested_type_decorator_1 = require("../../decorators/validate-nested-type.decorator");
|
|
16
|
-
class
|
|
17
|
+
class MachinePoolAttributesWithQuantity extends types_1.MachinePoolAttributes {
|
|
17
18
|
}
|
|
18
|
-
exports.
|
|
19
|
-
class
|
|
20
|
-
}
|
|
21
|
-
exports.LudeoPoolAttributesWithQuantity = LudeoPoolAttributesWithQuantity;
|
|
22
|
-
class GamePoolAttributesWithQuantity extends BasePoolAttributesWithQuantity {
|
|
19
|
+
exports.MachinePoolAttributesWithQuantity = MachinePoolAttributesWithQuantity;
|
|
20
|
+
class GamePoolAttributesWithQuantity extends types_1.GamePoolAttributes {
|
|
23
21
|
}
|
|
24
22
|
exports.GamePoolAttributesWithQuantity = GamePoolAttributesWithQuantity;
|
|
25
|
-
class MachinePoolAttributesWithQuantity extends BasePoolAttributesWithQuantity {
|
|
26
|
-
}
|
|
27
|
-
exports.MachinePoolAttributesWithQuantity = MachinePoolAttributesWithQuantity;
|
|
28
23
|
class SetPoolsStateEventRequestId {
|
|
29
24
|
}
|
|
30
25
|
exports.SetPoolsStateEventRequestId = SetPoolsStateEventRequestId;
|
|
@@ -44,6 +39,11 @@ __decorate([
|
|
|
44
39
|
(0, validate_nested_type_decorator_1.ValidateNestedType)(() => Array),
|
|
45
40
|
__metadata("design:type", Array)
|
|
46
41
|
], SetPoolStateEventPayload.prototype, "machines", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, class_validator_1.IsArray)(),
|
|
44
|
+
(0, validate_nested_type_decorator_1.ValidateNestedType)(() => Array),
|
|
45
|
+
__metadata("design:type", Array)
|
|
46
|
+
], SetPoolStateEventPayload.prototype, "games", void 0);
|
|
47
47
|
__decorate([
|
|
48
48
|
(0, class_validator_1.IsOptional)(),
|
|
49
49
|
(0, validate_nested_type_decorator_1.ValidateNestedType)(() => SetPoolsStateEventRequestId),
|
|
@@ -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,oCAAqE;AACrE,oGAAqF;AAErF,MAAa,iCAAkC,SAAQ,6BAAqB;CAQ3E;AARD,8EAQC;AAED,MAAa,8BAA+B,SAAQ,0BAAkB;CAQrE;AARD,wEAQC;AAED,MAAa,2BAA2B;CAMvC;AAND,kEAMC;AAJC;IADC,IAAA,wBAAM,GAAE;;yEACoB;AAG7B;IADC,IAAA,wBAAM,GAAE;;4EACuB;AAGlC,MAAa,wBAAwB;CAYpC;AAZD,4DAYC;AATC;IAFC,IAAA,yBAAO,GAAE;IACT,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,KAAwC,CAAC;;0DACrB;AAI9C;IAFC,IAAA,yBAAO,GAAE;IACT,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,KAAqC,CAAC;;uDACxB;AAIxC;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"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { CloudResourceContext, CloudSessionContext } from "../contexts";
|
|
2
|
+
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
3
|
+
export declare class TerminateLudeoRequestPayload {
|
|
4
|
+
ludeoPoolId: string;
|
|
5
|
+
ludeoResourceId: string;
|
|
6
|
+
shouldTerminate?: boolean;
|
|
7
|
+
uploadLogs?: boolean;
|
|
8
|
+
reason?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare class TerminateLudeoRequest extends LudeoEvent {
|
|
11
|
+
static readonly EVENT_NAME = "cloud-session-allocator.terminate-ludeo-request";
|
|
12
|
+
constructor(payload: TerminateLudeoRequestPayload, context: CloudSessionContext | CloudResourceContext);
|
|
13
|
+
context: CloudSessionContext | CloudResourceContext;
|
|
14
|
+
payload: TerminateLudeoRequestPayload;
|
|
15
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
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.TerminateLudeoRequest = exports.TerminateLudeoRequestPayload = 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 TerminateLudeoRequestPayload {
|
|
18
|
+
}
|
|
19
|
+
exports.TerminateLudeoRequestPayload = TerminateLudeoRequestPayload;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, class_validator_1.IsUUID)(),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], TerminateLudeoRequestPayload.prototype, "ludeoPoolId", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, class_validator_1.IsUUID)(),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], TerminateLudeoRequestPayload.prototype, "ludeoResourceId", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, class_validator_1.IsOptional)(),
|
|
30
|
+
(0, class_validator_1.IsBoolean)(),
|
|
31
|
+
__metadata("design:type", Boolean)
|
|
32
|
+
], TerminateLudeoRequestPayload.prototype, "shouldTerminate", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, class_validator_1.IsOptional)(),
|
|
35
|
+
(0, class_validator_1.IsString)(),
|
|
36
|
+
__metadata("design:type", Boolean)
|
|
37
|
+
], TerminateLudeoRequestPayload.prototype, "uploadLogs", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, class_validator_1.IsString)(),
|
|
40
|
+
(0, class_validator_1.IsOptional)(),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], TerminateLudeoRequestPayload.prototype, "reason", void 0);
|
|
43
|
+
class TerminateLudeoRequest extends ludeo_event_1.LudeoEvent {
|
|
44
|
+
constructor(payload, context) {
|
|
45
|
+
super(TerminateLudeoRequest.EVENT_NAME);
|
|
46
|
+
this.payload = payload;
|
|
47
|
+
this.context = context;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
exports.TerminateLudeoRequest = TerminateLudeoRequest;
|
|
51
|
+
TerminateLudeoRequest.EVENT_NAME = "cloud-session-allocator.terminate-ludeo-request";
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, validate_nested_type_decorator_1.ValidateNestedType)(contexts_1.getCloudContextType),
|
|
54
|
+
__metadata("design:type", Object)
|
|
55
|
+
], TerminateLudeoRequest.prototype, "context", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, validate_nested_type_decorator_1.ValidateNestedType)(() => TerminateLudeoRequestPayload),
|
|
58
|
+
__metadata("design:type", TerminateLudeoRequestPayload)
|
|
59
|
+
], TerminateLudeoRequest.prototype, "payload", void 0);
|
|
60
|
+
//# sourceMappingURL=terminate-ludeo-request.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terminate-ludeo-request.js","sourceRoot":"","sources":["../../../src/v4/events/terminate-ludeo-request.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA0E;AAE1E,0CAIqB;AACrB,yDAAqD;AACrD,oGAAqF;AAErF,MAAa,4BAA4B;CAkBxC;AAlBD,oEAkBC;AAhBC;IADC,IAAA,wBAAM,GAAE;;iEACW;AAGpB;IADC,IAAA,wBAAM,GAAE;;qEACe;AAIxB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,GAAE;;qEACc;AAI1B;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;gEACU;AAIrB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;4DACG;AAGlB,MAAa,qBAAsB,SAAQ,wBAAU;IAInD,YACE,OAAqC,EACrC,OAAmD;QAEnD,KAAK,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC;QACxC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAXH,sDAkBC;AAjBiB,gCAAU,GACxB,iDAAiD,CAAC;AAYpD;IADC,IAAA,mDAAkB,EAAC,8BAAmB,CAAC;;sDACY;AAGpD;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,4BAA4B,CAAC;8BAC9C,4BAA4B;sDAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
2
|
+
import { CloudPoolContext } from "../contexts";
|
|
3
|
+
export declare class TerminateStaleLudeosRequestPayload {
|
|
4
|
+
poolId: string;
|
|
5
|
+
}
|
|
6
|
+
export declare class TerminateStaleLudeos extends LudeoEvent {
|
|
7
|
+
static readonly EVENT_NAME = "cloud-pools.terminate-stale-ludeos";
|
|
8
|
+
constructor(payload: TerminateStaleLudeosRequestPayload, context: CloudPoolContext);
|
|
9
|
+
context: CloudPoolContext;
|
|
10
|
+
payload: TerminateStaleLudeosRequestPayload;
|
|
11
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
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.TerminateStaleLudeos = exports.TerminateStaleLudeosRequestPayload = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const ludeo_event_1 = require("../../infra/ludeo-event");
|
|
15
|
+
const contexts_1 = require("../contexts");
|
|
16
|
+
const decorators_1 = require("../../decorators");
|
|
17
|
+
class TerminateStaleLudeosRequestPayload {
|
|
18
|
+
}
|
|
19
|
+
exports.TerminateStaleLudeosRequestPayload = TerminateStaleLudeosRequestPayload;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, class_validator_1.IsString)(),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], TerminateStaleLudeosRequestPayload.prototype, "poolId", void 0);
|
|
24
|
+
class TerminateStaleLudeos extends ludeo_event_1.LudeoEvent {
|
|
25
|
+
constructor(payload, context) {
|
|
26
|
+
super(TerminateStaleLudeos.EVENT_NAME);
|
|
27
|
+
this.payload = payload;
|
|
28
|
+
this.context = context;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.TerminateStaleLudeos = TerminateStaleLudeos;
|
|
32
|
+
TerminateStaleLudeos.EVENT_NAME = "cloud-pools.terminate-stale-ludeos";
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, decorators_1.ValidateNestedType)(() => contexts_1.CloudPoolContext),
|
|
35
|
+
__metadata("design:type", contexts_1.CloudPoolContext)
|
|
36
|
+
], TerminateStaleLudeos.prototype, "context", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, decorators_1.ValidateNestedType)(() => TerminateStaleLudeosRequestPayload),
|
|
39
|
+
__metadata("design:type", TerminateStaleLudeosRequestPayload)
|
|
40
|
+
], TerminateStaleLudeos.prototype, "payload", void 0);
|
|
41
|
+
//# sourceMappingURL=terminate-stale-ludeos.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terminate-stale-ludeos.js","sourceRoot":"","sources":["../../../src/v4/events/terminate-stale-ludeos.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA2C;AAC3C,yDAAqD;AACrD,0CAA+C;AAC/C,iDAAsD;AAEtD,MAAa,kCAAkC;CAG9C;AAHD,gFAGC;AADC;IADC,IAAA,0BAAQ,GAAE;;kEACI;AAGjB,MAAa,oBAAqB,SAAQ,wBAAU;IAGlD,YACE,OAA2C,EAC3C,OAAyB;QAEzB,KAAK,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC;QACvC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAVH,oDAiBC;AAhBiB,+BAAU,GAAG,oCAAoC,CAAC;AAYlE;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,2BAAgB,CAAC;8BAClC,2BAAgB;qDAAC;AAG1B;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,kCAAkC,CAAC;8BACpD,kCAAkC;qDAAC"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { IsUUID } from "class-validator";
|
|
2
|
+
|
|
3
|
+
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
4
|
+
import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
|
|
5
|
+
import {
|
|
6
|
+
CloudResourceContext,
|
|
7
|
+
CloudSessionContext,
|
|
8
|
+
getCloudContextType,
|
|
9
|
+
} from "../contexts";
|
|
10
|
+
|
|
11
|
+
export class GameDeallocatedResponsePayload {
|
|
12
|
+
@IsUUID()
|
|
13
|
+
gamePoolId: string;
|
|
14
|
+
|
|
15
|
+
@IsUUID()
|
|
16
|
+
gameResourceId: string;
|
|
17
|
+
|
|
18
|
+
@IsUUID()
|
|
19
|
+
ludeoPoolId: string;
|
|
20
|
+
|
|
21
|
+
@IsUUID()
|
|
22
|
+
ludeoResourceId: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export class GameDeallocatedResponse extends LudeoEvent {
|
|
26
|
+
static readonly EVENT_NAME = "cloud-pools.game-deallocated-response";
|
|
27
|
+
|
|
28
|
+
constructor(
|
|
29
|
+
payload: GameDeallocatedResponsePayload,
|
|
30
|
+
context: CloudSessionContext | CloudResourceContext
|
|
31
|
+
) {
|
|
32
|
+
super(GameDeallocatedResponse.EVENT_NAME);
|
|
33
|
+
this.payload = payload;
|
|
34
|
+
this.context = context;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@ValidateNestedType(getCloudContextType)
|
|
38
|
+
context: CloudSessionContext | CloudResourceContext;
|
|
39
|
+
|
|
40
|
+
@ValidateNestedType(() => GameDeallocatedResponsePayload)
|
|
41
|
+
payload: GameDeallocatedResponsePayload;
|
|
42
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { IsString, IsUUID } from "class-validator";
|
|
2
|
+
|
|
3
|
+
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
4
|
+
import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
|
|
5
|
+
import {
|
|
6
|
+
CloudResourceContext,
|
|
7
|
+
CloudSessionContext,
|
|
8
|
+
getCloudContextType,
|
|
9
|
+
} from "../contexts";
|
|
10
|
+
|
|
11
|
+
export class GameDeallocationFailedResponsePayload {
|
|
12
|
+
@IsUUID()
|
|
13
|
+
gamePoolId: string;
|
|
14
|
+
|
|
15
|
+
@IsUUID()
|
|
16
|
+
gameResourceId: string;
|
|
17
|
+
|
|
18
|
+
@IsUUID()
|
|
19
|
+
ludeoPoolId: string;
|
|
20
|
+
|
|
21
|
+
@IsUUID()
|
|
22
|
+
ludeoResourceId: string;
|
|
23
|
+
|
|
24
|
+
@IsString()
|
|
25
|
+
errorMessage: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export class GameDeallocationFailedResponse extends LudeoEvent {
|
|
29
|
+
static readonly EVENT_NAME = "cloud-pools.game-deallocation-failed-response";
|
|
30
|
+
|
|
31
|
+
constructor(
|
|
32
|
+
payload: GameDeallocationFailedResponsePayload,
|
|
33
|
+
context: CloudSessionContext | CloudResourceContext
|
|
34
|
+
) {
|
|
35
|
+
super(GameDeallocationFailedResponse.EVENT_NAME);
|
|
36
|
+
this.payload = payload;
|
|
37
|
+
this.context = context;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@ValidateNestedType(getCloudContextType)
|
|
41
|
+
context: CloudSessionContext | CloudResourceContext;
|
|
42
|
+
|
|
43
|
+
@ValidateNestedType(() => GameDeallocationFailedResponsePayload)
|
|
44
|
+
payload: GameDeallocationFailedResponsePayload;
|
|
45
|
+
}
|
package/src/v4/events/index.ts
CHANGED
|
@@ -97,3 +97,7 @@ export * from "./swap-cloud-user-gameplay-request-failed";
|
|
|
97
97
|
export * from "./deallocate-game-request";
|
|
98
98
|
export * from "./ludeo-available";
|
|
99
99
|
export * from "./ludeo-resource-status-changed";
|
|
100
|
+
export * from "./game-deallocated-response";
|
|
101
|
+
export * from "./game-deallocation-failed-response";
|
|
102
|
+
export * from "./terminate-stale-ludeos";
|
|
103
|
+
export * from "./terminate-ludeo-request";
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
import { IsUUID } from "class-validator";
|
|
2
2
|
|
|
3
3
|
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
CloudResourcesStatusMap,
|
|
6
|
+
BasePoolAttributes,
|
|
7
|
+
LudeoPoolAttributes,
|
|
8
|
+
MachinePoolAttributes,
|
|
9
|
+
} from "../types";
|
|
5
10
|
import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
|
|
11
|
+
import { GamePoolAttributes } from "../../v3/types";
|
|
6
12
|
|
|
7
|
-
export class PoolStatusEventBasePool
|
|
13
|
+
export class PoolStatusEventBasePool<
|
|
14
|
+
T extends BasePoolAttributes = BasePoolAttributes,
|
|
15
|
+
> {
|
|
8
16
|
@ValidateNestedType(() => BasePoolAttributes)
|
|
9
|
-
attributes:
|
|
17
|
+
attributes: T;
|
|
10
18
|
|
|
11
19
|
statusMap: CloudResourcesStatusMap;
|
|
12
20
|
|
|
@@ -14,7 +22,7 @@ export class PoolStatusEventBasePool {
|
|
|
14
22
|
poolId: string;
|
|
15
23
|
}
|
|
16
24
|
|
|
17
|
-
export class PoolStatusEventLudeoPool extends PoolStatusEventBasePool {
|
|
25
|
+
export class PoolStatusEventLudeoPool extends PoolStatusEventBasePool<LudeoPoolAttributes> {
|
|
18
26
|
@IsUUID()
|
|
19
27
|
gamePoolId: string;
|
|
20
28
|
|
|
@@ -22,14 +30,14 @@ export class PoolStatusEventLudeoPool extends PoolStatusEventBasePool {
|
|
|
22
30
|
ludeoId: string;
|
|
23
31
|
}
|
|
24
32
|
|
|
25
|
-
export class PoolStatusEventGamePool extends PoolStatusEventBasePool {
|
|
33
|
+
export class PoolStatusEventGamePool extends PoolStatusEventBasePool<GamePoolAttributes> {
|
|
26
34
|
@IsUUID()
|
|
27
35
|
machinePoolId: string;
|
|
28
36
|
|
|
29
37
|
ludeos: PoolStatusEventLudeoPool[];
|
|
30
38
|
}
|
|
31
39
|
|
|
32
|
-
export class PoolStatusEventMachinePool extends PoolStatusEventBasePool {
|
|
40
|
+
export class PoolStatusEventMachinePool extends PoolStatusEventBasePool<MachinePoolAttributes> {
|
|
33
41
|
games: PoolStatusEventGamePool[];
|
|
34
42
|
}
|
|
35
43
|
|