Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .changeset/contract-1-36.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
"@freeticket/cli": minor
---

Catch up with the B2B contract 1.36.0 (from 1.24.0).

- **Lineup**: `ft artists search`, `ft events artists set|remove` and `ft events invitations list|resend|cancel`. `set` asks before removing anyone from the lineup or emailing `--invite` invitations, and prints `ARTIST_IDS_IGNORED` warnings.
- **Scheduling and presales**: `ft events schedule set|clear` and `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` (checkout funnel), `ft tickets checkin-undo`, `ft event-dates courtesy-seats`, `ft event-dates access-close status|sign`, `ft reports live-attendance`, `ft master-qrs` (with `activate`/`deactivate`) and `ft ticket-templates` (with `instantiate`).
- **Access**: `ft events viewers list|add|remove`, `ft events validators list|add`, `ft staff access` (full replace, from flags or from `--data`, not both) and `ft staff resend-invite`.
- **Community**: `ft content-posts update|delete|pin|unpin`, `ft content-videos update|delete|publish|unpublish|set-series`, `ft content-series`, `ft content-lives create|update|delete|chat|reset-key`, `ft content-channels`, `ft content-meetups` (with `publish`, `cancel`, `rsvp`, `attendance`), `ft content-moderation`, `ft content-comments` and `ft content-members ban|unban`.
- **Workspace**: `ft products`, `ft organization update|analytics|profile`, `ft website get|set|publish|unpublish` and `ft merch catalog`.

Confirmation: every operation the contract marks `x-ft-destructive` asks first, and so do `events viewers add`, `events validators add`, `events invitations resend`, `events artists set --invite`, `staff resend-invite`, `content-meetups publish`, `content-meetups rsvp`, `content-videos publish` (they email or notify people) and `website set` (a full replace). `--yes` skips the question; without a TTY they refuse. `content-moderation approve`, `tickets resend`, `content-posts create` and `products update` notify without asking, on purpose. Tests check that each gated command refuses without `--yes` and calls its operation with it, and that no `x-ft-destructive` operation of the contract is left without a gate.

Master QR secrets: `ft master-qrs list` and `update` leave the secret `code` and `url` out, in the table and in `--json`, unless `--full`. `create` prints them, because you need them to print the QR.

Flag validation: COP amounts, capacities and pages (`ticket-templates instantiate --price/--capacity`, `presale-windows --capacity`, `content-moderation --page`) take whole numbers only, `--limit` on `artists search` and `sales intents` an integer from 1 to 100, and `--active` (presale windows, `discounts list`) and `--attended` only `true` or `false`. `50.000`, `1,000`, `abc` or `yes` exit 1 before any request instead of being sent as 50, NaN/null or false.

