@ludeo/cloud-common 1.1.72 → 1.1.74
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/v3/types/pools/configuration/attributes/game.d.ts +4 -0
- package/dist/v3/types/pools/configuration/attributes/game.js +22 -0
- package/dist/v3/types/pools/configuration/attributes/game.js.map +1 -0
- package/dist/v3/types/pools/configuration/attributes/index.d.ts +2 -0
- package/dist/v3/types/pools/configuration/attributes/index.js +19 -0
- package/dist/v3/types/pools/configuration/attributes/index.js.map +1 -0
- package/dist/v3/types/pools/configuration/attributes/machine.d.ts +3 -0
- package/dist/v3/types/pools/configuration/attributes/machine.js +21 -0
- package/dist/v3/types/pools/configuration/attributes/machine.js.map +1 -0
- package/dist/v3/types/pools/configuration/game.d.ts +2 -0
- package/dist/v3/types/pools/configuration/game.js +6 -0
- package/dist/v3/types/pools/configuration/game.js.map +1 -1
- package/dist/v3/types/pools/configuration/index.d.ts +1 -0
- package/dist/v3/types/pools/configuration/index.js +1 -0
- package/dist/v3/types/pools/configuration/index.js.map +1 -1
- package/dist/v3/types/pools/configuration/machine.d.ts +2 -0
- package/dist/v3/types/pools/configuration/machine.js +6 -0
- package/dist/v3/types/pools/configuration/machine.js.map +1 -1
- package/package.json +2 -2
- package/src/v3/types/pools/configuration/attributes/game.ts +7 -0
- package/src/v3/types/pools/configuration/attributes/index.ts +2 -0
- package/src/v3/types/pools/configuration/attributes/machine.ts +6 -0
- package/src/v3/types/pools/configuration/game.ts +5 -0
- package/src/v3/types/pools/configuration/index.ts +1 -0
- package/src/v3/types/pools/configuration/machine.ts +5 -0
- package/dist/v2/events/cloud-session-ended.event.d.ts +0 -8
- package/dist/v2/events/cloud-session-ended.event.js +0 -28
- package/dist/v2/events/cloud-session-ended.event.js.map +0 -1
- package/dist/v3/events/game-created-response.d.ts +0 -15
- package/dist/v3/events/game-created-response.js +0 -54
- package/dist/v3/events/game-created-response.js.map +0 -1
- package/dist/v3/events/game-status-changed.d.ts +0 -16
- package/dist/v3/events/game-status-changed.js +0 -59
- package/dist/v3/events/game-status-changed.js.map +0 -1
- package/dist/v3/events/machine-created-response.d.ts +0 -12
- package/dist/v3/events/machine-created-response.js +0 -45
- package/dist/v3/events/machine-created-response.js.map +0 -1
- package/dist/v3/events/monitor-game-task.d.ts +0 -14
- package/dist/v3/events/monitor-game-task.js +0 -48
- package/dist/v3/events/monitor-game-task.js.map +0 -1
- package/dist/v3/types/pools.d.ts +0 -63
- package/dist/v3/types/pools.js +0 -125
- package/dist/v3/types/pools.js.map +0 -1
package/dist/v3/types/pools.d.ts
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { AWSResourceProviderSettings, CloudProvider, CloudProviderSettings } from "./cloud";
|
|
2
|
-
export declare enum CloudResourceStatus {
|
|
3
|
-
Allocated = "allocated",
|
|
4
|
-
Available = "available",
|
|
5
|
-
Creating = "creating",
|
|
6
|
-
Created = "created",
|
|
7
|
-
Allocating = "allocating",
|
|
8
|
-
Error = "error",
|
|
9
|
-
Terminating = "terminating",
|
|
10
|
-
Terminated = "terminated"
|
|
11
|
-
}
|
|
12
|
-
export declare enum CloudPoolStatus {
|
|
13
|
-
Active = "active",
|
|
14
|
-
Created = "created",
|
|
15
|
-
Scaling = "scaling",
|
|
16
|
-
Terminated = "terminated"
|
|
17
|
-
}
|
|
18
|
-
export declare class PoolScaleConfiguration {
|
|
19
|
-
size: number;
|
|
20
|
-
}
|
|
21
|
-
export declare enum CloudPoolType {
|
|
22
|
-
GAME = "game",
|
|
23
|
-
MACHINE = "machine"
|
|
24
|
-
}
|
|
25
|
-
export declare class BaseCloudPoolConfiguration {
|
|
26
|
-
providerSettings?: CloudProviderSettings;
|
|
27
|
-
cloudProvider: CloudProvider;
|
|
28
|
-
poolId: string;
|
|
29
|
-
poolScaleConfiguration: PoolScaleConfiguration;
|
|
30
|
-
type: CloudPoolType;
|
|
31
|
-
}
|
|
32
|
-
export declare class GamePoolConfiguration extends BaseCloudPoolConfiguration {
|
|
33
|
-
type: CloudPoolType.GAME;
|
|
34
|
-
gameId: string;
|
|
35
|
-
machinePoolId: string;
|
|
36
|
-
}
|
|
37
|
-
export declare class MachinePoolConfiguration extends BaseCloudPoolConfiguration {
|
|
38
|
-
type: CloudPoolType.MACHINE;
|
|
39
|
-
}
|
|
40
|
-
export type CloudPoolConfigurationType<T extends CloudPoolType | undefined = undefined> = T extends undefined ? BaseCloudPoolConfiguration : T extends CloudPoolType.GAME ? GamePoolConfiguration : T extends CloudPoolType.MACHINE ? MachinePoolConfiguration : BaseCloudPoolConfiguration;
|
|
41
|
-
export declare class BaseCloudResource {
|
|
42
|
-
id: string;
|
|
43
|
-
status: CloudResourceStatus;
|
|
44
|
-
createdAt: number;
|
|
45
|
-
updatedAt?: number;
|
|
46
|
-
settings?: AWSResourceProviderSettings;
|
|
47
|
-
}
|
|
48
|
-
export declare class MachineCloudResource extends BaseCloudResource {
|
|
49
|
-
}
|
|
50
|
-
export declare class GameCloudResource extends BaseCloudResource {
|
|
51
|
-
machineResourceId?: string;
|
|
52
|
-
}
|
|
53
|
-
export type CloudResourceType<T extends CloudPoolType | undefined = undefined> = T extends undefined ? BaseCloudResource : T extends CloudPoolType.GAME ? GameCloudResource : T extends CloudPoolType.MACHINE ? MachineCloudResource : BaseCloudResource;
|
|
54
|
-
export type CloudResourcesMap<T extends BaseCloudResource> = Record<string, T>;
|
|
55
|
-
export type CloudResourcesStatusMap = Record<CloudResourceStatus, number>;
|
|
56
|
-
export declare class CloudPool<T extends CloudPoolType | undefined = undefined> {
|
|
57
|
-
id: string;
|
|
58
|
-
status: CloudPoolStatus;
|
|
59
|
-
createdAt: number;
|
|
60
|
-
updatedAt?: number;
|
|
61
|
-
config: CloudPoolConfigurationType<T>;
|
|
62
|
-
resources?: CloudResourcesMap<CloudResourceType<T>>;
|
|
63
|
-
}
|
package/dist/v3/types/pools.js
DELETED
|
@@ -1,125 +0,0 @@
|
|
|
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.CloudPool = exports.GameCloudResource = exports.MachineCloudResource = exports.BaseCloudResource = exports.MachinePoolConfiguration = exports.GamePoolConfiguration = exports.BaseCloudPoolConfiguration = exports.CloudPoolType = exports.PoolScaleConfiguration = exports.CloudPoolStatus = exports.CloudResourceStatus = void 0;
|
|
13
|
-
const class_validator_1 = require("class-validator");
|
|
14
|
-
const decorators_1 = require("../../decorators");
|
|
15
|
-
const cloud_1 = require("./cloud");
|
|
16
|
-
var CloudResourceStatus;
|
|
17
|
-
(function (CloudResourceStatus) {
|
|
18
|
-
CloudResourceStatus["Allocated"] = "allocated";
|
|
19
|
-
CloudResourceStatus["Available"] = "available";
|
|
20
|
-
CloudResourceStatus["Creating"] = "creating";
|
|
21
|
-
CloudResourceStatus["Created"] = "created";
|
|
22
|
-
CloudResourceStatus["Allocating"] = "allocating";
|
|
23
|
-
CloudResourceStatus["Error"] = "error";
|
|
24
|
-
CloudResourceStatus["Terminating"] = "terminating";
|
|
25
|
-
CloudResourceStatus["Terminated"] = "terminated";
|
|
26
|
-
})(CloudResourceStatus || (exports.CloudResourceStatus = CloudResourceStatus = {}));
|
|
27
|
-
var CloudPoolStatus;
|
|
28
|
-
(function (CloudPoolStatus) {
|
|
29
|
-
CloudPoolStatus["Active"] = "active";
|
|
30
|
-
CloudPoolStatus["Created"] = "created";
|
|
31
|
-
CloudPoolStatus["Scaling"] = "scaling";
|
|
32
|
-
CloudPoolStatus["Terminated"] = "terminated";
|
|
33
|
-
})(CloudPoolStatus || (exports.CloudPoolStatus = CloudPoolStatus = {}));
|
|
34
|
-
class PoolScaleConfiguration {
|
|
35
|
-
}
|
|
36
|
-
exports.PoolScaleConfiguration = PoolScaleConfiguration;
|
|
37
|
-
__decorate([
|
|
38
|
-
(0, class_validator_1.IsNumber)(),
|
|
39
|
-
__metadata("design:type", Number)
|
|
40
|
-
], PoolScaleConfiguration.prototype, "size", void 0);
|
|
41
|
-
var CloudPoolType;
|
|
42
|
-
(function (CloudPoolType) {
|
|
43
|
-
CloudPoolType["GAME"] = "game";
|
|
44
|
-
CloudPoolType["MACHINE"] = "machine";
|
|
45
|
-
})(CloudPoolType || (exports.CloudPoolType = CloudPoolType = {}));
|
|
46
|
-
class BaseCloudPoolConfiguration {
|
|
47
|
-
}
|
|
48
|
-
exports.BaseCloudPoolConfiguration = BaseCloudPoolConfiguration;
|
|
49
|
-
__decorate([
|
|
50
|
-
(0, class_validator_1.IsEnum)(cloud_1.CloudProvider),
|
|
51
|
-
__metadata("design:type", String)
|
|
52
|
-
], BaseCloudPoolConfiguration.prototype, "cloudProvider", void 0);
|
|
53
|
-
__decorate([
|
|
54
|
-
(0, class_validator_1.IsUUID)(),
|
|
55
|
-
__metadata("design:type", String)
|
|
56
|
-
], BaseCloudPoolConfiguration.prototype, "poolId", void 0);
|
|
57
|
-
__decorate([
|
|
58
|
-
(0, decorators_1.ValidateNestedType)(() => PoolScaleConfiguration),
|
|
59
|
-
__metadata("design:type", PoolScaleConfiguration)
|
|
60
|
-
], BaseCloudPoolConfiguration.prototype, "poolScaleConfiguration", void 0);
|
|
61
|
-
__decorate([
|
|
62
|
-
(0, class_validator_1.IsEnum)(CloudPoolType),
|
|
63
|
-
__metadata("design:type", String)
|
|
64
|
-
], BaseCloudPoolConfiguration.prototype, "type", void 0);
|
|
65
|
-
class GamePoolConfiguration extends BaseCloudPoolConfiguration {
|
|
66
|
-
}
|
|
67
|
-
exports.GamePoolConfiguration = GamePoolConfiguration;
|
|
68
|
-
__decorate([
|
|
69
|
-
(0, class_validator_1.IsEnum)(CloudPoolType),
|
|
70
|
-
__metadata("design:type", String)
|
|
71
|
-
], GamePoolConfiguration.prototype, "type", void 0);
|
|
72
|
-
__decorate([
|
|
73
|
-
(0, class_validator_1.IsUUID)(),
|
|
74
|
-
__metadata("design:type", String)
|
|
75
|
-
], GamePoolConfiguration.prototype, "gameId", void 0);
|
|
76
|
-
__decorate([
|
|
77
|
-
(0, class_validator_1.IsUUID)(),
|
|
78
|
-
__metadata("design:type", String)
|
|
79
|
-
], GamePoolConfiguration.prototype, "machinePoolId", void 0);
|
|
80
|
-
class MachinePoolConfiguration extends BaseCloudPoolConfiguration {
|
|
81
|
-
}
|
|
82
|
-
exports.MachinePoolConfiguration = MachinePoolConfiguration;
|
|
83
|
-
__decorate([
|
|
84
|
-
(0, class_validator_1.IsEnum)(CloudPoolType),
|
|
85
|
-
__metadata("design:type", String)
|
|
86
|
-
], MachinePoolConfiguration.prototype, "type", void 0);
|
|
87
|
-
class BaseCloudResource {
|
|
88
|
-
}
|
|
89
|
-
exports.BaseCloudResource = BaseCloudResource;
|
|
90
|
-
__decorate([
|
|
91
|
-
(0, class_validator_1.IsUUID)(),
|
|
92
|
-
__metadata("design:type", String)
|
|
93
|
-
], BaseCloudResource.prototype, "id", void 0);
|
|
94
|
-
__decorate([
|
|
95
|
-
(0, class_validator_1.IsEnum)(CloudResourceStatus),
|
|
96
|
-
__metadata("design:type", String)
|
|
97
|
-
], BaseCloudResource.prototype, "status", void 0);
|
|
98
|
-
__decorate([
|
|
99
|
-
(0, class_validator_1.IsNumber)(),
|
|
100
|
-
__metadata("design:type", Number)
|
|
101
|
-
], BaseCloudResource.prototype, "createdAt", void 0);
|
|
102
|
-
__decorate([
|
|
103
|
-
(0, class_validator_1.IsNumber)(),
|
|
104
|
-
(0, class_validator_1.IsOptional)(),
|
|
105
|
-
__metadata("design:type", Number)
|
|
106
|
-
], BaseCloudResource.prototype, "updatedAt", void 0);
|
|
107
|
-
__decorate([
|
|
108
|
-
(0, decorators_1.ValidateNestedType)(() => cloud_1.AWSResourceProviderSettings),
|
|
109
|
-
__metadata("design:type", cloud_1.AWSResourceProviderSettings)
|
|
110
|
-
], BaseCloudResource.prototype, "settings", void 0);
|
|
111
|
-
class MachineCloudResource extends BaseCloudResource {
|
|
112
|
-
}
|
|
113
|
-
exports.MachineCloudResource = MachineCloudResource;
|
|
114
|
-
class GameCloudResource extends BaseCloudResource {
|
|
115
|
-
}
|
|
116
|
-
exports.GameCloudResource = GameCloudResource;
|
|
117
|
-
__decorate([
|
|
118
|
-
(0, class_validator_1.IsString)(),
|
|
119
|
-
(0, class_validator_1.IsOptional)(),
|
|
120
|
-
__metadata("design:type", String)
|
|
121
|
-
], GameCloudResource.prototype, "machineResourceId", void 0);
|
|
122
|
-
class CloudPool {
|
|
123
|
-
}
|
|
124
|
-
exports.CloudPool = CloudPool;
|
|
125
|
-
//# sourceMappingURL=pools.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pools.js","sourceRoot":"","sources":["../../../src/v3/types/pools.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAMyB;AAEzB,iDAAsD;AACtD,mCAIiB;AAEjB,IAAY,mBASX;AATD,WAAY,mBAAmB;IAC7B,8CAAuB,CAAA;IACvB,8CAAuB,CAAA;IACvB,4CAAqB,CAAA;IACrB,0CAAmB,CAAA;IACnB,gDAAyB,CAAA;IACzB,sCAAe,CAAA;IACf,kDAA2B,CAAA;IAC3B,gDAAyB,CAAA;AAC3B,CAAC,EATW,mBAAmB,mCAAnB,mB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