Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 11 additions & 29 deletions UPSTREAM_DIFF.md
Original file line number Diff line number Diff line change
@@ -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
5 changes: 3 additions & 2 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
18 changes: 17 additions & 1 deletion src/commands/projects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
3 changes: 2 additions & 1 deletion src/commands/spectrum/users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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."));
Expand Down
Loading