@ludeo/cloud-common 1.1.123 → 1.1.124
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/v3/events/aws-poll-stream-session-task.d.ts +15 -0
- package/dist/v3/events/aws-poll-stream-session-task.js +49 -0
- package/dist/v3/events/aws-poll-stream-session-task.js.map +1 -0
- package/dist/v3/events/game-resource-ready-for-creation-failed.d.ts +13 -0
- package/dist/v3/events/game-resource-ready-for-creation-failed.js +49 -0
- package/dist/v3/events/game-resource-ready-for-creation-failed.js.map +1 -0
- package/dist/v3/events/game-resource-ready-for-creation.d.ts +14 -0
- package/dist/v3/events/game-resource-ready-for-creation.js +46 -0
- package/dist/v3/events/game-resource-ready-for-creation.js.map +1 -0
- package/dist/v3/events/index.d.ts +3 -0
- package/dist/v3/events/index.js +3 -0
- package/dist/v3/events/index.js.map +1 -1
- package/package.json +1 -1
- package/src/v3/events/aws-poll-stream-session-task.ts +33 -0
- package/src/v3/events/game-resource-ready-for-creation-failed.ts +35 -0
- package/src/v3/events/game-resource-ready-for-creation.ts +37 -0
- package/src/v3/events/index.ts +3 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { LudeoEvent } from "../../infra";
|
|
2
|
+
import { CloudResourceContext } from "../contexts";
|
|
3
|
+
import { CreateGameResourceRequestPayload } from "./create-game-resource-request";
|
|
4
|
+
export declare class AwsPollStreamSessionTaskPayload {
|
|
5
|
+
resourceContext: CloudResourceContext;
|
|
6
|
+
creationPayload: CreateGameResourceRequestPayload;
|
|
7
|
+
streamSessionId: string;
|
|
8
|
+
timeStarted: number;
|
|
9
|
+
}
|
|
10
|
+
export declare class AwsPollStreamSessionTask extends LudeoEvent {
|
|
11
|
+
static readonly EVENT_NAME = "cloud-resources.aws-poll-stream-session-task";
|
|
12
|
+
constructor(payload: AwsPollStreamSessionTaskPayload);
|
|
13
|
+
context: never;
|
|
14
|
+
payload: AwsPollStreamSessionTaskPayload;
|
|
15
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
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.AwsPollStreamSessionTask = exports.AwsPollStreamSessionTaskPayload = void 0;
|
|
13
|
+
const infra_1 = require("../../infra");
|
|
14
|
+
const decorators_1 = require("../../decorators");
|
|
15
|
+
const contexts_1 = require("../contexts");
|
|
16
|
+
const class_validator_1 = require("class-validator");
|
|
17
|
+
const create_game_resource_request_1 = require("./create-game-resource-request");
|
|
18
|
+
class AwsPollStreamSessionTaskPayload {
|
|
19
|
+
}
|
|
20
|
+
exports.AwsPollStreamSessionTaskPayload = AwsPollStreamSessionTaskPayload;
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, decorators_1.ValidateNestedType)(() => contexts_1.CloudResourceContext),
|
|
23
|
+
__metadata("design:type", contexts_1.CloudResourceContext)
|
|
24
|
+
], AwsPollStreamSessionTaskPayload.prototype, "resourceContext", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, decorators_1.ValidateNestedType)(() => create_game_resource_request_1.CreateGameResourceRequestPayload),
|
|
27
|
+
__metadata("design:type", create_game_resource_request_1.CreateGameResourceRequestPayload)
|
|
28
|
+
], AwsPollStreamSessionTaskPayload.prototype, "creationPayload", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, class_validator_1.IsString)(),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], AwsPollStreamSessionTaskPayload.prototype, "streamSessionId", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, class_validator_1.IsNumber)(),
|
|
35
|
+
__metadata("design:type", Number)
|
|
36
|
+
], AwsPollStreamSessionTaskPayload.prototype, "timeStarted", void 0);
|
|
37
|
+
class AwsPollStreamSessionTask extends infra_1.LudeoEvent {
|
|
38
|
+
constructor(payload) {
|
|
39
|
+
super(AwsPollStreamSessionTask.EVENT_NAME);
|
|
40
|
+
this.payload = payload;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
exports.AwsPollStreamSessionTask = AwsPollStreamSessionTask;
|
|
44
|
+
AwsPollStreamSessionTask.EVENT_NAME = "cloud-resources.aws-poll-stream-session-task";
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, decorators_1.ValidateNestedType)(() => AwsPollStreamSessionTaskPayload),
|
|
47
|
+
__metadata("design:type", AwsPollStreamSessionTaskPayload)
|
|
48
|
+
], AwsPollStreamSessionTask.prototype, "payload", void 0);
|
|
49
|
+
//# sourceMappingURL=aws-poll-stream-session-task.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aws-poll-stream-session-task.js","sourceRoot":"","sources":["../../../src/v3/events/aws-poll-stream-session-task.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAAyC;AACzC,iDAAsD;AACtD,0CAAmD;AACnD,qDAAqD;AACrD,iFAAkF;AAElF,MAAa,+BAA+B;CAY3C;AAZD,0EAYC;AAVC;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,+BAAoB,CAAC;8BAC9B,+BAAoB;wEAAC;AAGtC;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,+DAAgC,CAAC;8BAC1C,+DAAgC;wEAAC;AAGlD;IADC,IAAA,0BAAQ,GAAE;;wEACa;AAGxB;IADC,IAAA,0BAAQ,GAAE;;oEACS;AAGtB,MAAa,wBAAyB,SAAQ,kBAAU;IAGtD,YAAY,OAAwC;QAClD,KAAK,CAAC,wBAAwB,CAAC,UAAU,CAAC,CAAC;QAC3C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AANH,4DAYC;AAXiB,mCAAU,GAAG,8CAA8C,CAAC;AAU5E;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,+BAA+B,CAAC;8BACjD,+BAA+B;yDAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { LudeoEvent } from "../../infra";
|
|
2
|
+
import { CloudResourceContext } from "../contexts";
|
|
3
|
+
export declare class GameResourceReadyForCreationFailedPayload {
|
|
4
|
+
gamePoolId: string;
|
|
5
|
+
gameResourceId: string;
|
|
6
|
+
errorMessage: string;
|
|
7
|
+
}
|
|
8
|
+
export declare class GameResourceReadyForCreationFailed extends LudeoEvent {
|
|
9
|
+
static readonly EVENT_NAME = "cloud-resources.game-resource-ready-for-creation-failed";
|
|
10
|
+
constructor(payload: GameResourceReadyForCreationFailedPayload, context: CloudResourceContext);
|
|
11
|
+
context: CloudResourceContext;
|
|
12
|
+
payload: GameResourceReadyForCreationFailedPayload;
|
|
13
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
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.GameResourceReadyForCreationFailed = exports.GameResourceReadyForCreationFailedPayload = void 0;
|
|
13
|
+
const infra_1 = require("../../infra");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const decorators_1 = require("../../decorators");
|
|
16
|
+
const contexts_1 = require("../contexts");
|
|
17
|
+
class GameResourceReadyForCreationFailedPayload {
|
|
18
|
+
}
|
|
19
|
+
exports.GameResourceReadyForCreationFailedPayload = GameResourceReadyForCreationFailedPayload;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, class_validator_1.IsUUID)(),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], GameResourceReadyForCreationFailedPayload.prototype, "gamePoolId", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, class_validator_1.IsUUID)(),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], GameResourceReadyForCreationFailedPayload.prototype, "gameResourceId", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, class_validator_1.IsString)(),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], GameResourceReadyForCreationFailedPayload.prototype, "errorMessage", void 0);
|
|
32
|
+
class GameResourceReadyForCreationFailed extends infra_1.LudeoEvent {
|
|
33
|
+
constructor(payload, context) {
|
|
34
|
+
super(GameResourceReadyForCreationFailed.EVENT_NAME);
|
|
35
|
+
this.payload = payload;
|
|
36
|
+
this.context = context;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.GameResourceReadyForCreationFailed = GameResourceReadyForCreationFailed;
|
|
40
|
+
GameResourceReadyForCreationFailed.EVENT_NAME = "cloud-resources.game-resource-ready-for-creation-failed";
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, decorators_1.ValidateNestedType)(() => contexts_1.CloudResourceContext),
|
|
43
|
+
__metadata("design:type", contexts_1.CloudResourceContext)
|
|
44
|
+
], GameResourceReadyForCreationFailed.prototype, "context", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, decorators_1.ValidateNestedType)(() => GameResourceReadyForCreationFailedPayload),
|
|
47
|
+
__metadata("design:type", GameResourceReadyForCreationFailedPayload)
|
|
48
|
+
], GameResourceReadyForCreationFailed.prototype, "payload", void 0);
|
|
49
|
+
//# sourceMappingURL=game-resource-ready-for-creation-failed.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"game-resource-ready-for-creation-failed.js","sourceRoot":"","sources":["../../../src/v3/events/game-resource-ready-for-creation-failed.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAAyC;AACzC,qDAAmD;AACnD,iDAAsD;AACtD,0CAAmD;AAEnD,MAAa,yCAAyC;CASrD;AATD,8FASC;AAPC;IADC,IAAA,wBAAM,GAAE;;6EACU;AAGnB;IADC,IAAA,wBAAM,GAAE;;iFACc;AAGvB;IADC,IAAA,0BAAQ,GAAE;;+EACU;AAGvB,MAAa,kCAAmC,SAAQ,kBAAU;IAIhE,YACE,OAAkD,EAClD,OAA6B;QAE7B,KAAK,CAAC,kCAAkC,CAAC,UAAU,CAAC,CAAC;QACrD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAXH,gFAkBC;AAjBiB,6CAAU,GACxB,yDAAyD,CAAC;AAY5D;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,+BAAoB,CAAC;8BACtC,+BAAoB;mEAAC;AAG9B;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,yCAAyC,CAAC;8BAC3D,yCAAyC;mEAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { LudeoEvent } from "../../infra";
|
|
2
|
+
import { CloudResourceContext } from "../contexts";
|
|
3
|
+
import { CloudResourceProviderSettings } from "../types";
|
|
4
|
+
import { CreateGameResourceRequestPayload } from "./create-game-resource-request";
|
|
5
|
+
export declare class GameResourceReadyForCreationPayload {
|
|
6
|
+
providerSettings: CloudResourceProviderSettings;
|
|
7
|
+
creationPayload: CreateGameResourceRequestPayload;
|
|
8
|
+
}
|
|
9
|
+
export declare class GameResourceReadyForCreation extends LudeoEvent {
|
|
10
|
+
static readonly EVENT_NAME = "cloud-resources.game-resource-ready-for-creation";
|
|
11
|
+
constructor(payload: GameResourceReadyForCreationPayload, context: CloudResourceContext);
|
|
12
|
+
payload: GameResourceReadyForCreationPayload;
|
|
13
|
+
context: CloudResourceContext;
|
|
14
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
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.GameResourceReadyForCreation = exports.GameResourceReadyForCreationPayload = void 0;
|
|
13
|
+
const infra_1 = require("../../infra");
|
|
14
|
+
const decorators_1 = require("../../decorators");
|
|
15
|
+
const contexts_1 = require("../contexts");
|
|
16
|
+
const types_1 = require("../types");
|
|
17
|
+
const create_game_resource_request_1 = require("./create-game-resource-request");
|
|
18
|
+
class GameResourceReadyForCreationPayload {
|
|
19
|
+
}
|
|
20
|
+
exports.GameResourceReadyForCreationPayload = GameResourceReadyForCreationPayload;
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, decorators_1.ValidateNestedType)(() => types_1.AWSResourceProviderSettings),
|
|
23
|
+
__metadata("design:type", Object)
|
|
24
|
+
], GameResourceReadyForCreationPayload.prototype, "providerSettings", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, decorators_1.ValidateNestedType)(() => create_game_resource_request_1.CreateGameResourceRequestPayload),
|
|
27
|
+
__metadata("design:type", create_game_resource_request_1.CreateGameResourceRequestPayload)
|
|
28
|
+
], GameResourceReadyForCreationPayload.prototype, "creationPayload", void 0);
|
|
29
|
+
class GameResourceReadyForCreation extends infra_1.LudeoEvent {
|
|
30
|
+
constructor(payload, context) {
|
|
31
|
+
super(GameResourceReadyForCreation.EVENT_NAME);
|
|
32
|
+
this.payload = payload;
|
|
33
|
+
this.context = context;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.GameResourceReadyForCreation = GameResourceReadyForCreation;
|
|
37
|
+
GameResourceReadyForCreation.EVENT_NAME = "cloud-resources.game-resource-ready-for-creation";
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, decorators_1.ValidateNestedType)(() => GameResourceReadyForCreationPayload),
|
|
40
|
+
__metadata("design:type", GameResourceReadyForCreationPayload)
|
|
41
|
+
], GameResourceReadyForCreation.prototype, "payload", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, decorators_1.ValidateNestedType)(() => contexts_1.CloudResourceContext),
|
|
44
|
+
__metadata("design:type", contexts_1.CloudResourceContext)
|
|
45
|
+
], GameResourceReadyForCreation.prototype, "context", void 0);
|
|
46
|
+
//# sourceMappingURL=game-resource-ready-for-creation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"game-resource-ready-for-creation.js","sourceRoot":"","sources":["../../../src/v3/events/game-resource-ready-for-creation.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAAyC;AACzC,iDAAsD;AACtD,0CAAmD;AACnD,oCAIkB;AAClB,iFAAkF;AAElF,MAAa,mCAAmC;CAM/C;AAND,kFAMC;AAJC;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,mCAA2B,CAAC;;6EACN;AAGhD;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,+DAAgC,CAAC;8BAC1C,+DAAgC;4EAAC;AAGpD,MAAa,4BAA6B,SAAQ,kBAAU;IAI1D,YACE,OAA4C,EAC5C,OAA6B;QAE7B,KAAK,CAAC,4BAA4B,CAAC,UAAU,CAAC,CAAC;QAC/C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAXH,oEAkBC;AAjBiB,uCAAU,GACxB,kDAAkD,CAAC;AAYrD;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,mCAAmC,CAAC;8BACrD,mCAAmC;6DAAC;AAG7C;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,+BAAoB,CAAC;8BACtC,+BAAoB;6DAAC"}
|
|
@@ -61,3 +61,6 @@ export * from "./terminate-stale-resources-task";
|
|
|
61
61
|
export * from "./cloud-session-ended";
|
|
62
62
|
export * from "./invalid-game-resource";
|
|
63
63
|
export * from "./game-resource-allocation-timeout-task";
|
|
64
|
+
export * from "./aws-poll-stream-session-task";
|
|
65
|
+
export * from "./game-resource-ready-for-creation";
|
|
66
|
+
export * from "./game-resource-ready-for-creation-failed";
|
package/dist/v3/events/index.js
CHANGED
|
@@ -77,4 +77,7 @@ __exportStar(require("./terminate-stale-resources-task"), exports);
|
|
|
77
77
|
__exportStar(require("./cloud-session-ended"), exports);
|
|
78
78
|
__exportStar(require("./invalid-game-resource"), exports);
|
|
79
79
|
__exportStar(require("./game-resource-allocation-timeout-task"), exports);
|
|
80
|
+
__exportStar(require("./aws-poll-stream-session-task"), exports);
|
|
81
|
+
__exportStar(require("./game-resource-ready-for-creation"), exports);
|
|
82
|
+
__exportStar(require("./game-resource-ready-for-creation-failed"), exports);
|
|
80
83
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/v3/events/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,mEAAiD;AACjD,6DAA2C;AAC3C,6DAA2C;AAC3C,iEAA+C;AAC/C,yDAAuC;AACvC,0EAAwD;AACxD,oEAAkD;AAClD,4DAA0C;AAC1C,+DAA6C;AAC7C,4DAA0C;AAC1C,oEAAkD;AAClD,qEAAmD;AACnD,6EAA2D;AAC3D,mEAAiD;AACjD,2EAAyD;AACzD,sEAAoD;AACpD,8EAA4D;AAC5D,6DAA2C;AAC3C,qEAAmD;AACnD,iEAA+C;AAC/C,+DAA6C;AAC7C,uEAAqD;AACrD,iEAA+C;AAC/C,yEAAuD;AACvD,+DAA6C;AAC7C,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,0EAAwD"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/v3/events/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,mEAAiD;AACjD,6DAA2C;AAC3C,6DAA2C;AAC3C,iEAA+C;AAC/C,yDAAuC;AACvC,0EAAwD;AACxD,oEAAkD;AAClD,4DAA0C;AAC1C,+DAA6C;AAC7C,4DAA0C;AAC1C,oEAAkD;AAClD,qEAAmD;AACnD,6EAA2D;AAC3D,mEAAiD;AACjD,2EAAyD;AACzD,sEAAoD;AACpD,8EAA4D;AAC5D,6DAA2C;AAC3C,qEAAmD;AACnD,iEAA+C;AAC/C,+DAA6C;AAC7C,uEAAqD;AACrD,iEAA+C;AAC/C,yEAAuD;AACvD,+DAA6C;AAC7C,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,0EAAwD;AACxD,iEAA+C;AAC/C,qEAAmD;AACnD,4EAA0D"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { LudeoEvent } from "../../infra";
|
|
2
|
+
import { ValidateNestedType } from "../../decorators";
|
|
3
|
+
import { CloudResourceContext } from "../contexts";
|
|
4
|
+
import { IsNumber, IsString } from "class-validator";
|
|
5
|
+
import { CreateGameResourceRequestPayload } from "./create-game-resource-request";
|
|
6
|
+
|
|
7
|
+
export class AwsPollStreamSessionTaskPayload {
|
|
8
|
+
@ValidateNestedType(() => CloudResourceContext)
|
|
9
|
+
resourceContext: CloudResourceContext;
|
|
10
|
+
|
|
11
|
+
@ValidateNestedType(() => CreateGameResourceRequestPayload)
|
|
12
|
+
creationPayload: CreateGameResourceRequestPayload;
|
|
13
|
+
|
|
14
|
+
@IsString()
|
|
15
|
+
streamSessionId: string;
|
|
16
|
+
|
|
17
|
+
@IsNumber()
|
|
18
|
+
timeStarted: number;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export class AwsPollStreamSessionTask extends LudeoEvent {
|
|
22
|
+
static readonly EVENT_NAME = "cloud-resources.aws-poll-stream-session-task";
|
|
23
|
+
|
|
24
|
+
constructor(payload: AwsPollStreamSessionTaskPayload) {
|
|
25
|
+
super(AwsPollStreamSessionTask.EVENT_NAME);
|
|
26
|
+
this.payload = payload;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
context: never;
|
|
30
|
+
|
|
31
|
+
@ValidateNestedType(() => AwsPollStreamSessionTaskPayload)
|
|
32
|
+
payload: AwsPollStreamSessionTaskPayload;
|
|
33
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { LudeoEvent } from "../../infra";
|
|
2
|
+
import { IsString, IsUUID } from "class-validator";
|
|
3
|
+
import { ValidateNestedType } from "../../decorators";
|
|
4
|
+
import { CloudResourceContext } from "../contexts";
|
|
5
|
+
|
|
6
|
+
export class GameResourceReadyForCreationFailedPayload {
|
|
7
|
+
@IsUUID()
|
|
8
|
+
gamePoolId: string;
|
|
9
|
+
|
|
10
|
+
@IsUUID()
|
|
11
|
+
gameResourceId: string;
|
|
12
|
+
|
|
13
|
+
@IsString()
|
|
14
|
+
errorMessage: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export class GameResourceReadyForCreationFailed extends LudeoEvent {
|
|
18
|
+
static readonly EVENT_NAME =
|
|
19
|
+
"cloud-resources.game-resource-ready-for-creation-failed";
|
|
20
|
+
|
|
21
|
+
constructor(
|
|
22
|
+
payload: GameResourceReadyForCreationFailedPayload,
|
|
23
|
+
context: CloudResourceContext,
|
|
24
|
+
) {
|
|
25
|
+
super(GameResourceReadyForCreationFailed.EVENT_NAME);
|
|
26
|
+
this.payload = payload;
|
|
27
|
+
this.context = context;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@ValidateNestedType(() => CloudResourceContext)
|
|
31
|
+
context: CloudResourceContext;
|
|
32
|
+
|
|
33
|
+
@ValidateNestedType(() => GameResourceReadyForCreationFailedPayload)
|
|
34
|
+
payload: GameResourceReadyForCreationFailedPayload;
|
|
35
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { LudeoEvent } from "../../infra";
|
|
2
|
+
import { ValidateNestedType } from "../../decorators";
|
|
3
|
+
import { CloudResourceContext } from "../contexts";
|
|
4
|
+
import {
|
|
5
|
+
AWSResourceProviderSettings,
|
|
6
|
+
CloudProviderSettings,
|
|
7
|
+
CloudResourceProviderSettings,
|
|
8
|
+
} from "../types";
|
|
9
|
+
import { CreateGameResourceRequestPayload } from "./create-game-resource-request";
|
|
10
|
+
|
|
11
|
+
export class GameResourceReadyForCreationPayload {
|
|
12
|
+
@ValidateNestedType(() => AWSResourceProviderSettings)
|
|
13
|
+
providerSettings: CloudResourceProviderSettings;
|
|
14
|
+
|
|
15
|
+
@ValidateNestedType(() => CreateGameResourceRequestPayload)
|
|
16
|
+
creationPayload: CreateGameResourceRequestPayload;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export class GameResourceReadyForCreation extends LudeoEvent {
|
|
20
|
+
static readonly EVENT_NAME =
|
|
21
|
+
"cloud-resources.game-resource-ready-for-creation";
|
|
22
|
+
|
|
23
|
+
constructor(
|
|
24
|
+
payload: GameResourceReadyForCreationPayload,
|
|
25
|
+
context: CloudResourceContext,
|
|
26
|
+
) {
|
|
27
|
+
super(GameResourceReadyForCreation.EVENT_NAME);
|
|
28
|
+
this.payload = payload;
|
|
29
|
+
this.context = context;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@ValidateNestedType(() => GameResourceReadyForCreationPayload)
|
|
33
|
+
payload: GameResourceReadyForCreationPayload;
|
|
34
|
+
|
|
35
|
+
@ValidateNestedType(() => CloudResourceContext)
|
|
36
|
+
context: CloudResourceContext;
|
|
37
|
+
}
|
package/src/v3/events/index.ts
CHANGED
|
@@ -61,3 +61,6 @@ export * from "./terminate-stale-resources-task";
|
|
|
61
61
|
export * from "./cloud-session-ended";
|
|
62
62
|
export * from "./invalid-game-resource";
|
|
63
63
|
export * from "./game-resource-allocation-timeout-task";
|
|
64
|
+
export * from "./aws-poll-stream-session-task";
|
|
65
|
+
export * from "./game-resource-ready-for-creation";
|
|
66
|
+
export * from "./game-resource-ready-for-creation-failed";
|