@woosmap/react-native-plugin-geofencing 0.1.2

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.
Files changed (90) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +340 -0
  3. package/android/.gradle/7.1.1/dependencies-accessors/dependencies-accessors.lock +0 -0
  4. package/android/.gradle/7.1.1/dependencies-accessors/gc.properties +0 -0
  5. package/android/.gradle/7.1.1/executionHistory/executionHistory.lock +0 -0
  6. package/android/.gradle/7.1.1/fileChanges/last-build.bin +0 -0
  7. package/android/.gradle/7.1.1/fileHashes/fileHashes.lock +0 -0
  8. package/android/.gradle/7.1.1/gc.properties +0 -0
  9. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  10. package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
  11. package/android/.gradle/checksums/checksums.lock +0 -0
  12. package/android/.gradle/checksums/md5-checksums.bin +0 -0
  13. package/android/.gradle/checksums/sha1-checksums.bin +0 -0
  14. package/android/.gradle/vcs-1/gc.properties +0 -0
  15. package/android/build.gradle +60 -0
  16. package/android/src/main/AndroidManifest.xml +4 -0
  17. package/android/src/main/java/com/reactnativeplugingeofencing/PluginGeofencingModule.java +365 -0
  18. package/android/src/main/java/com/reactnativeplugingeofencing/PluginGeofencingPackage.java +28 -0
  19. package/android/src/main/java/com/reactnativeplugingeofencing/WoosLocationReadyListener.java +38 -0
  20. package/android/src/main/java/com/reactnativeplugingeofencing/WoosmapMessageAndKey.java +36 -0
  21. package/android/src/main/java/com/reactnativeplugingeofencing/WoosmapUtil.java +34 -0
  22. package/ios/AirshipEvents.swift +73 -0
  23. package/ios/DataDistance.swift +61 -0
  24. package/ios/DataLocation.swift +36 -0
  25. package/ios/DataPOI.swift +38 -0
  26. package/ios/DataRegion.swift +78 -0
  27. package/ios/DataVisit.swift +30 -0
  28. package/ios/DataZOI.swift +22 -0
  29. package/ios/MarketingCloudEvents.swift +64 -0
  30. package/ios/MockDataVisit.swift +167 -0
  31. package/ios/PluginGeofencing-Bridging-Header.h +3 -0
  32. package/ios/PluginGeofencing.m +62 -0
  33. package/ios/PluginGeofencing.swift +688 -0
  34. package/ios/PluginGeofencing.xcodeproj/project.pbxproj +293 -0
  35. package/ios/WoosmapGeofenceMessage.swift +40 -0
  36. package/ios/WoosmapGeofenceService.swift +474 -0
  37. package/ios/WoosmapGeofencingPlugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata +4 -0
  38. package/ios/WoosmapGeofencingPlugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  39. package/ios/WoosmapGeofencingPlugin.xcodeproj/project.xcworkspace/xcuserdata/saturn.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  40. package/ios/WoosmapGeofencingPlugin.xcodeproj/xcuserdata/saturn.xcuserdatad/xcschemes/xcschememanagement.plist +14 -0
  41. package/lib/commonjs/Airship.js +35 -0
  42. package/lib/commonjs/Airship.js.map +1 -0
  43. package/lib/commonjs/Location.js +54 -0
  44. package/lib/commonjs/Location.js.map +1 -0
  45. package/lib/commonjs/MarketingCloud.js +35 -0
  46. package/lib/commonjs/MarketingCloud.js.map +1 -0
  47. package/lib/commonjs/Poi.js +96 -0
  48. package/lib/commonjs/Poi.js.map +1 -0
  49. package/lib/commonjs/Region.js +62 -0
  50. package/lib/commonjs/Region.js.map +1 -0
  51. package/lib/commonjs/Visit.js +50 -0
  52. package/lib/commonjs/Visit.js.map +1 -0
  53. package/lib/commonjs/Zoi.js +97 -0
  54. package/lib/commonjs/Zoi.js.map +1 -0
  55. package/lib/commonjs/index.js +276 -0
  56. package/lib/commonjs/index.js.map +1 -0
  57. package/lib/module/Airship.js +33 -0
  58. package/lib/module/Airship.js.map +1 -0
  59. package/lib/module/Location.js +46 -0
  60. package/lib/module/Location.js.map +1 -0
  61. package/lib/module/MarketingCloud.js +33 -0
  62. package/lib/module/MarketingCloud.js.map +1 -0
  63. package/lib/module/Poi.js +94 -0
  64. package/lib/module/Poi.js.map +1 -0
  65. package/lib/module/Region.js +54 -0
  66. package/lib/module/Region.js.map +1 -0
  67. package/lib/module/Visit.js +48 -0
  68. package/lib/module/Visit.js.map +1 -0
  69. package/lib/module/Zoi.js +95 -0
  70. package/lib/module/Zoi.js.map +1 -0
  71. package/lib/module/index.js +261 -0
  72. package/lib/module/index.js.map +1 -0
  73. package/lib/typescript/Airship.d.ts +18 -0
  74. package/lib/typescript/Location.d.ts +26 -0
  75. package/lib/typescript/MarketingCloud.d.ts +18 -0
  76. package/lib/typescript/Poi.d.ts +48 -0
  77. package/lib/typescript/Region.d.ts +30 -0
  78. package/lib/typescript/Visit.d.ts +25 -0
  79. package/lib/typescript/Zoi.d.ts +49 -0
  80. package/lib/typescript/index.d.ts +97 -0
  81. package/package.json +150 -0
  82. package/react-native-plugin-geofencing.podspec +20 -0
  83. package/src/Airship.tsx +24 -0
  84. package/src/Location.tsx +46 -0
  85. package/src/MarketingCloud.tsx +24 -0
  86. package/src/Poi.tsx +106 -0
  87. package/src/Region.tsx +56 -0
  88. package/src/Visit.tsx +49 -0
  89. package/src/Zoi.tsx +107 -0
  90. package/src/index.tsx +255 -0
