@mxpicture/tesla-superchargers-api 0.1.52 → 0.1.53
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/dist/api/ClustersApi.d.ts +19 -0
- package/dist/api/ClustersApi.d.ts.map +1 -0
- package/dist/api/ClustersApi.js +22 -0
- package/dist/api/ClustersApi.js.map +1 -0
- package/dist/api/index.d.ts +1 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +1 -0
- package/dist/api/index.js.map +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type ClusterAssignSummary } from "@mxpicture/tesla-superchargers-mate/store";
|
|
2
|
+
import { IApi } from "./IApi.js";
|
|
3
|
+
/**
|
|
4
|
+
* Address clustering — `pic_cluster` / `pic_cluster_member`, the grouping that
|
|
5
|
+
* lets a Supercharger site logged under half a dozen slightly different
|
|
6
|
+
* Nominatim addresses read as one place in the clustered cost views.
|
|
7
|
+
*
|
|
8
|
+
* TeslaMate creates an address whenever it geocodes a new place, so the
|
|
9
|
+
* assignment has to be kept up: this is the scheduled caller that replaced the
|
|
10
|
+
* AFTER INSERT trigger the clustering used to install on `addresses`. A full
|
|
11
|
+
* re-clustering (`pic_rebuild()`) is deliberately not exposed here — it
|
|
12
|
+
* discards every cluster, which is a manual act, not a scheduled one.
|
|
13
|
+
*/
|
|
14
|
+
export declare class ClustersApi extends IApi {
|
|
15
|
+
/** Cluster the addresses that have no cluster yet. Idempotent. */
|
|
16
|
+
assign(diameterM?: number): Promise<ClusterAssignSummary>;
|
|
17
|
+
}
|
|
18
|
+
export declare const clustersApi: () => ClustersApi;
|
|
19
|
+
//# sourceMappingURL=ClustersApi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClustersApi.d.ts","sourceRoot":"","sources":["../../src/api/ClustersApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,oBAAoB,EAC1B,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC;;;;;;;;;;GAUG;AACH,qBAAa,WAAY,SAAQ,IAAI;IACnC,kEAAkE;IACrD,MAAM,CACjB,SAAS,GAAE,MAA2B,GACrC,OAAO,CAAC,oBAAoB,CAAC;CAGjC;AAGD,eAAO,MAAM,WAAW,mBAAqC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { assignClusters, CLUSTER_DIAMETER_M, } from "@mxpicture/tesla-superchargers-mate/store";
|
|
2
|
+
import { IApi } from "./IApi.js";
|
|
3
|
+
/**
|
|
4
|
+
* Address clustering — `pic_cluster` / `pic_cluster_member`, the grouping that
|
|
5
|
+
* lets a Supercharger site logged under half a dozen slightly different
|
|
6
|
+
* Nominatim addresses read as one place in the clustered cost views.
|
|
7
|
+
*
|
|
8
|
+
* TeslaMate creates an address whenever it geocodes a new place, so the
|
|
9
|
+
* assignment has to be kept up: this is the scheduled caller that replaced the
|
|
10
|
+
* AFTER INSERT trigger the clustering used to install on `addresses`. A full
|
|
11
|
+
* re-clustering (`pic_rebuild()`) is deliberately not exposed here — it
|
|
12
|
+
* discards every cluster, which is a manual act, not a scheduled one.
|
|
13
|
+
*/
|
|
14
|
+
export class ClustersApi extends IApi {
|
|
15
|
+
/** Cluster the addresses that have no cluster yet. Idempotent. */
|
|
16
|
+
async assign(diameterM = CLUSTER_DIAMETER_M) {
|
|
17
|
+
return await assignClusters(diameterM);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
let _api = null;
|
|
21
|
+
export const clustersApi = () => (_api ??= new ClustersApi());
|
|
22
|
+
//# sourceMappingURL=ClustersApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClustersApi.js","sourceRoot":"","sources":["../../src/api/ClustersApi.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,kBAAkB,GAEnB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC;;;;;;;;;;GAUG;AACH,MAAM,OAAO,WAAY,SAAQ,IAAI;IACnC,kEAAkE;IAC3D,KAAK,CAAC,MAAM,CACjB,YAAoB,kBAAkB;QAEtC,OAAO,MAAM,cAAc,CAAC,SAAS,CAAC,CAAC;IACzC,CAAC;CACF;AAED,IAAI,IAAI,GAAuB,IAAI,CAAC;AACpC,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,EAAE,CAAC,CAAC,IAAI,KAAK,IAAI,WAAW,EAAE,CAAC,CAAC"}
|
package/dist/api/index.d.ts
CHANGED
package/dist/api/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AACA,cAAc,kBAAkB,CAAC;AACjC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AACA,cAAc,kBAAkB,CAAC;AACjC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC"}
|
package/dist/api/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// This file is auto-generated by build-cli. Do not edit manually.
|
|
2
2
|
export * from "./ChargersApi.js";
|
|
3
3
|
export * from "./ChargingProcessesApi.js";
|
|
4
|
+
export * from "./ClustersApi.js";
|
|
4
5
|
export * from "./FailuresApi.js";
|
|
5
6
|
export * from "./IApi.js";
|
|
6
7
|
export * from "./InvoicesApi.js";
|
package/dist/api/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,cAAc,kBAAkB,CAAC;AACjC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,cAAc,kBAAkB,CAAC;AACjC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mxpicture/tesla-superchargers-api",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.53",
|
|
4
4
|
"description": "Fetch + store Tesla Supercharger locations and pricing",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "MXPicture",
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
"access": "public"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@mxpicture/tesla-superchargers-cloud-store": "^0.1.
|
|
48
|
-
"@mxpicture/tesla-superchargers-generated": "^0.1.
|
|
49
|
-
"@mxpicture/tesla-superchargers-mate": "^0.1.
|
|
47
|
+
"@mxpicture/tesla-superchargers-cloud-store": "^0.1.53",
|
|
48
|
+
"@mxpicture/tesla-superchargers-generated": "^0.1.53",
|
|
49
|
+
"@mxpicture/tesla-superchargers-mate": "^0.1.53",
|
|
50
50
|
"csv-parse": "^7.0.1",
|
|
51
51
|
"fflate": "^0.8.3",
|
|
52
52
|
"json5": "^2.2.3",
|