@ludeo/cloud-common 1.1.17 → 1.1.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.
@@ -1,8 +1,10 @@
1
1
  import { CloudProvider } from "../types/cloud";
2
2
  export declare class CloudResourceContext {
3
- resourceId: string;
4
- poolId: string;
5
3
  streamGroupId?: string;
6
4
  streamSessionId?: string;
7
5
  cloudProvider: CloudProvider;
6
+ gamePoolId?: string;
7
+ gameResourceId?: string;
8
+ machinePoolId?: string;
9
+ machineResourceId?: string;
8
10
  }
@@ -15,14 +15,6 @@ const cloud_1 = require("../types/cloud");
15
15
  class CloudResourceContext {
16
16
  }
17
17
  exports.CloudResourceContext = CloudResourceContext;
18
- __decorate([
19
- (0, class_validator_1.IsUUID)(),
20
- __metadata("design:type", String)
21
- ], CloudResourceContext.prototype, "resourceId", void 0);
22
- __decorate([
23
- (0, class_validator_1.IsUUID)(),
24
- __metadata("design:type", String)
25
- ], CloudResourceContext.prototype, "poolId", void 0);
26
18
  __decorate([
27
19
  (0, class_validator_1.IsString)(),
28
20
  (0, class_validator_1.IsOptional)(),
@@ -37,4 +29,24 @@ __decorate([
37
29
  (0, class_validator_1.IsEnum)(cloud_1.CloudProvider),
38
30
  __metadata("design:type", String)
39
31
  ], CloudResourceContext.prototype, "cloudProvider", void 0);
32
+ __decorate([
33
+ (0, class_validator_1.IsUUID)(),
34
+ (0, class_validator_1.IsOptional)(),
35
+ __metadata("design:type", String)
36
+ ], CloudResourceContext.prototype, "gamePoolId", void 0);
37
+ __decorate([
38
+ (0, class_validator_1.IsUUID)(),
39
+ (0, class_validator_1.IsOptional)(),
40
+ __metadata("design:type", String)
41
+ ], CloudResourceContext.prototype, "gameResourceId", void 0);
42
+ __decorate([
43
+ (0, class_validator_1.IsUUID)(),
44
+ (0, class_validator_1.IsOptional)(),
45
+ __metadata("design:type", String)
46
+ ], CloudResourceContext.prototype, "machinePoolId", void 0);
47
+ __decorate([
48
+ (0, class_validator_1.IsUUID)(),
49
+ (0, class_validator_1.IsOptional)(),
50
+ __metadata("design:type", String)
51
+ ], CloudResourceContext.prototype, "machineResourceId", void 0);
40
52
  //# sourceMappingURL=cloud-resource-context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cloud-resource-context.js","sourceRoot":"","sources":["../../../src/v3/contexts/cloud-resource-context.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAuE;AACvE,0CAA+C;AAE/C,MAAa,oBAAoB;CAiBhC;AAjBD,oDAiBC;AAfC;IADC,IAAA,wBAAM,GAAE;;wDACU;AAGnB;IADC,IAAA,wBAAM,GAAE;;oDACM;AAIf;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;2DACU;AAIvB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;6DACY;AAGzB;IADC,IAAA,wBAAM,EAAC,qBAAa,CAAC;;2DACO"}
1
+ {"version":3,"file":"cloud-resource-context.js","sourceRoot":"","sources":["../../../src/v3/contexts/cloud-resource-context.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAuE;AACvE,0CAA+C;AAE/C,MAAa,oBAAoB;CA2BhC;AA3BD,oDA2BC;AAxBC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;2DACU;AAIvB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;6DACY;AAGzB;IADC,IAAA,wBAAM,EAAC,qBAAa,CAAC;;2DACO;AAI7B;IAFC,IAAA,wBAAM,GAAE;IACR,IAAA,4BAAU,GAAE;;wDACO;AAIpB;IAFC,IAAA,wBAAM,GAAE;IACR,IAAA,4BAAU,GAAE;;4DACW;AAIxB;IAFC,IAAA,wBAAM,GAAE;IACR,IAAA,4BAAU,GAAE;;2DACU;AAIvB;IAFC,IAAA,wBAAM,GAAE;IACR,IAAA,4BAAU,GAAE;;+DACc"}
@@ -6,9 +6,13 @@ export declare class CloudSessionContext {
6
6
  userId?: string;
7
7
  gameId?: string;
8
8
  ludeoId?: string;
9
- poolId?: string;
10
9
  cloudProvider: CloudProvider;
11
- resourceId?: string;
10
+ gamePoolId?: string;
11
+ gameResourceId?: string;
12
+ machinePoolId?: string;
13
+ machineResourceId?: string;
12
14
  streamGroupId?: string;
13
15
  streamSessionId?: string;
16
+ poolId?: string;
17
+ resourceId?: string;
14
18
  }
@@ -45,19 +45,29 @@ __decorate([
45
45
  __metadata("design:type", String)
46
46
  ], CloudSessionContext.prototype, "ludeoId", void 0);
47
47
  __decorate([
48
- (0, class_validator_1.IsOptional)(),
48
+ (0, class_validator_1.IsEnum)(types_1.CloudProvider),
49
+ __metadata("design:type", String)
50
+ ], CloudSessionContext.prototype, "cloudProvider", void 0);
51
+ __decorate([
49
52
  (0, class_validator_1.IsUUID)(),
53
+ (0, class_validator_1.IsOptional)(),
50
54
  __metadata("design:type", String)
51
- ], CloudSessionContext.prototype, "poolId", void 0);
55
+ ], CloudSessionContext.prototype, "gamePoolId", void 0);
52
56
  __decorate([
53
- (0, class_validator_1.IsEnum)(types_1.CloudProvider),
57
+ (0, class_validator_1.IsUUID)(),
58
+ (0, class_validator_1.IsOptional)(),
54
59
  __metadata("design:type", String)
55
- ], CloudSessionContext.prototype, "cloudProvider", void 0);
60
+ ], CloudSessionContext.prototype, "gameResourceId", void 0);
56
61
  __decorate([
62
+ (0, class_validator_1.IsUUID)(),
57
63
  (0, class_validator_1.IsOptional)(),
64
+ __metadata("design:type", String)
65
+ ], CloudSessionContext.prototype, "machinePoolId", void 0);
66
+ __decorate([
58
67
  (0, class_validator_1.IsUUID)(),
68
+ (0, class_validator_1.IsOptional)(),
59
69
  __metadata("design:type", String)
60
- ], CloudSessionContext.prototype, "resourceId", void 0);
70
+ ], CloudSessionContext.prototype, "machineResourceId", void 0);
61
71
  __decorate([
62
72
  (0, class_validator_1.IsOptional)(),
63
73
  (0, class_validator_1.IsString)(),
@@ -68,4 +78,14 @@ __decorate([
68
78
  (0, class_validator_1.IsString)(),
69
79
  __metadata("design:type", String)
70
80
  ], CloudSessionContext.prototype, "streamSessionId", void 0);
81
+ __decorate([
82
+ (0, class_validator_1.IsOptional)(),
83
+ (0, class_validator_1.IsUUID)(),
84
+ __metadata("design:type", String)
85
+ ], CloudSessionContext.prototype, "poolId", void 0);
86
+ __decorate([
87
+ (0, class_validator_1.IsOptional)(),
88
+ (0, class_validator_1.IsUUID)(),
89
+ __metadata("design:type", String)
90
+ ], CloudSessionContext.prototype, "resourceId", void 0);
71
91
  //# sourceMappingURL=cloud-session-context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cloud-session-context.js","sourceRoot":"","sources":["../../../src/v3/contexts/cloud-session-context.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAuE;AACvE,oCAAyC;AAEzC,MAAa,mBAAmB;CA0C/B;AA1CD,kDA0CC;AAvCC;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;gEACoB;AAI7B;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;4DACgB;AAGzB;IADC,IAAA,wBAAM,GAAE;;2DACc;AAIvB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;mDACO;AAIhB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;mDACO;AAIhB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;oDACQ;AAIjB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;mDACO;AAGhB;IADC,IAAA,wBAAM,EAAC,qBAAa,CAAC;;0DACO;AAI7B;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;uDACW;AAIpB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;0DACY;AAIvB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;4DACc"}
1
+ {"version":3,"file":"cloud-session-context.js","sourceRoot":"","sources":["../../../src/v3/contexts/cloud-session-context.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAuE;AACvE,oCAAyC;AAEzC,MAAa,mBAAmB;CA2D/B;AA3DD,kDA2DC;AAxDC;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;gEACoB;AAI7B;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;4DACgB;AAGzB;IADC,IAAA,wBAAM,GAAE;;2DACc;AAIvB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;mDACO;AAIhB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;mDACO;AAIhB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;oDACQ;AAGjB;IADC,IAAA,wBAAM,EAAC,qBAAa,CAAC;;0DACO;AAI7B;IAFC,IAAA,wBAAM,GAAE;IACR,IAAA,4BAAU,GAAE;;uDACO;AAIpB;IAFC,IAAA,wBAAM,GAAE;IACR,IAAA,4BAAU,GAAE;;2DACW;AAIxB;IAFC,IAAA,wBAAM,GAAE;IACR,IAAA,4BAAU,GAAE;;0DACU;AAIvB;IAFC,IAAA,wBAAM,GAAE;IACR,IAAA,4BAAU,GAAE;;8DACc;AAI3B;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;0DACY;AAIvB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;4DACc;AAKzB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;mDACO;AAIhB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;uDACW"}
@@ -1,4 +1,4 @@
1
1
  import { TypeHelpOptions } from "class-transformer";
2
2
  import { CloudPoolContext } from "./cloud-pool-context";
3
- import { CloudSessionContext } from "./cloud-session-context";
4
- export declare const getCloudContextType: ({ object }: TypeHelpOptions) => typeof CloudPoolContext | typeof CloudSessionContext;
3
+ import { CloudResourceContext } from "./cloud-resource-context";
4
+ export declare const getCloudContextType: ({ object }: TypeHelpOptions) => typeof CloudResourceContext | typeof CloudPoolContext;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ludeo/cloud-common",
3
- "version": "1.1.17",
3
+ "version": "1.1.19",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "author": "Yahil Didi",
@@ -2,12 +2,6 @@ import { IsEnum, IsOptional, IsString, IsUUID } from "class-validator";
2
2
  import { CloudProvider } from "../types/cloud";
3
3
 
4
4
  export class CloudResourceContext {
5
- @IsUUID()
6
- resourceId: string;
7
-
8
- @IsUUID()
9
- poolId: string;
10
-
11
5
  @IsString()
12
6
  @IsOptional()
13
7
  streamGroupId?: string;
@@ -18,4 +12,20 @@ export class CloudResourceContext {
18
12
 
19
13
  @IsEnum(CloudProvider)
20
14
  cloudProvider: CloudProvider;
15
+
16
+ @IsUUID()
17
+ @IsOptional()
18
+ gamePoolId?: string;
19
+
20
+ @IsUUID()
21
+ @IsOptional()
22
+ gameResourceId?: string;
23
+
24
+ @IsUUID()
25
+ @IsOptional()
26
+ machinePoolId?: string;
27
+
28
+ @IsUUID()
29
+ @IsOptional()
30
+ machineResourceId?: string;
21
31
  }
@@ -25,16 +25,24 @@ export class CloudSessionContext {
25
25
  @IsUUID()
26
26
  ludeoId?: string;
27
27
 
28
- @IsOptional()
29
- @IsUUID()
30
- poolId?: string;
31
-
32
28
  @IsEnum(CloudProvider)
33
29
  cloudProvider: CloudProvider;
34
30
 
31
+ @IsUUID()
35
32
  @IsOptional()
33
+ gamePoolId?: string;
34
+
36
35
  @IsUUID()
37
- resourceId?: string;
36
+ @IsOptional()
37
+ gameResourceId?: string;
38
+
39
+ @IsUUID()
40
+ @IsOptional()
41
+ machinePoolId?: string;
42
+
43
+ @IsUUID()
44
+ @IsOptional()
45
+ machineResourceId?: string;
38
46
 
39
47
  @IsOptional()
40
48
  @IsString()
@@ -43,4 +51,13 @@ export class CloudSessionContext {
43
51
  @IsOptional()
44
52
  @IsString()
45
53
  streamSessionId?: string;
54
+
55
+ // Backwards compatibility for V2 of cloud-sessions and cloud-session-allocator
56
+ @IsOptional()
57
+ @IsUUID()
58
+ poolId?: string;
59
+
60
+ @IsOptional()
61
+ @IsUUID()
62
+ resourceId?: string;
46
63
  }