fiftyone.geolocation 4.4.46 → 4.4.47

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.
@@ -0,0 +1,8 @@
1
+ param (
2
+ [Parameter(Mandatory=$true)]
3
+ [string]$RepoName
4
+ )
5
+
6
+ ./node/generate-types.ps1 -RepoName $RepoName
7
+
8
+ exit $LASTEXITCODE
@@ -18,21 +18,27 @@
18
18
  * including the attribution notice(s) required under Article 5 of the EUPL
19
19
  * in the end user terms of the application under an appropriate heading,
20
20
  * such notice(s) shall fulfill the requirements of that article.
21
- * ********************************************************************* */
22
-
23
- const CloudEngine = require('fiftyone.pipeline.cloudrequestengine').CloudEngine;
24
-
25
- class GeoLocationCloud extends CloudEngine {
26
- constructor ({ locationProvider }) {
27
- super(...arguments);
28
- if (locationProvider === 'fiftyonedegrees') {
29
- this.dataKey = 'location';
30
- } else if (locationProvider === 'digitalelement') {
31
- this.dataKey = 'location_digitalelement';
32
- } else {
33
- throw "The location provider '" + locationProvider + "' was not recognized.";
34
- }
35
- }
36
- }
37
-
38
- module.exports = GeoLocationCloud;
21
+ * ********************************************************************* */
22
+
23
+ const CloudEngine = require('fiftyone.pipeline.cloudrequestengine').CloudEngine;
24
+
25
+ class GeoLocationCloud extends CloudEngine {
26
+ /**
27
+ * Constructor for GeoLocationCloud
28
+ *
29
+ * @param {object} options the options for GeoLocationCloud
30
+ * @param {string} options.locationProvider name of location provider
31
+ */
32
+ constructor ({ locationProvider }) {
33
+ super(...arguments);
34
+ if (locationProvider === 'fiftyonedegrees') {
35
+ this.dataKey = 'location';
36
+ } else if (locationProvider === 'digitalelement') {
37
+ this.dataKey = 'location_digitalelement';
38
+ } else {
39
+ throw "The location provider '" + locationProvider + "' was not recognized.";
40
+ }
41
+ }
42
+ }
43
+
44
+ module.exports = GeoLocationCloud;
@@ -1,23 +1,23 @@
1
- /* *********************************************************************
2
- * This Original Work is copyright of 51 Degrees Mobile Experts Limited.
3
- * Copyright 2023 51 Degrees Mobile Experts Limited, Davidson House,
4
- * Forbury Square, Reading, Berkshire, United Kingdom RG1 3EU.
5
- *
6
- * This Original Work is licensed under the European Union Public Licence
7
- * (EUPL) v.1.2 and is subject to its terms as set out below.
8
- *
9
- * If a copy of the EUPL was not distributed with this file, You can obtain
10
- * one at https://opensource.org/licenses/EUPL-1.2.
11
- *
12
- * The 'Compatible Licences' set out in the Appendix to the EUPL (as may be
13
- * amended by the European Commission) shall be deemed incompatible for
14
- * the purposes of the Work and the provisions of the compatibility
15
- * clause in Article 5 of the EUPL shall not apply.
16
- *
17
- * If using the Work as, or as part of, a network application, by
18
- * including the attribution notice(s) required under Article 5 of the EUPL
19
- * in the end user terms of the application under an appropriate heading,
20
- * such notice(s) shall fulfill the requirements of that article.
1
+ /* *********************************************************************
2
+ * This Original Work is copyright of 51 Degrees Mobile Experts Limited.
3
+ * Copyright 2023 51 Degrees Mobile Experts Limited, Davidson House,
4
+ * Forbury Square, Reading, Berkshire, United Kingdom RG1 3EU.
5
+ *
6
+ * This Original Work is licensed under the European Union Public Licence
7
+ * (EUPL) v.1.2 and is subject to its terms as set out below.
8
+ *
9
+ * If a copy of the EUPL was not distributed with this file, You can obtain
10
+ * one at https://opensource.org/licenses/EUPL-1.2.
11
+ *
12
+ * The 'Compatible Licences' set out in the Appendix to the EUPL (as may be
13
+ * amended by the European Commission) shall be deemed incompatible for
14
+ * the purposes of the Work and the provisions of the compatibility
15
+ * clause in Article 5 of the EUPL shall not apply.
16
+ *
17
+ * If using the Work as, or as part of, a network application, by
18
+ * including the attribution notice(s) required under Article 5 of the EUPL
19
+ * in the end user terms of the application under an appropriate heading,
20
+ * such notice(s) shall fulfill the requirements of that article.
21
21
  * ********************************************************************* */