The buyer side of the merch store (place an order, look one up, pay it by card) and the buyer API (`/customer/*`) are left out on purpose: they need a buyer session or a Payment Brick token.
38 changes: 37 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,32 @@ ft sales list --status CONFIRMED --json
| `ft events list` · `get <id>` | Workspace events (`--q` `--status` `--with-total`) | VIEWER |
| `ft events create` · `update <id>` · `delete <id>` | Manage events (`--data <json>`) | ADMIN |
| `ft events publish <id>` · `cancel <id>` | Publish an event · cancel it and all its dates, keeping sales and tickets (no refunds; `--yes` skips the prompt) | ADMIN |
| `ft artists search <q>` | Find registered artists by name to get the ids a lineup takes (`--limit` `--cursor`) | VIEWER |
| `ft events artists set <eventId> --artist <id>... [--invite <email>...]` | Replace the lineup, in order (unlisted artists are unlinked; asks before removing anyone or emailing `--invite` invitations, `--yes` skips it; ignored ids are shown as `ARTIST_IDS_IGNORED`) | ADMIN |
| `ft events artists remove <eventId> <organizationId>` | Unlink one artist (`--yes` skips the prompt) | ADMIN |
| `ft events invitations list <eventId>` · `resend <eventId> <invitationId>` · `cancel <eventId> <invitationId>` | Invitations sent to artists without an account: list, resend (renews 14 days, sends an email) and cancel; `resend` and `cancel` ask (`--yes`) | ADMIN |
| `ft events schedule set <eventId> --publish-at <iso>` \| `--sale-starts-at <iso>` · `schedule clear <eventId>` | Schedule a DRAFT: publish later, or publish now and open sales later (exactly one flag) · cancel a pending `--publish-at` | ADMIN |
| `ft events viewers list <eventId>` · `add <eventId> --email <e>` · `remove <eventId> <viewerId>` | Read-only viewers of an event's stats; `add` emails the link (and creates a VIEWER account if needed), both `add` and `remove` ask (`--yes`) | ADMIN |
| `ft events validators list <eventId>` · `add <eventId> --name <n> --email <e>` | Door staff of an event (additive; a new account gets an invitation email, so `add` asks, `--yes`) | ADMIN |
| `ft event-dates list` · `create` · `update` · `delete` | Event dates | ADMIN |
| `ft event-dates courtesy-seats <dateId>` | Blocked seats of a numbered date that can be issued as courtesies | ADMIN |
| `ft event-dates access-close status <dateId>` · `sign <dateId>` | Live entry count · sign the access-close record (freezes the count and emails it; IRREVERSIBLE, `--yes`) | STAFF · ADMIN |
| `ft ticket-templates list` · `create` · `update <id>` · `delete <id>` · `instantiate <id> --event-date <id> [--name --price --capacity]` | Reusable ticket type templates; `instantiate` creates a ticket type on a date (`--price`/`--capacity` are whole numbers: `50000`, not `50.000`; `delete` asks, `--yes`) | ADMIN |
| `ft master-qrs list [--full]` · `create` · `update <id>` · `activate <id>` · `deactivate <id>` · `delete <id>` | Master box-office QRs. `code`/`url` are secret and never rotate: `list` and `update` leave them out, `--json` included, unless `--full`; `create` prints them (you need them to print the QR); `delete` asks, `--yes` | ADMIN |
| `ft ticket-types list` · `get <id>` | Ticket types (`--event-date-id`) | VIEWER |
| `ft ticket-types create` · `update <id>` · `delete <id>` | Manage ticket types (`--data <json>`) | ADMIN |
| `ft presale-windows list <ticketTypeId>` · `create <ticketTypeId> --plan --starts-at --ends-at [--capacity --active]` · `update <id>` · `delete <id>` | Membership presale windows (alias `presales`; one per plan; `--capacity` is a whole number or `none`, `--active` is `true`/`false`; `delete` asks, `--yes` skips) | ADMIN |
| `ft sales list` · `get <id>` | Sales (filters: `--status` `--channel` `--event` `--event-date` `--reference` `--buyer` `--from` `--to`) | STAFF |
| `ft sales create` | Create a sale/order — comps & programmatic sales (`--data <json>`) | ADMIN |
| `ft sales cancel <id>` · `refund <id>` | Cancel / refund a sale (`--data` for the `acknowledge_open_payment` / `acknowledge_manual` flags) | ADMIN |
| `ft sales tickets <id>` · `attempts <id>` | Tickets/attendees of a sale · its payment attempt history (why it did not go through) | STAFF |
| `ft sales transfer <saleId> <itemId> --email <email>` | Transfer one ticket to a registered buyer; voids the old QR, once per ticket (`--yes`) | ADMIN |
| `ft sales recipient set <saleId> --name <name> --email <email>` | Correct a courtesy's recipient and resend (a new email voids the old QRs; `--yes`) | ADMIN |
| `ft sales abandon <id>` | Mark a PENDING sale whose payment never started as abandoned; releases its stock (terminal, `--yes`) | ADMIN |
| `ft sales intents --event <id> [--event-date --only-abandoned --limit --cursor]` | Purchase intents: checkout funnel and abandoned journeys (personal data) | VIEWER |
| `ft tickets access <code>` | Read a ticket's access status (no admit) | STAFF |
| `ft tickets checkin <code>` | Admit a ticket at the door (idempotent) | STAFF |
| `ft tickets checkin-undo <code>` | Undo a check-in so the ticket is valid again (idempotent; `--yes`) | ADMIN |
| `ft tickets resend <code>` | Resend the ticket's confirmation email (QR) | ADMIN |
| `ft tickets reassign <code>` | Move a sold ticket to another date and/or type (`--data '{"eventDateId":"…"}'`; no price difference charged/refunded) | ADMIN |
| `ft plans list` · `get <id>` | Membership plans | VIEWER |
Expand All @@ -115,19 +132,38 @@ ft sales list --status CONFIRMED --json
| `ft venues list` · `get <id>` | Venues | VIEWER |
| `ft venues create` · `update <id>` · `delete <id>` | Manage venues (`--data <json>`) | ADMIN |
| `ft staff list` · `get <id>` · `create` · `set-role <id>` · `delete <id>` | Workspace staff (`--workspace-ids <ids>` lists up to 25 workspaces in one call; `--data <json>`) | ADMIN |
| `ft staff access <id> --type admin\|validador\|personalizado\|lectura [--sections --validator-events --viewer-events --expires-at]` | FULL replace of a member's access in this workspace (or the whole body with `--data`, not both; asks, `--yes`) | ADMIN |
| `ft staff resend-invite <id>` | Email the invitation link again (asks, `--yes`) | ADMIN |
| `ft reports summary` | KPIs (`--period 7d\|30d\|90d\|1y`) | VIEWER |
| `ft reports by-event` · `timeseries` · `inventory` | Revenue/tickets by event, over time, and capacity/availability | VIEWER |
| `ft reports export buyers\|attendees\|subscribers\|reconciliation` | Exports as CSV (filters `--event` `--event-date` `--from` `--to` `--status`) | ADMIN |
| `ft reports reconciliation` · `financials` | CFO reconciliation (Mercado Pago vs sale vs Siigo invoice) · per-function P&L | ADMIN |
| `ft reports live-attendance [--scope all\|own\|partner:<orgId>]` | Event dates happening right now, with check-in progress | VIEWER |
| `ft settlements list` · `get <id>` · `document <id>` | Settlements paid to the organizer · signed download URL for the PDF, 5 min TTL (`--proof <fileName>` for a payment proof) | ADMIN |
| `ft content-videos list` · `content-posts list\|create` · `content-lives list\|get\|playback-token` | Organization content; `content-posts create --data` publishes a post or article | ADMIN |
| `ft content-posts update <id>` · `delete <id>` · `pin <id>` · `unpin <id>` | Edit, delete (`--yes`) and pin community posts | ADMIN |
| `ft content-videos update <id>` · `delete <id>` · `publish <id>` · `unpublish <id>` · `set-series <id> --series <id\|none>` · `ft content-series list\|create\|update\|delete\|publish\|unpublish` | On-demand videos and video series (deletes and video `publish`, which notifies members, ask, `--yes`) | ADMIN |
| `ft content-lives create` · `update <id>` · `delete <id>` · `chat <id>` · `reset-key <id>` | Live streams: `create` and `reset-key` print the SECRET stream key once; `delete` and `reset-key` ask (`--yes`) | ADMIN |
| `ft content-channels list` · `create` · `update <id>` · `order <id,id,…>` · `archive <id>` | Community channels (`archive` has no undo, `--yes`) | ADMIN |
| `ft content-meetups list` · `get` · `create` · `update` · `publish <id>` · `cancel <id>` · `rsvp <id> <rsvpId> --approve\|--reject` · `attendance <id> <rsvpId>` | Community meetups; `publish`, `cancel` and `rsvp` notify members, so they ask (`--yes`); `attendance --attended true\|false` | ADMIN |
| `ft content-moderation queue\|bans\|member-posts` · `approve <postId> --expected-updated-at <iso>` · `reject <postId>` · `remove <postId>` · `ft content-comments hide\|unhide\|ignore-reports\|delete <id>` · `ft content-members ban <customerId> --comment <id>` · `unban <customerId>` | Community moderation (`reject`, `remove`, `delete` and `ban` ask, `--yes`; `approve` does not: it is the reviewer's decision and is pinned to `--expected-updated-at`) | STAFF · ADMIN |
| `ft products list` · `get` · `create` · `update` · `delete` · `status <id> --status DRAFT\|PUBLISHED` | Digital products and courses (`--data <json>`; `delete` asks) | ADMIN |
| `ft organization update --data` · `analytics <G-XXXX\|none>` · `profile get\|update` · `ft website get\|set --data\|publish\|unpublish` | Workspace identity, profile, GA4 and public website (`website set` is a FULL replace, so it asks, `--yes`: start from `website get --json`) | ADMIN |
| `ft merch catalog` | Merch store settings and published products with live stock (needs an enterprise service key) | — |
| `ft waitlist list [--city <name>]` · `waitlist create --data` | Per-city waitlist of an enterprise landing (export with personal data); `create` needs an enterprise service key | ADMIN |
| `ft api-keys create <name>` · `list` · `revoke <id>` | Self-service API keys (the secret is shown once, never stored) | ADMIN |
| `ft admin login` · `me` · `workspaces` · `users` · `plans` · `feature-flags` · `tokens` · `audit-log` | Superadmin, cross-tenant — needs a SUPER_ADMIN session, not an API key. Includes `admin workspaces plan <id>` (assisted plan assignment), `plan-show <id>` (current plan) and `delete <id>` (soft delete; suspend first) and `webTemplate` / `customDomain` on `update` | SUPER_ADMIN |

> **Write operations** (`create`/`update`/`delete` and actions like `publish`,
> `cancel`, `refund`) send a JSON body via `--data <inline-json>` or
> `--data @file.json`. `delete` prompts for confirmation unless you pass `--yes`.
> `--data @file.json`. `delete` prompts for confirmation unless you pass `--yes`, and so do the
> commands that cannot be taken back or that email or notify people (each
> row says which). Without a TTY and without `--yes` they exit 1 before any
> write. Four notify without asking, on purpose: `tickets resend`,
> `content-posts create`, `products update` and `content-moderation approve`.
> Numeric flags take whole numbers only (`50000`, never
> `50.000` or `50,000`) and boolean flags only `true`/`false`: anything else
> exits 1 before any request.

### Common flags

Expand Down
Loading