raain-model 0.2.9 → 0.4.1
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/README.md +3 -3
- package/RELEASE.md +8 -6
- package/cartesians/CartesianMeasureValue.d.ts +27 -0
- package/cartesians/CartesianMeasureValue.js +88 -0
- package/cartesians/CartesianMeasureValue.js.map +1 -0
- package/cartesians/CartesianValue.d.ts +6 -0
- package/cartesians/CartesianValue.js +12 -0
- package/cartesians/CartesianValue.js.map +1 -0
- package/cartesians/ICartesianMeasureValue.d.ts +17 -0
- package/cartesians/ICartesianMeasureValue.js +3 -0
- package/cartesians/ICartesianMeasureValue.js.map +1 -0
- package/cartesians/RadarCartesianMeasureValue.d.ts +11 -0
- package/cartesians/RadarCartesianMeasureValue.js +37 -0
- package/cartesians/RadarCartesianMeasureValue.js.map +1 -0
- package/cartesians/RainCartesianMeasureValue.d.ts +13 -0
- package/cartesians/RainCartesianMeasureValue.js +40 -0
- package/cartesians/RainCartesianMeasureValue.js.map +1 -0
- package/gauges/GaugeMeasure.d.ts +12 -0
- package/gauges/GaugeMeasure.js +31 -0
- package/gauges/GaugeMeasure.js.map +1 -0
- package/gauges/GaugeNode.d.ts +15 -0
- package/gauges/GaugeNode.js +37 -0
- package/gauges/GaugeNode.js.map +1 -0
- package/gauges/GaugeNodeMap.d.ts +14 -0
- package/gauges/GaugeNodeMap.js +49 -0
- package/gauges/GaugeNodeMap.js.map +1 -0
- package/index.d.ts +30 -20
- package/index.js +44 -23
- package/index.js.map +1 -1
- package/{EventNode.d.ts → organizations/EventNode.d.ts} +4 -0
- package/organizations/EventNode.js +30 -0
- package/organizations/EventNode.js.map +1 -0
- package/organizations/IVersion.d.ts +3 -0
- package/{IMeasureValue.js → organizations/IVersion.js} +1 -1
- package/organizations/IVersion.js.map +1 -0
- package/{Link.d.ts → organizations/Link.d.ts} +5 -5
- package/organizations/Link.js +34 -0
- package/organizations/Link.js.map +1 -0
- package/organizations/Measure.d.ts +12 -0
- package/organizations/Measure.js +29 -0
- package/organizations/Measure.js.map +1 -0
- package/organizations/PeopleNode.d.ts +12 -0
- package/organizations/PeopleNode.js +34 -0
- package/organizations/PeopleNode.js.map +1 -0
- package/organizations/QualityPoint.d.ts +17 -0
- package/organizations/QualityPoint.js +16 -0
- package/organizations/QualityPoint.js.map +1 -0
- package/organizations/RaainNode.d.ts +19 -0
- package/organizations/RaainNode.js +106 -0
- package/organizations/RaainNode.js.map +1 -0
- package/organizations/TeamNode.d.ts +15 -0
- package/organizations/TeamNode.js +38 -0
- package/organizations/TeamNode.js.map +1 -0
- package/package.json +8 -9
- package/polars/AbstractPolarMeasureValue.d.ts +19 -0
- package/polars/AbstractPolarMeasureValue.js +87 -0
- package/polars/AbstractPolarMeasureValue.js.map +1 -0
- package/polars/GaugePolarMeasureValue.d.ts +9 -0
- package/polars/GaugePolarMeasureValue.js +14 -0
- package/polars/GaugePolarMeasureValue.js.map +1 -0
- package/{IMeasureValue.d.ts → polars/IPolarMeasureValue.d.ts} +5 -5
- package/polars/IPolarMeasureValue.js +3 -0
- package/polars/IPolarMeasureValue.js.map +1 -0
- package/{MeasureValuePolarContainer.d.ts → polars/MeasureValuePolarContainer.d.ts} +1 -1
- package/{MeasureValuePolarContainer.js → polars/MeasureValuePolarContainer.js} +10 -10
- package/polars/MeasureValuePolarContainer.js.map +1 -0
- package/polars/PolarMeasureValue.d.ts +16 -0
- package/polars/PolarMeasureValue.js +94 -0
- package/polars/PolarMeasureValue.js.map +1 -0
- package/{PolarValue.js → polars/PolarValue.js} +4 -4
- package/polars/PolarValue.js.map +1 -0
- package/polars/RadarPolarMeasureValue.d.ts +12 -0
- package/polars/RadarPolarMeasureValue.js +34 -0
- package/polars/RadarPolarMeasureValue.js.map +1 -0
- package/polars/RainPolarMeasureValue.d.ts +14 -0
- package/polars/RainPolarMeasureValue.js +32 -0
- package/polars/RainPolarMeasureValue.js.map +1 -0
- package/radars/RadarMeasure.d.ts +11 -0
- package/radars/RadarMeasure.js +24 -0
- package/radars/RadarMeasure.js.map +1 -0
- package/{RadarNode.d.ts → radars/RadarNode.d.ts} +5 -4
- package/radars/RadarNode.js +35 -0
- package/radars/RadarNode.js.map +1 -0
- package/radars/RadarNodeMap.d.ts +16 -0
- package/radars/RadarNodeMap.js +53 -0
- package/radars/RadarNodeMap.js.map +1 -0
- package/rains/RainComputation.d.ts +34 -0
- package/rains/RainComputation.js +60 -0
- package/rains/RainComputation.js.map +1 -0
- package/rains/RainComputationAbstract.d.ts +42 -0
- package/rains/RainComputationAbstract.js +113 -0
- package/rains/RainComputationAbstract.js.map +1 -0
- package/rains/RainComputationMap.d.ts +16 -0
- package/rains/RainComputationMap.js +50 -0
- package/rains/RainComputationMap.js.map +1 -0
- package/rains/RainComputationQuality.d.ts +24 -0
- package/rains/RainComputationQuality.js +108 -0
- package/rains/RainComputationQuality.js.map +1 -0
- package/rains/RainMeasure.d.ts +12 -0
- package/rains/RainMeasure.js +25 -0
- package/rains/RainMeasure.js.map +1 -0
- package/{RainNode.d.ts → rains/RainNode.d.ts} +10 -7
- package/rains/RainNode.js +116 -0
- package/rains/RainNode.js.map +1 -0
- package/EventNode.js +0 -17
- package/EventNode.js.map +0 -1
- package/GaugeMeasure.d.ts +0 -7
- package/GaugeMeasure.js +0 -31
- package/GaugeMeasure.js.map +0 -1
- package/GaugeMeasureValue.d.ts +0 -16
- package/GaugeMeasureValue.js +0 -66
- package/GaugeMeasureValue.js.map +0 -1
- package/GaugeNode.d.ts +0 -19
- package/GaugeNode.js +0 -48
- package/GaugeNode.js.map +0 -1
- package/GaugeNodeMap.d.ts +0 -21
- package/GaugeNodeMap.js +0 -61
- package/GaugeNodeMap.js.map +0 -1
- package/IMeasureValue.js.map +0 -1
- package/Link.js +0 -31
- package/Link.js.map +0 -1
- package/Measure.d.ts +0 -9
- package/Measure.js +0 -43
- package/Measure.js.map +0 -1
- package/MeasureValuePolarContainer.js.map +0 -1
- package/PeopleNode.d.ts +0 -7
- package/PeopleNode.js +0 -14
- package/PeopleNode.js.map +0 -1
- package/PolarValue.js.map +0 -1
- package/RaainNode.d.ts +0 -13
- package/RaainNode.js +0 -76
- package/RaainNode.js.map +0 -1
- package/RadarMeasure.d.ts +0 -7
- package/RadarMeasure.js +0 -31
- package/RadarMeasure.js.map +0 -1
- package/RadarMeasureValue.d.ts +0 -19
- package/RadarMeasureValue.js +0 -75
- package/RadarMeasureValue.js.map +0 -1
- package/RadarNode.js +0 -48
- package/RadarNode.js.map +0 -1
- package/RadarNodeMap.d.ts +0 -10
- package/RadarNodeMap.js +0 -56
- package/RadarNodeMap.js.map +0 -1
- package/RainComputationMap.d.ts +0 -10
- package/RainComputationMap.js +0 -59
- package/RainComputationMap.js.map +0 -1
- package/RainComputationNode.d.ts +0 -40
- package/RainComputationNode.js +0 -141
- package/RainComputationNode.js.map +0 -1
- package/RainMeasure.d.ts +0 -4
- package/RainMeasure.js +0 -28
- package/RainMeasure.js.map +0 -1
- package/RainMeasureValue.d.ts +0 -18
- package/RainMeasureValue.js +0 -69
- package/RainMeasureValue.js.map +0 -1
- package/RainNode.js +0 -98
- package/RainNode.js.map +0 -1
- package/tools/PolarValues.d.ts +0 -16
- package/tools/PolarValues.js +0 -99
- package/tools/PolarValues.js.map +0 -1
- /package/{PolarValue.d.ts → polars/PolarValue.d.ts} +0 -0
package/index.js
CHANGED
|
@@ -1,26 +1,47 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
function
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
5
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
17
|
+
__exportStar(require("./organizations/Measure"), exports);
|
|
18
|
+
__exportStar(require("./organizations/EventNode"), exports);
|
|
19
|
+
__exportStar(require("./organizations/PeopleNode"), exports);
|
|
20
|
+
__exportStar(require("./organizations/Link"), exports);
|
|
21
|
+
__exportStar(require("./organizations/RaainNode"), exports);
|
|
22
|
+
__exportStar(require("./organizations/TeamNode"), exports);
|
|
23
|
+
__exportStar(require("./organizations/QualityPoint"), exports);
|
|
24
|
+
__exportStar(require("./gauges/GaugeNode"), exports);
|
|
25
|
+
__exportStar(require("./gauges/GaugeMeasure"), exports);
|
|
26
|
+
__exportStar(require("./gauges/GaugeNodeMap"), exports);
|
|
27
|
+
__exportStar(require("./radars/RadarMeasure"), exports);
|
|
28
|
+
__exportStar(require("./radars/RadarNodeMap"), exports);
|
|
29
|
+
__exportStar(require("./radars/RadarNode"), exports);
|
|
30
|
+
__exportStar(require("./rains/RainMeasure"), exports);
|
|
31
|
+
__exportStar(require("./rains/RainNode"), exports);
|
|
32
|
+
__exportStar(require("./rains/RainComputationQuality"), exports);
|
|
33
|
+
__exportStar(require("./rains/RainComputation"), exports);
|
|
34
|
+
__exportStar(require("./rains/RainComputationMap"), exports);
|
|
35
|
+
__exportStar(require("./polars/GaugePolarMeasureValue"), exports);
|
|
36
|
+
__exportStar(require("./polars/MeasureValuePolarContainer"), exports);
|
|
37
|
+
__exportStar(require("./polars/PolarMeasureValue"), exports);
|
|
38
|
+
__exportStar(require("./polars/PolarValue"), exports);
|
|
39
|
+
__exportStar(require("./polars/RadarPolarMeasureValue"), exports);
|
|
40
|
+
__exportStar(require("./polars/RainPolarMeasureValue"), exports);
|
|
41
|
+
__exportStar(require("./polars/IPolarMeasureValue"), exports);
|
|
42
|
+
__exportStar(require("./cartesians/CartesianValue"), exports);
|
|
43
|
+
__exportStar(require("./cartesians/CartesianMeasureValue"), exports);
|
|
44
|
+
__exportStar(require("./cartesians/RadarCartesianMeasureValue"), exports);
|
|
45
|
+
__exportStar(require("./cartesians/RainCartesianMeasureValue"), exports);
|
|
46
|
+
__exportStar(require("./cartesians/ICartesianMeasureValue"), exports);
|
|
26
47
|
//# sourceMappingURL=index.js.map
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,4DAA0C;AAC1C,6DAA2C;AAC3C,uDAAqC;AACrC,4DAA0C;AAC1C,2DAAyC;AACzC,+DAA6C;AAE7C,qDAAmC;AACnC,wDAAsC;AACtC,wDAAsC;AAEtC,wDAAsC;AACtC,wDAAsC;AACtC,qDAAmC;AAEnC,sDAAoC;AACpC,mDAAiC;AACjC,iEAA+C;AAC/C,0DAAwC;AACxC,6DAA2C;AAE3C,kEAAgD;AAChD,sEAAoD;AACpD,6DAA2C;AAC3C,sDAAoC;AACpC,kEAAgD;AAChD,iEAA+C;AAC/C,8DAA4C;AAE5C,8DAA4C;AAC5C,qEAAmD;AACnD,0EAAwD;AACxD,yEAAuD;AACvD,sEAAoD"}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* api/notifications/:id
|
|
3
|
+
*/
|
|
1
4
|
export declare class EventNode {
|
|
2
5
|
id: string;
|
|
3
6
|
title: string;
|
|
@@ -7,4 +10,5 @@ export declare class EventNode {
|
|
|
7
10
|
created: Date;
|
|
8
11
|
modified: Date;
|
|
9
12
|
constructor(id: string, title: string, status: number, red: boolean, description: string, created: Date, modified: Date);
|
|
13
|
+
toJSON(): JSON;
|
|
10
14
|
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EventNode = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* api/notifications/:id
|
|
6
|
+
*/
|
|
7
|
+
class EventNode {
|
|
8
|
+
constructor(id, title, status, red, description, created, modified) {
|
|
9
|
+
this.id = id;
|
|
10
|
+
this.title = title;
|
|
11
|
+
this.status = status;
|
|
12
|
+
this.red = red;
|
|
13
|
+
this.description = description;
|
|
14
|
+
this.created = created;
|
|
15
|
+
this.modified = modified;
|
|
16
|
+
}
|
|
17
|
+
toJSON() {
|
|
18
|
+
return {
|
|
19
|
+
id: this.id,
|
|
20
|
+
title: this.title,
|
|
21
|
+
status: this.status,
|
|
22
|
+
red: this.red,
|
|
23
|
+
description: this.description,
|
|
24
|
+
created: this.created,
|
|
25
|
+
modified: this.modified,
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.EventNode = EventNode;
|
|
30
|
+
//# sourceMappingURL=EventNode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventNode.js","sourceRoot":"","sources":["../../src/organizations/EventNode.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,MAAa,SAAS;IAElB,YACW,EAAU,EACV,KAAa,EACb,MAAc,EACd,GAAY,EACZ,WAAmB,EACnB,OAAa,EACb,QAAc;QANd,OAAE,GAAF,EAAE,CAAQ;QACV,UAAK,GAAL,KAAK,CAAQ;QACb,WAAM,GAAN,MAAM,CAAQ;QACd,QAAG,GAAH,GAAG,CAAS;QACZ,gBAAW,GAAX,WAAW,CAAQ;QACnB,YAAO,GAAP,OAAO,CAAM;QACb,aAAQ,GAAR,QAAQ,CAAM;IAEzB,CAAC;IAEM,MAAM;QACT,OAAO;YACH,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,GAAG,EAAE,IAAI,CAAC,GAAG;YACb,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,QAAQ,EAAE,IAAI,CAAC,QAAQ;SACnB,CAAC;IACb,CAAC;CACJ;AAxBD,8BAwBC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IVersion.js","sourceRoot":"","sources":["../../src/organizations/IVersion.ts"],"names":[],"mappings":""}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hateoas Links :
|
|
3
3
|
* [ {
|
|
4
|
-
* rel: string, // "self" or api types ("rain", "gauge", "radar")
|
|
4
|
+
* rel: string, // "self" or api types ("rain", "gauge", "radar", "radar-measure", "rain-computation"...)
|
|
5
5
|
* href: string // like "https://.../rains/2"
|
|
6
6
|
* },...]
|
|
7
7
|
*/
|
|
8
8
|
export declare class Link {
|
|
9
9
|
rel: string;
|
|
10
10
|
href: string;
|
|
11
|
-
constructor(rel: string,
|
|
12
|
-
|
|
13
|
-
getId(): string;
|
|
14
|
-
static isClonable(object: any): boolean;
|
|
11
|
+
constructor(rel: string, href: string);
|
|
12
|
+
static isCloneable(object: any): boolean;
|
|
15
13
|
static clone(object: any): Link;
|
|
14
|
+
getId(): string;
|
|
15
|
+
getLinkType(): string;
|
|
16
16
|
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Link = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Hateoas Links :
|
|
6
|
+
* [ {
|
|
7
|
+
* rel: string, // "self" or api types ("rain", "gauge", "radar", "radar-measure", "rain-computation"...)
|
|
8
|
+
* href: string // like "https://.../rains/2"
|
|
9
|
+
* },...]
|
|
10
|
+
*/
|
|
11
|
+
class Link {
|
|
12
|
+
constructor(rel, href) {
|
|
13
|
+
this.rel = rel;
|
|
14
|
+
this.href = href;
|
|
15
|
+
}
|
|
16
|
+
static isCloneable(object) {
|
|
17
|
+
return object && object.rel && object.href;
|
|
18
|
+
}
|
|
19
|
+
static clone(object) {
|
|
20
|
+
return new Link(object.rel, object.href);
|
|
21
|
+
}
|
|
22
|
+
getId() {
|
|
23
|
+
const urls = this.href.split('/');
|
|
24
|
+
// can be enforced : verify rel in -2 urls ?...
|
|
25
|
+
return urls[urls.length - 1];
|
|
26
|
+
}
|
|
27
|
+
getLinkType() {
|
|
28
|
+
const urls = this.href.split('/');
|
|
29
|
+
// can be enforced : verify rel in -2 urls ?...
|
|
30
|
+
return urls[0];
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.Link = Link;
|
|
34
|
+
//# sourceMappingURL=Link.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Link.js","sourceRoot":"","sources":["../../src/organizations/Link.ts"],"names":[],"mappings":";;;AAAA;;;;;;GAMG;AACH,MAAa,IAAI;IACb,YACW,GAAW,EACX,IAAY;QADZ,QAAG,GAAH,GAAG,CAAQ;QACX,SAAI,GAAJ,IAAI,CAAQ;IAEvB,CAAC;IAEM,MAAM,CAAC,WAAW,CAAC,MAAW;QACjC,OAAO,MAAM,IAAI,MAAM,CAAC,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC;IAC/C,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,MAAW;QAC3B,OAAO,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;IAC7C,CAAC;IAEM,KAAK;QACR,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAClC,+CAA+C;QAC/C,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACjC,CAAC;IAEM,WAAW;QACd,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAClC,+CAA+C;QAC/C,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC;IACnB,CAAC;CACJ;AA1BD,oBA0BC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IPolarMeasureValue } from '../polars/IPolarMeasureValue';
|
|
2
|
+
import { RaainNode } from './RaainNode';
|
|
3
|
+
import { ICartesianMeasureValue } from '../cartesians/ICartesianMeasureValue';
|
|
4
|
+
export declare class Measure extends RaainNode {
|
|
5
|
+
date: Date;
|
|
6
|
+
values: IPolarMeasureValue[] | ICartesianMeasureValue[] | Measure[] | number[];
|
|
7
|
+
validity: number;
|
|
8
|
+
constructor(idOrObjectToCopy: any | string, date?: Date, values?: IPolarMeasureValue[] | ICartesianMeasureValue[] | Measure[] | number[], validity?: number);
|
|
9
|
+
toJSON(options?: {
|
|
10
|
+
removeValues?: boolean;
|
|
11
|
+
}): JSON;
|
|
12
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Measure = void 0;
|
|
4
|
+
const RaainNode_1 = require("./RaainNode");
|
|
5
|
+
class Measure extends RaainNode_1.RaainNode {
|
|
6
|
+
constructor(idOrObjectToCopy, date, values, validity) {
|
|
7
|
+
super(idOrObjectToCopy);
|
|
8
|
+
if (typeof (idOrObjectToCopy) === 'object') {
|
|
9
|
+
this.date = new Date(idOrObjectToCopy.date);
|
|
10
|
+
this.values = idOrObjectToCopy.values;
|
|
11
|
+
this.validity = idOrObjectToCopy.validity;
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
this.date = new Date(date);
|
|
15
|
+
this.values = values;
|
|
16
|
+
this.validity = validity;
|
|
17
|
+
}
|
|
18
|
+
toJSON(options = {}) {
|
|
19
|
+
const json = super.toJSON();
|
|
20
|
+
json['date'] = this.date.toISOString();
|
|
21
|
+
json['validity'] = this.validity;
|
|
22
|
+
if (!(options === null || options === void 0 ? void 0 : options.removeValues)) {
|
|
23
|
+
json['values'] = this.values;
|
|
24
|
+
}
|
|
25
|
+
return json;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.Measure = Measure;
|
|
29
|
+
//# sourceMappingURL=Measure.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Measure.js","sourceRoot":"","sources":["../../src/organizations/Measure.ts"],"names":[],"mappings":";;;AACA,2CAAsC;AAGtC,MAAa,OAAQ,SAAQ,qBAAS;IAMlC,YACI,gBAA8B,EAC9B,IAAW,EACX,MAA+E,EAC/E,QAAiB;QAEjB,KAAK,CAAC,gBAAgB,CAAC,CAAC;QACxB,IAAI,OAAO,CAAC,gBAAgB,CAAC,KAAK,QAAQ,EAAE;YACxC,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;YAC5C,IAAI,CAAC,MAAM,GAAG,gBAAgB,CAAC,MAAM,CAAC;YACtC,IAAI,CAAC,QAAQ,GAAG,gBAAgB,CAAC,QAAQ,CAAC;YAC1C,OAAO;SACV;QACD,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC;QAC3B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC7B,CAAC;IAEM,MAAM,CAAC,UAAsC,EAAE;QAClD,MAAM,IAAI,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;QAC5B,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;QACvC,IAAI,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC;QAEjC,IAAI,CAAC,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,YAAY,CAAA,EAAE;YACxB,IAAI,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC;SAChC;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ;AAlCD,0BAkCC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* api/teams/:id => contacts
|
|
3
|
+
*/
|
|
4
|
+
export declare class PeopleNode {
|
|
5
|
+
id: any | string;
|
|
6
|
+
role: string;
|
|
7
|
+
email: string;
|
|
8
|
+
name: string;
|
|
9
|
+
comments: string;
|
|
10
|
+
constructor(id: any | string, role: string, email: string, name: string, comments: string);
|
|
11
|
+
toJSON(): JSON;
|
|
12
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PeopleNode = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* api/teams/:id => contacts
|
|
6
|
+
*/
|
|
7
|
+
class PeopleNode {
|
|
8
|
+
constructor(id, role, email, name, comments // or additional info
|
|
9
|
+
) {
|
|
10
|
+
this.id = id;
|
|
11
|
+
this.role = role;
|
|
12
|
+
this.email = email;
|
|
13
|
+
this.name = name;
|
|
14
|
+
this.comments = comments;
|
|
15
|
+
if (typeof id === 'object') {
|
|
16
|
+
this.id = id.id;
|
|
17
|
+
this.role = id.role;
|
|
18
|
+
this.email = id.email;
|
|
19
|
+
this.name = id.name;
|
|
20
|
+
this.comments = id.comments;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
toJSON() {
|
|
24
|
+
return {
|
|
25
|
+
id: this.id,
|
|
26
|
+
role: this.role,
|
|
27
|
+
email: this.email,
|
|
28
|
+
name: this.name,
|
|
29
|
+
comments: this.comments,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.PeopleNode = PeopleNode;
|
|
34
|
+
//# sourceMappingURL=PeopleNode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PeopleNode.js","sourceRoot":"","sources":["../../src/organizations/PeopleNode.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,MAAa,UAAU;IAEnB,YACW,EAAgB,EAChB,IAAY,EACZ,KAAa,EACb,IAAY,EACZ,QAAgB,CAAC,qBAAqB;;QAJtC,OAAE,GAAF,EAAE,CAAc;QAChB,SAAI,GAAJ,IAAI,CAAQ;QACZ,UAAK,GAAL,KAAK,CAAQ;QACb,SAAI,GAAJ,IAAI,CAAQ;QACZ,aAAQ,GAAR,QAAQ,CAAQ;QAEvB,IAAI,OAAO,EAAE,KAAK,QAAQ,EAAE;YACxB,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;YAChB,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC,IAAI,CAAC;YACpB,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC,KAAK,CAAC;YACtB,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC,IAAI,CAAC;YACpB,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC,QAAQ,CAAC;SAC/B;IACL,CAAC;IAEM,MAAM;QACT,OAAO;YACH,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,QAAQ,EAAE,IAAI,CAAC,QAAQ;SACnB,CAAC;IACb,CAAC;CACJ;AA3BD,gCA2BC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CartesianValue } from '../cartesians/CartesianValue';
|
|
2
|
+
export declare class QualityPoint {
|
|
3
|
+
gaugeId: string;
|
|
4
|
+
gaugeLabel: string;
|
|
5
|
+
gaugeDate: Date;
|
|
6
|
+
rainDate: Date;
|
|
7
|
+
gaugeCartesianValue: CartesianValue;
|
|
8
|
+
rainCartesianValue: CartesianValue;
|
|
9
|
+
speed: {
|
|
10
|
+
x: number;
|
|
11
|
+
y: number;
|
|
12
|
+
};
|
|
13
|
+
constructor(gaugeId: string, gaugeLabel: string, gaugeDate: Date, rainDate: Date, gaugeCartesianValue: CartesianValue, rainCartesianValue: CartesianValue, speed: {
|
|
14
|
+
x: number;
|
|
15
|
+
y: number;
|
|
16
|
+
});
|
|
17
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.QualityPoint = void 0;
|
|
4
|
+
class QualityPoint {
|
|
5
|
+
constructor(gaugeId, gaugeLabel, gaugeDate, rainDate, gaugeCartesianValue, rainCartesianValue, speed) {
|
|
6
|
+
this.gaugeId = gaugeId;
|
|
7
|
+
this.gaugeLabel = gaugeLabel;
|
|
8
|
+
this.gaugeDate = gaugeDate;
|
|
9
|
+
this.rainDate = rainDate;
|
|
10
|
+
this.gaugeCartesianValue = gaugeCartesianValue;
|
|
11
|
+
this.rainCartesianValue = rainCartesianValue;
|
|
12
|
+
this.speed = speed;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.QualityPoint = QualityPoint;
|
|
16
|
+
//# sourceMappingURL=QualityPoint.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QualityPoint.js","sourceRoot":"","sources":["../../src/organizations/QualityPoint.ts"],"names":[],"mappings":";;;AAEA,MAAa,YAAY;IAErB,YACW,OAAe,EACf,UAAkB,EAClB,SAAe,EACf,QAAc,EACd,mBAAmC,EACnC,kBAAkC,EAClC,KAA+B;QAN/B,YAAO,GAAP,OAAO,CAAQ;QACf,eAAU,GAAV,UAAU,CAAQ;QAClB,cAAS,GAAT,SAAS,CAAM;QACf,aAAQ,GAAR,QAAQ,CAAM;QACd,wBAAmB,GAAnB,mBAAmB,CAAgB;QACnC,uBAAkB,GAAlB,kBAAkB,CAAgB;QAClC,UAAK,GAAL,KAAK,CAA0B;IAE1C,CAAC;CAGJ;AAdD,oCAcC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Link } from './Link';
|
|
2
|
+
import { IVersion } from './IVersion';
|
|
3
|
+
export declare class RaainNode implements IVersion {
|
|
4
|
+
id: string;
|
|
5
|
+
private links;
|
|
6
|
+
private version;
|
|
7
|
+
constructor(idOrObjectToCopy: any | string, links?: Link[] | RaainNode[], version?: string);
|
|
8
|
+
private static _getPurifiedLinks;
|
|
9
|
+
toJSON(): JSON;
|
|
10
|
+
getId(): string;
|
|
11
|
+
setLinks(linksToSet: Link[] | RaainNode[]): void;
|
|
12
|
+
addLinks(linksToAdd: Link[] | RaainNode[]): void;
|
|
13
|
+
getLink(linkType: string, index?: number): Link;
|
|
14
|
+
getLinkId(linkType: string, index?: number): string;
|
|
15
|
+
getLinksCount(linkType?: string): number;
|
|
16
|
+
getLinks(): Link[];
|
|
17
|
+
getVersion(): string;
|
|
18
|
+
protected getLinkType(): string;
|
|
19
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RaainNode = void 0;
|
|
4
|
+
const Link_1 = require("./Link");
|
|
5
|
+
class RaainNode {
|
|
6
|
+
constructor(idOrObjectToCopy, links, version) {
|
|
7
|
+
if (!idOrObjectToCopy) {
|
|
8
|
+
throw new Error('RaainNode needs a valid Object or ID');
|
|
9
|
+
}
|
|
10
|
+
if (typeof (idOrObjectToCopy) === 'object') {
|
|
11
|
+
if ((typeof idOrObjectToCopy.id === 'string' || idOrObjectToCopy.links || idOrObjectToCopy.version)) {
|
|
12
|
+
this.id = idOrObjectToCopy.id;
|
|
13
|
+
this.setLinks(idOrObjectToCopy.links);
|
|
14
|
+
this.version = idOrObjectToCopy.version ? idOrObjectToCopy.version : undefined;
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
if (typeof idOrObjectToCopy === 'string') {
|
|
19
|
+
this.id = idOrObjectToCopy;
|
|
20
|
+
}
|
|
21
|
+
this.version = version ? version : undefined;
|
|
22
|
+
this.setLinks(links);
|
|
23
|
+
}
|
|
24
|
+
static _getPurifiedLinks(linksToPurify) {
|
|
25
|
+
if (!linksToPurify || linksToPurify.length === 0) {
|
|
26
|
+
return [];
|
|
27
|
+
}
|
|
28
|
+
const linksPurified = linksToPurify.map(l => {
|
|
29
|
+
if (l instanceof Link_1.Link || Link_1.Link.isCloneable(l)) {
|
|
30
|
+
return Link_1.Link.clone(l);
|
|
31
|
+
}
|
|
32
|
+
else if (l && l.getLinkType && l.id) {
|
|
33
|
+
return new Link_1.Link(l.getLinkType(), '../' + l.getLinkType() + 's/' + l.id);
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
function uniqBy(a, key) {
|
|
37
|
+
const seen = {};
|
|
38
|
+
return a.filter(function (item) {
|
|
39
|
+
if (!item) {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
const k = key(item);
|
|
43
|
+
return seen.hasOwnProperty(k) ? false : (seen[k] = true);
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
const finalLinks = uniqBy(linksPurified, JSON.stringify);
|
|
47
|
+
return finalLinks;
|
|
48
|
+
}
|
|
49
|
+
toJSON() {
|
|
50
|
+
return {
|
|
51
|
+
id: this.id,
|
|
52
|
+
links: this.links,
|
|
53
|
+
version: this.version,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
getId() {
|
|
57
|
+
return this.id.toString();
|
|
58
|
+
}
|
|
59
|
+
setLinks(linksToSet) {
|
|
60
|
+
this.links = RaainNode._getPurifiedLinks(linksToSet);
|
|
61
|
+
}
|
|
62
|
+
addLinks(linksToAdd) {
|
|
63
|
+
if (!this.links) {
|
|
64
|
+
this.links = [];
|
|
65
|
+
}
|
|
66
|
+
const concatLinks = this.links.concat(linksToAdd);
|
|
67
|
+
this.links = RaainNode._getPurifiedLinks(concatLinks);
|
|
68
|
+
}
|
|
69
|
+
getLink(linkType, index) {
|
|
70
|
+
if (!this.links || !linkType) {
|
|
71
|
+
return null;
|
|
72
|
+
}
|
|
73
|
+
index = !index ? 0 : index;
|
|
74
|
+
const linksFound = this.links.filter(l => l && l.rel && linkType === l.rel);
|
|
75
|
+
if (linksFound.length <= index) {
|
|
76
|
+
return null;
|
|
77
|
+
}
|
|
78
|
+
return linksFound[index];
|
|
79
|
+
}
|
|
80
|
+
getLinkId(linkType, index) {
|
|
81
|
+
index = !index ? 0 : index;
|
|
82
|
+
const link = this.getLink(linkType, index);
|
|
83
|
+
if (link) {
|
|
84
|
+
return link.getId();
|
|
85
|
+
}
|
|
86
|
+
return null;
|
|
87
|
+
}
|
|
88
|
+
getLinksCount(linkType) {
|
|
89
|
+
if (!linkType) {
|
|
90
|
+
return this.links.length;
|
|
91
|
+
}
|
|
92
|
+
const linksFound = this.links.filter(l => (l === null || l === void 0 ? void 0 : l.rel) === linkType);
|
|
93
|
+
return linksFound.length;
|
|
94
|
+
}
|
|
95
|
+
getLinks() {
|
|
96
|
+
return this.links.map(l => Link_1.Link.clone(l));
|
|
97
|
+
}
|
|
98
|
+
getVersion() {
|
|
99
|
+
return this.version;
|
|
100
|
+
}
|
|
101
|
+
getLinkType() {
|
|
102
|
+
throw new Error('to implement');
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
exports.RaainNode = RaainNode;
|
|
106
|
+
//# sourceMappingURL=RaainNode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":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C,EAAE,CAAC,CAAA,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAE,GAAG,MAAK,QAAQ,CAAC,CAAC;QAC/D,OAAO,UAAU,CAAC,MAAM,CAAC;IAC7B,CAAC;IAEM,QAAQ;QACX,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,WAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9C,CAAC;IAEM,UAAU;QACb,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAES,WAAW;QACjB,MAAM,IAAI,KAAK,CAAC,cAAc,CAAC,CAAC;IACpC,CAAC;CAEJ;AAhID,8BAgIC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { PeopleNode } from './PeopleNode';
|
|
2
|
+
import { RaainNode } from './RaainNode';
|
|
3
|
+
/**
|
|
4
|
+
* api/teams?name=customerTeam
|
|
5
|
+
*/
|
|
6
|
+
export declare class TeamNode extends RaainNode {
|
|
7
|
+
id: any | string;
|
|
8
|
+
name?: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
contracts?: string[];
|
|
11
|
+
contacts?: PeopleNode[];
|
|
12
|
+
constructor(id: any | string, name?: string, description?: string, contracts?: string[], contacts?: PeopleNode[]);
|
|
13
|
+
protected getLinkType(): string;
|
|
14
|
+
toJSON(): JSON;
|
|
15
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TeamNode = void 0;
|
|
4
|
+
const RaainNode_1 = require("./RaainNode");
|
|
5
|
+
/**
|
|
6
|
+
* api/teams?name=customerTeam
|
|
7
|
+
*/
|
|
8
|
+
class TeamNode extends RaainNode_1.RaainNode {
|
|
9
|
+
constructor(id, name, description, contracts, contacts) {
|
|
10
|
+
super(id);
|
|
11
|
+
this.id = id;
|
|
12
|
+
this.name = name;
|
|
13
|
+
this.description = description;
|
|
14
|
+
this.contracts = contracts;
|
|
15
|
+
this.contacts = contacts;
|
|
16
|
+
if (typeof id === 'object') {
|
|
17
|
+
this.id = id.id;
|
|
18
|
+
this.name = id.name;
|
|
19
|
+
this.description = id.description;
|
|
20
|
+
this.contracts = id.contracts;
|
|
21
|
+
this.contacts = id.contacts;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
getLinkType() {
|
|
25
|
+
return 'team';
|
|
26
|
+
}
|
|
27
|
+
toJSON() {
|
|
28
|
+
return {
|
|
29
|
+
id: this.id,
|
|
30
|
+
name: this.name,
|
|
31
|
+
description: this.description,
|
|
32
|
+
contracts: this.contracts,
|
|
33
|
+
contacts: this.contacts,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.TeamNode = TeamNode;
|
|
38
|
+
//# sourceMappingURL=TeamNode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TeamNode.js","sourceRoot":"","sources":["../../src/organizations/TeamNode.ts"],"names":[],"mappings":";;;AACA,2CAAsC;AAEtC;;GAEG;AACH,MAAa,QAAS,SAAQ,qBAAS;IAEnC,YACW,EAAgB,EAChB,IAAa,EACb,WAAoB,EACpB,SAAoB,EACpB,QAAuB;QAE9B,KAAK,CAAC,EAAE,CAAC,CAAC;QANH,OAAE,GAAF,EAAE,CAAc;QAChB,SAAI,GAAJ,IAAI,CAAS;QACb,gBAAW,GAAX,WAAW,CAAS;QACpB,cAAS,GAAT,SAAS,CAAW;QACpB,aAAQ,GAAR,QAAQ,CAAe;QAG9B,IAAI,OAAO,EAAE,KAAK,QAAQ,EAAE;YACxB,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;YAChB,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC,IAAI,CAAC;YACpB,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC,WAAW,CAAC;YAClC,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC,SAAS,CAAC;YAC9B,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC,QAAQ,CAAC;SAC/B;IACL,CAAC;IAGS,WAAW;QACjB,OAAO,MAAM,CAAC;IAClB,CAAC;IAEM,MAAM;QACT,OAAO;YACH,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,QAAQ,EAAE,IAAI,CAAC,QAAQ;SACnB,CAAC;IACb,CAAC;CACJ;AAjCD,4BAiCC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "raain-model",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"author": "contact@raain.io",
|
|
5
5
|
"homepage": "https://github.com/raainio/raain-model",
|
|
6
6
|
"description": "raain.io api model",
|
|
@@ -18,15 +18,14 @@
|
|
|
18
18
|
"chai": "^4.2.0",
|
|
19
19
|
"chai-as-promised": "^7.1.1",
|
|
20
20
|
"chai-spies": "^1.0.0",
|
|
21
|
-
"mocha": "^
|
|
22
|
-
"ts-node": "
|
|
23
|
-
"tslint": "
|
|
24
|
-
"typescript": "
|
|
21
|
+
"mocha": "^10.1.0",
|
|
22
|
+
"ts-node": "^8.10.2",
|
|
23
|
+
"tslint": "^6.1.3",
|
|
24
|
+
"typescript": "^5.0.4"
|
|
25
25
|
},
|
|
26
26
|
"scripts": {
|
|
27
|
-
"build": "rm -rf dist/ && npx tsc",
|
|
28
|
-
"test": "npm run test-example
|
|
29
|
-
"test-example": "ts-node examples/creation.example.ts"
|
|
30
|
-
"test-mocha": "mocha examples/**/*.spec.js --exit"
|
|
27
|
+
"build": "rm -rf dist/ && npx tsc && cp package.json dist/ && cp *.md dist/",
|
|
28
|
+
"test": "npm run test-example",
|
|
29
|
+
"test-example": "ts-node examples/creation.example.ts"
|
|
31
30
|
}
|
|
32
31
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { MeasureValuePolarContainer } from './MeasureValuePolarContainer';
|
|
2
|
+
import { IPolarMeasureValue } from './IPolarMeasureValue';
|
|
3
|
+
import { PolarMeasureValue } from './PolarMeasureValue';
|
|
4
|
+
import { PolarValue } from './PolarValue';
|
|
5
|
+
export declare class AbstractPolarMeasureValue implements IPolarMeasureValue {
|
|
6
|
+
protected polars: PolarMeasureValue;
|
|
7
|
+
constructor(polars: AbstractPolarMeasureValue | PolarMeasureValue | string);
|
|
8
|
+
getPolarsStringified(): string;
|
|
9
|
+
getPolars(): MeasureValuePolarContainer[];
|
|
10
|
+
setPolarsAsString(s: string): void;
|
|
11
|
+
setPolarsAsContainer(s: MeasureValuePolarContainer[]): void;
|
|
12
|
+
getPolarValue(azimuthIndex: number, edgeIndex: number, strict?: boolean): PolarValue;
|
|
13
|
+
setPolarValue(azimuthIndex: number, edgeIndex: number, value: number): void;
|
|
14
|
+
getAzimuthsCount(): number;
|
|
15
|
+
getPolarEdgesCount(): number;
|
|
16
|
+
getDistance(): number;
|
|
17
|
+
toJSON(stringify?: boolean): JSON;
|
|
18
|
+
toJSONWithPolarStringified(): JSON;
|
|
19
|
+
}
|