From 108f5ddd0e9e3c05000cad1dc25e79c1120e008d Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Mon, 13 Jul 2026 08:31:51 +0000 Subject: [PATCH 1/2] chore(deps): bump @photon-ai/dashboard-api to 1.6.10 Syncs the CLI with dashboard@v1.6.10. No route additions or removals since 1.6.9; the release is a security-hardening rollup (CAPTCHA gating on email-auth account lifecycle, Turnstile hostname pin, structured SigNoz logging, and an OTLP endpoint fix) and doesn't touch the CLI's public API surface. Compared to the 1.2.0 baseline on main, 7 routes are added (0 removed): profile promotional-status/emails and per-project call-registry profile + registrations. Co-authored-by: citron --- UPSTREAM_DIFF.md | 40 +++++++++++----------------------------- bun.lock | 5 +++-- package.json | 2 +- 3 files changed, 15 insertions(+), 32 deletions(-) diff --git a/UPSTREAM_DIFF.md b/UPSTREAM_DIFF.md index 7e7d390..d7771e4 100644 --- a/UPSTREAM_DIFF.md +++ b/UPSTREAM_DIFF.md @@ -1,44 +1,26 @@ # Upstream API Diff -> Old routes: 36 · New routes: 58 +> Old routes: 80 · New routes: 87 ## Added Routes | Route | Method | |-------|--------| -| `api.profile.spectrum-updates` | `PATCH` | -| `api.projects.:id.members` | `GET` | -| `api.projects.:id.members` | `POST` | -| `api.projects.:id.members.:memberUserId` | `DELETE` | -| `api.projects.:id.slack` | `DELETE` | -| `api.projects.:id.slack` | `GET` | -| `api.projects.:id.slack` | `PUT` | -| `api.projects.:id.slack.installations` | `GET` | -| `api.projects.:id.slack.installations.:teamId` | `DELETE` | -| `api.projects.:id.spectrum.avatar` | `DELETE` | -| `api.projects.:id.spectrum.avatar.commit` | `POST` | -| `api.projects.:id.spectrum.avatar.upload` | `POST` | -| `api.projects.:id.voice.imessage-enabled` | `PATCH` | -| `api.projects.:id.voice.settings` | `GET` | -| `api.projects.:id.voice.sip-inbound` | `DELETE` | -| `api.projects.:id.voice.sip-inbound` | `PATCH` | -| `api.projects.:id.webhooks` | `GET` | -| `api.projects.:id.webhooks` | `POST` | -| `api.projects.:id.webhooks.:webhookId` | `DELETE` | -| `api.projects.:id.whatsapp.templates` | `GET` | -| `api.projects.:id.whatsapp.templates` | `POST` | -| `api.projects.:id.whatsapp.templates.:templateId` | `DELETE` | -| `api.projects.:id.whatsapp.templates.:templateId` | `PATCH` | +| `api.profile.promotional-status` | `GET` | +| `api.projects.:id.call-registry.profile` | `GET` | +| `api.projects.:id.call-registry.registrations` | `GET` | +| `api.profile.promotional-emails` | `PATCH` | +| `api.projects.:id.call-registry.profile` | `PATCH` | +| `api.projects.:id.call-registry.registrations` | `POST` | +| `api.projects.:id.call-registry.profile` | `PUT` | ## Removed Routes | Route | Method | |-------|--------| -| `api.projects.:id.spectrum.avatar-upload-url` | `GET` | ## Summary -- **23** added -- **1** removed -- **0** changed -- **35** unchanged +- **7** added +- **0** removed +- **80** unchanged diff --git a/bun.lock b/bun.lock index 748dba3..885ace3 100644 --- a/bun.lock +++ b/bun.lock @@ -1,5 +1,6 @@ { "lockfileVersion": 1, + "configVersion": 0, "workspaces": { "": { "name": "dashboard-cli", @@ -15,7 +16,7 @@ "update-notifier": "^7.3.1", }, "devDependencies": { - "@photon-ai/dashboard-api": "1.2.0", + "@photon-ai/dashboard-api": "1.6.10", "@types/bun": "latest", "@types/node": "^25.6.2", "@types/update-notifier": "^6.0.8", @@ -49,7 +50,7 @@ "@noble/hashes": ["@noble/hashes@2.2.0", "", {}, "sha512-IYqDGiTXab6FniAgnSdZwgWbomxpy9FtYvLKs7wCUs2a8RkITG+DFGO1DM9cr+E3/RgADRpFjrKVaJ1z6sjtEg=="], - "@photon-ai/dashboard-api": ["@photon-ai/dashboard-api@1.2.0", "", { "peerDependencies": { "@elysiajs/eden": "^1.4.9", "elysia": "^1.4.28" } }, "sha512-ZQ4OVaGQMFVMa2/bL2OfRxMaQDABwi+tHUFQHmQOH39N7pCXC6vQ8m32+Its2FxQ5VwU+dyvqmyv0ccxCmK8hw=="], + "@photon-ai/dashboard-api": ["@photon-ai/dashboard-api@1.6.10", "", { "peerDependencies": { "@elysiajs/eden": "^1.4.9", "elysia": "^1.4.28" } }, "sha512-aw0AUFl5RVS58Udl/SMkqMbSykIHZFn3pJ8v4lRMyBoQBvtC+YgcwBOax5fE7jBq1rZk6WVGEbkYHFxGctAzHw=="], "@pnpm/config.env-replace": ["@pnpm/config.env-replace@1.1.0", "", {}, "sha512-htyl8TWnKL7K/ESFa1oW2UB5lVDxuF5DpM7tBi6Hu2LNL3mWkIzNLG6N4zoCUP1lCKNxWy/3iu8mS8MvToGd6w=="], diff --git a/package.json b/package.json index afb9a76..8dc8c52 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "prepublishOnly": "bun run typecheck && bun run build" }, "devDependencies": { - "@photon-ai/dashboard-api": "1.2.0", + "@photon-ai/dashboard-api": "1.6.10", "@types/bun": "latest", "@types/node": "^25.6.2", "@types/update-notifier": "^6.0.8", From 8f53c5841c459f468e9598a4a2ccc3157a93cb37 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Mon, 13 Jul 2026 08:31:57 +0000 Subject: [PATCH 2/2] fix(commands): restore typed `list` for projects/spectrum users The 1.6.10 API contract widens the response of `GET /api/projects` and `GET /api/projects/:id/spectrum/users` to `Record`, so `data ?? []` no longer produces an array with an inferable element type and `list.map((p) => ...)` fails under `noImplicitAny`. Cast at the API boundary using existing DTOs (SpectrumUser was already declared inline; add a local Project DTO in projects.ts covering the fields the file already reads). Matches the pattern already in src/commands/spectrum/lines.ts. Co-authored-by: citron --- src/commands/projects.ts | 18 +++++++++++++++++- src/commands/spectrum/users.ts | 3 ++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/src/commands/projects.ts b/src/commands/projects.ts index 0722690..5a0ea88 100644 --- a/src/commands/projects.ts +++ b/src/commands/projects.ts @@ -65,7 +65,7 @@ function registerListCommand(projects: Command): void { die(`Failed to list projects: ${formatApiError(error)}`); } - const list = data ?? []; + const list = (data ?? []) as Project[]; if (opts.json) { printJson(list); return; @@ -815,3 +815,19 @@ function printKv(pairs: [string, string][]): void { console.log(` ${c.dim(k.padEnd(width))} ${v}`); } } + +interface Project { + id: string; + name: string; + location: string; + status: string; + platforms: string[]; + updatedAt: string; + createdAt: string; + isOwner?: boolean; + template?: boolean; + observability?: boolean; + slackChannelId?: string | null; + slackTeamId?: string | null; + projectSecret?: string | null; +} diff --git a/src/commands/spectrum/users.ts b/src/commands/spectrum/users.ts index 8fc8ad1..9a0a4d9 100644 --- a/src/commands/spectrum/users.ts +++ b/src/commands/spectrum/users.ts @@ -37,7 +37,8 @@ export function registerSpectrumUsers(spectrum: Command): void { if (status === 401) throw new SessionExpiredError(resolved.name); if (error) die(`Failed to list users: ${formatApiError(error)}`); - const list = data?.users ?? []; + const payload = (data ?? {}) as { users?: SpectrumUser[] }; + const list = payload.users ?? []; if (opts.json) return printJson(list); if (list.length === 0) { console.log(c.dim("No Spectrum users yet."));