@ludeo/cloud-common 1.2.178 → 1.2.179

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.
@@ -11,9 +11,4 @@ export declare class CloudSessionContext {
11
11
  resourceId?: string;
12
12
  streamGroupId?: string;
13
13
  streamSessionId?: string;
14
- userLatitude?: number;
15
- userLongitude?: number;
16
- userContinent?: string;
17
- userCountry?: string;
18
- userCity?: string;
19
14
  }
@@ -68,29 +68,4 @@ __decorate([
68
68
  (0, class_validator_1.IsString)(),
69
69
  __metadata("design:type", String)
70
70
  ], CloudSessionContext.prototype, "streamSessionId", void 0);
71
- __decorate([
72
- (0, class_validator_1.IsOptional)(),
73
- (0, class_validator_1.IsNumber)(),
74
- __metadata("design:type", Number)
75
- ], CloudSessionContext.prototype, "userLatitude", void 0);
76
- __decorate([
77
- (0, class_validator_1.IsOptional)(),
78
- (0, class_validator_1.IsNumber)(),
79
- __metadata("design:type", Number)
80
- ], CloudSessionContext.prototype, "userLongitude", void 0);
81
- __decorate([
82
- (0, class_validator_1.IsOptional)(),
83
- (0, class_validator_1.IsString)(),
84
- __metadata("design:type", String)
85
- ], CloudSessionContext.prototype, "userContinent", void 0);
86
- __decorate([
87
- (0, class_validator_1.IsOptional)(),
88
- (0, class_validator_1.IsString)(),
89
- __metadata("design:type", String)
90
- ], CloudSessionContext.prototype, "userCountry", void 0);
91
- __decorate([
92
- (0, class_validator_1.IsOptional)(),
93
- (0, class_validator_1.IsString)(),
94
- __metadata("design:type", String)
95
- ], CloudSessionContext.prototype, "userCity", void 0);
96
71
  //# sourceMappingURL=cloud-session-context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cloud-session-context.js","sourceRoot":"","sources":["../../../src/v2/contexts/cloud-session-context.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAiF;AACjF,oCAAyC;AAEzC,MAAa,mBAAmB;CA8D/B;AA9DD,kDA8DC;AA3DC;IAFC,IAAA,4BAAU,GAA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AFC,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"}
@@ -0,0 +1,7 @@
1
+ export declare class ClientGeoData {
2
+ latitude?: number;
3
+ longitude?: number;
4
+ continent?: string;
5
+ country?: string;
6
+ city?: string;
7
+ }
@@ -0,0 +1,42 @@
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.ClientGeoData = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ class ClientGeoData {
15
+ }
16
+ exports.ClientGeoData = ClientGeoData;
17
+ __decorate([
18
+ (0, class_validator_1.IsOptional)(),
19
+ (0, class_validator_1.IsNumber)(),
20
+ __metadata("design:type", Number)
21
+ ], ClientGeoData.prototype, "latitude", void 0);
22
+ __decorate([
23
+ (0, class_validator_1.IsOptional)(),
24
+ (0, class_validator_1.IsNumber)(),
25
+ __metadata("design:type", Number)
26
+ ], ClientGeoData.prototype, "longitude", void 0);
27
+ __decorate([
28
+ (0, class_validator_1.IsOptional)(),
29
+ (0, class_validator_1.IsString)(),
30
+ __metadata("design:type", String)
31
+ ], ClientGeoData.prototype, "continent", void 0);
32
+ __decorate([
33
+ (0, class_validator_1.IsOptional)(),
34
+ (0, class_validator_1.IsString)(),
35
+ __metadata("design:type", String)
36
+ ], ClientGeoData.prototype, "country", void 0);
37
+ __decorate([
38
+ (0, class_validator_1.IsOptional)(),
39
+ (0, class_validator_1.IsString)(),
40
+ __metadata("design:type", String)
41
+ ], ClientGeoData.prototype, "city", void 0);
42
+ //# sourceMappingURL=client-geo-data.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client-geo-data.js","sourceRoot":"","sources":["../../../src/v4/contexts/client-geo-data.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAiE;AAEjE,MAAa,aAAa;CAoBvB;AApBH,sCAoBG;AAjBC;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;+CACO;AAIlB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;gDACQ;AAInB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;gDACQ;AAInB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;8CACM;AAIjB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;2CACG"}
@@ -1,4 +1,5 @@
1
1
  import { CloudProvider } from "../types";
