@ambasada/sdk 0.8.6 → 0.8.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.
package/dist/client.d.ts CHANGED
@@ -45,6 +45,8 @@ export interface RequestOptions {
45
45
  signal?: AbortSignal;
46
46
  /** Retry once on a network error (only safe with an idempotency key). */
47
47
  retry?: boolean;
48
+ /** This request's timeout in ms, over the client's `timeoutMs` (an LLM call may take the API's 120 s). */
49
+ timeoutMs?: number;
48
50
  }
49
51
  export interface RawResponse {
50
52
  status: number;
package/dist/platform.js CHANGED
@@ -676,7 +676,7 @@ var Ambasada = class {
676
676
  for (const [k, v] of Object.entries(opts.headers ?? {})) if (v !== void 0) headers[k.toLowerCase()] = v;
677
677
  const doFetch = this.fetcher;
678
678
  const attempt = () => {
679
- const timeout = AbortSignal.timeout(this.options.timeoutMs ?? 45e3);
679
+ const timeout = AbortSignal.timeout(opts.timeoutMs ?? this.options.timeoutMs ?? 45e3);
680
680
  const signal = opts.signal ? AbortSignal.any([opts.signal, timeout]) : timeout;
681
681
  return doFetch(url, { method, headers, body, signal });
682
682
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ambasada/sdk",
3
- "version": "0.8.6",
3
+ "version": "0.8.8",
4
4
  "description": "The Ambasada platform SDK: Sign in with Ambasada, mini-app notifications, the project store, files.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -27,7 +27,7 @@
27
27
  "node": ">=22"
28
28
  },
29
29
  "dependencies": {
30
- "@ambasada/village": "^0.8.6"
30
+ "@ambasada/village": "^0.8.8"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@types/node": "^22.20.5",