package/package.json ADDED
@@ -0,0 +1,150 @@
1
+ {
2
+ "name": "@woosmap/react-native-plugin-geofencing",
3
+ "version": "0.1.2",
4
+ "description": "This react-native plugin extends the functionality offered by the Woosmap Geofencing Mobile SDKs. Find more about the Woosmap Geofencing SDK",
5
+ "main": "lib/commonjs/index",
6
+ "module": "lib/module/index",
7
+ "types": "lib/typescript/index.d.ts",
8
+ "react-native": "src/index",
9
+ "source": "src/index",
10
+ "files": [
11
+ "src",
12
+ "lib",
13
+ "android",
14
+ "ios",
15
+ "cpp",
16
+ "react-native-plugin-geofencing.podspec",
17
+ "!lib/typescript/example",
18
+ "!android/build",
19
+ "!ios/build",
20
+ "!**/__tests__",
21
+ "!**/__fixtures__",
22
+ "!**/__mocks__"
23
+ ],
24
+ "scripts": {
25
+ "test": "jest",
26
+ "typescript": "tsc --noEmit",
27
+ "lint": "eslint \"**/*.{js,ts,tsx}\"",
28
+ "prepare": "bob build",
29
+ "release": "release-it",
30
+ "example": "yarn --cwd example",
31
+ "pods": "cd example && pod-install --quiet",
32
+ "bootstrap": "yarn example && yarn && yarn pods"
33
+ },
34
+ "keywords": [
35
+ "react-native",
36
+ "ios",
37
+ "android"
38
+ ],
39
+ "repository": "https://github.com/Woosmap/woosmap-geofencing-react-native-plugin",
40
+ "author": "WGS Indoor <28100769+sameerdhulap@users.noreply.github.com> (https://github.com/sameerdhulap)",
41
+ "license": "MIT",
42
+ "bugs": {
43
+ "url": "https://github.com/Woosmap/woosmap-geofencing-react-native-plugin/issues"
44
+ },
45
+ "homepage": "https://github.com/Woosmap/woosmap-geofencing-react-native-plugin#readme",
46
+ "publishConfig": {
47
+ "registry": "https://registry.npmjs.org/"
48
+ },
49
+ "devDependencies": {
50
+ "@commitlint/config-conventional": "^11.0.0",
51
+ "@react-native-community/eslint-config": "^2.0.0",
52
+ "@release-it/conventional-changelog": "^2.0.0",
53
+ "@types/jest": "^26.0.0",
54
+ "@types/react": "^16.9.19",
55
+ "@types/react-native": "0.62.13",
56
+ "commitlint": "^11.0.0",
57
+ "eslint": "^7.2.0",
58
+ "eslint-config-prettier": "^7.0.0",
59
+ "eslint-plugin-prettier": "^3.1.3",
60
+ "husky": "^6.0.0",
61
+ "jest": "^26.0.1",
62
+ "pod-install": "^0.1.0",
63
+ "prettier": "^2.0.5",
64
+ "react": "16.13.1",
65
+ "react-native": "^0.68.1",
66
+ "react-native-builder-bob": "^0.18.0",
67
+ "release-it": "^14.2.2",
68
+ "typescript": "^4.1.3"
69
+ },
70
+ "peerDependencies": {
71
+ "react": "*",
72
+ "react-native": "*"
73
+ },
74
+ "jest": {
75
+ "preset": "react-native",
76
+ "modulePathIgnorePatterns": [
77
+ "<rootDir>/example/node_modules",
78
+ "<rootDir>/lib/"
79
+ ]
80
+ },
81
+ "commitlint": {
82
+ "extends": [
83
+ "@commitlint/config-conventional"
84
+ ]
85
+ },
86
+ "release-it": {
87
+ "git": {
88
+ "commitMessage": "chore: release ${version}",
89
+ "tagName": "v${version}"
90
+ },
91
+ "npm": {
92
+ "publish": true
93
+ },
94
+ "github": {
95
+ "release": true
96
+ },
97
+ "plugins": {
98
+ "@release-it/conventional-changelog": {
99
+ "preset": "angular"
100
+ }
101
+ }
102
+ },
103
+ "eslintConfig": {
104
+ "root": true,
105
+ "extends": [
106
+ "@react-native-community",
107
+ "prettier"
108
+ ],
109
+ "rules": {
110
+ "prettier/prettier": [
111
+ "error",
112
+ {
113
+ "quoteProps": "consistent",
114
+ "singleQuote": true,
115
+ "tabWidth": 2,
116
+ "trailingComma": "es5",
117
+ "useTabs": false
118
+ }
119
+ ]
120
+ }
121
+ },
122
+ "eslintIgnore": [
123
+ "node_modules/",
124
+ "lib/"
125
+ ],
126
+ "prettier": {
127
+ "quoteProps": "consistent",
128
+ "singleQuote": true,
129
+ "tabWidth": 2,
130
+ "trailingComma": "es5",
131
+ "useTabs": false
132
+ },
133
+ "react-native-builder-bob": {
134
+ "source": "src",
135
+ "output": "lib",
136
+ "targets": [
137
+ "commonjs",
138
+ "module",
139
+ [
140
+ "typescript",
141
+ {
142
+ "project": "tsconfig.build.json"
143
+ }
144
+ ]
145
+ ]
146
+ },
147
+ "dependencies": {
148
+ "react-native-uuid": "^2.0.1"
149
+ }
150
+ }
@@ -0,0 +1,20 @@
1
+ require "json"
2
+
3
+ package = JSON.parse(File.read(File.join(__dir__, "package.json")))
4
+
5
+ Pod::Spec.new do |s|
6
+ s.name = "react-native-plugin-geofencing"
7
+ s.version = package["version"]
8
+ s.summary = package["description"]
9
+ s.homepage = package["homepage"]
10
+ s.license = package["license"]
11
+ s.authors = package["author"]
12
+
13
+ s.platforms = { :ios => "12.0" }
14
+ s.source = { :git => "https://github.com/Woosmap/woosmap-geofencing-react-native-plugin.git", :tag => "#{s.version}" }
15
+
16
+ s.source_files = "ios/**/*.{h,m,mm,swift}"
17
+
18
+ s.dependency "React-Core"
19
+ s.dependency "WoosmapGeofencing"
20
+ end
@@ -0,0 +1,24 @@
1
+ /**
2
+ * @classdesc A class that represents the Airship object.
3
+ * @constructs Airship
4
+ * @param {string} name The name of the custom event.
5
+ * @param {string} properties The attributes of the POI such as `name`, `address`, `zipCode` etc.
6
+ */
7
+ class Airship {
8
+ Name: String;
9
+ Properties: String;
10
+ constructor(name: String, properties: String) {
11
+ this.Name = name;
12
+ this.Properties = properties;
13
+ }
14
+ /**
15
+ * Converts json object to an object of type Airship.
16
+ * @param {Object} json The json representation of Airship.
17
+ * @returns Object
18
+ * @memberof Airship
19
+ */
20
+ static jsonToObj(json: any) {
21
+ return new Airship(json.name, json.properties);
22
+ }
23
+ }
24
+ module.exports = Airship;
@@ -0,0 +1,46 @@
1
+ /**
2
+ * @classdesc A class that represents the location object.
3
+ * @constructs Location
4
+ * @param {number} date The datetime stamp.
5
+ * @param {number} latitude The latitude of the location.
6
+
7
+ * @param {string} Locationdescription The description of the location.
8
+ * @param {string} Locationid A unique identifier for the location.
9
+ * @param {number} longitude The longitude of the location.
10
+ */
11
+ class Location {
12
+ Date: number;
13
+ Latitude: number;
14
+ Locationdescription: string;
15
+ Locationid: string;
16
+ Longitude: number;
17
+ constructor(
18
+ date: number,
19
+ latitude: number,
20
+ locationdescription: string,
21
+ locationid: string,
22
+ longitude: number
23
+ ) {
24
+ this.Date = date;
25
+ this.Latitude = latitude;
26
+ this.Locationdescription = locationdescription;
27
+ this.Locationid = locationid;
28
+ this.Longitude = longitude;
29
+ }
30
+ /**
31
+ * Converts json object to an object of type Location.
32
+ * @param {Object} json The json representation of the Location.
33
+ * @returns Object
34
+ * @memberof Location
35
+ */
36
+ static jsonToObj(json: any) {
37
+ return new Location(
38
+ json.date,
39
+ json.latitude,
40
+ json.locationdescription,
41
+ json.locationid,
42
+ json.longitude
43
+ );
44
+ }
45
+ }
46
+ export default Location;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * @classdesc A class that represents the Marketing Cloud object.
3
+ * @constructs MarketingCloud
4
+ * @param {string} name The name of the custom event.
5
+ * @param {string} properties The attributes of the POI such as `name`, `address`, `zipCode` etc.
6
+ */
7
+ class MarketingCloud {
8
+ Name: string;
9
+ Properties: string;
10
+ constructor(name: string, properties: string) {
11
+ this.Name = name;
12
+ this.Properties = properties;
13
+ }
14
+ /**
15
+ * Converts json object to an object of type MarketingCloud.
16
+ * @param {Object} json The json representation of MarketingCloud.
17
+ * @returns Object
18
+ * @memberof MarketingCloud
19
+ */
20
+ static jsonToObj(json: any) {
21
+ return new MarketingCloud(json.name, json.properties);
22
+ }
23
+ }
24
+ module.exports = MarketingCloud;
package/src/Poi.tsx ADDED
@@ -0,0 +1,106 @@
1
+ /**
2
+ * A class that represents the POI object.
3
+ * @classdesc A class that represents the POI object.
4
+ * @constructs Poi
5
+ * @param {Object} jsonData A json object representing the POI.
6
+ * @param {string} city The name of the city the POI belongs to.
7
+ * @param {string} idstore A unique identifier for the POI.
8
+ * @param {name} name The name of the POI.
9
+ * @param {number} date The datetime stamp.
10
+ * @param {number} distance The distance between the POI and the user's location.
11
+ * @param {number} duration The duration to travel to the POI from the user's location.
12
+ * @param {number} latitude The latitude of the POI.
13
+ * @param {number} longitude The longitude of the POI.
14
+ * @param {string} zipcode The zip code of the POI.
15
+ * @param {number} radius The radius of the POI.
16
+ * @param {string} address The address of the POI.
17
+ * @param {string} countrycode The countrycode of the POI.
18
+ * @param {string} tags The tags for the POI.
19
+ * @param {string} types The types of the POI.
20
+ * @param {string} contact The contact for the POI.
21
+ */
22
+ class Poi {
23
+ Jsondata: object;
24
+ City: string;
25
+ Idstore: string;
26
+ Name: string;
27
+ Date: number;
28
+ Distance: number;
29
+ Duration: number;
30
+ Latitude: number;
31
+ Locationid: number;
32
+ Longitude: number;
33
+ Zipcode: string;
34
+ Radius: number;
35
+ Countrycode: string;
36
+ Tags: string;
37
+ Types: string;
38
+ Contact: string;
39
+ Address: string;
40
+ constructor(
41
+ jsondata: object,
42
+ city: string,
43
+ idstore: string,
44
+ name: string,
45
+ date: number,
46
+ distance: number,
47
+ duration: number,
48
+ latitude: number,
49
+ locationid: number,
50
+ longitude: number,
51
+ zipcode: string,
52
+ radius: number,
53
+ address: string,
54
+ countrycode: string,
55
+ tags: string,
56
+ types: string,
57
+ contact: string
58
+ ) {
59
+ this.Jsondata = jsondata;
60
+ this.City = city;
61
+ this.Idstore = idstore;
62
+ this.Name = name;
63
+ this.Date = date;
64
+ this.Distance = distance;
65
+ this.Duration = duration;
66
+ this.Latitude = latitude;
67
+ this.Locationid = locationid;
68
+ this.Longitude = longitude;
69
+ this.Zipcode = zipcode;
70
+ this.Radius = radius;
71
+ this.Idstore = idstore;
72
+ this.Countrycode = countrycode;
73
+ this.Tags = tags;
74
+ this.Types = types;
75
+ this.Contact = contact;
76
+ this.Address = address;
77
+ }
78
+ /**
79
+ * Converts json object to an object of type Poi.
80
+ * @param {Object} json The json representation of the Poi.
81
+ * @returns Object
82
+ * @memberof Poi
83
+ */
84
+ static jsonToObj(json: any) {
85
+ return new Poi(
86
+ json.jsondata,
87
+ json.city,
88
+ json.idstore,
89
+ json.name,
90
+ json.date,
91
+ json.distance,
92
+ json.duration,
93
+ json.latitude,
94
+ json.locationid,
95
+ json.longitude,
96
+ json.zipcode,
97
+ json.radius,
98
+ json.address,
99
+ json.countrycode,
100
+ json.tags,
101
+ json.types,
102
+ json.contact
103
+ );
104
+ }
105
+ }
106
+ module.exports = Poi;
package/src/Region.tsx ADDED
@@ -0,0 +1,56 @@
1
+ /**
2
+ * A class that represents the Region object.
3
+ * @classdesc A class that represents the Region object.
4
+ * @constructs Region
5
+ * @param {number} date The datetime stamp.
6
+ * @param {boolean} didEnter A boolean value indicating whether the region was entered.
7
+ * @param {string} identifier An alphanumeric unique identifier for the region.
8
+ * @param {number} latitude The latitude of the region.
9
+ * @param {number} longitude The longitude of the region.
10
+ * @param {number} radius The radius of the region in meters.
11
+ * @param {boolean} frompositiondetection Determines whether the user's cuurent position is inside the region.
12
+ */
13
+ class Region {
14
+ Date: number;
15
+ Didenter: boolean;
16
+ Identifier: string;
17
+ Latitude: number;
18
+ Longitude: number;
19
+ Radius: number;
20
+ Frompositiondetection: boolean;
21
+ constructor(
22
+ date: number,
23
+ didenter: boolean,
24
+ identifier: string,
25
+ latitude: number,
26
+ longitude: number,
27
+ radius: number,
28
+ frompositiondetection: boolean
29
+ ) {
30
+ this.Date = date;
31
+ this.Didenter = didenter;
32
+ this.Identifier = identifier;
33
+ this.Latitude = latitude;
34
+ this.Longitude = longitude;
35
+ this.Radius = radius;
36
+ this.Frompositiondetection = frompositiondetection;
37
+ }
38
+ /**
39
+ * Converts json object to an object of type Region.
40
+ * @param {Object} json The json representation of the region.
41
+ * @returns Object
42
+ * @memberof Region
43
+ */
44
+ static jsonToObj(json: any) {
45
+ return new Region(
46
+ json.date,
47
+ json.didenter,
48
+ json.identifier,
49
+ json.latitude,
50
+ json.longitude,
51
+ json.radius,
52
+ json.frompositiondetection
53
+ );
54
+ }
55
+ }
56
+ export default Region;
package/src/Visit.tsx ADDED
@@ -0,0 +1,49 @@
1
+ /**
2
+ * @classdesc A class that represents the visits object.
3
+ * @constructs Visit
4
+ * @param {number} accuracy The accuracy in meters.
5
+ * @param {number} arrivalDate The datetime stamp for the arrival at the place of visit.
6
+ * @param {number} date Current datetime stamp.
7
+ * @param {number} latitude The latitude of the place of visit.
8
+ * @param {number} longitude The longitude of the plaee of visit.
9
+ */
10
+ class Visit {
11
+ Accuracy: number;
12
+ Arrivaldate: number;
13
+ Date: number;
14
+ Departuredate: number;
15
+ Latitude: number;
16
+ Longitude: number;
17
+ constructor(
18
+ accuracy: number,
19
+ arrivaldate: number,
20
+ date: number,
21
+ departuredate: number,
22
+ latitude: number,
23
+ longitude: number
24
+ ) {
25
+ this.Accuracy = accuracy;
26
+ this.Arrivaldate = arrivaldate;
27
+ this.Date = date;
28
+ this.Departuredate = departuredate;
29
+ this.Latitude = latitude;
30
+ this.Longitude = longitude;
31
+ }
32
+ /**
33
+ * Converts json object to an object of type Visits.
34
+ * @param {Object} json The json representation of the Visits.
35
+ * @returns Visit
36
+ * @memberof Visit
37
+ */
38
+ static jsonToObj(json: any): Visit {
39
+ return new Visit(
40
+ json.accuracy,
41
+ json.arrivaldate,
42
+ json.date,
43
+ json.departuredate,
44
+ json.latitude,
45
+ json.longitude
46
+ );
47
+ }
48
+ }
49
+ module.exports = Visit;
package/src/Zoi.tsx ADDED
@@ -0,0 +1,107 @@
1
+ /**
2
+ * @classdesc A class that represents the Zones of Interest (ZOI) object.
3
+ * @constructs Zoi
4
+ * @param {number} accumulator Represents the number of visits used to build the ZOI (only for calculation of ZOI)
5
+ * @param {number} age Age is used to determine if a ZOI should be deleted by the algorithm (only for calculation of ZOI)
6
+ * @param {number} covariance_det The covariance determinant (only for calculation of ZOI)
7
+ * @param {number} duration The duration of all the accumulated visits of the ZOI
8
+ * @param {number} endtime The exit date of the last ZOI visit
9
+ * @param {string[]} idvisits The list of id visits included in this ZOI
10
+ * @param {number} latmean The latitude of the center of the ZOI
11
+ * @param {number} lngmean The longitude of the center of the ZOI
12
+ * @param {string} period The classification of the period (HOME, WORK, OTHER or NO QUALIFIER)
13
+ * @param {number} prior_probability Estimation of probability (only for calculation of ZOI)
14
+ * @param {number} starttime The entry date for the first ZOI visit
15
+ * @param {number} weekly_density The weekly density of the ZOI visit (only for classification of ZOI)
16
+ * @param {string} wktpolygon This is the Well-known text representation of geometry of the ZOI polygon.
17
+ * @param {number} x00covariance_matrix_inverse The covariance of a cluster (only for calculation of ZOI)
18
+ * @param {number} x01covariance_matrix_inverse The covariance of a cluster (only for calculation of ZOI)
19
+ * @param {number} x10covariance_matrix_inverse The covariance of a cluster (only for calculation of ZOI)
20
+ * @param {number} x11covariance_matrix_inverse The covariance of a cluster (only for calculation of ZOI)
21
+
22
+ */
23
+ class Zoi {
24
+ Accumulator: number;
25
+ Age: number;
26
+ Covariance_Det: number;
27
+ Duration: number;
28
+ Endtime: number;
29
+ Idvisits: string[];
30
+ Latmean: number;
31
+ Lngmean: number;
32
+ Period: string;
33
+ Prior_Probability: number;
34
+ Starttime: number;
35
+ Weekly_Density: number;
36
+ X00Covariance_Matrix_Inverse: number;
37
+ X01Covariance_Matrix_Inverse: number;
38
+ X10Covariance_Matrix_Inverse: number;
39
+ X11Covariance_Matrix_Inverse: number;
40
+ Wktpolygon: string;
41
+ constructor(
42
+ accumulator: number,
43
+ age: number,
44
+ covariance_det: number,
45
+ duration: number,
46
+ endtime: number,
47
+ idvisits: string[],
48
+ latmean: number,
49
+ lngmean: number,
50
+ period: string,
51
+ prior_probability: number,
52
+ starttime: number,
53
+ weekly_density: number,
54
+ wktpolygon: string,
55
+ x00covariance_matrix_inverse: number,
56
+ x01covariance_matrix_inverse: number,
57
+ x10covariance_matrix_inverse: number,
58
+ x11covariance_matrix_inverse: number
59
+ ) {
60
+ this.Accumulator = accumulator;
61
+ this.Age = age;
62
+ this.Covariance_Det = covariance_det;
63
+ this.Duration = duration;
64
+ this.Endtime = endtime;
65
+ this.Idvisits = idvisits;
66
+ this.Latmean = latmean;
67
+ this.Lngmean = lngmean;
68
+ this.Period = period;
69
+ this.Prior_Probability = prior_probability;
70
+ this.Starttime = starttime;
71
+ this.Weekly_Density = weekly_density;
72
+ this.Covariance_Det = covariance_det;
73
+ this.Wktpolygon = wktpolygon;
74
+ this.X00Covariance_Matrix_Inverse = x00covariance_matrix_inverse;
75
+ this.X01Covariance_Matrix_Inverse = x01covariance_matrix_inverse;
76
+ this.X10Covariance_Matrix_Inverse = x10covariance_matrix_inverse;
77
+ this.X11Covariance_Matrix_Inverse = x11covariance_matrix_inverse;
78
+ }
79
+ /**
80
+ * Converts json object to an object of type Zoi.
81
+ * @param {Object} json The json representation of the Zoi.
82
+ * @returns Object
83
+ * @memberof Zoi
84
+ */
85
+ static jsonToObj(json: any) {
86
+ return new Zoi(
87
+ json.accumulator,
88
+ json.age,
89
+ json.covariance_det,
90
+ json.duration,
91
+ json.endtime,
92
+ json.idvisits,
93
+ json.latmean,
94
+ json.lngmean,
95
+ json.period,
96
+ json.prior_probability,
97
+ json.starttime,
98
+ json.weekly_density,
99
+ json.wktpolygon,
100
+ json.x00covariance_matrix_inverse,
101
+ json.x01covariance_matrix_inverse,
102
+ json.x10covariance_matrix_inverse,
103
+ json.x11covariance_matrix_inverse
104
+ );
105
+ }
106
+ }
107
+ module.exports = Zoi;