Skip to content

docs: optional catalog_id on POST /api/emails leads the email with the value delta - #281

Open
sweetmantech wants to merge 1 commit into
mainfrom
feat/emails-catalog-delta
Open

docs: optional catalog_id on POST /api/emails leads the email with the value delta#281
sweetmantech wants to merge 1 commit into
mainfrom
feat/emails-catalog-delta

Conversation

@sweetmantech

@sweetmantech sweetmantech commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

Row 5 of chat#1911: the contract for leading a report email with the catalog's value delta. Adds an optional catalog_id (uuid) to SendEmailRequest: when present, the subject is prefixed with the catalog's current estimated value and signed change since the previous measurement, and a valuation hero block is prepended to the body. Single measurement shows a baseline note; an unowned catalog or one with no measurements leaves the email unchanged (best-effort by design - a delta failure must never block a send).

Purely additive anchored edit to SendEmailRequest in accounts.json; JSON re-validated. Links the series contract at Get Catalog Valuations.

Merge order: this PR → the api implementation (stacked on api#795, ref follows). Depends on docs#279 conceptually (the valuations series) but not textually.

🤖 Generated with Claude Code


Summary by cubic

Adds an optional catalog_id (uuid) to SendEmailRequest for POST /api/emails to lead report emails with the catalog’s current value and signed delta, aligning with chat#1911. Additive docs update; existing clients are unaffected.

  • New Features
    • When catalog_id is set, the subject is prefixed with the current estimated value and change, and a valuation hero block is added to the body.
    • Single measurement shows a baseline note; unowned or unmeasured catalogs leave the email unchanged.
    • Underlying data comes from the “Get Catalog Valuations” series.

Written for commit 63768f1. Summary will update on new commits.

Review in cubic

…e value delta

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@cursor

cursor Bot commented Jul 29, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@sweetmantech, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 10 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 92eaf71a-13cf-4603-bd70-5875eeef7751

📥 Commits

Reviewing files that changed from the base of the PR and between 5255df6 and 63768f1.

📒 Files selected for processing (1)
  • api-reference/openapi/accounts.json

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 1 file

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="api-reference/openapi/accounts.json">

<violation number="1" location="api-reference/openapi/accounts.json:3590">
P2: The description links to `/api-reference/songs/catalog-valuations` as a related endpoint, but that page doesn't exist yet in the repository. After this PR merges, users who click this link will see a 404 until the referenced endpoint documentation is added. Since the merge order places this PR first, consider either deferring the link until the endpoint page exists, adding a brief placeholder page, or noting the forward-reference risk so the follow-up PR is not missed.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

"type": "string",
"description": "Chat ID to include a chat link in the email footer. Use [Create Chat](/api-reference/chat/create) to create one."
},
"catalog_id": {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: The description links to /api-reference/songs/catalog-valuations as a related endpoint, but that page doesn't exist yet in the repository. After this PR merges, users who click this link will see a 404 until the referenced endpoint documentation is added. Since the merge order places this PR first, consider either deferring the link until the endpoint page exists, adding a brief placeholder page, or noting the forward-reference risk so the follow-up PR is not missed.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At api-reference/openapi/accounts.json, line 3590:

<comment>The description links to `/api-reference/songs/catalog-valuations` as a related endpoint, but that page doesn't exist yet in the repository. After this PR merges, users who click this link will see a 404 until the referenced endpoint documentation is added. Since the merge order places this PR first, consider either deferring the link until the endpoint page exists, adding a brief placeholder page, or noting the forward-reference risk so the follow-up PR is not missed.</comment>

<file context>
@@ -3587,6 +3587,11 @@
             "type": "string",
             "description": "Chat ID to include a chat link in the email footer. Use [Create Chat](/api-reference/chat/create) to create one."
           },
+          "catalog_id": {
+            "type": "string",
+            "format": "uuid",
</file context>

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