22
22
 
23
23
  const GeoLocationCloud = require('./geoLocationCloud');
@@ -34,6 +34,7 @@ class GeoLocationPipelineBuilder extends PipelineBuilder {
34
34
  * @param {String} options.locationProvider // the provider to request data from. Either "fiftyonedegrees" or "digitalelement".
35
35
  * @param {string} options.cloudRequestOrigin The value to set the
36
36
  * Origin header to when making requests to the cloud service
37
+ * @param {string} options.baseURL base URL for cloud request
37
38
  *
38
39
  */
39
40
  constructor ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fiftyone.geolocation",
3
- "version": "4.4.46",
3
+ "version": "4.4.47",
4
4
  "description": "Perform reverse geocoding using longitude and latitude to populate postal addresses",
5
5
  "keywords": [
6
6
  "51Degrees",
@@ -17,7 +17,8 @@
17
17
  },
18
18
  "scripts": {
19
19
  "test": "jest --ci --reporters=jest-junit --reporters=default --coverage --coverageReporters=cobertura",
20
- "lint": "eslint . --ext .js"
20
+ "lint": "eslint . --ext .js",
21
+ "tsc": "tsc -b --force"
21
22
  },
22
23
  "author": "51Degrees Engineering <engineering@51degrees.com>",
23
24
  "dependencies": {
@@ -31,14 +32,15 @@
31
32
  "eslint": "8.57.0",
32
33
  "eslint-config-standard": "^17.0.0",
33
34
  "eslint-plugin-import": "^2.26.0",
35
+ "eslint-plugin-jest": "^23.13.2",
34
36
  "eslint-plugin-jsdoc": "^38.1.6",
37
+ "eslint-plugin-n": "^15.0.0",
35
38
  "eslint-plugin-node": "^11.1.0",
36
39
  "eslint-plugin-promise": "^6.0.0",
37
- "eslint-plugin-jest": "^23.13.2",
38
- "eslint-plugin-n": "^15.0.0",
39
40
  "jest": "^27.5.1",
40
41
  "jest-expect-message": "^1.1.3",
41
- "jest-junit": "^9.0.0"
42
+ "jest-junit": "^9.0.0",
43
+ "typescript": "^5.4.5"
42
44
  },
43
45
  "license": "EUPL-1.2",
44
46
  "bugs": {
@@ -1,7 +1,13 @@
1
1
  export = GeoLocationCloud;
2
- declare const GeoLocationCloud_base: typeof import("fiftyone.pipeline.cloudrequestengine/types/cloudEngine");
3
- declare class GeoLocationCloud extends GeoLocationCloud_base {
2
+ declare class GeoLocationCloud {
3
+ /**
4
+ * Constructor for GeoLocationCloud
5
+ *
6
+ * @param {object} options the options for GeoLocationCloud
7
+ * @param {string} options.locationProvider name of location provider
8
+ */
4
9
  constructor({ locationProvider }: {
5
- locationProvider: any;
10
+ locationProvider: string;
6
11
  }, ...args: any[]);
12
+ dataKey: string;
7
13
  }
@@ -7,11 +7,16 @@ declare class GeoLocationPipelineBuilder extends GeoLocationPipelineBuilder_base
7
7
  * @param {Boolean} options.shareUsage // include share usage element?
8
8
  * @param {String} options.resourceKey // resourceKey for cloud
9
9
  * @param {String} options.locationProvider // the provider to request data from. Either "fiftyonedegrees" or "digitalelement".
10
+ * @param {string} options.cloudRequestOrigin The value to set the
11
+ * Origin header to when making requests to the cloud service
12
+ * @param {string} options.baseURL base URL for cloud request
10
13
  *
11
14
  */
12
- constructor({ shareUsage, resourceKey, locationProvider, baseURL }: {
15
+ constructor({ shareUsage, resourceKey, locationProvider, baseURL, cloudRequestOrigin }: {
13
16
  shareUsage: boolean;
14
17
  resourceKey: string;
15
18
  locationProvider: string;
19
+ cloudRequestOrigin: string;
20
+ baseURL: string;
16
21
  }, ...args: any[]);
17
22
  }
package/types/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export const GeoLocationCloud: typeof import("./geoLocationCloud");
2
- export const GeoLocationPipelineBuilder: typeof import("./geoLocationPipelineBuilder");
1
+ export let GeoLocationCloud: typeof import("./geoLocationCloud");
2
+ export let GeoLocationPipelineBuilder: typeof import("./geoLocationPipelineBuilder");
File without changes