@ludeo/cloud-common 1.2.211 → 1.2.213
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/events/activation/activation-created.d.ts +12 -0
- package/dist/v4/events/activation/activation-created.js +36 -0
- package/dist/v4/events/activation/activation-created.js.map +1 -0
- package/dist/v4/events/activation/activation-deleted.d.ts +12 -0
- package/dist/v4/events/activation/activation-deleted.js +36 -0
- package/dist/v4/events/activation/activation-deleted.js.map +1 -0
- package/dist/v4/events/activation/activation-saved.d.ts +13 -0
- package/dist/v4/events/activation/activation-saved.js +42 -0
- package/dist/v4/events/activation/activation-saved.js.map +1 -0
- package/dist/v4/events/activation/activation-updated.d.ts +12 -0
- package/dist/v4/events/activation/activation-updated.js +36 -0
- package/dist/v4/events/activation/activation-updated.js.map +1 -0
- package/dist/v4/events/activation/game-activation-action-created.d.ts +12 -0
- package/dist/v4/events/activation/game-activation-action-created.js +36 -0
- package/dist/v4/events/activation/game-activation-action-created.js.map +1 -0
- package/dist/v4/events/activation/game-activation-action-deleted.d.ts +12 -0
- package/dist/v4/events/activation/game-activation-action-deleted.js +36 -0
- package/dist/v4/events/activation/game-activation-action-deleted.js.map +1 -0
- package/dist/v4/events/activation/game-activation-action-updated.d.ts +12 -0
- package/dist/v4/events/activation/game-activation-action-updated.js +36 -0
- package/dist/v4/events/activation/game-activation-action-updated.js.map +1 -0
- package/dist/v4/events/activation/index.d.ts +7 -0
- package/dist/v4/events/activation/index.js +24 -0
- package/dist/v4/events/activation/index.js.map +1 -0
- package/dist/v4/events/forecast/forecast-ended.d.ts +5 -10
- package/dist/v4/events/forecast/forecast-ended.js +20 -13
- package/dist/v4/events/forecast/forecast-ended.js.map +1 -1
- package/dist/v4/events/index.d.ts +1 -0
- package/dist/v4/events/index.js +1 -0
- package/dist/v4/events/index.js.map +1 -1
- package/dist/v4/types/cloud/activation.d.ts +26 -0
- package/dist/v4/types/cloud/activation.js +85 -0
- package/dist/v4/types/cloud/activation.js.map +1 -0
- package/dist/v4/types/cloud/game-activation-action.d.ts +19 -0
- package/dist/v4/types/cloud/game-activation-action.js +71 -0
- package/dist/v4/types/cloud/game-activation-action.js.map +1 -0
- package/dist/v4/types/cloud/index.d.ts +2 -0
- package/dist/v4/types/cloud/index.js +2 -0
- package/dist/v4/types/cloud/index.js.map +1 -1
- package/package.json +1 -1
- package/src/v4/events/activation/activation-created.ts +23 -0
- package/src/v4/events/activation/activation-deleted.ts +23 -0
- package/src/v4/events/activation/activation-saved.ts +28 -0
- package/src/v4/events/activation/activation-updated.ts +23 -0
- package/src/v4/events/activation/game-activation-action-created.ts +23 -0
- package/src/v4/events/activation/game-activation-action-deleted.ts +23 -0
- package/src/v4/events/activation/game-activation-action-updated.ts +23 -0
- package/src/v4/events/activation/index.ts +7 -0
- package/src/v4/events/forecast/forecast-ended.ts +14 -14
- package/src/v4/events/index.ts +1 -0
- package/src/v4/types/cloud/activation.ts +65 -0
- package/src/v4/types/cloud/game-activation-action.ts +52 -0
- package/src/v4/types/cloud/index.ts +2 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.Activation = exports.ActivationType = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
var ActivationType;
|
|
15
|
+
(function (ActivationType) {
|
|
16
|
+
ActivationType["SOCIAL_CAMPAIGN"] = "SOCIAL_CAMPAIGN";
|
|
17
|
+
ActivationType["CONFERENCE"] = "CONFERENCE";
|
|
18
|
+
ActivationType["INFLUENCER"] = "INFLUENCER";
|
|
19
|
+
ActivationType["NEWSLETTER"] = "NEWSLETTER";
|
|
20
|
+
ActivationType["DEMO"] = "DEMO";
|
|
21
|
+
ActivationType["DARE_DROP"] = "DARE_DROP";
|
|
22
|
+
ActivationType["LUDEOS_ON_STOREFRONT"] = "LUDEOS_ON_STOREFRONT";
|
|
23
|
+
ActivationType["TEST_REQUEST"] = "TEST_REQUEST";
|
|
24
|
+
})(ActivationType || (exports.ActivationType = ActivationType = {}));
|
|
25
|
+
class Activation {
|
|
26
|
+
}
|
|
27
|
+
exports.Activation = Activation;
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, class_validator_1.IsUUID)(),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], Activation.prototype, "id", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, class_validator_1.IsString)(),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], Activation.prototype, "name", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, class_validator_1.IsString)(),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], Activation.prototype, "initiator", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, class_validator_1.IsEnum)(ActivationType),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], Activation.prototype, "type", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, class_validator_1.IsOptional)(),
|
|
46
|
+
__metadata("design:type", Object)
|
|
47
|
+
], Activation.prototype, "input", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, class_validator_1.IsString)(),
|
|
50
|
+
__metadata("design:type", String)
|
|
51
|
+
], Activation.prototype, "userName", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, class_validator_1.IsUUID)(),
|
|
54
|
+
__metadata("design:type", String)
|
|
55
|
+
], Activation.prototype, "activationUserId", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, class_validator_1.IsNumber)(),
|
|
58
|
+
__metadata("design:type", Number)
|
|
59
|
+
], Activation.prototype, "startDate", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, class_validator_1.IsNumber)(),
|
|
62
|
+
__metadata("design:type", Number)
|
|
63
|
+
], Activation.prototype, "endDate", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, class_validator_1.IsNumber)(),
|
|
66
|
+
__metadata("design:type", Number)
|
|
67
|
+
], Activation.prototype, "duration", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, class_validator_1.IsArray)(),
|
|
70
|
+
(0, class_validator_1.IsString)({ each: true }),
|
|
71
|
+
__metadata("design:type", Array)
|
|
72
|
+
], Activation.prototype, "permittedUsers", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, class_validator_1.IsString)(),
|
|
75
|
+
__metadata("design:type", String)
|
|
76
|
+
], Activation.prototype, "nickname", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
(0, class_validator_1.IsNumber)(),
|
|
79
|
+
__metadata("design:type", Number)
|
|
80
|
+
], Activation.prototype, "createdAt", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
(0, class_validator_1.IsNumber)(),
|
|
83
|
+
__metadata("design:type", Number)
|
|
84
|
+
], Activation.prototype, "updatedAt", void 0);
|
|
85
|
+
//# sourceMappingURL=activation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"activation.js","sourceRoot":"","sources":["../../../../src/v4/types/cloud/activation.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAOyB;AAGzB,IAAY,cASX;AATD,WAAY,cAAc;IACxB,qDAAmC,CAAA;IACnC,2CAAyB,CAAA;IACzB,2CAAyB,CAAA;IACzB,2CAAyB,CAAA;IACzB,+BAAa,CAAA;IACb,yCAAuB,CAAA;IACvB,+DAA6C,CAAA;IAC7C,+CAA6B,CAAA;AAC/B,CAAC,EATW,cAAc,8BAAd,cAAc,QASzB;AAED,MAAa,UAAU;CA2CtB;AA3CD,gCA2CC;AAzCC;IADC,IAAA,wBAAM,GAAE;;sCACE;AAGX;IADC,IAAA,0BAAQ,GAAE;;wCACE;AAGb;IADC,IAAA,0BAAQ,GAAE;;6CACO;AAGlB;IADC,IAAA,wBAAM,EAAC,cAAc,CAAC;;wCACF;AAGrB;IADC,IAAA,4BAAU,GAAE;;yCACD;AAGZ;IADC,IAAA,0BAAQ,GAAE;;4CACM;AAGjB;IADC,IAAA,wBAAM,GAAE;;oDACgB;AAGzB;IADC,IAAA,0BAAQ,GAAE;;6CACO;AAGlB;IADC,IAAA,0BAAQ,GAAE;;2CACK;AAGhB;IADC,IAAA,0BAAQ,GAAE;;4CACM;AAIjB;IAFC,IAAA,yBAAO,GAAE;IACT,IAAA,0BAAQ,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;kDACA;AAGzB;IADC,IAAA,0BAAQ,GAAE;;4CACM;AAGjB;IADC,IAAA,0BAAQ,GAAE;;6CACO;AAGlB;IADC,IAAA,0BAAQ,GAAE;;6CACO"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare enum ActionType {
|
|
2
|
+
GAME_ACTIVATION = "GAME_ACTIVATION"
|
|
3
|
+
}
|
|
4
|
+
export declare class RegionData {
|
|
5
|
+
region: string;
|
|
6
|
+
estimatedDemand: number;
|
|
7
|
+
}
|
|
8
|
+
export declare class GameActivationActionData {
|
|
9
|
+
gameId: string;
|
|
10
|
+
gameName?: string;
|
|
11
|
+
ludeoId?: string;
|
|
12
|
+
regions: RegionData[];
|
|
13
|
+
}
|
|
14
|
+
export declare class GameActivationAction {
|
|
15
|
+
id: string;
|
|
16
|
+
activationId: string;
|
|
17
|
+
type: ActionType;
|
|
18
|
+
data: GameActivationActionData;
|
|
19
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.GameActivationAction = exports.GameActivationActionData = exports.RegionData = exports.ActionType = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const decorators_1 = require("../../../decorators");
|
|
15
|
+
var ActionType;
|
|
16
|
+
(function (ActionType) {
|
|
17
|
+
ActionType["GAME_ACTIVATION"] = "GAME_ACTIVATION";
|
|
18
|
+
})(ActionType || (exports.ActionType = ActionType = {}));
|
|
19
|
+
class RegionData {
|
|
20
|
+
}
|
|
21
|
+
exports.RegionData = RegionData;
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, class_validator_1.IsString)(),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], RegionData.prototype, "region", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, class_validator_1.IsNumber)(),
|
|
28
|
+
__metadata("design:type", Number)
|
|
29
|
+
], RegionData.prototype, "estimatedDemand", void 0);
|
|
30
|
+
class GameActivationActionData {
|
|
31
|
+
}
|
|
32
|
+
exports.GameActivationActionData = GameActivationActionData;
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, class_validator_1.IsString)(),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], GameActivationActionData.prototype, "gameId", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, class_validator_1.IsOptional)(),
|
|
39
|
+
(0, class_validator_1.IsString)(),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], GameActivationActionData.prototype, "gameName", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, class_validator_1.IsOptional)(),
|
|
44
|
+
(0, class_validator_1.IsUUID)(),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], GameActivationActionData.prototype, "ludeoId", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, class_validator_1.IsArray)(),
|
|
49
|
+
(0, decorators_1.ValidateNestedType)(() => RegionData),
|
|
50
|
+
__metadata("design:type", Array)
|
|
51
|
+
], GameActivationActionData.prototype, "regions", void 0);
|
|
52
|
+
class GameActivationAction {
|
|
53
|
+
}
|
|
54
|
+
exports.GameActivationAction = GameActivationAction;
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, class_validator_1.IsUUID)(),
|
|
57
|
+
__metadata("design:type", String)
|
|
58
|
+
], GameActivationAction.prototype, "id", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, class_validator_1.IsUUID)(),
|
|
61
|
+
__metadata("design:type", String)
|
|
62
|
+
], GameActivationAction.prototype, "activationId", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, class_validator_1.IsEnum)(ActionType),
|
|
65
|
+
__metadata("design:type", String)
|
|
66
|
+
], GameActivationAction.prototype, "type", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, decorators_1.ValidateNestedType)(() => GameActivationActionData),
|
|
69
|
+
__metadata("design:type", GameActivationActionData)
|
|
70
|
+
], GameActivationAction.prototype, "data", void 0);
|
|
71
|
+
//# sourceMappingURL=game-activation-action.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"game-activation-action.js","sourceRoot":"","sources":["../../../../src/v4/types/cloud/game-activation-action.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAOyB;AACzB,oDAAyD;AAEzD,IAAY,UAEX;AAFD,WAAY,UAAU;IACpB,iDAAmC,CAAA;AACrC,CAAC,EAFW,UAAU,0BAAV,UAAU,QAErB;AAED,MAAa,UAAU;CAMtB;AAND,gCAMC;AAJC;IADC,IAAA,0BAAQ,GAAE;;0CACI;AAGf;IADC,IAAA,0BAAQ,GAAE;;mDACa;AAG1B,MAAa,wBAAwB;CAepC;AAfD,4DAeC;AAbC;IADC,IAAA,0BAAQ,GAAE;;wDACI;AAIf;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;0DACO;AAIlB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;yDACQ;AAIjB;IAFC,IAAA,yBAAO,GAAE;IACT,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,UAAU,CAAC;;yDACf;AAGxB,MAAa,oBAAoB;CAYhC;AAZD,oDAYC;AAVC;IADC,IAAA,wBAAM,GAAE;;gDACE;AAGX;IADC,IAAA,wBAAM,GAAE;;0DACY;AAGrB;IADC,IAAA,wBAAM,EAAC,UAAU,CAAC;;kDACF;AAGjB;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,wBAAwB,CAAC;8BAC7C,wBAAwB;kDAAC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
export * from "./activation";
|
|
1
2
|
export * from "./allocation-data";
|
|
2
3
|
export * from "./allocation-request";
|
|
3
4
|
export * from "./aws";
|
|
5
|
+
export * from "./game-activation-action";
|
|
4
6
|
export * from "./game-creation-response";
|
|
5
7
|
export * from "./provider-request";
|
|
6
8
|
export * from "./provider-settings";
|
|
@@ -14,9 +14,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./activation"), exports);
|
|
17
18
|
__exportStar(require("./allocation-data"), exports);
|
|
18
19
|
__exportStar(require("./allocation-request"), exports);
|
|
19
20
|
__exportStar(require("./aws"), exports);
|
|
21
|
+
__exportStar(require("./game-activation-action"), exports);
|
|
20
22
|
__exportStar(require("./game-creation-response"), exports);
|
|
21
23
|
__exportStar(require("./provider-request"), exports);
|
|
22
24
|
__exportStar(require("./provider-settings"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/v4/types/cloud/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,uDAAqC;AACrC,wCAAsB;AACtB,2DAAyC;AACzC,qDAAmC;AACnC,sDAAoC;AACpC,6CAA2B;AAC3B,+DAA6C;AAC7C,4CAA0B;AAC1B,yCAAuB;AACvB,8DAA4C;AAC5C,8CAA4B;AAC5B,iEAA+C;AAC/C,iDAA+B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/v4/types/cloud/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,oDAAkC;AAClC,uDAAqC;AACrC,wCAAsB;AACtB,2DAAyC;AACzC,2DAAyC;AACzC,qDAAmC;AACnC,sDAAoC;AACpC,6CAA2B;AAC3B,+DAA6C;AAC7C,4CAA0B;AAC1B,yCAAuB;AACvB,8DAA4C;AAC5C,8CAA4B;AAC5B,iEAA+C;AAC/C,iDAA+B"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { LudeoEvent } from "../../../infra";
|
|
2
|
+
import { ValidateNestedType } from "../../../decorators";
|
|
3
|
+
import { Activation } from "../../types/cloud/activation";
|
|
4
|
+
|
|
5
|
+
export class ActivationCreatedPayload {
|
|
6
|
+
@ValidateNestedType(() => Activation)
|
|
7
|
+
activation: Activation;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export class ActivationCreated extends LudeoEvent {
|
|
11
|
+
static readonly EVENT_NAME = "activations.activation-created";
|
|
12
|
+
eventVersion = "4.0";
|
|
13
|
+
|
|
14
|
+
constructor(payload: ActivationCreatedPayload) {
|
|
15
|
+
super(ActivationCreated.EVENT_NAME);
|
|
16
|
+
this.payload = payload;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@ValidateNestedType(() => ActivationCreatedPayload)
|
|
20
|
+
payload: ActivationCreatedPayload;
|
|
21
|
+
|
|
22
|
+
context: never;
|
|
23
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { LudeoEvent } from "../../../infra";
|
|
2
|
+
import { ValidateNestedType } from "../../../decorators";
|
|
3
|
+
import { Activation } from "../../types/cloud/activation";
|
|
4
|
+
|
|
5
|
+
export class ActivationDeletedPayload {
|
|
6
|
+
@ValidateNestedType(() => Activation)
|
|
7
|
+
activation: Activation;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export class ActivationDeleted extends LudeoEvent {
|
|
11
|
+
static readonly EVENT_NAME = "activations.activation-deleted";
|
|
12
|
+
eventVersion = "4.0";
|
|
13
|
+
|
|
14
|
+
constructor(payload: ActivationDeletedPayload) {
|
|
15
|
+
super(ActivationDeleted.EVENT_NAME);
|
|
16
|
+
this.payload = payload;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@ValidateNestedType(() => ActivationDeletedPayload)
|
|
20
|
+
payload: ActivationDeletedPayload;
|
|
21
|
+
|
|
22
|
+
context: never;
|
|
23
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { IsArray, IsString } from "class-validator";
|
|
2
|
+
import { LudeoEvent } from "../../../infra";
|
|
3
|
+
import { ValidateNestedType } from "../../../decorators";
|
|
4
|
+
import { Activation } from "../../types/cloud/activation";
|
|
5
|
+
|
|
6
|
+
export class ActivationSavedPayload {
|
|
7
|
+
@ValidateNestedType(() => Activation)
|
|
8
|
+
activation: Activation;
|
|
9
|
+
|
|
10
|
+
@IsArray()
|
|
11
|
+
@IsString({ each: true })
|
|
12
|
+
ludeos: string[];
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export class ActivationSaved extends LudeoEvent {
|
|
16
|
+
static readonly EVENT_NAME = "activations.activation-saved";
|
|
17
|
+
eventVersion = "4.0";
|
|
18
|
+
|
|
19
|
+
constructor(payload: ActivationSavedPayload) {
|
|
20
|
+
super(ActivationSaved.EVENT_NAME);
|
|
21
|
+
this.payload = payload;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@ValidateNestedType(() => ActivationSavedPayload)
|
|
25
|
+
payload: ActivationSavedPayload;
|
|
26
|
+
|
|
27
|
+
context: never;
|
|
28
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { LudeoEvent } from "../../../infra";
|
|
2
|
+
import { ValidateNestedType } from "../../../decorators";
|
|
3
|
+
import { Activation } from "../../types/cloud/activation";
|
|
4
|
+
|
|
5
|
+
export class ActivationUpdatedPayload {
|
|
6
|
+
@ValidateNestedType(() => Activation)
|
|
7
|
+
activation: Activation;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export class ActivationUpdated extends LudeoEvent {
|
|
11
|
+
static readonly EVENT_NAME = "activations.activation-updated";
|
|
12
|
+
eventVersion = "4.0";
|
|
13
|
+
|
|
14
|
+
constructor(payload: ActivationUpdatedPayload) {
|
|
15
|
+
super(ActivationUpdated.EVENT_NAME);
|
|
16
|
+
this.payload = payload;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@ValidateNestedType(() => ActivationUpdatedPayload)
|
|
20
|
+
payload: ActivationUpdatedPayload;
|
|
21
|
+
|
|
22
|
+
context: never;
|
|
23
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { LudeoEvent } from "../../../infra";
|
|
2
|
+
import { ValidateNestedType } from "../../../decorators";
|
|
3
|
+
import { GameActivationAction } from "../../types/cloud/game-activation-action";
|
|
4
|
+
|
|
5
|
+
export class GameActivationActionCreatedPayload {
|
|
6
|
+
@ValidateNestedType(() => GameActivationAction)
|
|
7
|
+
action: GameActivationAction;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export class GameActivationActionCreated extends LudeoEvent {
|
|
11
|
+
static readonly EVENT_NAME = "activations.game-activation-action-created";
|
|
12
|
+
eventVersion = "4.0";
|
|
13
|
+
|
|
14
|
+
constructor(payload: GameActivationActionCreatedPayload) {
|
|
15
|
+
super(GameActivationActionCreated.EVENT_NAME);
|
|
16
|
+
this.payload = payload;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@ValidateNestedType(() => GameActivationActionCreatedPayload)
|
|
20
|
+
payload: GameActivationActionCreatedPayload;
|
|
21
|
+
|
|
22
|
+
context: never;
|
|
23
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { LudeoEvent } from "../../../infra";
|
|
2
|
+
import { ValidateNestedType } from "../../../decorators";
|
|
3
|
+
import { GameActivationAction } from "../../types/cloud/game-activation-action";
|
|
4
|
+
|
|
5
|
+
export class GameActivationActionDeletedPayload {
|
|
6
|
+
@ValidateNestedType(() => GameActivationAction)
|
|
7
|
+
action: GameActivationAction;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export class GameActivationActionDeleted extends LudeoEvent {
|
|
11
|
+
static readonly EVENT_NAME = "activations.game-activation-action-deleted";
|
|
12
|
+
eventVersion = "4.0";
|
|
13
|
+
|
|
14
|
+
constructor(payload: GameActivationActionDeletedPayload) {
|
|
15
|
+
super(GameActivationActionDeleted.EVENT_NAME);
|
|
16
|
+
this.payload = payload;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@ValidateNestedType(() => GameActivationActionDeletedPayload)
|
|
20
|
+
payload: GameActivationActionDeletedPayload;
|
|
21
|
+
|
|
22
|
+
context: never;
|
|
23
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { LudeoEvent } from "../../../infra";
|
|
2
|
+
import { ValidateNestedType } from "../../../decorators";
|
|
3
|
+
import { GameActivationAction } from "../../types/cloud/game-activation-action";
|
|
4
|
+
|
|
5
|
+
export class GameActivationActionUpdatedPayload {
|
|
6
|
+
@ValidateNestedType(() => GameActivationAction)
|
|
7
|
+
action: GameActivationAction;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export class GameActivationActionUpdated extends LudeoEvent {
|
|
11
|
+
static readonly EVENT_NAME = "activations.game-activation-action-updated";
|
|
12
|
+
eventVersion = "4.0";
|
|
13
|
+
|
|
14
|
+
constructor(payload: GameActivationActionUpdatedPayload) {
|
|
15
|
+
super(GameActivationActionUpdated.EVENT_NAME);
|
|
16
|
+
this.payload = payload;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@ValidateNestedType(() => GameActivationActionUpdatedPayload)
|
|
20
|
+
payload: GameActivationActionUpdatedPayload;
|
|
21
|
+
|
|
22
|
+
context: never;
|
|
23
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from "./activation-created";
|
|
2
|
+
export * from "./activation-saved";
|
|
3
|
+
export * from "./activation-updated";
|
|
4
|
+
export * from "./activation-deleted";
|
|
5
|
+
export * from "./game-activation-action-created";
|
|
6
|
+
export * from "./game-activation-action-updated";
|
|
7
|
+
export * from "./game-activation-action-deleted";
|
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
import { LudeoEvent } from "../../../infra";
|
|
2
2
|
import { ValidateNestedType } from "../../../decorators";
|
|
3
|
-
import { IsDefined, IsNumber, IsOptional } from "class-validator";
|
|
3
|
+
import { IsArray, IsDefined, IsNumber, IsOptional, IsString } from "class-validator";
|
|
4
4
|
import { ForecastContext } from "../../contexts";
|
|
5
5
|
import { LudeoFeatures } from "../../types/predictor";
|
|
6
6
|
|
|
7
|
-
export class
|
|
7
|
+
export class ForecastDemandEntry {
|
|
8
|
+
@IsString()
|
|
9
|
+
location: string;
|
|
10
|
+
|
|
11
|
+
@IsString()
|
|
12
|
+
gameId: string;
|
|
13
|
+
|
|
14
|
+
@IsString()
|
|
15
|
+
majorVersion: string;
|
|
16
|
+
|
|
8
17
|
@IsNumber()
|
|
9
18
|
totalDemand: number;
|
|
10
19
|
|
|
@@ -13,20 +22,11 @@ export class ForecastMajorVersion {
|
|
|
13
22
|
ludeoFeatures?: LudeoFeatures;
|
|
14
23
|
}
|
|
15
24
|
|
|
16
|
-
export class ForecastEnvironment {
|
|
17
|
-
[majorVersion: string]: ForecastMajorVersion;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export class ForecastLocation {
|
|
21
|
-
[envId: string]: ForecastEnvironment;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
25
|
export class ForecastEndedPayload {
|
|
25
26
|
@IsDefined()
|
|
26
|
-
@
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
};
|
|
27
|
+
@IsArray()
|
|
28
|
+
@ValidateNestedType(() => ForecastDemandEntry)
|
|
29
|
+
forecasts: ForecastDemandEntry[];
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
export class ForecastEnded extends LudeoEvent {
|
package/src/v4/events/index.ts
CHANGED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import {
|
|
2
|
+
IsUUID,
|
|
3
|
+
IsNumber,
|
|
4
|
+
IsString,
|
|
5
|
+
IsEnum,
|
|
6
|
+
IsOptional,
|
|
7
|
+
IsArray,
|
|
8
|
+
} from "class-validator";
|
|
9
|
+
import { ValidateNestedType } from "../../../decorators";
|
|
10
|
+
|
|
11
|
+
export enum ActivationType {
|
|
12
|
+
SOCIAL_CAMPAIGN = "SOCIAL_CAMPAIGN",
|
|
13
|
+
CONFERENCE = "CONFERENCE",
|
|
14
|
+
INFLUENCER = "INFLUENCER",
|
|
15
|
+
NEWSLETTER = "NEWSLETTER",
|
|
16
|
+
DEMO = "DEMO",
|
|
17
|
+
DARE_DROP = "DARE_DROP",
|
|
18
|
+
LUDEOS_ON_STOREFRONT = "LUDEOS_ON_STOREFRONT",
|
|
19
|
+
TEST_REQUEST = "TEST_REQUEST",
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export class Activation {
|
|
23
|
+
@IsUUID()
|
|
24
|
+
id: string;
|
|
25
|
+
|
|
26
|
+
@IsString()
|
|
27
|
+
name: string;
|
|
28
|
+
|
|
29
|
+
@IsString()
|
|
30
|
+
initiator: string;
|
|
31
|
+
|
|
32
|
+
@IsEnum(ActivationType)
|
|
33
|
+
type: ActivationType;
|
|
34
|
+
|
|
35
|
+
@IsOptional()
|
|
36
|
+
input?: any;
|
|
37
|
+
|
|
38
|
+
@IsString()
|
|
39
|
+
userName: string;
|
|
40
|
+
|
|
41
|
+
@IsUUID()
|
|
42
|
+
activationUserId: string;
|
|
43
|
+
|
|
44
|
+
@IsNumber()
|
|
45
|
+
startDate: number;
|
|
46
|
+
|
|
47
|
+
@IsNumber()
|
|
48
|
+
endDate: number;
|
|
49
|
+
|
|
50
|
+
@IsNumber()
|
|
51
|
+
duration: number;
|
|
52
|
+
|
|
53
|
+
@IsArray()
|
|
54
|
+
@IsString({ each: true })
|
|
55
|
+
permittedUsers: string[];
|
|
56
|
+
|
|
57
|
+
@IsString()
|
|
58
|
+
nickname: string;
|
|
59
|
+
|
|
60
|
+
@IsNumber()
|
|
61
|
+
createdAt: number;
|
|
62
|
+
|
|
63
|
+
@IsNumber()
|
|
64
|
+
updatedAt: number;
|
|
65
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import {
|
|
2
|
+
IsUUID,
|
|
3
|
+
IsString,
|
|
4
|
+
IsEnum,
|
|
5
|
+
IsOptional,
|
|
6
|
+
IsArray,
|
|
7
|
+
IsNumber,
|
|
8
|
+
} from "class-validator";
|
|
9
|
+
import { ValidateNestedType } from "../../../decorators";
|
|
10
|
+
|
|
11
|
+
export enum ActionType {
|
|
12
|
+
GAME_ACTIVATION = "GAME_ACTIVATION",
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export class RegionData {
|
|
16
|
+
@IsString()
|
|
17
|
+
region: string;
|
|
18
|
+
|
|
19
|
+
@IsNumber()
|
|
20
|
+
estimatedDemand: number;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export class GameActivationActionData {
|
|
24
|
+
@IsString()
|
|
25
|
+
gameId: string;
|
|
26
|
+
|
|
27
|
+
@IsOptional()
|
|
28
|
+
@IsString()
|
|
29
|
+
gameName?: string;
|
|
30
|
+
|
|
31
|
+
@IsOptional()
|
|
32
|
+
@IsUUID()
|
|
33
|
+
ludeoId?: string;
|
|
34
|
+
|
|
35
|
+
@IsArray()
|
|
36
|
+
@ValidateNestedType(() => RegionData)
|
|
37
|
+
regions: RegionData[];
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export class GameActivationAction {
|
|
41
|
+
@IsUUID()
|
|
42
|
+
id: string;
|
|
43
|
+
|
|
44
|
+
@IsUUID()
|
|
45
|
+
activationId: string;
|
|
46
|
+
|
|
47
|
+
@IsEnum(ActionType)
|
|
48
|
+
type: ActionType;
|
|
49
|
+
|
|
50
|
+
@ValidateNestedType(() => GameActivationActionData)
|
|
51
|
+
data: GameActivationActionData;
|
|
52
|
+
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
export * from "./activation";
|
|
1
2
|
export * from "./allocation-data";
|
|
2
3
|
export * from "./allocation-request";
|
|
3
4
|
export * from "./aws";
|
|
5
|
+
export * from "./game-activation-action";
|
|
4
6
|
export * from "./game-creation-response";
|
|
5
7
|
export * from "./provider-request";
|
|
6
8
|
export * from "./provider-settings";
|