Skip to content

feat: commands for B2B contract 1.36.0 (lineup, box office, access, community) - #53

Open
LucasLeguizamo wants to merge 5 commits into
mainfrom
feat/p1-ops
Open

LucasLeguizamo wants to merge 5 commits into
mainfrom
feat/p1-ops

Conversation

@LucasLeguizamo

@LucasLeguizamo LucasLeguizamo commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Qué cambia

Brings the CLI from B2B contract 1.24.0 to 1.36.0. openapi.json is copied from free-admin main, where every route is already deployed, so no stacked backend PRs are involved. This PR also includes all of #52 (lineup). origin/main is merged in; there is no rebase.

New commands (⚠ = asks for confirmation; --yes skips the prompt, and without a TTY the command refuses):

  • Lineup (from feat: event lineup commands (contract 1.25.0) #52): ft artists search · ft events artists set ⚠ (only when someone gets removed) · remove ⚠ · ft events invitations list|resend|cancel ⚠ (cancel)
  • Scheduling and presales: ft events schedule set|clear · ft presale-windows list|create|update|delete ⚠ (alias presales)
  • Box office and door:
    • ft sales transfer ⚠ · ft sales recipient set ⚠ · ft sales abandon ⚠ · ft sales intents --event
    • ft tickets checkin-undo ⚠
    • ft event-dates courtesy-seats · ft event-dates access-close status|sign ⚠
    • ft reports live-attendance
    • ft master-qrs list|create|update|activate|deactivate|delete ⚠. The table hides the secret code/url unless you pass --full.
    • ft ticket-templates list|create|update|delete ⚠|instantiate
  • Access: ft events viewers list|add ⚠|remove ⚠ · ft events validators list|add ⚠ · ft staff access ⚠ (full replace, from flags or --data) · ft staff resend-invite ⚠
  • Community:
    • ft content-posts update|delete ⚠|pin|unpin
    • ft content-videos update|delete ⚠|publish|unpublish|set-series · ft content-series list|create|update|delete ⚠|publish|unpublish
    • ft content-lives create|update|delete ⚠|chat|reset-key ⚠
    • ft content-channels list|create|update|order|archive ⚠
    • ft content-meetups list|get|create|update|publish ⚠|cancel ⚠|rsvp ⚠|attendance
    • ft content-moderation queue|bans|member-posts|approve|reject ⚠|remove ⚠ · ft content-comments hide|unhide|ignore-reports|delete ⚠ · ft content-members ban ⚠|unban
  • Workspace: ft products list|get|create|update|delete ⚠|status · ft organization update|analytics|profile get|profile update (alias org) · ft website get|set|publish|unpublish · ft merch catalog

The prompt covers every operation marked x-ft-destructive (all 26). It also covers commands that are not destructive but send email or notify a whole community: viewers add, validators add, resend-invite, meetup publish and RSVP decision.

Left out on purpose:

Operation Reason
postMerchOrders Buyer-side merch checkout of an enterprise landing: needs X-Customer-Session, the buyer's ID document and a stock hold. This is a browser flow, not an operator flow.
postMerchOrdersLookup Only works with the buyer's own session (X-Customer-Session). It is an anonymous-buyer flow.
postMerchOrdersCodePaymentCard Charges a Payment Brick card token. Card data must never go through the CLI.

Tests

  • destructive-confirm.test.ts still fails if any x-ft-destructive operation in the contract has no gate. It now runs 31 cases: the 26 destructive operations plus 5 commands that send email.
  • New src/commands/wire.test.ts runs the real generated SDK with only fetch faked. It checks the method, the final path (with two distinct ids, so swapped ids get caught) and the JSON body for:
    • transfer, recipient, checkin-undo, abandon
    • staff access (flags, --expires-at none, --data, invalid --type) and resend-invite
    • viewers add/remove/list, validators add
    • access-close sign, master-qr deactivate, template instantiate, intents
    • meetup RSVP, member ban

Changeset: one minor, .changeset/contract-1-36.md. It replaces lineup-artists.md and p1-ops.md.

Cómo probar

pnpm install --frozen-lockfile && pnpm generate
pnpm lint && pnpm typecheck && pnpm test && pnpm build   # 12 files, 142 tests
node dist/index.js events viewers --help
node dist/index.js staff access stf_1 --type lectura < /dev/null   # exit 1: Refusing … no TTY to confirm
node dist/index.js sales transfer s1 i1 --email a@b.co < /dev/null # exit 1: Refusing …

Diagrama de flujo

flowchart LR
  A[ft command] --> B{destructive or sends email?}
  B -- yes --> C{--yes?}
  C -- no, no TTY --> X[exit 1 before any request]
  C -- no, TTY --> P[prompt]
  P -- confirmed --> D
  C -- yes --> D[generated SDK]
  B -- no --> D
  D --> E[/api/v1 contract 1.36.0/]
Loading

🤖 Generated with Claude Code

https://claude.ai/code/session_01Fo7cm7S4yTPG5LztA8pEVi

LucasLeguizamo and others added 2 commits November 1, 2026 16:21
Sync openapi.json to free-admin's feat/api-v1-lineup branch (1.25.0, not
deployed yet) and add:

