@ludeo/cloud-common 1.2.245 → 1.2.246
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/cloud-sessions/cloud-session-preempted.d.ts +20 -0
- package/dist/v4/events/cloud-sessions/cloud-session-preempted.js +74 -0
- package/dist/v4/events/cloud-sessions/cloud-session-preempted.js.map +1 -0
- package/dist/v4/events/cloud-sessions/index.d.ts +0 -0
- package/dist/v4/events/cloud-sessions/index.js +1 -0
- package/dist/v4/events/cloud-sessions/index.js.map +1 -0
- package/dist/v4/events/site-controller/machine-ludeocast-preempted.d.ts +1 -0
- package/dist/v4/events/site-controller/machine-ludeocast-preempted.js +5 -0
- package/dist/v4/events/site-controller/machine-ludeocast-preempted.js.map +1 -1
- package/package.json +1 -1
- package/src/v4/events/cloud-sessions/cloud-session-preempted.ts +50 -0
- package/src/v4/events/cloud-sessions/index.ts +0 -0
- package/src/v4/events/site-controller/machine-ludeocast-preempted.ts +4 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { LudeoEvent } from '../../../infra';
|
|
2
|
+
import { CloudSessionContext } from '../../contexts';
|
|
3
|
+
import { CloudSessionStatus } from '../../../v4/types/cloud/session';
|
|
4
|
+
export declare class CloudSessionPreemptedPayload {
|
|
5
|
+
cloudSessionId: string;
|
|
6
|
+
userId: string;
|
|
7
|
+
status: CloudSessionStatus;
|
|
8
|
+
machineResourceId: string;
|
|
9
|
+
machinePoolId: string;
|
|
10
|
+
machineClass: string;
|
|
11
|
+
gameResourceId: string;
|
|
12
|
+
ludeoResourceId: string;
|
|
13
|
+
gracePeriodMs: number;
|
|
14
|
+
}
|
|
15
|
+
export declare class CloudSessionPreempted extends LudeoEvent {
|
|
16
|
+
static readonly EVENT_NAME = "cloud-sessions.cloud-session-preempted";
|
|
17
|
+
constructor(payload: CloudSessionPreemptedPayload, context: CloudSessionContext);
|
|
18
|
+
payload: CloudSessionPreemptedPayload;
|
|
19
|
+
context: CloudSessionContext;
|
|
20
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
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.CloudSessionPreempted = exports.CloudSessionPreemptedPayload = void 0;
|
|
13
|
+
const infra_1 = require("../../../infra");
|
|
14
|
+
const decorators_1 = require("../../../decorators");
|
|
15
|
+
const class_validator_1 = require("class-validator");
|
|
16
|
+
const contexts_1 = require("../../contexts");
|
|
17
|
+
const session_1 = require("../../../v4/types/cloud/session");
|
|
18
|
+
class CloudSessionPreemptedPayload {
|
|
19
|
+
}
|
|
20
|
+
exports.CloudSessionPreemptedPayload = CloudSessionPreemptedPayload;
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, class_validator_1.IsUUID)(),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], CloudSessionPreemptedPayload.prototype, "cloudSessionId", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_validator_1.IsUUID)(),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], CloudSessionPreemptedPayload.prototype, "userId", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, class_validator_1.IsEnum)(session_1.CloudSessionStatus),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], CloudSessionPreemptedPayload.prototype, "status", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, class_validator_1.IsUUID)(),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], CloudSessionPreemptedPayload.prototype, "machineResourceId", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, class_validator_1.IsUUID)(),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], CloudSessionPreemptedPayload.prototype, "machinePoolId", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, class_validator_1.IsString)(),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], CloudSessionPreemptedPayload.prototype, "machineClass", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, class_validator_1.IsUUID)(),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
|
+
], CloudSessionPreemptedPayload.prototype, "gameResourceId", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, class_validator_1.IsUUID)(),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], CloudSessionPreemptedPayload.prototype, "ludeoResourceId", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, class_validator_1.IsNumber)(),
|
|
55
|
+
__metadata("design:type", Number)
|
|
56
|
+
], CloudSessionPreemptedPayload.prototype, "gracePeriodMs", void 0);
|
|
57
|
+
class CloudSessionPreempted extends infra_1.LudeoEvent {
|
|
58
|
+
constructor(payload, context) {
|
|
59
|
+
super(CloudSessionPreempted.EVENT_NAME);
|
|
60
|
+
this.payload = payload;
|
|
61
|
+
this.context = context;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
exports.CloudSessionPreempted = CloudSessionPreempted;
|
|
65
|
+
CloudSessionPreempted.EVENT_NAME = 'cloud-sessions.cloud-session-preempted';
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, decorators_1.ValidateNestedType)(() => CloudSessionPreemptedPayload),
|
|
68
|
+
__metadata("design:type", CloudSessionPreemptedPayload)
|
|
69
|
+
], CloudSessionPreempted.prototype, "payload", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, decorators_1.ValidateNestedType)(() => contexts_1.CloudSessionContext),
|
|
72
|
+
__metadata("design:type", contexts_1.CloudSessionContext)
|
|
73
|
+
], CloudSessionPreempted.prototype, "context", void 0);
|
|
74
|
+
//# sourceMappingURL=cloud-session-preempted.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cloud-session-preempted.js","sourceRoot":"","sources":["../../../../src/v4/events/cloud-sessions/cloud-session-preempted.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,0CAA4C;AAC5C,oDAAyD;AACzD,qDAAqE;AACrE,6CAAqD;AACrD,6DAAqE;AAErE,MAAa,4BAA4B;CA2BxC;AA3BD,oEA2BC;AAzBC;IADC,IAAA,wBAAM,GAAE;;oEACc;AAGvB;IADC,IAAA,wBAAM,GAAE;;4DACM;AAGf;IADC,IAAA,wBAAM,EAAC,4BAAkB,CAAC;;4DACA;AAG3B;IADC,IAAA,wBAAM,GAAE;;uEACiB;AAG1B;IADC,IAAA,wBAAM,GAAE;;mEACa;AAGtB;IADC,IAAA,0BAAQ,GAAE;;kEACU;AAGrB;IADC,IAAA,wBAAM,GAAE;;oEACc;AAGvB;IADC,IAAA,wBAAM,GAAE;;qEACe;AAGxB;IADC,IAAA,0BAAQ,GAAE;;mEACW;AAGxB,MAAa,qBAAsB,SAAQ,kBAAU;IAGnD,YAAY,OAAqC,EAAE,OAA4B;QAC7E,KAAK,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC;QACxC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAPH,sDAcC;AAbiB,gCAAU,GAAG,wCAAwC,CAAC;AAStE;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,4BAA4B,CAAC;8BAC9C,4BAA4B;sDAAC;AAGtC;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,8BAAmB,CAAC;8BACrC,8BAAmB;sDAAC"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/v4/events/cloud-sessions/index.ts"],"names":[],"mappings":""}
|
|
@@ -31,6 +31,11 @@ __decorate([
|
|
|
31
31
|
(0, class_validator_1.IsString)(),
|
|
32
32
|
__metadata("design:type", String)
|
|
33
33
|
], MachineLudeocastPreemptedPayload.prototype, "machineClass", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, class_validator_1.IsOptional)(),
|
|
36
|
+
(0, class_validator_1.IsString)(),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], MachineLudeocastPreemptedPayload.prototype, "region", void 0);
|
|
34
39
|
__decorate([
|
|
35
40
|
(0, class_validator_1.IsOptional)(),
|
|
36
41
|
(0, class_validator_1.IsArray)(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"machine-ludeocast-preempted.js","sourceRoot":"","sources":["../../../../src/v4/events/site-controller/machine-ludeocast-preempted.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,0CAA4C;AAC5C,oDAAyD;AACzD,qDAAkF;AAClF,6CAAsD;AAEtD,MAAa,gCAAgC;
|
|
1
|
+
{"version":3,"file":"machine-ludeocast-preempted.js","sourceRoot":"","sources":["../../../../src/v4/events/site-controller/machine-ludeocast-preempted.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,0CAA4C;AAC5C,oDAAyD;AACzD,qDAAkF;AAClF,6CAAsD;AAEtD,MAAa,gCAAgC;CA2B5C;AA3BD,4EA2BC;AAzBC;IADC,IAAA,wBAAM,GAAE;;2EACiB;AAI1B;IAFC,IAAA,wBAAM,GAAE;IACR,IAAA,4BAAU,GAAE;;uEACU;AAIvB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;sEACW;AAItB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;gEACK;AAIhB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,yBAAO,GAAE;;yEACiB;AAI3B;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;uEACY;AAIvB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;uEACY;AAGzB,MAAa,yBAA0B,SAAQ,kBAAU;IAGvD,YAAY,OAAyC,EAAE,OAA6B;QAClF,KAAK,CAAC,yBAAyB,CAAC,UAAU,CAAC,CAAC;QAC5C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAPH,8DAcC;AAbiB,oCAAU,GAAG,6CAA6C,CAAC;AAS3E;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,gCAAgC,CAAC;8BAClD,gCAAgC;0DAAC;AAG1C;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,+BAAoB,CAAC;8BACtC,+BAAoB;0DAAC"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { LudeoEvent } from '../../../infra';
|
|
2
|
+
import { ValidateNestedType } from '../../../decorators';
|
|
3
|
+
import { IsEnum, IsNumber, IsString, IsUUID } from 'class-validator';
|
|
4
|
+
import { CloudSessionContext } from '../../contexts';
|
|
5
|
+
import { CloudSessionStatus } from '../../../v4/types/cloud/session';
|
|
6
|
+
|
|
7
|
+
export class CloudSessionPreemptedPayload {
|
|
8
|
+
@IsUUID()
|
|
9
|
+
cloudSessionId: string;
|
|
10
|
+
|
|
11
|
+
@IsUUID()
|
|
12
|
+
userId: string;
|
|
13
|
+
|
|
14
|
+
@IsEnum(CloudSessionStatus)
|
|
15
|
+
status: CloudSessionStatus;
|
|
16
|
+
|
|
17
|
+
@IsUUID()
|
|
18
|
+
machineResourceId: string;
|
|
19
|
+
|
|
20
|
+
@IsUUID()
|
|
21
|
+
machinePoolId: string;
|
|
22
|
+
|
|
23
|
+
@IsString()
|
|
24
|
+
machineClass: string;
|
|
25
|
+
|
|
26
|
+
@IsUUID()
|
|
27
|
+
gameResourceId: string;
|
|
28
|
+
|
|
29
|
+
@IsUUID()
|
|
30
|
+
ludeoResourceId: string;
|
|
31
|
+
|
|
32
|
+
@IsNumber()
|
|
33
|
+
gracePeriodMs: number;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export class CloudSessionPreempted extends LudeoEvent {
|
|
37
|
+
static readonly EVENT_NAME = 'cloud-sessions.cloud-session-preempted';
|
|
38
|
+
|
|
39
|
+
constructor(payload: CloudSessionPreemptedPayload, context: CloudSessionContext) {
|
|
40
|
+
super(CloudSessionPreempted.EVENT_NAME);
|
|
41
|
+
this.payload = payload;
|
|
42
|
+
this.context = context;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@ValidateNestedType(() => CloudSessionPreemptedPayload)
|
|
46
|
+
payload: CloudSessionPreemptedPayload;
|
|
47
|
+
|
|
48
|
+
@ValidateNestedType(() => CloudSessionContext)
|
|
49
|
+
context: CloudSessionContext;
|
|
50
|
+
}
|
|
File without changes
|