@ludeo/cloud-common 1.0.18 → 1.0.19
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/events/cloud-resource-allocation-failed.event.d.ts +11 -0
- package/dist/v2/events/cloud-resource-allocation-failed.event.js +41 -0
- package/dist/v2/events/cloud-resource-allocation-failed.event.js.map +1 -0
- package/dist/v2/events/index.d.ts +1 -0
- package/dist/v2/events/index.js +1 -0
- package/dist/v2/events/index.js.map +1 -1
- package/dist/v2/types/cloud.d.ts +1 -2
- package/dist/v2/types/cloud.js +1 -5
- package/dist/v2/types/cloud.js.map +1 -1
- package/dist/v2/types/pools.d.ts +1 -0
- package/dist/v2/types/pools.js +1 -0
- package/dist/v2/types/pools.js.map +1 -1
- package/package.json +1 -1
- package/src/v2/events/cloud-resource-allocation-failed.event.ts +29 -0
- package/src/v2/events/index.ts +1 -0
- package/src/v2/types/cloud.ts +2 -4
- package/src/v2/types/pools.ts +1 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CloudSessionContext } from "../contexts/cloud-session-context";
|
|
2
|
+
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
3
|
+
export declare class CloudResourceAllocationFailedPayload {
|
|
4
|
+
error: string;
|
|
5
|
+
}
|
|
6
|
+
export declare class CloudResourceAllocationFailedEvent extends LudeoEvent {
|
|
7
|
+
static readonly EVENT_NAME = "cloud-resources.cloud-resource-allocation-failed";
|
|
8
|
+
constructor(payload: CloudResourceAllocationFailedPayload, context: CloudSessionContext);
|
|
9
|
+
context: CloudSessionContext;
|
|
10
|
+
payload: CloudResourceAllocationFailedPayload;
|
|
11
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
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.CloudResourceAllocationFailedEvent = exports.CloudResourceAllocationFailedPayload = void 0;
|
|
13
|
+
const cloud_session_context_1 = require("../contexts/cloud-session-context");
|
|
14
|
+
const validate_nested_type_decorator_1 = require("../../decorators/validate-nested-type.decorator");
|
|
15
|
+
const ludeo_event_1 = require("../../infra/ludeo-event");
|
|
16
|
+
const class_validator_1 = require("class-validator");
|
|
17
|
+
class CloudResourceAllocationFailedPayload {
|
|
18
|
+
}
|
|
19
|
+
exports.CloudResourceAllocationFailedPayload = CloudResourceAllocationFailedPayload;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, class_validator_1.IsString)(),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], CloudResourceAllocationFailedPayload.prototype, "error", void 0);
|
|
24
|
+
class CloudResourceAllocationFailedEvent extends ludeo_event_1.LudeoEvent {
|
|
25
|
+
constructor(payload, context) {
|
|
26
|
+
super(CloudResourceAllocationFailedEvent.EVENT_NAME);
|
|
27
|
+
this.payload = payload;
|
|
28
|
+
this.context = context;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.CloudResourceAllocationFailedEvent = CloudResourceAllocationFailedEvent;
|
|
32
|
+
CloudResourceAllocationFailedEvent.EVENT_NAME = "cloud-resources.cloud-resource-allocation-failed";
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, validate_nested_type_decorator_1.ValidateNestedType)(() => cloud_session_context_1.CloudSessionContext),
|
|
35
|
+
__metadata("design:type", cloud_session_context_1.CloudSessionContext)
|
|
36
|
+
], CloudResourceAllocationFailedEvent.prototype, "context", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, validate_nested_type_decorator_1.ValidateNestedType)(() => CloudResourceAllocationFailedPayload),
|
|
39
|
+
__metadata("design:type", CloudResourceAllocationFailedPayload)
|
|
40
|
+
], CloudResourceAllocationFailedEvent.prototype, "payload", void 0);
|
|
41
|
+
//# sourceMappingURL=cloud-resource-allocation-failed.event.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cloud-resource-allocation-failed.event.js","sourceRoot":"","sources":["../../../src/v2/events/cloud-resource-allocation-failed.event.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6EAAwE;AACxE,oGAAqF;AACrF,yDAAqD;AACrD,qDAA2C;AAE3C,MAAa,oCAAoC;CAGhD;AAHD,oFAGC;AADC;IADC,IAAA,0BAAQ,GAAE;;mEACG;AAGhB,MAAa,kCAAmC,SAAQ,wBAAU;IAIhE,YACE,OAA6C,EAC7C,OAA4B;QAE5B,KAAK,CAAC,kCAAkC,CAAC,UAAU,CAAC,CAAC;QACrD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAXH,gFAkBC;AAjBiB,6CAAU,GACxB,kDAAkD,CAAC;AAYrD;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,2CAAmB,CAAC;8BACrC,2CAAmB;mEAAC;AAG7B;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,oCAAoC,CAAC;8BACtD,oCAAoC;mEAAC"}
|
package/dist/v2/events/index.js
CHANGED
|
@@ -39,4 +39,5 @@ __exportStar(require("./set-pool.event"), exports);
|
|
|
39
39
|
__exportStar(require("./token-required.event"), exports);
|
|
40
40
|
__exportStar(require("./monitor-resource-task.event"), exports);
|
|
41
41
|
__exportStar(require("./pool-resizing-task.event"), exports);
|
|
42
|
+
__exportStar(require("./cloud-resource-allocation-failed.event"), exports);
|
|
42
43
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/v2/events/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0EAAwD;AACxD,wEAAsD;AACtD,yEAAuD;AACvD,oEAAkD;AAClD,qEAAmD;AACnD,mEAAiD;AACjD,iEAA+C;AAC/C,yEAAuD;AACvD,gEAA8C;AAC9C,kEAAgD;AAChD,8DAA4C;AAC5C,wEAAsD;AACtD,4DAA0C;AAC1C,uDAAqC;AACrC,8DAA4C;AAC5C,8DAA4C;AAC5C,sDAAoC;AACpC,uDAAqC;AACrC,wEAAsD;AACtD,8DAA4C;AAC5C,gEAA8C;AAC9C,mDAAiC;AACjC,yDAAuC;AACvC,gEAA8C;AAC9C,6DAA2C"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/v2/events/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0EAAwD;AACxD,wEAAsD;AACtD,yEAAuD;AACvD,oEAAkD;AAClD,qEAAmD;AACnD,mEAAiD;AACjD,iEAA+C;AAC/C,yEAAuD;AACvD,gEAA8C;AAC9C,kEAAgD;AAChD,8DAA4C;AAC5C,wEAAsD;AACtD,4DAA0C;AAC1C,uDAAqC;AACrC,8DAA4C;AAC5C,8DAA4C;AAC5C,sDAAoC;AACpC,uDAAqC;AACrC,wEAAsD;AACtD,8DAA4C;AAC5C,gEAA8C;AAC9C,mDAAiC;AACjC,yDAAuC;AACvC,gEAA8C;AAC9C,6DAA2C;AAC3C,2EAAyD"}
|
package/dist/v2/types/cloud.d.ts
CHANGED
|
@@ -24,12 +24,11 @@ export declare class AwsAllocationData {
|
|
|
24
24
|
export type CloudProviderAllocationData = AwsAllocationData;
|
|
25
25
|
export declare class AWSResourceProviderSettings {
|
|
26
26
|
streamSessionId: string;
|
|
27
|
-
streamGroupId
|
|
27
|
+
streamGroupId?: string;
|
|
28
28
|
cloudProvider?: CloudProvider;
|
|
29
29
|
}
|
|
30
30
|
export type CloudResourceProviderSettings = AWSResourceProviderSettings;
|
|
31
31
|
export declare class AWSCreationResponse {
|
|
32
|
-
signalResponse?: GameCast.SignalResponse;
|
|
33
32
|
streamSessionId: string;
|
|
34
33
|
}
|
|
35
34
|
export type CreationResponse = AWSCreationResponse;
|
package/dist/v2/types/cloud.js
CHANGED
|
@@ -10,7 +10,6 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.AllocationRequestData = exports.AWSCreationResponse = exports.AWSResourceProviderSettings = exports.AwsAllocationData = exports.AWSProviderSettings = exports.CloudProvider = exports.AWSRequestData = void 0;
|
|
13
|
-
const aws_gamecast_sdk_1 = require("@ludeo/aws-gamecast-sdk");
|
|
14
13
|
const class_validator_1 = require("class-validator");
|
|
15
14
|
const decorators_1 = require("../../decorators");
|
|
16
15
|
class AWSRequestData {
|
|
@@ -51,6 +50,7 @@ __decorate([
|
|
|
51
50
|
__metadata("design:type", String)
|
|
52
51
|
], AWSResourceProviderSettings.prototype, "streamSessionId", void 0);
|
|
53
52
|
__decorate([
|
|
53
|
+
(0, class_validator_1.IsOptional)(),
|
|
54
54
|
(0, class_validator_1.IsString)(),
|
|
55
55
|
__metadata("design:type", String)
|
|
56
56
|
], AWSResourceProviderSettings.prototype, "streamGroupId", void 0);
|
|
@@ -62,10 +62,6 @@ __decorate([
|
|
|
62
62
|
class AWSCreationResponse {
|
|
63
63
|
}
|
|
64
64
|
exports.AWSCreationResponse = AWSCreationResponse;
|
|
65
|
-
__decorate([
|
|
66
|
-
(0, class_validator_1.IsOptional)(),
|
|
67
|
-
__metadata("design:type", String)
|
|
68
|
-
], AWSCreationResponse.prototype, "signalResponse", void 0);
|
|
69
65
|
__decorate([
|
|
70
66
|
(0, class_validator_1.IsString)(),
|
|
71
67
|
(0, class_validator_1.IsNotEmpty)(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloud.js","sourceRoot":"","sources":["../../../src/v2/types/cloud.ts"],"names":[],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"cloud.js","sourceRoot":"","sources":["../../../src/v2/types/cloud.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,qDAOyB;AACzB,iDAAsD;AAEtD,MAAa,cAAc;CAI1B;AAJD,wCAIC;AADC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;qDACS;AAKxB,IAAY,aAEX;AAFD,WAAY,aAAa;IACvB,4BAAW,CAAA;AACb,CAAC,EAFW,aAAa,6BAAb,aAAa,QAExB;AAED,MAAa,mBAAmB;CAQ/B;AARD,kDAQC;AAID,MAAa,iBAAiB;CAS7B;AATD,8CASC;AAPC;IADC,IAAA,0BAAQ,GAAE;;wDACW;AAGtB;IADC,IAAA,0BAAQ,GAAE;;0DACa;AAGxB;IADC,IAAA,0BAAQ,GAAE;;yDACY;AAKzB,MAAa,2BAA2B;CAWvC;AAXD,kEAWC;AATC;IADC,IAAA,0BAAQ,GAAE;;oEACa;AAIxB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;kEACY;AAIvB;IAFC,IAAA,wBAAM,EAAC,aAAa,CAAC;IACrB,IAAA,4BAAU,GAAE;;kEACiB;AAKhC,MAAa,mBAAmB;CAI/B;AAJD,kDAIC;AADC;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/dist/v2/types/pools.d.ts
CHANGED
package/dist/v2/types/pools.js
CHANGED
|
@@ -18,6 +18,7 @@ var CloudResourceStatus;
|
|
|
18
18
|
CloudResourceStatus["Allocated"] = "allocated";
|
|
19
19
|
CloudResourceStatus["Available"] = "available";
|
|
20
20
|
CloudResourceStatus["Creating"] = "creating";
|
|
21
|
+
CloudResourceStatus["Created"] = "created";
|
|
21
22
|
CloudResourceStatus["Allocating"] = "allocating";
|
|
22
23
|
CloudResourceStatus["Error"] = "error";
|
|
23
24
|
CloudResourceStatus["Terminated"] = "terminated";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pools.js","sourceRoot":"","sources":["../../../src/v2/types/pools.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA2D;AAC3D,mCAIiB;AACjB,iDAAsD;AAEtD,IAAY,
|
|
1
|
+
{"version":3,"file":"pools.js","sourceRoot":"","sources":["../../../src/v2/types/pools.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA2D;AAC3D,mCAIiB;AACjB,iDAAsD;AAEtD,IAAY,mBASX;AATD,WAAY,mBAAmB;IAC7B,8CAAuB,CAAA;IACvB,8CAAuB,CAAA;IACvB,4CAAqB,CAAA;IACrB,0CAAmB,CAAA;IACnB,gDAAyB,CAAA;IACzB,sCAAe,CAAA;IACf,gDAAyB,CAAA;IACzB,kDAA2B,CAAA;AAC7B,CAAC,EATW,mBAAmB,mCAAnB,mBAAmB,QAS9B;AAED,IAAY,eAIX;AAJD,WAAY,eAAe;IACzB,oCAAiB,CAAA;IACjB,sCAAmB,CAAA;IACnB,4CAAyB,CAAA;AAC3B,CAAC,EAJW,eAAe,+BAAf,eAAe,QAI1B;AAED,MAAa,sBAAsB;CAGlC;AAHD,wDAGC;AADC;IADC,IAAA,0BAAQ,GAAE;;oDACE;AAGf,MAAa,sBAAsB;CAWlC;AAXD,wDAWC;AAPC;IADC,IAAA,wBAAM,EAAC,qBAAa,CAAC;;6DACO;AAG7B;IADC,IAAA,wBAAM,GAAE;;sDACM;AAGf;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,sBAAsB,CAAC;8BACzB,sBAAsB;sEAAC;AAOjD,MAAa,SAAS;CAOrB;AAPD,8BAOC;AAED,MAAa,aAAa;CAMzB;AAND,sCAMC"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { CloudSessionContext } from "../contexts/cloud-session-context";
|
|
2
|
+
import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
|
|
3
|
+
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
4
|
+
import { IsString } from "class-validator";
|
|
5
|
+
|
|
6
|
+
export class CloudResourceAllocationFailedPayload {
|
|
7
|
+
@IsString()
|
|
8
|
+
error: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export class CloudResourceAllocationFailedEvent extends LudeoEvent {
|
|
12
|
+
static readonly EVENT_NAME =
|
|
13
|
+
"cloud-resources.cloud-resource-allocation-failed";
|
|
14
|
+
|
|
15
|
+
constructor(
|
|
16
|
+
payload: CloudResourceAllocationFailedPayload,
|
|
17
|
+
context: CloudSessionContext
|
|
18
|
+
) {
|
|
19
|
+
super(CloudResourceAllocationFailedEvent.EVENT_NAME);
|
|
20
|
+
this.payload = payload;
|
|
21
|
+
this.context = context;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@ValidateNestedType(() => CloudSessionContext)
|
|
25
|
+
context: CloudSessionContext;
|
|
26
|
+
|
|
27
|
+
@ValidateNestedType(() => CloudResourceAllocationFailedPayload)
|
|
28
|
+
payload: CloudResourceAllocationFailedPayload;
|
|
29
|
+
}
|
package/src/v2/events/index.ts
CHANGED
package/src/v2/types/cloud.ts
CHANGED
|
@@ -50,8 +50,9 @@ export class AWSResourceProviderSettings {
|
|
|
50
50
|
@IsString()
|
|
51
51
|
streamSessionId: string;
|
|
52
52
|
|
|
53
|
+
@IsOptional()
|
|
53
54
|
@IsString()
|
|
54
|
-
streamGroupId
|
|
55
|
+
streamGroupId?: string;
|
|
55
56
|
|
|
56
57
|
@IsEnum(CloudProvider)
|
|
57
58
|
@IsOptional()
|
|
@@ -61,9 +62,6 @@ export class AWSResourceProviderSettings {
|
|
|
61
62
|
export type CloudResourceProviderSettings = AWSResourceProviderSettings;
|
|
62
63
|
|
|
63
64
|
export class AWSCreationResponse {
|
|
64
|
-
@IsOptional()
|
|
65
|
-
signalResponse?: GameCast.SignalResponse;
|
|
66
|
-
|
|
67
65
|
@IsString()
|
|
68
66
|
@IsNotEmpty()
|
|
69
67
|
streamSessionId: string;
|