@ludeo/cloud-common 1.1.68 → 1.1.70

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.
@@ -0,0 +1,16 @@
1
+ import { LudeoEvent } from "../../infra/ludeo-event";
2
+ import { CloudResourceContext } from "../contexts/cloud-resource-context";
3
+ import { AWSResourceProviderSettings, CloudResourceStatus } from "../types";
4
+ export declare class GameStatusChangedEventPayload {
5
+ gameResourceId: string;
6
+ gamePoolId: string;
7
+ providerSettings: AWSResourceProviderSettings;
8
+ status: CloudResourceStatus;
9
+ error?: string;
10
+ }
11
+ export declare class GameStatusChangedEvent extends LudeoEvent {
12
+ static readonly EVENT_NAME = "cloud-resource-monitor.game-status-changed";
13
+ constructor(payload: GameStatusChangedEventPayload, context: CloudResourceContext);
14
+ context: CloudResourceContext;
15
+ payload: GameStatusChangedEventPayload;
16
+ }
@@ -0,0 +1,59 @@
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.GameStatusChangedEvent = exports.GameStatusChangedEventPayload = 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 GameStatusChangedEventPayload {
19
+ }
20
+ exports.GameStatusChangedEventPayload = GameStatusChangedEventPayload;
21
+ __decorate([
22
+ (0, class_validator_1.IsUUID)(),
23
+ __metadata("design:type", String)
24
+ ], GameStatusChangedEventPayload.prototype, "gameResourceId", void 0);
25
+ __decorate([
26
+ (0, class_validator_1.IsUUID)(),
27
+ __metadata("design:type", String)
28
+ ], GameStatusChangedEventPayload.prototype, "gamePoolId", void 0);
29
+ __decorate([
30
+ (0, validate_nested_type_decorator_1.ValidateNestedType)(() => types_1.AWSResourceProviderSettings),
31
+ __metadata("design:type", types_1.AWSResourceProviderSettings)
32
+ ], GameStatusChangedEventPayload.prototype, "providerSettings", void 0);
33
+ __decorate([
34
+ (0, class_validator_1.IsString)(),
35
+ __metadata("design:type", String)
36
+ ], GameStatusChangedEventPayload.prototype, "status", void 0);
37
+ __decorate([
38
+ (0, class_validator_1.IsOptional)(),
39
+ (0, class_validator_1.IsString)(),
40
+ __metadata("design:type", String)
41
+ ], GameStatusChangedEventPayload.prototype, "error", void 0);
42
+ class GameStatusChangedEvent extends ludeo_event_1.LudeoEvent {
43
+ constructor(payload, context) {
44
+ super(GameStatusChangedEvent.EVENT_NAME);
45
+ this.payload = payload;
46
+ this.context = context;
47
+ }
48
+ }
49
+ exports.GameStatusChangedEvent = GameStatusChangedEvent;
50
+ GameStatusChangedEvent.EVENT_NAME = "cloud-resource-monitor.game-status-changed";
51
+ __decorate([
52
+ (0, validate_nested_type_decorator_1.ValidateNestedType)(() => cloud_resource_context_1.CloudResourceContext),
53
+ __metadata("design:type", cloud_resource_context_1.CloudResourceContext)
54
+ ], GameStatusChangedEvent.prototype, "context", void 0);
55
+ __decorate([
56
+ (0, validate_nested_type_decorator_1.ValidateNestedType)(() => GameStatusChangedEventPayload),
57
+ __metadata("design:type", GameStatusChangedEventPayload)
58
+ ], GameStatusChangedEvent.prototype, "payload", void 0);
59
+ //# sourceMappingURL=game-status-changed.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"game-status-changed.js","sourceRoot":"","sources":["../../../src/v3/events/game-status-changed.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA+D;AAC/D,yDAAqD;AACrD,+EAA0E;AAC1E,oCAA4E;AAC5E,oGAAqF;AAErF,MAAa,6BAA6B;CAgBzC;AAhBD,sEAgBC;AAdC;IADC,IAAA,wBAAM,GAAE;;qEACc;AAGvB;IADC,IAAA,wBAAM,GAAE;;iEACU;AAGnB;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,mCAA2B,CAAC;8BACpC,mCAA2B;uEAAC;AAG9C;IADC,IAAA,0BAAQ,GAAE;;6DACiB;AAI5B;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;4DACI;AAGjB,MAAa,sBAAuB,SAAQ,wBAAU;IAGpD,YACE,OAAsC,EACtC,OAA6B;QAE7B,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,4CAA4C,CAAC;AAY1E;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,6CAAoB,CAAC;8BACtC,6CAAoB;uDAAC;AAG9B;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,6BAA6B,CAAC;8BAC/C,6BAA6B;uDAAC"}
@@ -1,4 +1,4 @@
1
- import { CloudSessionContext } from "../contexts";
1
+ import { CloudResourceContext, CloudSessionContext } from "../contexts";
2
2
  import { LudeoEvent } from "../../infra/ludeo-event";