2
+ import { ClientGeoData } from "./client-geo-data";
2
3
  export declare class CloudSessionContext {
3
4
  allocationRequestId?: string;
4
5
  clientRequestId?: string;
@@ -24,4 +25,5 @@ export declare class CloudSessionContext {
24
25
  roomId?: string;
25
26
  gameplayId?: string;
26
27
  atpId?: string;
28
+ clientGeoData?: ClientGeoData;
27
29
  }
@@ -12,6 +12,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.CloudSessionContext = void 0;
13
13
  const class_validator_1 = require("class-validator");
14
14
  const types_1 = require("../types");
15
+ const client_geo_data_1 = require("./client-geo-data");
16
+ const validate_nested_type_decorator_1 = require("../../decorators/validate-nested-type.decorator");
15
17
  class CloudSessionContext {
16
18
  }
17
19
  exports.CloudSessionContext = CloudSessionContext;
@@ -126,4 +128,9 @@ __decorate([
126
128
  (0, class_validator_1.IsUUID)(),
127
129
  __metadata("design:type", String)
128
130
  ], CloudSessionContext.prototype, "atpId", void 0);
131
+ __decorate([
132
+ (0, class_validator_1.IsOptional)(),
133
+ (0, validate_nested_type_decorator_1.ValidateNestedType)(() => client_geo_data_1.ClientGeoData),
134
+ __metadata("design:type", client_geo_data_1.ClientGeoData)
135
+ ], CloudSessionContext.prototype, "clientGeoData", void 0);
129
136
  //# sourceMappingURL=cloud-session-context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cloud-session-context.js","sourceRoot":"","sources":["../../../src/v4/contexts/cloud-session-context.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAuE;AACvE,oCAAyC;AAEzC,MAAa,mBAAmB;CAwF/B;AAxFD,kDAwFC;AArFC;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;gEACoB;AAG7B;IADC,IAAA,4BAAU,GAAE;;4DACY;AAGzB;IADC,IAAA,wBAAM,GAAE;;2DACc;AAGvB;IADC,IAAA,4BAAU,GAAE;;mDACG;AAGhB;IADC,IAAA,4BAAU,GAAE;;mDACG;AAGhB;IADC,IAAA,4BAAU,GAAE;;oDACI;AAGjB;IADC,IAAA,wBAAM,EAAC,qBAAa,CAAC;;0DACO;AAI7B;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;uDACW;AAIpB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;2DACe;AAIxB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;0DACc;AAIvB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;8DACkB;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;AAGpB;IADC,IAAA,4BAAU,GAAE;;yDACS;AAItB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;0DACc;AAIvB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;mDACK;AAIhB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;wDACY;AAIrB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;4DACgB;AAGzB;IADC,IAAA,4BAAU,GAAE;;yDACS;AAGtB;IADC,IAAA,4BAAU,GAAE;;mDACG;AAIhB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;uDACW;AAIpB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;kDACM"}
1
+ {"version":3,"file":"cloud-session-context.js","sourceRoot":"","sources":["../../../src/v4/contexts/cloud-session-context.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAuE;AACv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AA,4BAAU,GAAE;;yDACS;AAGtB;IADC,IAAA,4BAAU,GAAE;;mDACG;AAIhB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;uDACW;AAIpB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;kDACM;AAIf;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,+BAAa,CAAC;8BACxB,+BAAa;0DAAC"}
@@ -4,3 +4,4 @@ export * from "./cloud-session-context";
4
4
  export * from "./getCloudContextType";
5
5
  export * from "./build-context";
6
6
  export * from "./site-controller-context";
7
+ export * from "./client-geo-data";
@@ -20,4 +20,5 @@ __exportStar(require("./cloud-session-context"), exports);
20
20
  __exportStar(require("./getCloudContextType"), exports);
21
21
  __exportStar(require("./build-context"), exports);
22
22
  __exportStar(require("./site-controller-context"), exports);
23
+ __exportStar(require("./client-geo-data"), exports);
23
24
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/v4/contexts/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC;AACrC,2DAAyC;AACzC,0DAAwC;AACxC,wDAAsC;AACtC,kDAAgC;AAChC,4DAA0C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/v4/contexts/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC;AACrC,2DAAyC;AACzC,0DAAwC;AACxC,wDAAsC;AACtC,kDAAgC;AAChC,4DAA0C;AAC1C,oDAAkC"}
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@ludeo/cloud-common",
3
- "version": "1.2.178",
3
+ "version": "1.2.179",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
- "author": "Niv Raviv",
6
+ "author": "Yahil Didi",
7
7
  "scripts": {
8
8
  "build": "rm -rf dist && tsc",
9
9
  "test": "jest",
@@ -1,4 +1,4 @@
1
- import { IsEnum, IsNumber, IsOptional, IsString, IsUUID } from "class-validator";
1
+ import { IsEnum, IsOptional, IsString, IsUUID } from "class-validator";
2
2
  import { CloudProvider } from "../types";
3
3
 
4
4
  export class CloudSessionContext {
@@ -44,23 +44,4 @@ export class CloudSessionContext {
44
44
  @IsString()
45
45
  streamSessionId?: string;
46
46
 
47
- @IsOptional()
48
- @IsNumber()
49
- userLatitude?: number;
50
-
51
- @IsOptional()
52
- @IsNumber()
53
- userLongitude?: number;
54
-
55
- @IsOptional()
56
- @IsString()
57
- userContinent?: string;
58
-
59
- @IsOptional()
60
- @IsString()
61
- userCountry?: string;
62
-
63
- @IsOptional()
64
- @IsString()
65
- userCity?: string;
66
47
  }
@@ -0,0 +1,23 @@
1
+ import { IsNumber, IsOptional, IsString } from "class-validator";
2
+
3
+ export class ClientGeoData {
4
+ @IsOptional()
5
+ @IsNumber()
6
+ latitude?: number;
7
+
8
+ @IsOptional()
9
+ @IsNumber()
10
+ longitude?: number;
11
+
12
+ @IsOptional()
13
+ @IsString()
14
+ continent?: string;
15
+
16
+ @IsOptional()
17
+ @IsString()
18
+ country?: string;
19
+
20
+ @IsOptional()
21
+ @IsString()
22
+ city?: string;
23
+ }
@@ -1,5 +1,7 @@
1
1
  import { IsEnum, IsOptional, IsString, IsUUID } from "class-validator";
2
2
  import { CloudProvider } from "../types";
3
+ import { ClientGeoData } from "./client-geo-data";
4
+ import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
3
5
 
4
6
  export class CloudSessionContext {
5
7
  @IsOptional()
@@ -89,4 +91,8 @@ export class CloudSessionContext {
89
91
  @IsOptional()
90
92
  @IsUUID()
91
93
  atpId?: string;
94
+
95
+ @IsOptional()
96
+ @ValidateNestedType(() => ClientGeoData)
97
+ clientGeoData?: ClientGeoData;
92
98
  }
@@ -4,3 +4,4 @@ export * from "./cloud-session-context";
4
4
  export * from "./getCloudContextType";
5
5
  export * from "./build-context";
6
6
  export * from "./site-controller-context";
7
+ export * from "./client-geo-data";