@ludeo/cloud-common 1.1.27 → 1.1.29
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/v3/contexts/getCloudContextType.d.ts +1 -1
- package/dist/v3/events/allocate-game-request.d.ts +1 -1
- package/dist/v3/events/allocate-game-request.js +1 -1
- package/dist/v3/events/allocate-game-request.js.map +1 -1
- package/dist/v3/events/allocate-game-resource-request.d.ts +2 -1
- package/dist/v3/events/allocate-game-resource-request.js +4 -0
- package/dist/v3/events/allocate-game-resource-request.js.map +1 -1
- package/dist/v3/events/game-resource-created-response.d.ts +2 -2
- package/dist/v3/events/game-resource-created-response.js +5 -5
- package/dist/v3/events/game-resource-created-response.js.map +1 -1
- package/dist/v3/types/cloud.d.ts +2 -2
- package/dist/v3/types/cloud.js +4 -4
- package/dist/v3/types/cloud.js.map +1 -1
- package/dist/v3/types/pools.d.ts +2 -2
- package/dist/v3/types/pools.js.map +1 -1
- package/package.json +1 -1
- package/src/v3/events/allocate-game-request.ts +1 -1
- package/src/v3/events/allocate-game-resource-request.ts +5 -0
- package/src/v3/events/game-resource-created-response.ts +6 -6
- package/src/v3/types/cloud.ts +2 -2
- package/src/v3/types/pools.ts +12 -8
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { TypeHelpOptions } from "class-transformer";
|
|
2
2
|
import { CloudPoolContext } from "./cloud-pool-context";
|
|
3
3
|
import { CloudResourceContext } from "./cloud-resource-context";
|
|
4
|
-
export declare const getCloudContextType: ({ object }: TypeHelpOptions) => typeof
|
|
4
|
+
export declare const getCloudContextType: ({ object }: TypeHelpOptions) => typeof CloudResourceContext | typeof CloudPoolContext;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AllocationRequestData } from "../types";
|
|
2
|
-
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
3
2
|
import { CloudSessionContext } from "../contexts";
|
|
3
|
+
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
4
4
|
export declare class AllocateGameRequestPayload {
|
|
5
5
|
gameResourceId: string;
|
|
6
6
|
gamePoolId: string;
|
|
@@ -12,8 +12,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.AllocateGameRequest = exports.AllocateGameRequestPayload = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
14
|
const types_1 = require("../types");
|
|
15
|
-
const ludeo_event_1 = require("../../infra/ludeo-event");
|
|
16
15
|
const contexts_1 = require("../contexts");
|
|
16
|
+
const ludeo_event_1 = require("../../infra/ludeo-event");
|
|
17
17
|
const validate_nested_type_decorator_1 = require("../../decorators/validate-nested-type.decorator");
|
|
18
18
|
class AllocateGameRequestPayload {
|
|
19
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allocate-game-request.js","sourceRoot":"","sources":["../../../src/v3/events/allocate-game-request.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAyC;AAEzC,oCAAiD;AACjD,yDAAqD;AACrD,
|
|
1
|
+
{"version":3,"file":"allocate-game-request.js","sourceRoot":"","sources":["../../../src/v3/events/allocate-game-request.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAyC;AAEzC,oCAAiD;AACjD,0CAAkD;AAClD,yDAAqD;AACrD,oGAAqF;AAErF,MAAa,0BAA0B;CAStC;AATD,gEASC;AAPC;IADC,IAAA,wBAAM,GAAE;;kEACc;AAGvB;IADC,IAAA,wBAAM,GAAE;;8DACU;AAGnB;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,6BAAqB,CAAC;8BACnC,6BAAqB;+DAAC;AAGrC,MAAa,mBAAoB,SAAQ,wBAAU;IAGjD,YACE,OAAmC,EACnC,OAA4B;QAE5B,KAAK,CAAC,mBAAmB,CAAC,UAAU,CAAC,CAAC;QACtC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAVH,kDAiBC;AAhBiB,8BAAU,GAAG,+CAA+C,CAAC;AAY7E;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,8BAAmB,CAAC;8BACrC,8BAAmB;oDAAC;AAG7B;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,0BAA0B,CAAC;8BAC5C,0BAA0B;oDAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
2
2
|
import { CloudSessionContext } from "../contexts";
|
|
3
|
-
import { CloudProviderSettings, CloudProvider, AllocationRequestData } from "../types";
|
|
3
|
+
import { CloudProviderSettings, CloudProvider, AllocationRequestData, CloudResourceProviderSettings } from "../types";
|
|
4
4
|
export declare class AllocateGameResourceRequestPayload {
|
|
5
5
|
gameResourceId: string;
|
|
6
6
|
gamePoolId: string;
|
|
@@ -8,6 +8,7 @@ export declare class AllocateGameResourceRequestPayload {
|
|
|
8
8
|
cloudProvider: CloudProvider;
|
|
9
9
|
cloudToken: string;
|
|
10
10
|
requestData: AllocationRequestData;
|
|
11
|
+
resourceProviderSettings: CloudResourceProviderSettings;
|
|
11
12
|
}
|
|
12
13
|
export declare class AllocateGameResourceRequest extends LudeoEvent {
|
|
13
14
|
static readonly EVENT_NAME = "cloud-pools.allocate-game-resource-request";
|
|
@@ -42,6 +42,10 @@ __decorate([
|
|
|
42
42
|
(0, validate_nested_type_decorator_1.ValidateNestedType)(() => types_1.AllocationRequestData),
|
|
43
43
|
__metadata("design:type", types_1.AllocationRequestData)
|
|
44
44
|
], AllocateGameResourceRequestPayload.prototype, "requestData", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, validate_nested_type_decorator_1.ValidateNestedType)(() => types_1.AWSResourceProviderSettings),
|
|
47
|
+
__metadata("design:type", Object)
|
|
48
|
+
], AllocateGameResourceRequestPayload.prototype, "resourceProviderSettings", void 0);
|
|
45
49
|
class AllocateGameResourceRequest extends ludeo_event_1.LudeoEvent {
|
|
46
50
|
constructor(payload, context) {
|
|
47
51
|
super(AllocateGameResourceRequest.EVENT_NAME);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allocate-game-resource-request.js","sourceRoot":"","sources":["../../../src/v3/events/allocate-game-resource-request.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAiD;AAEjD,yDAAqD;AACrD,0CAAkD;AAClD,oGAAqF;AACrF,
|
|
1
|
+
{"version":3,"file":"allocate-game-resource-request.js","sourceRoot":"","sources":["../../../src/v3/events/allocate-game-resource-request.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAiD;AAEjD,yDAAqD;AACrD,0CAAkD;AAClD,oGAAqF;AACrF,oCAOkB;AAElB,MAAa,kCAAkC;CAqB9C;AArBD,gFAqBC;AAnBC;IADC,IAAA,wBAAM,GAAE;;0EACc;AAGvB;IADC,IAAA,wBAAM,GAAE;;sEACU;AAGnB;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,2BAAmB,CAAC;;4EACN;AAGxC;IADC,IAAA,wBAAM,EAAC,qBAAa,CAAC;;yEACO;AAG7B;IADC,IAAA,wBAAM,GAAE;;sEACU;AAGnB;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,6BAAqB,CAAC;8BACnC,6BAAqB;uEAAC;AAGnC;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,mCAA2B,CAAC;;oFACE;AAG1D,MAAa,2BAA4B,SAAQ,wBAAU;IAGzD,YACE,OAA2C,EAC3C,OAA4B;QAE5B,KAAK,CAAC,2BAA2B,CAAC,UAAU,CAAC,CAAC;QAC9C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAVH,kEAiBC;AAhBiB,sCAAU,GAAG,4CAA4C,CAAC;AAY1E;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,8BAAmB,CAAC;8BACrC,8BAAmB;4DAAC;AAG7B;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,kCAAkC,CAAC;8BACpD,kCAAkC;4DAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { CloudResourceContext } from "../contexts";
|
|
2
2
|
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
3
|
-
import {
|
|
3
|
+
import { CloudProvider, GameCreationResponse } from "../types";
|
|
4
4
|
export declare class GameCreatedResponsePayload {
|
|
5
5
|
gameResourceId: string;
|
|
6
6
|
gamePoolId: string;
|
|
7
|
-
providerSettings: CloudProviderSettings;
|
|
8
7
|
cloudProvider: CloudProvider;
|
|
8
|
+
creationResponse: GameCreationResponse;
|
|
9
9
|
}
|
|
10
10
|
export declare class GameResourceCreatedResponse extends LudeoEvent {
|
|
11
11
|
static readonly EVENT_NAME = "cloud-resources.game-resource-created-response";
|
|
@@ -13,8 +13,8 @@ exports.GameResourceCreatedResponse = exports.GameCreatedResponsePayload = void
|
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
14
|
const contexts_1 = require("../contexts");
|
|
15
15
|
const ludeo_event_1 = require("../../infra/ludeo-event");
|
|
16
|
-
const validate_nested_type_decorator_1 = require("../../decorators/validate-nested-type.decorator");
|
|
17
16
|
const types_1 = require("../types");
|
|
17
|
+
const validate_nested_type_decorator_1 = require("../../decorators/validate-nested-type.decorator");
|
|
18
18
|
class GameCreatedResponsePayload {
|
|
19
19
|
}
|
|
20
20
|
exports.GameCreatedResponsePayload = GameCreatedResponsePayload;
|
|
@@ -26,14 +26,14 @@ __decorate([
|
|
|
26
26
|
(0, class_validator_1.IsUUID)(),
|
|
27
27
|
__metadata("design:type", String)
|
|
28
28
|
], GameCreatedResponsePayload.prototype, "gamePoolId", void 0);
|
|
29
|
-
__decorate([
|
|
30
|
-
(0, validate_nested_type_decorator_1.ValidateNestedType)(() => types_1.AWSProviderSettings),
|
|
31
|
-
__metadata("design:type", Object)
|
|
32
|
-
], GameCreatedResponsePayload.prototype, "providerSettings", void 0);
|
|
33
29
|
__decorate([
|
|
34
30
|
(0, class_validator_1.IsEnum)(types_1.CloudProvider),
|
|
35
31
|
__metadata("design:type", String)
|
|
36
32
|
], GameCreatedResponsePayload.prototype, "cloudProvider", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, validate_nested_type_decorator_1.ValidateNestedType)(() => types_1.AWSGameCreationResponse),
|
|
35
|
+
__metadata("design:type", Object)
|
|
36
|
+
], GameCreatedResponsePayload.prototype, "creationResponse", void 0);
|
|
37
37
|
class GameResourceCreatedResponse extends ludeo_event_1.LudeoEvent {
|
|
38
38
|
constructor(payload, context) {
|
|
39
39
|
super(GameResourceCreatedResponse.EVENT_NAME);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"game-resource-created-response.js","sourceRoot":"","sources":["../../../src/v3/events/game-resource-created-response.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAiD;AAEjD,0CAAmD;AACnD,yDAAqD;AACrD,
|
|
1
|
+
{"version":3,"file":"game-resource-created-response.js","sourceRoot":"","sources":["../../../src/v3/events/game-resource-created-response.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAiD;AAEjD,0CAAmD;AACnD,yDAAqD;AACrD,oCAIkB;AAClB,oGAAqF;AAErF,MAAa,0BAA0B;CAYtC;AAZD,gEAYC;AAVC;IADC,IAAA,wBAAM,GAAE;;kEACc;AAGvB;IADC,IAAA,wBAAM,GAAE;;8DACU;AAGnB;IADC,IAAA,wBAAM,EAAC,qBAAa,CAAC;;iEACO;AAG7B;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,+BAAuB,CAAC;;oEACX;AAGzC,MAAa,2BAA4B,SAAQ,wBAAU;IAGzD,YACE,OAAmC,EACnC,OAA6B;QAE7B,KAAK,CAAC,2BAA2B,CAAC,UAAU,CAAC,CAAC;QAC9C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAVH,kEAiBC;AAhBiB,sCAAU,GAAG,gDAAgD,CAAC;AAY9E;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,+BAAoB,CAAC;8BACtC,+BAAoB;4DAAC;AAG9B;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,0BAA0B,CAAC;8BAC5C,0BAA0B;4DAAC"}
|
package/dist/v3/types/cloud.d.ts
CHANGED
|
@@ -28,10 +28,10 @@ export declare class AWSResourceProviderSettings {
|
|
|
28
28
|
cloudProvider?: CloudProvider;
|
|
29
29
|
}
|
|
30
30
|
export type CloudResourceProviderSettings = AWSResourceProviderSettings;
|
|
31
|
-
export declare class
|
|
31
|
+
export declare class AWSGameCreationResponse {
|
|
32
32
|
streamSessionId: string;
|
|
33
33
|
}
|
|
34
|
-
export type
|
|
34
|
+
export type GameCreationResponse = AWSGameCreationResponse;
|
|
35
35
|
export declare class AllocationRequestData {
|
|
36
36
|
authToken?: string;
|
|
37
37
|
appToken?: string;
|
package/dist/v3/types/cloud.js
CHANGED
|
@@ -9,7 +9,7 @@ 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.AllocationRequestData = exports.
|
|
12
|
+
exports.AllocationRequestData = exports.AWSGameCreationResponse = exports.AWSResourceProviderSettings = exports.AwsAllocationData = exports.AWSProviderSettings = exports.CloudProvider = exports.AWSRequestData = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
14
|
const decorators_1 = require("../../decorators");
|
|
15
15
|
class AWSRequestData {
|
|
@@ -60,14 +60,14 @@ __decorate([
|
|
|
60
60
|
(0, class_validator_1.IsOptional)(),
|
|
61
61
|
__metadata("design:type", String)
|
|
62
62
|
], AWSResourceProviderSettings.prototype, "cloudProvider", void 0);
|
|
63
|
-
class
|
|
63
|
+
class AWSGameCreationResponse {
|
|
64
64
|
}
|
|
65
|
-
exports.
|
|
65
|
+
exports.AWSGameCreationResponse = AWSGameCreationResponse;
|
|
66
66
|
__decorate([
|
|
67
67
|
(0, class_validator_1.IsString)(),
|
|
68
68
|
(0, class_validator_1.IsNotEmpty)(),
|
|
69
69
|
__metadata("design:type", String)
|
|
70
|
-
],
|
|
70
|
+
], AWSGameCreationResponse.prototype, "streamSessionId", void 0);
|
|
71
71
|
class AllocationRequestData {
|
|
72
72
|
}
|
|
73
73
|
exports.AllocationRequestData = AllocationRequestData;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloud.js","sourceRoot":"","sources":["../../../src/v3/types/cloud.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,qDAOyB;AACzB,iDAAsD;AAEtD,MAAa,cAAc;CAI1B;AAJD,wCAIC;AADC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;qDACS;AAKxB,IAAY,aAEX;AAFD,WAAY,aAAa;IACvB,4BAAW,CAAA;AACb,CAAC,EAFW,aAAa,6BAAb,aAAa,QAExB;AAED,MAAa,mBAAmB;CAQ/B;AARD,kDAQC;AAID,MAAa,iBAAiB;CAS7B;AATD,8CASC;AAPC;IADC,IAAA,0BAAQ,GAAE;;wDACW;AAGtB;IADC,IAAA,0BAAQ,GAAE;;0DACa;AAGxB;IADC,IAAA,0BAAQ,GAAE;;yDACY;AAKzB,MAAa,2BAA2B;CAYvC;AAZD,kEAYC;AATC;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;oEACc;AAIzB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;kEACY;AAIvB;IAFC,IAAA,wBAAM,EAAC,aAAa,CAAC;IACrB,IAAA,4BAAU,GAAE;;kEACiB;AAKhC,MAAa,
|
|
1
|
+
{"version":3,"file":"cloud.js","sourceRoot":"","sources":["../../../src/v3/types/cloud.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,qDAOyB;AACzB,iDAAsD;AAEtD,MAAa,cAAc;CAI1B;AAJD,wCAIC;AADC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;qDACS;AAKxB,IAAY,aAEX;AAFD,WAAY,aAAa;IACvB,4BAAW,CAAA;AACb,CAAC,EAFW,aAAa,6BAAb,aAAa,QAExB;AAED,MAAa,mBAAmB;CAQ/B;AARD,kDAQC;AAID,MAAa,iBAAiB;CAS7B;AATD,8CASC;AAPC;IADC,IAAA,0BAAQ,GAAE;;wDACW;AAGtB;IADC,IAAA,0BAAQ,GAAE;;0DACa;AAGxB;IADC,IAAA,0BAAQ,GAAE;;yDACY;AAKzB,MAAa,2BAA2B;CAYvC;AAZD,kEAYC;AATC;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;oEACc;AAIzB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;kEACY;AAIvB;IAFC,IAAA,wBAAM,EAAC,aAAa,CAAC;IACrB,IAAA,4BAAU,GAAE;;kEACiB;AAKhC,MAAa,uBAAuB;CAInC;AAJD,0DAIC;AADC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;gEACW;AAK1B,MAAa,qBAAqB;CAYjC;AAZD,sDAYC;AATC;IAFC,IAAA,wBAAM,GAAE;IACR,IAAA,4BAAU,GAAE;;wDACM;AAInB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;uDACS;AAIlB;IAFC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,cAAc,CAAC;IACxC,IAAA,2BAAS,GAAE;;mEAC+B"}
|
package/dist/v3/types/pools.d.ts
CHANGED
|
@@ -36,7 +36,7 @@ export declare class GamePoolConfiguration extends BaseCloudPoolConfiguration {
|
|
|
36
36
|
export declare class MachinePoolConfiguration extends BaseCloudPoolConfiguration {
|
|
37
37
|
type: CloudPoolType.MACHINE;
|
|
38
38
|
}
|
|
39
|
-
export type CloudPoolConfigurationType<T extends CloudPoolType | undefined> = T extends CloudPoolType.GAME ? GamePoolConfiguration : T extends CloudPoolType.MACHINE ? MachinePoolConfiguration : BaseCloudPoolConfiguration;
|
|
39
|
+
export type CloudPoolConfigurationType<T extends CloudPoolType | undefined = undefined> = T extends undefined ? BaseCloudPoolConfiguration : T extends CloudPoolType.GAME ? GamePoolConfiguration : T extends CloudPoolType.MACHINE ? MachinePoolConfiguration : BaseCloudPoolConfiguration;
|
|
40
40
|
export declare class BaseCloudResource {
|
|
41
41
|
id: string;
|
|
42
42
|
status: CloudResourceStatus;
|
|
@@ -49,7 +49,7 @@ export declare class MachineCloudResource extends BaseCloudResource {
|
|
|
49
49
|
export declare class GameCloudResource extends BaseCloudResource {
|
|
50
50
|
machineResourceId?: string;
|
|
51
51
|
}
|
|
52
|
-
export type CloudResourceType<T extends CloudPoolType | undefined = undefined> = T extends CloudPoolType.GAME ? GameCloudResource : T extends CloudPoolType.MACHINE ? MachineCloudResource : BaseCloudResource;
|
|
52
|
+
export type CloudResourceType<T extends CloudPoolType | undefined = undefined> = T extends undefined ? BaseCloudResource : T extends CloudPoolType.GAME ? GameCloudResource : T extends CloudPoolType.MACHINE ? MachineCloudResource : BaseCloudResource;
|
|
53
53
|
export type CloudResourcesMap<T extends BaseCloudResource> = Record<string, T>;
|
|
54
54
|
export type CloudResourcesStatusMap = Record<CloudResourceStatus, number>;
|
|
55
55
|
export declare class CloudPool<T extends CloudPoolType | undefined = undefined> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pools.js","sourceRoot":"","sources":["../../../src/v3/types/pools.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAMyB;AAEzB,iDAAsD;AACtD,mCAIiB;AAEjB,IAAY,mBASX;AATD,WA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E;;6CACE;AAGX;IADC,IAAA,wBAAM,EAAC,mBAAmB,CAAC;;iDACA;AAG5B;IADC,IAAA,0BAAQ,GAAE;;oDACO;AAIlB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;oDACM;AAGnB;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,mCAA2B,CAAC;8BAC3C,mCAA2B;mDAAC;AAGzC,MAAa,oBAAqB,SAAQ,iBAAiB;CAAG;AAA9D,oDAA8D;AAE9D,MAAa,iBAAkB,SAAQ,iBAAiB;CAIvD;AAJD,8CAIC;AADC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;4DACc;AAgB7B,MAAa,SAAS;CAOrB;AAPD,8BAOC"}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { IsUUID } from "class-validator";
|
|
2
2
|
|
|
3
3
|
import { AllocationRequestData } from "../types";
|
|
4
|
-
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
5
4
|
import { CloudSessionContext } from "../contexts";
|
|
5
|
+
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
6
6
|
import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
|
|
7
7
|
|
|
8
8
|
export class AllocateGameRequestPayload {
|
|
@@ -8,6 +8,8 @@ import {
|
|
|
8
8
|
CloudProviderSettings,
|
|
9
9
|
CloudProvider,
|
|
10
10
|
AllocationRequestData,
|
|
11
|
+
AWSResourceProviderSettings,
|
|
12
|
+
CloudResourceProviderSettings,
|
|
11
13
|
} from "../types";
|
|
12
14
|
|
|
13
15
|
export class AllocateGameResourceRequestPayload {
|
|
@@ -28,6 +30,9 @@ export class AllocateGameResourceRequestPayload {
|
|
|
28
30
|
|
|
29
31
|
@ValidateNestedType(() => AllocationRequestData)
|
|
30
32
|
requestData: AllocationRequestData;
|
|
33
|
+
|
|
34
|
+
@ValidateNestedType(() => AWSResourceProviderSettings)
|
|
35
|
+
resourceProviderSettings: CloudResourceProviderSettings;
|
|
31
36
|
}
|
|
32
37
|
|
|
33
38
|
export class AllocateGameResourceRequest extends LudeoEvent {
|
|
@@ -2,12 +2,12 @@ import { IsUUID, IsEnum } from "class-validator";
|
|
|
2
2
|
|
|
3
3
|
import { CloudResourceContext } from "../contexts";
|
|
4
4
|
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
5
|
-
import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
|
|
6
5
|
import {
|
|
7
|
-
|
|
8
|
-
CloudProviderSettings,
|
|
6
|
+
AWSGameCreationResponse,
|
|
9
7
|
CloudProvider,
|
|
8
|
+
GameCreationResponse,
|
|
10
9
|
} from "../types";
|
|
10
|
+
import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
|
|
11
11
|
|
|
12
12
|
export class GameCreatedResponsePayload {
|
|
13
13
|
@IsUUID()
|
|
@@ -16,11 +16,11 @@ export class GameCreatedResponsePayload {
|
|
|
16
16
|
@IsUUID()
|
|
17
17
|
gamePoolId: string;
|
|
18
18
|
|
|
19
|
-
@ValidateNestedType(() => AWSProviderSettings)
|
|
20
|
-
providerSettings: CloudProviderSettings;
|
|
21
|
-
|
|
22
19
|
@IsEnum(CloudProvider)
|
|
23
20
|
cloudProvider: CloudProvider;
|
|
21
|
+
|
|
22
|
+
@ValidateNestedType(() => AWSGameCreationResponse)
|
|
23
|
+
creationResponse: GameCreationResponse;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
export class GameResourceCreatedResponse extends LudeoEvent {
|
package/src/v3/types/cloud.ts
CHANGED
|
@@ -62,13 +62,13 @@ export class AWSResourceProviderSettings {
|
|
|
62
62
|
|
|
63
63
|
export type CloudResourceProviderSettings = AWSResourceProviderSettings;
|
|
64
64
|
|
|
65
|
-
export class
|
|
65
|
+
export class AWSGameCreationResponse {
|
|
66
66
|
@IsString()
|
|
67
67
|
@IsNotEmpty()
|
|
68
68
|
streamSessionId: string;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
export type
|
|
71
|
+
export type GameCreationResponse = AWSGameCreationResponse;
|
|
72
72
|
|
|
73
73
|
export class AllocationRequestData {
|
|
74
74
|
@IsUUID()
|
package/src/v3/types/pools.ts
CHANGED
|
@@ -71,13 +71,15 @@ export class MachinePoolConfiguration extends BaseCloudPoolConfiguration {
|
|
|
71
71
|
@IsEnum(CloudPoolType)
|
|
72
72
|
type: CloudPoolType.MACHINE;
|
|
73
73
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
74
|
+
export type CloudPoolConfigurationType<
|
|
75
|
+
T extends CloudPoolType | undefined = undefined
|
|
76
|
+
> = T extends undefined
|
|
77
|
+
? BaseCloudPoolConfiguration
|
|
78
|
+
: T extends CloudPoolType.GAME
|
|
79
|
+
? GamePoolConfiguration
|
|
80
|
+
: T extends CloudPoolType.MACHINE
|
|
81
|
+
? MachinePoolConfiguration
|
|
82
|
+
: BaseCloudPoolConfiguration;
|
|
81
83
|
|
|
82
84
|
export class BaseCloudResource {
|
|
83
85
|
@IsUUID()
|
|
@@ -106,7 +108,9 @@ export class GameCloudResource extends BaseCloudResource {
|
|
|
106
108
|
}
|
|
107
109
|
|
|
108
110
|
export type CloudResourceType<T extends CloudPoolType | undefined = undefined> =
|
|
109
|
-
T extends
|
|
111
|
+
T extends undefined
|
|
112
|
+
? BaseCloudResource
|
|
113
|
+
: T extends CloudPoolType.GAME
|
|
110
114
|
? GameCloudResource
|
|
111
115
|
: T extends CloudPoolType.MACHINE
|
|
112
116
|
? MachineCloudResource
|