Repository navigation
feat(cli): campaign conversions record and report (beta) - #62
Conversation
|
Warning Review limit reachedThe included review limit has been reached and this organization has disabled usage-based review continuation. Wait for reviews to reset or ask a billing admin to change After included review limits.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Next included review available in 4 minutes. View limit detailsLimit details: You’ve used all 2 included reviews currently available. Your 61 included PR review attempts over the past 7 days set your current allowance at 2 reviews per hour. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (7)
Comment |
|
Local review on 8812038 (manual pass over the full diff). The commands call only the SDK methods published in 0.1.0-dev.20261001202146, and the pin is exact. Required flags match the API's required fields. The value pair is enforced with |
Summary
CLI commands for the campaign conversion reporting beta (API polymorfa/polymorfa#427, SDK polymorfa/sdks#327).
polymorfa campaign conversions record <campaign> --project-id --recipient --event-id --event-type --occurred-at [--amount-minor --currency]polymorfa campaign conversions report <campaign> --project-id@polymorfa/sdkto0.1.0-dev.20261001202146, the first dev prerelease withcampaigns.recordConversionandcampaigns.conversions. The README version line and the prerelease test are updated to match.Both commands use the Platform client, so they need a team API key, matching the SDK methods. Human output never prints the event ID, which can be an order number. Amounts are shown in minor units with their currency, as reported.
--amount-minorand--currencyeach require the other. API refusals, including the beta403, go through the existing error presentation and exit non-zero.Verification
npm run verify: format, lint, typecheck, 101 files / 957 tests (2 skipped), build, pack and prod audit, all passing. The newtest/commands/campaign-conversions.test.tscovers the request shape, the hidden event ID,--amount-minorwithout--currency(refused before sending), replay output, the per-currency report, and the beta refusal exit.Not exercised
No calls against a deployed API: the beta isn't deployed or enrolled.
Need help on this PR? Tag
@codesmithwith what you need. Autofix is disabled.