@ludeo/cloud-common 1.2.53-dodsheli → 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,20 +1,19 @@
1
1
  import { LudeoEvent } from "../../infra/ludeo-event";
2
- import { CloudResourcesStatusMap, BasePoolAttributes, LudeoPoolAttributes, MachinePoolAttributes } from "../types";
3
- import { GamePoolAttributes } from "../../v3/types";
4
- export declare class PoolStatusEventBasePool<T extends BasePoolAttributes = BasePoolAttributes> {
5
- attributes: T;
2
+ import { CloudResourcesStatusMap, BasePoolAttributes } from "../types";
3
+ export declare class PoolStatusEventBasePool {
4
+ attributes: BasePoolAttributes;
6
5
  statusMap: CloudResourcesStatusMap;
7
6
  poolId: string;
8
7
  }
9
- export declare class PoolStatusEventLudeoPool extends PoolStatusEventBasePool<LudeoPoolAttributes> {
8
+ export declare class PoolStatusEventLudeoPool extends PoolStatusEventBasePool {
10
9
  gamePoolId: string;
11
10
  ludeoId: string;
12
11
  }
13
- export declare class PoolStatusEventGamePool extends PoolStatusEventBasePool<GamePoolAttributes> {
12
+ export declare class PoolStatusEventGamePool extends PoolStatusEventBasePool {
14
13
  machinePoolId: string;
15
14
  ludeos: PoolStatusEventLudeoPool[];
16
15
  }
17
- export declare class PoolStatusEventMachinePool extends PoolStatusEventBasePool<MachinePoolAttributes> {
16
+ export declare class PoolStatusEventMachinePool extends PoolStatusEventBasePool {
18
17
  games: PoolStatusEventGamePool[];
19
18
  }
20
19
  export declare class PoolStatusEventPayload {
@@ -19,7 +19,7 @@ class PoolStatusEventBasePool {
19
19
  exports.PoolStatusEventBasePool = PoolStatusEventBasePool;
20
20
  __decorate([
21
21
  (0, validate_nested_type_decorator_1.ValidateNestedType)(() => types_1.BasePoolAttributes),
22
- __metadata("design:type", Object)
22
+ __metadata("design:type", types_1.BasePoolAttributes)
23
23
  ], PoolStatusEventBasePool.prototype, "attributes", void 0);
24
24
  __decorate([
25
25
  (0, class_validator_1.IsUUID)(),
@@ -1 +1 @@
1
- {"version":3,"file":"pool-status.js","sourceRoot":"","sources":["../../../src/v4/events/pool-status.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAyC;AAEzC,yDAAqD;AACrD,oCAKkB;AAClB,oGAAqF;AAGrF,MAAa,uBAAuB;CAUnC;AAVD,0DAUC;AANC;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,0BAAkB,CAAC;;2DAC/B;AAKd;IADC,IAAA,wBAAM,GAAE;;uDACM;AAGjB,MAAa,wBAAyB,SAAQ,uBAA4C;CAMzF;AAND,4DAMC;AAJC;IADC,IAAA,wBAAM,GAAE;;4DACU;AAGnB;IADC,IAAA,wBAAM,GAAE;;yDACO;AAGlB,MAAa,uBAAwB,SAAQ,uBAA2C;CAKvF;AALD,0DAKC;AAHC;IADC,IAAA,wBAAM,GAAE;;8DACa;AAKxB,MAAa,0BAA2B,SAAQ,uBAA8C;CAE7F;AAFD,gEAEC;AAED,MAAa,sBAAsB;CAKlC;AALD,wDAKC;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/v4/events/pool-status.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAyC;AAEzC,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,wBAAyB,SAAQ,uBAAuB;CAMpE;AAND,4DAMC;AAJC;IADC,IAAA,wBAAM,GAAE;;4DACU;AAGnB;IADC,IAAA,wBAAM,GAAE;;yDACO;AAGlB,MAAa,uBAAwB,SAAQ,uBAAuB;CAKnE;AALD,0DAKC;AAHC;IADC,IAAA,wBAAM,GAAE;;8DACa;AAKxB,MAAa,0BAA2B,SAAQ,uBAAuB;CAEtE;AAFD,gEAEC;AAED,MAAa,sBAAsB;CAKlC;AALD,wDAKC;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,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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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.53-dodsheli",
3
+ "version": "1.2.53",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "author": "Yahil Didi",
@@ -1,20 +1,12 @@
1
1
  import { IsUUID } from "class-validator";
2
2
 
3
3
  import { LudeoEvent } from "../../infra/ludeo-event";
4
- import {
5
- CloudResourcesStatusMap,
6
- BasePoolAttributes,
7
- LudeoPoolAttributes,
8
- MachinePoolAttributes,
9
- } from "../types";
4
+ import { CloudResourcesStatusMap, BasePoolAttributes } from "../types";
10
5
  import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
11
- import { GamePoolAttributes } from "../../v3/types";
12
6
 
13
- export class PoolStatusEventBasePool<
14
- T extends BasePoolAttributes = BasePoolAttributes,
15
- > {
7
+ export class PoolStatusEventBasePool {
16
8
  @ValidateNestedType(() => BasePoolAttributes)
17
- attributes: T;
9
+ attributes: BasePoolAttributes;
18
10
 
19
11
  statusMap: CloudResourcesStatusMap;
20
12
 
@@ -22,7 +14,7 @@ export class PoolStatusEventBasePool<
22
14
  poolId: string;
23
15
  }
24
16
 
25
- export class PoolStatusEventLudeoPool extends PoolStatusEventBasePool<LudeoPoolAttributes> {
17
+ export class PoolStatusEventLudeoPool extends PoolStatusEventBasePool {
26
18
  @IsUUID()
27
19
  gamePoolId: string;
28
20
 
@@ -30,14 +22,14 @@ export class PoolStatusEventLudeoPool extends PoolStatusEventBasePool<LudeoPoolA
30
22
  ludeoId: string;
31
23
  }
32
24
 
33
- export class PoolStatusEventGamePool extends PoolStatusEventBasePool<GamePoolAttributes> {
25
+ export class PoolStatusEventGamePool extends PoolStatusEventBasePool {
34
26
  @IsUUID()
35
27
  machinePoolId: string;
36
28
 
37
29
  ludeos: PoolStatusEventLudeoPool[];
38
30
  }
39
31
 
40
- export class PoolStatusEventMachinePool extends PoolStatusEventBasePool<MachinePoolAttributes> {
32
+ export class PoolStatusEventMachinePool extends PoolStatusEventBasePool {
41
33
  games: PoolStatusEventGamePool[];
42
34
  }
43
35
 
@@ -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;