Skip to content

SMOODEV-2566: th api crm proposals (+ singular alias)#197

Open
brentrager wants to merge 2 commits into
mainfrom
proposals-cli
Open

SMOODEV-2566: th api crm proposals (+ singular alias)#197
brentrager wants to merge 2 commits into
mainfrom
proposals-cli

Conversation

@brentrager

Copy link
Copy Markdown
Contributor

Adds th api crm proposals (with visible_alias = "proposal" so both singular and plural resolve) for the SmooAI Proposals feature (smooai PR #2935).

Actions

  • list — the org's proposals (title / status / views / id)
  • show <id> — one proposal + its magic link
  • create <title> [--deal <uuid|title>] [--key <password>] [--publish]
  • update <id> [--title] [--deal] [--key] [--publish|--unpublish] [--rotate-token]
  • link <id> <deal> — link a proposal to a CRM deal
  • url <id> — print the shareable magic link
  • delete <id>

How it's wired

  • Lives under th api crm — reuses the existing user-JWT UserClient, resolve_org, and resolve_deal_id (for --deal), so zero new auth wiring.
  • Hits the org-scoped routes /organizations/{org}/proposals[/:id] (the actual backend paths — top-level, not under /crm).
  • visible_alias = "proposal" gives the singular/plural pair with one attribute (your "always support either" decision).
  • Magic link built from the returned token: https://smoo.ai/proposals/<token>[?key=…] (override host via SMOOAI_WEB_URL).

Verification

  • cargo check -p smooai-smooth-cli clean (only pre-existing crate warnings).
  • cargo fmt applied; pre-commit clippy hook passed.

Note: the endpoints are live only once smooai #2935 is deployed.

🤖 Generated with Claude Code

…ate/update/link-to-deal/url

Adds `th api crm proposals` (visible alias `proposal`, so singular & plural both
work) for the SmooAI Proposals feature. Reuses the user-JWT client + resolve_org
+ resolve_deal_id, hitting the org-scoped routes /organizations/{org}/proposals.
Actions: list, show, create, update (partial), link (to a CRM deal), url (print
the magic link), delete. Compiles clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Jul 12, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: bd5ed25

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

…ors) + local file upload

`th org brand` (alias `th api orgs brand`): with no flags prints current branding; any of
--app-name / --logo(-file) / --logo-dark(-file) / --favicon(-file) / --primary / --accent /
--support-url / --hide-powered-by GET-merges the current branding and PUTs
/organizations/:org/branding. The --*-file variants upload a local image via the
multipart /logo/upload endpoint and use the returned hosted URL.

Adds UserClient::put + UserClient::upload_logo (reqwest multipart feature).
Dogfooded on the Smoo AI org (app name, logo, teal #00a6a6, gold accent) so proposals
render "Proposal by Smoo AI" with the org logo + brand color.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant