feat(trial): offer status read, offer address for the profile #125

Merged
sharang merged 3 commits from feat/trial-offer-status into main 2026-11-12 08:49:01 +00:00
Owner

Part of portal#159, item 1. Benjamin confirmed the registration e-mail on his phone, and the browser on the PC stayed on "Bitte bestätigen Sie Ihre E-Mail-Adresse".

GET /v1/trial-offers/{id} returns {offer_id, state}. Once the offer is activated, it also returns tenant_slug, trial_started_at and trial_expires_at, including a staff extension. The portal's waiting page polls it and moves on to the activated view (portal PR follows).

  • The answer holds no e-mail address and no company data. The offer id is a UUID that only the sending browser has (the resend route already works that way).
  • The authz group is unchanged: /v1/trial-offers* → tenants.write (portal-svc).
  • Test: TestTrialOffer_status covers pending → activated after a verify, no e-mail in the answer, and an unknown id → 404.

🤖 Generated with Claude Code

Second commit: GET /v1/tenants/{id}/contracts now also carries street, postcode, city and country of the trial offer (item 3). The company profile in portal#161 suggests that address as the master data. The test covers the four fields.

Part of portal#159, item 1. Benjamin confirmed the registration e-mail on his phone, and the browser on the PC stayed on "Bitte bestätigen Sie Ihre E-Mail-Adresse". `GET /v1/trial-offers/{id}` returns `{offer_id, state}`. Once the offer is `activated`, it also returns `tenant_slug`, `trial_started_at` and `trial_expires_at`, including a staff extension. The portal's waiting page polls it and moves on to the activated view (portal PR follows). - The answer holds no e-mail address and no company data. The offer id is a UUID that only the sending browser has (the resend route already works that way). - The authz group is unchanged: `/v1/trial-offers*` → `tenants.write` (portal-svc). - Test: `TestTrialOffer_status` covers pending → activated after a verify, no e-mail in the answer, and an unknown id → 404. 🤖 Generated with [Claude Code](https://claude.com/claude-code) **Second commit:** `GET /v1/tenants/{id}/contracts` now also carries `street`, `postcode`, `city` and `country` of the trial offer (item 3). The company profile in portal#161 suggests that address as the master data. The test covers the four fields.
sharang added 1 commit 2026-11-12 08:23:05 +00:00
feat(trial): GET /v1/trial-offers/{id} for the waiting page
ci / shared (pull_request) Successful in 11s
ci / test (pull_request) Successful in 5m33s
ci / image (pull_request) Skipped
0f8cc33888
The page that sent the offer waits for the e-mail confirmation. When
the link is opened on another device (a phone), that page stayed put
(portal#159, item 1). The status read lets it follow: the state and,
once active, the workspace slug and the trial dates. No e-mail or
company data in the answer; the offer id, which only the sending
browser has, is the key. Same authz group as the other offer routes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sharang changed title from feat(trial): GET /v1/trial-offers/{id} for the waiting page to feat(trial): offer status read, offer address for the profile 2026-11-12 08:34:47 +00:00
sharang added 1 commit 2026-11-12 08:34:47 +00:00
feat(trial): offer address in the contract overview
ci / shared (pull_request) Successful in 12s
ci / test (pull_request) Failing after 6m9s
ci / image (pull_request) Skipped
d0b1287afb
GET /v1/tenants/{id}/contracts carries street, postcode, city and
country of the trial offer, so the company profile can suggest the
registration address as the master data (portal#159, item 3; read
by portal#161). Only for the tenant's own activated offer, as the
rest of the trial block.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sharang added 1 commit 2026-11-12 08:42:49 +00:00
test(trial): status read shows a staff-extended trial end
ci / shared (pull_request) Successful in 12s
ci / test (pull_request) Successful in 5m52s
ci / image (pull_request) Skipped
2e6f360751
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sharang merged commit dd94763d50 into main 2026-11-12 08:49:01 +00:00
Sign in to join this conversation.