@ludeo/cloud-common 1.0.14 → 1.0.16
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/create-cloud-resource-request-context.d.ts +2 -1
- package/dist/v2/contexts/create-cloud-resource-request-context.js.map +1 -1
- package/dist/v2/events/cloud-resource-creation-failed.event.d.ts +4 -7
- package/dist/v2/events/cloud-resource-creation-failed.event.js +3 -17
- package/dist/v2/events/cloud-resource-creation-failed.event.js.map +1 -1
- package/dist/v2/types/cloud.d.ts +2 -2
- package/dist/v2/types/cloud.js +5 -2
- package/dist/v2/types/cloud.js.map +1 -1
- package/package.json +1 -1
- package/src/v2/contexts/create-cloud-resource-request-context.ts +1 -1
- package/src/v2/events/cloud-resource-creation-failed.event.ts +6 -23
- package/src/v2/types/cloud.ts +15 -5
- package/dist/v2/models/cloud-pool.d.ts +0 -9
- package/dist/v2/models/cloud-pool.js +0 -7
- package/dist/v2/models/cloud-pool.js.map +0 -1
- package/dist/v2/models/index.d.ts +0 -1
- package/dist/v2/models/index.js +0 -18
- package/dist/v2/models/index.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-cloud-resource-request-context.js","sourceRoot":"","sources":["../../../src/v2/contexts/create-cloud-resource-request-context.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAiD;AACjD,oCAAyC;AAEzC,MAAa,iCAAiC;CAS7C;AATD,8EASC;AAPC;IADC,IAAA,wBAAM,GAAE;;iEACM;AAGf;IADC,IAAA,wBAAM,GAAE;;qEACU;AAGnB;IADC,IAAA,wBAAM,EAAC,qBAAa,CAAC;;
|
|
1
|
+
{"version":3,"file":"create-cloud-resource-request-context.js","sourceRoot":"","sources":["../../../src/v2/contexts/create-cloud-resource-request-context.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAiD;AACjD,oCAAyC;AAEzC,MAAa,iCAAiC;CAS7C;AATD,8EASC;AAPC;IADC,IAAA,wBAAM,GAAE;;iEACM;AAGf;IADC,IAAA,wBAAM,GAAE;;qEACU;AAGnB;IADC,IAAA,wBAAM,EAAC,qBAAa,CAAC;;wEACO"}
|
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { CloudProvider } from "../types";
|
|
3
|
+
import { CreateCloudResourceRequestContext } from "../contexts";
|
|
4
4
|
export declare class CloudResourceCreationFailedPayload {
|
|
5
5
|
resourceId: string;
|
|
6
6
|
poolId: string;
|
|
7
7
|
cloudProvider: CloudProvider;
|
|
8
|
-
clientRequestId?: string;
|
|
9
|
-
cloudSessionId?: string;
|
|
10
|
-
creationResponse: CreationResponse;
|
|
11
8
|
error: string;
|
|
12
9
|
}
|
|
13
10
|
export declare class CloudResourceCreationFailedEvent extends LudeoEvent {
|
|
14
11
|
static readonly EVENT_NAME = "cloud-resources.cloud-resource-creation-failed";
|
|
15
|
-
constructor(payload: CloudResourceCreationFailedPayload, context:
|
|
16
|
-
context:
|
|
12
|
+
constructor(payload: CloudResourceCreationFailedPayload, context: CreateCloudResourceRequestContext);
|
|
13
|
+
context: CreateCloudResourceRequestContext;
|
|
17
14
|
payload: CloudResourceCreationFailedPayload;
|
|
18
15
|
}
|
|
@@ -11,10 +11,10 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.CloudResourceCreationFailedEvent = exports.CloudResourceCreationFailedPayload = void 0;
|
|
13
13
|
const ludeo_event_1 = require("../../infra/ludeo-event");
|
|
14
|
-
const cloud_session_context_1 = require("../contexts/cloud-session-context");
|
|
15
14
|
const validate_nested_type_decorator_1 = require("../../decorators/validate-nested-type.decorator");
|
|
16
15
|
const class_validator_1 = require("class-validator");
|
|
17
16
|
const types_1 = require("../types");
|
|
17
|
+
const contexts_1 = require("../contexts");
|
|
18
18
|
class CloudResourceCreationFailedPayload {
|
|
19
19
|
}
|
|
20
20
|
exports.CloudResourceCreationFailedPayload = CloudResourceCreationFailedPayload;
|
|
@@ -30,20 +30,6 @@ __decorate([
|
|
|
30
30
|
(0, class_validator_1.IsEnum)(types_1.CloudProvider),
|
|
31
31
|
__metadata("design:type", String)
|
|
32
32
|
], CloudResourceCreationFailedPayload.prototype, "cloudProvider", void 0);
|
|
33
|
-
__decorate([
|
|
34
|
-
(0, class_validator_1.IsOptional)(),
|
|
35
|
-
(0, class_validator_1.IsUUID)(),
|
|
36
|
-
__metadata("design:type", String)
|
|
37
|
-
], CloudResourceCreationFailedPayload.prototype, "clientRequestId", void 0);
|
|
38
|
-
__decorate([
|
|
39
|
-
(0, class_validator_1.IsOptional)(),
|
|
40
|
-
(0, class_validator_1.IsUUID)(),
|
|
41
|
-
__metadata("design:type", String)
|
|
42
|
-
], CloudResourceCreationFailedPayload.prototype, "cloudSessionId", void 0);
|
|
43
|
-
__decorate([
|
|
44
|
-
(0, validate_nested_type_decorator_1.ValidateNestedType)(() => types_1.AWSCreationResponse),
|
|
45
|
-
__metadata("design:type", Object)
|
|
46
|
-
], CloudResourceCreationFailedPayload.prototype, "creationResponse", void 0);
|
|
47
33
|
__decorate([
|
|
48
34
|
(0, class_validator_1.IsString)(),
|
|
49
35
|
(0, class_validator_1.IsNotEmpty)(),
|
|
@@ -59,8 +45,8 @@ class CloudResourceCreationFailedEvent extends ludeo_event_1.LudeoEvent {
|
|
|
59
45
|
exports.CloudResourceCreationFailedEvent = CloudResourceCreationFailedEvent;
|
|
60
46
|
CloudResourceCreationFailedEvent.EVENT_NAME = "cloud-resources.cloud-resource-creation-failed";
|
|
61
47
|
__decorate([
|
|
62
|
-
(0, validate_nested_type_decorator_1.ValidateNestedType)(() =>
|
|
63
|
-
__metadata("design:type",
|
|
48
|
+
(0, validate_nested_type_decorator_1.ValidateNestedType)(() => contexts_1.CreateCloudResourceRequestContext),
|
|
49
|
+
__metadata("design:type", contexts_1.CreateCloudResourceRequestContext)
|
|
64
50
|
], CloudResourceCreationFailedEvent.prototype, "context", void 0);
|
|
65
51
|
__decorate([
|
|
66
52
|
(0, validate_nested_type_decorator_1.ValidateNestedType)(() => CloudResourceCreationFailedPayload),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloud-resource-creation-failed.event.js","sourceRoot":"","sources":["../../../src/v2/events/cloud-resource-creation-failed.event.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAqD;AACrD,
|
|
1
|
+
{"version":3,"file":"cloud-resource-creation-failed.event.js","sourceRoot":"","sources":["../../../src/v2/events/cloud-resource-creation-failed.event.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAqD;AACrD,oGAAqF;AACrF,qDAAuE;AACvE,oCAAyC;AACzC,0CAAgE;AAEhE,MAAa,kCAAkC;CAa9C;AAbD,gFAaC;AAXC;IADC,IAAA,wBAAM,GAAE;;sEACU;AAGnB;IADC,IAAA,wBAAM,GAAE;;kEACM;AAGf;IADC,IAAA,wBAAM,EAAC,qBAAa,CAAC;;yEACO;AAI7B;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;iEACC;AAGhB,MAAa,gCAAiC,SAAQ,wBAAU;IAG9D,YACE,OAA2C,EAC3C,OAA0C;QAE1C,KAAK,CAAC,gCAAgC,CAAC,UAAU,CAAC,CAAC;QACnD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAVH,4EAiBC;AAhBiB,2CAAU,GAAG,gDAAgD,CAAC;AAY9E;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,4CAAiC,CAAC;8BACnD,4CAAiC;iEAAC;AAG3C;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,kCAAkC,CAAC;8BACpD,kCAAkC;iEAAC"}
|
package/dist/v2/types/cloud.d.ts
CHANGED
|
@@ -34,7 +34,7 @@ export declare class AWSCreationResponse {
|
|
|
34
34
|
}
|
|
35
35
|
export type CreationResponse = AWSCreationResponse;
|
|
36
36
|
export declare class AllocationRequestData {
|
|
37
|
-
authToken
|
|
38
|
-
appToken
|
|
37
|
+
authToken?: string;
|
|
38
|
+
appToken?: string;
|
|
39
39
|
cloudProviderRequest: CloudProviderRequest;
|
|
40
40
|
}
|
package/dist/v2/types/cloud.js
CHANGED
|
@@ -75,15 +75,18 @@ class AllocationRequestData {
|
|
|
75
75
|
}
|
|
76
76
|
exports.AllocationRequestData = AllocationRequestData;
|
|
77
77
|
__decorate([
|
|
78
|
-
(0, class_validator_1.
|
|
78
|
+
(0, class_validator_1.IsUUID)(),
|
|
79
|
+
(0, class_validator_1.IsOptional)(),
|
|
79
80
|
__metadata("design:type", String)
|
|
80
81
|
], AllocationRequestData.prototype, "authToken", void 0);
|
|
81
82
|
__decorate([
|
|
82
|
-
(0, class_validator_1.
|
|
83
|
+
(0, class_validator_1.IsOptional)(),
|
|
84
|
+
(0, class_validator_1.IsUUID)(),
|
|
83
85
|
__metadata("design:type", String)
|
|
84
86
|
], AllocationRequestData.prototype, "appToken", void 0);
|
|
85
87
|
__decorate([
|
|
86
88
|
(0, decorators_1.ValidateNestedType)(() => AWSRequestData),
|
|
89
|
+
(0, class_validator_1.IsDefined)(),
|
|
87
90
|
__metadata("design:type", Object)
|
|
88
91
|
], AllocationRequestData.prototype, "cloudProviderRequest", void 0);
|
|
89
92
|
//# 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,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;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;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/package.json
CHANGED
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
2
|
-
import { CloudSessionContext } from "../contexts/cloud-session-context";
|
|
3
2
|
import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
IsOptional,
|
|
8
|
-
IsString,
|
|
9
|
-
IsUUID,
|
|
10
|
-
} from "class-validator";
|
|
11
|
-
import { AWSCreationResponse, CloudProvider, CreationResponse } from "../types";
|
|
3
|
+
import { IsEnum, IsNotEmpty, IsString, IsUUID } from "class-validator";
|
|
4
|
+
import { CloudProvider } from "../types";
|
|
5
|
+
import { CreateCloudResourceRequestContext } from "../contexts";
|
|
12
6
|
|
|
13
7
|
export class CloudResourceCreationFailedPayload {
|
|
14
8
|
@IsUUID()
|
|
@@ -20,17 +14,6 @@ export class CloudResourceCreationFailedPayload {
|
|
|
20
14
|
@IsEnum(CloudProvider)
|
|
21
15
|
cloudProvider: CloudProvider;
|
|
22
16
|
|
|
23
|
-
@IsOptional()
|
|
24
|
-
@IsUUID()
|
|
25
|
-
clientRequestId?: string;
|
|
26
|
-
|
|
27
|
-
@IsOptional()
|
|
28
|
-
@IsUUID()
|
|
29
|
-
cloudSessionId?: string;
|
|
30
|
-
|
|
31
|
-
@ValidateNestedType(() => AWSCreationResponse)
|
|
32
|
-
creationResponse: CreationResponse;
|
|
33
|
-
|
|
34
17
|
@IsString()
|
|
35
18
|
@IsNotEmpty()
|
|
36
19
|
error: string;
|
|
@@ -41,15 +24,15 @@ export class CloudResourceCreationFailedEvent extends LudeoEvent {
|
|
|
41
24
|
|
|
42
25
|
constructor(
|
|
43
26
|
payload: CloudResourceCreationFailedPayload,
|
|
44
|
-
context:
|
|
27
|
+
context: CreateCloudResourceRequestContext
|
|
45
28
|
) {
|
|
46
29
|
super(CloudResourceCreationFailedEvent.EVENT_NAME);
|
|
47
30
|
this.payload = payload;
|
|
48
31
|
this.context = context;
|
|
49
32
|
}
|
|
50
33
|
|
|
51
|
-
@ValidateNestedType(() =>
|
|
52
|
-
context:
|
|
34
|
+
@ValidateNestedType(() => CreateCloudResourceRequestContext)
|
|
35
|
+
context: CreateCloudResourceRequestContext;
|
|
53
36
|
|
|
54
37
|
@ValidateNestedType(() => CloudResourceCreationFailedPayload)
|
|
55
38
|
payload: CloudResourceCreationFailedPayload;
|
package/src/v2/types/cloud.ts
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { GameCast } from "@ludeo/aws-gamecast-sdk";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
IsDefined,
|
|
4
|
+
IsEnum,
|
|
5
|
+
IsNotEmpty,
|
|
6
|
+
IsOptional,
|
|
7
|
+
IsString,
|
|
8
|
+
IsUUID,
|
|
9
|
+
} from "class-validator";
|
|
3
10
|
import { ValidateNestedType } from "../../decorators";
|
|
4
11
|
|
|
5
12
|
export class AWSRequestData {
|
|
@@ -65,12 +72,15 @@ export class AWSCreationResponse {
|
|
|
65
72
|
export type CreationResponse = AWSCreationResponse;
|
|
66
73
|
|
|
67
74
|
export class AllocationRequestData {
|
|
68
|
-
@
|
|
69
|
-
|
|
75
|
+
@IsUUID()
|
|
76
|
+
@IsOptional()
|
|
77
|
+
authToken?: string;
|
|
70
78
|
|
|
71
|
-
@
|
|
72
|
-
|
|
79
|
+
@IsOptional()
|
|
80
|
+
@IsUUID()
|
|
81
|
+
appToken?: string;
|
|
73
82
|
|
|
74
83
|
@ValidateNestedType(() => AWSRequestData)
|
|
84
|
+
@IsDefined()
|
|
75
85
|
cloudProviderRequest: CloudProviderRequest;
|
|
76
86
|
}
|
|
@@ -1,9 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cloud-pool.js","sourceRoot":"","sources":["../../../src/v2/models/cloud-pool.ts"],"names":[],"mappings":";;;AAMA,MAAa,SAAS;CAOrB;AAPD,8BAOC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./cloud-pool";
|
package/dist/v2/models/index.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/v2/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B"}
|