@ludeo/cloud-common 1.1.135 → 1.1.136

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.
@@ -0,0 +1,14 @@
1
+ import { LudeoEvent } from "../../infra/ludeo-event";
2
+ import { CloudSessionContext } from "../contexts/cloud-session-context";
3
+ import { CloudProvider } from "../types";
4
+ export declare class CloudSessionProviderRequestedPayload {
5
+ cloudProvider: CloudProvider;
6
+ gamePoolId: string;
7
+ region: string;
8
+ }
9
+ export declare class CloudSessionProviderRequested extends LudeoEvent {
10
+ static readonly EVENT_NAME = "cloud-session-allocator.cloud-session-provider-requested";
11
+ constructor(payload: CloudSessionProviderRequestedPayload, context: CloudSessionContext);
12
+ payload: CloudSessionProviderRequestedPayload;
13
+ context: CloudSessionContext;
14
+ }
@@ -0,0 +1,51 @@
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.CloudSessionProviderRequested = exports.CloudSessionProviderRequestedPayload = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ const validate_nested_type_decorator_1 = require("../../decorators/validate-nested-type.decorator");
15
+ const ludeo_event_1 = require("../../infra/ludeo-event");
16
+ const cloud_session_context_1 = require("../contexts/cloud-session-context");
17
+ const types_1 = require("../types");
18
+ class CloudSessionProviderRequestedPayload {
19
+ }
20
+ exports.CloudSessionProviderRequestedPayload = CloudSessionProviderRequestedPayload;
21
+ __decorate([
22
+ (0, class_validator_1.IsEnum)(types_1.CloudProvider),
23
+ __metadata("design:type", String)
24
+ ], CloudSessionProviderRequestedPayload.prototype, "cloudProvider", void 0);
25
+ __decorate([
26
+ (0, class_validator_1.IsString)(),
27
+ (0, class_validator_1.IsUUID)(),
28
+ __metadata("design:type", String)
29
+ ], CloudSessionProviderRequestedPayload.prototype, "gamePoolId", void 0);
30
+ __decorate([
31
+ (0, class_validator_1.IsString)(),
32
+ __metadata("design:type", String)
33
+ ], CloudSessionProviderRequestedPayload.prototype, "region", void 0);
34
+ class CloudSessionProviderRequested extends ludeo_event_1.LudeoEvent {
35
+ constructor(payload, context) {
36
+ super(CloudSessionProviderRequested.EVENT_NAME);
37
+ this.payload = payload;
38
+ this.context = context;
39
+ }
40
+ }
41
+ exports.CloudSessionProviderRequested = CloudSessionProviderRequested;
42
+ CloudSessionProviderRequested.EVENT_NAME = "cloud-session-allocator.cloud-session-provider-requested";
43
+ __decorate([
44
+ (0, validate_nested_type_decorator_1.ValidateNestedType)(() => CloudSessionProviderRequestedPayload),
45
+ __metadata("design:type", CloudSessionProviderRequestedPayload)
46
+ ], CloudSessionProviderRequested.prototype, "payload", void 0);
47
+ __decorate([
48
+ (0, validate_nested_type_decorator_1.ValidateNestedType)(() => cloud_session_context_1.CloudSessionContext),
49
+ __metadata("design:type", cloud_session_context_1.CloudSessionContext)
50
+ ], CloudSessionProviderRequested.prototype, "context", void 0);
51
+ //# sourceMappingURL=cloud-session-provider-requested.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cloud-session-provider-requested.js","sourceRoot":"","sources":["../../../src/v3/events/cloud-session-provider-requested.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA2D;AAC3D,oGAAqF;AACrF,yDAAqD;AACrD,6EAAwE;AACxE,oCAAyC;AAEzC,MAAa,oCAAoC;CAUhD;AAVD,oFAUC;AARC;IADC,IAAA,wBAAM,EAAC,qBAAa,CAAC;;2EACO;AAI7B;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,wBAAM,GAAE;;wEACU;AAGnB;IADC,IAAA,0BAAQ,GAAE;;oEACI;AAGjB,MAAa,6BAA8B,SAAQ,wBAAU;IAI3D,YACE,OAA6C,EAC7C,OAA4B;QAE5B,KAAK,CAAC,6BAA6B,CAAC,UAAU,CAAC,CAAC;QAChD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAXH,sEAkBC;AAjBiB,wCAAU,GACxB,0DAA0D,CAAC;AAY7D;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,oCAAoC,CAAC;8BACtD,oCAAoC;8DAAC;AAG9C;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,2CAAmB,CAAC;8BACrC,2CAAmB;8DAAC"}
@@ -0,0 +1,11 @@
1
+ import { LudeoEvent } from "../../infra/ludeo-event";
2
+ import { CloudPoolContext } from "../contexts";
3
+ export declare class GameAvailablePayload {
4
+ gamePoolId: string;
5
+ }
6
+ export declare class GameAvailable extends LudeoEvent {
7
+ static readonly EVENT_NAME = "cloud-pools.game-available";
8
+ constructor(payload: GameAvailablePayload, context: CloudPoolContext);
9
+ context: CloudPoolContext;
10
+ payload: GameAvailablePayload;
11
+ }
@@ -0,0 +1,42 @@
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.GameAvailable = exports.GameAvailablePayload = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ const validate_nested_type_decorator_1 = require("../../decorators/validate-nested-type.decorator");
15
+ const ludeo_event_1 = require("../../infra/ludeo-event");
16
+ const contexts_1 = require("../contexts");
17
+ class GameAvailablePayload {
18
+ }
19
+ exports.GameAvailablePayload = GameAvailablePayload;
20
+ __decorate([
21
+ (0, class_validator_1.IsString)(),
22
+ (0, class_validator_1.IsUUID)(),
23
+ __metadata("design:type", String)
24
+ ], GameAvailablePayload.prototype, "gamePoolId", void 0);
25
+ class GameAvailable extends ludeo_event_1.LudeoEvent {
26
+ constructor(payload, context) {
27
+ super(GameAvailable.EVENT_NAME);
28
+ this.payload = payload;
29
+ this.context = context;
30
+ }
31
+ }
32
+ exports.GameAvailable = GameAvailable;
33
+ GameAvailable.EVENT_NAME = "cloud-pools.game-available";
34
+ __decorate([
35
+ (0, validate_nested_type_decorator_1.ValidateNestedType)(() => contexts_1.CloudPoolContext),
36
+ __metadata("design:type", contexts_1.CloudPoolContext)
37
+ ], GameAvailable.prototype, "context", void 0);
38
+ __decorate([
39
+ (0, validate_nested_type_decorator_1.ValidateNestedType)(() => GameAvailablePayload),
40
+ __metadata("design:type", GameAvailablePayload)
41
+ ], GameAvailable.prototype, "payload", void 0);
42
+ //# sourceMappingURL=game-available.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"game-available.js","sourceRoot":"","sources":["../../../src/v3/events/game-available.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAmD;AAEnD,oGAAqF;AACrF,yDAAqD;AACrD,0CAA+C;AAE/C,MAAa,oBAAoB;CAIhC;AAJD,oDAIC;AADC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,wBAAM,GAAE;;wDACU;AAGrB,MAAa,aAAc,SAAQ,wBAAU;IAG3C,YAAY,OAA6B,EAAE,OAAyB;QAClE,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;QAChC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAPH,sCAcC;AAbiB,wBAAU,GAAG,4BAA4B,CAAC;AAS1D;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,2BAAgB,CAAC;8BAClC,2BAAgB;8CAAC;AAG1B;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,oBAAoB,CAAC;8BACtC,oBAAoB;8CAAC"}
@@ -4,12 +4,14 @@ export * from "./allocate-machine-request";
4
4
  export * from "./aws-reactivate-stream-session-task";
