@centia-io/sdk 0.2.7 → 0.2.8

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.
@@ -3047,6 +3047,27 @@
3047
3047
  * request hook (e.g. MapLibre's `transformRequest` or OpenLayers'
3048
3048
  * `tileLoadFunction`).
3049
3049
  */
3050
+ /**
3051
+ * Delete a tileset's cached tiles (optionally scoped by extent and zoom).
3052
+ * Runs `mapcache_seed -m delete` as a background job on the server and
3053
+ * returns the started job's info. Requires write/owner authorization for
3054
+ * the tileset's layer.
3055
+ *
3056
+ * `tileset` is the layer "schema.table" (vector variants "schema.table.mvt"/".json").
3057
+ */
3058
+ async deleteMapcacheTileset(database, tileset, options) {
3059
+ var _this2 = this;
3060
+ const query = {};
3061
+ if ((options === null || options === void 0 ? void 0 : options.bbox) != null) query.bbox = options.bbox;
3062
+ if ((options === null || options === void 0 ? void 0 : options.zoom) != null) query.zoom = String(options.zoom);
3063
+ if ((options === null || options === void 0 ? void 0 : options.grid) != null) query.grid = options.grid;
3064
+ return _this2.client.request({
3065
+ path: `api/v4/mapcache/database/${encodeURIComponent(database)}/tileset/${encodeURIComponent(tileset)}`,
3066
+ method: "DELETE",
3067
+ query: Object.keys(query).length > 0 ? query : void 0,
3068
+ expectedStatus: 202
3069
+ });
3070
+ }
3050
3071
  mapcacheUrl(database, path, params) {
3051
3072
  let url = `${this.client.baseUrl}/${this.basePath(database, path)}`;
3052
3073
  const query = toQuery(params);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@centia-io/sdk",
3
- "version": "0.2.7",
3
+ "version": "0.2.8",
4
4
  "description": "Centia-io TypeScript SDK",
5
5
  "author": "Martin Høgh",
6
6
  "license": "MIT",