@apigames/sdk-core 21.1.2 → 21.1.6
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,3 +1,3 @@
|
|
|
1
1
|
export { ISDKError, ISDKRequestError, ISDKException, ISDKRequestException, } from './sdk.errors';
|
|
2
2
|
export { IResourceContainer, ResourceFilterName, ResourceFilterValue, ResourceSortOption, ResourceIncludeOption, } from './resource.container';
|
|
3
|
-
export { IResourceObject, IResourceObjectAttributes, IResourceObjectRelationships, ResourceObjectAttributeBase, ResourceObjectRelationshipLinkObject, ResourceObjectRelationship, ResourceObjectRelationships, ResourceObjectUri, ResourceObjectRelationshipBase, } from './resource.object';
|
|
3
|
+
export { IResourceObject, IResourceObjectAttributes, IResourceObjectRelationships, GeospatialPoint, ResourceObjectAttributeBase, ResourceObjectRelationshipLinkObject, ResourceObjectRelationship, ResourceObjectRelationships, ResourceObjectUri, ResourceObjectRelationshipBase, } from './resource.object';
|
package/lib/interfaces/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ResourceObjectRelationshipBase = exports.ResourceObjectAttributeBase = void 0;
|
|
3
|
+
exports.ResourceObjectRelationshipBase = exports.ResourceObjectAttributeBase = exports.GeospatialPoint = void 0;
|
|
4
4
|
var resource_object_1 = require("./resource.object");
|
|
5
|
+
Object.defineProperty(exports, "GeospatialPoint", { enumerable: true, get: function () { return resource_object_1.GeospatialPoint; } });
|
|
5
6
|
Object.defineProperty(exports, "ResourceObjectAttributeBase", { enumerable: true, get: function () { return resource_object_1.ResourceObjectAttributeBase; } });
|
|
6
7
|
Object.defineProperty(exports, "ResourceObjectRelationshipBase", { enumerable: true, get: function () { return resource_object_1.ResourceObjectRelationshipBase; } });
|
|
@@ -19,6 +19,12 @@ export interface IResourceObjectRelationships {
|
|
|
19
19
|
export declare type ResourceObjectUri = string;
|
|
20
20
|
export declare class ResourceObjectAttributeBase {
|
|
21
21
|
protected static LoadDateTime(value: string): Date;
|
|
22
|
+
protected static LoadGeospatialPoint(value: any): GeospatialPoint;
|
|
23
|
+
}
|
|
24
|
+
export declare class GeospatialPoint extends ResourceObjectAttributeBase implements IResourceObjectAttributes {
|
|
25
|
+
longitude: number;
|
|
26
|
+
latitude: number;
|
|
27
|
+
LoadData(data: any): void;
|
|
22
28
|
}
|
|
23
29
|
export declare class ResourceObjectRelationshipBase {
|
|
24
30
|
protected static LoadRelationshipObject(value: any): ResourceObjectRelationship;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ResourceObjectRelationshipBase = exports.ResourceObjectAttributeBase = void 0;
|
|
3
|
+
exports.ResourceObjectRelationshipBase = exports.GeospatialPoint = exports.ResourceObjectAttributeBase = void 0;
|
|
4
4
|
const json_1 = require("@apigames/json");
|
|
5
5
|
class ResourceObjectAttributeBase {
|
|
6
6
|
static LoadDateTime(value) {
|
|
@@ -8,8 +8,24 @@ class ResourceObjectAttributeBase {
|
|
|
8
8
|
return new Date(value);
|
|
9
9
|
return undefined;
|
|
10
10
|
}
|
|
11
|
+
static LoadGeospatialPoint(value) {
|
|
12
|
+
if ((0, json_1.isDefined)(value) && (0, json_1.hasProperty)(value, 'longitude') && (0, json_1.isNumber)(value.longitude)
|
|
13
|
+
&& (0, json_1.hasProperty)(value, 'latitude') && (0, json_1.isNumber)(value.latitude)) {
|
|
14
|
+
const geospatialPoint = new GeospatialPoint();
|
|
15
|
+
geospatialPoint.LoadData(value);
|
|
16
|
+
return geospatialPoint;
|
|
17
|
+
}
|
|
18
|
+
return undefined;
|
|
19
|
+
}
|
|
11
20
|
}
|
|
12
21
|
exports.ResourceObjectAttributeBase = ResourceObjectAttributeBase;
|
|
22
|
+
class GeospatialPoint extends ResourceObjectAttributeBase {
|
|
23
|
+
LoadData(data) {
|
|
24
|
+
this.longitude = data.longitude;
|
|
25
|
+
this.latitude = data.latitude;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.GeospatialPoint = GeospatialPoint;
|
|
13
29
|
class ResourceObjectRelationshipBase {
|
|
14
30
|
static LoadRelationshipObject(value) {
|
|
15
31
|
if ((0, json_1.isDefined)(value) && ((0, json_1.hasProperty)(value, 'data') && (0, json_1.isObject)(value.data)
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"author": "API Games Limited",
|
|
4
4
|
"description": "API Games SDK Core",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
|
-
"version": "21.1.
|
|
6
|
+
"version": "21.1.6",
|
|
7
7
|
"main": "lib/index.js",
|
|
8
8
|
"types": "lib/index.d.ts",
|
|
9
9
|
"scripts": {
|
|
@@ -19,24 +19,26 @@
|
|
|
19
19
|
"test:watch": "jest --watch"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@apigames/json": "21.1.
|
|
23
|
-
"@apigames/rest-client": "21.1.
|
|
22
|
+
"@apigames/json": "21.1.4",
|
|
23
|
+
"@apigames/rest-client": "21.1.3",
|
|
24
24
|
"object-hash": "2.2.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
+
"date-and-time": "^2.0.1",
|
|
28
|
+
"@types/date-and-time": "^0.13.0",
|
|
27
29
|
"@types/jest": "26.0.24",
|
|
28
|
-
"@types/node": "14.
|
|
30
|
+
"@types/node": "14.18.0",
|
|
29
31
|
"@typescript-eslint/eslint-plugin": "4.33.0",
|
|
30
32
|
"@typescript-eslint/parser": "4.33.0",
|
|
31
33
|
"eslint": "7.32.0",
|
|
32
34
|
"eslint-config-airbnb": "18.2.1",
|
|
33
|
-
"eslint-plugin-import": "2.
|
|
34
|
-
"eslint-plugin-jsx-a11y": "6.
|
|
35
|
-
"eslint-plugin-react": "7.
|
|
36
|
-
"eslint-plugin-react-hooks": "4.
|
|
35
|
+
"eslint-plugin-import": "2.25.3",
|
|
36
|
+
"eslint-plugin-jsx-a11y": "6.5.1",
|
|
37
|
+
"eslint-plugin-react": "7.27.1",
|
|
38
|
+
"eslint-plugin-react-hooks": "4.3.0",
|
|
37
39
|
"jest": "27.0.6",
|
|
38
40
|
"ts-jest": "27.0.4",
|
|
39
|
-
"typescript": "4.
|
|
41
|
+
"typescript": "4.5.2"
|
|
40
42
|
},
|
|
41
43
|
"eslintConfig": {},
|
|
42
44
|
"repository": {
|