@vargai/gateway 0.2.0 → 0.2.1

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.
Files changed (2) hide show
  1. package/dist/index.js +3 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -13603,7 +13603,7 @@ var JobResponse = exports_external.object({
13603
13603
  created_at: exports_external.string(),
13604
13604
  completed_at: exports_external.string().optional(),
13605
13605
  output: exports_external.object({
13606
- url: exports_external.string(),
13606
+ url: exports_external.string().optional(),
13607
13607
  media_type: exports_external.string(),
13608
13608
  metadata: exports_external.record(exports_external.string(), exports_external.unknown()).optional()
13609
13609
  }).optional(),
@@ -14256,8 +14256,8 @@ async function executeJob(client, capability, params) {
14256
14256
  throw new Error(`[${capability}] job ${completed.job_id} failed: ${completed.error || "unknown error"}`);
14257
14257
  }
14258
14258
  const output = completed.output;
14259
- if (!output) {
14260
- throw new Error(`${capability} completed but no output`);
14259
+ if (!output?.url) {
14260
+ throw new Error(`${capability} completed but no output URL`);
14261
14261
  }
14262
14262
  const res = await fetch(output.url);
14263
14263
  if (!res.ok) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vargai/gateway",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "typescript client for varg gateway api",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",