- ft artists search <q>
- ft events artists set <eventId> --artist <id>... [--invite <email>...]
  (asks before removing artists or clearing the lineup; prints
  ARTIST_IDS_IGNORED warnings)
- ft events artists remove <eventId> <organizationId> (--yes)
- ft events invitations list|resend|cancel (cancel takes --yes)

Depends on AppFreeticket/free-admin#1155.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Schedule publication, presale windows CRUD, ticket transfer, check-in
undo, courtesy recipient and courtesy seats. Destructive commands gate
on --yes, and a test ties that gate to the contract's x-ft-destructive.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Fo7cm971JYzaEEhqNoSW8E
@LucasLeguizamo LucasLeguizamo added the enhancement New feature or request label Nov 1, 2026
Conflicts: src/program.ts (kept presale-windows and waitlist registration),
openapi.json (replaced with free-admin B2B contract 1.36.0).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Fo7cm7S4yTPG5LztA8pEVi
Covers the operations added between 1.24.0 and 1.36.0 on top of the
lineup (#52) and dashboard-parity ops: viewers/validators, staff access
and resend-invite, access-close, sales abandon and intents, live
attendance, master QRs, ticket templates, community management
(posts, videos, series, lives, channels, meetups, moderation), products,
organization/profile, website and the merch catalog.

Destructive operations and the ones that send email or notify a whole
community ask for confirmation (--yes skips it, no TTY refuses). The
destructive-confirm test now covers all 26 x-ft-destructive operations,
and wire.test.ts checks method, path and body of the riskiest commands
against the real SDK. Buyer-side merch checkout is left out.

Consolidates the lineup and p1-ops changesets into one minor.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Fo7cm7S4yTPG5LztA8pEVi
@LucasLeguizamo LucasLeguizamo changed the title feat: dashboard-parity ops commands (contract 1.25.0) feat: commands for B2B contract 1.36.0 (lineup, box office, access, community) Nov 3, 2026
@LucasLeguizamo
LucasLeguizamo changed the base branch from feat/lineup-artists to main November 3, 2026 21:30
…secrets

QA follow-up on the 1.36.0 catch-up.

- Whole-number and true/false flags are parsed by commander (lib/input
  wholeNumber, wholeNumberOrNone, booleanFlag) and exit 1 before any
  confirmation or request: Number("50.000") was 50 and NaN went out as
  null. Covers ticket-templates instantiate --price/--capacity,
  presale-windows --capacity/--active, content-meetups attendance
  --attended, content-moderation --page, discounts list --active, and
  --limit on artists search / sales intents (parseLimit now rejects 1e1).
- New gates: events invitations resend, events artists set --invite,
  content-videos publish and website set (full replace).
- staff access refuses --data together with body flags.
- master-qrs list/update drop code and url from the table and --json
  unless --full; create documents that it prints them.
- destructive-confirm: each row also runs with --yes and must call its SDK
  function exactly once; a sweep pins the set of commands that take --yes
  and an allowlist names the notifying writes left ungated on purpose.
- coverage.test: every openapi.json operation has a command, an exclusion
  with its reason, or a DIRECT path; excluded ones are never called.
- Wire tests for two-id commands, 404/500 through op() and ops.ts, and the
  real configureClient sending X-Workspace-Id.
- vitest setupFiles: fetch throws, FT_API_URL is a closed port, HOME is a
  temp dir.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Fo7cm7S4yTPG5LztA8pEVi
@LucasLeguizamo
LucasLeguizamo marked this pull request as ready for review November 3, 2026 21:56
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants