@ludeo/cloud-common 1.2.184 → 1.2.185
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/cloud-resource-context.d.ts +1 -0
- package/dist/v4/contexts/cloud-resource-context.js +5 -0
- package/dist/v4/contexts/cloud-resource-context.js.map +1 -1
- package/dist/v4/events/cloud-resources/create-ludeocast-game-request.d.ts +8 -7
- package/dist/v4/events/cloud-resources/create-ludeocast-game-request.js +7 -8
- package/dist/v4/events/cloud-resources/create-ludeocast-game-request.js.map +1 -1
- package/dist/v4/events/cloud-resources/create-ludeocast-machine-request.d.ts +6 -8
- package/dist/v4/events/cloud-resources/create-ludeocast-machine-request.js +4 -17
- package/dist/v4/events/cloud-resources/create-ludeocast-machine-request.js.map +1 -1
- package/dist/v4/events/cloud-resources/terminate-ludeocast-game-request.d.ts +3 -3
- package/dist/v4/events/cloud-resources/terminate-ludeocast-game-request.js +2 -2
- package/dist/v4/events/cloud-resources/terminate-ludeocast-game-request.js.map +1 -1
- package/dist/v4/events/cloud-resources/terminate-ludeocast-machine-request.d.ts +5 -5
- package/dist/v4/events/cloud-resources/terminate-ludeocast-machine-request.js +6 -9
- package/dist/v4/events/cloud-resources/terminate-ludeocast-machine-request.js.map +1 -1
- package/dist/v4/events/ludeocast-agent/resource-update.d.ts +1 -0
- package/dist/v4/events/ludeocast-agent/resource-update.js +3 -2
- package/dist/v4/events/ludeocast-agent/resource-update.js.map +1 -1
- package/dist/v4/events/site-controller/game-ludeocast-creation-ended.d.ts +11 -8
- package/dist/v4/events/site-controller/game-ludeocast-creation-ended.js +25 -16
- package/dist/v4/events/site-controller/game-ludeocast-creation-ended.js.map +1 -1
- package/dist/v4/events/site-controller/game-ludeocast-termination-ended.d.ts +17 -0
- package/dist/v4/events/site-controller/game-ludeocast-termination-ended.js +60 -0
- package/dist/v4/events/site-controller/game-ludeocast-termination-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/machine-ludeocast-creation-ended.d.ts +11 -8
- package/dist/v4/events/site-controller/machine-ludeocast-creation-ended.js +25 -16
- package/dist/v4/events/site-controller/machine-ludeocast-creation-ended.js.map +1 -1
- package/dist/v4/events/site-controller/machine-ludeocast-termination-ended.d.ts +17 -0
- package/dist/v4/events/site-controller/machine-ludeocast-termination-ended.js +60 -0
- package/dist/v4/events/site-controller/machine-ludeocast-termination-ended.js.map +1 -0
- package/dist/v4/events/site-controller/start-game.command.d.ts +1 -0
- package/dist/v4/events/site-controller/start-game.command.js +4 -0
- package/dist/v4/events/site-controller/start-game.command.js.map +1 -1
- package/dist/v4/types/cloud/index.d.ts +1 -0
- package/dist/v4/types/cloud/index.js +1 -0
- package/dist/v4/types/cloud/index.js.map +1 -1
- package/dist/v4/types/cloud/ludeocast-v2/allocation-data.d.ts +3 -0
- package/dist/v4/types/cloud/ludeocast-v2/allocation-data.js +21 -0
- package/dist/v4/types/cloud/ludeocast-v2/allocation-data.js.map +1 -0
- package/dist/v4/types/cloud/ludeocast-v2/game-creation-response.d.ts +2 -0
- package/dist/v4/types/cloud/ludeocast-v2/game-creation-response.js +7 -0
- package/dist/v4/types/cloud/ludeocast-v2/game-creation-response.js.map +1 -0
- package/dist/v4/types/cloud/ludeocast-v2/index.d.ts +6 -0
- package/dist/v4/types/cloud/ludeocast-v2/index.js +23 -0
- package/dist/v4/types/cloud/ludeocast-v2/index.js.map +1 -0
- package/dist/v4/types/cloud/ludeocast-v2/machine-provider-settings.d.ts +3 -0
- package/dist/v4/types/cloud/ludeocast-v2/machine-provider-settings.js +21 -0
- package/dist/v4/types/cloud/ludeocast-v2/machine-provider-settings.js.map +1 -0
- package/dist/v4/types/cloud/ludeocast-v2/provider-settings.d.ts +12 -0
- package/dist/v4/types/cloud/ludeocast-v2/provider-settings.js +13 -0
- package/dist/v4/types/cloud/ludeocast-v2/provider-settings.js.map +1 -0
- package/dist/v4/types/cloud/ludeocast-v2/request-data.d.ts +3 -0
- package/dist/v4/types/cloud/ludeocast-v2/request-data.js +22 -0
- package/dist/v4/types/cloud/ludeocast-v2/request-data.js.map +1 -0
- package/dist/v4/types/cloud/ludeocast-v2/resource-provider-settings.d.ts +7 -0
- package/dist/v4/types/cloud/ludeocast-v2/resource-provider-settings.js +38 -0
- package/dist/v4/types/cloud/ludeocast-v2/resource-provider-settings.js.map +1 -0
- package/dist/v4/types/cloud/ludeocast-v2/site.d.ts +0 -0
- package/dist/v4/types/cloud/ludeocast-v2/site.js +1 -0
- package/dist/v4/types/cloud/ludeocast-v2/site.js.map +1 -0
- package/dist/v4/types/cloud/provider.d.ts +1 -0
- package/dist/v4/types/cloud/provider.js +1 -0
- package/dist/v4/types/cloud/provider.js.map +1 -1
- package/package.json +1 -1
- package/src/v4/contexts/cloud-resource-context.ts +4 -0
- package/src/v4/events/base/base.ts +1 -1
- package/src/v4/events/cloud-resources/create-ludeocast-game-request.ts +12 -12
- package/src/v4/events/cloud-resources/create-ludeocast-machine-request.ts +9 -16
- package/src/v4/events/cloud-resources/terminate-ludeocast-game-request.ts +4 -4
- package/src/v4/events/cloud-resources/terminate-ludeocast-machine-request.ts +8 -10
- package/src/v4/events/ludeocast-agent/resource-update.ts +2 -1
- package/src/v4/events/site-controller/game-ludeocast-creation-ended.ts +18 -11
- package/src/v4/events/site-controller/game-ludeocast-termination-ended.ts +41 -0
- package/src/v4/events/site-controller/index.ts +2 -0
- package/src/v4/events/site-controller/machine-ludeocast-creation-ended.ts +18 -11
- package/src/v4/events/site-controller/machine-ludeocast-termination-ended.ts +41 -0
- package/src/v4/events/site-controller/start-game.command.ts +4 -1
- package/src/v4/types/cloud/index.ts +1 -0
- package/src/v4/types/cloud/ludeocast-v2/allocation-data.ts +6 -0
- package/src/v4/types/cloud/ludeocast-v2/game-creation-response.ts +1 -0
- package/src/v4/types/cloud/ludeocast-v2/index.ts +6 -0
- package/src/v4/types/cloud/ludeocast-v2/machine-provider-settings.ts +6 -0
- package/src/v4/types/cloud/ludeocast-v2/provider-settings.ts +28 -0
- package/src/v4/types/cloud/ludeocast-v2/request-data.ts +7 -0
- package/src/v4/types/cloud/ludeocast-v2/resource-provider-settings.ts +21 -0
- package/src/v4/types/cloud/ludeocast-v2/site.ts +7 -0
- package/src/v4/types/cloud/provider.ts +1 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LudeoEvent } from '../../../infra';
|
|
2
2
|
import { ValidateNestedType } from '../../../decorators';
|
|
3
3
|
import { IsString, IsUUID } from 'class-validator';
|
|
4
|
-
import {
|
|
4
|
+
import { CloudResourceContext } from '../../contexts';
|
|
5
5
|
|
|
6
6
|
export class TerminateLudeocastGameRequestPayload {
|
|
7
7
|
@IsUUID()
|
|
@@ -20,7 +20,7 @@ export class TerminateLudeocastGameRequestPayload {
|
|
|
20
20
|
export class TerminateLudeocastGameRequest extends LudeoEvent {
|
|
21
21
|
static readonly EVENT_NAME = 'cloud-resources.terminate-ludeocast-game-request';
|
|
22
22
|
|
|
23
|
-
constructor(payload: TerminateLudeocastGameRequestPayload, context:
|
|
23
|
+
constructor(payload: TerminateLudeocastGameRequestPayload, context: CloudResourceContext) {
|
|
24
24
|
super(TerminateLudeocastGameRequest.EVENT_NAME);
|
|
25
25
|
this.payload = payload;
|
|
26
26
|
this.context = context;
|
|
@@ -29,7 +29,7 @@ export class TerminateLudeocastGameRequest extends LudeoEvent {
|
|
|
29
29
|
@ValidateNestedType(() => TerminateLudeocastGameRequestPayload)
|
|
30
30
|
payload: TerminateLudeocastGameRequestPayload;
|
|
31
31
|
|
|
32
|
-
@ValidateNestedType(() =>
|
|
33
|
-
context:
|
|
32
|
+
@ValidateNestedType(() => CloudResourceContext)
|
|
33
|
+
context: CloudResourceContext;
|
|
34
34
|
}
|
|
35
35
|
|
|
@@ -1,23 +1,21 @@
|
|
|
1
1
|
import { LudeoEvent } from '../../../infra';
|
|
2
2
|
import { ValidateNestedType } from '../../../decorators';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { IsUUID } from 'class-validator';
|
|
4
|
+
import { CloudResourceContext } from '../../contexts';
|
|
5
|
+
import { LudeoCastV2ProviderSettings } from '../../types';
|
|
5
6
|
|
|
6
7
|
export class TerminateLudeocastMachineRequestPayload {
|
|
7
8
|
@IsUUID()
|
|
8
9
|
machineResourceId: string;
|
|
9
10
|
|
|
10
|
-
@
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
@IsString()
|
|
14
|
-
region: string;
|
|
11
|
+
@ValidateNestedType(() => LudeoCastV2ProviderSettings)
|
|
12
|
+
providerSettings: LudeoCastV2ProviderSettings;
|
|
15
13
|
}
|
|
16
14
|
|
|
17
15
|
export class TerminateLudeocastMachineRequest extends LudeoEvent {
|
|
18
16
|
static readonly EVENT_NAME = 'cloud-resources.terminate-ludeocast-machine-request';
|
|
19
17
|
|
|
20
|
-
constructor(payload: TerminateLudeocastMachineRequestPayload, context:
|
|
18
|
+
constructor(payload: TerminateLudeocastMachineRequestPayload, context: CloudResourceContext) {
|
|
21
19
|
super(TerminateLudeocastMachineRequest.EVENT_NAME);
|
|
22
20
|
this.payload = payload;
|
|
23
21
|
this.context = context;
|
|
@@ -26,7 +24,7 @@ export class TerminateLudeocastMachineRequest extends LudeoEvent {
|
|
|
26
24
|
@ValidateNestedType(() => TerminateLudeocastMachineRequestPayload)
|
|
27
25
|
payload: TerminateLudeocastMachineRequestPayload;
|
|
28
26
|
|
|
29
|
-
@ValidateNestedType(() =>
|
|
30
|
-
context:
|
|
27
|
+
@ValidateNestedType(() => CloudResourceContext)
|
|
28
|
+
context: CloudResourceContext;
|
|
31
29
|
}
|
|
32
30
|
|
|
@@ -34,7 +34,7 @@ export class ResourceUpdate extends BaseCommand<ResourceUpdatePayload> {
|
|
|
34
34
|
payload: ResourceUpdatePayload;
|
|
35
35
|
|
|
36
36
|
constructor(payload: ResourceUpdatePayload) {
|
|
37
|
-
super(payload.machineResourceId,
|
|
37
|
+
super(payload.machineResourceId, RESOURCE_UPDATE, payload);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
getTopic(): string {
|
|
@@ -44,3 +44,4 @@ export class ResourceUpdate extends BaseCommand<ResourceUpdatePayload> {
|
|
|
44
44
|
|
|
45
45
|
export const RESOURCE_UPDATE_SUBSCRIBE_PATTERN = `$share/site-controller-group/${AGENT_STRING}/${RESOURCE_UPDATE}/${WILDCARD_MQTT_STRING}`;
|
|
46
46
|
|
|
47
|
+
export const RESOURCE_UPDATE_AGENT_SUBSCRIBE_PATTERN = `${AGENT_STRING}/${RESOURCE_UPDATE}`;
|
|
@@ -1,34 +1,41 @@
|
|
|
1
1
|
import { LudeoEvent } from '../../../infra';
|
|
2
2
|
import { ValidateNestedType } from '../../../decorators';
|
|
3
3
|
import { IsEnum, IsOptional, IsString, IsUUID } from 'class-validator';
|
|
4
|
-
import {
|
|
4
|
+
import { CloudResourceContext } from '../../contexts';
|
|
5
5
|
import { SiteOperationStatus } from '../../types/site-controller';
|
|
6
|
+
import { CloudResourceStatus } from '../../types/pools';
|
|
6
7
|
|
|
7
|
-
export class
|
|
8
|
+
export class GameLudeocastCreationEndedPayload {
|
|
8
9
|
@IsUUID()
|
|
9
10
|
gameResourceId: string;
|
|
10
11
|
|
|
12
|
+
@IsUUID()
|
|
13
|
+
gamePoolId: string;
|
|
14
|
+
|
|
11
15
|
@IsEnum(SiteOperationStatus)
|
|
12
|
-
|
|
16
|
+
operationStatus: SiteOperationStatus;
|
|
17
|
+
|
|
18
|
+
@IsEnum(CloudResourceStatus)
|
|
19
|
+
status: CloudResourceStatus;
|
|
13
20
|
|
|
14
21
|
@IsOptional()
|
|
15
22
|
@IsString()
|
|
16
23
|
reason?: string;
|
|
17
24
|
}
|
|
18
25
|
|
|
19
|
-
export class
|
|
20
|
-
static readonly EVENT_NAME = 'site-controller.game-creation-ended';
|
|
26
|
+
export class GameLudeocastCreationEnded extends LudeoEvent {
|
|
27
|
+
static readonly EVENT_NAME = 'site-controller.game-ludeocast-creation-ended';
|
|
21
28
|
|
|
22
|
-
constructor(payload:
|
|
23
|
-
super(
|
|
29
|
+
constructor(payload: GameLudeocastCreationEndedPayload, context: CloudResourceContext) {
|
|
30
|
+
super(GameLudeocastCreationEnded.EVENT_NAME);
|
|
24
31
|
this.payload = payload;
|
|
25
32
|
this.context = context;
|
|
26
33
|
}
|
|
27
34
|
|
|
28
|
-
@ValidateNestedType(() =>
|
|
29
|
-
payload:
|
|
35
|
+
@ValidateNestedType(() => GameLudeocastCreationEndedPayload)
|
|
36
|
+
payload: GameLudeocastCreationEndedPayload;
|
|
30
37
|
|
|
31
|
-
@ValidateNestedType(() =>
|
|
32
|
-
context:
|
|
38
|
+
@ValidateNestedType(() => CloudResourceContext)
|
|
39
|
+
context: CloudResourceContext;
|
|
33
40
|
}
|
|
34
41
|
|
|
@@ -0,0 +1,41 @@
|
|
|
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 GameLudeocastTerminationEndedPayload {
|
|
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
|
+
|
|
26
|
+
export class GameLudeocastTerminationEnded extends LudeoEvent {
|
|
27
|
+
static readonly EVENT_NAME = 'site-controller.game-ludeocast-termination-ended';
|
|
28
|
+
|
|
29
|
+
constructor(payload: GameLudeocastTerminationEndedPayload, context: CloudResourceContext) {
|
|
30
|
+
super(GameLudeocastTerminationEnded.EVENT_NAME);
|
|
31
|
+
this.payload = payload;
|
|
32
|
+
this.context = context;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@ValidateNestedType(() => GameLudeocastTerminationEndedPayload)
|
|
36
|
+
payload: GameLudeocastTerminationEndedPayload;
|
|
37
|
+
|
|
38
|
+
@ValidateNestedType(() => CloudResourceContext)
|
|
39
|
+
context: CloudResourceContext;
|
|
40
|
+
}
|
|
41
|
+
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
export * from './machine-ludeocast-creation-ended';
|
|
3
3
|
export * from './game-ludeocast-creation-ended';
|
|
4
|
+
export * from './game-ludeocast-termination-ended';
|
|
5
|
+
export * from './machine-ludeocast-termination-ended';
|
|
4
6
|
|
|
5
7
|
export * from './snapshot-ludeocast-creation-ended';
|
|
6
8
|
export * from './snapshot-ludeocast-termination-ended';
|
|
@@ -1,34 +1,41 @@
|
|
|
1
1
|
import { LudeoEvent } from '../../../infra';
|
|
2
2
|
import { ValidateNestedType } from '../../../decorators';
|
|
3
3
|
import { IsEnum, IsOptional, IsString, IsUUID } from 'class-validator';
|
|
4
|
-
import {
|
|
4
|
+
import { CloudResourceContext } from '../../contexts';
|
|
5
5
|
import { SiteOperationStatus } from '../../types/site-controller';
|
|
6
|
+
import { CloudResourceStatus } from '../../types/pools';
|
|
6
7
|
|
|
7
|
-
export class
|
|
8
|
+
export class MachineLudeocastCreationEndedPayload {
|
|
8
9
|
@IsUUID()
|
|
9
10
|
machineResourceId: string;
|
|
10
11
|
|
|
12
|
+
@IsUUID()
|
|
13
|
+
machinePoolId: string;
|
|
14
|
+
|
|
11
15
|
@IsEnum(SiteOperationStatus)
|
|
12
|
-
|
|
16
|
+
operationStatus: SiteOperationStatus;
|
|
17
|
+
|
|
18
|
+
@IsEnum(CloudResourceStatus)
|
|
19
|
+
status: CloudResourceStatus;
|
|
13
20
|
|
|
14
21
|
@IsOptional()
|
|
15
22
|
@IsString()
|
|
16
23
|
reason?: string;
|
|
17
24
|
}
|
|
18
25
|
|
|
19
|
-
export class
|
|
20
|
-
static readonly EVENT_NAME = 'site-controller.machine-creation-ended';
|
|
26
|
+
export class MachineLudeocastCreationEnded extends LudeoEvent {
|
|
27
|
+
static readonly EVENT_NAME = 'site-controller.machine-ludeocast-creation-ended';
|
|
21
28
|
|
|
22
|
-
constructor(payload:
|
|
23
|
-
super(
|
|
29
|
+
constructor(payload: MachineLudeocastCreationEndedPayload, context: CloudResourceContext) {
|
|
30
|
+
super(MachineLudeocastCreationEnded.EVENT_NAME);
|
|
24
31
|
this.payload = payload;
|
|
25
32
|
this.context = context;
|
|
26
33
|
}
|
|
27
34
|
|
|
28
|
-
@ValidateNestedType(() =>
|
|
29
|
-
payload:
|
|
35
|
+
@ValidateNestedType(() => MachineLudeocastCreationEndedPayload)
|
|
36
|
+
payload: MachineLudeocastCreationEndedPayload;
|
|
30
37
|
|
|
31
|
-
@ValidateNestedType(() =>
|
|
32
|
-
context:
|
|
38
|
+
@ValidateNestedType(() => CloudResourceContext)
|
|
39
|
+
context: CloudResourceContext;
|
|
33
40
|
}
|
|
34
41
|
|
|
@@ -0,0 +1,41 @@
|
|
|
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 MachineLudeocastTerminationEndedPayload {
|
|
9
|
+
@IsUUID()
|
|
10
|
+
machineResourceId: string;
|
|
11
|
+
|
|
12
|
+
@IsUUID()
|
|
13
|
+
machinePoolId: 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
|
+
|
|
26
|
+
export class MachineLudeocastTerminationEnded extends LudeoEvent {
|
|
27
|
+
static readonly EVENT_NAME = 'site-controller.machine-ludeocast-termination-ended';
|
|
28
|
+
|
|
29
|
+
constructor(payload: MachineLudeocastTerminationEndedPayload, context: CloudResourceContext) {
|
|
30
|
+
super(MachineLudeocastTerminationEnded.EVENT_NAME);
|
|
31
|
+
this.payload = payload;
|
|
32
|
+
this.context = context;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@ValidateNestedType(() => MachineLudeocastTerminationEndedPayload)
|
|
36
|
+
payload: MachineLudeocastTerminationEndedPayload;
|
|
37
|
+
|
|
38
|
+
@ValidateNestedType(() => CloudResourceContext)
|
|
39
|
+
context: CloudResourceContext;
|
|
40
|
+
}
|
|
41
|
+
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { BaseCommand, BaseCommandPayload } from '../base/base';
|
|
2
2
|
import { GameCreationPayload, MachineMode } from '../../types/site-controller';
|
|
3
3
|
import { ValidateNestedType } from '../../../decorators';
|
|
4
|
-
import { IsEnum } from 'class-validator';
|
|
4
|
+
import { IsEnum, IsString } from 'class-validator';
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
export class StartGameCommandPayload extends BaseCommandPayload {
|
|
8
8
|
payload: GameCreationPayload;
|
|
9
9
|
|
|
10
|
+
@IsString()
|
|
11
|
+
gameResourceId: string;
|
|
12
|
+
|
|
10
13
|
@IsEnum(MachineMode)
|
|
11
14
|
machineMode: MachineMode;
|
|
12
15
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export class LudeoCastV2GameCreationResponse {}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { MachineMode } from "../..";
|
|
2
|
+
import { CloudProviderSettings } from "../provider-settings";
|
|
3
|
+
|
|
4
|
+
export class LudeoCastV2ProviderSettings {
|
|
5
|
+
site: string;
|
|
6
|
+
|
|
7
|
+
region?: string;
|
|
8
|
+
|
|
9
|
+
mode?: MachineMode;
|
|
10
|
+
|
|
11
|
+
executableLaunchPath?: string;
|
|
12
|
+
|
|
13
|
+
machineClass?: string;
|
|
14
|
+
|
|
15
|
+
additionalEnvironmentVariables?: Record<string, string>;
|
|
16
|
+
|
|
17
|
+
additionalLaunchArgs?: string[];
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const isLudeoCastV2ProviderSettings = (
|
|
21
|
+
settings: CloudProviderSettings
|
|
22
|
+
): settings is LudeoCastV2ProviderSettings => {
|
|
23
|
+
return (
|
|
24
|
+
settings &&
|
|
25
|
+
"mode" in settings &&
|
|
26
|
+
typeof settings.mode === "string"
|
|
27
|
+
);
|
|
28
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { IsEnum, IsOptional, IsString } from "class-validator";
|
|
2
|
+
import { CloudProvider } from "../provider";
|
|
3
|
+
|
|
4
|
+
export class LudeoCastV2ResourceProviderSettings {
|
|
5
|
+
@IsOptional()
|
|
6
|
+
@IsString()
|
|
7
|
+
machineId?: string;
|
|
8
|
+
|
|
9
|
+
@IsOptional()
|
|
10
|
+
@IsEnum(CloudProvider)
|
|
11
|
+
cloudProvider?: CloudProvider;
|
|
12
|
+
|
|
13
|
+
@IsOptional()
|
|
14
|
+
@IsString()
|
|
15
|
+
region?: string;
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
@IsOptional()
|
|
19
|
+
@IsString()
|
|
20
|
+
site?: string;
|
|
21
|
+
}
|