@covia/covia-sdk 1.7.1 → 1.7.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.
package/dist/index.js CHANGED
@@ -1866,9 +1866,12 @@ var JobManager = class {
1866
1866
  this.venue = venue;
1867
1867
  }
1868
1868
  async list() {
1869
- return fetchWithError(`${this.venue.baseUrl}/api/v1/jobs`, {
1869
+ const body = await fetchWithError(`${this.venue.baseUrl}/api/v1/jobs`, {
1870
1870
  headers: this._buildHeaders()
1871
1871
  });
1872
+ if (Array.isArray(body)) return body;
1873
+ const items = body?.items;
1874
+ return Array.isArray(items) ? items : [];
1872
1875
  }
1873
1876
  async get(jobId) {
1874
1877
  try {
package/dist/index.mjs CHANGED
@@ -1864,9 +1864,12 @@ var JobManager = class {
1864
1864
  this.venue = venue;
1865
1865
  }
1866
1866
  async list() {
1867
- return fetchWithError(`${this.venue.baseUrl}/api/v1/jobs`, {
1867
+ const body = await fetchWithError(`${this.venue.baseUrl}/api/v1/jobs`, {
1868
1868
  headers: this._buildHeaders()
1869
1869
  });
1870
+ if (Array.isArray(body)) return body;
1871
+ const items = body?.items;
1872
+ return Array.isArray(items) ? items : [];
1870
1873
  }
1871
1874
  async get(jobId) {
1872
1875
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@covia/covia-sdk",
3
- "version": "1.7.1",
3
+ "version": "1.7.2",
4
4
  "description": "Typescript library for covia-ai",
5
5
  "packageManager": "pnpm@11.9.0",
6
6
  "main": "./dist/index.js",