5
5
  export * from "./aws-stream-session-reactivation-started";
6
6
  export * from "./cloud-machine-auth-ready";
7
+ export * from "./cloud-session-provider-requested";
7
8
  export * from "./create-game-resource-request";
8
9
  export * from "./create-games-request";
9
10
  export * from "./create-machine-resource-batch-request";
10
11
  export * from "./create-machine-resource-request";
11
12
  export * from "./create-machines-request";
12
13
  export * from "./deallocate-machine-request";
14
+ export * from "./game-available";
13
15
  export * from "./game-allocated-response";
14
16
  export * from "./game-allocation-failed-response";
15
17
  export * from "./game-resource-allocated-response";
@@ -20,12 +20,14 @@ __exportStar(require("./allocate-machine-request"), exports);
20
20
  __exportStar(require("./aws-reactivate-stream-session-task"), exports);
21
21
  __exportStar(require("./aws-stream-session-reactivation-started"), exports);
22
22
  __exportStar(require("./cloud-machine-auth-ready"), exports);
23
+ __exportStar(require("./cloud-session-provider-requested"), exports);
23
24
  __exportStar(require("./create-game-resource-request"), exports);
24
25
  __exportStar(require("./create-games-request"), exports);
25
26
  __exportStar(require("./create-machine-resource-batch-request"), exports);
