@ludeo/cloud-common 1.1.134 → 1.1.135

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,12 +1,16 @@
1
1
  import { LudeoEvent } from "../../infra/ludeo-event";
2
2
  import { CloudResourcesStatusMap, BasePoolAttributes } from "../types";
3
- export declare class PoolStatusEventPool {
3
+ export declare class PoolStatusEventBasePool {
4
4
  attributes: BasePoolAttributes;
5
5
  statusMap: CloudResourcesStatusMap;
6
+ poolId: string;
7
+ }
8
+ export declare class PoolStatusEventGamePool extends PoolStatusEventBasePool {
9
+ machinePoolId: string;
6
10
  }
7
11
  export declare class PoolStatusEventPayload {
8
- games: PoolStatusEventPool[];
9
- machines: PoolStatusEventPool[];
12
+ games: PoolStatusEventGamePool[];
13
+ machines: PoolStatusEventBasePool[];
10
14
  requestId: string;
11
15
  }
12
16
  export declare class PoolStatusEvent extends LudeoEvent {
@@ -9,18 +9,29 @@ 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.PoolStatusEvent = exports.PoolStatusEventPayload = exports.PoolStatusEventPool = void 0;
12
+ exports.PoolStatusEvent = exports.PoolStatusEventPayload = exports.PoolStatusEventGamePool = exports.PoolStatusEventBasePool = void 0;
13
13
  const class_validator_1 = require("class-validator");
14
14
  const ludeo_event_1 = require("../../infra/ludeo-event");
15
15
  const types_1 = require("../types");
16
16
  const validate_nested_type_decorator_1 = require("../../decorators/validate-nested-type.decorator");
17
- class PoolStatusEventPool {
17
+ class PoolStatusEventBasePool {
18
18
  }
19
- exports.PoolStatusEventPool = PoolStatusEventPool;
19
+ exports.PoolStatusEventBasePool = PoolStatusEventBasePool;
20
20
  __decorate([
21
21
  (0, validate_nested_type_decorator_1.ValidateNestedType)(() => types_1.BasePoolAttributes),
22
22
  __metadata("design:type", types_1.BasePoolAttributes)
23
- ], PoolStatusEventPool.prototype, "attributes", void 0);
23
+ ], PoolStatusEventBasePool.prototype, "attributes", void 0);
24
+ __decorate([
25
+ (0, class_validator_1.IsUUID)(),
26
+ __metadata("design:type", String)
27
+ ], PoolStatusEventBasePool.prototype, "poolId", void 0);
28
+ class PoolStatusEventGamePool extends PoolStatusEventBasePool {
29
+ }
30
+ exports.PoolStatusEventGamePool = PoolStatusEventGamePool;
31
+ __decorate([
32
+ (0, class_validator_1.IsUUID)(),
33
+ __metadata("design:type", String)
34
+ ], PoolStatusEventGamePool.prototype, "machinePoolId", void 0);
24
35
  class PoolStatusEventPayload {
25
36
  }
26
37
  exports.PoolStatusEventPayload = PoolStatusEventPayload;
@@ -1 +1 @@
1
- {"version":3,"file":"pool-status.js","sourceRoot":"","sources":["../../../src/v3/events/pool-status.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAyC;AAEzC,yDAAqD;AACrD,oCAAuE;AACvE,oGAAqF;AAKrF,MAAa,mBAAmB;CAK/B;AALD,kDAKC;AAHC;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,0BAAkB,CAAC;8BACjC,0BAAkB;uDAAC;AAKjC,MAAa,sBAAsB;CAOlC;AAPD,wDAOC;AADC;IADC,IAAA,wBAAM,GAAE;;yDACS;AAGpB,MAAa,eAAgB,SAAQ,wBAAU;IAG7C,YAAY,OAA+B;QACzC,KAAK,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;QAClC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AANH,0CAUC;AATiB,0BAAU,GAAG,yBAAyB,CAAC;AAQvD;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,sBAAsB,CAAC;8BACxC,sBAAsB;gDAAC"}
1
+ {"version":3,"file":"pool-status.js","sourceRoot":"","sources":["../../../src/v3/events/pool-status.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAmD;AAEnD,yDAAqD;AACrD,oCAAuE;AACvE,oGAAqF;AAErF,MAAa,uBAAuB;CAQnC;AARD,0DAQC;AANC;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,0BAAkB,CAAC;8BACjC,0BAAkB;2DAAC;AAK/B;IADC,IAAA,wBAAM,GAAE;;uDACM;AAGjB,MAAa,uBAAwB,SAAQ,uBAAuB;CAGnE;AAHD,0DAGC;AADC;IADC,IAAA,wBAAM,GAAE;;8DACa;AAGxB,MAAa,sBAAsB;CAOlC;AAPD,wDAOC;AADC;IADC,IAAA,wBAAM,GAAE;;yDACS;AAGpB,MAAa,eAAgB,SAAQ,wBAAU;IAG7C,YAAY,OAA+B;QACzC,KAAK,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;QAClC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AANH,0CAUC;AATiB,0BAAU,GAAG,yBAAyB,CAAC;AAQvD;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,sBAAsB,CAAC;8BACxC,sBAAsB;gDAAC"}
@@ -2,9 +2,13 @@ import { LudeoEvent } from "../../infra/ludeo-event";
2
2
  import { MachinePoolAttributes, GamePoolAttributes } from "../types";
3
3
  export declare class MachinePoolAttributesWithQuantity extends MachinePoolAttributes {
4
4
  quantity: number;
5
+ poolId: string;
6
+ reason?: string;
5
7
  }
6
8
  export declare class GamePoolAttributesWithQuantity extends GamePoolAttributes {
7
9
  quantity: number;
10
+ poolId: string;
11
+ reason?: string;
8
12
  }
9
13
  export declare class SetPoolsStateEventRequestId {
10
14
  poolMonitorRequestId: string;
@@ -1 +1 @@
1
- {"version":3,"file":"set-pools-state.js","sourceRoot":"","sources":["../../../src/v3/events/set-pools-state.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAwE;AAExE,yDAAqD;AACrD,oCAAqE;AACrE,oGAAqF;AAErF,MAAa,iCAAkC,SAAQ,6BAAqB;CAE3E;AAFD,8EAEC;AAED,MAAa,8BA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;IAFC,IAAA,yBAAO,GAAE;IACT,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,KAAwC,CAAC;;0DACrB;AAI9C;IAFC,IAAA,yBAAO,GAAE;IACT,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,KAAqC,CAAC;;uDACxB;AAIxC;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,2BAA2B,CAAC;8BAC1C,2BAA2B;2DAAC;AAG1C,MAAa,kBAAmB,SAAQ,wBAAU;IAGhD,YAAY,OAAiC;QAC3C,KAAK,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC;QACrC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AANH,gDAUC;AATiB,6BAAU,GAAG,2BAA2B,CAAC;AAQzD;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,wBAAwB,CAAC;8BAC1C,wBAAwB;mDAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ludeo/cloud-common",
3
- "version": "1.1.134",
3
+ "version": "1.1.135",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "author": "Yahil Didi",
@@ -1,23 +1,28 @@
1
- import { IsUUID } from "class-validator";
1
+ import { IsString, IsUUID } from "class-validator";
2
2
 
3
3
  import { LudeoEvent } from "../../infra/ludeo-event";
4
4
  import { CloudResourcesStatusMap, BasePoolAttributes } from "../types";
5
5
  import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
6
6
 
7
- /**
8
- * Will be used later on in a newer version of the predictor
9
- */
10
- export class PoolStatusEventPool {
7
+ export class PoolStatusEventBasePool {
11
8
  @ValidateNestedType(() => BasePoolAttributes)
12
9
  attributes: BasePoolAttributes;
13
10
 
14
11
  statusMap: CloudResourcesStatusMap;
12
+
13
+ @IsUUID()
14
+ poolId: string;
15
+ }
16
+
17
+ export class PoolStatusEventGamePool extends PoolStatusEventBasePool {
18
+ @IsUUID()
19
+ machinePoolId: string;
15
20
  }
16
21
 
17
22
  export class PoolStatusEventPayload {
18
- games: PoolStatusEventPool[];
23
+ games: PoolStatusEventGamePool[];
19
24
 
20
- machines: PoolStatusEventPool[];
25
+ machines: PoolStatusEventBasePool[];
21
26
 
22
27
  @IsUUID()
23
28
  requestId: string;
@@ -6,10 +6,18 @@ import { ValidateNestedType } from "../../decorators/validate-nested-type.decora
6
6
 
7
7
  export class MachinePoolAttributesWithQuantity extends MachinePoolAttributes {
8
8
  quantity: number;
9
+
10
+ poolId: string;
11
+
12
+ reason?: string;
9
13
  }
10
14
 
11
15
  export class GamePoolAttributesWithQuantity extends GamePoolAttributes {
12
16
  quantity: number;
17
+
18
+ poolId: string;
19
+
20
+ reason?: string;
13
21
  }
14
22
 
15
23
  export class SetPoolsStateEventRequestId {