@withgateway/sdk 0.2.1 → 0.2.3

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 (44) hide show
  1. package/dist/cli.js +438 -81
  2. package/dist/cli.js.map +1 -1
  3. package/dist/cli.mjs +439 -82
  4. package/dist/cli.mjs.map +1 -1
  5. package/dist/files/index.js +9 -5
  6. package/dist/files/index.js.map +1 -1
  7. package/dist/files/index.mjs +9 -5
  8. package/dist/files/index.mjs.map +1 -1
  9. package/dist/index.d.mts +1 -1
  10. package/dist/index.d.ts +1 -1
  11. package/dist/index.js +21 -10
  12. package/dist/index.js.map +1 -1
  13. package/dist/index.mjs +20 -10
  14. package/dist/index.mjs.map +1 -1
  15. package/dist/traces/index.js +9 -5
  16. package/dist/traces/index.js.map +1 -1
  17. package/dist/traces/index.mjs +9 -5
  18. package/dist/traces/index.mjs.map +1 -1
  19. package/dist/tracing/index.js +1 -1
  20. package/dist/tracing/index.js.map +1 -1
  21. package/dist/tracing/index.mjs +1 -1
  22. package/dist/tracing/index.mjs.map +1 -1
  23. package/dist/worlds/index.d.mts +7 -1
  24. package/dist/worlds/index.d.ts +7 -1
  25. package/dist/worlds/index.js +19 -9
  26. package/dist/worlds/index.js.map +1 -1
  27. package/dist/worlds/index.mjs +19 -9
  28. package/dist/worlds/index.mjs.map +1 -1
  29. package/package.json +1 -1
  30. package/runtime/gatewaysdk/environment/schema/api.py +61 -3
  31. package/runtime/gatewaysdk/environment/schema/batch.py +5 -1
  32. package/runtime/gatewaysdk/environment/schema/connector.py +11 -0
  33. package/runtime/gatewaysdk/environment/schema/data.py +76 -2
  34. package/runtime/gatewaysdk/environment/schema/dependencies.py +11 -1
  35. package/runtime/gatewaysdk/environment/schema/host.py +8 -17
  36. package/runtime/gatewaysdk/environment/schema/local.py +105 -19
  37. package/runtime/gatewaysdk/environment/schema/mapping.py +13 -1
  38. package/runtime/gatewaysdk/environment/schema/platform.py +32 -5
  39. package/runtime/gatewaysdk/environment/schema/skills/benchmarks-getting-started/SKILL.md +4 -1
  40. package/runtime/gatewaysdk/environment/schema/skills/worlds-getting-started/SKILL.md +5 -5
  41. package/runtime/gatewaysdk/environment/schema/tools_world.py +5 -1
  42. package/runtime/gatewaysdk/environment/schema/validation.py +4 -3
  43. package/skills/benchmarks-getting-started/SKILL.md +4 -1
  44. package/skills/worlds-getting-started/SKILL.md +5 -5
@@ -199,13 +199,10 @@ async function apiRequest(options, method, path4, body) {
199
199
  ...body === void 0 ? {} : { body: JSON.stringify(body) }
200
200
  });
201
201
  const text = await res.text();
202
- if (!res.ok) {
203
- throw new Error(
204
- `${method} ${path4} -> ${res.status}: ${text.slice(0, 400)}`
205
- );
206
- }
202
+ if (!res.ok) throw new ApiError(res.status, method, path4, text.slice(0, 400));
207
203
  return JSON.parse(text);
208
204
  }
205
+ var ApiError;
209
206
  var init_worlds = __esm({
210
207
  "src/worlds/index.ts"() {
211
208
  "use strict";
@@ -220,6 +217,13 @@ var init_worlds = __esm({
220
217
  init_query();
221
218
  init_migrate();
222
219
  init_ingest();
220
+ ApiError = class extends Error {
221
+ constructor(status, method, path4, body) {
222
+ super(`${method} ${path4} -> ${status}: ${body}`);
223
+ this.status = status;
224
+ this.name = "ApiError";
225
+ }
226
+ };
223
227
  }
224
228
  });
225
229