@ludeo/cloud-common 1.1.67 → 1.1.69

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.
@@ -1,6 +1,7 @@
1
1
  import { CloudSessionContext } from "../contexts/cloud-session-context";
2
2
  import { LudeoEvent } from "../../infra/ludeo-event";
3
3
  export declare class TerminateCloudSessionRequestPayload {
4
+ status?: string;
4
5
  }
5
6
  export declare class TerminateCloudSessionRequestEvent extends LudeoEvent {
6
7
  static readonly EVENT_NAME = "cloud-sessions.terminate-cloud-session-request";
@@ -13,9 +13,15 @@ exports.TerminateCloudSessionRequestEvent = exports.TerminateCloudSessionRequest
13
13
  const cloud_session_context_1 = require("../contexts/cloud-session-context");
14
14
  const validate_nested_type_decorator_1 = require("../../decorators/validate-nested-type.decorator");
15
15
  const ludeo_event_1 = require("../../infra/ludeo-event");
16
+ const class_validator_1 = require("class-validator");
16
17
  class TerminateCloudSessionRequestPayload {
17
18
  }
18
19
  exports.TerminateCloudSessionRequestPayload = TerminateCloudSessionRequestPayload;
20
+ __decorate([
21
+ (0, class_validator_1.IsOptional)(),
22
+ (0, class_validator_1.IsString)(),
23
+ __metadata("design:type", String)
24
+ ], TerminateCloudSessionRequestPayload.prototype, "status", void 0);
19
25
  class TerminateCloudSessionRequestEvent extends ludeo_event_1.LudeoEvent {
20
26
  constructor(payload, context) {
21
27
  super(TerminateCloudSessionRequestEvent.EVENT_NAME);
@@ -1 +1 @@
1
- {"version":3,"file":"terminate-cloud-session-request.event.js","sourceRoot":"","sources":["../../../src/v2/events/terminate-cloud-session-request.event.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6EAAwE;AACxE,oGAAqF;AACrF,yDAAqD;AAErD,MAAa,mCAAmC;CAAG;AAAnD,kFAAmD;AAEnD,MAAa,iCAAkC,SAAQ,wBAAU;IAG/D,YACE,OAA4C,EAC5C,OAA4B;QAE5B,KAAK,CAAC,iCAAiC,CAAC,UAAU,CAAC,CAAC;QACpD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAVH,8EAiBC;AAhBiB,4CAAU,GAAG,gDAAgD,CAAC;AAY9E;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,2CAAmB,CAAC;8BACrC,2CAAmB;kEAAC;AAG7B;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,mCAAmC,CAAC;8BACrD,mCAAmC;kEAAC"}
1
+ {"version":3,"file":"terminate-cloud-session-request.event.js","sourceRoot":"","sources":["../../../src/v2/events/terminate-cloud-session-request.event.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6EAAwE;AACxE,oGAAqF;AACrF,yDAAqD;AACrD,qDAAuD;AAEvD,MAAa,mCAAmC;CAI/C;AAJD,kFAIC;AADC;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;mEACK;AAGlB,MAAa,iCAAkC,SAAQ,wBAAU;IAG/D,YACE,OAA4C,EAC5C,OAA4B;QAE5B,KAAK,CAAC,iCAAiC,CAAC,UAAU,CAAC,CAAC;QACpD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAVH,8EAiBC;AAhBiB,4CAAU,GAAG,gDAAgD,CAAC;AAY9E;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,2CAAmB,CAAC;8BACrC,2CAAmB;kEAAC;AAG7B;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,mCAAmC,CAAC;8BACrD,mCAAmC;kEAAC"}
@@ -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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ludeo/cloud-common",
3
- "version": "1.1.67",
3
+ "version": "1.1.69",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "author": "Yahil Didi",
@@ -1,8 +1,13 @@
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
5
 
5
- export class TerminateCloudSessionRequestPayload {}
6
+ export class TerminateCloudSessionRequestPayload {
7
+ @IsOptional()
8
+ @IsString()
9
+ status?: string;
10
+ }
6
11
 
7
12
  export class TerminateCloudSessionRequestEvent extends LudeoEvent {
8
13
  static readonly EVENT_NAME = "cloud-sessions.terminate-cloud-session-request";
@@ -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;