3
3
  export declare class GameTerminatedResponsePayload {
4
4
  gamePoolId: string;
@@ -6,7 +6,7 @@ export declare class GameTerminatedResponsePayload {
6
6
  }
7
7
  export declare class GameTerminatedResponse extends LudeoEvent {
8
8
  static readonly EVENT_NAME = "cloud-pools.game-terminated-response";
9
- constructor(payload: GameTerminatedResponsePayload, context: CloudSessionContext);
10
- context: CloudSessionContext;
9
+ constructor(payload: GameTerminatedResponsePayload, context: CloudSessionContext | CloudResourceContext);
10
+ context: CloudSessionContext | CloudResourceContext;
11
11
  payload: GameTerminatedResponsePayload;
12
12
  }
@@ -35,8 +35,8 @@ class GameTerminatedResponse extends ludeo_event_1.LudeoEvent {
35
35
  exports.GameTerminatedResponse = GameTerminatedResponse;
36
36
  GameTerminatedResponse.EVENT_NAME = "cloud-pools.game-terminated-response";
37
37
  __decorate([
38
- (0, validate_nested_type_decorator_1.ValidateNestedType)(() => contexts_1.CloudSessionContext),
39
- __metadata("design:type", contexts_1.CloudSessionContext)
38
+ (0, validate_nested_type_decorator_1.ValidateNestedType)(contexts_1.getCloudContextType),
39
+ __metadata("design:type", Object)
40
40
  ], GameTerminatedResponse.prototype, "context", void 0);
41
41
  __decorate([
42
42
  (0, validate_nested_type_decorator_1.ValidateNestedType)(() => GameTerminatedResponsePayload),
@@ -1 +1 @@
1
- {"version":3,"file":"game-terminated-response.js","sourceRoot":"","sources":["../../../src/v3/events/game-terminated-response.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAyC;AAEzC,0CAAkD;AAClD,yDAAqD;AACrD,oGAAqF;AAErF,MAAa,6BAA6B;CAMzC;AAND,sEAMC;AAJC;IADC,IAAA,wBAAM,GAAE;;iEACU;AAGnB;IADC,IAAA,wBAAM,GAAE;;qEACc;AAGzB,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":"game-terminated-response.js","sourceRoot":"","sources":["../../../src/v3/events/game-terminated-response.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAyC;AAEzC,0CAIqB;AACrB,yDAAqD;AACrD,oGAAqF;AAErF,MAAa,6BAA6B;CAMzC;AAND,sEAMC;AAJC;IADC,IAAA,wBAAM,GAAE;;iEACU;AAGnB;IADC,IAAA,wBAAM,GAAE;;qEACc;AAGzB,MAAa,sBAAuB,SAAQ,wBAAU;IAGpD,YACE,OAAsC,EACtC,OAAmD;QAEnD,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,8BAAmB,CAAC;;uDACY;AAGpD;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,6BAA6B,CAAC;8BAC/C,6BAA6B;uDAAC"}
@@ -1,4 +1,4 @@
1
- import { CloudSessionContext } from "../contexts";
1
+ import { CloudResourceContext, CloudSessionContext } from "../contexts";
2
2
  import { LudeoEvent } from "../../infra/ludeo-event";
3
3
  export declare class GameTerminationFailedResponsePayload {
4
4
  gamePoolId: string;
@@ -7,7 +7,7 @@ export declare class GameTerminationFailedResponsePayload {
7
7
  }
8
8
  export declare class GameTerminationFailedResponse extends LudeoEvent {
9
9
  static readonly EVENT_NAME = "cloud-pools.game-termination-failed-response";
10
- constructor(payload: GameTerminationFailedResponsePayload, context: CloudSessionContext);
11
- context: CloudSessionContext;
10
+ constructor(payload: GameTerminationFailedResponsePayload, context: CloudSessionContext | CloudResourceContext);
11
+ context: CloudSessionContext | CloudResourceContext;
12
12
  payload: GameTerminationFailedResponsePayload;
13
13
  }
@@ -39,8 +39,8 @@ class GameTerminationFailedResponse extends ludeo_event_1.LudeoEvent {
39
39
  exports.GameTerminationFailedResponse = GameTerminationFailedResponse;
40
40
  GameTerminationFailedResponse.EVENT_NAME = "cloud-pools.game-termination-failed-response";
41
41
  __decorate([
42
- (0, validate_nested_type_decorator_1.ValidateNestedType)(() => contexts_1.CloudSessionContext),
43
- __metadata("design:type", contexts_1.CloudSessionContext)
42
+ (0, validate_nested_type_decorator_1.ValidateNestedType)(contexts_1.getCloudContextType),
43
+ __metadata("design:type", Object)
44
44
  ], GameTerminationFailedResponse.prototype, "context", void 0);
45
45
  __decorate([
46
46
  (0, validate_nested_type_decorator_1.ValidateNestedType)(() => GameTerminationFailedResponsePayload),
@@ -1 +1 @@
1
- {"version":3,"file":"game-termination-failed-response.js","sourceRoot":"","sources":["../../../src/v3/events/game-termination-failed-response.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAmD;AAEnD,0CAAkD;AAClD,yDAAqD;AACrD,oGAAqF;AAErF,MAAa,oCAAoC;CAShD;AATD,oFASC;AAPC;IADC,IAAA,wBAAM,GAAE;;wEACU;AAGnB;IADC,IAAA,wBAAM,GAAE;;4EACc;AAGvB;IADC,IAAA,0BAAQ,GAAE;;0EACU;AAGvB,MAAa,6BAA8B,SAAQ,wBAAU;IAG3D,YACE,OAA6C,EAC7C,OAA4B;QAE5B,KAAK,CAAC,6BAA6B,CAAC,UAAU,CAAC,CAAC;QAChD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAVH,sEAiBC;AAhBiB,wCAAU,GAAG,8CAA8C,CAAC;AAY5E;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,8BAAmB,CAAC;8BACrC,8BAAmB;8DAAC;AAG7B;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,oCAAoC,CAAC;8BACtD,oCAAoC;8DAAC"}
1
+ {"version":3,"file":"game-termination-failed-response.js","sourceRoot":"","sources":["../../../src/v3/events/game-termination-failed-response.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAmD;AAEnD,0CAIqB;AACrB,yDAAqD;AACrD,oGAAqF;AAErF,MAAa,oCAAoC;CAShD;AATD,oFASC;AAPC;IADC,IAAA,wBAAM,GAAE;;wEACU;AAGnB;IADC,IAAA,wBAAM,GAAE;;4EACc;AAGvB;IADC,IAAA,0BAAQ,GAAE;;0EACU;AAGvB,MAAa,6BAA8B,SAAQ,wBAAU;IAG3D,YACE,OAA6C,EAC7C,OAAmD;QAEnD,KAAK,CAAC,6BAA6B,CAAC,UAAU,CAAC,CAAC;QAChD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAVH,sEAiBC;AAhBiB,wCAAU,GAAG,8CAA8C,CAAC;AAY5E;IADC,IAAA,mDAAkB,EAAC,8BAAmB,CAAC;;8DACY;AAGpD;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,oCAAoC,CAAC;8BACtD,oCAAoC;8DAAC"}
@@ -0,0 +1,14 @@
1
+ import { LudeoEvent } from "../../infra/ludeo-event";
2
+ import { AWSResourceProviderSettings, CloudProvider } from "../types";
3
+ export declare class MonitorGameTaskEventPayload {
4
+ gameResourceId: string;
5
+ gamePoolId: string;
6
+ providerSettings: AWSResourceProviderSettings;
7
+ cloudProvider: CloudProvider;
8
+ }
9
+ export declare class MonitorGameTaskEvent extends LudeoEvent {
10
+ static readonly EVENT_NAME = "cloud-resources.monitor-game-task";
11
+ constructor(payload: MonitorGameTaskEventPayload);
12
+ context: never;
13
+ payload: MonitorGameTaskEventPayload;
14
+ }
@@ -0,0 +1,48 @@
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.MonitorGameTaskEvent = exports.MonitorGameTaskEventPayload = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ const ludeo_event_1 = require("../../infra/ludeo-event");
15
+ const types_1 = require("../types");
16
+ const decorators_1 = require("../../decorators");
17
+ class MonitorGameTaskEventPayload {
18
+ }
19
+ exports.MonitorGameTaskEventPayload = MonitorGameTaskEventPayload;
20
+ __decorate([
21
+ (0, class_validator_1.IsUUID)(),
22
+ __metadata("design:type", String)
23
+ ], MonitorGameTaskEventPayload.prototype, "gameResourceId", void 0);
24
+ __decorate([
25
+ (0, class_validator_1.IsUUID)(),
26
+ __metadata("design:type", String)
27
+ ], MonitorGameTaskEventPayload.prototype, "gamePoolId", void 0);
28
+ __decorate([
29
+ (0, decorators_1.ValidateNestedType)(() => types_1.AWSResourceProviderSettings),
30
+ __metadata("design:type", types_1.AWSResourceProviderSettings)
31
+ ], MonitorGameTaskEventPayload.prototype, "providerSettings", void 0);
32
+ __decorate([
33
+ (0, class_validator_1.IsEnum)(types_1.CloudProvider),
34
+ __metadata("design:type", String)
35
+ ], MonitorGameTaskEventPayload.prototype, "cloudProvider", void 0);
36
+ class MonitorGameTaskEvent extends ludeo_event_1.LudeoEvent {
37
+ constructor(payload) {
38
+ super(MonitorGameTaskEvent.EVENT_NAME);
39
+ this.payload = payload;
40
+ }
41
+ }
42
+ exports.MonitorGameTaskEvent = MonitorGameTaskEvent;
43
+ MonitorGameTaskEvent.EVENT_NAME = "cloud-resources.monitor-game-task";
44
+ __decorate([
45
+ (0, decorators_1.ValidateNestedType)(() => MonitorGameTaskEventPayload),
46
+ __metadata("design:type", MonitorGameTaskEventPayload)
47
+ ], MonitorGameTaskEvent.prototype, "payload", void 0);
48
+ //# sourceMappingURL=monitor-game-task.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"monitor-game-task.js","sourceRoot":"","sources":["../../../src/v3/events/monitor-game-task.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAiD;AACjD,yDAAqD;AACrD,oCAAsE;AACtE,iDAAsD;AAEtD,MAAa,2BAA2B;CAYvC;AAZD,kEAYC;AAVC;IADC,IAAA,wBAAM,GAAE;;mEACc;AAGvB;IADC,IAAA,wBAAM,GAAE;;+DACU;AAGnB;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,mCAA2B,CAAC;8BACpC,mCAA2B;qEAAC;AAG9C;IADC,IAAA,wBAAM,EAAC,qBAAa,CAAC;;kEACO;AAG/B,MAAa,oBAAqB,SAAQ,wBAAU;IAGlD,YAAY,OAAoC;QAC9C,KAAK,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC;QACvC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AANH,oDAYC;AAXiB,+BAAU,GAAG,mCAAmC,CAAC;AAUjE;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,2BAA2B,CAAC;8BAC7C,2BAA2B;qDAAC"}
@@ -11,6 +11,7 @@ export declare enum CloudResourceStatus {
11
11
  }
12
12
  export declare enum CloudPoolStatus {
13
13
  Active = "active",
14
+ Created = "created",
14
15
  Scaling = "scaling",
15
16
  Terminated = "terminated"
16
17
  }
@@ -27,6 +27,7 @@ var CloudResourceStatus;
27
27
  var CloudPoolStatus;
28
28
  (function (CloudPoolStatus) {
29
29
  CloudPoolStatus["Active"] = "active";
30
+ CloudPoolStatus["Created"] = "created";
30
31
  CloudPoolStatus["Scaling"] = "scaling";
31
32
  CloudPoolStatus["Terminated"] = "terminated";
32
33
  })(CloudPoolStatus || (exports.CloudPoolStatus = CloudPoolStatus = {}));
@@ -1 +1 @@
1
- {"version":3,"file":"pools.js","sourceRoot":"","sources":["../../../src/v3/types/pools.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAMyB;AAEzB,iDAAsD;AACtD,mCAIiB;AAEjB,IAAY,mBASX;AATD,WAAY,mBAAmB;IAC7B,8CAAuB,CAAA;IACvB,8CAAuB,CAAA;IACvB,4CAAqB,CAAA;IACrB,0CAAmB,CAAA;IACnB,gDAAyB,CAAA;IACzB,sCAAe,CAAA;IACf,kDAA2B,CAAA;IAC3B,gDAAyB,CAAA;AAC3B,CAAC,EATW,mBAAmB,mCAAnB,mBAAmB,QAS9B;AAED,IAAY,eAIX;AAJD,WAAY,eAAe;IACzB,oCAAiB,CAAA;IACjB,sCAAmB,CAAA;IACnB,4CAAyB,CAAA;AAC3B,CAAC,EAJW,eAAe,+BAAf,eAAe,QAI1B;AACD,MAAa,sBAAsB;CAGlC;AAHD,wDAGC;AADC;IADC,IAAA,0BAAQ,GAAE;;oDACE;AAGf,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,8BAAa,CAAA;IACb,oCAAmB,CAAA;AACrB,CAAC,EAHW,aAAa,6BAAb,aAAa,QAGxB;AAED,MAAa,0BAA0B;CActC;AAdD,gEAcC;AAVC;IADC,IAAA,wBAAM,EAAC,qBAAa,CAAC;;iEACO;AAG7B;IADC,IAAA,wBAAM,GAAE;;0DACM;AAGf;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,sBAAsB,CAAC;8BACzB,sBAAsB;0EAAC;AAG/C;IADC,IAAA,wBAAM,EAAC,aAAa,CAAC;;wDACF;AAGtB,MAAa,qBAAsB,SAAQ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AAG;AAA9D,oDAA8D;AAE9D,MAAa,iBAAkB,SAAQ,iBAAiB;CAIvD;AAJD,8CAIC;AADC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;4DACc;AAgB7B,MAAa,SAAS;CAOrB;AAPD,8BAOC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ludeo/cloud-common",
3
- "version": "1.1.68",
3
+ "version": "1.1.70",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "author": "Yahil Didi",
@@ -1,6 +1,10 @@
1
1
  import { IsUUID } from "class-validator";
2
2
 
3
- import { CloudSessionContext } from "../contexts";
3
+ import {
4
+ CloudResourceContext,
5
+ CloudSessionContext,
6
+ getCloudContextType,
7
+ } from "../contexts";
4
8
  import { LudeoEvent } from "../../infra/ludeo-event";
5
9
  import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
6
10
 
@@ -17,15 +21,15 @@ export class GameTerminatedResponse extends LudeoEvent {
17
21
 
18
22
  constructor(
19
23
  payload: GameTerminatedResponsePayload,
20
- context: CloudSessionContext
24
+ context: CloudSessionContext | CloudResourceContext
21
25
  ) {
22
26
  super(GameTerminatedResponse.EVENT_NAME);
23
27
  this.payload = payload;
24
28
  this.context = context;
25
29
  }
26
30
 
27
- @ValidateNestedType(() => CloudSessionContext)
28
- context: CloudSessionContext;
31
+ @ValidateNestedType(getCloudContextType)
32
+ context: CloudSessionContext | CloudResourceContext;
29
33
 
30
34
  @ValidateNestedType(() => GameTerminatedResponsePayload)
31
35
  payload: GameTerminatedResponsePayload;
@@ -1,6 +1,10 @@
1
1
  import { IsString, IsUUID } from "class-validator";
2
2
 
3
- import { CloudSessionContext } from "../contexts";
3
+ import {
4
+ CloudResourceContext,
5
+ CloudSessionContext,
6
+ getCloudContextType,
7
+ } from "../contexts";
4
8
  import { LudeoEvent } from "../../infra/ludeo-event";
5
9
  import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
6
10
 
@@ -20,15 +24,15 @@ export class GameTerminationFailedResponse extends LudeoEvent {
20
24
 
21
25
  constructor(
22
26
  payload: GameTerminationFailedResponsePayload,
23
- context: CloudSessionContext
27
+ context: CloudSessionContext | CloudResourceContext
24
28
  ) {
25
29
  super(GameTerminationFailedResponse.EVENT_NAME);
26
30
  this.payload = payload;
27
31
  this.context = context;
28
32
  }
29
33
 
30
- @ValidateNestedType(() => CloudSessionContext)
31
- context: CloudSessionContext;
34
+ @ValidateNestedType(getCloudContextType)
35
+ context: CloudSessionContext | CloudResourceContext;
32
36
 
33
37
  @ValidateNestedType(() => GameTerminationFailedResponsePayload)
34
38
  payload: GameTerminationFailedResponsePayload;
@@ -26,6 +26,7 @@ export enum CloudResourceStatus {
26
26
 
27
27
  export enum CloudPoolStatus {
28
28
  Active = "active",
29
+ Created = "created",
29
30
  Scaling = "scaling",
30
31
  Terminated = "terminated",
31
32
  }