@centia-io/sdk 0.2.16 → 0.2.17

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.
@@ -3550,24 +3550,46 @@
3550
3550
  return _this8.rawGet(_this8.relationPath(schema, relation, `/${encodeURIComponent(date)}/data`), "HEAD");
3551
3551
  }
3552
3552
  /**
3553
+ * Absolute URL of one output format of the snapshot, without fetching it —
3554
+ * for DuckDB/GDAL or a plain fetch.
3555
+ */
3556
+ getRelationSnapshotDataFormatUrl(schema, relation, date, format) {
3557
+ return `${this.client.baseUrl}/${this.relationPath(schema, relation, `/${encodeURIComponent(date)}/data/${encodeURIComponent(format)}`)}`;
3558
+ }
3559
+ /**
3560
+ * Fetch one output format of the snapshot (Content-Type is the format's
3561
+ * media type). Same redirect/range semantics as getRelationSnapshotData.
3562
+ * Throws `CentiaApiError`: 400 (unknown format id), 404 (no snapshot for
3563
+ * that date, or the format was skipped/not requested), 403, 416, 502.
3564
+ */
3565
+ async getRelationSnapshotDataFormat(schema, relation, date, format, options) {
3566
+ var _this9 = this;
3567
+ return _this9.rawGet(_this9.relationPath(schema, relation, `/${encodeURIComponent(date)}/data/${encodeURIComponent(format)}`), "GET", options);
3568
+ }
3569
+ /** HEAD request for one output format of the snapshot. */
3570
+ async headRelationSnapshotDataFormat(schema, relation, date, format) {
3571
+ var _this10 = this;
3572
+ return _this10.rawGet(_this10.relationPath(schema, relation, `/${encodeURIComponent(date)}/data/${encodeURIComponent(format)}`), "HEAD");
3573
+ }
3574
+ /**
3553
3575
  * Fetch one file of the snapshot by catalog name (`data-<id>.parquet`,
3554
3576
  * `metadata-<id>.json`). Same redirect/range semantics as
3555
3577
  * getRelationSnapshotData.
3556
3578
  */
3557
3579
  async getRelationSnapshotFile(schema, relation, date, file, options) {
3558
- var _this9 = this;
3559
- return _this9.rawGet(_this9.relationPath(schema, relation, `/${encodeURIComponent(date)}/files/${encodeURIComponent(file)}`), "GET", options);
3580
+ var _this11 = this;
3581
+ return _this11.rawGet(_this11.relationPath(schema, relation, `/${encodeURIComponent(date)}/files/${encodeURIComponent(file)}`), "GET", options);
3560
3582
  }
3561
3583
  /** HEAD request for one file of the snapshot. */
3562
3584
  async headRelationSnapshotFile(schema, relation, date, file) {
3563
- var _this10 = this;
3564
- return _this10.rawGet(_this10.relationPath(schema, relation, `/${encodeURIComponent(date)}/files/${encodeURIComponent(file)}`), "HEAD");
3585
+ var _this12 = this;
3586
+ return _this12.rawGet(_this12.relationPath(schema, relation, `/${encodeURIComponent(date)}/files/${encodeURIComponent(file)}`), "HEAD");
3565
3587
  }
3566
3588
  async rawGet(path, method, options) {
3567
- var _this11 = this;
3589
+ var _this13 = this;
3568
3590
  const headers = {};
3569
3591
  if (options === null || options === void 0 ? void 0 : options.range) headers["Range"] = `bytes=${options.range[0]}-${options.range[1]}`;
3570
- return _this11.client.requestRaw({
3592
+ return _this13.client.requestRaw({
3571
3593
  path,
3572
3594
  method,
3573
3595
  headers: Object.keys(headers).length > 0 ? headers : void 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@centia-io/sdk",
3
- "version": "0.2.16",
3
+ "version": "0.2.17",
4
4
  "description": "Centia-io TypeScript SDK",
5
5
  "author": "Martin Høgh",
6
6
  "license": "MIT",