@ludeo/cloud-common 1.1.49 → 1.1.51

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.
@@ -2,7 +2,6 @@ import { AllocationRequestData } from "../types";
2
2
  import { CloudSessionContext } from "../contexts";
3
3
  import { LudeoEvent } from "../../infra/ludeo-event";
4
4
  export declare class AllocateGameRequestPayload {
5
- gameResourceId: string;
6
5
  gamePoolId: string;
7
6
  requestData: AllocationRequestData;
8
7
  }
@@ -18,10 +18,6 @@ const validate_nested_type_decorator_1 = require("../../decorators/validate-nest
18
18
  class AllocateGameRequestPayload {
19
19
  }
20
20
  exports.AllocateGameRequestPayload = AllocateGameRequestPayload;
21
- __decorate([
22
- (0, class_validator_1.IsUUID)(),
23
- __metadata("design:type", String)
24
- ], AllocateGameRequestPayload.prototype, "gameResourceId", void 0);
25
21
  __decorate([
26
22
  (0, class_validator_1.IsUUID)(),
27
23
  __metadata("design:type", String)
@@ -1 +1 @@
1
- {"version":3,"file":"allocate-game-request.js","sourceRoot":"","sources":["../../../src/v3/events/allocate-game-request.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAiD;AAEjD,oCAAgE;AAChE,0CAAkD;AAClD,yDAAqD;AACrD,oGAAqF;AAErF,MAAa,0BAA0B;CAStC;AATD,gEASC;AAPC;IADC,IAAA,wBAAM,GAAE;;kEACc;AAGvB;IADC,IAAA,wBAAM,GAAE;;8DACU;AAGnB;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,6BAAqB,CAAC;8BACnC,6BAAqB;+DAAC;AAGrC,MAAa,mBAAoB,SAAQ,wBAAU;IAGjD,YACE,OAAmC,EACnC,OAA4B;QAE5B,KAAK,CAAC,mBAAmB,CAAC,UAAU,CAAC,CAAC;QACtC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAVH,kDAiBC;AAhBiB,8BAAU,GAAG,+CAA+C,CAAC;AAY7E;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,8BAAmB,CAAC;8BACrC,8BAAmB;oDAAC;AAG7B;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,0BAA0B,CAAC;8BAC5C,0BAA0B;oDAAC"}
1
+ {"version":3,"file":"allocate-game-request.js","sourceRoot":"","sources":["../../../src/v3/events/allocate-game-request.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAiD;AAEjD,oCAAgE;AAChE,0CAAkD;AAClD,yDAAqD;AACrD,oGAAqF;AAErF,MAAa,0BAA0B;CAMtC;AAND,gEAMC;AAJC;IADC,IAAA,wBAAM,GAAE;;8DACU;AAGnB;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,6BAAqB,CAAC;8BACnC,6BAAqB;+DAAC;AAGrC,MAAa,mBAAoB,SAAQ,wBAAU;IAGjD,YACE,OAAmC,EACnC,OAA4B;QAE5B,KAAK,CAAC,mBAAmB,CAAC,UAAU,CAAC,CAAC;QACtC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAVH,kDAiBC;AAhBiB,8BAAU,GAAG,+CAA+C,CAAC;AAY7E;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,8BAAmB,CAAC;8BACrC,8BAAmB;oDAAC;AAG7B;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,0BAA0B,CAAC;8BAC5C,0BAA0B;oDAAC"}
@@ -1,14 +1,12 @@
1
- import { CloudResourceContext } from "../contexts";
1
+ import { AllocationRequestData } from "../types";
2
+ import { CloudSessionContext } from "../contexts";
2
3
  import { LudeoEvent } from "../../infra/ludeo-event";
3
- import { CloudProviderAllocationData } from "../types";
4
4
  export declare class GameAllocatedResponsePayload {
5
- gameResourceId: string;
6
- gamePoolId: string;
7
- allocationData: CloudProviderAllocationData;
5
+ requestData: AllocationRequestData;
8
6
  }
9
7
  export declare class GameAllocatedResponse extends LudeoEvent {
10
- static readonly EVENT_NAME = "cloud-resources.game-allocated-response";
11
- constructor(payload: GameAllocatedResponsePayload, context: CloudResourceContext);
12
- context: CloudResourceContext;
8
+ static readonly EVENT_NAME = "cloud-pools.game-allocated-response";
9
+ constructor(payload: GameAllocatedResponsePayload, context: CloudSessionContext);
10
+ context: CloudSessionContext;
13
11
  payload: GameAllocatedResponsePayload;
14
12
  }
@@ -10,26 +10,17 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.GameAllocatedResponse = exports.GameAllocatedResponsePayload = void 0;
13
- const class_validator_1 = require("class-validator");
13
+ const types_1 = require("../types");
14
14
  const contexts_1 = require("../contexts");
15
15
  const ludeo_event_1 = require("../../infra/ludeo-event");
16
16
  const validate_nested_type_decorator_1 = require("../../decorators/validate-nested-type.decorator");
17
- const types_1 = require("../types");
18
17
  class GameAllocatedResponsePayload {
19
18
  }
20
19
  exports.GameAllocatedResponsePayload = GameAllocatedResponsePayload;
21
20
  __decorate([
22
- (0, class_validator_1.IsUUID)(),
23
- __metadata("design:type", String)
24
- ], GameAllocatedResponsePayload.prototype, "gameResourceId", void 0);
25
- __decorate([
26
- (0, class_validator_1.IsUUID)(),
27
- __metadata("design:type", String)
28
- ], GameAllocatedResponsePayload.prototype, "gamePoolId", void 0);
29
- __decorate([
30
- (0, validate_nested_type_decorator_1.ValidateNestedType)(() => types_1.AwsAllocationData),
31
- __metadata("design:type", Object)
32
- ], GameAllocatedResponsePayload.prototype, "allocationData", void 0);
21
+ (0, validate_nested_type_decorator_1.ValidateNestedType)(() => types_1.AllocationRequestData),
22
+ __metadata("design:type", types_1.AllocationRequestData)
23
+ ], GameAllocatedResponsePayload.prototype, "requestData", void 0);
33
24
  class GameAllocatedResponse extends ludeo_event_1.LudeoEvent {
34
25
  constructor(payload, context) {
35
26
  super(GameAllocatedResponse.EVENT_NAME);
@@ -38,10 +29,10 @@ class GameAllocatedResponse extends ludeo_event_1.LudeoEvent {
38
29
  }
39
30
  }
40
31
  exports.GameAllocatedResponse = GameAllocatedResponse;
41
- GameAllocatedResponse.EVENT_NAME = "cloud-resources.game-allocated-response";
32
+ GameAllocatedResponse.EVENT_NAME = "cloud-pools.game-allocated-response";
42
33
  __decorate([
43
- (0, validate_nested_type_decorator_1.ValidateNestedType)(() => contexts_1.CloudResourceContext),
44
- __metadata("design:type", contexts_1.CloudResourceContext)
34
+ (0, validate_nested_type_decorator_1.ValidateNestedType)(() => contexts_1.CloudSessionContext),
35
+ __metadata("design:type", contexts_1.CloudSessionContext)
45
36
  ], GameAllocatedResponse.prototype, "context", void 0);
46
37
  __decorate([
47
38
  (0, validate_nested_type_decorator_1.ValidateNestedType)(() => GameAllocatedResponsePayload),
@@ -1 +1 @@
1
- {"version":3,"file":"game-allocated-response.js","sourceRoot":"","sources":["../../../src/v3/events/game-allocated-response.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAyC;AAEzC,0CAAmD;AACnD,yDAAqD;AACrD,oGAAqF;AACrF,oCAA0E;AAE1E,MAAa,4BAA4B;CASxC;AATD,oEASC;AAPC;IADC,IAAA,wBAAM,GAAE;;oEACc;AAGvB;IADC,IAAA,wBAAM,GAAE;;gEACU;AAGnB;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,yBAAiB,CAAC;;oEACA;AAG9C,MAAa,qBAAsB,SAAQ,wBAAU;IAGnD,YACE,OAAqC,EACrC,OAA6B;QAE7B,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,yCAAyC,CAAC;AAYvE;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,+BAAoB,CAAC;8BACtC,+BAAoB;sDAAC;AAG9B;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,4BAA4B,CAAC;8BAC9C,4BAA4B;sDAAC"}
1
+ {"version":3,"file":"game-allocated-response.js","sourceRoot":"","sources":["../../../src/v3/events/game-allocated-response.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oCAAiD;AACjD,0CAAkD;AAClD,yDAAqD;AACrD,oGAAqF;AAErF,MAAa,4BAA4B;CAGxC;AAHD,oEAGC;AADC;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,6BAAqB,CAAC;8BACnC,6BAAqB;iEAAC;AAGrC,MAAa,qBAAsB,SAAQ,wBAAU;IAGnD,YACE,OAAqC,EACrC,OAA4B;QAE5B,KAAK,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC;QACxC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAVH,sDAiBC;AAhBiB,gCAAU,GAAG,qCAAqC,CAAC;AAYnE;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,8BAAmB,CAAC;8BACrC,8BAAmB;sDAAC;AAG7B;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,4BAA4B,CAAC;8BAC9C,4BAA4B;sDAAC"}
@@ -0,0 +1,13 @@
1
+ import { AllocationRequestData } from "../types";
2
+ import { CloudSessionContext } from "../contexts";
3
+ import { LudeoEvent } from "../../infra/ludeo-event";
4
+ export declare class GameAllocationFailedResponsePayload {
5
+ requestData: AllocationRequestData;
6
+ errorMessage: string;
7
+ }
8
+ export declare class GameAllocationFailedResponse extends LudeoEvent {
9
+ static readonly EVENT_NAME = "cloud-pools.game-allocation-failed-response";
10
+ constructor(payload: GameAllocationFailedResponsePayload, context: CloudSessionContext);
11
+ context: CloudSessionContext;
12
+ payload: GameAllocationFailedResponsePayload;
13
+ }
@@ -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.GameAllocationFailedResponse = exports.GameAllocationFailedResponsePayload = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ const types_1 = require("../types");
15
+ const contexts_1 = require("../contexts");
16
+ const ludeo_event_1 = require("../../infra/ludeo-event");
17
+ const validate_nested_type_decorator_1 = require("../../decorators/validate-nested-type.decorator");
18
+ class GameAllocationFailedResponsePayload {
19
+ }
20
+ exports.GameAllocationFailedResponsePayload = GameAllocationFailedResponsePayload;
21
+ __decorate([
22
+ (0, validate_nested_type_decorator_1.ValidateNestedType)(() => types_1.AllocationRequestData),
23
+ __metadata("design:type", types_1.AllocationRequestData)
24
+ ], GameAllocationFailedResponsePayload.prototype, "requestData", void 0);
25
+ __decorate([
26
+ (0, class_validator_1.IsString)(),
27
+ __metadata("design:type", String)
28
+ ], GameAllocationFailedResponsePayload.prototype, "errorMessage", void 0);
29
+ class GameAllocationFailedResponse extends ludeo_event_1.LudeoEvent {
30
+ constructor(payload, context) {
31
+ super(GameAllocationFailedResponse.EVENT_NAME);
32
+ this.payload = payload;
33
+ this.context = context;
34
+ }
35
+ }
36
+ exports.GameAllocationFailedResponse = GameAllocationFailedResponse;
37
+ GameAllocationFailedResponse.EVENT_NAME = "cloud-pools.game-allocation-failed-response";
38
+ __decorate([
39
+ (0, validate_nested_type_decorator_1.ValidateNestedType)(() => contexts_1.CloudSessionContext),
40
+ __metadata("design:type", contexts_1.CloudSessionContext)
41
+ ], GameAllocationFailedResponse.prototype, "context", void 0);
42
+ __decorate([
43
+ (0, validate_nested_type_decorator_1.ValidateNestedType)(() => GameAllocationFailedResponsePayload),
44
+ __metadata("design:type", GameAllocationFailedResponsePayload)
45
+ ], GameAllocationFailedResponse.prototype, "payload", void 0);
46
+ //# sourceMappingURL=game-allocation-failed-response.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"game-allocation-failed-response.js","sourceRoot":"","sources":["../../../src/v3/events/game-allocation-failed-response.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA2C;AAE3C,oCAAiD;AACjD,0CAAkD;AAClD,yDAAqD;AACrD,oGAAqF;AAErF,MAAa,mCAAmC;CAM/C;AAND,kFAMC;AAJC;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,6BAAqB,CAAC;8BACnC,6BAAqB;wEAAC;AAGnC;IADC,IAAA,0BAAQ,GAAE;;yEACU;AAGvB,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,6CAA6C,CAAC;AAY3E;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,8BAAmB,CAAC;8BACrC,8BAAmB;6DAAC;AAG7B;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,mCAAmC,CAAC;8BACrD,mCAAmC;6DAAC"}
@@ -1,14 +1,14 @@
1
1
  import { CloudResourceContext } from "../contexts";
2
2
  import { LudeoEvent } from "../../infra/ludeo-event";
3
3
  import { CloudProviderAllocationData } from "../types";
4
- export declare class GameAllocatedResponsePayload {
4
+ export declare class GameResourceAllocatedResponsePayload {
5
5
  gameResourceId: string;
6
6
  gamePoolId: string;
7
7
  allocationData: CloudProviderAllocationData;
8
8
  }
9
9
  export declare class GameResourceAllocatedResponse extends LudeoEvent {
10
10
  static readonly EVENT_NAME = "cloud-resources.game-resource-allocated-response";
11
- constructor(payload: GameAllocatedResponsePayload, context: CloudResourceContext);
11
+ constructor(payload: GameResourceAllocatedResponsePayload, context: CloudResourceContext);
12
12
  context: CloudResourceContext;
13
- payload: GameAllocatedResponsePayload;
13
+ payload: GameResourceAllocatedResponsePayload;
14
14
  }
@@ -9,27 +9,27 @@ 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.GameResourceAllocatedResponse = exports.GameAllocatedResponsePayload = void 0;
12
+ exports.GameResourceAllocatedResponse = exports.GameResourceAllocatedResponsePayload = void 0;
13
13
  const class_validator_1 = require("class-validator");
14
14
  const contexts_1 = require("../contexts");
15
15
  const ludeo_event_1 = require("../../infra/ludeo-event");
16
16
  const validate_nested_type_decorator_1 = require("../../decorators/validate-nested-type.decorator");
17
17
  const types_1 = require("../types");
18
- class GameAllocatedResponsePayload {
18
+ class GameResourceAllocatedResponsePayload {
19
19
  }
20
- exports.GameAllocatedResponsePayload = GameAllocatedResponsePayload;
20
+ exports.GameResourceAllocatedResponsePayload = GameResourceAllocatedResponsePayload;
21
21
  __decorate([
22
22
  (0, class_validator_1.IsUUID)(),
23
23
  __metadata("design:type", String)
24
- ], GameAllocatedResponsePayload.prototype, "gameResourceId", void 0);
24
+ ], GameResourceAllocatedResponsePayload.prototype, "gameResourceId", void 0);
25
25
  __decorate([
26
26
  (0, class_validator_1.IsUUID)(),
27
27
  __metadata("design:type", String)
28
- ], GameAllocatedResponsePayload.prototype, "gamePoolId", void 0);
28
+ ], GameResourceAllocatedResponsePayload.prototype, "gamePoolId", void 0);
29
29
  __decorate([
30
30
  (0, validate_nested_type_decorator_1.ValidateNestedType)(() => types_1.AwsAllocationData),
31
31
  __metadata("design:type", Object)
32
- ], GameAllocatedResponsePayload.prototype, "allocationData", void 0);
32
+ ], GameResourceAllocatedResponsePayload.prototype, "allocationData", void 0);
33
33
  class GameResourceAllocatedResponse extends ludeo_event_1.LudeoEvent {
34
34
  constructor(payload, context) {
35
35
  super(GameResourceAllocatedResponse.EVENT_NAME);
@@ -44,7 +44,7 @@ __decorate([
44
44
  __metadata("design:type", contexts_1.CloudResourceContext)
45
45
  ], GameResourceAllocatedResponse.prototype, "context", void 0);
46
46
  __decorate([
47
- (0, validate_nested_type_decorator_1.ValidateNestedType)(() => GameAllocatedResponsePayload),
48
- __metadata("design:type", GameAllocatedResponsePayload)
47
+ (0, validate_nested_type_decorator_1.ValidateNestedType)(() => GameResourceAllocatedResponsePayload),
48
+ __metadata("design:type", GameResourceAllocatedResponsePayload)
49
49
  ], GameResourceAllocatedResponse.prototype, "payload", void 0);
50
50
  //# sourceMappingURL=game-resource-allocated-response.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"game-resource-allocated-response.js","sourceRoot":"","sources":["../../../src/v3/events/game-resource-allocated-response.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAyC;AAEzC,0CAAmD;AACnD,yDAAqD;AACrD,oGAAqF;AACrF,oCAA0E;AAE1E,MAAa,4BAA4B;CASxC;AATD,oEASC;AAPC;IADC,IAAA,wBAAM,GAAE;;oEACc;AAGvB;IADC,IAAA,wBAAM,GAAE;;gEACU;AAGnB;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,yBAAiB,CAAC;;oEACA;AAG9C,MAAa,6BAA8B,SAAQ,wBAAU;IAI3D,YACE,OAAqC,EACrC,OAA6B;QAE7B,KAAK,CAAC,6BAA6B,CAAC,UAAU,CAAC,CAAC;QAChD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAXH,sEAkBC;AAjBiB,wCAAU,GACxB,kDAAkD,CAAC;AAYrD;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,+BAAoB,CAAC;8BACtC,+BAAoB;8DAAC;AAG9B;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,4BAA4B,CAAC;8BAC9C,4BAA4B;8DAAC"}
1
+ {"version":3,"file":"game-resource-allocated-response.js","sourceRoot":"","sources":["../../../src/v3/events/game-resource-allocated-response.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAyC;AAEzC,0CAAmD;AACnD,yDAAqD;AACrD,oGAAqF;AACrF,oCAA0E;AAE1E,MAAa,oCAAoC;CAShD;AATD,oFASC;AAPC;IADC,IAAA,wBAAM,GAAE;;4EACc;AAGvB;IADC,IAAA,wBAAM,GAAE;;wEACU;AAGnB;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,yBAAiB,CAAC;;4EACA;AAG9C,MAAa,6BAA8B,SAAQ,wBAAU;IAI3D,YACE,OAA6C,EAC7C,OAA6B;QAE7B,KAAK,CAAC,6BAA6B,CAAC,UAAU,CAAC,CAAC;QAChD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAXH,sEAkBC;AAjBiB,wCAAU,GACxB,kDAAkD,CAAC;AAYrD;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,+BAAoB,CAAC;8BACtC,+BAAoB;8DAAC;AAG9B;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,oCAAoC,CAAC;8BACtD,oCAAoC;8DAAC"}
@@ -7,6 +7,8 @@ export * from "./create-machine-resource-batch-request";
7
7
  export * from "./create-machine-resource-request";
8
8
  export * from "./create-machines-request";
9
9
  export * from "./deallocate-machine-request";
10
+ export * from "./game-allocated-response";
11
+ export * from "./game-allocation-failed-response";
10
12
  export * from "./game-resource-allocated-response";
11
13
  export * from "./game-resource-allocation-failed-response";
12
14
  export * from "./game-resource-created-response";
@@ -23,6 +23,8 @@ __exportStar(require("./create-machine-resource-batch-request"), exports);
23
23
  __exportStar(require("./create-machine-resource-request"), exports);
24
24
  __exportStar(require("./create-machines-request"), exports);
25
25
  __exportStar(require("./deallocate-machine-request"), exports);
26
+ __exportStar(require("./game-allocated-response"), exports);
27
+ __exportStar(require("./game-allocation-failed-response"), exports);
26
28
  __exportStar(require("./game-resource-allocated-response"), exports);
27
29
  __exportStar(require("./game-resource-allocation-failed-response"), exports);
28
30
  __exportStar(require("./game-resource-created-response"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/v3/events/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,mEAAiD;AACjD,6DAA2C;AAC3C,iEAA+C;AAC/C,yDAAuC;AACvC,0EAAwD;AACxD,oEAAkD;AAClD,4DAA0C;AAC1C,+DAA6C;AAC7C,qEAAmD;AACnD,6EAA2D;AAC3D,mEAAiD;AACjD,2EAAyD;AACzD,sEAAoD;AACpD,8EAA4D;AAC5D,iEAA+C;AAC/C,+DAA6C;AAC7C,uEAAqD;AACrD,iEAA+C;AAC/C,yEAAuD;AACvD,+DAA6C;AAC7C,sEAAoD;AACpD,8EAA4D;AAC5D,+DAA6C;AAC7C,mDAAiC;AACjC,oEAAkD;AAClD,4DAA0C;AAC1C,6EAA2D;AAC3D,+DAA6C;AAC7C,4DAA0C;AAC1C,mEAAiD;AACjD,+DAA6C;AAC7C,sEAAoD;AACpD,yDAAuC;AACvC,8DAA4C;AAC5C,6DAA2C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/v3/events/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,mEAAiD;AACjD,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,iEAA+C;AAC/C,+DAA6C;AAC7C,uEAAqD;AACrD,iEAA+C;AAC/C,yEAAuD;AACvD,+DAA6C;AAC7C,sEAAoD;AACpD,8EAA4D;AAC5D,+DAA6C;AAC7C,mDAAiC;AACjC,oEAAkD;AAClD,4DAA0C;AAC1C,6EAA2D;AAC3D,+DAA6C;AAC7C,4DAA0C;AAC1C,mEAAiD;AACjD,+DAA6C;AAC7C,sEAAoD;AACpD,yDAAuC;AACvC,8DAA4C;AAC5C,6DAA2C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ludeo/cloud-common",
3
- "version": "1.1.49",
3
+ "version": "1.1.51",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "author": "Yahil Didi",
@@ -6,9 +6,6 @@ import { LudeoEvent } from "../../infra/ludeo-event";
6
6
  import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
7
7
 
8
8
  export class AllocateGameRequestPayload {
9
- @IsUUID()
10
- gameResourceId: string;
11
-
12
9
  @IsUUID()
13
10
  gamePoolId: string;
14
11
 
@@ -0,0 +1,28 @@
1
+ import { AllocationRequestData } from "../types";
2
+ import { CloudSessionContext } from "../contexts";
3
+ import { LudeoEvent } from "../../infra/ludeo-event";
4
+ import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
5
+
6
+ export class GameAllocatedResponsePayload {
7
+ @ValidateNestedType(() => AllocationRequestData)
8
+ requestData: AllocationRequestData;
9
+ }
10
+
11
+ export class GameAllocatedResponse extends LudeoEvent {
12
+ static readonly EVENT_NAME = "cloud-pools.game-allocated-response";
13
+
14
+ constructor(
15
+ payload: GameAllocatedResponsePayload,
16
+ context: CloudSessionContext
17
+ ) {
18
+ super(GameAllocatedResponse.EVENT_NAME);
19
+ this.payload = payload;
20
+ this.context = context;
21
+ }
22
+
23
+ @ValidateNestedType(() => CloudSessionContext)
24
+ context: CloudSessionContext;
25
+
26
+ @ValidateNestedType(() => GameAllocatedResponsePayload)
27
+ payload: GameAllocatedResponsePayload;
28
+ }
@@ -0,0 +1,33 @@
1
+ import { IsString } from "class-validator";
2
+
3
+ import { AllocationRequestData } from "../types";
4
+ import { CloudSessionContext } from "../contexts";
5
+ import { LudeoEvent } from "../../infra/ludeo-event";
6
+ import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
7
+
8
+ export class GameAllocationFailedResponsePayload {
9
+ @ValidateNestedType(() => AllocationRequestData)
10
+ requestData: AllocationRequestData;
11
+
12
+ @IsString()
13
+ errorMessage: string;
14
+ }
15
+
16
+ export class GameAllocationFailedResponse extends LudeoEvent {
17
+ static readonly EVENT_NAME = "cloud-pools.game-allocation-failed-response";
18
+
19
+ constructor(
20
+ payload: GameAllocationFailedResponsePayload,
21
+ context: CloudSessionContext
22
+ ) {
23
+ super(GameAllocationFailedResponse.EVENT_NAME);
24
+ this.payload = payload;
25
+ this.context = context;
26
+ }
27
+
28
+ @ValidateNestedType(() => CloudSessionContext)
29
+ context: CloudSessionContext;
30
+
31
+ @ValidateNestedType(() => GameAllocationFailedResponsePayload)
32
+ payload: GameAllocationFailedResponsePayload;
33
+ }
@@ -5,7 +5,7 @@ import { LudeoEvent } from "../../infra/ludeo-event";
5
5
  import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
6
6
  import { AwsAllocationData, CloudProviderAllocationData } from "../types";
7
7
 
8
- export class GameAllocatedResponsePayload {
8
+ export class GameResourceAllocatedResponsePayload {
9
9
  @IsUUID()
10
10
  gameResourceId: string;
11
11
 
@@ -21,7 +21,7 @@ export class GameResourceAllocatedResponse extends LudeoEvent {
21
21
  "cloud-resources.game-resource-allocated-response";
22
22
 
23
23
  constructor(
24
- payload: GameAllocatedResponsePayload,
24
+ payload: GameResourceAllocatedResponsePayload,
25
25
  context: CloudResourceContext
26
26
  ) {
27
27
  super(GameResourceAllocatedResponse.EVENT_NAME);
@@ -32,6 +32,6 @@ export class GameResourceAllocatedResponse extends LudeoEvent {
32
32
  @ValidateNestedType(() => CloudResourceContext)
33
33
  context: CloudResourceContext;
34
34
 
35
- @ValidateNestedType(() => GameAllocatedResponsePayload)
36
- payload: GameAllocatedResponsePayload;
35
+ @ValidateNestedType(() => GameResourceAllocatedResponsePayload)
36
+ payload: GameResourceAllocatedResponsePayload;
37
37
  }
@@ -7,6 +7,8 @@ export * from "./create-machine-resource-batch-request";
7
7
  export * from "./create-machine-resource-request";
8
8
  export * from "./create-machines-request";
9
9
  export * from "./deallocate-machine-request";
10
+ export * from "./game-allocated-response";
11
+ export * from "./game-allocation-failed-response";
10
12
  export * from "./game-resource-allocated-response";
11
13
  export * from "./game-resource-allocation-failed-response";
12
14
  export * from "./game-resource-created-response";