@ludeo/cloud-common 1.2.216 → 1.2.217
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.
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/v4/contexts/forecast-context.d.ts +0 -2
- package/dist/v4/contexts/forecast-context.js +0 -10
- package/dist/v4/contexts/forecast-context.js.map +1 -1
- package/dist/v4/events/forecast/forecast-ended.d.ts +5 -0
- package/dist/v4/events/forecast/forecast-ended.js +19 -1
- package/dist/v4/events/forecast/forecast-ended.js.map +1 -1
- package/package.json +1 -1
- package/src/v4/contexts/forecast-context.ts +1 -9
- package/src/v4/events/forecast/forecast-ended.ts +14 -0
|
@@ -14,16 +14,6 @@ const class_validator_1 = require("class-validator");
|
|
|
14
14
|
class ForecastContext {
|
|
15
15
|
}
|
|
16
16
|
exports.ForecastContext = ForecastContext;
|
|
17
|
-
__decorate([
|
|
18
|
-
(0, class_validator_1.IsOptional)(),
|
|
19
|
-
(0, class_validator_1.IsNumber)(),
|
|
20
|
-
__metadata("design:type", Number)
|
|
21
|
-
], ForecastContext.prototype, "sizeByReservations", void 0);
|
|
22
|
-
__decorate([
|
|
23
|
-
(0, class_validator_1.IsOptional)(),
|
|
24
|
-
(0, class_validator_1.IsNumber)(),
|
|
25
|
-
__metadata("design:type", Number)
|
|
26
|
-
], ForecastContext.prototype, "sizeByUsage", void 0);
|
|
27
17
|
__decorate([
|
|
28
18
|
(0, class_validator_1.IsOptional)(),
|
|
29
19
|
(0, class_validator_1.IsUUID)(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forecast-context.js","sourceRoot":"","sources":["../../../src/v4/contexts/forecast-context.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"forecast-context.js","sourceRoot":"","sources":["../../../src/v4/contexts/forecast-context.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAqD;AAErD,MAAa,eAAe;CAI3B;AAJD,0CAIC;AADC;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;mDACW"}
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { LudeoEvent } from "../../../infra";
|
|
2
2
|
import { ForecastContext } from "../../contexts";
|
|
3
3
|
import { LudeoFeatures } from "../../types/predictor";
|
|
4
|
+
export declare class ForecastDemandMetadata {
|
|
5
|
+
sizeByReservations?: number;
|
|
6
|
+
sizeByUsage?: number;
|
|
7
|
+
}
|
|
4
8
|
export declare class ForecastDemandEntry {
|
|
5
9
|
location: string;
|
|
6
10
|
gameId: string;
|
|
7
11
|
majorVersion: string;
|
|
8
12
|
totalDemand: number;
|
|
13
|
+
metadata?: ForecastDemandMetadata;
|
|
9
14
|
ludeoFeatures?: LudeoFeatures;
|
|
10
15
|
}
|
|
11
16
|
export declare class ForecastEndedPayload {
|
|
@@ -9,12 +9,25 @@ 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.ForecastEnded = exports.ForecastEndedPayload = exports.ForecastDemandEntry = void 0;
|
|
12
|
+
exports.ForecastEnded = exports.ForecastEndedPayload = exports.ForecastDemandEntry = exports.ForecastDemandMetadata = void 0;
|
|
13
13
|
const infra_1 = require("../../../infra");
|
|
14
14
|
const decorators_1 = require("../../../decorators");
|
|
15
15
|
const class_validator_1 = require("class-validator");
|
|
16
16
|
const contexts_1 = require("../../contexts");
|
|
17
17
|
const predictor_1 = require("../../types/predictor");
|
|
18
|
+
class ForecastDemandMetadata {
|
|
19
|
+
}
|
|
20
|
+
exports.ForecastDemandMetadata = ForecastDemandMetadata;
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, class_validator_1.IsOptional)(),
|
|
23
|
+
(0, class_validator_1.IsNumber)(),
|
|
24
|
+
__metadata("design:type", Number)
|
|
25
|
+
], ForecastDemandMetadata.prototype, "sizeByReservations", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, class_validator_1.IsOptional)(),
|
|
28
|
+
(0, class_validator_1.IsNumber)(),
|
|
29
|
+
__metadata("design:type", Number)
|
|
30
|
+
], ForecastDemandMetadata.prototype, "sizeByUsage", void 0);
|
|
18
31
|
class ForecastDemandEntry {
|
|
19
32
|
}
|
|
20
33
|
exports.ForecastDemandEntry = ForecastDemandEntry;
|
|
@@ -34,6 +47,11 @@ __decorate([
|
|
|
34
47
|
(0, class_validator_1.IsNumber)(),
|
|
35
48
|
__metadata("design:type", Number)
|
|
36
49
|
], ForecastDemandEntry.prototype, "totalDemand", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, class_validator_1.IsOptional)(),
|
|
52
|
+
(0, decorators_1.ValidateNestedType)(() => ForecastDemandMetadata),
|
|
53
|
+
__metadata("design:type", ForecastDemandMetadata)
|
|
54
|
+
], ForecastDemandEntry.prototype, "metadata", void 0);
|
|
37
55
|
__decorate([
|
|
38
56
|
(0, class_validator_1.IsOptional)(),
|
|
39
57
|
(0, decorators_1.ValidateNestedType)(() => predictor_1.LudeoFeatures),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forecast-ended.js","sourceRoot":"","sources":["../../../../src/v4/events/forecast/forecast-ended.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,0CAA4C;AAC5C,oDAAyD;AACzD,qDAAqF;AACrF,6CAAiD;AACjD,qDAAsD;AAEtD,MAAa,mBAAmB;
|
|
1
|
+
{"version":3,"file":"forecast-ended.js","sourceRoot":"","sources":["../../../../src/v4/events/forecast/forecast-ended.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,0CAA4C;AAC5C,oDAAyD;AACzD,qDAAqF;AACrF,6CAAiD;AACjD,qDAAsD;AAEtD,MAAa,sBAAsB;CAQlC;AARD,wDAQC;AALG;IAFC,IAAA,4BAAU,GAAE;IAC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|
|
3
3
|
export class ForecastContext {
|
|
4
|
-
@IsOptional()
|
|
5
|
-
@IsNumber()
|
|
6
|
-
sizeByReservations?: number;
|
|
7
|
-
|
|
8
|
-
@IsOptional()
|
|
9
|
-
@IsNumber()
|
|
10
|
-
sizeByUsage?: number;
|
|
11
|
-
|
|
12
4
|
@IsOptional()
|
|
13
5
|
@IsUUID()
|
|
14
6
|
forecastId?: string;
|
|
@@ -4,6 +4,16 @@ import { IsArray, IsDefined, IsNumber, IsOptional, IsString } from "class-valida
|
|
|
4
4
|
import { ForecastContext } from "../../contexts";
|
|
5
5
|
import { LudeoFeatures } from "../../types/predictor";
|
|
6
6
|
|
|
7
|
+
export class ForecastDemandMetadata {
|
|
8
|
+
@IsOptional()
|
|
9
|
+
@IsNumber()
|
|
10
|
+
sizeByReservations?: number;
|
|
11
|
+
|
|
12
|
+
@IsOptional()
|
|
13
|
+
@IsNumber()
|
|
14
|
+
sizeByUsage?: number;
|
|
15
|
+
}
|
|
16
|
+
|
|
7
17
|
export class ForecastDemandEntry {
|
|
8
18
|
@IsString()
|
|
9
19
|
location: string;
|
|
@@ -17,6 +27,10 @@ export class ForecastDemandEntry {
|
|
|
17
27
|
@IsNumber()
|
|
18
28
|
totalDemand: number;
|
|
19
29
|
|
|
30
|
+
@IsOptional()
|
|
31
|
+
@ValidateNestedType(() => ForecastDemandMetadata)
|
|
32
|
+
metadata?: ForecastDemandMetadata;
|
|
33
|
+
|
|
20
34
|
@IsOptional()
|
|
21
35
|
@ValidateNestedType(() => LudeoFeatures)
|
|
22
36
|
ludeoFeatures?: LudeoFeatures;
|