@ludeo/cloud-common 1.1.110 → 1.1.112-beta-yahil

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,8 +1,14 @@
1
1
  import { LudeoEvent } from "../../infra/ludeo-event";
2
2
  import { CloudSessionContext } from "../contexts";
3
+ export declare class CloudSessionEndedPayload {
4
+ cloudSessionId: string;
5
+ gameId: string;
6
+ userId: string;
7
+ gameResourceId: string;
8
+ }
3
9
  export declare class CloudSessionEnded extends LudeoEvent {
4
10
  static readonly EVENT_NAME = "cloud-sessions.cloud-session-ended";
5
- constructor(payload: {}, context: CloudSessionContext);
11
+ constructor(payload: CloudSessionEndedPayload, context: CloudSessionContext);
6
12
  context: CloudSessionContext;
7
- payload: {};
13
+ payload: CloudSessionEndedPayload;
8
14
  }
@@ -9,10 +9,30 @@ 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.CloudSessionEnded = void 0;
12
+ exports.CloudSessionEnded = exports.CloudSessionEndedPayload = void 0;
13
13
  const validate_nested_type_decorator_1 = require("../../decorators/validate-nested-type.decorator");
14
14
  const ludeo_event_1 = require("../../infra/ludeo-event");
15
15
  const contexts_1 = require("../contexts");
