@ludeo/cloud-common 1.0.12 → 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/events/token-required.event.d.ts +0 -4
- package/dist/v2/events/token-required.event.js +2 -13
- package/dist/v2/events/token-required.event.js.map +1 -1
- package/dist/v2/models/cloud-pool.d.ts +9 -0
- package/dist/v2/models/cloud-pool.js +7 -0
- package/dist/v2/models/cloud-pool.js.map +1 -0
- package/dist/v2/models/index.d.ts +1 -0
- package/dist/v2/models/index.js +18 -0
- package/dist/v2/models/index.js.map +1 -0
- 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/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/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"}
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
2
|
-
export declare class TokenRequiredConnectionDetails {
|
|
3
|
-
resourceId: string;
|
|
4
|
-
}
|
|
5
2
|
export declare class TokenRequiredEventData {
|
|
6
3
|
defaultUser: string;
|
|
7
4
|
authSource: string;
|
|
8
|
-
connectionDetails: TokenRequiredConnectionDetails;
|
|
9
5
|
}
|
|
10
6
|
export declare class TokenRequiredEventPayload {
|
|
11
7
|
id: string;
|
|
@@ -9,17 +9,10 @@ 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.TokenRequired = exports.TokenRequiredEventPayload = exports.TokenRequiredEventData =
|
|
13
|
-
const class_validator_1 = require("class-validator");
|
|
12
|
+
exports.TokenRequired = exports.TokenRequiredEventPayload = exports.TokenRequiredEventData = void 0;
|
|
14
13
|
const ludeo_event_1 = require("../../infra/ludeo-event");
|
|
15
14
|
const validate_nested_type_decorator_1 = require("../../decorators/validate-nested-type.decorator");
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
exports.TokenRequiredConnectionDetails = TokenRequiredConnectionDetails;
|
|
19
|
-
__decorate([
|
|
20
|
-
(0, class_validator_1.IsString)(),
|
|
21
|
-
__metadata("design:type", String)
|
|
22
|
-
], TokenRequiredConnectionDetails.prototype, "resourceId", void 0);
|
|
15
|
+
const class_validator_1 = require("class-validator");
|
|
23
16
|
class TokenRequiredEventData {
|
|
24
17
|
}
|
|
25
18
|
exports.TokenRequiredEventData = TokenRequiredEventData;
|
|
@@ -31,10 +24,6 @@ __decorate([
|
|
|
31
24
|
(0, class_validator_1.IsString)(),
|
|
32
25
|
__metadata("design:type", String)
|
|
33
26
|
], TokenRequiredEventData.prototype, "authSource", void 0);
|
|
34
|
-
__decorate([
|
|
35
|
-
(0, validate_nested_type_decorator_1.ValidateNestedType)(() => TokenRequiredConnectionDetails),
|
|
36
|
-
__metadata("design:type", TokenRequiredConnectionDetails)
|
|
37
|
-
], TokenRequiredEventData.prototype, "connectionDetails", void 0);
|
|
38
27
|
class TokenRequiredEventPayload {
|
|
39
28
|
}
|
|
40
29
|
exports.TokenRequiredEventPayload = TokenRequiredEventPayload;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token-required.event.js","sourceRoot":"","sources":["../../../src/v2/events/token-required.event.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"token-required.event.js","sourceRoot":"","sources":["../../../src/v2/events/token-required.event.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAqD;AACrD,oGAAqF;AACrF,qDAAgE;AAEhE,MAAa,sBAAsB;CAMlC;AAND,wDAMC;AAJC;IADC,IAAA,0BAAQ,GAAE;;2DACS;AAGpB;IADC,IAAA,0BAAQ,GAAE;;0DACQ;AAGrB,MAAa,yBAAyB;CAqBrC;AArBD,8DAqBC;AAnBC;IADC,IAAA,0BAAQ,GAAE;;qDACA;AAGX;IADC,IAAA,0BAAQ,GAAE;;uDACE;AAGb;IADC,IAAA,0BAAQ,GAAE;;yDACI;AAGf;IADC,IAAA,0BAAQ,GAAE;;2DACM;AAGjB;IADC,IAAA,0BAAQ,GAAE;;wDACG;AAGd;IADC,IAAA,2BAAS,GAAE;;2DACM;AAGlB;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,sBAAsB,CAAC;8BAC3C,sBAAsB;uDAAC;AAG/B,MAAa,aAAc,SAAQ,wBAAU;IAQ3C,YAAY,OAAkC,EAAE,OAAe;QAC7D,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;QAChC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAZH,sCAaC;AAZiB,wBAAU,GAAG,uBAAuB,CAAC;AAGrD;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,yBAAyB,CAAC;8BAC3C,yBAAyB;8CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CloudPoolConfiguration, CloudPoolStatus, CloudResourcesMap } from "../types";
|
|
2
|
+
export declare class CloudPool {
|
|
3
|
+
id: string;
|
|
4
|
+
status: CloudPoolStatus;
|
|
5
|
+
createdAt: number;
|
|
6
|
+
updatedAt?: number;
|
|
7
|
+
config: CloudPoolConfiguration;
|
|
8
|
+
resources?: CloudResourcesMap;
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cloud-pool.js","sourceRoot":"","sources":["../../../src/v2/models/cloud-pool.ts"],"names":[],"mappings":";;;AAMA,MAAa,SAAS;CAOrB;AAPD,8BAOC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./cloud-pool";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./cloud-pool"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/v2/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B"}
|
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/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;
|