@myapihq/sdk 2.16.0 → 2.16.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.
@@ -37,6 +37,13 @@ export interface FeedbackItem {
37
37
  page_url?: string;
38
38
  route?: string;
39
39
  target_selector?: string;
40
+ /** 'ok' when a picture attached, 'failed' when the renderer threw. Absent on
41
+ * items that predate the field or did not come from the widget. */
42
+ screenshot_status?: 'ok' | 'failed';
43
+ /** The renderer's own message, when screenshot_status is 'failed'. It happens
44
+ * in a browser MyAPI does not run, so this is the only description of the
45
+ * failure that exists. */
46
+ screenshot_error?: string;
40
47
  target_region?: {
41
48
  x: number;
42
49
  y: number;
package/dist/feedback.js CHANGED
@@ -77,7 +77,15 @@ async function updateWidget(apiKey, orgId, id, patch) {
77
77
  // construction and ships in page source, so hiding it here would only make the
78
78
  // thing harder to paste.
79
79
  async function listWidgets(apiKey, orgId) {
80
- return (0, client_1.request)('GET', `${orgBase(orgId)}/widgets`, apiKey);
80
+ // The endpoint answers { widgets, total } — the same shape as the item list,
81
+ // not a bare array. Returning it unwrapped made `ws.length` undefined, so the
82
+ // CLI reported "No widgets yet" for orgs that had widgets, four times, while
83
+ // the HTTP API was answering correctly the whole time. Reported by ImmoPilot
84
+ // on 2026-08-19; verified against widgetView in the backend.
85
+ const res = await (0, client_1.request)('GET', `${orgBase(orgId)}/widgets`, apiKey);
86
+ if (Array.isArray(res))
87
+ return res; // tolerate a future bare array
88
+ return res?.widgets ?? [];
81
89
  }
82
90
  async function revokeWidget(apiKey, orgId, id) {
83
91
  return (0, client_1.request)('DELETE', `${orgBase(orgId)}/widgets/${encodeURIComponent(id)}`, apiKey);
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "2.16.0";
1
+ export declare const SDK_VERSION = "2.16.1";
package/dist/version.js CHANGED
@@ -8,4 +8,4 @@ exports.SDK_VERSION = void 0;
8
8
  // Why a constant and not a package.json read: the SDK runs inside edge
9
9
  // functions (Cloudflare Workers), so it must not import node:fs. A literal
10
10
  // is the only version source that works in every runtime we ship to.
11
- exports.SDK_VERSION = '2.16.0';
11
+ exports.SDK_VERSION = '2.16.1';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@myapihq/sdk",
3
3
  "license": "Apache-2.0",
4
- "version": "2.16.0",
4
+ "version": "2.16.1",
5
5
  "description": "TypeScript SDK for the MyAPI ecosystem",
6
6
  "repository": {
7
7
  "type": "git",