@ludeo/cloud-common 1.2.41 → 1.2.42

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.
@@ -4,6 +4,10 @@ import { CloudProviderAllocationData } from "../types";
4
4
  export declare class CloudSessionAllocatedPayload {
5
5
  allocationData?: CloudProviderAllocationData;
6
6
  region?: string;
7
+ gamePoolId: string;
8
+ gameResourceId: string;
9
+ ludeoPoolId: string;
10
+ ludeoResourceId: string;
7
11
  }
8
12
  export declare class CloudSessionAllocated extends LudeoEvent {
9
13
  static readonly EVENT_NAME = "cloud-session-allocator.cloud-session-allocated";
@@ -27,6 +27,22 @@ __decorate([
27
27
  (0, class_validator_1.IsOptional)(),
28
28
  __metadata("design:type", String)
29
29
  ], CloudSessionAllocatedPayload.prototype, "region", void 0);
30
+ __decorate([
31
+ (0, class_validator_1.IsUUID)(),
32
+ __metadata("design:type", String)
33
+ ], CloudSessionAllocatedPayload.prototype, "gamePoolId", void 0);
34
+ __decorate([
35
+ (0, class_validator_1.IsUUID)(),
36
+ __metadata("design:type", String)
37
+ ], CloudSessionAllocatedPayload.prototype, "gameResourceId", void 0);
38
+ __decorate([
39
+ (0, class_validator_1.IsUUID)(),
40
+ __metadata("design:type", String)
41
+ ], CloudSessionAllocatedPayload.prototype, "ludeoPoolId", void 0);
42
+ __decorate([
43
+ (0, class_validator_1.IsUUID)(),
44
+ __metadata("design:type", String)
45
+ ], CloudSessionAllocatedPayload.prototype, "ludeoResourceId", void 0);
30
46
  class CloudSessionAllocated extends ludeo_event_1.LudeoEvent {
31
47
  constructor(payload, context) {
32
48
  super(CloudSessionAllocated.EVENT_NAME);
@@ -1 +1 @@
1
- {"version":3,"file":"cloud-session-allocated.js","sourceRoot":"","sources":["../../../src/v4/events/cloud-session-allocated.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6EAAwE;AACxE,oGAAqF;AACrF,yDAAqD;AACrD,oCAA0E;AAC1E,qDAAuD;AAEvD,MAAa,4BAA4B;CAOxC;AAPD,oEAOC;AALC;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,yBAAiB,CAAC;;oEACC;AAI7C;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;4DACG;AAGlB,MAAa,qBAAsB,SAAQ,wBAAU;IAInD,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;;AAXH,sDAkBC;AAjBiB,gCAAU,GACxB,iDAAiD,CAAC;AAYpD;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,4BAA4B,CAAC;8BAC9C,4BAA4B;sDAAC;AAGtC;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,2CAAmB,CAAC;8BACrC,2CAAmB;sDAAC"}
1
+ {"version":3,"file":"cloud-session-allocated.js","sourceRoot":"","sources":["../../../src/v4/events/cloud-session-allocated.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6EAAwE;AACxE,oGAAqF;AACrF,yDAAqD;AACrD,oCAA0E;AAC1E,qDAA+D;AAE/D,MAAa,4BAA4B;CAmBxC;AAnBD,oEAmBC;AAjBC;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,yBAAiB,CAAC;;oEACC;AAI7C;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;4DACG;AAGhB;IADC,IAAA,wBAAM,GAAE;;gEACU;AAGnB;IADC,IAAA,wBAAM,GAAE;;oEACc;AAGvB;IADC,IAAA,wBAAM,GAAE;;iEACW;AAGpB;IADC,IAAA,wBAAM,GAAE;;qEACe;AAG1B,MAAa,qBAAsB,SAAQ,wBAAU;IAInD,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;;AAXH,sDAkBC;AAjBiB,gCAAU,GACxB,iDAAiD,CAAC;AAYpD;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,4BAA4B,CAAC;8BAC9C,4BAA4B;sDAAC;AAGtC;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,2CAAmB,CAAC;8BACrC,2CAAmB;sDAAC"}
@@ -0,0 +1,15 @@
1
+ import { CloudResourceContext, CloudSessionContext } from "../contexts";
2
+ import { LudeoEvent } from "../../infra";
3
+ export declare class DeallocateGameRequestPayload {
4
+ gamePoolId: string;
5
+ gameResourceId: string;
6
+ ludeoPoolId: string;
7
+ ludeoResourceId: string;
8
+ shouldTerminate: boolean;
9
+ }
10
+ export declare class DeallocateGameRequest extends LudeoEvent {
11
+ static readonly EVENT_NAME = "cloud-pools.deallocate-game-request";
12
+ constructor(payload: DeallocateGameRequestPayload, context: CloudSessionContext | CloudResourceContext);
13
+ payload: DeallocateGameRequestPayload;
14
+ context: CloudSessionContext | CloudResourceContext;
15
+ }
@@ -0,0 +1,58 @@
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.DeallocateGameRequest = exports.DeallocateGameRequestPayload = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ const contexts_1 = require("../contexts");
15
+ const decorators_1 = require("../../decorators");
16
+ const infra_1 = require("../../infra");
17
+ class DeallocateGameRequestPayload {
18
+ }
19
+ exports.DeallocateGameRequestPayload = DeallocateGameRequestPayload;
20
+ __decorate([
21
+ (0, class_validator_1.IsUUID)(),
22
+ __metadata("design:type", String)
23
+ ], DeallocateGameRequestPayload.prototype, "gamePoolId", void 0);
24
+ __decorate([
25
+ (0, class_validator_1.IsUUID)(),
26
+ __metadata("design:type", String)
27
+ ], DeallocateGameRequestPayload.prototype, "gameResourceId", void 0);
28
+ __decorate([
29
+ (0, class_validator_1.IsUUID)(),
30
+ __metadata("design:type", String)
31
+ ], DeallocateGameRequestPayload.prototype, "ludeoPoolId", void 0);
32
+ __decorate([
33
+ (0, class_validator_1.IsUUID)(),
34
+ __metadata("design:type", String)
35
+ ], DeallocateGameRequestPayload.prototype, "ludeoResourceId", void 0);
36
+ __decorate([
37
+ (0, class_validator_1.IsBoolean)(),
38
+ (0, class_validator_1.IsOptional)(),
39
+ __metadata("design:type", Boolean)
40
+ ], DeallocateGameRequestPayload.prototype, "shouldTerminate", void 0);
41
+ class DeallocateGameRequest extends infra_1.LudeoEvent {
42
+ constructor(payload, context) {
43
+ super(DeallocateGameRequest.EVENT_NAME);
44
+ this.payload = payload;
45
+ this.context = context;
46
+ }
47
+ }
48
+ exports.DeallocateGameRequest = DeallocateGameRequest;
49
+ DeallocateGameRequest.EVENT_NAME = "cloud-pools.deallocate-game-request";
50
+ __decorate([
51
+ (0, decorators_1.ValidateNestedType)(() => DeallocateGameRequestPayload),
52
+ __metadata("design:type", DeallocateGameRequestPayload)
53
+ ], DeallocateGameRequest.prototype, "payload", void 0);
54
+ __decorate([
55
+ (0, decorators_1.ValidateNestedType)(contexts_1.getCloudContextType),
56
+ __metadata("design:type", Object)
57
+ ], DeallocateGameRequest.prototype, "context", void 0);
58
+ //# sourceMappingURL=deallocate-game-request.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deallocate-game-request.js","sourceRoot":"","sources":["../../../src/v4/events/deallocate-game-request.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAgE;AAChE,0CAIqB;AACrB,iDAAsD;AACtD,uCAAyC;AAEzC,MAAa,4BAA4B;CAgBxC;AAhBD,oEAgBC;AAdC;IADC,IAAA,wBAAM,GAAE;;gEACU;AAGnB;IADC,IAAA,wBAAM,GAAE;;oEACc;AAGvB;IADC,IAAA,wBAAM,GAAE;;iEACW;AAGpB;IADC,IAAA,wBAAM,GAAE;;qEACe;AAIxB;IAFC,IAAA,2BAAS,GAAE;IACX,IAAA,4BAAU,GAAE;;qEACY;AAG3B,MAAa,qBAAsB,SAAQ,kBAAU;IAGnD,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;;AAVH,sDAiBC;AAhBiB,gCAAU,GAAG,qCAAqC,CAAC;AAYnE;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,4BAA4B,CAAC;8BAC9C,4BAA4B;sDAAC;AAGtC;IADC,IAAA,+BAAkB,EAAC,8BAAmB,CAAC;;sDACY"}
@@ -94,3 +94,4 @@ export * from "./gameplay-ready-timeout-task";
94
94
  export * from "./no-user-connection-timeout-task";
95
95
  export * from "./swap-cloud-user-gameplay-request";
96
96
  export * from "./swap-cloud-user-gameplay-request-failed";
97
+ export * from "./deallocate-game-request";
@@ -110,4 +110,5 @@ __exportStar(require("./gameplay-ready-timeout-task"), exports);
110
110
  __exportStar(require("./no-user-connection-timeout-task"), exports);
111
111
  __exportStar(require("./swap-cloud-user-gameplay-request"), exports);
112
112
  __exportStar(require("./swap-cloud-user-gameplay-request-failed"), exports);
113
+ __exportStar(require("./deallocate-game-request"), exports);
113
114
  //# 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,yDAAuC;AACvC,+DAA6C;AAC7C,wEAAsD;AACtD,+DAA6C;AAC7C,wDAAsC;AACtC,gEAA8C;AAC9C,oEAAkD;AAClD,qEAAmD;AACnD,4EAA0D"}
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,yDAAuC;AACvC,+DAA6C;AAC7C,wEAAsD;AACtD,+DAA6C;AAC7C,wDAAsC;AACtC,gEAA8C;AAC9C,oEAAkD;AAClD,qEAAmD;AACnD,4EAA0D;AAC1D,4DAA0C"}
@@ -3,6 +3,11 @@ import { CloudSessionContext } from "../contexts";
3
3
  import { CloudProviderAllocationData } from "../types";
4
4
  export declare class LudeoAllocatedResponsePayload {
5
5
  allocationData: CloudProviderAllocationData;
6
+ cloudSessionId: string;
7
+ gamePoolId: string;
8
+ gameResourceId: string;
9
+ ludeoPoolId: string;
10
+ ludeoResourceId: string;
6
11
  }
7
12
  export declare class LudeoAllocatedResponse extends LudeoEvent {
8
13
  static readonly EVENT_NAME = "cloud-pools.ludeo-allocated-response";
@@ -14,6 +14,7 @@ const ludeo_event_1 = require("../../infra/ludeo-event");
14
14
  const validate_nested_type_decorator_1 = require("../../decorators/validate-nested-type.decorator");
15
15
  const contexts_1 = require("../contexts");
16
16
  const types_1 = require("../types");
17
+ const class_validator_1 = require("class-validator");
17
18
  class LudeoAllocatedResponsePayload {
18
19
  }
19
20
  exports.LudeoAllocatedResponsePayload = LudeoAllocatedResponsePayload;
@@ -21,6 +22,26 @@ __decorate([
21
22
  (0, validate_nested_type_decorator_1.ValidateNestedType)(() => types_1.AwsAllocationData),
22
23
  __metadata("design:type", Object)
23
24
  ], LudeoAllocatedResponsePayload.prototype, "allocationData", void 0);
25
+ __decorate([
26
+ (0, class_validator_1.IsUUID)(),
27
+ __metadata("design:type", String)
28
+ ], LudeoAllocatedResponsePayload.prototype, "cloudSessionId", void 0);
29
+ __decorate([
30
+ (0, class_validator_1.IsUUID)(),
31
+ __metadata("design:type", String)
32
+ ], LudeoAllocatedResponsePayload.prototype, "gamePoolId", void 0);
33
+ __decorate([
34
+ (0, class_validator_1.IsUUID)(),
35
+ __metadata("design:type", String)
36
+ ], LudeoAllocatedResponsePayload.prototype, "gameResourceId", void 0);
37
+ __decorate([
38
+ (0, class_validator_1.IsUUID)(),
39
+ __metadata("design:type", String)
40
+ ], LudeoAllocatedResponsePayload.prototype, "ludeoPoolId", void 0);
41
+ __decorate([
42
+ (0, class_validator_1.IsUUID)(),
43
+ __metadata("design:type", String)
44
+ ], LudeoAllocatedResponsePayload.prototype, "ludeoResourceId", void 0);
24
45
  class LudeoAllocatedResponse extends ludeo_event_1.LudeoEvent {
25
46
  constructor(payload, context) {
26
47
  super(LudeoAllocatedResponse.EVENT_NAME);
@@ -1 +1 @@
1
- {"version":3,"file":"ludeo-allocated-response.js","sourceRoot":"","sources":["../../../src/v4/events/ludeo-allocated-response.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAqD;AACrD,oGAAqF;AACrF,0CAAkD;AAClD,oCAA0E;AAE1E,MAAa,6BAA6B;CAGzC;AAHD,sEAGC;AADC;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,yBAAiB,CAAC;;qEACA;AAG9C,MAAa,sBAAuB,SAAQ,wBAAU;IAGpD,YACE,OAAsC,EACtC,OAA4B;QAE5B,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,8BAAmB,CAAC;8BACrC,8BAAmB;uDAAC;AAG7B;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,6BAA6B,CAAC;8BAC/C,6BAA6B;uDAAC"}
1
+ {"version":3,"file":"ludeo-allocated-response.js","sourceRoot":"","sources":["../../../src/v4/events/ludeo-allocated-response.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAqD;AACrD,oGAAqF;AACrF,0CAAkD;AAClD,oCAA0E;AAC1E,qDAAyC;AAEzC,MAAa,6BAA6B;CAkBzC;AAlBD,sEAkBC;AAhBC;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,yBAAiB,CAAC;;qEACA;AAG5C;IADC,IAAA,wBAAM,GAAE;;qEACc;AAGvB;IADC,IAAA,wBAAM,GAAE;;iEACU;AAGnB;IADC,IAAA,wBAAM,GAAE;;qEACc;AAGvB;IADC,IAAA,wBAAM,GAAE;;kEACW;AAGpB;IADC,IAAA,wBAAM,GAAE;;sEACe;AAG1B,MAAa,sBAAuB,SAAQ,wBAAU;IAGpD,YACE,OAAsC,EACtC,OAA4B;QAE5B,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,8BAAmB,CAAC;8BACrC,8BAAmB;uDAAC;AAG7B;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,6BAA6B,CAAC;8BAC/C,6BAA6B;uDAAC"}
@@ -3,6 +3,11 @@ import { LudeoEvent } from "../../infra/ludeo-event";
3
3
  export declare class TerminateCloudSessionRequestPayload {
4
4
  status?: string;
5
5
  reason?: string;
6
+ cloudSessionId: string;
7
+ gamePoolId: string;
8
+ gameResourceId: string;
9
+ ludeoPoolId: string;
10
+ ludeoResourceId: string;
6
11
  }
7
12
  export declare class TerminateCloudSessionRequest extends LudeoEvent {
8
13
  static readonly EVENT_NAME = "cloud-sessions.terminate-cloud-session-request";
@@ -27,6 +27,26 @@ __decorate([
27
27
  (0, class_validator_1.IsString)(),
28
28
  __metadata("design:type", String)
29
29
  ], TerminateCloudSessionRequestPayload.prototype, "reason", void 0);
30
+ __decorate([
31
+ (0, class_validator_1.IsUUID)(),
32
+ __metadata("design:type", String)
33
+ ], TerminateCloudSessionRequestPayload.prototype, "cloudSessionId", void 0);
34
+ __decorate([
35
+ (0, class_validator_1.IsUUID)(),
36
+ __metadata("design:type", String)
37
+ ], TerminateCloudSessionRequestPayload.prototype, "gamePoolId", void 0);
38
+ __decorate([
39
+ (0, class_validator_1.IsUUID)(),
40
+ __metadata("design:type", String)
41
+ ], TerminateCloudSessionRequestPayload.prototype, "gameResourceId", void 0);
42
+ __decorate([
43
+ (0, class_validator_1.IsUUID)(),
44
+ __metadata("design:type", String)
45
+ ], TerminateCloudSessionRequestPayload.prototype, "ludeoPoolId", void 0);
46
+ __decorate([
47
+ (0, class_validator_1.IsUUID)(),
48
+ __metadata("design:type", String)
49
+ ], TerminateCloudSessionRequestPayload.prototype, "ludeoResourceId", void 0);
30
50
  class TerminateCloudSessionRequest extends ludeo_event_1.LudeoEvent {
31
51
  constructor(payload, context) {
32
52
  super(TerminateCloudSessionRequest.EVENT_NAME);
@@ -1 +1 @@
1
- {"version":3,"file":"terminate-cloud-session-request.js","sourceRoot":"","sources":["../../../src/v4/events/terminate-cloud-session-request.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6EAAwE;AACxE,oGAAqF;AACrF,yDAAqD;AACrD,qDAAuD;AAEvD,MAAa,mCAAmC;CAQ/C;AARD,kFAQC;AALC;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;mEACK;AAIhB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;mEACK;AAGlB,MAAa,4BAA6B,SAAQ,wBAAU;IAG1D,YACE,OAA4C,EAC5C,OAA4B;QAE5B,KAAK,CAAC,4BAA4B,CAAC,UAAU,CAAC,CAAC;QAC/C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAVH,oEAiBC;AAhBiB,uCAAU,GAAG,gDAAgD,CAAC;AAY9E;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,2CAAmB,CAAC;8BACrC,2CAAmB;6DAAC;AAG7B;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,mCAAmC,CAAC;8BACrD,mCAAmC;6DAAC"}
1
+ {"version":3,"file":"terminate-cloud-session-request.js","sourceRoot":"","sources":["../../../src/v4/events/terminate-cloud-session-request.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6EAAwE;AACxE,oGAAqF;AACrF,yDAAqD;AACrD,qDAA+D;AAE/D,MAAa,mCAAmC;CAuB/C;AAvBD,kFAuBC;AApBC;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;mEACK;AAIhB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;mEACK;AAGhB;IADC,IAAA,wBAAM,GAAE;;2EACc;AAGvB;IADC,IAAA,wBAAM,GAAE;;uEACU;AAGnB;IADC,IAAA,wBAAM,GAAE;;2EACc;AAGvB;IADC,IAAA,wBAAM,GAAE;;wEACW;AAGpB;IADC,IAAA,wBAAM,GAAE;;4EACe;AAG1B,MAAa,4BAA6B,SAAQ,wBAAU;IAG1D,YACE,OAA4C,EAC5C,OAA4B;QAE5B,KAAK,CAAC,4BAA4B,CAAC,UAAU,CAAC,CAAC;QAC/C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAVH,oEAiBC;AAhBiB,uCAAU,GAAG,gDAAgD,CAAC;AAY9E;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,2CAAmB,CAAC;8BACrC,2CAAmB;6DAAC;AAG7B;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,mCAAmC,CAAC;8BACrD,mCAAmC;6DAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ludeo/cloud-common",
3
- "version": "1.2.41",
3
+ "version": "1.2.42",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "author": "Yahil Didi",
@@ -2,7 +2,7 @@ import { CloudSessionContext } from "../contexts/cloud-session-context";
2
2
  import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
3
3
  import { LudeoEvent } from "../../infra/ludeo-event";
4
4
  import { AwsAllocationData, CloudProviderAllocationData } from "../types";
5
- import { IsOptional, IsString } from "class-validator";
5
+ import { IsOptional, IsString, IsUUID } from "class-validator";
6
6
 
7
7
  export class CloudSessionAllocatedPayload {
8
8
  @ValidateNestedType(() => AwsAllocationData)
@@ -11,6 +11,18 @@ export class CloudSessionAllocatedPayload {
11
11
  @IsString()
12
12
  @IsOptional()
13
13
  region?: string;
14
+
15
+ @IsUUID()
16
+ gamePoolId: string;
17
+
18
+ @IsUUID()
19
+ gameResourceId: string;
20
+
21
+ @IsUUID()
22
+ ludeoPoolId: string;
23
+
24
+ @IsUUID()
25
+ ludeoResourceId: string;
14
26
  }
15
27
 
16
28
  export class CloudSessionAllocated extends LudeoEvent {
@@ -19,7 +31,7 @@ export class CloudSessionAllocated extends LudeoEvent {
19
31
 
20
32
  constructor(
21
33
  payload: CloudSessionAllocatedPayload,
22
- context: CloudSessionContext,
34
+ context: CloudSessionContext
23
35
  ) {
24
36
  super(CloudSessionAllocated.EVENT_NAME);
25
37
  this.payload = payload;
@@ -0,0 +1,45 @@
1
+ import { IsBoolean, IsOptional, IsUUID } from "class-validator";
2
+ import {
3
+ CloudResourceContext,
4
+ CloudSessionContext,
5
+ getCloudContextType,
6
+ } from "../contexts";
7
+ import { ValidateNestedType } from "../../decorators";
8
+ import { LudeoEvent } from "../../infra";
9
+
10
+ export class DeallocateGameRequestPayload {
11
+ @IsUUID()
12
+ gamePoolId: string;
13
+
14
+ @IsUUID()
15
+ gameResourceId: string;
16
+
17
+ @IsUUID()
18
+ ludeoPoolId: string;
19
+
20
+ @IsUUID()
21
+ ludeoResourceId: string;
22
+
23
+ @IsBoolean()
24
+ @IsOptional()
25
+ shouldTerminate: boolean;
26
+ }
27
+
28
+ export class DeallocateGameRequest extends LudeoEvent {
29
+ static readonly EVENT_NAME = "cloud-pools.deallocate-game-request";
30
+
31
+ constructor(
32
+ payload: DeallocateGameRequestPayload,
33
+ context: CloudSessionContext | CloudResourceContext
34
+ ) {
35
+ super(DeallocateGameRequest.EVENT_NAME);
36
+ this.payload = payload;
37
+ this.context = context;
38
+ }
39
+
40
+ @ValidateNestedType(() => DeallocateGameRequestPayload)
41
+ payload: DeallocateGameRequestPayload;
42
+
43
+ @ValidateNestedType(getCloudContextType)
44
+ context: CloudSessionContext | CloudResourceContext;
45
+ }
@@ -94,3 +94,4 @@ export * from "./gameplay-ready-timeout-task";
94
94
  export * from "./no-user-connection-timeout-task";
95
95
  export * from "./swap-cloud-user-gameplay-request";
96
96
  export * from "./swap-cloud-user-gameplay-request-failed";
97
+ export * from "./deallocate-game-request";
@@ -2,10 +2,26 @@ import { LudeoEvent } from "../../infra/ludeo-event";
2
2
  import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
3
3
  import { CloudSessionContext } from "../contexts";
4
4
  import { AwsAllocationData, CloudProviderAllocationData } from "../types";
5
+ import { IsUUID } from "class-validator";
5
6
 
6
7
  export class LudeoAllocatedResponsePayload {
7
8
  @ValidateNestedType(() => AwsAllocationData)
8
9
  allocationData: CloudProviderAllocationData;
10
+
11
+ @IsUUID()
12
+ cloudSessionId: string;
13
+
14
+ @IsUUID()
15
+ gamePoolId: string;
16
+
17
+ @IsUUID()
18
+ gameResourceId: string;
19
+
20
+ @IsUUID()
21
+ ludeoPoolId: string;
22
+
23
+ @IsUUID()
24
+ ludeoResourceId: string;
9
25
  }
10
26
 
11
27
  export class LudeoAllocatedResponse extends LudeoEvent {
@@ -1,7 +1,7 @@
1
1
  import { CloudSessionContext } from "../contexts/cloud-session-context";
2
2
  import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
3
3
  import { LudeoEvent } from "../../infra/ludeo-event";
4
- import { IsOptional, IsString } from "class-validator";
4
+ import { IsOptional, IsString, IsUUID } from "class-validator";
5
5
 
6
6
  export class TerminateCloudSessionRequestPayload {
7
7
  @IsOptional()
@@ -11,6 +11,21 @@ export class TerminateCloudSessionRequestPayload {
11
11
  @IsOptional()
12
12
  @IsString()
13
13
  reason?: string;
14
+
15
+ @IsUUID()
16
+ cloudSessionId: string;
17
+
18
+ @IsUUID()
19
+ gamePoolId: string;
20
+
21
+ @IsUUID()
22
+ gameResourceId: string;
23
+
24
+ @IsUUID()
25
+ ludeoPoolId: string;
26
+
27
+ @IsUUID()
28
+ ludeoResourceId: string;
14
29
  }
15
30
 
16
31
  export class TerminateCloudSessionRequest extends LudeoEvent {