26
27
  __exportStar(require("./create-machine-resource-request"), exports);
27
28
  __exportStar(require("./create-machines-request"), exports);
28
29
  __exportStar(require("./deallocate-machine-request"), exports);
30
+ __exportStar(require("./game-available"), exports);
29
31
  __exportStar(require("./game-allocated-response"), exports);
30
32
  __exportStar(require("./game-allocation-failed-response"), exports);
31
33
  __exportStar(require("./game-resource-allocated-response"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/v3/events/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,mEAAiD;AACjD,6DAA2C;AAC3C,uEAAqD;AACrD,4EAA0D;AAC1D,6DAA2C;AAC3C,iEAA+C;AAC/C,yDAAuC;AACvC,0EAAwD;AACxD,oEAAkD;AAClD,4DAA0C;AAC1C,+DAA6C;AAC7C,4DAA0C;AAC1C,oEAAkD;AAClD,qEAAmD;AACnD,6EAA2D;AAC3D,mEAAiD;AACjD,2EAAyD;AACzD,sEAAoD;AACpD,8EAA4D;AAC5D,6DAA2C;AAC3C,qEAAmD;AACnD,iEAA+C;AAC/C,+DAA6C;AAC7C,uEAAqD;AACrD,iEAA+C;AAC/C,yEAAuD;AACvD,+DAA6C;AAC7C,oFAAkE;AAClE,uFAAqE;AACrE,sEAAoD;AACpD,8EAA4D;AAC5D,yEAAuD;AACvD,6DAA2C;AAC3C,+DAA6C;AAC7C,gDAA8B;AAC9B,4DAA0C;AAC1C,6CAA2B;AAC3B,oDAAkC;AAClC,8DAA4C;AAC5C,mEAAiD;AACjD,4DAA0C;AAC1C,2DAAyC;AACzC,oEAAkD;AAClD,4DAA0C;AAC1C,uEAAqD;AACrD,6EAA2D;AAC3D,+DAA6C;AAC7C,0DAAwC;AACxC,6DAA2C;AAC3C,+DAA6C;AAC7C,sEAAoD;AACpD,yDAAuC;AACvC,6DAA2C;AAC3C,kEAAgD;AAChD,mEAAiD;AACjD,+DAA6C;AAC7C,gEAA8C;AAC9C,oEAAkD;AAClD,0DAAwC;AACxC,4DAA0C;AAC1C,mEAAiD;AACjD,wDAAsC;AACtC,0DAAwC;AACxC,0EAAwD;AACxD,iEAA+C;AAC/C,qEAAmD;AACnD,4EAA0D;AAC1D,8DAA4C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/v3/events/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,mEAAiD;AACjD,6DAA2C;AAC3C,uEAAqD;AACrD,4EAA0D;AAC1D,6DAA2C;AAC3C,qEAAmD;AACnD,iEAA+C;AAC/C,yDAAuC;AACvC,0EAAwD;AACxD,oEAAkD;AAClD,4DAA0C;AAC1C,+DAA6C;AAC7C,mDAAiC;AACjC,4DAA0C;AAC1C,oEAAkD;AAClD,qEAAmD;AACnD,6EAA2D;AAC3D,mEAAiD;AACjD,2EAAyD;AACzD,sEAAoD;AACpD,8EAA4D;AAC5D,6DAA2C;AAC3C,qEAAmD;AACnD,iEAA+C;AAC/C,+DAA6C;AAC7C,uEAAqD;AACrD,iEAA+C;AAC/C,yEAAuD;AACvD,+DAA6C;AAC7C,oFAAkE;AAClE,uFAAqE;AACrE,sEAAoD;AACpD,8EAA4D;AAC5D,yEAAuD;AACvD,6DAA2C;AAC3C,+DAA6C;AAC7C,gDAA8B;AAC9B,4DAA0C;AAC1C,6CAA2B;AAC3B,oDAAkC;AAClC,8DAA4C;AAC5C,mEAAiD;AACjD,4DAA0C;AAC1C,2DAAyC;AACzC,oEAAkD;AAClD,4DAA0C;AAC1C,uEAAqD;AACrD,6EAA2D;AAC3D,+DAA6C;AAC7C,0DAAwC;AACxC,6DAA2C;AAC3C,+DAA6C;AAC7C,sEAAoD;AACpD,yDAAuC;AACvC,6DAA2C;AAC3C,kEAAgD;AAChD,mEAAiD;AACjD,+DAA6C;AAC7C,gEAA8C;AAC9C,oEAAkD;AAClD,0DAAwC;AACxC,4DAA0C;AAC1C,mEAAiD;AACjD,wDAAsC;AACtC,0DAAwC;AACxC,0EAAwD;AACxD,iEAA+C;AAC/C,qEAAmD;AACnD,4EAA0D;AAC1D,8DAA4C"}
@@ -4,7 +4,8 @@ export declare class AWSRequestData {
4
4
  }
5
5
  export type CloudProviderRequest = AWSRequestData;
6
6
  export declare enum CloudProvider {
7
- AWS = "aws"
7
+ AWS = "aws",
8
+ NVIDIA = "nvidia"
8
9
  }
9
10
  export declare class AWSProviderSettings {
10
11
  streamGroupId: GameCast.Identifier;
@@ -23,6 +23,7 @@ __decorate([
23
23
  var CloudProvider;
24
24
  (function (CloudProvider) {
25
25
  CloudProvider["AWS"] = "aws";
26
+ CloudProvider["NVIDIA"] = "nvidia";
26
27
  })(CloudProvider || (exports.CloudProvider = CloudProvider = {}));
27
28
  class AWSProviderSettings {
28
29
  }
@@ -1 +1 @@
1
- {"version":3,"file":"cloud.js","sourceRoot":"","sources":["../../../src/v3/types/cloud.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,qDAQyB;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;CAS/B;AATD,kDASC;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;CAgBvC;AAhBD,kEAgBC;AAbC;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;AAI9B;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAA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Y,kBAQX;AARD,WAAY,kBAAkB;IAC5B,yCAAmB,CAAA;IACnB,mDAA6B,CAAA;IAC7B,mDAA6B,CAAA;IAC7B,qDAA+B,CAAA;IAC/B,6CAAuB,CAAA;IACvB,+CAAyB,CAAA;IACzB,uCAAiB,CAAA;AACnB,CAAC,EARW,kBAAkB,kCAAlB,kBAAkB,QAQ7B;AAED,MAAa,YAAY;CAmDxB;AAnDD,oCAmDC;AAjDC;IADC,IAAA,wBAAM,GAAE;;wCACE;AAGX;IADC,IAAA,wBAAM,GAAE;;4CACM;AAGf;IADC,IAAA,wBAAM,GAAE;;4CACM;AAGf;IADC,IAAA,wBAAM,GAAE;;6CACO;AAGhB;IADC,IAAA,0BAAQ,GAAE;;+CACO;AAGlB;IADC,IAAA,0BAAQ,GAAE;;+CACO;AAGlB;IADC,IAAA,wBAAM,EAAC,kBAAkB,CAAC;;4CACA;AAG3B;IADC,IAAA,wBAAM,EAAC,aAAa,CAAC;;mDACO;AAI7B;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;oDACe;AAIxB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;4CACO;AAGhB;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,qBAAqB,CAAC;8BACnC,qBAAqB;iDAAC;AAInC;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,iBAAiB,CAAC;;oDACC;AAG7C;IADC,IAAA,wBAAM,GAAE;;qDACe;AAIxB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;kDACW;AAKtB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;gDACS"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ludeo/cloud-common",
3
- "version": "1.1.135",
3
+ "version": "1.1.136",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "author": "Yahil Didi",
@@ -0,0 +1,37 @@
1
+ import { IsEnum, IsString, IsUUID } from "class-validator";
2
+ import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
3
+ import { LudeoEvent } from "../../infra/ludeo-event";
4
+ import { CloudSessionContext } from "../contexts/cloud-session-context";
5
+ import { CloudProvider } from "../types";
6
+
7
+ export class CloudSessionProviderRequestedPayload {
8
+ @IsEnum(CloudProvider)
9
+ cloudProvider: CloudProvider;
10
+
11
+ @IsString()
12
+ @IsUUID()
13
+ gamePoolId: string;
14
+
15
+ @IsString()
16
+ region: string;
17
+ }
18
+
19
+ export class CloudSessionProviderRequested extends LudeoEvent {
20
+ static readonly EVENT_NAME =
21
+ "cloud-session-allocator.cloud-session-provider-requested";
22
+
23
+ constructor(
24
+ payload: CloudSessionProviderRequestedPayload,
25
+ context: CloudSessionContext
26
+ ) {
27
+ super(CloudSessionProviderRequested.EVENT_NAME);
28
+ this.payload = payload;
29
+ this.context = context;
30
+ }
31
+
32
+ @ValidateNestedType(() => CloudSessionProviderRequestedPayload)
33
+ payload: CloudSessionProviderRequestedPayload;
34
+
35
+ @ValidateNestedType(() => CloudSessionContext)
36
+ context: CloudSessionContext;
37
+ }
@@ -0,0 +1,27 @@
1
+ import { IsString, IsUUID } from "class-validator";
2
+
3
+ import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
4
+ import { LudeoEvent } from "../../infra/ludeo-event";
5
+ import { CloudPoolContext } from "../contexts";
6
+
7
+ export class GameAvailablePayload {
8
+ @IsString()
9
+ @IsUUID()
10
+ gamePoolId: string;
11
+ }
12
+
13
+ export class GameAvailable extends LudeoEvent {
14
+ static readonly EVENT_NAME = "cloud-pools.game-available";
15
+
16
+ constructor(payload: GameAvailablePayload, context: CloudPoolContext) {
17
+ super(GameAvailable.EVENT_NAME);
18
+ this.payload = payload;
19
+ this.context = context;
20
+ }
21
+
22
+ @ValidateNestedType(() => CloudPoolContext)
23
+ context: CloudPoolContext;
24
+
25
+ @ValidateNestedType(() => GameAvailablePayload)
26
+ payload: GameAvailablePayload;
27
+ }
@@ -4,12 +4,14 @@ export * from "./allocate-machine-request";
4
4
  export * from "./aws-reactivate-stream-session-task";
5
5
  export * from "./aws-stream-session-reactivation-started";
6
6
  export * from "./cloud-machine-auth-ready";
7
+ export * from "./cloud-session-provider-requested";
7
8
  export * from "./create-game-resource-request";
8
9
  export * from "./create-games-request";
9
10
  export * from "./create-machine-resource-batch-request";
10
11
  export * from "./create-machine-resource-request";
11
12
  export * from "./create-machines-request";
12
13
  export * from "./deallocate-machine-request";
14
+ export * from "./game-available";
13
15
  export * from "./game-allocated-response";
14
16
  export * from "./game-allocation-failed-response";
15
17
  export * from "./game-resource-allocated-response";
@@ -20,6 +20,7 @@ export type CloudProviderRequest = AWSRequestData;
20
20
 
21
21
  export enum CloudProvider {
22
22
  AWS = "aws",
23
+ NVIDIA = "nvidia",
23
24
  }
24
25
 
25
26
  export class AWSProviderSettings {