@ludeo/cloud-common 1.2.181 → 1.2.182
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/v4/types/site-controller/create-game.dto.d.ts +3 -8
- package/dist/v4/types/site-controller/create-game.dto.js +8 -10
- package/dist/v4/types/site-controller/create-game.dto.js.map +1 -1
- package/dist/v4/types/site-controller/create-machine.dto.d.ts +0 -7
- package/dist/v4/types/site-controller/create-machine.dto.js +1 -24
- package/dist/v4/types/site-controller/create-machine.dto.js.map +1 -1
- package/dist/v4/types/site-controller/index.d.ts +1 -0
- package/dist/v4/types/site-controller/index.js +1 -0
- package/dist/v4/types/site-controller/index.js.map +1 -1
- package/dist/v4/types/site-controller/terminate-machine.dto.d.ts +4 -0
- package/dist/v4/types/site-controller/terminate-machine.dto.js +25 -0
- package/dist/v4/types/site-controller/terminate-machine.dto.js.map +1 -0
- package/dist/v4/types/site-controller/types.d.ts +9 -14
- package/dist/v4/types/site-controller/types.js +7 -1
- package/dist/v4/types/site-controller/types.js.map +1 -1
- package/package.json +1 -1
- package/src/v4/types/site-controller/create-game.dto.ts +9 -17
- package/src/v4/types/site-controller/create-machine.dto.ts +0 -20
- package/src/v4/types/site-controller/index.ts +2 -1
- package/src/v4/types/site-controller/terminate-machine.dto.ts +10 -0
- package/src/v4/types/site-controller/types.ts +8 -13
|
@@ -1,16 +1,11 @@
|
|
|
1
|
+
import { MachineMode } from './types';
|
|
1
2
|
export declare class CreateGameRequestDto {
|
|
2
3
|
gameResourceId: string;
|
|
3
4
|
machineResourceId: string;
|
|
4
5
|
region: string;
|
|
6
|
+
machineMode: MachineMode;
|
|
7
|
+
machineType: string;
|
|
5
8
|
sourceSnapshot: string;
|
|
6
|
-
machineMode?: string;
|
|
7
|
-
machineType?: string;
|
|
8
9
|
additionalEnvironmentVariables?: Record<string, string>;
|
|
9
10
|
metadata?: Record<string, string>;
|
|
10
11
|
}
|
|
11
|
-
export declare class CreateGameResponseDto {
|
|
12
|
-
status: 'accepted' | 'success' | 'error';
|
|
13
|
-
message?: string;
|
|
14
|
-
instanceName?: string;
|
|
15
|
-
selfLink?: string;
|
|
16
|
-
}
|
|
@@ -9,8 +9,9 @@ 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.
|
|
12
|
+
exports.CreateGameRequestDto = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
|
+
const types_1 = require("./types");
|
|
14
15
|
class CreateGameRequestDto {
|
|
15
16
|
}
|
|
16
17
|
exports.CreateGameRequestDto = CreateGameRequestDto;
|
|
@@ -27,17 +28,17 @@ __decorate([
|
|
|
27
28
|
__metadata("design:type", String)
|
|
28
29
|
], CreateGameRequestDto.prototype, "region", void 0);
|
|
29
30
|
__decorate([
|
|
30
|
-
(0, class_validator_1.
|
|
31
|
-
__metadata("design:type", String)
|
|
32
|
-
], CreateGameRequestDto.prototype, "sourceSnapshot", void 0);
|
|
33
|
-
__decorate([
|
|
34
|
-
(0, class_validator_1.IsOptional)(),
|
|
31
|
+
(0, class_validator_1.IsEnum)(types_1.MachineMode),
|
|
35
32
|
__metadata("design:type", String)
|
|
36
33
|
], CreateGameRequestDto.prototype, "machineMode", void 0);
|
|
37
34
|
__decorate([
|
|
38
|
-
(0, class_validator_1.
|
|
35
|
+
(0, class_validator_1.IsString)(),
|
|
39
36
|
__metadata("design:type", String)
|
|
40
37
|
], CreateGameRequestDto.prototype, "machineType", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, class_validator_1.IsString)(),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], CreateGameRequestDto.prototype, "sourceSnapshot", void 0);
|
|
41
42
|
__decorate([
|
|
42
43
|
(0, class_validator_1.IsOptional)(),
|
|
43
44
|
__metadata("design:type", Object)
|
|
@@ -46,7 +47,4 @@ __decorate([
|
|
|
46
47
|
(0, class_validator_1.IsOptional)(),
|
|
47
48
|
__metadata("design:type", Object)
|
|
48
49
|
], CreateGameRequestDto.prototype, "metadata", void 0);
|
|
49
|
-
class CreateGameResponseDto {
|
|
50
|
-
}
|
|
51
|
-
exports.CreateGameResponseDto = CreateGameResponseDto;
|
|
52
50
|
//# sourceMappingURL=create-game.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-game.dto.js","sourceRoot":"","sources":["../../../../src/v4/types/site-controller/create-game.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"create-game.dto.js","sourceRoot":"","sources":["../../../../src/v4/types/site-controller/create-game.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA+D;AAE/D,mCAAsC;AAEtC,MAAa,oBAAoB;CAwBhC;AAxBD,oDAwBC;AAtBC;IADC,IAAA,0BAAQ,GAAE;;4DACY;AAGvB;IADC,IAAA,0BAAQ,GAAE;;+DACe;AAG1B;IADC,IAAA,0BAAQ,GAAE;;oDACI;AAGf;IADC,IAAA,wBAAM,EAAC,mBAAW,CAAC;;yDACK;AAGzB;IADC,IAAA,0BAAQ,GAAE;;yDACS;AAGpB;IADC,IAAA,0BAAQ,GAAE;;4DACY;AAGvB;IADC,IAAA,4BAAU,GAAE;;4EAC2C;AAGxD;IADC,IAAA,4BAAU,GAAE;;sDACqB"}
|
|
@@ -6,10 +6,3 @@ export declare class CreateMachineRequestDto {
|
|
|
6
6
|
machineType: string;
|
|
7
7
|
metadata?: Record<string, string>;
|
|
8
8
|
}
|
|
9
|
-
export declare class CreateMachineResponseDto {
|
|
10
|
-
status: 'accepted' | 'success' | 'error';
|
|
11
|
-
message?: string;
|
|
12
|
-
instanceName?: string;
|
|
13
|
-
selfLink?: string;
|
|
14
|
-
zone?: string;
|
|
15
|
-
}
|
|
@@ -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.
|
|
12
|
+
exports.CreateMachineRequestDto = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
14
|
const types_1 = require("./types");
|
|
15
15
|
class CreateMachineRequestDto {
|
|
@@ -35,27 +35,4 @@ __decorate([
|
|
|
35
35
|
(0, class_validator_1.IsOptional)(),
|
|
36
36
|
__metadata("design:type", Object)
|
|
37
37
|
], CreateMachineRequestDto.prototype, "metadata", void 0);
|
|
38
|
-
class CreateMachineResponseDto {
|
|
39
|
-
}
|
|
40
|
-
exports.CreateMachineResponseDto = CreateMachineResponseDto;
|
|
41
|
-
__decorate([
|
|
42
|
-
(0, class_validator_1.IsOptional)(),
|
|
43
|
-
(0, class_validator_1.IsString)(),
|
|
44
|
-
__metadata("design:type", String)
|
|
45
|
-
], CreateMachineResponseDto.prototype, "message", void 0);
|
|
46
|
-
__decorate([
|
|
47
|
-
(0, class_validator_1.IsOptional)(),
|
|
48
|
-
(0, class_validator_1.IsString)(),
|
|
49
|
-
__metadata("design:type", String)
|
|
50
|
-
], CreateMachineResponseDto.prototype, "instanceName", void 0);
|
|
51
|
-
__decorate([
|
|
52
|
-
(0, class_validator_1.IsOptional)(),
|
|
53
|
-
(0, class_validator_1.IsString)(),
|
|
54
|
-
__metadata("design:type", String)
|
|
55
|
-
], CreateMachineResponseDto.prototype, "selfLink", void 0);
|
|
56
|
-
__decorate([
|
|
57
|
-
(0, class_validator_1.IsOptional)(),
|
|
58
|
-
(0, class_validator_1.IsString)(),
|
|
59
|
-
__metadata("design:type", String)
|
|
60
|
-
], CreateMachineResponseDto.prototype, "zone", void 0);
|
|
61
38
|
//# sourceMappingURL=create-machine.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-machine.dto.js","sourceRoot":"","sources":["../../../../src/v4/types/site-controller/create-machine.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA+D;AAE/D,mCAAsC;AAEtC,MAAa,uBAAuB;CAenC;AAfD,0DAeC;AAbC;IADC,IAAA,0BAAQ,GAAE;;kEACe;AAG1B;IADC,IAAA,0BAAQ,GAAE;;uDACI;AAGf;IADC,IAAA,wBAAM,EAAC,mBAAW,CAAC;;4DACK;AAGzB;IADC,IAAA,0BAAQ,GAAE;;4DACS;AAGpB;IADC,IAAA,4BAAU,GAAE;;yDACqB
|
|
1
|
+
{"version":3,"file":"create-machine.dto.js","sourceRoot":"","sources":["../../../../src/v4/types/site-controller/create-machine.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA+D;AAE/D,mCAAsC;AAEtC,MAAa,uBAAuB;CAenC;AAfD,0DAeC;AAbC;IADC,IAAA,0BAAQ,GAAE;;kEACe;AAG1B;IADC,IAAA,0BAAQ,GAAE;;uDACI;AAGf;IADC,IAAA,wBAAM,EAAC,mBAAW,CAAC;;4DACK;AAGzB;IADC,IAAA,0BAAQ,GAAE;;4DACS;AAGpB;IADC,IAAA,4BAAU,GAAE;;yDACqB"}
|
|
@@ -18,4 +18,5 @@ __exportStar(require("./types"), exports);
|
|
|
18
18
|
__exportStar(require("./create-machine.dto"), exports);
|
|
19
19
|
__exportStar(require("./create-game.dto"), exports);
|
|
20
20
|
__exportStar(require("./create-snapshot.dto"), exports);
|
|
21
|
+
__exportStar(require("./terminate-machine.dto"), exports);
|
|
21
22
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/v4/types/site-controller/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,uDAAqC;AACrC,oDAAkC;AAClC,wDAAsC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/v4/types/site-controller/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,uDAAqC;AACrC,oDAAkC;AAClC,wDAAsC;AACtC,0DAAwC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
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.TerminateMachineRequestDto = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
class TerminateMachineRequestDto {
|
|
15
|
+
}
|
|
16
|
+
exports.TerminateMachineRequestDto = TerminateMachineRequestDto;
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, class_validator_1.IsString)(),
|
|
19
|
+
__metadata("design:type", String)
|
|
20
|
+
], TerminateMachineRequestDto.prototype, "machineResourceId", void 0);
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, class_validator_1.IsString)(),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], TerminateMachineRequestDto.prototype, "region", void 0);
|
|
25
|
+
//# sourceMappingURL=terminate-machine.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terminate-machine.dto.js","sourceRoot":"","sources":["../../../../src/v4/types/site-controller/terminate-machine.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA2C;AAE3C,MAAa,0BAA0B;CAMtC;AAND,gEAMC;AAJC;IADC,IAAA,0BAAQ,GAAE;;qEACe;AAG1B;IADC,IAAA,0BAAQ,GAAE;;0DACI"}
|
|
@@ -22,7 +22,8 @@ export declare enum SiteOperationStatus {
|
|
|
22
22
|
export declare enum MachineStatusReason {
|
|
23
23
|
VMReady = "VMReady",
|
|
24
24
|
AgentReadyForCommands = "AgentReadyForCommands",
|
|
25
|
-
AgentModeInitialized = "AgentModeInitialized"
|
|
25
|
+
AgentModeInitialized = "AgentModeInitialized",
|
|
26
|
+
VMTerminated = "VMTerminated"
|
|
26
27
|
}
|
|
27
28
|
export declare enum GameStatusReason {
|
|
28
29
|
DiskAttached = "DiskAttached",
|
|
@@ -32,19 +33,13 @@ export declare enum AgentRunMode {
|
|
|
32
33
|
CONTROLLED = "controlled",
|
|
33
34
|
UNCONTROLLED = "uncontrolled"
|
|
34
35
|
}
|
|
35
|
-
export
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
reason?: string;
|
|
39
|
-
instanceName?: string;
|
|
40
|
-
selfLink?: string;
|
|
41
|
-
zone?: string;
|
|
36
|
+
export declare enum SiteAdapterFlow {
|
|
37
|
+
Creation = "creation",
|
|
38
|
+
Termination = "termination"
|
|
42
39
|
}
|
|
43
|
-
export interface
|
|
44
|
-
status:
|
|
40
|
+
export interface SiteAdapterStatusPayload {
|
|
41
|
+
status: SiteOperationStatus;
|
|
42
|
+
flow: SiteAdapterFlow;
|
|
45
43
|
message?: string;
|
|
46
|
-
reason?:
|
|
47
|
-
machineResourceId?: string;
|
|
48
|
-
instanceName?: string;
|
|
49
|
-
diskName?: string;
|
|
44
|
+
reason?: MachineStatusReason | GameStatusReason;
|
|
50
45
|
}
|
|
@@ -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.AgentRunMode = exports.GameStatusReason = exports.MachineStatusReason = exports.SiteOperationStatus = exports.AndroidGameCreationPayload = exports.ProtonGameCreationPayload = exports.MachineMode = void 0;
|
|
12
|
+
exports.SiteAdapterFlow = exports.AgentRunMode = exports.GameStatusReason = exports.MachineStatusReason = exports.SiteOperationStatus = exports.AndroidGameCreationPayload = exports.ProtonGameCreationPayload = exports.MachineMode = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
14
|
var MachineMode;
|
|
15
15
|
(function (MachineMode) {
|
|
@@ -68,6 +68,7 @@ var MachineStatusReason;
|
|
|
68
68
|
MachineStatusReason["VMReady"] = "VMReady";
|
|
69
69
|
MachineStatusReason["AgentReadyForCommands"] = "AgentReadyForCommands";
|
|
70
70
|
MachineStatusReason["AgentModeInitialized"] = "AgentModeInitialized";
|
|
71
|
+
MachineStatusReason["VMTerminated"] = "VMTerminated";
|
|
71
72
|
})(MachineStatusReason || (exports.MachineStatusReason = MachineStatusReason = {}));
|
|
72
73
|
var GameStatusReason;
|
|
73
74
|
(function (GameStatusReason) {
|
|
@@ -79,4 +80,9 @@ var AgentRunMode;
|
|
|
79
80
|
AgentRunMode["CONTROLLED"] = "controlled";
|
|
80
81
|
AgentRunMode["UNCONTROLLED"] = "uncontrolled";
|
|
81
82
|
})(AgentRunMode || (exports.AgentRunMode = AgentRunMode = {}));
|
|
83
|
+
var SiteAdapterFlow;
|
|
84
|
+
(function (SiteAdapterFlow) {
|
|
85
|
+
SiteAdapterFlow["Creation"] = "creation";
|
|
86
|
+
SiteAdapterFlow["Termination"] = "termination";
|
|
87
|
+
})(SiteAdapterFlow || (exports.SiteAdapterFlow = SiteAdapterFlow = {}));
|
|
82
88
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/v4/types/site-controller/types.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAyE;AAEzE,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,gCAAiB,CAAA;IACjB,kCAAmB,CAAA;AACrB,CAAC,EAHW,WAAW,2BAAX,WAAW,QAGtB;AAED,MAAa,yBAAyB;CAcrC;AAdD,8DAcC;AAZC;IADC,IAAA,0BAAQ,GAAE;;kEACa;AAGxB;IADC,IAAA,wBAAM,GAAE;;oEACiB;AAI1B;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;iEACe;AAIxB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;iFAC6C;AAG1D,MAAa,0BAA0B;CActC;AAdD,gEAcC;AAZC;IADC,IAAA,0BAAQ,GAAE;;6DACO;AAGlB;IADC,IAAA,wBAAM,GAAE;;qEACiB;AAI1B;IAFC,IAAA,wBAAM,GAAE;IACR,IAAA,4BAAU,GAAE;;kEACW;AAIxB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;kFAC6C;AAM1D,IAAY,mBAGX;AAHD,WAAY,mBAAmB;IAC7B,0CAAmB,CAAA;IACnB,sCAAe,CAAA;AACjB,CAAC,EAHW,mBAAmB,mCAAnB,mBAAmB,QAG9B;AAED,IAAY,
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/v4/types/site-controller/types.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAyE;AAEzE,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,gCAAiB,CAAA;IACjB,kCAAmB,CAAA;AACrB,CAAC,EAHW,WAAW,2BAAX,WAAW,QAGtB;AAED,MAAa,yBAAyB;CAcrC;AAdD,8DAcC;AAZC;IADC,IAAA,0BAAQ,GAAE;;kEACa;AAGxB;IADC,IAAA,wBAAM,GAAE;;oEACiB;AAI1B;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;iEACe;AAIxB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;iFAC6C;AAG1D,MAAa,0BAA0B;CActC;AAdD,gEAcC;AAZC;IADC,IAAA,0BAAQ,GAAE;;6DACO;AAGlB;IADC,IAAA,wBAAM,GAAE;;qEACiB;AAI1B;IAFC,IAAA,wBAAM,GAAE;IACR,IAAA,4BAAU,GAAE;;kEACW;AAIxB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;kFAC6C;AAM1D,IAAY,mBAGX;AAHD,WAAY,mBAAmB;IAC7B,0CAAmB,CAAA;IACnB,sCAAe,CAAA;AACjB,CAAC,EAHW,mBAAmB,mCAAnB,mBAAmB,QAG9B;AAED,IAAY,mBAKX;AALD,WAAY,mBAAmB;IAC7B,0CAAmB,CAAA;IACnB,sEAA+C,CAAA;IAC/C,oEAA6C,CAAA;IAC7C,oDAA6B,CAAA;AAC/B,CAAC,EALW,mBAAmB,mCAAnB,mBAAmB,QAK9B;AAED,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,iDAA6B,CAAA;IAC7B,iDAA6B,CAAA;AAC/B,CAAC,EAHW,gBAAgB,gCAAhB,gBAAgB,QAG3B;AAED,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,yCAAyB,CAAA;IACzB,6CAA6B,CAAA;AAC/B,CAAC,EAHW,YAAY,4BAAZ,YAAY,QAGvB;AAED,IAAY,eAGX;AAHD,WAAY,eAAe;IACzB,wCAAqB,CAAA;IACrB,8CAA2B,CAAA;AAC7B,CAAC,EAHW,eAAe,+BAAf,eAAe,QAG1B"}
|
package/package.json
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { IsOptional, IsString } from 'class-validator';
|
|
1
|
+
import { IsEnum, IsOptional, IsString } from 'class-validator';
|
|
2
|
+
|
|
3
|
+
import { MachineMode } from './types';
|
|
2
4
|
|
|
3
5
|
export class CreateGameRequestDto {
|
|
4
6
|
@IsString()
|
|
@@ -10,14 +12,14 @@ export class CreateGameRequestDto {
|
|
|
10
12
|
@IsString()
|
|
11
13
|
region: string;
|
|
12
14
|
|
|
13
|
-
@
|
|
14
|
-
|
|
15
|
+
@IsEnum(MachineMode)
|
|
16
|
+
machineMode: MachineMode;
|
|
15
17
|
|
|
16
|
-
@
|
|
17
|
-
|
|
18
|
+
@IsString()
|
|
19
|
+
machineType: string;
|
|
18
20
|
|
|
19
|
-
@
|
|
20
|
-
|
|
21
|
+
@IsString()
|
|
22
|
+
sourceSnapshot: string;
|
|
21
23
|
|
|
22
24
|
@IsOptional()
|
|
23
25
|
additionalEnvironmentVariables?: Record<string, string>;
|
|
@@ -26,13 +28,3 @@ export class CreateGameRequestDto {
|
|
|
26
28
|
metadata?: Record<string, string>;
|
|
27
29
|
}
|
|
28
30
|
|
|
29
|
-
export class CreateGameResponseDto {
|
|
30
|
-
status: 'accepted' | 'success' | 'error';
|
|
31
|
-
|
|
32
|
-
message?: string;
|
|
33
|
-
|
|
34
|
-
instanceName?: string;
|
|
35
|
-
|
|
36
|
-
selfLink?: string;
|
|
37
|
-
}
|
|
38
|
-
|
|
@@ -19,23 +19,3 @@ export class CreateMachineRequestDto {
|
|
|
19
19
|
metadata?: Record<string, string>;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
export class CreateMachineResponseDto {
|
|
23
|
-
status: 'accepted' | 'success' | 'error';
|
|
24
|
-
|
|
25
|
-
@IsOptional()
|
|
26
|
-
@IsString()
|
|
27
|
-
message?: string;
|
|
28
|
-
|
|
29
|
-
@IsOptional()
|
|
30
|
-
@IsString()
|
|
31
|
-
instanceName?: string;
|
|
32
|
-
|
|
33
|
-
@IsOptional()
|
|
34
|
-
@IsString()
|
|
35
|
-
selfLink?: string;
|
|
36
|
-
|
|
37
|
-
@IsOptional()
|
|
38
|
-
@IsString()
|
|
39
|
-
zone?: string;
|
|
40
|
-
}
|
|
41
|
-
|
|
@@ -49,6 +49,7 @@ export enum MachineStatusReason {
|
|
|
49
49
|
VMReady = 'VMReady',
|
|
50
50
|
AgentReadyForCommands = 'AgentReadyForCommands',
|
|
51
51
|
AgentModeInitialized = 'AgentModeInitialized',
|
|
52
|
+
VMTerminated = 'VMTerminated',
|
|
52
53
|
}
|
|
53
54
|
|
|
54
55
|
export enum GameStatusReason {
|
|
@@ -61,20 +62,14 @@ export enum AgentRunMode {
|
|
|
61
62
|
UNCONTROLLED = 'uncontrolled',
|
|
62
63
|
}
|
|
63
64
|
|
|
64
|
-
export
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
reason?: string;
|
|
68
|
-
instanceName?: string;
|
|
69
|
-
selfLink?: string;
|
|
70
|
-
zone?: string;
|
|
65
|
+
export enum SiteAdapterFlow {
|
|
66
|
+
Creation = 'creation',
|
|
67
|
+
Termination = 'termination',
|
|
71
68
|
}
|
|
72
69
|
|
|
73
|
-
export interface
|
|
74
|
-
status:
|
|
70
|
+
export interface SiteAdapterStatusPayload {
|
|
71
|
+
status: SiteOperationStatus;
|
|
72
|
+
flow: SiteAdapterFlow;
|
|
75
73
|
message?: string;
|
|
76
|
-
reason?:
|
|
77
|
-
machineResourceId?: string;
|
|
78
|
-
instanceName?: string;
|
|
79
|
-
diskName?: string;
|
|
74
|
+
reason?: MachineStatusReason | GameStatusReason;
|
|
80
75
|
}
|