@ludeo/cloud-common 1.2.52 → 1.2.53

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,16 +1,18 @@
1
1
  import { LudeoEvent } from "../../infra/ludeo-event";
2
- import { MachinePoolAttributes, GamePoolAttributes } from "../types";
3
- export declare class MachinePoolAttributesWithQuantity extends MachinePoolAttributes {
2
+ export type SetPoolStateEventPoolContext = Record<string, any>;
3
+ export declare class BasePoolAttributesWithQuantity {
4
+ [attribute: string]: any;
4
5
  quantity: number;
5
6
  poolId: string;
6
- reason?: string;
7
- context?: Record<string, string>;
7
+ context?: SetPoolStateEventPoolContext;
8
8
  }
9
- export declare class GamePoolAttributesWithQuantity extends GamePoolAttributes {
10
- quantity: number;
11
- poolId: string;
12
- reason?: string;
13
- context?: Record<string, string>;
9
+ export declare class LudeoPoolAttributesWithQuantity extends BasePoolAttributesWithQuantity {
10
+ }
11
+ export declare class GamePoolAttributesWithQuantity extends BasePoolAttributesWithQuantity {
12
+ ludeos: LudeoPoolAttributesWithQuantity[];
13
+ }
14
+ export declare class MachinePoolAttributesWithQuantity extends BasePoolAttributesWithQuantity {
15
+ games: GamePoolAttributesWithQuantity[];
14
16
  }
15
17
  export declare class SetPoolsStateEventRequestId {
16
18
  poolMonitorRequestId: string;
@@ -18,7 +20,6 @@ export declare class SetPoolsStateEventRequestId {
18
20
  }
19
21
  export declare class SetPoolStateEventPayload {
20
22
  machines: MachinePoolAttributesWithQuantity[];
21
- games: GamePoolAttributesWithQuantity[];
22
23
  requestId?: SetPoolsStateEventRequestId;
23
24
  }
24
25
  export declare class SetPoolsStateEvent extends LudeoEvent {
@@ -9,17 +9,22 @@ 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.SetPoolsStateEvent = exports.SetPoolStateEventPayload = exports.SetPoolsStateEventRequestId = exports.GamePoolAttributesWithQuantity = exports.MachinePoolAttributesWithQuantity = void 0;
12
+ exports.SetPoolsStateEvent = exports.SetPoolStateEventPayload = exports.SetPoolsStateEventRequestId = exports.MachinePoolAttributesWithQuantity = exports.GamePoolAttributesWithQuantity = exports.LudeoPoolAttributesWithQuantity = exports.BasePoolAttributesWithQuantity = void 0;
13
13
  const class_validator_1 = require("class-validator");
14
14
  const ludeo_event_1 = require("../../infra/ludeo-event");
15
- const types_1 = require("../types");
16
15
  const validate_nested_type_decorator_1 = require("../../decorators/validate-nested-type.decorator");
17
- class MachinePoolAttributesWithQuantity extends types_1.MachinePoolAttributes {
16
+ class BasePoolAttributesWithQuantity {
18
17
  }
19
- exports.MachinePoolAttributesWithQuantity = MachinePoolAttributesWithQuantity;
20
- class GamePoolAttributesWithQuantity extends types_1.GamePoolAttributes {
18
+ exports.BasePoolAttributesWithQuantity = BasePoolAttributesWithQuantity;
19
+ class LudeoPoolAttributesWithQuantity extends BasePoolAttributesWithQuantity {
20
+ }
21
+ exports.LudeoPoolAttributesWithQuantity = LudeoPoolAttributesWithQuantity;
22
+ class GamePoolAttributesWithQuantity extends BasePoolAttributesWithQuantity {
21
23
  }
22
24
  exports.GamePoolAttributesWithQuantity = GamePoolAttributesWithQuantity;
25
+ class MachinePoolAttributesWithQuantity extends BasePoolAttributesWithQuantity {
26
+ }
27
+ exports.MachinePoolAttributesWithQuantity = MachinePoolAttributesWithQuantity;
23
28
  class SetPoolsStateEventRequestId {
24
29
  }
25
30
  exports.SetPoolsStateEventRequestId = SetPoolsStateEventRequestId;
@@ -39,11 +44,6 @@ __decorate([
39
44
  (0, validate_nested_type_decorator_1.ValidateNestedType)(() => Array),
40
45
  __metadata("design:type", Array)
41
46
  ], SetPoolStateEventPayload.prototype, "machines", void 0);
42
- __decorate([
43
- (0, class_validator_1.IsArray)(),
44
- (0, validate_nested_type_decorator_1.ValidateNestedType)(() => Array),
45
- __metadata("design:type", Array)
46
- ], SetPoolStateEventPayload.prototype, "games", void 0);
47
47
  __decorate([
48
48
  (0, class_validator_1.IsOptional)(),
49
49
  (0, validate_nested_type_decorator_1.ValidateNestedType)(() => SetPoolsStateEventRequestId),
@@ -1 +1 @@
1
- {"version":3,"file":"set-pools-state.js","sourceRoot":"","sources":["../../../src/v4/events/set-pools-state.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAwE;AAExE,yDAAqD;AACrD,oCAAqE;AACrE,oGAAqF;AAErF,MAAa,iCAAkC,SAAQ,6BAAqB;CAQ3E;AARD,8EAQC;AAED,MAAa,8BAA+B,SAAQ,0BAAkB;CAQrE;AARD,wEAQC;AAED,MAAa,2BAA2B;CAMvC;AAND,kEAMC;AAJC;IADC,IAAA,wBAAM,GAAE;;yEACoB;AAG7B;IADC,IAAA,wBAAM,GAAE;;4EACuB;AAGlC,MAAa,wBAAwB;CAYpC;AAZD,4DAYC;AATC;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"}
1
+ {"version":3,"file":"set-pools-state.js","sourceRoot":"","sources":["../../../src/v4/events/set-pools-state.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA8D;AAE9D,yDAAqD;AACrD,oGAAqF;AAIrF,MAAa,8BAA8B;CAQ1C;AARD,wEAQC;AAED,MAAa,+BAAgC,SAAQ,8BAA8B;CAAG;AAAtF,0EAAsF;AAEtF,MAAa,8BAA+B,SAAQ,8BAA8B;CAEjF;AAFD,wEAEC;AAED,MAAa,iCAAkC,SAAQ,8BAA8B;CAEpF;AAFD,8EAEC;AAED,MAAa,2BAA2B;CAMvC;AAND,kEAMC;AAJC;IADC,IAAA,wBAAM,GAAE;;yEACoB;AAG7B;IADC,IAAA,wBAAM,GAAE;;4EACuB;AAGlC,MAAa,wBAAwB;CAQpC;AARD,4DAQC;AALC;IAFC,IAAA,yBAAO,GAAE;IACT,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,KAAwC,CAAC;;0DACrB;AAI9C;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.2.52",
3
+ "version": "1.2.53",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "author": "Yahil Didi",
@@ -1,27 +1,28 @@
1
- import { IsArray, IsOptional, IsString, IsUUID } from "class-validator";
1
+ import { IsArray, IsOptional, IsUUID } from "class-validator";
2
2
 
3
3
  import { LudeoEvent } from "../../infra/ludeo-event";
4
- import { MachinePoolAttributes, GamePoolAttributes } from "../types";
5
4
  import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
6
5
 
7
- export class MachinePoolAttributesWithQuantity extends MachinePoolAttributes {
6
+ export type SetPoolStateEventPoolContext = Record<string, any>;
7
+
8
+ export class BasePoolAttributesWithQuantity {
9
+ [attribute: string]: any;
10
+
8
11
  quantity: number;
9
12
 
10
13
  poolId: string;
11
14
 
12
- reason?: string; // backward compat
13
-
14
- context?: Record<string, string>;
15
+ context?: SetPoolStateEventPoolContext;
15
16
  }
16
17
 
17
- export class GamePoolAttributesWithQuantity extends GamePoolAttributes {
18
- quantity: number;
19
-
20
- poolId: string;
18
+ export class LudeoPoolAttributesWithQuantity extends BasePoolAttributesWithQuantity {}
21
19
 
22
- reason?: string; // backward compat
20
+ export class GamePoolAttributesWithQuantity extends BasePoolAttributesWithQuantity {
21
+ ludeos: LudeoPoolAttributesWithQuantity[];
22
+ }
23
23
 
24
- context?: Record<string, string>;
24
+ export class MachinePoolAttributesWithQuantity extends BasePoolAttributesWithQuantity {
25
+ games: GamePoolAttributesWithQuantity[];
25
26
  }
26
27
 
27
28
  export class SetPoolsStateEventRequestId {
@@ -37,10 +38,6 @@ export class SetPoolStateEventPayload {
37
38
  @ValidateNestedType(() => Array<MachinePoolAttributesWithQuantity>)
38
39
  machines: MachinePoolAttributesWithQuantity[];
39
40
 
40
- @IsArray()
41
- @ValidateNestedType(() => Array<GamePoolAttributesWithQuantity>)
42
- games: GamePoolAttributesWithQuantity[];
43
-
44
41
  @IsOptional()
45
42
  @ValidateNestedType(() => SetPoolsStateEventRequestId)
46
43
  requestId?: SetPoolsStateEventRequestId;