16
+ const class_validator_1 = require("class-validator");
17
+ class CloudSessionEndedPayload {
18
+ }
19
+ exports.CloudSessionEndedPayload = CloudSessionEndedPayload;
20
+ __decorate([
21
+ (0, class_validator_1.IsUUID)(),
22
+ __metadata("design:type", String)
23
+ ], CloudSessionEndedPayload.prototype, "cloudSessionId", void 0);
24
+ __decorate([
25
+ (0, class_validator_1.IsUUID)(),
26
+ __metadata("design:type", String)
27
+ ], CloudSessionEndedPayload.prototype, "gameId", void 0);
28
+ __decorate([
29
+ (0, class_validator_1.IsUUID)(),
30
+ __metadata("design:type", String)
31
+ ], CloudSessionEndedPayload.prototype, "userId", void 0);
32
+ __decorate([
33
+ (0, class_validator_1.IsUUID)(),
34
+ __metadata("design:type", String)
35
+ ], CloudSessionEndedPayload.prototype, "gameResourceId", void 0);
16
36
  class CloudSessionEnded extends ludeo_event_1.LudeoEvent {
17
37
  constructor(payload, context) {
18
38
  super(CloudSessionEnded.EVENT_NAME);
@@ -26,4 +46,8 @@ __decorate([
26
46
  (0, validate_nested_type_decorator_1.ValidateNestedType)(() => contexts_1.CloudSessionContext),
27
47
  __metadata("design:type", contexts_1.CloudSessionContext)
28
48
  ], CloudSessionEnded.prototype, "context", void 0);
49
+ __decorate([
50
+ (0, validate_nested_type_decorator_1.ValidateNestedType)(() => CloudSessionEndedPayload),
51
+ __metadata("design:type", CloudSessionEndedPayload)
52
+ ], CloudSessionEnded.prototype, "payload", void 0);
29
53
  //# sourceMappingURL=cloud-session-ended.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cloud-session-ended.js","sourceRoot":"","sources":["../../../src/v3/events/cloud-session-ended.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oGAAqF;AACrF,yDAAqD;AACrD,0CAAkD;AAElD,MAAa,iBAAkB,SAAQ,wBAAU;IAG/C,YAAY,OAAW,EAAE,OAA4B;QACnD,KAAK,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC;QACpC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAPH,8CAaC;AAZiB,4BAAU,GAAG,oCAAoC,CAAC;AASlE;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,8BAAmB,CAAC;8BACrC,8BAAmB;kDAAC"}
1
+ {"version":3,"file":"cloud-session-ended.js","sourceRoot":"","sources":["../../../src/v3/events/cloud-session-ended.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oGAAqF;AACrF,yDAAqD;AACrD,0CAAkD;AAClD,qDAAyC;AAEzC,MAAa,wBAAwB;CAYpC;AAZD,4DAYC;AAVC;IADC,IAAA,wBAAM,GAAE;;gEACc;AAGvB;IADC,IAAA,wBAAM,GAAE;;wDACM;AAGf;IADC,IAAA,wBAAM,GAAE;;wDACM;AAGf;IADC,IAAA,wBAAM,GAAE;;gEACc;AAGzB,MAAa,iBAAkB,SAAQ,wBAAU;IAG/C,YAAY,OAAiC,EAAE,OAA4B;QACzE,KAAK,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC;QACpC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAPH,8CAcC;AAbiB,4BAAU,GAAG,oCAAoC,CAAC;AASlE;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,8BAAmB,CAAC;8BACrC,8BAAmB;kDAAC;AAG7B;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,wBAAwB,CAAC;8BAC1C,wBAAwB;kDAAC"}
@@ -1,6 +1,7 @@
1
1
  export * from "./allocate-game-request";
2
2
  export * from "./allocate-game-resource-request";
3
3
  export * from "./allocate-machine-request";
4
+ export * from "./cloud-machine-auth-ready";
4
5
  export * from "./create-game-resource-request";
5
6
  export * from "./create-games-request";
6
7
  export * from "./create-machine-resource-batch-request";
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./allocate-game-request"), exports);
18
18
  __exportStar(require("./allocate-game-resource-request"), exports);
19
19
  __exportStar(require("./allocate-machine-request"), exports);
20
+ __exportStar(require("./cloud-machine-auth-ready"), exports);
20
21
  __exportStar(require("./create-game-resource-request"), exports);
21
22
  __exportStar(require("./create-games-request"), exports);
22
23
  __exportStar(require("./create-machine-resource-batch-request"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/v3/events/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,mEAAiD;AACjD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,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"}
@@ -4,6 +4,7 @@ export declare class BaseCloudResource {
4
4
  id: string;
5
5
  status: CloudResourceStatus;
6
6
  createdAt: number;
7
+ poolId: string;
7
8
  updatedAt?: number;
8
9
  settings?: AWSResourceProviderSettings;
9
10
  }
@@ -29,6 +29,10 @@ __decorate([
29
29
  (0, class_validator_1.IsNumber)(),
30
30
  __metadata("design:type", Number)
31
31
  ], BaseCloudResource.prototype, "createdAt", void 0);
32
+ __decorate([
33
+ (0, class_validator_1.IsUUID)(),
34
+ __metadata("design:type", String)
35
+ ], BaseCloudResource.prototype, "poolId", void 0);
32
36
  __decorate([
33
37
  (0, class_validator_1.IsNumber)(),
34
38
  (0, class_validator_1.IsOptional)(),
@@ -1 +1 @@
1
- {"version":3,"file":"base.js","sourceRoot":"","sources":["../../../../../src/v3/types/pools/resource/base.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAuE;AAEvE,qCAA+C;AAC/C,uCAA0D;AAC1D,uDAA4D;AAE5D,MAAa,iBAAiB;CAgB7B;AAhBD,8CAgBC;AAdC;IADC,IAAA,wBAAM,GAAE;;6CACE;AAGX;IADC,IAAA,wBAAM,EAAC,4BAAmB,CAAC;;iDACA;AAG5B;IADC,IAAA,0BAAQ,GAAE;;oDACO;AAIlB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;oDACM;AAGnB;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,mCAA2B,CAAC;8BAC3C,mCAA2B;mDAAC"}
1
+ {"version":3,"file":"base.js","sourceRoot":"","sources":["../../../../../src/v3/types/pools/resource/base.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAuE;AAEvE,qCAA+C;AAC/C,uCAA0D;AAC1D,uDAA4D;AAE5D,MAAa,iBAAiB;CAmB7B;AAnBD,8CAmBC;AAjBC;IADC,IAAA,wBAAM,GAAE;;6CACE;AAGX;IADC,IAAA,wBAAM,EAAC,4BAAmB,CAAC;;iDACA;AAG5B;IADC,IAAA,0BAAQ,GAAE;;oDACO;AAGlB;IADC,IAAA,wBAAM,GAAE;;iDACM;AAIf;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;oDACM;AAGnB;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,mCAA2B,CAAC;8BAC3C,mCAA2B;mDAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ludeo/cloud-common",
3
- "version": "1.1.110",
3
+ "version": "1.1.112-beta-yahil",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "author": "Yahil Didi",
@@ -1,11 +1,26 @@
1
1
  import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
2
2
  import { LudeoEvent } from "../../infra/ludeo-event";
3
3
  import { CloudSessionContext } from "../contexts";
4
+ import { IsUUID } from "class-validator";
5
+
6
+ export class CloudSessionEndedPayload {
7
+ @IsUUID()
8
+ cloudSessionId: string;
9
+
10
+ @IsUUID()
11
+ gameId: string;
12
+
13
+ @IsUUID()
14
+ userId: string;
15
+
16
+ @IsUUID()
17
+ gameResourceId: string;
18
+ }
4
19
 
5
20
  export class CloudSessionEnded extends LudeoEvent {
6
21
  static readonly EVENT_NAME = "cloud-sessions.cloud-session-ended";
7
22
 
8
- constructor(payload: {}, context: CloudSessionContext) {
23
+ constructor(payload: CloudSessionEndedPayload, context: CloudSessionContext) {
9
24
  super(CloudSessionEnded.EVENT_NAME);
10
25
  this.context = context;
11
26
  this.payload = payload;
@@ -14,5 +29,6 @@ export class CloudSessionEnded extends LudeoEvent {
14
29
  @ValidateNestedType(() => CloudSessionContext)
15
30
  context: CloudSessionContext;
16
31
 
17
- payload: {};
32
+ @ValidateNestedType(() => CloudSessionEndedPayload)
33
+ payload: CloudSessionEndedPayload;
18
34
  }
@@ -1,6 +1,7 @@
1
1
  export * from "./allocate-game-request";
2
2
  export * from "./allocate-game-resource-request";
3
3
  export * from "./allocate-machine-request";
4
+ export * from "./cloud-machine-auth-ready";
4
5
  export * from "./create-game-resource-request";
5
6
  export * from "./create-games-request";
6
7
  export * from "./create-machine-resource-batch-request";
@@ -14,6 +14,9 @@ export class BaseCloudResource {
14
14
  @IsNumber()
15
15
  createdAt: number;
16
16
 
17
+ @IsUUID()
18
+ poolId: string;
19
+
17
20
  @IsNumber()
18
21
  @IsOptional()
19
22
  updatedAt?: number;