@ludeo/cloud-common 1.2.271 → 1.2.274-beta-yahil-1
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/allocate-cloud-session-failed.d.ts +9 -0
- package/dist/v4/events/allocate-cloud-session-failed.js +19 -1
- package/dist/v4/events/allocate-cloud-session-failed.js.map +1 -1
- package/dist/v4/events/cloud-resources/index.d.ts +1 -0
- package/dist/v4/events/cloud-resources/index.js +1 -0
- package/dist/v4/events/cloud-resources/index.js.map +1 -1
- package/dist/v4/events/cloud-resources/restart-ludeocast-game-request.d.ts +16 -0
- package/dist/v4/events/cloud-resources/restart-ludeocast-game-request.js +62 -0
- package/dist/v4/events/cloud-resources/restart-ludeocast-game-request.js.map +1 -0
- package/dist/v4/events/cloud-session-allocator/cloud-session-queued.d.ts +13 -0
- package/dist/v4/events/cloud-session-allocator/cloud-session-queued.js +49 -0
- package/dist/v4/events/cloud-session-allocator/cloud-session-queued.js.map +1 -0
- package/dist/v4/events/cloud-session-allocator/index.d.ts +1 -0
- package/dist/v4/events/cloud-session-allocator/index.js +1 -0
- package/dist/v4/events/cloud-session-allocator/index.js.map +1 -1
- package/dist/v4/events/ludeo-available.d.ts +2 -0
- package/dist/v4/events/ludeo-available.js +10 -0
- package/dist/v4/events/ludeo-available.js.map +1 -1
- package/dist/v4/events/site-controller/game-ludeocast-restart-ended.d.ts +18 -0
- package/dist/v4/events/site-controller/game-ludeocast-restart-ended.js +65 -0
- package/dist/v4/events/site-controller/game-ludeocast-restart-ended.js.map +1 -0
- package/dist/v4/events/site-controller/index.d.ts +2 -0
- package/dist/v4/events/site-controller/index.js +2 -0
- package/dist/v4/events/site-controller/index.js.map +1 -1
- package/dist/v4/events/site-controller/restart-game.command.d.ts +10 -0
- package/dist/v4/events/site-controller/restart-game.command.js +33 -0
- package/dist/v4/events/site-controller/restart-game.command.js.map +1 -0
- package/package.json +1 -1
- package/src/v4/events/allocate-cloud-session-failed.ts +23 -1
- package/src/v4/events/cloud-resources/index.ts +2 -1
- package/src/v4/events/cloud-resources/restart-ludeocast-game-request.ts +41 -0
- package/src/v4/events/cloud-session-allocator/cloud-session-queued.ts +37 -0
- package/src/v4/events/cloud-session-allocator/index.ts +2 -1
- package/src/v4/events/ludeo-available.ts +12 -1
- package/src/v4/events/site-controller/game-ludeocast-restart-ended.ts +44 -0
- package/src/v4/events/site-controller/index.ts +2 -0
- package/src/v4/events/site-controller/restart-game.command.ts +21 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { LudeoEvent } from '../../../infra';
|
|
2
|
+
import { ValidateNestedType } from '../../../decorators';
|
|
3
|
+
import { IsEnum, IsOptional, IsString, IsUUID } from 'class-validator';
|
|
4
|
+
import { CloudResourceContext } from '../../contexts';
|
|
5
|
+
import { SiteOperationStatus } from '../../types/site-controller';
|
|
6
|
+
import { CloudResourceStatus } from '../../types/pools';
|
|
7
|
+
|
|
8
|
+
export class GameLudeocastRestartEndedPayload {
|
|
9
|
+
@IsUUID()
|
|
10
|
+
gameResourceId: string;
|
|
11
|
+
|
|
12
|
+
@IsUUID()
|
|
13
|
+
gamePoolId: string;
|
|
14
|
+
|
|
15
|
+
@IsEnum(SiteOperationStatus)
|
|
16
|
+
operationStatus: SiteOperationStatus;
|
|
17
|
+
|
|
18
|
+
@IsEnum(CloudResourceStatus)
|
|
19
|
+
status: CloudResourceStatus;
|
|
20
|
+
|
|
21
|
+
@IsOptional()
|
|
22
|
+
@IsString()
|
|
23
|
+
reason?: string;
|
|
24
|
+
|
|
25
|
+
@IsOptional()
|
|
26
|
+
@IsString()
|
|
27
|
+
sourceService?: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export class GameLudeocastRestartEnded extends LudeoEvent {
|
|
31
|
+
static readonly EVENT_NAME = 'site-controller.game-ludeocast-restart-ended';
|
|
32
|
+
|
|
33
|
+
constructor(payload: GameLudeocastRestartEndedPayload, context: CloudResourceContext) {
|
|
34
|
+
super(GameLudeocastRestartEnded.EVENT_NAME);
|
|
35
|
+
this.payload = payload;
|
|
36
|
+
this.context = context;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@ValidateNestedType(() => GameLudeocastRestartEndedPayload)
|
|
40
|
+
payload: GameLudeocastRestartEndedPayload;
|
|
41
|
+
|
|
42
|
+
@ValidateNestedType(() => CloudResourceContext)
|
|
43
|
+
context: CloudResourceContext;
|
|
44
|
+
}
|
|
@@ -2,6 +2,7 @@ export * from "./machine-ludeocast-creation-ended";
|
|
|
2
2
|
export * from "./machine-ludeocast-preempted";
|
|
3
3
|
export * from "./game-ludeocast-creation-ended";
|
|
4
4
|
export * from "./game-ludeocast-termination-ended";
|
|
5
|
+
export * from "./game-ludeocast-restart-ended";
|
|
5
6
|
export * from "./machine-ludeocast-termination-ended";
|
|
6
7
|
|
|
7
8
|
export * from "./ludeocast-build-distribution-creation-ended";
|
|
@@ -18,6 +19,7 @@ export * from "../base/constants";
|
|
|
18
19
|
export * from "./init.command";
|
|
19
20
|
export * from "./terminate-game.command";
|
|
20
21
|
export * from "./start-game.command";
|
|
22
|
+
export * from "./restart-game.command";
|
|
21
23
|
export * from "./set-sftp-credentials.command";
|
|
22
24
|
export * from "./shutdown.command";
|
|
23
25
|
export * from "./export-logs.command";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { BaseCommand, BaseCommandPayload } from '../base/base';
|
|
2
|
+
import { GameCreationPayload } from '../../types/site-controller';
|
|
3
|
+
import { ValidateNestedType } from '../../../decorators';
|
|
4
|
+
import { IsString } from 'class-validator';
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
export class RestartGameCommandPayload extends BaseCommandPayload {
|
|
8
|
+
payload: GameCreationPayload;
|
|
9
|
+
|
|
10
|
+
@IsString()
|
|
11
|
+
gameResourceId: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export class RestartGameCommand extends BaseCommand<RestartGameCommandPayload> {
|
|
15
|
+
@ValidateNestedType(() => RestartGameCommandPayload)
|
|
16
|
+
payload: RestartGameCommandPayload;
|
|
17
|
+
|
|
18
|
+
constructor(payload: RestartGameCommandPayload) {
|
|
19
|
+
super(payload.machineResourceId, 'restart-game', payload);
|
|
20
|
+
}
|
|
21
|
+
}
|