@ludeo/cloud-common 1.0.11 → 1.0.13
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/v2/contexts/cloud-resource-context.d.ts +2 -0
- package/dist/v2/contexts/cloud-resource-context.js +5 -0
- package/dist/v2/contexts/cloud-resource-context.js.map +1 -1
- package/dist/v2/events/allocate-cloud-resource-request.event.d.ts +4 -3
- package/dist/v2/events/allocate-cloud-resource-request.event.js +7 -3
- package/dist/v2/events/allocate-cloud-resource-request.event.js.map +1 -1
- package/dist/v2/events/allocate-pool-item-request.event.d.ts +2 -2
- package/dist/v2/events/allocate-pool-item-request.event.js +2 -2
- package/dist/v2/events/allocate-pool-item-request.event.js.map +1 -1
- package/dist/v2/events/cloud-resource-created.event.d.ts +3 -8
- package/dist/v2/events/cloud-resource-created.event.js +4 -14
- package/dist/v2/events/cloud-resource-created.event.js.map +1 -1
- package/dist/v2/events/create-cloud-resource-request.event.d.ts +2 -2
- package/dist/v2/events/create-cloud-resource-request.event.js +1 -1
- package/dist/v2/events/create-cloud-resource-request.event.js.map +1 -1
- package/dist/v2/types/cloud.d.ts +4 -9
- package/dist/v2/types/cloud.js +4 -20
- package/dist/v2/types/cloud.js.map +1 -1
- package/dist/v2/types/pools.d.ts +2 -2
- package/jest.config.ts +1 -1
- package/package.json +1 -1
- package/src/v2/contexts/cloud-resource-context.ts +5 -1
- package/src/v2/events/allocate-cloud-resource-request.event.ts +12 -7
- package/src/v2/events/allocate-pool-item-request.event.ts +3 -3
- package/src/v2/events/cloud-resource-created.event.ts +8 -13
- package/src/v2/events/create-cloud-resource-request.event.ts +4 -4
- package/src/v2/events/token-required.event.ts +10 -1
- package/src/v2/types/cloud.ts +7 -25
- package/src/v2/types/pools.ts +2 -2
|
@@ -11,6 +11,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.CloudResourceContext = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
|
+
const cloud_1 = require("../types/cloud");
|
|
14
15
|
class CloudResourceContext {
|
|
15
16
|
}
|
|
16
17
|
exports.CloudResourceContext = CloudResourceContext;
|
|
@@ -30,4 +31,8 @@ __decorate([
|
|
|
30
31
|
(0, class_validator_1.IsUUID)(),
|
|
31
32
|
__metadata("design:type", String)
|
|
32
33
|
], CloudResourceContext.prototype, "poolId", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, class_validator_1.IsEnum)(cloud_1.CloudProvider),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], CloudResourceContext.prototype, "cloudProvider", void 0);
|
|
33
38
|
//# sourceMappingURL=cloud-resource-context.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloud-resource-context.js","sourceRoot":"","sources":["../../../src/v2/contexts/cloud-resource-context.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"cloud-resource-context.js","sourceRoot":"","sources":["../../../src/v2/contexts/cloud-resource-context.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA2D;AAC3D,0CAA+C;AAE/C,MAAa,oBAAoB;CAehC;AAfD,oDAeC;AAbC;IADC,IAAA,wBAAM,GAAE;;wDACU;AAGnB;IADC,IAAA,0BAAQ,GAAE;;2DACW;AAGtB;IADC,IAAA,0BAAQ,GAAE;;6DACa;AAGxB;IADC,IAAA,wBAAM,GAAE;;oDACM;AAGf;IADC,IAAA,wBAAM,EAAC,qBAAa,CAAC;;2DACO"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { CloudSessionContext } from "../contexts/cloud-session-context";
|
|
2
2
|
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
3
|
-
import {
|
|
3
|
+
import { AllocationRequestData, CloudProviderSettings, CloudResourceProviderSettings } from "../types";
|
|
4
4
|
export declare class AllocateCloudResourceRequestPayload {
|
|
5
|
-
providerSettings:
|
|
6
|
-
requestData:
|
|
5
|
+
providerSettings: CloudProviderSettings;
|
|
6
|
+
requestData: AllocationRequestData;
|
|
7
|
+
resourceProviderSettings: CloudResourceProviderSettings;
|
|
7
8
|
}
|
|
8
9
|
export declare class AllocateCloudResourceRequestEvent extends LudeoEvent {
|
|
9
10
|
static readonly EVENT_NAME = "cloud-pools.allocate-cloud-resource-request";
|
|
@@ -18,13 +18,17 @@ class AllocateCloudResourceRequestPayload {
|
|
|
18
18
|
}
|
|
19
19
|
exports.AllocateCloudResourceRequestPayload = AllocateCloudResourceRequestPayload;
|
|
20
20
|
__decorate([
|
|
21
|
-
(0, validate_nested_type_decorator_1.ValidateNestedType)(() => types_1.
|
|
21
|
+
(0, validate_nested_type_decorator_1.ValidateNestedType)(() => types_1.AWSProviderSettings),
|
|
22
22
|
__metadata("design:type", Object)
|
|
23
23
|
], AllocateCloudResourceRequestPayload.prototype, "providerSettings", void 0);
|
|
24
24
|
__decorate([
|
|
25
|
-
(0, validate_nested_type_decorator_1.ValidateNestedType)(() => types_1.
|
|
26
|
-
__metadata("design:type", types_1.
|
|
25
|
+
(0, validate_nested_type_decorator_1.ValidateNestedType)(() => types_1.AllocationRequestData),
|
|
26
|
+
__metadata("design:type", types_1.AllocationRequestData)
|
|
27
27
|
], AllocateCloudResourceRequestPayload.prototype, "requestData", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, validate_nested_type_decorator_1.ValidateNestedType)(() => types_1.AWSResourceProviderSettings),
|
|
30
|
+
__metadata("design:type", Object)
|
|
31
|
+
], AllocateCloudResourceRequestPayload.prototype, "resourceProviderSettings", void 0);
|
|
28
32
|
class AllocateCloudResourceRequestEvent extends ludeo_event_1.LudeoEvent {
|
|
29
33
|
constructor(payload, context) {
|
|
30
34
|
super(AllocateCloudResourceRequestEvent.EVENT_NAME);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allocate-cloud-resource-request.event.js","sourceRoot":"","sources":["../../../src/v2/events/allocate-cloud-resource-request.event.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6EAAwE;AACxE,oGAAqF;AACrF,yDAAqD;AACrD,
|
|
1
|
+
{"version":3,"file":"allocate-cloud-resource-request.event.js","sourceRoot":"","sources":["../../../src/v2/events/allocate-cloud-resource-request.event.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6EAAwE;AACxE,oGAAqF;AACrF,yDAAqD;AACrD,oCAMkB;AAElB,MAAa,mCAAmC;CAS/C;AATD,kFASC;AAPC;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,2BAAmB,CAAC;;6EACN;AAGxC;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,6BAAqB,CAAC;8BACnC,6BAAqB;wEAAC;AAGnC;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,mCAA2B,CAAC;;qFACE;AAG1D,MAAa,iCAAkC,SAAQ,wBAAU;IAG/D,YACE,OAA4C,EAC5C,OAA4B;QAE5B,KAAK,CAAC,iCAAiC,CAAC,UAAU,CAAC,CAAC;QACpD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAVH,8EAiBC;AAhBiB,4CAAU,GAAG,6CAA6C,CAAC;AAY3E;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,2CAAmB,CAAC;8BACrC,2CAAmB;kEAAC;AAG7B;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,mCAAmC,CAAC;8BACrD,mCAAmC;kEAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
2
2
|
import { CloudSessionContext } from "../contexts/cloud-session-context";
|
|
3
|
-
import {
|
|
3
|
+
import { AllocationRequestData } from "../types";
|
|
4
4
|
export declare class AllocatePoolItemRequestPayload {
|
|
5
|
-
requestData:
|
|
5
|
+
requestData: AllocationRequestData;
|
|
6
6
|
}
|
|
7
7
|
export declare class AllocatePoolItemRequestEvent extends LudeoEvent {
|
|
8
8
|
static readonly EVENT_NAME = "cloud-session-allocator.allocate-pool-item-request";
|
|
@@ -18,8 +18,8 @@ class AllocatePoolItemRequestPayload {
|
|
|
18
18
|
}
|
|
19
19
|
exports.AllocatePoolItemRequestPayload = AllocatePoolItemRequestPayload;
|
|
20
20
|
__decorate([
|
|
21
|
-
(0, validate_nested_type_decorator_1.ValidateNestedType)(() => types_1.
|
|
22
|
-
__metadata("design:type", types_1.
|
|
21
|
+
(0, validate_nested_type_decorator_1.ValidateNestedType)(() => types_1.AllocationRequestData),
|
|
22
|
+
__metadata("design:type", types_1.AllocationRequestData)
|
|
23
23
|
], AllocatePoolItemRequestPayload.prototype, "requestData", void 0);
|
|
24
24
|
class AllocatePoolItemRequestEvent extends ludeo_event_1.LudeoEvent {
|
|
25
25
|
constructor(payload, context) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allocate-pool-item-request.event.js","sourceRoot":"","sources":["../../../src/v2/events/allocate-pool-item-request.event.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAqD;AACrD,oGAAqF;AACrF,6EAAwE;AACxE,
|
|
1
|
+
{"version":3,"file":"allocate-pool-item-request.event.js","sourceRoot":"","sources":["../../../src/v2/events/allocate-pool-item-request.event.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAqD;AACrD,oGAAqF;AACrF,6EAAwE;AACxE,oCAAiD;AAEjD,MAAa,8BAA8B;CAG1C;AAHD,wEAGC;AADC;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,6BAAqB,CAAC;8BACnC,6BAAqB;mEAAC;AAGrC,MAAa,4BAA6B,SAAQ,wBAAU;IAI1D,YACE,OAAuC,EACvC,OAA4B;QAE5B,KAAK,CAAC,4BAA4B,CAAC,UAAU,CAAC,CAAC;QAC/C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAXH,oEAkBC;AAjBiB,uCAAU,GACxB,oDAAoD,CAAC;AAYvD;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,2CAAmB,CAAC;8BACrC,2CAAmB;6DAAC;AAG7B;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,8BAA8B,CAAC;8BAChD,8BAA8B;6DAAC"}
|
|
@@ -1,20 +1,15 @@
|
|
|
1
1
|
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
2
2
|
import { CloudProvider, CreationResponse } from "../types";
|
|
3
|
-
import {
|
|
3
|
+
import { CloudResourceContext } from "../contexts";
|
|
4
4
|
export declare class CloudResourceCreatedPayload {
|
|
5
5
|
resourceId: string;
|
|
6
6
|
poolId: string;
|
|
7
7
|
cloudProvider: CloudProvider;
|
|
8
|
-
clientRequestId?: string;
|
|
9
|
-
cloudSessionId?: string;
|
|
10
8
|
creationResponse: CreationResponse;
|
|
11
9
|
}
|
|
12
10
|
export declare class CloudResourceCreated extends LudeoEvent {
|
|
13
11
|
static readonly EVENT_NAME = "cloud-resources.cloud-resource-created";
|
|
14
|
-
constructor(
|
|
15
|
-
payload?: any;
|
|
16
|
-
context?: any;
|
|
17
|
-
});
|
|
12
|
+
constructor(payload: CloudResourceCreatedPayload, context: CloudResourceContext);
|
|
18
13
|
payload: CloudResourceCreatedPayload;
|
|
19
|
-
context:
|
|
14
|
+
context: CloudResourceContext;
|
|
20
15
|
}
|
|
@@ -12,9 +12,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.CloudResourceCreated = exports.CloudResourceCreatedPayload = void 0;
|
|
13
13
|
const ludeo_event_1 = require("../../infra/ludeo-event");
|
|
14
14
|
const types_1 = require("../types");
|
|
15
|
-
const cloud_session_context_1 = require("../contexts/cloud-session-context");
|
|
16
15
|
const class_validator_1 = require("class-validator");
|
|
17
16
|
const validate_nested_type_decorator_1 = require("../../decorators/validate-nested-type.decorator");
|
|
17
|
+
const contexts_1 = require("../contexts");
|
|
18
18
|
class CloudResourceCreatedPayload {
|
|
19
19
|
}
|
|
20
20
|
exports.CloudResourceCreatedPayload = CloudResourceCreatedPayload;
|
|
@@ -30,22 +30,12 @@ __decorate([
|
|
|
30
30
|
(0, class_validator_1.IsEnum)(types_1.CloudProvider),
|
|
31
31
|
__metadata("design:type", String)
|
|
32
32
|
], CloudResourceCreatedPayload.prototype, "cloudProvider", void 0);
|
|
33
|
-
__decorate([
|
|
34
|
-
(0, class_validator_1.IsUUID)(),
|
|
35
|
-
(0, class_validator_1.IsOptional)(),
|
|
36
|
-
__metadata("design:type", String)
|
|
37
|
-
], CloudResourceCreatedPayload.prototype, "clientRequestId", void 0);
|
|
38
|
-
__decorate([
|
|
39
|
-
(0, class_validator_1.IsOptional)(),
|
|
40
|
-
(0, class_validator_1.IsUUID)(),
|
|
41
|
-
__metadata("design:type", String)
|
|
42
|
-
], CloudResourceCreatedPayload.prototype, "cloudSessionId", void 0);
|
|
43
33
|
__decorate([
|
|
44
34
|
(0, validate_nested_type_decorator_1.ValidateNestedType)(() => types_1.AWSCreationResponse),
|
|
45
35
|
__metadata("design:type", Object)
|
|
46
36
|
], CloudResourceCreatedPayload.prototype, "creationResponse", void 0);
|
|
47
37
|
class CloudResourceCreated extends ludeo_event_1.LudeoEvent {
|
|
48
|
-
constructor(
|
|
38
|
+
constructor(payload, context) {
|
|
49
39
|
super(CloudResourceCreated.EVENT_NAME);
|
|
50
40
|
this.payload = payload;
|
|
51
41
|
this.context = context;
|
|
@@ -58,7 +48,7 @@ __decorate([
|
|
|
58
48
|
__metadata("design:type", CloudResourceCreatedPayload)
|
|
59
49
|
], CloudResourceCreated.prototype, "payload", void 0);
|
|
60
50
|
__decorate([
|
|
61
|
-
(0, validate_nested_type_decorator_1.ValidateNestedType)(() =>
|
|
62
|
-
__metadata("design:type",
|
|
51
|
+
(0, validate_nested_type_decorator_1.ValidateNestedType)(() => contexts_1.CloudResourceContext),
|
|
52
|
+
__metadata("design:type", contexts_1.CloudResourceContext)
|
|
63
53
|
], CloudResourceCreated.prototype, "context", void 0);
|
|
64
54
|
//# sourceMappingURL=cloud-resource-created.event.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloud-resource-created.event.js","sourceRoot":"","sources":["../../../src/v2/events/cloud-resource-created.event.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAqD;AACrD,oCAAgF;AAChF,
|
|
1
|
+
{"version":3,"file":"cloud-resource-created.event.js","sourceRoot":"","sources":["../../../src/v2/events/cloud-resource-created.event.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAqD;AACrD,oCAAgF;AAChF,qDAAiD;AACjD,oGAAqF;AACrF,0CAAmD;AAEnD,MAAa,2BAA2B;CAYvC;AAZD,kEAYC;AAVC;IADC,IAAA,wBAAM,GAAE;;+DACU;AAGnB;IADC,IAAA,wBAAM,GAAE;;2DACM;AAGf;IADC,IAAA,wBAAM,EAAC,qBAAa,CAAC;;kEACO;AAG7B;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,2BAAmB,CAAC;;qEACX;AAGrC,MAAa,oBAAqB,SAAQ,wBAAU;IAGlD,YACE,OAAoC,EACpC,OAA6B;QAE7B,KAAK,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC;QACvC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAVH,oDAiBC;AAhBiB,+BAAU,GAAG,wCAAwC,CAAC;AAYtE;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,2BAA2B,CAAC;8BAC7C,2BAA2B;qDAAC;AAGrC;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,+BAAoB,CAAC;8BACtC,+BAAoB;qDAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { CreateCloudResourceRequestContext } from "../contexts/create-cloud-resource-request-context";
|
|
2
2
|
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
3
|
-
import { CloudProvider,
|
|
3
|
+
import { CloudProvider, CloudProviderSettings } from "../types";
|
|
4
4
|
export declare class CreateCloudResourceRequestPayload {
|
|
5
5
|
poolId: string;
|
|
6
6
|
resourceId: string;
|
|
7
|
-
providerSettings:
|
|
7
|
+
providerSettings: CloudProviderSettings;
|
|
8
8
|
cloudProvider: CloudProvider;
|
|
9
9
|
cloudToken: string;
|
|
10
10
|
}
|
|
@@ -27,7 +27,7 @@ __decorate([
|
|
|
27
27
|
__metadata("design:type", String)
|
|
28
28
|
], CreateCloudResourceRequestPayload.prototype, "resourceId", void 0);
|
|
29
29
|
__decorate([
|
|
30
|
-
(0, validate_nested_type_decorator_1.ValidateNestedType)(() => types_1.
|
|
30
|
+
(0, validate_nested_type_decorator_1.ValidateNestedType)(() => types_1.AWSProviderSettings),
|
|
31
31
|
__metadata("design:type", Object)
|
|
32
32
|
], CreateCloudResourceRequestPayload.prototype, "providerSettings", void 0);
|
|
33
33
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-cloud-resource-request.event.js","sourceRoot":"","sources":["../../../src/v2/events/create-cloud-resource-request.event.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA2D;AAC3D,6GAAsG;AACtG,yDAAqD;AACrD,oGAAqF;AACrF,oCAIkB;AAElB,MAAa,iCAAiC;CAe7C;AAfD,8EAeC;AAbC;IADC,IAAA,wBAAM,GAAE;;iEACM;AAGf;IADC,IAAA,wBAAM,GAAE;;qEACU;AAGnB;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"create-cloud-resource-request.event.js","sourceRoot":"","sources":["../../../src/v2/events/create-cloud-resource-request.event.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA2D;AAC3D,6GAAsG;AACtG,yDAAqD;AACrD,oGAAqF;AACrF,oCAIkB;AAElB,MAAa,iCAAiC;CAe7C;AAfD,8EAeC;AAbC;IADC,IAAA,wBAAM,GAAE;;iEACM;AAGf;IADC,IAAA,wBAAM,GAAE;;qEACU;AAGnB;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,2BAAmB,CAAC;;2EACN;AAGxC;IADC,IAAA,wBAAM,EAAC,qBAAa,CAAC;;wEACO;AAG7B;IADC,IAAA,0BAAQ,GAAE;;qEACQ;AAGrB,MAAa,+BAAgC,SAAQ,wBAAU;IAG7D,YACE,OAA0C,EAC1C,OAA0C;QAE1C,KAAK,CAAC,+BAA+B,CAAC,UAAU,CAAC,CAAC;QAClD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAVH,0EAiBC;AAhBiB,0CAAU,GAAG,2CAA2C,CAAC;AAYzE;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,yEAAiC,CAAC;8BACnD,yEAAiC;gEAAC;AAG3C;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,iCAAiC,CAAC;8BACnD,iCAAiC;gEAAC"}
|
package/dist/v2/types/cloud.d.ts
CHANGED
|
@@ -3,17 +3,11 @@ export declare class AWSRequestData {
|
|
|
3
3
|
signalRequest: string;
|
|
4
4
|
}
|
|
5
5
|
export type CloudProviderRequest = AWSRequestData;
|
|
6
|
-
export declare class CloudProviderRequestData {
|
|
7
|
-
authToken: string;
|
|
8
|
-
appToken: string;
|
|
9
|
-
cloudProviderRequest: CloudProviderRequest;
|
|
10
|
-
}
|
|
11
6
|
export declare enum CloudProvider {
|
|
12
7
|
AWS = "aws"
|
|
13
8
|
}
|
|
14
|
-
export declare class
|
|
15
|
-
streamGroupId:
|
|
16
|
-
identifier: GameCast.Identifier;
|
|
9
|
+
export declare class AWSProviderSettings {
|
|
10
|
+
streamGroupId: GameCast.Identifier;
|
|
17
11
|
additionalEnvironmentVariables?: GameCast.EnvironmentVariables;
|
|
18
12
|
protocol?: GameCast.Protocol;
|
|
19
13
|
connectionTimeoutSeconds?: GameCast.ConnectionTimeoutSeconds;
|
|
@@ -21,7 +15,7 @@ export declare class AWSResourceCreationConfig {
|
|
|
21
15
|
applicationIdentifier?: GameCast.Identifier;
|
|
22
16
|
region?: string;
|
|
23
17
|
}
|
|
24
|
-
export type
|
|
18
|
+
export type CloudProviderSettings = AWSProviderSettings;
|
|
25
19
|
export declare class AwsAllocationData {
|
|
26
20
|
streamGroupId: string;
|
|
27
21
|
streamSessionId: string;
|
|
@@ -33,6 +27,7 @@ export declare class AWSResourceProviderSettings {
|
|
|
33
27
|
streamGroupId: string;
|
|
34
28
|
cloudProvider?: CloudProvider;
|
|
35
29
|
}
|
|
30
|
+
export type CloudResourceProviderSettings = AWSResourceProviderSettings;
|
|
36
31
|
export declare class AWSCreationResponse {
|
|
37
32
|
signalResponse?: GameCast.SignalResponse;
|
|
38
33
|
streamSessionId: string;
|
package/dist/v2/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.AWSCreationResponse = exports.AWSResourceProviderSettings = exports.AwsAllocationData = exports.
|
|
12
|
+
exports.AllocationRequestData = exports.AWSCreationResponse = exports.AWSResourceProviderSettings = exports.AwsAllocationData = exports.AWSProviderSettings = exports.CloudProvider = exports.AWSRequestData = void 0;
|
|
13
13
|
const aws_gamecast_sdk_1 = require("@ludeo/aws-gamecast-sdk");
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
15
|
const decorators_1 = require("../../decorators");
|
|
@@ -21,29 +21,13 @@ __decorate([
|
|
|
21
21
|
(0, class_validator_1.IsNotEmpty)(),
|
|
22
22
|
__metadata("design:type", String)
|
|
23
23
|
], AWSRequestData.prototype, "signalRequest", void 0);
|
|
24
|
-
class CloudProviderRequestData {
|
|
25
|
-
}
|
|
26
|
-
exports.CloudProviderRequestData = CloudProviderRequestData;
|
|
27
|
-
__decorate([
|
|
28
|
-
(0, class_validator_1.IsUUID)(),
|
|
29
|
-
__metadata("design:type", String)
|
|
30
|
-
], CloudProviderRequestData.prototype, "authToken", void 0);
|
|
31
|
-
__decorate([
|
|
32
|
-
(0, class_validator_1.IsUUID)(),
|
|
33
|
-
__metadata("design:type", String)
|
|
34
|
-
], CloudProviderRequestData.prototype, "appToken", void 0);
|
|
35
|
-
__decorate([
|
|
36
|
-
(0, class_validator_1.IsDefined)(),
|
|
37
|
-
(0, decorators_1.ValidateNestedType)(() => AWSRequestData),
|
|
38
|
-
__metadata("design:type", Object)
|
|
39
|
-
], CloudProviderRequestData.prototype, "cloudProviderRequest", void 0);
|
|
40
24
|
var CloudProvider;
|
|
41
25
|
(function (CloudProvider) {
|
|
42
26
|
CloudProvider["AWS"] = "aws";
|
|
43
27
|
})(CloudProvider || (exports.CloudProvider = CloudProvider = {}));
|
|
44
|
-
class
|
|
28
|
+
class AWSProviderSettings {
|
|
45
29
|
}
|
|
46
|
-
exports.
|
|
30
|
+
exports.AWSProviderSettings = AWSProviderSettings;
|
|
47
31
|
class AwsAllocationData {
|
|
48
32
|
}
|
|
49
33
|
exports.AwsAllocationData = AwsAllocationData;
|
|
@@ -99,7 +83,7 @@ __decorate([
|
|
|
99
83
|
__metadata("design:type", String)
|
|
100
84
|
], AllocationRequestData.prototype, "appToken", void 0);
|
|
101
85
|
__decorate([
|
|
102
|
-
(0, decorators_1.ValidateNestedType)(() =>
|
|
86
|
+
(0, decorators_1.ValidateNestedType)(() => AWSRequestData),
|
|
103
87
|
__metadata("design:type", Object)
|
|
104
88
|
], AllocationRequestData.prototype, "cloudProviderRequest", void 0);
|
|
105
89
|
//# sourceMappingURL=cloud.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloud.js","sourceRoot":"","sources":["../../../src/v2/types/cloud.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,8DAAmD;AACnD,
|
|
1
|
+
{"version":3,"file":"cloud.js","sourceRoot":"","sources":["../../../src/v2/types/cloud.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,8DAAmD;AACnD,qDAA2E;AAC3E,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;CAUvC;AAVD,kEAUC;AARC;IADC,IAAA,0BAAQ,GAAE;;oEACa;AAGxB;IADC,IAAA,0BAAQ,GAAE;;kEACW;AAItB;IAFC,IAAA,wBAAM,EAAC,aAAa,CAAC;IACrB,IAAA,4BAAU,GAAE;;kEACiB;AAKhC,MAAa,mBAAmB;CAO/B;AAPD,kDAOC;AALC;IADC,IAAA,4BAAU,GAAE;;2DAC4B;AAIzC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;4DACW;AAK1B,MAAa,qBAAqB;CASjC;AATD,sDASC;AAPC;IADC,IAAA,0BAAQ,GAAE;;wDACO;AAGlB;IADC,IAAA,0BAAQ,GAAE;;uDACM;AAGjB;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,cAAc,CAAC;;mEACE"}
|
package/dist/v2/types/pools.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AWSResourceProviderSettings, CloudProvider,
|
|
1
|
+
import { AWSResourceProviderSettings, CloudProvider, CloudProviderSettings } from "./cloud";
|
|
2
2
|
export declare enum CloudResourceStatus {
|
|
3
3
|
Allocated = "allocated",
|
|
4
4
|
Available = "available",
|
|
@@ -17,7 +17,7 @@ export declare class PoolScaleConfiguration {
|
|
|
17
17
|
size: number;
|
|
18
18
|
}
|
|
19
19
|
export declare class CloudPoolConfiguration {
|
|
20
|
-
providerSettings?:
|
|
20
|
+
providerSettings?: CloudProviderSettings;
|
|
21
21
|
cloudProvider: CloudProvider;
|
|
22
22
|
poolId: string;
|
|
23
23
|
poolScaleConfiguration: PoolScaleConfiguration;
|
package/jest.config.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { IsString, IsUUID } from "class-validator";
|
|
1
|
+
import { IsEnum, IsString, IsUUID } from "class-validator";
|
|
2
|
+
import { CloudProvider } from "../types/cloud";
|
|
2
3
|
|
|
3
4
|
export class CloudResourceContext {
|
|
4
5
|
@IsUUID()
|
|
@@ -12,4 +13,7 @@ export class CloudResourceContext {
|
|
|
12
13
|
|
|
13
14
|
@IsUUID()
|
|
14
15
|
poolId: string;
|
|
16
|
+
|
|
17
|
+
@IsEnum(CloudProvider)
|
|
18
|
+
cloudProvider: CloudProvider;
|
|
15
19
|
}
|
|
@@ -2,17 +2,22 @@ import { CloudSessionContext } from "../contexts/cloud-session-context";
|
|
|
2
2
|
import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
|
|
3
3
|
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
4
4
|
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
AWSProviderSettings,
|
|
6
|
+
AWSResourceProviderSettings,
|
|
7
|
+
AllocationRequestData,
|
|
8
|
+
CloudProviderSettings,
|
|
9
|
+
CloudResourceProviderSettings,
|
|
8
10
|
} from "../types";
|
|
9
11
|
|
|
10
12
|
export class AllocateCloudResourceRequestPayload {
|
|
11
|
-
@ValidateNestedType(() =>
|
|
12
|
-
providerSettings:
|
|
13
|
+
@ValidateNestedType(() => AWSProviderSettings)
|
|
14
|
+
providerSettings: CloudProviderSettings;
|
|
13
15
|
|
|
14
|
-
@ValidateNestedType(() =>
|
|
15
|
-
requestData:
|
|
16
|
+
@ValidateNestedType(() => AllocationRequestData)
|
|
17
|
+
requestData: AllocationRequestData;
|
|
18
|
+
|
|
19
|
+
@ValidateNestedType(() => AWSResourceProviderSettings)
|
|
20
|
+
resourceProviderSettings: CloudResourceProviderSettings;
|
|
16
21
|
}
|
|
17
22
|
|
|
18
23
|
export class AllocateCloudResourceRequestEvent extends LudeoEvent {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
2
2
|
import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
|
|
3
3
|
import { CloudSessionContext } from "../contexts/cloud-session-context";
|
|
4
|
-
import {
|
|
4
|
+
import { AllocationRequestData } from "../types";
|
|
5
5
|
|
|
6
6
|
export class AllocatePoolItemRequestPayload {
|
|
7
|
-
@ValidateNestedType(() =>
|
|
8
|
-
requestData:
|
|
7
|
+
@ValidateNestedType(() => AllocationRequestData)
|
|
8
|
+
requestData: AllocationRequestData;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
export class AllocatePoolItemRequestEvent extends LudeoEvent {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
2
2
|
import { AWSCreationResponse, CloudProvider, CreationResponse } from "../types";
|
|
3
|
-
import {
|
|
4
|
-
import { IsEnum, IsOptional, IsString, IsUUID } from "class-validator";
|
|
3
|
+
import { IsEnum, IsUUID } from "class-validator";
|
|
5
4
|
import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
|
|
5
|
+
import { CloudResourceContext } from "../contexts";
|
|
6
6
|
|
|
7
7
|
export class CloudResourceCreatedPayload {
|
|
8
8
|
@IsUUID()
|
|
@@ -14,14 +14,6 @@ export class CloudResourceCreatedPayload {
|
|
|
14
14
|
@IsEnum(CloudProvider)
|
|
15
15
|
cloudProvider: CloudProvider;
|
|
16
16
|
|
|
17
|
-
@IsUUID()
|
|
18
|
-
@IsOptional()
|
|
19
|
-
clientRequestId?: string;
|
|
20
|
-
|
|
21
|
-
@IsOptional()
|
|
22
|
-
@IsUUID()
|
|
23
|
-
cloudSessionId?: string;
|
|
24
|
-
|
|
25
17
|
@ValidateNestedType(() => AWSCreationResponse)
|
|
26
18
|
creationResponse: CreationResponse;
|
|
27
19
|
}
|
|
@@ -29,7 +21,10 @@ export class CloudResourceCreatedPayload {
|
|
|
29
21
|
export class CloudResourceCreated extends LudeoEvent {
|
|
30
22
|
static readonly EVENT_NAME = "cloud-resources.cloud-resource-created";
|
|
31
23
|
|
|
32
|
-
constructor(
|
|
24
|
+
constructor(
|
|
25
|
+
payload: CloudResourceCreatedPayload,
|
|
26
|
+
context: CloudResourceContext
|
|
27
|
+
) {
|
|
33
28
|
super(CloudResourceCreated.EVENT_NAME);
|
|
34
29
|
this.payload = payload;
|
|
35
30
|
this.context = context;
|
|
@@ -38,6 +33,6 @@ export class CloudResourceCreated extends LudeoEvent {
|
|
|
38
33
|
@ValidateNestedType(() => CloudResourceCreatedPayload)
|
|
39
34
|
payload: CloudResourceCreatedPayload;
|
|
40
35
|
|
|
41
|
-
@ValidateNestedType(() =>
|
|
42
|
-
context:
|
|
36
|
+
@ValidateNestedType(() => CloudResourceContext)
|
|
37
|
+
context: CloudResourceContext;
|
|
43
38
|
}
|
|
@@ -3,9 +3,9 @@ import { CreateCloudResourceRequestContext } from "../contexts/create-cloud-reso
|
|
|
3
3
|
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
4
4
|
import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
|
|
5
5
|
import {
|
|
6
|
-
|
|
6
|
+
AWSProviderSettings,
|
|
7
7
|
CloudProvider,
|
|
8
|
-
|
|
8
|
+
CloudProviderSettings,
|
|
9
9
|
} from "../types";
|
|
10
10
|
|
|
11
11
|
export class CreateCloudResourceRequestPayload {
|
|
@@ -15,8 +15,8 @@ export class CreateCloudResourceRequestPayload {
|
|
|
15
15
|
@IsUUID()
|
|
16
16
|
resourceId: string;
|
|
17
17
|
|
|
18
|
-
@ValidateNestedType(() =>
|
|
19
|
-
providerSettings:
|
|
18
|
+
@ValidateNestedType(() => AWSProviderSettings)
|
|
19
|
+
providerSettings: CloudProviderSettings;
|
|
20
20
|
|
|
21
21
|
@IsEnum(CloudProvider)
|
|
22
22
|
cloudProvider: CloudProvider;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
+
import { IsBoolean, IsNumber, IsString } from "class-validator";
|
|
2
|
+
|
|
1
3
|
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
2
4
|
import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
|
|
3
|
-
|
|
5
|
+
|
|
6
|
+
export class TokenRequiredConnectionDetails {
|
|
7
|
+
@IsString()
|
|
8
|
+
resourceId: string;
|
|
9
|
+
}
|
|
4
10
|
|
|
5
11
|
export class TokenRequiredEventData {
|
|
6
12
|
@IsString()
|
|
@@ -8,6 +14,9 @@ export class TokenRequiredEventData {
|
|
|
8
14
|
|
|
9
15
|
@IsString()
|
|
10
16
|
authSource: string;
|
|
17
|
+
|
|
18
|
+
@ValidateNestedType(() => TokenRequiredConnectionDetails)
|
|
19
|
+
connectionDetails: TokenRequiredConnectionDetails;
|
|
11
20
|
}
|
|
12
21
|
|
|
13
22
|
export class TokenRequiredEventPayload {
|
package/src/v2/types/cloud.ts
CHANGED
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
import { GameCast } from "@ludeo/aws-gamecast-sdk";
|
|
2
|
-
import {
|
|
3
|
-
IsDefined,
|
|
4
|
-
IsEnum,
|
|
5
|
-
IsNotEmpty,
|
|
6
|
-
IsOptional,
|
|
7
|
-
IsString,
|
|
8
|
-
IsUUID,
|
|
9
|
-
} from "class-validator";
|
|
2
|
+
import { IsEnum, IsNotEmpty, IsOptional, IsString } from "class-validator";
|
|
10
3
|
import { ValidateNestedType } from "../../decorators";
|
|
11
4
|
|
|
12
5
|
export class AWSRequestData {
|
|
@@ -17,25 +10,12 @@ export class AWSRequestData {
|
|
|
17
10
|
|
|
18
11
|
export type CloudProviderRequest = AWSRequestData;
|
|
19
12
|
|
|
20
|
-
export class CloudProviderRequestData {
|
|
21
|
-
@IsUUID()
|
|
22
|
-
authToken: string;
|
|
23
|
-
|
|
24
|
-
@IsUUID()
|
|
25
|
-
appToken: string;
|
|
26
|
-
|
|
27
|
-
@IsDefined()
|
|
28
|
-
@ValidateNestedType(() => AWSRequestData)
|
|
29
|
-
cloudProviderRequest: CloudProviderRequest;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
13
|
export enum CloudProvider {
|
|
33
14
|
AWS = "aws",
|
|
34
15
|
}
|
|
35
16
|
|
|
36
|
-
export class
|
|
37
|
-
streamGroupId:
|
|
38
|
-
identifier: GameCast.Identifier;
|
|
17
|
+
export class AWSProviderSettings {
|
|
18
|
+
streamGroupId: GameCast.Identifier;
|
|
39
19
|
additionalEnvironmentVariables?: GameCast.EnvironmentVariables;
|
|
40
20
|
protocol?: GameCast.Protocol;
|
|
41
21
|
connectionTimeoutSeconds?: GameCast.ConnectionTimeoutSeconds;
|
|
@@ -44,7 +24,7 @@ export class AWSResourceCreationConfig {
|
|
|
44
24
|
region?: string;
|
|
45
25
|
}
|
|
46
26
|
|
|
47
|
-
export type
|
|
27
|
+
export type CloudProviderSettings = AWSProviderSettings;
|
|
48
28
|
|
|
49
29
|
export class AwsAllocationData {
|
|
50
30
|
@IsString()
|
|
@@ -71,6 +51,8 @@ export class AWSResourceProviderSettings {
|
|
|
71
51
|
cloudProvider?: CloudProvider;
|
|
72
52
|
}
|
|
73
53
|
|
|
54
|
+
export type CloudResourceProviderSettings = AWSResourceProviderSettings;
|
|
55
|
+
|
|
74
56
|
export class AWSCreationResponse {
|
|
75
57
|
@IsOptional()
|
|
76
58
|
signalResponse?: GameCast.SignalResponse;
|
|
@@ -89,6 +71,6 @@ export class AllocationRequestData {
|
|
|
89
71
|
@IsString()
|
|
90
72
|
appToken: string;
|
|
91
73
|
|
|
92
|
-
@ValidateNestedType(() =>
|
|
74
|
+
@ValidateNestedType(() => AWSRequestData)
|
|
93
75
|
cloudProviderRequest: CloudProviderRequest;
|
|
94
76
|
}
|
package/src/v2/types/pools.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { IsEnum, IsNumber, IsUUID } from "class-validator";
|
|
|
2
2
|
import {
|
|
3
3
|
AWSResourceProviderSettings,
|
|
4
4
|
CloudProvider,
|
|
5
|
-
|
|
5
|
+
CloudProviderSettings,
|
|
6
6
|
} from "./cloud";
|
|
7
7
|
import { ValidateNestedType } from "../../decorators";
|
|
8
8
|
|
|
@@ -28,7 +28,7 @@ export class PoolScaleConfiguration {
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
export class CloudPoolConfiguration {
|
|
31
|
-
providerSettings?:
|
|
31
|
+
providerSettings?: CloudProviderSettings;
|
|
32
32
|
|
|
33
33
|
@IsEnum(CloudProvider)
|
|
34
34
|
cloudProvider: CloudProvider;
|