Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.
TypeScript i18nextnext-authnextjspostgresqlprismareact-emailt3-stacktailwindcsstrpcturborepotypescriptzod
📝 Publish the API reference and guides in the Mintlify docs (#3259)
Luke Velladca690b39b15
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex 024cff589..a531fa58d 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -26,6 +26,11 @@ jobs:- name: Check typesrun: pnpm type-check+ # The API reference in apps/docs is generated from the v1 route. A+ # stale committed spec means an endpoint changed without its docs.+ - name: Check the committed OpenAPI spec matches the code+ run: pnpm check:openapi+sherif:name: Sherifruns-on: ubuntu-latestdiff --git a/apps/docs/api-reference/authentication.mdx b/apps/docs/api-reference/authentication.mdxnew file mode 100644index 000000000..d77bf7b59--- /dev/null+++ b/apps/docs/api-reference/authentication.mdx@@ -0,0 +1,35 @@+---+title: "Authentication"+description: "Authenticate every request with a space API key."+---++Every Polls endpoint requires a bearer token; only the OpenAPI document at `/v1/openapi` is public. Pass the API key in the `Authorization` header:++```http+Authorization: Bearer sk_xxxxxx_xxxxxxxxxxxxxxxxxxxxxxxx+```++```bash+curl https://api.rallly.co/v1/polls \+ -H "Authorization: Bearer $RALLLY_API_KEY"+```++## Creating a key++1. Open **Settings → API keys** in the space you want to access. Only the space owner sees this page.+2. Choose **Create API key** and give it a name that identifies the integration.+3. Copy the key. It is shown once and cannot be retrieved later; if you lose it, revoke it and create a new one.++Keys start with `sk_`. Store them as you would any secret: in an environment variable or a secrets manager, never in client-side code or a repository.++## Scope++A key belongs to one space and grants access to that space's polls only. It does not carry a user identity: polls created through the API are attributed to the organizer you name in the request, who must be a member of the space.++## Revoking a key++Revoke a key from the same settings page. Requests with a revoked, expired or unknown key fail with `401` and the `UNAUTHORIZED` error code.++## Plan requirement++The space behind the key must be on a Pro plan. A key for a space without an active subscription is accepted but every request fails with `403` and the `SPACE_NOT_PRO` error code until the space upgrades.diff --git a/apps/docs/api-reference/changelog.mdx b/apps/docs/api-reference/changelog.mdxnew file mode 100644index 000000000..df5fd185d--- /dev/null+++ b/apps/docs/api-reference/changelog.mdx@@ -0,0 +1,15 @@+---+title: "Changelog"+description: "Changes to the API, newest first."+---++<Update label="v1">+Initial stable release under `/v1`.++- Create, list, get, update, close and delete polls+- Read a poll's results and participants+- Bearer authentication with space API keys+- Per space rate limits with `RateLimit-*` headers++Webhooks for poll events are planned. There is no date yet.+</Update>diff --git a/apps/docs/api-reference/errors.mdx b/apps/docs/api-reference/errors.mdxnew file mode 100644index 000000000..768c158a2--- /dev/null+++ b/apps/docs/api-reference/errors.mdx@@ -0,0 +1,41 @@+---+title: "Errors"+description: "The error envelope and every code the API returns."+---++Every failure is `application/json` with the same shape:++```json+{+ "error": {+ "code": "POLL_NOT_FOUND",+ "message": "Poll not found or does not belong to this space."+ }+}+```++`code` is stable and safe to branch on. `message` is for humans and may change without notice. `VALIDATION_ERROR` messages name each offending field, separated by semicolons.++## Codes++| Status | Code | When |+| --- | --- | --- |+| 400 | `VALIDATION_ERROR` | The body or query string did not match the schema, contained an unknown field, or the body was not valid JSON |+| 400 | `INVALID_AUTHORIZATION_HEADER` | The `Authorization` header is not `Bearer <key>` |+| 400 | `ORGANIZER_NOT_MEMBER` | The organizer email is not a member of the space |+| 400 | `TOO_MANY_OPTIONS` | More than the maximum number of poll options |+| 400 | `INAPPROPRIATE_CONTENT` | The title, description or location was flagged by content moderation |+| 401 | `UNAUTHORIZED` | The API key is missing, invalid, expired or revoked, or its owner is banned |+| 403 | `SPACE_NOT_PRO` | The space behind the key has no Pro subscription |+| 404 | `NOT_FOUND` | No route matches the method and path |+| 404 | `POLL_NOT_FOUND` | The poll does not exist or belongs to another space |+| 422 | `TRANSITION_NOT_AVAILABLE` | The requested status change is not supported |+| 429 | `RATE_LIMIT_EXCEEDED` | A rate limit window is exhausted; see [Rate limits](/api-reference/rate-limits) |+| 503 | `SERVICE_UNAVAILABLE` | Maintenance, or the rate limit store cannot be reached |+| 500 | `INTERNAL_ERROR` | Unexpected failure; the request id is logged |++## Handling errors++- Treat `4xx` responses other than `429` as bugs in the request. Retrying without changing it returns the same error.+- Retry `429` and `503` after the `Retry-After` header.+- Retry `500` with backoff. If it persists, contact support with the time of the request.diff --git a/apps/docs/api-reference/introduction.mdx b/apps/docs/api-reference/introduction.mdxnew file mode 100644index 000000000..2b3bae279--- /dev/null+++ b/apps/docs/api-reference/introduction.mdx@@ -0,0 +1,33 @@+---+title: "Introduction"+description: "Create and manage scheduling polls from your own systems."+---++The Rallly API lets you create polls, read their options, results and participants, and close or delete them from your own tools. Every request is scoped to one space: the API key identifies the space, and every poll you create or read belongs to it.++## Availability++The API is available for spaces on a Pro plan of the cloud hosted version, at `https://api.rallly.co`. It is not available on self-hosted instances.++## Getting a key++Only the space owner can create API keys, from **Settings → API keys**. See [Authentication](/api-reference/authentication) for the header format and how keys are handled.++## Base URL++```text+https://api.rallly.co/v1+```++`v1` is stable. Additive changes such as new endpoints or new optional fields may land at any time; breaking changes only arrive under a new version prefix. The [changelog](/api-reference/changelog) records both.++## Conventions++- Requests and responses are JSON. Send `Content-Type: application/json` with a body.+- List endpoints return the items in `data` and a `nextCursor` beside it. Pass `nextCursor` as the `cursor` query parameter for the next page; it is `null` on the last page.+- Timestamps are ISO 8601 instants in UTC. A `date` poll's options carry a floating `YYYY-MM-DD` date with no timezone; a `time` poll's options carry a `startTime` instant and a `duration` in minutes.+- Request bodies are validated strictly. A field that is not in the schema is rejected rather than ignored, so a misspelt setting never silently falls back to its default.++## Machine readable spec++The OpenAPI document that generates this reference is served at `https://api.rallly.co/v1/openapi`.diff --git a/apps/docs/api-reference/openapi.json b/apps/docs/api-reference/openapi.jsonnew file mode 100644index 000000000..bd424db00--- /dev/null+++ b/apps/docs/api-reference/openapi.json@@ -0,0 +1,1891 @@+{+ "openapi": "3.1.0",+ "info": {+ "title": "Rallly API",+ "description": "## Versioning\n\n`v1` is stable. Additive changes (new endpoints, new optional fields) may land on this path at any time; breaking changes only arrive under a new version prefix.\n\n## Rate limits\n\nAll endpoints share two limits per space: **60 requests per minute** and **5000 requests per day**. Both are fixed windows that open with the first request and reset when they expire. Both limits are per space, not per API key, so creating additional keys does not increase throughput.\n\nEvery response from an authenticated request includes the standard `RateLimit-*` headers. Responses sent before the limiter runs (`401`, `403`, and the maintenance `503`) do not. `RateLimit-Policy` lists both limits; `RateLimit-Limit`, `RateLimit-Remaining` and `RateLimit-Reset` describe whichever limit is closest to being exhausted. When either limit is exceeded the API responds with `429 Too Many Requests`, a `RATE_LIMIT_EXCEEDED` error body, and a `Retry-After` header indicating how many seconds to wait before retrying.\n\nIf the rate limit store cannot be reached the API fails closed and responds with `503 Service Unavailable`, a `SERVICE_UNAVAILABLE` error body, and a `Retry-After` header.\n\n## Dates and times\n\nEvery poll has a `kind`. A `date` poll offers calendar days: each option carries a `date` in `YYYY-MM-DD` format, which is a floating date with no time component and no timezone, so never convert it through a timezone. A `time` poll offers time slots: each option carries a `startTime` as an ISO 8601 instant in UTC and a `duration` in minutes; convert `startTime` into the poll's `timeZone` (or the viewer's) for display. Timestamps such as `createdAt` and `updatedAt` are always ISO 8601 instants in UTC.\n\n## Request bodies\n\nRequest bodies are validated strictly: a field that is not part of the documented schema is rejected with `VALIDATION_ERROR` rather than ignored, so a misspelt setting never silently falls back to its default.\n\n## Enums\n\nVote types are an open set. The built-in values are `yes`, `ifNeedBe` and `no`; new types may be added without a version change, so clients must tolerate values they do not recognise. `status` and `kind` are closed sets.\n\n## Lists\n\nEvery list endpoint returns the items in `data` and a `nextCursor` beside it. Pass `nextCursor` as the `cursor` query parameter to fetch the next page; it is `null` on the last page.\n\n## Errors\n\nEvery failure is `application/json` with the shape `{ \"error\": { \"code\", \"message\" } }`. `code` is stable and safe to branch on; `message` is human-readable and may change. `VALIDATION_ERROR` messages name each offending field.\n\n| Status | Code | When |\n| --- | --- | --- |\n| 400 | `VALIDATION_ERROR` | The body or query string did not match the schema, contained an unknown field, or the body was not valid JSON |\n| 400 | `INVALID_AUTHORIZATION_HEADER` | The `Authorization` header is not `Bearer <key>` |\n| 400 | `ORGANIZER_NOT_MEMBER` | The organizer email is not a member of the space |\n| 400 | `TOO_MANY_OPTIONS` | More than the maximum number of poll options |\n| 400 | `INAPPROPRIATE_CONTENT` | The title, description or location was flagged by content moderation |\n| 401 | `UNAUTHORIZED` | The API key is missing, invalid, expired or revoked, or its owner is banned |\n| 403 | `SPACE_NOT_PRO` | The space behind the key has no Pro subscription |\n| 404 | `NOT_FOUND` | No route matches the method and path |\n| 404 | `POLL_NOT_FOUND` | The poll does not exist or belongs to another space |\n| 422 | `TRANSITION_NOT_AVAILABLE` | The requested status change is not supported |\n| 429 | `RATE_LIMIT_EXCEEDED` | A rate limit window is exhausted |\n| 503 | `SERVICE_UNAVAILABLE` | Maintenance, or the rate limit store cannot be reached |\n| 500 | `INTERNAL_ERROR` | Unexpected failure; the request id is logged |",+ "version": "1.0.0"+ },+ "servers": [+ {+ "url": "https://api.rallly.co"+ }+ ],+ "components": {+ "securitySchemes": {+ "bearerAuth": {+ "type": "http",+ "scheme": "bearer"+ }+ },+ "schemas": {+ "Poll": {+ "type": "object",+ "properties": {+ "id": {+ "type": "string",+ "example": "Xk3pQ9vLm2Ab"+ },+ "title": {+ "type": "string",+ "example": "Team sync"+ },+ "description": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ],+ "example": "Pick a time that works for everyone"+ },+ "location": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ],+ "example": "Zoom"+ },+ "timeZone": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ],+ "example": "Europe/London"+ },+ "status": {+ "$ref": "#/components/schemas/PollStatus"+ },+ "kind": {+ "$ref": "#/components/schemas/PollKind"+ },+ "createdAt": {+ "type": "string",+ "format": "date-time",+ "example": "2025-01-10T12:00:00.000Z"+ },+ "updatedAt": {+ "type": "string",+ "format": "date-time",+ "description": "When the poll was last modified. Changes when the poll's details, settings or status change.",+ "example": "2025-01-12T08:30:00.000Z"+ },+ "organizer": {+ "anyOf": [+ {+ "$ref": "#/components/schemas/PollOrganizer"+ },+ {+ "type": "null"+ }+ ],+ "description": "The space member the poll belongs to. `null` when the organizer's account no longer exists."+ },+ "requireEmail": {+ "type": "boolean",+ "description": "Whether participants must provide their email address",+ "example": false+ },+ "hideParticipants": {+ "type": "boolean",+ "description": "Whether participant names are hidden from other participants",+ "example": false+ },+ "hideScores": {+ "type": "boolean",+ "description": "Whether vote counts are hidden from participants",+ "example": false+ },+ "disableComments": {+ "type": "boolean",+ "description": "Whether the comments section is disabled",+ "example": true+ },+ "allowTentativeVotes": {+ "type": "boolean",+ "description": "Whether participants may cast the tentative \"if need be\" vote",+ "example": true+ },+ "participantCount": {+ "type": "integer",+ "minimum": 0,+ "maximum": 9007199254740991,+ "description": "Number of participants who have responded to the poll",+ "example": 3+ },+ "options": {+ "type": "array",+ "items": {+ "$ref": "#/components/schemas/PollOption"+ }+ },+ "adminUrl": {+ "type": "string",+ "example": "https://app.rallly.co/poll/Xk3pQ9vLm2Ab"+ },+ "inviteUrl": {+ "type": "string",+ "example": "https://rallly.co/invite/Xk3pQ9vLm2Ab"+ }+ },+ "required": [+ "id",+ "title",+ "description",+ "location",+ "timeZone",+ "status",+ "kind",+ "createdAt",+ "updatedAt",+ "organizer",+ "requireEmail",+ "hideParticipants",+ "hideScores",+ "disableComments",+ "allowTentativeVotes",+ "participantCount",+ "options",+ "adminUrl",+ "inviteUrl"+ ]+ },+ "PollStatus": {+ "type": "string",+ "enum": [+ "open",+ "closed",+ "scheduled",+ "canceled"+ ]+ },+ "PollKind": {+ "type": "string",+ "enum": [+ "date",+ "time"+ ],+ "description": "Whether the poll offers calendar dates (`date`) or time slots (`time`). Determines which option shape the poll uses: every option in a `date` poll has a `date`, every option in a `time` poll has a `startTime` and `duration`.",+ "example": "time"+ },+ "PollOrganizer": {+ "type": "object",+ "properties": {+ "id": {+ "type": "string",+ "example": "cm3f7d1qa0000t2k9c6b8h4jr"+ },+ "name": {+ "type": "string",+ "example": "John Doe"+ },+ "email": {+ "type": "string",+ "format": "email",+ "example": "[email protected]"+ },+ "image": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ],+ "example": "https://cdn.rallly.co/avatars/cm3f7d1qa0000t2k9c6b8h4jr.jpg"+ }+ },+ "required": [+ "id",+ "name",+ "email",+ "image"+ ]+ },+ "PollOption": {+ "anyOf": [+ {+ "$ref": "#/components/schemas/DateOption"+ },+ {+ "$ref": "#/components/schemas/TimeOption"+ }+ ],+ "description": "A poll option. The shape follows the poll's `kind`: a `DateOption` for `date` polls, a `TimeOption` for `time` polls."+ },+ "DateOption": {+ "type": "object",+ "properties": {+ "id": {+ "type": "string",+ "example": "cm5h8x2k40000q9l4f7e2d3an"+ },+ "date": {+ "type": "string",+ "format": "date",+ "description": "Calendar date in YYYY-MM-DD format. All-day options are floating dates with no time component and no timezone.",+ "example": "2025-01-15"+ }+ },+ "required": [+ "id",+ "date"+ ],+ "description": "An all-day option. Only present in polls with `kind: date`."+ },+ "TimeOption": {+ "type": "object",+ "properties": {+ "id": {+ "type": "string",+ "example": "cm5h8x2k40000q9l4f7e2d3an"+ },+ "startTime": {+ "type": "string",+ "format": "date-time",+ "description": "Start of the slot as an ISO 8601 instant in UTC.",+ "example": "2025-01-15T09:00:00.000Z"+ },+ "duration": {+ "type": "integer",+ "exclusiveMinimum": 0,+ "maximum": 9007199254740991,+ "description": "Duration in minutes.",+ "example": 30+ }+ },+ "required": [+ "id",+ "startTime",+ "duration"+ ],+ "description": "A time slot. Only present in polls with `kind: time`."+ },+ "PollResponse": {+ "type": "object",+ "properties": {+ "data": {+ "$ref": "#/components/schemas/Poll"+ }+ },+ "required": [+ "data"+ ]+ },+ "ErrorResponse": {+ "type": "object",+ "properties": {+ "error": {+ "type": "object",+ "properties": {+ "code": {+ "type": "string",+ "description": "Machine-readable error code. The full list is in the API description.",+ "example": "VALIDATION_ERROR"+ },+ "message": {+ "type": "string",+ "description": "Human-readable explanation. For `VALIDATION_ERROR` it names each offending field, e.g. `title: Invalid input: expected string, received undefined; dates.0: Invalid ISO date`.",+ "example": "title: Invalid input: expected string, received undefined"+ }+ },+ "required": [+ "code",+ "message"+ ]+ }+ },+ "required": [+ "error"+ ]+ },+ "CreateDatePollInput": {+ "type": "object",+ "properties": {+ "title": {+ "type": "string",+ "minLength": 1,+ "maxLength": 255,+ "example": "Team sync"+ },+ "kind": {+ "type": "string",+ "const": "date",+ "description": "Participants vote on whole days."+ },+ "description": {+ "example": "Pick a time that works for everyone",+ "type": "string",+ "maxLength": 1000+ },+ "location": {+ "example": "Zoom",+ "type": "string",+ "maxLength": 255+ },+ "requireEmail": {+ "description": "Require participants to provide their email address",+ "example": true,+ "type": "boolean"+ },+ "hideParticipants": {+ "description": "Hide participant names from other participants",+ "example": false,+ "type": "boolean"+ },+ "hideScores": {+ "description": "Hide vote counts from participants",+ "example": false,+ "type": "boolean"+ },+ "disableComments": {+ "description": "Disable the comments section. Defaults to true: new polls have comments disabled unless this is set to false.",+ "example": false,+ "type": "boolean"+ },+ "allowTentativeVotes": {+ "description": "Allow participants to answer \"if need be\" as well as yes and no. Defaults to true.",+ "example": true,+ "type": "boolean"+ },+ "organizer": {+ "description": "Organizer of the poll. Defaults to the space owner if not provided. The organizer must be a member of the space.",+ "type": "object",+ "properties": {+ "email": {+ "type": "string",+ "format": "email",+ "description": "Email address of the organizer",+ "example": "[email protected]"+ }+ },+ "required": [+ "email"+ ],+ "additionalProperties": false+ },+ "options": {+ "minItems": 1,+ "type": "array",+ "items": {+ "$ref": "#/components/schemas/DateOptionInput"+ },+ "description": "Calendar days to offer. Dates are floating calendar days with no timezone, so never convert them through one. Duplicates are removed."+ }+ },+ "required": [+ "title",+ "kind",+ "options"+ ],+ "additionalProperties": false,+ "title": "Date poll"+ },+ "DateOptionInput": {+ "type": "object",+ "properties": {+ "date": {+ "type": "string",+ "format": "date",+ "description": "Calendar day to offer, as a floating `YYYY-MM-DD` date.",+ "example": "2027-03-01"+ }+ },+ "required": [+ "date"+ ],+ "additionalProperties": false,+ "title": "Date option",+ "description": "One all-day option. The same shape `DateOption` returns."+ },+ "CreateTimePollInput": {+ "type": "object",+ "properties": {+ "title": {+ "type": "string",+ "minLength": 1,+ "maxLength": 255,+ "example": "Team sync"+ },+ "kind": {+ "type": "string",+ "const": "time",+ "description": "Participants vote on time slots."+ },+ "description": {+ "example": "Pick a time that works for everyone",+ "type": "string",+ "maxLength": 1000+ },+ "location": {+ "example": "Zoom",+ "type": "string",+ "maxLength": 255+ },+ "requireEmail": {+ "description": "Require participants to provide their email address",+ "example": true,+ "type": "boolean"+ },+ "hideParticipants": {+ "description": "Hide participant names from other participants",+ "example": false,+ "type": "boolean"+ },+ "hideScores": {+ "description": "Hide vote counts from participants",+ "example": false,+ "type": "boolean"+ },+ "disableComments": {+ "description": "Disable the comments section. Defaults to true: new polls have comments disabled unless this is set to false.",+ "example": false,+ "type": "boolean"+ },+ "allowTentativeVotes": {+ "description": "Allow participants to answer \"if need be\" as well as yes and no. Defaults to true.",+ "example": true,+ "type": "boolean"+ },+ "organizer": {+ "description": "Organizer of the poll. Defaults to the space owner if not provided. The organizer must be a member of the space.",+ "type": "object",+ "properties": {+ "email": {+ "type": "string",+ "format": "email",+ "description": "Email address of the organizer",+ "example": "[email protected]"+ }+ },+ "required": [+ "email"+ ],+ "additionalProperties": false+ },+ "timeZone": {+ "description": "IANA time zone the times are written in. Datetime strings without an offset are interpreted in this zone. If omitted, offset-less datetimes are floating times (no conversion) and the poll has no time zone.",+ "example": "Europe/London",+ "type": "string"+ },+ "duration": {+ "description": "Default slot length in minutes. Required when `generators` is set or an option omits its own `duration`.",+ "example": 30,+ "type": "integer",+ "minimum": 15,+ "maximum": 1440+ },+ "options": {+ "description": "Explicit slots. Provide `options`, `generators` or both. Duplicates are removed.",+ "minItems": 1,+ "type": "array",+ "items": {+ "$ref": "#/components/schemas/TimeOptionInput"+ }+ },+ "generators": {+ "description": "Slot generators. Each expands into recurring slots from a schedule and the result is appended to `options`.",+ "minItems": 1,+ "type": "array",+ "items": {+ "$ref": "#/components/schemas/SlotGenerator"+ }+ }+ },+ "required": [+ "title",+ "kind"+ ],+ "additionalProperties": false,+ "title": "Time poll"+ },+ "TimeOptionInput": {+ "type": "object",+ "properties": {+ "startTime": {+ "type": "string",+ "format": "date-time",+ "description": "ISO datetime start time. A string without an offset is wall clock time in `timeZone` when that is set (`2027-03-01T09:00:00` with `timeZone: Europe/London` means 09:00 in London) and a floating time with no conversion otherwise. A string with an offset or `Z` is an absolute instant.",+ "example": "2027-03-01T09:00:00"+ },+ "duration": {+ "description": "Length of this slot in minutes. Defaults to the poll's `duration`.",+ "example": 30,+ "type": "integer",+ "minimum": 15,+ "maximum": 1440+ }+ },+ "required": [+ "startTime"+ ],+ "additionalProperties": false,+ "title": "Time option",+ "description": "One time slot. The same shape `TimeOption` returns."+ },+ "SlotGenerator": {+ "type": "object",+ "properties": {+ "startDate": {+ "type": "string",+ "format": "date",+ "description": "First day of the range to generate slots on, inclusive.",+ "example": "2027-03-01"+ },+ "endDate": {+ "type": "string",+ "format": "date",+ "description": "Last day of the range, inclusive. The range must span fewer than 366 days.",+ "example": "2027-03-05"+ },+ "days": {+ "default": [+ "mon",+ "tue",+ "wed",+ "thu",+ "fri",+ "sat",+ "sun"+ ],+ "description": "Days of the week to generate slots on. Days in the range that are not listed are skipped. Defaults to every day.",+ "example": [+ "mon",+ "tue",+ "wed",+ "thu",+ "fri"+ ],+ "minItems": 1,+ "type": "array",+ "items": {+ "type": "string",+ "enum": [+ "mon",+ "tue",+ "wed",+ "thu",+ "fri",+ "sat",+ "sun"+ ]+ }+ },+ "from": {+ "type": "string",+ "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$",+ "description": "Earliest slot start on each day, as a wall clock time in `timeZone`.",+ "example": "09:00"+ },+ "to": {+ "type": "string",+ "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$",+ "description": "End of the daily window, as a wall clock time in `timeZone`. A slot is only generated if it ends at or before this time.",+ "example": "17:00"+ },+ "interval": {+ "description": "Minutes between consecutive slot starts. Defaults to `duration`, which produces back to back slots.",+ "example": 60,+ "type": "integer",+ "minimum": 15,+ "maximum": 1440+ }+ },+ "required": [+ "startDate",+ "endDate",+ "from",+ "to"+ ],+ "additionalProperties": false,+ "title": "Slot generator",+ "description": "Expands into one slot of `duration` minutes every `interval` minutes between `from` and `to`, on each listed day of the week between `startDate` and `endDate`. Slots that would not end by `to` are not generated."+ },+ "CreatePollInput": {+ "oneOf": [+ {+ "$ref": "#/components/schemas/CreateDatePollInput"+ },+ {+ "$ref": "#/components/schemas/CreateTimePollInput"+ }+ ],+ "description": "`kind` chooses what participants vote on: whole days (`date`) or time slots (`time`). The request mirrors the poll the API returns: the same settings, and `options` in the same shape as the response.",+ "discriminator": {+ "propertyName": "kind",+ "mapping": {+ "date": "#/components/schemas/CreateDatePollInput",+ "time": "#/components/schemas/CreateTimePollInput"+ }+ }+ },+ "ListPollsResponse": {+ "type": "object",+ "properties": {+ "data": {+ "type": "array",+ "items": {+ "$ref": "#/components/schemas/Poll"+ }+ },+ "nextCursor": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ],+ "description": "Cursor to fetch the next page. `null` when there are no more results.",+ "example": "Xk3pQ9vLm2Ab"+ }+ },+ "required": [+ "data",+ "nextCursor"+ ]+ },+ "PatchPollInput": {+ "type": "object",+ "properties": {+ "status": {+ "description": "The status to transition the poll to. Only `closed` is currently accepted; the other statuses are reserved for future transitions.",+ "example": "closed",+ "$ref": "#/components/schemas/PollStatus"+ }+ },+ "required": [+ "status"+ ],+ "additionalProperties": false+ },+ "OptionResult": {+ "anyOf": [+ {+ "$ref": "#/components/schemas/DateOptionResult"+ },+ {+ "$ref": "#/components/schemas/TimeOptionResult"+ }+ ],+ "description": "Results for one option. The shape follows the poll's `kind`: a `DateOptionResult` for `date` polls, a `TimeOptionResult` for `time` polls."+ },+ "DateOptionResult": {+ "type": "object",+ "properties": {+ "id": {+ "type": "string",+ "example": "cm5h8x2k40000q9l4f7e2d3an"+ },+ "date": {+ "type": "string",+ "format": "date",+ "description": "Calendar date in YYYY-MM-DD format. All-day options are floating dates with no time component and no timezone.",+ "example": "2025-01-15"+ },+ "votes": {+ "type": "array",+ "items": {+ "$ref": "#/components/schemas/VoteCount"+ },+ "description": "One entry per vote type the poll offers, in display order, always present with `count: 0` when nobody chose it."+ },+ "score": {+ "type": "integer",+ "minimum": 0,+ "maximum": 9007199254740991,+ "description": "Opaque ranking value: higher is better. Only comparable between options in the same response. The formula is not part of the contract and may change; do not decode it into vote counts, compare it across polls or threshold on it. Use `votes` for counts.",+ "example": 5004+ },+ "isTopChoice": {+ "type": "boolean",+ "description": "Whether this option has the highest `score` in the poll. Several options share the flag when they tie. Always `false` when nobody has voted.",+ "example": true+ }+ },+ "required": [+ "id",+ "date",+ "votes",+ "score",+ "isTopChoice"+ ],+ "description": "Results for an all-day option. Only present in polls with `kind: date`."+ },+ "VoteCount": {+ "type": "object",+ "properties": {+ "type": {+ "$ref": "#/components/schemas/VoteType"+ },+ "count": {+ "type": "integer",+ "minimum": 0,+ "maximum": 9007199254740991,+ "description": "Number of participants who gave this answer.",+ "example": 3+ }+ },+ "required": [+ "type",+ "count"+ ]+ },+ "VoteType": {+ "type": "string",+ "description": "A participant's answer for an option. The built-in types are `yes` (available), `ifNeedBe` (available if needed) and `no` (unavailable). New types may be added without a version change, so treat unknown values as a vote of an unfamiliar type rather than an error.",+ "example": "yes"+ },+ "TimeOptionResult": {+ "type": "object",+ "properties": {+ "id": {+ "type": "string",+ "example": "cm5h8x2k40000q9l4f7e2d3an"+ },+ "startTime": {+ "type": "string",+ "format": "date-time",+ "description": "Start of the slot as an ISO 8601 instant in UTC.",+ "example": "2025-01-15T09:00:00.000Z"+ },+ "duration": {+ "type": "integer",+ "exclusiveMinimum": 0,+ "maximum": 9007199254740991,+ "description": "Duration in minutes.",+ "example": 30+ },+ "votes": {+ "type": "array",+ "items": {+ "$ref": "#/components/schemas/VoteCount"+ },+ "description": "One entry per vote type the poll offers, in display order, always present with `count: 0` when nobody chose it."+ },+ "score": {+ "type": "integer",+ "minimum": 0,+ "maximum": 9007199254740991,+ "description": "Opaque ranking value: higher is better. Only comparable between options in the same response. The formula is not part of the contract and may change; do not decode it into vote counts, compare it across polls or threshold on it. Use `votes` for counts.",+ "example": 5004+ },+ "isTopChoice": {+ "type": "boolean",+ "description": "Whether this option has the highest `score` in the poll. Several options share the flag when they tie. Always `false` when nobody has voted.",+ "example": true+ }+ },+ "required": [+ "id",+ "startTime",+ "duration",+ "votes",+ "score",+ "isTopChoice"+ ],+ "description": "Results for a time slot. Only present in polls with `kind: time`."+ },+ "GetPollResultsResponse": {+ "type": "object",+ "properties": {+ "data": {+ "type": "object",+ "properties": {+ "pollId": {+ "type": "string",+ "example": "Xk3pQ9vLm2Ab"+ },+ "kind": {+ "$ref": "#/components/schemas/PollKind"+ },+ "status": {+ "description": "Current poll status. Polls close automatically when all options are in the past.",+ "example": "open",+ "$ref": "#/components/schemas/PollStatus"+ },+ "participantCount": {+ "type": "integer",+ "minimum": 0,+ "maximum": 9007199254740991,+ "description": "Total number of participants",+ "example": 8+ },+ "options": {+ "type": "array",+ "items": {+ "$ref": "#/components/schemas/OptionResult"+ }+ },+ "highScore": {+ "type": "integer",+ "minimum": 0,+ "maximum": 9007199254740991,+ "description": "The highest `score` among the options. Opaque like `score`: use it to identify the leading options, not as a measurement.",+ "example": 5004+ }+ },+ "required": [+ "pollId",+ "kind",+ "status",+ "participantCount",+ "options",+ "highScore"+ ]+ }+ },+ "required": [+ "data"+ ]+ },+ "Participant": {+ "type": "object",+ "properties": {+ "id": {+ "type": "string",+ "example": "cm5j2r8wb0003q9l4a1x6p0zt"+ },+ "name": {+ "type": "string",+ "example": "Jane Smith"+ },+ "email": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ],+ "example": "[email protected]"+ },+ "createdAt": {+ "type": "string",+ "format": "date-time",+ "example": "2025-01-10T12:00:00.000Z"+ }+ },+ "required": [+ "id",+ "name",+ "email",+ "createdAt"+ ]+ },+ "GetPollParticipantsResponse": {+ "type": "object",+ "properties": {+ "data": {+ "type": "array",+ "items": {+ "$ref": "#/components/schemas/Participant"+ }+ },+ "nextCursor": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ],+ "description": "Cursor to fetch the next page. `null` when there are no more results.",+ "example": "cm5j2r8wb0003q9l4a1x6p0zt"+ }+ },+ "required": [+ "data",+ "nextCursor"+ ]+ },+ "DeletePollResponse": {+ "type": "object",+ "properties": {+ "data": {+ "type": "object",+ "properties": {+ "id": {+ "type": "string",+ "example": "Xk3pQ9vLm2Ab"+ },+ "deleted": {+ "type": "boolean",+ "const": true,+ "example": true+ }+ },+ "required": [+ "id",+ "deleted"+ ]+ }+ },+ "required": [+ "data"+ ]+ }+ }+ },+ "paths": {+ "/v1/polls": {+ "post": {+ "operationId": "postV1Polls",+ "tags": [+ "Polls"+ ],+ "summary": "Create a poll",+ "description": "Creates a poll and responds with `201 Created` and the full poll, exactly as `GET /polls/:pollId` returns it. Share `inviteUrl` with participants. The request mirrors the response: `kind` chooses what participants vote on, and `options` takes the same shape the poll returns, so a poll can be recreated from the body of a `GET`. A poll has at most 100 options.\n\n## Date poll\n\nPass `kind: \"date\"` and `options`, one `{ \"date\": \"YYYY-MM-DD\" }` per day. Each becomes one all-day option. Dates are floating calendar days with no timezone, so never convert them through one. Duplicate dates are removed.\n\n```json\n{\n \"title\": \"Team offsite\",\n \"kind\": \"date\",\n \"options\": [{ \"date\": \"2027-03-01\" }, { \"date\": \"2027-03-02\" }, { \"date\": \"2027-03-03\" }]\n}\n```\n\n## Time poll\n\nPass `kind: \"time\"`, optionally a `timeZone` (an IANA zone the times are written in) and a default `duration` in minutes, and the slots as `options`, `generators` or both.\n\n### Explicit slots\n\nEach entry in `options` is one slot: a `startTime` and an optional `duration` that overrides the poll default. A `startTime` with no offset, like `2027-03-01T09:00:00`, is wall clock time in `timeZone` when that is set and a floating time with no conversion otherwise; one with an offset or `Z` is an absolute instant.\n\n```json\n{\n \"title\": \"Kickoff\",\n \"kind\": \"time\",\n \"timeZone\": \"Europe/London\",\n \"duration\": 60,\n \"options\": [\n { \"startTime\": \"2027-03-01T09:00:00\" },\n { \"startTime\": \"2027-03-02T14:00:00\", \"duration\": 90 }\n ]\n}\n```\n\n### Slot generators\n\nEach object in `generators` expands into recurring slots of `duration` minutes from a schedule, so availability across days or weeks does not have to be listed slot by slot. `duration` is required when `generators` is set.\n\n```json\n{\n \"title\": \"Interview availability\",\n \"kind\": \"time\",\n \"timeZone\": \"America/New_York\",\n \"duration\": 30,\n \"generators\": [\n {\n \"startDate\": \"2027-03-01\",\n \"endDate\": \"2027-03-05\",\n \"days\": [\"mon\", \"tue\", \"wed\", \"thu\", \"fri\"],\n \"from\": \"09:00\",\n \"to\": \"12:00\",\n \"interval\": 60\n }\n ]\n}\n```\n\nThis produces 30 minute slots at 09:00, 10:00 and 11:00 New York time on each weekday from 1 to 5 March, fifteen options in all. Drop `interval` and the window fills with back to back slots at 09:00, 09:30, 10:00, 10:30, 11:00 and 11:30.\n\n| Field | Meaning |\n| --- | --- |\n| `startDate`, `endDate` | The date range, inclusive. Fewer than 366 days. |\n| `days` | Days of the week to include: `mon` to `sun`. Optional; defaults to every day. |\n| `from` | Earliest slot start on each day, `HH:mm` in `timeZone`. |\n| `to` | End of the daily window, `HH:mm` in `timeZone`. A slot is only generated if it ends by this time. Must be later than `from`. |\n| `interval` | Minutes between slot starts. Optional; defaults to `duration`, which gives back to back slots. |\n\nA generator that cannot produce a slot is rejected with `VALIDATION_ERROR` naming the field: `to` not later than `from`, a window shorter than `duration`, or a range that contains none of the listed days. Generators are expanded when the poll is created, the result is appended to `options`, and duplicate slots are removed. A request that would exceed 100 options fails with `TOO_MANY_OPTIONS`.",+ "security": [+ {+ "bearerAuth": []+ }+ ],+ "responses": {+ "201": {+ "description": "Poll created",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/PollResponse"+ }+ }+ }+ },+ "400": {+ "description": "Invalid input",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "401": {+ "description": "The API key is missing, invalid, expired or revoked, or its owner is banned. Includes a `WWW-Authenticate` header.",+ "headers": {+ "WWW-Authenticate": {+ "description": "The bearer challenge, per RFC 6750.",+ "schema": {+ "type": "string"+ }+ }+ },+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "403": {+ "description": "The space associated with the API key does not have a Pro subscription",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "429": {+ "description": "Rate limit exceeded. Includes a `Retry-After` header indicating how many seconds to wait before retrying.",+ "headers": {+ "Retry-After": {+ "description": "Seconds to wait before retrying the request.",+ "schema": {+ "type": "integer"+ }+ }+ },+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "503": {+ "description": "The API is temporarily unavailable, for maintenance or because the rate limit store cannot be reached. Includes a `Retry-After` header. Maintenance responses are sent before the rate limiter runs and carry no `RateLimit-*` headers.",+ "headers": {+ "Retry-After": {+ "description": "Seconds to wait before retrying the request.",+ "schema": {+ "type": "integer"+ }+ }+ },+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ }+ },+ "requestBody": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/CreatePollInput"+ },+ "examples": {+ "Date poll": {+ "summary": "Date poll (all-day options)",+ "description": "Let participants pick between calendar days. Each option is one all-day date.",+ "value": {+ "title": "Team offsite",+ "kind": "date",+ "description": "Which days work for a two day offsite?",+ "options": [+ {+ "date": "2027-03-01"+ },+ {+ "date": "2027-03-02"+ },+ {+ "date": "2027-03-03"+ }+ ]+ }+ },+ "Time poll with explicit slots": {+ "summary": "Time poll (explicit slots)",+ "description": "Offer specific time slots. Datetimes without an offset are wall clock times in `timeZone`; this example offers 09:00 and 14:00 in London. Append `Z` or an offset for an absolute instant instead. A slot may override the poll's `duration`.",+ "value": {+ "title": "Project kickoff",+ "kind": "time",+ "location": "Zoom",+ "timeZone": "Europe/London",+ "duration": 60,+ "options": [+ {+ "startTime": "2027-03-01T09:00:00"+ },+ {+ "startTime": "2027-03-01T14:00:00",+ "duration": 90+ }+ ]+ }+ },+ "Time poll with a slot generator": {+ "summary": "Time poll (slot generator)",+ "description": "Expand recurring slots across a date range. This example generates 30 minute slots at 09:00, 10:00 and 11:00 (New York time) every weekday from 1 to 5 March.",+ "value": {+ "title": "Interview availability",+ "kind": "time",+ "timeZone": "America/New_York",+ "duration": 30,+ "generators": [+ {+ "startDate": "2027-03-01",+ "endDate": "2027-03-05",+ "days": [+ "mon",+ "tue",+ "wed",+ "thu",+ "fri"+ ],+ "from": "09:00",+ "to": "12:00",+ "interval": 60+ }+ ]+ }+ },+ "Time poll mixing slots and a generator": {+ "summary": "Time poll (explicit slots + generator)",+ "description": "`options` and `generators` combine. When `interval` is omitted it defaults to `duration`, so this generator produces back to back 90 minute slots at 14:00 and 15:30 on Monday and Wednesday.",+ "value": {+ "title": "Product workshop",+ "kind": "time",+ "timeZone": "Europe/Berlin",+ "duration": 90,+ "options": [+ {+ "startTime": "2027-03-06T10:00:00"+ }+ ],+ "generators": [+ {+ "startDate": "2027-03-08",+ "endDate": "2027-03-10",+ "days": [+ "mon",+ "wed"+ ],+ "from": "14:00",+ "to": "17:00"+ }+ ]+ }+ }+ }+ }+ }+ }+ },+ "get": {+ "operationId": "getV1Polls",+ "tags": [+ "Polls"+ ],+ "summary": "List polls",+ "description": "Lists the polls in the space associated with the API key, sorted by creation date (newest first).\n\nUse the `status` query parameter to only return polls in a given state — for example `status=open` to sweep polls that are still collecting responses. Results are paginated with a cursor: pass the `nextCursor` value from the previous response to fetch the next page.",+ "security": [+ {+ "bearerAuth": []+ }+ ],+ "responses": {+ "200": {+ "description": "Successful response",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ListPollsResponse"+ }+ }+ }+ },+ "400": {+ "description": "Invalid query parameters",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "401": {+ "description": "The API key is missing, invalid, expired or revoked, or its owner is banned. Includes a `WWW-Authenticate` header.",+ "headers": {+ "WWW-Authenticate": {+ "description": "The bearer challenge, per RFC 6750.",+ "schema": {+ "type": "string"+ }+ }+ },+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "403": {+ "description": "The space associated with the API key does not have a Pro subscription",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "429": {+ "description": "Rate limit exceeded. Includes a `Retry-After` header indicating how many seconds to wait before retrying.",+ "headers": {+ "Retry-After": {+ "description": "Seconds to wait before retrying the request.",+ "schema": {+ "type": "integer"+ }+ }+ },+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "503": {+ "description": "The API is temporarily unavailable, for maintenance or because the rate limit store cannot be reached. Includes a `Retry-After` header. Maintenance responses are sent before the rate limiter runs and carry no `RateLimit-*` headers.",+ "headers": {+ "Retry-After": {+ "description": "Seconds to wait before retrying the request.",+ "schema": {+ "type": "integer"+ }+ }+ },+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ }+ },+ "parameters": [+ {+ "in": "query",+ "name": "status",+ "schema": {+ "example": "open",+ "$ref": "#/components/schemas/PollStatus"+ },+ "description": "Filter polls by status. Omit to include all statuses."+ },+ {+ "in": "query",+ "name": "cursor",+ "schema": {+ "example": "Xk3pQ9vLm2Ab",+ "type": "string"+ },+ "description": "Cursor for pagination. Pass the `nextCursor` value from the previous response to fetch the next page."+ },+ {+ "in": "query",+ "name": "limit",+ "schema": {+ "default": 20,+ "example": 20,+ "type": "integer",+ "minimum": 1,+ "maximum": 100+ },+ "description": "Number of polls to return per page (1-100)."+ }+ ]+ }+ },+ "/v1/polls/{pollId}": {+ "get": {+ "operationId": "getV1PollsByPollId",+ "tags": [+ "Polls"+ ],+ "summary": "Get a poll",+ "description": "Retrieves a poll by ID with its options, settings, organizer and `participantCount`. The poll must belong to the space associated with the API key. Compare `updatedAt` between reads to notice changes.",+ "security": [+ {+ "bearerAuth": []+ }+ ],+ "responses": {+ "200": {+ "description": "Successful response",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/PollResponse"+ }+ }+ }+ },+ "401": {+ "description": "The API key is missing, invalid, expired or revoked, or its owner is banned. Includes a `WWW-Authenticate` header.",+ "headers": {+ "WWW-Authenticate": {+ "description": "The bearer challenge, per RFC 6750.",+ "schema": {+ "type": "string"+ }+ }+ },+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "403": {+ "description": "The space associated with the API key does not have a Pro subscription",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "404": {+ "description": "Poll not found",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "429": {+ "description": "Rate limit exceeded. Includes a `Retry-After` header indicating how many seconds to wait before retrying.",+ "headers": {+ "Retry-After": {+ "description": "Seconds to wait before retrying the request.",+ "schema": {+ "type": "integer"+ }+ }+ },+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "503": {+ "description": "The API is temporarily unavailable, for maintenance or because the rate limit store cannot be reached. Includes a `Retry-After` header. Maintenance responses are sent before the rate limiter runs and carry no `RateLimit-*` headers.",+ "headers": {+ "Retry-After": {+ "description": "Seconds to wait before retrying the request.",+ "schema": {+ "type": "integer"+ }+ }+ },+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ }+ },+ "parameters": [+ {+ "schema": {+ "type": "string"+ },+ "in": "path",+ "name": "pollId",+ "required": true+ }+ ]+ },+ "patch": {+ "operationId": "patchV1PollsByPollId",+ "tags": [+ "Polls"+ ],+ "summary": "Update a poll",+ "description": "Updates a poll's status. Currently the only supported transition is closing a poll by sending `{ \"status\": \"closed\" }`.\n\nClose a poll once you have picked a date or the poll is no longer needed. Closing is non-destructive — the poll and its responses are preserved — but the results become final and participants can no longer vote. Consumers polling `GET /polls/:pollId/results` should remove closed polls from their queues.\n\nClosing is idempotent: closing an already-closed poll returns a `200` with the poll unchanged. The other statuses (`open`, `scheduled`, `canceled`) are not available via the API and return `422`.",+ "security": [+ {+ "bearerAuth": []+ }+ ],+ "responses": {+ "200": {+ "description": "Poll updated successfully",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/PollResponse"+ }+ }+ }+ },+ "401": {+ "description": "The API key is missing, invalid, expired or revoked, or its owner is banned. Includes a `WWW-Authenticate` header.",+ "headers": {+ "WWW-Authenticate": {+ "description": "The bearer challenge, per RFC 6750.",+ "schema": {+ "type": "string"+ }+ }+ },+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "403": {+ "description": "The space associated with the API key does not have a Pro subscription",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "404": {+ "description": "Poll not found",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "422": {+ "description": "The requested status transition is not available",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "429": {+ "description": "Rate limit exceeded. Includes a `Retry-After` header indicating how many seconds to wait before retrying.",+ "headers": {+ "Retry-After": {+ "description": "Seconds to wait before retrying the request.",+ "schema": {+ "type": "integer"+ }+ }+ },+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "503": {+ "description": "The API is temporarily unavailable, for maintenance or because the rate limit store cannot be reached. Includes a `Retry-After` header. Maintenance responses are sent before the rate limiter runs and carry no `RateLimit-*` headers.",+ "headers": {+ "Retry-After": {+ "description": "Seconds to wait before retrying the request.",+ "schema": {+ "type": "integer"+ }+ }+ },+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ }+ },+ "requestBody": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/PatchPollInput"+ },+ "examples": {+ "Close the poll": {+ "summary": "Close a poll",+ "description": "Set `status` to `closed` once you have picked a date or no longer need the poll. Closing is idempotent and makes the results final.",+ "value": {+ "status": "closed"+ }+ }+ }+ }+ }+ },+ "parameters": [+ {+ "schema": {+ "type": "string"+ },+ "in": "path",+ "name": "pollId",+ "required": true+ }+ ]+ },+ "delete": {+ "operationId": "deleteV1PollsByPollId",+ "tags": [+ "Polls"+ ],+ "summary": "Delete a poll",+ "description": "Deletes a poll by ID. The poll must belong to the space associated with the API key.",+ "security": [+ {+ "bearerAuth": []+ }+ ],+ "responses": {+ "200": {+ "description": "Poll deleted successfully",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/DeletePollResponse"+ }+ }+ }+ },+ "401": {+ "description": "The API key is missing, invalid, expired or revoked, or its owner is banned. Includes a `WWW-Authenticate` header.",+ "headers": {+ "WWW-Authenticate": {+ "description": "The bearer challenge, per RFC 6750.",+ "schema": {+ "type": "string"+ }+ }+ },+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "403": {+ "description": "The space associated with the API key does not have a Pro subscription",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "404": {+ "description": "Poll not found",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "429": {+ "description": "Rate limit exceeded. Includes a `Retry-After` header indicating how many seconds to wait before retrying.",+ "headers": {+ "Retry-After": {+ "description": "Seconds to wait before retrying the request.",+ "schema": {+ "type": "integer"+ }+ }+ },+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "503": {+ "description": "The API is temporarily unavailable, for maintenance or because the rate limit store cannot be reached. Includes a `Retry-After` header. Maintenance responses are sent before the rate limiter runs and carry no `RateLimit-*` headers.",+ "headers": {+ "Retry-After": {+ "description": "Seconds to wait before retrying the request.",+ "schema": {+ "type": "integer"+ }+ }+ },+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ }+ },+ "parameters": [+ {+ "schema": {+ "type": "string"+ },+ "in": "path",+ "name": "pollId",+ "required": true+ }+ ]+ }+ },+ "/v1/polls/{pollId}/results": {+ "get": {+ "operationId": "getV1PollsByPollIdResults",+ "tags": [+ "Polls"+ ],+ "summary": "Get poll results",+ "description": "Retrieves aggregated voting results for a poll: vote counts per option without individual participant data. Use `GET /polls/:pollId/participants` to list who responded.\n\n`votes` lists every vote type the poll offers with its count, zero included. `score` is an opaque ranking value: sort by it to order options from best to worst, and use `isTopChoice` or `highScore` to find the leading options. Its formula is not part of the contract, so do not decode it, compare it across polls or threshold on it.",+ "security": [+ {+ "bearerAuth": []+ }+ ],+ "responses": {+ "200": {+ "description": "Successful response",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/GetPollResultsResponse"+ }+ }+ }+ },+ "401": {+ "description": "The API key is missing, invalid, expired or revoked, or its owner is banned. Includes a `WWW-Authenticate` header.",+ "headers": {+ "WWW-Authenticate": {+ "description": "The bearer challenge, per RFC 6750.",+ "schema": {+ "type": "string"+ }+ }+ },+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "403": {+ "description": "The space associated with the API key does not have a Pro subscription",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "404": {+ "description": "Poll not found",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "429": {+ "description": "Rate limit exceeded. Includes a `Retry-After` header indicating how many seconds to wait before retrying.",+ "headers": {+ "Retry-After": {+ "description": "Seconds to wait before retrying the request.",+ "schema": {+ "type": "integer"+ }+ }+ },+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "503": {+ "description": "The API is temporarily unavailable, for maintenance or because the rate limit store cannot be reached. Includes a `Retry-After` header. Maintenance responses are sent before the rate limiter runs and carry no `RateLimit-*` headers.",+ "headers": {+ "Retry-After": {+ "description": "Seconds to wait before retrying the request.",+ "schema": {+ "type": "integer"+ }+ }+ },+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ }+ },+ "parameters": [+ {+ "schema": {+ "type": "string"+ },+ "in": "path",+ "name": "pollId",+ "required": true+ }+ ]+ }+ },+ "/v1/polls/{pollId}/participants": {+ "get": {+ "operationId": "getV1PollsByPollIdParticipants",+ "tags": [+ "Polls"+ ],+ "summary": "List poll participants",+ "description": "Lists the participants of a poll, oldest response first. The poll must belong to the space associated with the API key.\n\nResults are paginated with a cursor: pass the `nextCursor` value from the previous response to fetch the next page. Per-option answers are not included; use the results endpoint for aggregate availability.",+ "security": [+ {+ "bearerAuth": []+ }+ ],+ "responses": {+ "200": {+ "description": "Successful response",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/GetPollParticipantsResponse"+ }+ }+ }+ },+ "400": {+ "description": "Invalid query parameters",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "401": {+ "description": "The API key is missing, invalid, expired or revoked, or its owner is banned. Includes a `WWW-Authenticate` header.",+ "headers": {+ "WWW-Authenticate": {+ "description": "The bearer challenge, per RFC 6750.",+ "schema": {+ "type": "string"+ }+ }+ },+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "403": {+ "description": "The space associated with the API key does not have a Pro subscription",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "404": {+ "description": "Poll not found",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "429": {+ "description": "Rate limit exceeded. Includes a `Retry-After` header indicating how many seconds to wait before retrying.",+ "headers": {+ "Retry-After": {+ "description": "Seconds to wait before retrying the request.",+ "schema": {+ "type": "integer"+ }+ }+ },+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "503": {+ "description": "The API is temporarily unavailable, for maintenance or because the rate limit store cannot be reached. Includes a `Retry-After` header. Maintenance responses are sent before the rate limiter runs and carry no `RateLimit-*` headers.",+ "headers": {+ "Retry-After": {+ "description": "Seconds to wait before retrying the request.",+ "schema": {+ "type": "integer"+ }+ }+ },+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ }+ },+ "parameters": [+ {+ "in": "query",+ "name": "cursor",+ "schema": {+ "example": "cm5j2r8wb0003q9l4a1x6p0zt",+ "type": "string"+ },+ "description": "Cursor for pagination. Pass the `nextCursor` value from the previous response to fetch the next page."+ },+ {+ "in": "query",+ "name": "limit",+ "schema": {+ "default": 50,+ "example": 50,+ "type": "integer",+ "minimum": 1,+ "maximum": 100+ },+ "description": "Number of participants to return per page (1-100)."+ },+ {+ "schema": {+ "type": "string"+ },+ "in": "path",+ "name": "pollId",+ "required": true+ }+ ]+ }+ }+ }+}diff --git a/apps/docs/api-reference/rate-limits.mdx b/apps/docs/api-reference/rate-limits.mdxnew file mode 100644index 000000000..b8885a61d--- /dev/null+++ b/apps/docs/api-reference/rate-limits.mdx@@ -0,0 +1,53 @@+---+title: "Rate limits"+description: "Per space request limits and how to back off."+---++All endpoints share two limits per space:++| Window | Limit |+| --- | --- |+| Per minute | 60 requests |+| Per day | 5,000 requests |++Both are fixed windows that open with the first request and reset when they expire. Limits apply to the space, not the key, so creating more keys does not increase throughput.++## Headers++Every response to an authenticated request carries the standard `RateLimit-*` headers:++| Header | Meaning |+| --- | --- |+| `RateLimit-Policy` | Both limits and their window lengths |+| `RateLimit-Limit` | The limit closest to being exhausted |+| `RateLimit-Remaining` | Requests left in that window |+| `RateLimit-Reset` | Seconds until that window resets |++Responses sent before the limiter runs, such as `401`, `403` and the maintenance `503`, do not include them.++## Exceeding a limit++When either limit is exhausted the API responds with `429 Too Many Requests`, a `RATE_LIMIT_EXCEEDED` error body and a `Retry-After` header with the number of seconds to wait.++```http+HTTP/1.1 429 Too Many Requests+Retry-After: 23+RateLimit-Limit: 60+RateLimit-Remaining: 0+RateLimit-Reset: 23+```++```json+{+ "error": {+ "code": "RATE_LIMIT_EXCEEDED",+ "message": "Rate limit exceeded. Retry after the time indicated in the Retry-After header."+ }+}+```++Wait for `Retry-After` before retrying. Do not retry on a fixed interval: a client that ignores the header spends its next window on requests that fail.++## Store outages++If the rate limit store cannot be reached the API fails closed and responds with `503 Service Unavailable`, a `SERVICE_UNAVAILABLE` error body and a `Retry-After` header.diff --git a/apps/docs/biome.json b/apps/docs/biome.jsonindex c4a672504..d0b913ca4 100644--- a/apps/docs/biome.json+++ b/apps/docs/biome.json@@ -1,4 +1,7 @@{"$schema": "https://biomejs.dev/schemas/2.3.14/schema.json",- "extends": "//"+ "extends": "//",+ "files": {+ "includes": ["**", "!!api-reference/openapi.json"]+ }}diff --git a/apps/docs/docs.json b/apps/docs/docs.jsonindex e769e3052..77e8fec7a 100644--- a/apps/docs/docs.json+++ b/apps/docs/docs.json@@ -73,6 +73,34 @@}]},+ {+ "tab": "API Reference",+ "groups": [+ {+ "group": "Getting started",+ "pages": [+ "api-reference/introduction",+ "api-reference/authentication",+ "api-reference/rate-limits",+ "api-reference/errors",+ "api-reference/changelog"+ ]+ },+ {+ "group": "Polls",+ "openapi": "/api-reference/openapi.json",+ "pages": [+ "POST /v1/polls",+ "GET /v1/polls",+ "GET /v1/polls/{pollId}",+ "PATCH /v1/polls/{pollId}",+ "DELETE /v1/polls/{pollId}",+ "GET /v1/polls/{pollId}/results",+ "GET /v1/polls/{pollId}/participants"+ ]+ }+ ]+ },{"tab": "Contribute","groups": [diff --git a/apps/docs/style.css b/apps/docs/style.cssindex 9bb0322bd..c00c89885 100644--- a/apps/docs/style.css+++ b/apps/docs/style.css@@ -52,3 +52,17 @@.dark .bg-primary-dark {background-color: rgb(132 126 237);}++/* Fenced code inside an OpenAPI operation description is rendered as shiki's+ raw dual-theme <pre> straight into the prose, carrying the light theme's+ inline background and colours. Mintlify's own code block wrapper applies+ the dark tokens on MDX pages but nothing does here, so apply the standard+ shiki dual-theme rule. The dark background is the same #0B0C0E Mintlify's+ wrapper uses. */+.dark #content-area .prose pre.shiki,+.dark #content-area .prose pre.shiki span {+ /* biome-ignore lint/complexity/noImportantStyles: the light colours are inline styles on the elements */+ background-color: var(--shiki-dark-bg) !important;+ /* biome-ignore lint/complexity/noImportantStyles: same */+ color: var(--shiki-dark) !important;+}diff --git a/apps/web/package.json b/apps/web/package.jsonindex b274e150c..5101fb69d 100644--- a/apps/web/package.json+++ b/apps/web/package.json@@ -11,6 +11,7 @@"type-check": "tsc --pretty --noEmit","i18n:scan": "i18next-cli extract","i18n:sync": "i18next-cli extract --sync-primary",+ "openapi:generate": "tsx scripts/generate-openapi.ts","test:integration": "playwright test","test:unit": "vitest run","test:codegen": "playwright codegen http://localhost:3000",@@ -127,6 +128,7 @@"dotenv": "^17.2.4","i18next-cli": "^1.58.1","jsdom": "^26.1.0",+ "tsx": "^4.6.2","vitest": "^4.1.11"}}diff --git a/apps/web/scripts/generate-openapi.ts b/apps/web/scripts/generate-openapi.tsnew file mode 100644index 000000000..bafc768e5--- /dev/null+++ b/apps/web/scripts/generate-openapi.ts@@ -0,0 +1,55 @@+import { mkdir, writeFile } from "node:fs/promises";+import Module from "node:module";+import path from "node:path";++// The committed spec is the production reference: the `servers` entry must+// point at the cloud app whatever machine runs this. Both must be set before+// the route module loads, so the import below is dynamic.+process.env.API_BASE_URL = "https://api.rallly.co";+process.env.NEXT_PUBLIC_BASE_URL = "https://app.rallly.co";+process.env.NEXT_PUBLIC_SHORT_BASE_URL = "https://rallly.co";+process.env.SKIP_ENV_VALIDATION = "1";+// The wide event middleware logs the spec request; keep stdout to the result.+process.env.LOG_LEVEL = "silent";++// `server-only` throws outside a React server bundle. Resolve it to an empty+// module here rather than running under the `react-server` condition, which+// also swaps React for a build without createContext and breaks anything in+// the route's import chain that touches next/navigation.+const moduleWithResolver = Module as unknown as {+ _resolveFilename: (request: string, ...rest: unknown[]) => string;+};+const resolveFilename = moduleWithResolver._resolveFilename;+moduleWithResolver._resolveFilename = function (request, ...rest) {+ if (request === "server-only") {+ return path.resolve(__dirname, "../src/test/empty-module.ts");+ }+ return resolveFilename.call(this, request, ...rest);+};++const outputPath = path.resolve(+ __dirname,+ "../../docs/api-reference/openapi.json",+);++async function main() {+ const { app } = await import("../src/app/api/v1/[...route]/route");++ const response = await app.request("/v1/openapi");+ if (!response.ok) {+ throw new Error(`Spec request failed with ${response.status}`);+ }+ const spec = await response.json();++ await mkdir(path.dirname(outputPath), { recursive: true });+ await writeFile(outputPath, `${JSON.stringify(spec, null, 2)}\n`);+ console.log(`Wrote ${path.relative(process.cwd(), outputPath)}`);+}++main().then(+ () => process.exit(0),+ (error) => {+ console.error(error);+ process.exit(1);+ },+);diff --git a/apps/web/src/app/api/v1/[...route]/route.test.ts b/apps/web/src/app/api/v1/[...route]/route.test.tsindex 1a3fc530f..e2a60b45b 100644--- a/apps/web/src/app/api/v1/[...route]/route.test.ts+++ b/apps/web/src/app/api/v1/[...route]/route.test.ts@@ -202,7 +202,8 @@ describe("API v1 - /polls", () => {headers: { "Content-Type": "application/json" },body: JSON.stringify({title: "Test Poll",- options: { kind: "date", dates: ["2025-01-15"] },+ kind: "date",+ options: [{ date: "2025-01-15" }],}),});@@ -221,7 +222,8 @@ describe("API v1 - /polls", () => {},body: JSON.stringify({title: "Test Poll",- options: { kind: "date", dates: ["2025-01-15"] },+ kind: "date",+ options: [{ date: "2025-01-15" }],}),});@@ -241,7 +243,8 @@ describe("API v1 - /polls", () => {},body: JSON.stringify({title: "Test Poll",- options: { kind: "date", dates: ["2025-01-15"] },+ kind: "date",+ options: [{ date: "2025-01-15" }],}),});@@ -261,7 +264,8 @@ describe("API v1 - /polls", () => {},body: JSON.stringify({title: "Test Poll",- options: { kind: "date", dates: ["2025-01-15"] },+ kind: "date",+ options: [{ date: "2025-01-15" }],}),});@@ -286,7 +290,8 @@ describe("API v1 - /polls", () => {},body: JSON.stringify({title: "Test Poll",- options: { kind: "date", dates: ["2025-01-15"] },+ kind: "date",+ options: [{ date: "2025-01-15" }],}),});@@ -312,7 +317,8 @@ describe("API v1 - /polls", () => {},body: JSON.stringify({title: "Test Poll",- options: { kind: "date", dates: ["2025-01-15"] },+ kind: "date",+ options: [{ date: "2025-01-15" }],}),});@@ -329,7 +335,8 @@ describe("API v1 - /polls", () => {},body: JSON.stringify({title: "Test Poll",- options: { kind: "date", dates: ["2025-01-15"] },+ kind: "date",+ options: [{ date: "2025-01-15" }],}),});@@ -352,7 +359,8 @@ describe("API v1 - /polls", () => {},body: JSON.stringify({title: "Verify your account",- options: { kind: "date", dates: ["2025-01-15"] },+ kind: "date",+ options: [{ date: "2025-01-15" }],}),});@@ -485,7 +493,8 @@ describe("API v1 - /polls", () => {},body: JSON.stringify({title: "Test Poll",- options: { kind: "date", dates: ["2025-01-15"] },+ kind: "date",+ options: [{ date: "2025-01-15" }],}),});@@ -518,7 +527,8 @@ describe("API v1 - /polls", () => {},body: JSON.stringify({title: "Test Poll",- options: { kind: "date", dates: ["2025-01-15"] },+ kind: "date",+ options: [{ date: "2025-01-15" }],}),});@@ -542,10 +552,12 @@ describe("API v1 - /polls", () => {},body: JSON.stringify({title: "Team offsite",- options: {- kind: "date",- dates: ["2025-01-15", "2025-01-16", "2025-01-17"],- },+ kind: "date",+ options: [+ { date: "2025-01-15" },+ { date: "2025-01-16" },+ { date: "2025-01-17" },+ ],}),});@@ -613,7 +625,8 @@ describe("API v1 - /polls", () => {},body: JSON.stringify({title: "Team offsite",- options: { kind: "date", dates: ["2025-01-15"] },+ kind: "date",+ options: [{ date: "2025-01-15" }],requireEmail: true,hideParticipants: true,hideScores: true,@@ -685,7 +698,8 @@ describe("API v1 - /polls", () => {},body: JSON.stringify({title: "Team offsite",- options: { kind: "date", dates: ["2025-01-15"] },+ kind: "date",+ options: [{ date: "2025-01-15" }],allowTentativeVotes: false,}),});@@ -708,7 +722,8 @@ describe("API v1 - /polls", () => {},body: JSON.stringify({title: "Team offsite",- options: { kind: "date", dates: ["2025-01-15"] },+ kind: "date",+ options: [{ date: "2025-01-15" }],}),});@@ -744,7 +759,8 @@ describe("API v1 - /polls", () => {body: JSON.stringify({title: "Team offsite",location: "Conference Room A",- options: { kind: "date", dates: ["2025-01-15"] },+ kind: "date",+ options: [{ date: "2025-01-15" }],}),});@@ -771,7 +787,8 @@ describe("API v1 - /polls", () => {},body: JSON.stringify({title: "Test Poll",- options: { kind: "date", dates },+ kind: "date",+ options: dates.map((date) => ({ date })),}),});@@ -780,7 +797,7 @@ describe("API v1 - /polls", () => {expect(json.error.code).toBe("TOO_MANY_OPTIONS");});- it("should return error when duplicate dates are provided", async () => {+ it("should remove duplicate dates instead of rejecting them", async () => {const res = await app.request("/v1/polls", {method: "POST",headers: {@@ -789,17 +806,26 @@ describe("API v1 - /polls", () => {},body: JSON.stringify({title: "Test Poll",- options: {- kind: "date",- dates: ["2025-01-15", "2025-01-16", "2025-01-15", "2025-01-17"],- },+ kind: "date",+ options: [+ { date: "2025-01-15" },+ { date: "2025-01-16" },+ { date: "2025-01-15" },+ { date: "2025-01-17" },+ ],}),});- expect(res.status).toBe(400);- const json = await res.json();- expect(json.error.code).toBe("DUPLICATE_DATES");- expect(json.error.message).toContain("Duplicate dates found");+ expect(res.status).toBe(201);+ expect(mockCreatePoll).toHaveBeenCalledWith(+ expect.objectContaining({+ options: [+ { startTime: new Date("2025-01-15T00:00:00.000Z"), duration: 0 },+ { startTime: new Date("2025-01-16T00:00:00.000Z"), duration: 0 },+ { startTime: new Date("2025-01-17T00:00:00.000Z"), duration: 0 },+ ],+ }),+ );});});@@ -813,12 +839,13 @@ describe("API v1 - /polls", () => {},body: JSON.stringify({title: "Team sync",- options: {- kind: "time",- duration: 30,- timeZone: "Europe/London",- times: ["2025-01-15T09:00:00Z", "2025-01-15T10:00:00Z"],- },+ kind: "time",+ duration: 30,+ timeZone: "Europe/London",+ options: [+ { startTime: "2025-01-15T09:00:00Z" },+ { startTime: "2025-01-15T10:00:00Z" },+ ],}),});@@ -875,12 +902,10 @@ describe("API v1 - /polls", () => {},body: JSON.stringify({title: "Team sync",- options: {- kind: "time",- duration: 30,- timeZone: "Europe/London",- times: ["2025-01-15T09:00:00Z"],- },+ kind: "time",+ duration: 30,+ timeZone: "Europe/London",+ options: [{ startTime: "2025-01-15T09:00:00Z" }],}),});@@ -912,11 +937,9 @@ describe("API v1 - /polls", () => {},body: JSON.stringify({title: "Team sync",- options: {- kind: "time",- duration: 30,- times: ["2025-01-15T09:00:00Z"],- },+ kind: "time",+ duration: 30,+ options: [{ startTime: "2025-01-15T09:00:00Z" }],}),});@@ -937,12 +960,10 @@ describe("API v1 - /polls", () => {},body: JSON.stringify({title: "Team sync",- options: {- kind: "time",- duration: 30,- timeZone: "Invalid/Timezone",- times: ["2025-01-15T09:00:00Z"],- },+ kind: "time",+ duration: 30,+ timeZone: "Invalid/Timezone",+ options: [{ startTime: "2025-01-15T09:00:00Z" }],}),});@@ -958,20 +979,18 @@ describe("API v1 - /polls", () => {},body: JSON.stringify({title: "Weekly standup",- options: {- kind: "time",- duration: 30,- timeZone: "Europe/London",- generators: [- {- startDate: "2025-01-20",- endDate: "2025-01-22",- days: ["mon", "tue", "wed"],- startTime: "09:00",- endTime: "10:00",- },- ],- },+ kind: "time",+ duration: 30,+ timeZone: "Europe/London",+ generators: [+ {+ startDate: "2025-01-20",+ endDate: "2025-01-22",+ days: ["mon", "tue", "wed"],+ from: "09:00",+ to: "10:00",+ },+ ],}),});@@ -992,20 +1011,18 @@ describe("API v1 - /polls", () => {},body: JSON.stringify({title: "Way too long",- options: {- kind: "time",- duration: 30,- timeZone: "Europe/London",- generators: [- {- startDate: "2025-01-01",- endDate: "2026-06-01",- days: ["sun"],- startTime: "09:00",- endTime: "09:30",- },- ],- },+ kind: "time",+ duration: 30,+ timeZone: "Europe/London",+ generators: [+ {+ startDate: "2025-01-01",+ endDate: "2026-06-01",+ days: ["sun"],+ from: "09:00",+ to: "09:30",+ },+ ],}),});@@ -1031,20 +1048,18 @@ describe("API v1 - /polls", () => {},body: JSON.stringify({title: "Reversed range",- options: {- kind: "time",- duration: 30,- timeZone: "Europe/London",- generators: [- {- startDate: "2025-06-01",- endDate: "2025-01-01",- days: ["mon"],- startTime: "09:00",- endTime: "10:00",- },- ],- },+ kind: "time",+ duration: 30,+ timeZone: "Europe/London",+ generators: [+ {+ startDate: "2025-06-01",+ endDate: "2025-01-01",+ days: ["mon"],+ from: "09:00",+ to: "10:00",+ },+ ],}),});@@ -1072,26 +1087,269 @@ describe("API v1 - /polls", () => {},body: JSON.stringify({title: "Boundary range",- options: {- kind: "time",- duration: 30,- timeZone: "Europe/London",- generators: [- {- startDate: toIsoDate(start),- endDate: toIsoDate(end),- days: ["sun"],- startTime: "09:00",- endTime: "09:30",- },- ],- },+ kind: "time",+ duration: 30,+ timeZone: "Europe/London",+ generators: [+ {+ startDate: toIsoDate(start),+ endDate: toIsoDate(end),+ days: ["sun"],+ from: "09:00",+ to: "09:30",+ },+ ],}),});expect(res.status).toBe(400);expect(mockCreatePoll).not.toHaveBeenCalled();});+ it("should let a slot override the poll duration", async () => {+ const res = await app.request("/v1/polls", {+ method: "POST",+ headers: {+ "Content-Type": "application/json",+ Authorization: `Bearer ${testApiKey}`,+ },+ body: JSON.stringify({+ title: "Team sync",+ kind: "time",+ duration: 30,+ options: [+ { startTime: "2025-01-15T09:00:00Z" },+ { startTime: "2025-01-15T10:00:00Z", duration: 45 },+ ],+ }),+ });++ expect(res.status).toBe(201);+ expect(mockCreatePoll).toHaveBeenCalledWith(+ expect.objectContaining({+ options: [+ { startTime: new Date("2025-01-15T09:00:00Z"), duration: 30 },+ { startTime: new Date("2025-01-15T10:00:00Z"), duration: 45 },+ ],+ }),+ );+ });++ it("should accept slots that each carry a duration when the poll has no default", async () => {+ const res = await app.request("/v1/polls", {+ method: "POST",+ headers: {+ "Content-Type": "application/json",+ Authorization: `Bearer ${testApiKey}`,+ },+ body: JSON.stringify({+ title: "Team sync",+ kind: "time",+ options: [{ startTime: "2025-01-15T09:00:00Z", duration: 45 }],+ }),+ });++ expect(res.status).toBe(201);+ expect(mockCreatePoll).toHaveBeenCalledWith(+ expect.objectContaining({+ options: [+ { startTime: new Date("2025-01-15T09:00:00Z"), duration: 45 },+ ],+ }),+ );+ });++ it("should name the slot that has no duration when the poll has no default", async () => {+ const res = await app.request("/v1/polls", {+ method: "POST",+ headers: {+ "Content-Type": "application/json",+ Authorization: `Bearer ${testApiKey}`,+ },+ body: JSON.stringify({+ title: "Team sync",+ kind: "time",+ options: [+ { startTime: "2025-01-15T09:00:00Z", duration: 45 },+ { startTime: "2025-01-15T10:00:00Z" },+ ],+ }),+ });++ const json = await expectErrorEnvelope(res, {+ status: 400,+ code: "VALIDATION_ERROR",+ });+ expect(json.error.message).toContain("options.1.duration");+ expect(mockCreatePoll).not.toHaveBeenCalled();+ });++ it("should require a poll duration when generators are used", async () => {+ const res = await app.request("/v1/polls", {+ method: "POST",+ headers: {+ "Content-Type": "application/json",+ Authorization: `Bearer ${testApiKey}`,+ },+ body: JSON.stringify({+ title: "Weekly standup",+ kind: "time",+ generators: [+ {+ startDate: "2025-01-20",+ endDate: "2025-01-22",+ from: "09:00",+ to: "10:00",+ },+ ],+ }),+ });++ const json = await expectErrorEnvelope(res, {+ status: 400,+ code: "VALIDATION_ERROR",+ });+ expect(json.error.message).toContain("duration");+ expect(mockCreatePoll).not.toHaveBeenCalled();+ });++ it("should require options or generators on a time poll", async () => {+ const res = await app.request("/v1/polls", {+ method: "POST",+ headers: {+ "Content-Type": "application/json",+ Authorization: `Bearer ${testApiKey}`,+ },+ body: JSON.stringify({+ title: "Team sync",+ kind: "time",+ duration: 30,+ }),+ });++ const json = await expectErrorEnvelope(res, {+ status: 400,+ code: "VALIDATION_ERROR",+ });+ expect(json.error.message).toContain("options");+ expect(mockCreatePoll).not.toHaveBeenCalled();+ });++ it("should default a generator to every day of the week", async () => {+ const res = await app.request("/v1/polls", {+ method: "POST",+ headers: {+ "Content-Type": "application/json",+ Authorization: `Bearer ${testApiKey}`,+ },+ body: JSON.stringify({+ title: "Any day",+ kind: "time",+ duration: 30,+ timeZone: "Europe/London",+ generators: [+ {+ // Saturday to Sunday+ startDate: "2025-01-18",+ endDate: "2025-01-19",+ from: "09:00",+ to: "09:30",+ },+ ],+ }),+ });++ expect(res.status).toBe(201);+ expect(mockCreatePoll).toHaveBeenCalledWith(+ expect.objectContaining({+ options: [+ { startTime: new Date("2025-01-18T09:00:00Z"), duration: 30 },+ { startTime: new Date("2025-01-19T09:00:00Z"), duration: 30 },+ ],+ }),+ );+ });++ it("should append generated slots to explicit ones and drop duplicates", async () => {+ const res = await app.request("/v1/polls", {+ method: "POST",+ headers: {+ "Content-Type": "application/json",+ Authorization: `Bearer ${testApiKey}`,+ },+ body: JSON.stringify({+ title: "Mixed",+ kind: "time",+ duration: 30,+ timeZone: "Europe/London",+ options: [{ startTime: "2025-01-20T09:00:00" }],+ generators: [+ {+ startDate: "2025-01-20",+ endDate: "2025-01-20",+ days: ["mon"],+ from: "09:00",+ to: "10:00",+ },+ ],+ }),+ });++ expect(res.status).toBe(201);+ expect(mockCreatePoll).toHaveBeenCalledWith(+ expect.objectContaining({+ options: [+ { startTime: new Date("2025-01-20T09:00:00Z"), duration: 30 },+ { startTime: new Date("2025-01-20T09:30:00Z"), duration: 30 },+ ],+ }),+ );+ });++ it.each([+ {+ reason: "the window ends before it starts",+ generator: { from: "12:00", to: "09:00" },+ path: "generators.0.to",+ },+ {+ reason: "the window is shorter than the duration",+ generator: { from: "09:00", to: "09:15" },+ path: "generators.0.to",+ },+ {+ reason: "the range contains none of the listed days",+ // 2025-01-20 to 2025-01-22 is Monday to Wednesday+ generator: { from: "09:00", to: "10:00", days: ["sat", "sun"] },+ path: "generators.0.days",+ },+ ])("should reject a generator at validation when $reason", async ({+ generator,+ path,+ }) => {+ const res = await app.request("/v1/polls", {+ method: "POST",+ headers: {+ "Content-Type": "application/json",+ Authorization: `Bearer ${testApiKey}`,+ },+ body: JSON.stringify({+ title: "Bad generator",+ kind: "time",+ duration: 30,+ timeZone: "Europe/London",+ generators: [+ { startDate: "2025-01-20", endDate: "2025-01-22", ...generator },+ ],+ }),+ });++ const json = await expectErrorEnvelope(res, {+ status: 400,+ code: "VALIDATION_ERROR",+ });+ expect(json.error.message).toContain(path);+ expect(mockCreatePoll).not.toHaveBeenCalled();+ });});describe("Validation", () => {@@ -1119,15 +1377,19 @@ describe("API v1 - /polls", () => {},body: JSON.stringify({title: "Test Poll",- options: {- kind: "date",- options: { kind: "date", dates: ["2025-01-15"] },- times: ["2025-01-15T09:00:00Z"],- },+ kind: "date",+ options: [{ date: "2025-01-15" }],+ timeZone: "Europe/London",+ duration: 30,}),});- expect(res.status).toBe(400);+ const json = await expectErrorEnvelope(res, {+ status: 400,+ code: "VALIDATION_ERROR",+ });+ expect(json.error.message).toContain("timeZone");+ expect(json.error.message).toContain("duration");});it("should return error when title is missing", async () => {@@ -1138,7 +1400,8 @@ describe("API v1 - /polls", () => {Authorization: `Bearer ${testApiKey}`,},body: JSON.stringify({- options: { kind: "date", dates: ["2025-01-15"] },+ kind: "date",+ options: [{ date: "2025-01-15" }],}),});@@ -1154,7 +1417,8 @@ describe("API v1 - /polls", () => {},body: JSON.stringify({title: "Test Poll",- options: { kind: "date", dates: ["2025-01-15"] },+ kind: "date",+ options: [{ date: "2025-01-15" }],spaceId: "some-other-space",}),});@@ -1172,44 +1436,41 @@ describe("API v1 - /polls", () => {level: "organizer",body: {title: "Test Poll",- options: { kind: "date", dates: ["2025-01-15"] },+ kind: "date",+ options: [{ date: "2025-01-15" }],organizer: { email: "[email protected]", name: "Ann" },},message: 'organizer: Unrecognized key: "name"',},{- level: "options",+ level: "time poll",body: {title: "Test Poll",- options: {- kind: "time",- duration: 30,- times: ["2025-01-15T09:00:00Z"],- timezone: "Europe/London",- },+ kind: "time",+ duration: 30,+ options: [{ startTime: "2025-01-15T09:00:00Z" }],+ timezone: "Europe/London",},- message: 'options: Unrecognized key: "timezone"',+ message: 'Unrecognized key: "timezone"',},{level: "slot generator",body: {title: "Test Poll",- options: {- kind: "time",- duration: 30,- generators: [- {- startDate: "2025-01-13",- endDate: "2025-01-17",- days: ["mon"],- startTime: "09:00",- endTime: "12:00",- step: 60,- },- ],- },+ kind: "time",+ duration: 30,+ generators: [+ {+ startDate: "2025-01-13",+ endDate: "2025-01-17",+ days: ["mon"],+ from: "09:00",+ to: "12:00",+ step: 60,+ },+ ],},- message: 'options.generators.0: Unrecognized key: "step"',+ message: 'generators.0: Unrecognized key: "step"',},])("should reject unknown fields nested in the $level object", async ({body,@@ -1241,7 +1502,8 @@ describe("API v1 - /polls", () => {},body: JSON.stringify({title: "x".repeat(MAX_POLL_TITLE_LENGTH + 1),- options: { kind: "date", dates: ["2025-01-15"] },+ kind: "date",+ options: [{ date: "2025-01-15" }],}),});@@ -1262,7 +1524,8 @@ describe("API v1 - /polls", () => {},body: JSON.stringify({title: "x".repeat(MAX_POLL_TITLE_LENGTH),- options: { kind: "date", dates: ["2025-01-15"] },+ kind: "date",+ options: [{ date: "2025-01-15" }],}),});@@ -1278,7 +1541,8 @@ describe("API v1 - /polls", () => {},body: JSON.stringify({title: "Test Poll",- options: { kind: "date", dates: [] },+ kind: "date",+ options: [],}),});@@ -1311,7 +1575,8 @@ describe("API v1 - /polls", () => {},body: JSON.stringify({title: "Forwarded through the prefix handler",- options: { kind: "date", dates: ["2027-03-01"] },+ kind: "date",+ options: [{ date: "2027-03-01" }],}),}),);@@ -1392,8 +1657,10 @@ describe("API v1 - /polls", () => {expect(Object.keys(schemas)).toEqual(expect.arrayContaining(["CreatePollInput",- "DateOptions",- "TimeOptions",+ "CreateDatePollInput",+ "CreateTimePollInput",+ "DateOptionInput",+ "TimeOptionInput","SlotGenerator","Poll","PollStatus",@@ -1417,16 +1684,33 @@ describe("API v1 - /polls", () => {json.paths["/v1/polls"].post.requestBody.content["application/json"].schema,).toEqual({ $ref: "#/components/schemas/CreatePollInput" });- expect(schemas.CreatePollInput.properties.options).toMatchObject({+ // The request body is a union keyed by kind, and each variant's+ // options mirror the response option shapes.+ expect(schemas.CreatePollInput).toMatchObject({oneOf: [- { $ref: "#/components/schemas/DateOptions" },- { $ref: "#/components/schemas/TimeOptions" },+ { $ref: "#/components/schemas/CreateDatePollInput" },+ { $ref: "#/components/schemas/CreateTimePollInput" },],discriminator: { propertyName: "kind" },});- expect(schemas.TimeOptions.properties.generators.items).toEqual({+ expect(schemas.CreateDatePollInput.properties.options.items).toEqual({+ $ref: "#/components/schemas/DateOptionInput",+ });+ expect(schemas.CreateTimePollInput.properties.options.items).toEqual({+ $ref: "#/components/schemas/TimeOptionInput",+ });+ expect(schemas.CreateTimePollInput.properties.generators.items).toEqual({$ref: "#/components/schemas/SlotGenerator",});+ expect(schemas.SlotGenerator.properties.days.default).toEqual([+ "mon",+ "tue",+ "wed",+ "thu",+ "fri",+ "sat",+ "sun",+ ]);// Contextual .meta() clones keep pointing at the shared component.const pollStatusRef = "#/components/schemas/PollStatus";@@ -1474,24 +1758,27 @@ describe("API v1 - /polls", () => {expect(createResponses["201"]).toBeDefined();expect(createResponses["200"]).toBeUndefined();- expect(schemas.CreatePollInput.additionalProperties).toBe(false);- expect(schemas.CreatePollInput.properties.spaceId).toBeUndefined();- expect(schemas.CreatePollInput.properties.title.maxLength).toBe(- MAX_POLL_TITLE_LENGTH,- );- expect(schemas.PatchPollInput.additionalProperties).toBe(false);-- // Input and output use the same setting names and organizer field.- for (const key of [- "requireEmail",- "hideParticipants",- "hideScores",- "disableComments",- "allowTentativeVotes",+ for (const variant of [+ schemas.CreateDatePollInput,+ schemas.CreateTimePollInput,]) {- expect(schemas.CreatePollInput.properties[key]).toBeDefined();- expect(schemas.Poll.properties[key]).toBeDefined();+ expect(variant.additionalProperties).toBe(false);+ expect(variant.properties.spaceId).toBeUndefined();+ expect(variant.properties.title.maxLength).toBe(MAX_POLL_TITLE_LENGTH);++ // Input and output use the same setting names and organizer field.+ for (const key of [+ "requireEmail",+ "hideParticipants",+ "hideScores",+ "disableComments",+ "allowTentativeVotes",+ ]) {+ expect(variant.properties[key]).toBeDefined();+ expect(schemas.Poll.properties[key]).toBeDefined();+ }}+ expect(schemas.PatchPollInput.additionalProperties).toBe(false);expect(schemas.Poll.properties.user).toBeUndefined();expect(schemas.Poll.properties.organizer).toMatchObject({anyOf: expect.arrayContaining([@@ -2762,7 +3049,8 @@ describe("API v1 - /polls", () => {method: "POST",headers: { ...authed, "Content-Type": "application/json" },body: JSON.stringify({- options: { kind: "date", dates: ["not-a-date"] },+ kind: "date",+ options: [{ date: "not-a-date" }],secret: "do-not-echo",}),});@@ -2772,7 +3060,7 @@ describe("API v1 - /polls", () => {code: "VALIDATION_ERROR",});expect(json.error.message).toContain("title:");- expect(json.error.message).toContain("options.dates.0:");+ expect(json.error.message).toContain("options.0.date:");expect(Object.keys(json.error).sort()).toEqual(["code", "message"]);expect(JSON.stringify(json)).not.toContain("do-not-echo");expect(json).not.toHaveProperty("success");@@ -2880,8 +3168,6 @@ describe("API v1 - /polls", () => {"POLL_NOT_FOUND","ORGANIZER_NOT_MEMBER","TOO_MANY_OPTIONS",- "DUPLICATE_DATES",- "NO_OPTIONS_GENERATED","TRANSITION_NOT_AVAILABLE","SERVICE_UNAVAILABLE","INTERNAL_ERROR",diff --git a/apps/web/src/app/api/v1/[...route]/route.ts b/apps/web/src/app/api/v1/[...route]/route.tsindex d92a1b71e..c02d0def6 100644--- a/apps/web/src/app/api/v1/[...route]/route.ts+++ b/apps/web/src/app/api/v1/[...route]/route.ts@@ -307,8 +307,6 @@ async function buildOpenApiSpec() {"| 400 | `ORGANIZER_NOT_MEMBER` | The organizer email is not a member of the space |","| 400 | `TOO_MANY_OPTIONS` | More than the maximum number of poll options |","| 400 | `INAPPROPRIATE_CONTENT` | The title, description or location was flagged by content moderation |",- "| 400 | `DUPLICATE_DATES` | `options.dates` contains the same date more than once |",- "| 400 | `NO_OPTIONS_GENERATED` | No slot generator produced a valid time slot |","| 401 | `UNAUTHORIZED` | The API key is missing, invalid, expired or revoked, or its owner is banned |","| 403 | `SPACE_NOT_PRO` | The space behind the key has no Pro subscription |","| 404 | `NOT_FOUND` | No route matches the method and path |",@@ -372,64 +370,61 @@ app.post(tags: ["Polls"],summary: "Create a poll",description: [- "Creates a poll and responds with `201 Created` and the full poll, exactly as `GET /polls/:pollId` returns it. Share `inviteUrl` with participants. `options.kind` chooses what participants vote on: whole days or time slots. A poll has at most 100 options.",+ "Creates a poll and responds with `201 Created` and the full poll, exactly as `GET /polls/:pollId` returns it. Share `inviteUrl` with participants. The request mirrors the response: `kind` chooses what participants vote on, and `options` takes the same shape the poll returns, so a poll can be recreated from the body of a `GET`. A poll has at most 100 options.","","## Date poll","",- 'Pass `kind: "date"` and `dates`, a list of `YYYY-MM-DD` values. Each becomes one all-day option. Dates are floating calendar days with no timezone, so never convert them through one. A repeated date fails with `DUPLICATE_DATES`.',+ 'Pass `kind: "date"` and `options`, one `{ "date": "YYYY-MM-DD" }` per day. Each becomes one all-day option. Dates are floating calendar days with no timezone, so never convert them through one. Duplicate dates are removed.',"","```json","{",' "title": "Team offsite",',- ' "options": {',- ' "kind": "date",',- ' "dates": ["2027-03-01", "2027-03-02", "2027-03-03"]',- " }",+ ' "kind": "date",',+ ' "options": [{ "date": "2027-03-01" }, { "date": "2027-03-02" }, { "date": "2027-03-03" }]',"}","```","","## Time poll","",- 'Pass `kind: "time"` with a `duration` in minutes that every slot shares, the slots themselves as `times`, `generators` or both, and optionally a `timeZone` (an IANA zone the times are written in).',+ 'Pass `kind: "time"`, optionally a `timeZone` (an IANA zone the times are written in) and a default `duration` in minutes, and the slots as `options`, `generators` or both.',"",- "### Explicit times",+ "### Explicit slots","",- "Each ISO datetime string in `times` becomes one slot starting at that moment. A time with no offset, like `2027-03-01T09:00:00`, is wall clock time in `timeZone` when that is set and a floating time with no conversion otherwise; a time with an offset or `Z` is an absolute instant.",+ "Each entry in `options` is one slot: a `startTime` and an optional `duration` that overrides the poll default. A `startTime` with no offset, like `2027-03-01T09:00:00`, is wall clock time in `timeZone` when that is set and a floating time with no conversion otherwise; one with an offset or `Z` is an absolute instant.","","```json","{",' "title": "Kickoff",',- ' "options": {',- ' "kind": "time",',- ' "duration": 60,',- ' "timeZone": "Europe/London",',- ' "times": ["2027-03-01T09:00:00", "2027-03-02T14:00:00"]',- " }",+ ' "kind": "time",',+ ' "timeZone": "Europe/London",',+ ' "duration": 60,',+ ' "options": [',+ ' { "startTime": "2027-03-01T09:00:00" },',+ ' { "startTime": "2027-03-02T14:00:00", "duration": 90 }',+ " ]","}","```","","### Slot generators","",- "Each object in `generators` expands into recurring slots from a schedule, so availability across days or weeks does not have to be listed slot by slot.",+ "Each object in `generators` expands into recurring slots of `duration` minutes from a schedule, so availability across days or weeks does not have to be listed slot by slot. `duration` is required when `generators` is set.","","```json","{",' "title": "Interview availability",',- ' "options": {',- ' "kind": "time",',- ' "duration": 30,',- ' "timeZone": "America/New_York",',- ' "generators": [',- " {",- ' "startDate": "2027-03-01",',- ' "endDate": "2027-03-05",',- ' "days": ["mon", "tue", "wed", "thu", "fri"],',- ' "startTime": "09:00",',- ' "endTime": "12:00",',- ' "interval": 60',- " }",- " ]",- " }",+ ' "kind": "time",',+ ' "timeZone": "America/New_York",',+ ' "duration": 30,',+ ' "generators": [',+ " {",+ ' "startDate": "2027-03-01",',+ ' "endDate": "2027-03-05",',+ ' "days": ["mon", "tue", "wed", "thu", "fri"],',+ ' "from": "09:00",',+ ' "to": "12:00",',+ ' "interval": 60',+ " }",+ " ]","}","```","",@@ -438,12 +433,12 @@ app.post("| Field | Meaning |","| --- | --- |","| `startDate`, `endDate` | The date range, inclusive. Fewer than 366 days. |",- "| `days` | Days of the week to include: `mon` to `sun`. Other days in the range are skipped. |",- "| `startTime` | Earliest slot start on each day, `HH:mm` in `timeZone`. |",- "| `endTime` | End of the daily window. A slot is only generated if it ends by this time. |",+ "| `days` | Days of the week to include: `mon` to `sun`. Optional; defaults to every day. |",+ "| `from` | Earliest slot start on each day, `HH:mm` in `timeZone`. |",+ "| `to` | End of the daily window, `HH:mm` in `timeZone`. A slot is only generated if it ends by this time. Must be later than `from`. |","| `interval` | Minutes between slot starts. Optional; defaults to `duration`, which gives back to back slots. |","",- "Generators are expanded when the poll is created and duplicate slots are removed. A request that would exceed 100 options fails with `TOO_MANY_OPTIONS`; a generator whose window fits no slot produces nothing, and if nothing in `times` or `generators` yields a slot the request fails with `NO_OPTIONS_GENERATED`.",+ "A generator that cannot produce a slot is rejected with `VALIDATION_ERROR` naming the field: `to` not later than `from`, a window shorter than `duration`, or a range that contains none of the listed days. Generators are expanded when the poll is created, the result is appended to `options`, and duplicate slots are removed. A request that would exceed 100 options fails with `TOO_MANY_OPTIONS`.",].join("\n"),security: [{ bearerAuth: [] }],responses: {@@ -456,7 +451,7 @@ app.post(},},400: {- description: "Invalid input or no valid options generated",+ description: "Invalid input",content: {"application/json": {schema: resolver(errorResponseSchema),@@ -567,10 +562,8 @@ app.post(after(() => flushPostHog());};- const optionsInput = input.options;-- if (optionsInput.kind === "date") {- const { dates } = optionsInput;+ if (input.kind === "date") {+ const dates = [...new Set(input.options.map((option) => option.date))];if (dates.length > MAX_POLL_OPTIONS) {return c.json(apiError(@@ -581,19 +574,7 @@ app.post();}- const uniqueDates = [...new Set(dates)];- if (uniqueDates.length < dates.length) {- const duplicateCount = dates.length - uniqueDates.length;- return c.json(- apiError(- "DUPLICATE_DATES",- `Duplicate dates found. Please remove ${duplicateCount} duplicate date${duplicateCount > 1 ? "s" : ""}.`,- ),- 400,- );- }-- const options = uniqueDates.map((date) => ({+ const options = dates.map((date) => ({startTime: new Date(`${date}T00:00:00.000Z`),duration: 0,}));@@ -617,33 +598,42 @@ app.post(return c.json(pollResponseSchema.parse(toPollResponseBody(poll)), 201);}- const timeZone = optionsInput.timeZone;- const duration = optionsInput.duration;+ const { timeZone } = input;+ // The schema guarantees a duration wherever it is read: every option+ // without its own carries the poll default, and generators require it.+ const defaultDuration = input.duration ?? 0;const timeSlots = [- ...(optionsInput.times ?? []).map((time) =>- parseStartTime(time, timeZone, duration),+ ...(input.options ?? []).map((option) =>+ parseStartTime(+ option.startTime,+ timeZone,+ option.duration ?? defaultDuration,+ ),),- ...(optionsInput.generators ?? []).flatMap((generator) => {+ ...(input.generators ?? []).flatMap((generator) => {const slotGenerator: SlotGeneratorInput = {startDate: generator.startDate,endDate: generator.endDate,daysOfWeek: generator.days,- fromTime: generator.startTime,- toTime: generator.endTime,+ fromTime: generator.from,+ toTime: generator.to,interval: generator.interval,};- return generateTimeSlots(slotGenerator, timeZone, duration);+ return generateTimeSlots(slotGenerator, timeZone, defaultDuration);}),];const options = dedupeTimeSlots(timeSlots);+ // Unreachable for inputs the schema accepts; guards the poll against an+ // expansion edge case (a window that vanishes on a DST change) rather+ // than creating it empty.if (!options.length) {return c.json(apiError(- "NO_OPTIONS_GENERATED",- "No valid options were generated. Check that your slot generators produce valid time slots.",+ "VALIDATION_ERROR",+ "generators: no slot fits the daily window on any listed day.",),400,);diff --git a/apps/web/src/app/api/v1/examples.ts b/apps/web/src/app/api/v1/examples.tsindex 073e28480..068e431e9 100644--- a/apps/web/src/app/api/v1/examples.ts+++ b/apps/web/src/app/api/v1/examples.ts@@ -8,29 +8,32 @@ export const createPollRequestExamples = {"Date poll": {summary: "Date poll (all-day options)",description:- "Let participants pick between calendar days. Each date becomes an all-day option.",+ "Let participants pick between calendar days. Each option is one all-day date.",value: {title: "Team offsite",+ kind: "date",description: "Which days work for a two day offsite?",- options: {- kind: "date",- dates: ["2027-03-01", "2027-03-02", "2027-03-03"],- },+ options: [+ { date: "2027-03-01" },+ { date: "2027-03-02" },+ { date: "2027-03-03" },+ ],} satisfies CreatePollInput,},- "Time poll with explicit times": {- summary: "Time poll (explicit times)",+ "Time poll with explicit slots": {+ summary: "Time poll (explicit slots)",description:- "Offer specific time slots. Datetimes without an offset are interpreted as wall-clock in `timeZone` — this example offers 09:00 and 14:00 in London. Append `Z` or an offset to specify an absolute instant instead.",+ "Offer specific time slots. Datetimes without an offset are wall clock times in `timeZone`; this example offers 09:00 and 14:00 in London. Append `Z` or an offset for an absolute instant instead. A slot may override the poll's `duration`.",value: {title: "Project kickoff",+ kind: "time",location: "Zoom",- options: {- kind: "time",- duration: 60,- timeZone: "Europe/London",- times: ["2027-03-01T09:00:00", "2027-03-01T14:00:00"],- },+ timeZone: "Europe/London",+ duration: 60,+ options: [+ { startTime: "2027-03-01T09:00:00" },+ { startTime: "2027-03-01T14:00:00", duration: 90 },+ ],} satisfies CreatePollInput,},"Time poll with a slot generator": {@@ -39,44 +42,40 @@ export const createPollRequestExamples = {"Expand recurring slots across a date range. This example generates 30 minute slots at 09:00, 10:00 and 11:00 (New York time) every weekday from 1 to 5 March.",value: {title: "Interview availability",- options: {- kind: "time",- duration: 30,- timeZone: "America/New_York",- generators: [- {- startDate: "2027-03-01",- endDate: "2027-03-05",- days: ["mon", "tue", "wed", "thu", "fri"],- startTime: "09:00",- endTime: "12:00",- interval: 60,- },- ],- },+ kind: "time",+ timeZone: "America/New_York",+ duration: 30,+ generators: [+ {+ startDate: "2027-03-01",+ endDate: "2027-03-05",+ days: ["mon", "tue", "wed", "thu", "fri"],+ from: "09:00",+ to: "12:00",+ interval: 60,+ },+ ],} satisfies CreatePollInput,},- "Time poll mixing times and a generator": {- summary: "Time poll (explicit times + generator)",+ "Time poll mixing slots and a generator": {+ summary: "Time poll (explicit slots + generator)",description:- "`times` and `generators` combine. When `interval` is omitted it defaults to `duration`, so this generator produces back to back 90 minute slots at 14:00 and 15:30 on Monday and Wednesday.",+ "`options` and `generators` combine. When `interval` is omitted it defaults to `duration`, so this generator produces back to back 90 minute slots at 14:00 and 15:30 on Monday and Wednesday.",value: {title: "Product workshop",- options: {- kind: "time",- duration: 90,- timeZone: "Europe/Berlin",- times: ["2027-03-06T10:00:00"],- generators: [- {- startDate: "2027-03-08",- endDate: "2027-03-10",- days: ["mon", "wed"],- startTime: "14:00",- endTime: "17:00",- },- ],- },+ kind: "time",+ timeZone: "Europe/Berlin",+ duration: 90,+ options: [{ startTime: "2027-03-06T10:00:00" }],+ generators: [+ {+ startDate: "2027-03-08",+ endDate: "2027-03-10",+ days: ["mon", "wed"],+ from: "14:00",+ to: "17:00",+ },+ ],} satisfies CreatePollInput,},};diff --git a/apps/web/src/app/api/v1/schemas.ts b/apps/web/src/app/api/v1/schemas.tsindex e29287b48..b6b7702a0 100644--- a/apps/web/src/app/api/v1/schemas.ts+++ b/apps/web/src/app/api/v1/schemas.ts@@ -13,6 +13,38 @@ export const timeSchema = z.iso.time({ precision: -1 }).meta({example: "09:30",});+const WEEKDAYS = ["mon", "tue", "wed", "thu", "fri", "sat", "sun"] as const;+type Weekday = (typeof WEEKDAYS)[number];++const DAY_MS = 24 * 60 * 60 * 1000;++const daySpan = (startDate: string, endDate: string) =>+ (Date.parse(endDate) - Date.parse(startDate)) / DAY_MS;++// A calendar date has the same weekday in every zone, so no zone is needed.+const rangeIncludesWeekday = (+ startDate: string,+ endDate: string,+ days: ReadonlyArray<Weekday>,+) => {+ const wanted = new Set(days.map((day) => WEEKDAYS.indexOf(day)));+ const start = Date.parse(startDate);+ const span = daySpan(startDate, endDate);+ for (let offset = 0; offset <= Math.min(span, 6); offset++) {+ // getUTCDay: 0 = Sunday; WEEKDAYS starts on Monday.+ const weekday = (new Date(start + offset * DAY_MS).getUTCDay() + 6) % 7;+ if (wanted.has(weekday)) return true;+ }+ return false;+};++const minutesOfDay = (time: string) => {+ const [hours, minutes] = time.split(":").map(Number);+ return hours * 60 + minutes;+};++const durationSchema = z.number().int().min(15).max(1440);+export const slotGeneratorSchema = z.strictObject({startDate: dateSchema.meta({@@ -25,24 +57,25 @@ export const slotGeneratorSchema = zexample: "2027-03-05",}),days: z- .array(z.enum(["mon", "tue", "wed", "thu", "fri", "sat", "sun"]))+ .array(z.enum(WEEKDAYS)).min(1)+ .default([...WEEKDAYS]).meta({description:- "Days of the week to generate slots on. Days in the range that are not listed are skipped.",+ "Days of the week to generate slots on. Days in the range that are not listed are skipped. Defaults to every day.",example: ["mon", "tue", "wed", "thu", "fri"],}),- startTime: timeSchema.meta({+ from: timeSchema.meta({description:"Earliest slot start on each day, as a wall clock time in `timeZone`.",example: "09:00",}),- endTime: timeSchema.meta({+ to: timeSchema.meta({description:- "End of the daily window. A slot is only generated if it ends at or before this time.",+ "End of the daily window, as a wall clock time in `timeZone`. A slot is only generated if it ends at or before this time.",example: "17:00",}),- interval: z.number().int().min(15).max(1440).optional().meta({+ interval: durationSchema.optional().meta({description:"Minutes between consecutive slot starts. Defaults to `duration`, which produces back to back slots.",example: 60,@@ -52,150 +85,235 @@ export const slotGeneratorSchema = z// generator's MAX_SLOT_GENERATION_DAYS cap..refine((data) => {- const start = Date.parse(data.startDate);- const end = Date.parse(data.endDate);- const spanDays = (end - start) / (1000 * 60 * 60 * 24);- return spanDays >= 0 && spanDays < MAX_SLOT_GENERATION_DAYS;+ const span = daySpan(data.startDate, data.endDate);+ return span >= 0 && span < MAX_SLOT_GENERATION_DAYS;},{message: `The date range must span fewer than ${MAX_SLOT_GENERATION_DAYS} days, with endDate on or after startDate.`,path: ["endDate"],},)+ .refine((data) => minutesOfDay(data.to) > minutesOfDay(data.from), {+ message: "Must be later than `from`. Windows cannot cross midnight.",+ path: ["to"],+ })+ .refine(+ (data) =>+ daySpan(data.startDate, data.endDate) < 0 ||+ rangeIncludesWeekday(data.startDate, data.endDate, data.days),+ {+ message: "None of the listed days fall between startDate and endDate.",+ path: ["days"],+ },+ ).meta({id: "SlotGenerator",title: "Slot generator",description:- "Expands into one slot of `duration` minutes every `interval` minutes between `startTime` and `endTime`, on each listed day of the week between `startDate` and `endDate`. Slots that would not end by `endTime` are not generated.",+ "Expands into one slot of `duration` minutes every `interval` minutes between `from` and `to`, on each listed day of the week between `startDate` and `endDate`. Slots that would not end by `to` are not generated.",});-const explicitTimeSchema = z.iso.datetime({ local: true, offset: true }).meta({- description:- "ISO datetime start time. A string without an offset is wall clock time in `timeZone` when that is set (`2027-03-01T09:00:00` with `timeZone: Europe/London` means 09:00 in London) and a floating time with no conversion otherwise. A string with an offset or `Z` is an absolute instant.",- example: "2027-03-01T09:00:00",-});--const dateOptionsSchema = z+const dateOptionInputSchema = z.strictObject({- kind: z.literal("date"),- dates: z- .array(z.iso.date())- .min(1)- .meta({- description:- "Calendar days to offer. Each becomes one all-day option. A day may appear once.",- example: ["2027-03-01", "2027-03-02", "2027-03-03"],- }),+ date: dateSchema.meta({+ description: "Calendar day to offer, as a floating `YYYY-MM-DD` date.",+ example: "2027-03-01",+ }),}).meta({- id: "DateOptions",- title: "Date poll",- description:- "Whole days. Dates are floating calendar days with no timezone, so never convert them through one.",+ id: "DateOptionInput",+ title: "Date option",+ description: "One all-day option. The same shape `DateOption` returns.",});-const timeOptionsSchema = z+const timeOptionInputSchema = z.strictObject({- kind: z.literal("time"),- duration: z.number().int().min(15).max(1440).meta({- description: "Length of every slot in minutes",- example: 30,- }),- timeZone: timezoneSchema.optional().meta({+ startTime: z.iso.datetime({ local: true, offset: true }).meta({description:- "IANA time zone the times are written in. Datetime strings without an offset are interpreted in this zone. If omitted, offset-less datetimes are floating times (no conversion) and the poll has no time zone.",- example: "Europe/London",- }),- times: z.array(explicitTimeSchema).min(1).optional().meta({- description: "Explicit slots, one per start time.",+ "ISO datetime start time. A string without an offset is wall clock time in `timeZone` when that is set (`2027-03-01T09:00:00` with `timeZone: Europe/London` means 09:00 in London) and a floating time with no conversion otherwise. A string with an offset or `Z` is an absolute instant.",+ example: "2027-03-01T09:00:00",}),- generators: z.array(slotGeneratorSchema).min(1).optional().meta({+ duration: durationSchema.optional().meta({description:- "Slot generators. Each expands into recurring slots from a schedule.",+ "Length of this slot in minutes. Defaults to the poll's `duration`.",+ example: 30,}),})- .refine((data) => data.times || data.generators, {- message: "Provide 'times', 'generators' or both",- path: ["times"],- })- // The refinement above does not survive JSON Schema conversion. Stating it- // as an anyOf would make Mintlify render two identical "Time poll" variants,- // so the description carries it instead..meta({- id: "TimeOptions",- title: "Time poll",- description:- "Time slots that share one duration. Provide `times`, `generators` or both. Duplicate slots are removed.",+ id: "TimeOptionInput",+ title: "Time option",+ description: "One time slot. The same shape `TimeOption` returns.",});+const pollSettingsFields = {+ title: z+ .string()+ .trim()+ .min(1)+ .max(MAX_POLL_TITLE_LENGTH)+ .meta({ example: "Team sync" }),+ description: z+ .string()+ .trim()+ .max(1000)+ .optional()+ .meta({ example: "Pick a time that works for everyone" }),+ location: z.string().trim().max(255).optional().meta({ example: "Zoom" }),+ requireEmail: z.boolean().optional().meta({+ description: "Require participants to provide their email address",+ example: true,+ }),+ hideParticipants: z.boolean().optional().meta({+ description: "Hide participant names from other participants",+ example: false,+ }),+ hideScores: z.boolean().optional().meta({+ description: "Hide vote counts from participants",+ example: false,+ }),+ disableComments: z.boolean().optional().meta({+ description:+ "Disable the comments section. Defaults to true: new polls have comments disabled unless this is set to false.",+ example: false,+ }),+ allowTentativeVotes: z.boolean().optional().meta({+ description:+ 'Allow participants to answer "if need be" as well as yes and no. Defaults to true.',+ example: true,+ }),+ organizer: z+ .strictObject({+ email: z.email().meta({+ description: "Email address of the organizer",+ example: "[email protected]",+ }),+ })+ .optional()+ .meta({+ description:+ "Organizer of the poll. Defaults to the space owner if not provided. The organizer must be a member of the space.",+ }),+};+// Strict so a misspelt or unsupported field fails loudly instead of being// silently ignored.-export const createPollInputSchema = z+const createDatePollInputSchema = z.strictObject({- title: z- .string()- .trim()- .min(1)- .max(MAX_POLL_TITLE_LENGTH)- .meta({ example: "Team sync" }),- description: z- .string()- .trim()- .max(1000)- .optional()- .meta({ example: "Pick a time that works for everyone" }),- location: z.string().trim().max(255).optional().meta({ example: "Zoom" }),- requireEmail: z.boolean().optional().meta({- description: "Require participants to provide their email address",- example: true,+ title: pollSettingsFields.title,+ kind: z.literal("date").meta({+ description: "Participants vote on whole days.",+ }),+ description: pollSettingsFields.description,+ location: pollSettingsFields.location,+ requireEmail: pollSettingsFields.requireEmail,+ hideParticipants: pollSettingsFields.hideParticipants,+ hideScores: pollSettingsFields.hideScores,+ disableComments: pollSettingsFields.disableComments,+ allowTentativeVotes: pollSettingsFields.allowTentativeVotes,+ organizer: pollSettingsFields.organizer,+ options: z.array(dateOptionInputSchema).min(1).meta({+ description:+ "Calendar days to offer. Dates are floating calendar days with no timezone, so never convert them through one. Duplicates are removed.",}),- hideParticipants: z.boolean().optional().meta({- description: "Hide participant names from other participants",- example: false,+ })+ .meta({ id: "CreateDatePollInput", title: "Date poll" });++const createTimePollInputSchema = z+ .strictObject({+ title: pollSettingsFields.title,+ kind: z.literal("time").meta({+ description: "Participants vote on time slots.",+ }),+ description: pollSettingsFields.description,+ location: pollSettingsFields.location,+ requireEmail: pollSettingsFields.requireEmail,+ hideParticipants: pollSettingsFields.hideParticipants,+ hideScores: pollSettingsFields.hideScores,+ disableComments: pollSettingsFields.disableComments,+ allowTentativeVotes: pollSettingsFields.allowTentativeVotes,+ organizer: pollSettingsFields.organizer,+ timeZone: timezoneSchema.optional().meta({+ description:+ "IANA time zone the times are written in. Datetime strings without an offset are interpreted in this zone. If omitted, offset-less datetimes are floating times (no conversion) and the poll has no time zone.",+ example: "Europe/London",}),- hideScores: z.boolean().optional().meta({- description: "Hide vote counts from participants",- example: false,+ duration: durationSchema.optional().meta({+ description:+ "Default slot length in minutes. Required when `generators` is set or an option omits its own `duration`.",+ example: 30,}),- disableComments: z.boolean().optional().meta({+ options: z.array(timeOptionInputSchema).min(1).optional().meta({description:- "Disable the comments section. Defaults to true: new polls have comments disabled unless this is set to false.",- example: false,+ "Explicit slots. Provide `options`, `generators` or both. Duplicates are removed.",}),- allowTentativeVotes: z.boolean().optional().meta({+ generators: z.array(slotGeneratorSchema).min(1).optional().meta({description:- 'Allow participants to answer "if need be" as well as yes and no. Defaults to true.',- example: true,+ "Slot generators. Each expands into recurring slots from a schedule and the result is appended to `options`.",}),- organizer: z- .strictObject({- email: z.email().meta({- description: "Email address of the organizer",- example: "[email protected]",- }),- })- .optional()- .meta({- description:- "Organizer of the poll. Defaults to the space owner if not provided. The organizer must be a member of the space.",- }),- options: z- .discriminatedUnion("kind", [dateOptionsSchema, timeOptionsSchema], {- error: 'kind must be "date" or "time"',- })- .meta({- description:- "What participants vote on: whole days (`kind: date`) or time slots (`kind: time`).",- discriminator: {- propertyName: "kind",- mapping: {- date: "#/components/schemas/DateOptions",- time: "#/components/schemas/TimeOptions",- },- },- }),})- .meta({ id: "CreatePollInput" });+ // These rules do not survive JSON Schema conversion; the field+ // descriptions state them instead.+ .superRefine((data, ctx) => {+ if (!data.options && !data.generators) {+ ctx.addIssue({+ code: "custom",+ path: ["options"],+ message: "Provide `options`, `generators` or both.",+ });+ }+ if (data.duration === undefined) {+ data.options?.forEach((option, index) => {+ if (option.duration === undefined) {+ ctx.addIssue({+ code: "custom",+ path: ["options", index, "duration"],+ message: "Required when the poll has no default `duration`.",+ });+ }+ });+ if (data.generators) {+ ctx.addIssue({+ code: "custom",+ path: ["duration"],+ message: "Required when `generators` is set.",+ });+ }+ return;+ }+ const { duration } = data;+ data.generators?.forEach((generator, index) => {+ const window = minutesOfDay(generator.to) - minutesOfDay(generator.from);+ if (window > 0 && window < duration) {+ ctx.addIssue({+ code: "custom",+ path: ["generators", index, "to"],+ message: `The window from ${generator.from} to ${generator.to} is shorter than the ${duration} minute duration.`,+ });+ }+ });+ })+ .meta({ id: "CreateTimePollInput", title: "Time poll" });++export const createPollInputSchema = z+ .discriminatedUnion(+ "kind",+ [createDatePollInputSchema, createTimePollInputSchema],+ {+ error: 'kind must be "date" or "time"',+ },+ )+ .meta({+ id: "CreatePollInput",+ description:+ "`kind` chooses what participants vote on: whole days (`date`) or time slots (`time`). The request mirrors the poll the API returns: the same settings, and `options` in the same shape as the response.",+ discriminator: {+ propertyName: "kind",+ mapping: {+ date: "#/components/schemas/CreateDatePollInput",+ time: "#/components/schemas/CreateTimePollInput",+ },+ },+ });export const errorResponseSchema = z.object({diff --git a/apps/web/src/features/api-keys/constants.ts b/apps/web/src/features/api-keys/constants.tsindex bd07f05f5..595d46649 100644--- a/apps/web/src/features/api-keys/constants.ts+++ b/apps/web/src/features/api-keys/constants.ts@@ -20,8 +20,8 @@ export const API_RATE_LIMIT_PER_MINUTE = 60;export const API_RATE_LIMIT_PER_DAY = 5000;/**- * Link to the API reference. Still the private route's Scalar page: v1 has- * no in-app docs page, its reference is generated from `/api/v1/openapi`- * into the docs site, and this link moves there when that ships.+ * The API reference lives in the docs site, generated from `/api/v1/openapi`+ * by `scripts/generate-openapi.ts`. v1 has no in-app docs page.*/-export const getApiDocsPath = () => "/api/private/docs";+export const getApiDocsPath = () =>+ "https://support.rallly.co/api-reference/introduction";diff --git a/package.json b/package.jsonindex 1de912673..51bf5bf7e 100644--- a/package.json+++ b/package.json@@ -31,6 +31,7 @@"check:locales": "node scripts/check-locale-braces.mjs","check:structure": "node scripts/check-feature-structure.mjs && node scripts/check-feature-cycles.mjs","check:cascades": "node scripts/check-user-cascade-relations.mjs",+ "check:openapi": "pnpm --filter @rallly/web openapi:generate && git diff --exit-code -- apps/docs/api-reference/openapi.json","i18n:scan": "turbo i18n:scan","type-check": "turbo type-check","release": "./scripts/create-release.sh",diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex b4d619848..b4d0fdc8e 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -511,6 +511,9 @@ importers:jsdom:specifier: ^26.1.0version: 26.1.0+ tsx:+ specifier: ^4.6.2+ version: 4.21.0vitest:specifier: ^4.1.11version: 4.1.11(@opentelemetry/[email protected])(@types/[email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))@@ -2111,12 +2114,6 @@ packages:'@emnapi/[email protected]':resolution: {integrity: sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA==}- '@esbuild/[email protected]':- resolution: {integrity: sha512-9fJMTNFTWZMh5qwrBItuziu834eOCUcEqymSH7pY+zoMVEZg3gcPuBNxH1EvfVYe9h0x/Ptw8KBzv7qxb7l8dg==}- engines: {node: '>=18'}- cpu: [ppc64]- os: [aix]-'@esbuild/[email protected]':resolution: {integrity: sha512-EKX3Qwmhz1eMdEJokhALr0YiD0lhQNwDqkPYyPhiSwKrh7/4KRjQc04sZ8db+5DVVnZ1LmbNDI1uAMPEUBnQPg==}engines: {node: '>=18'}@@ -2135,12 +2132,6 @@ packages:cpu: [ppc64]os: [aix]- '@esbuild/[email protected]':- resolution: {integrity: sha512-YdghPYUmj/FX2SYKJ0OZxf+iaKgMsKHVPF1MAq/P8WirnSpCStzKJFjOjzsW0QQ7oIAiccHdcqjbHmJxRb/dmg==}- engines: {node: '>=18'}- cpu: [arm64]- os: [android]-'@esbuild/[email protected]':resolution: {integrity: sha512-62dPZHpIXzvChfvfLJow3q5dDtiNMkwiRzPylSCfriLvZeq0a1bWChrGx/BbUbPwOrsWKMn8idSllklzBy+dgQ==}engines: {node: '>=18'}@@ -2159,12 +2150,6 @@ packages:cpu: [arm64]os: [android]- '@esbuild/[email protected]':- resolution: {integrity: sha512-i5D1hPY7GIQmXlXhs2w8AWHhenb00+GxjxRncS2ZM7YNVGNfaMxgzSGuO8o8SJzRc/oZwU2bcScvVERk03QhzA==}- engines: {node: '>=18'}- cpu: [arm]- os: [android]-'@esbuild/[email protected]':resolution: {integrity: sha512-jbPXvB4Yj2yBV7HUfE2KHe4GJX51QplCN1pGbYjvsyCZbQmies29EoJbkEc+vYuU5o45AfQn37vZlyXy4YJ8RQ==}engines: {node: '>=18'}@@ -2183,12 +2168,6 @@ packages:cpu: [arm]os: [android]- '@esbuild/[email protected]':- resolution: {integrity: sha512-IN/0BNTkHtk8lkOM8JWAYFg4ORxBkZQf9zXiEOfERX/CzxW3Vg1ewAhU7QSWQpVIzTW+b8Xy+lGzdYXV6UZObQ==}- engines: {node: '>=18'}- cpu: [x64]- os: [android]-'@esbuild/[email protected]':resolution: {integrity: sha512-x5VpMODneVDb70PYV2VQOmIUUiBtY3D3mPBG8NxVk5CogneYhkR7MmM3yR/uMdITLrC1ml/NV1rj4bMJuy9MCg==}engines: {node: '>=18'}@@ -2207,12 +2186,6 @@ packages:cpu: [x64]os: [android]- '@esbuild/[email protected]':- resolution: {integrity: sha512-Re491k7ByTVRy0t3EKWajdLIr0gz2kKKfzafkth4Q8A5n1xTHrkqZgLLjFEHVD+AXdUGgQMq+Godfq45mGpCKg==}- engines: {node: '>=18'}- cpu: [arm64]- os: [darwin]-'@esbuild/[email protected]':resolution: {integrity: sha512-5lckdqeuBPlKUwvoCXIgI2D9/ABmPq3Rdp7IfL70393YgaASt7tbju3Ac+ePVi3KDH6N2RqePfHnXkaDtY9fkw==}engines: {node: '>=18'}@@ -2231,12 +2204,6 @@ packages:cpu: [arm64]os: [darwin]- '@esbuild/[email protected]':- resolution: {integrity: sha512-vHk/hA7/1AckjGzRqi6wbo+jaShzRowYip6rt6q7VYEDX4LEy1pZfDpdxCBnGtl+A5zq8iXDcyuxwtv3hNtHFg==}- engines: {node: '>=18'}- cpu: [x64]- os: [darwin]-'@esbuild/[email protected]':resolution: {integrity: sha512-rYnXrKcXuT7Z+WL5K980jVFdvVKhCHhUwid+dDYQpH+qu+TefcomiMAJpIiC2EM3Rjtq0sO3StMV/+3w3MyyqQ==}engines: {node: '>=18'}@@ -2255,12 +2222,6 @@ packages:cpu: [x64]os: [darwin]- '@esbuild/[email protected]':- resolution: {integrity: sha512-ipTYM2fjt3kQAYOvo6vcxJx3nBYAzPjgTCk7QEgZG8AUO3ydUhvelmhrbOheMnGOlaSFUoHXB6un+A7q4ygY9w==}- engines: {node: '>=18'}- cpu: [arm64]- os: [freebsd]-'@esbuild/[email protected]':resolution: {integrity: sha512-B48PqeCsEgOtzME2GbNM2roU29AMTuOIN91dsMO30t+Ydis3z/3Ngoj5hhnsOSSwNzS+6JppqWsuhTp6E82l2w==}engines: {node: '>=18'}@@ -2279,12 +2240,6 @@ packages:cpu: [arm64]os: [freebsd]- '@esbuild/[email protected]':- resolution: {integrity: sha512-dDk0X87T7mI6U3K9VjWtHOXqwAMJBNN2r7bejDsc+j03SEjtD9HrOl8gVFByeM0aJksoUuUVU9TBaZa2rgj0oA==}- engines: {node: '>=18'}- cpu: [x64]- os: [freebsd]-'@esbuild/[email protected]':resolution: {integrity: sha512-jOBDK5XEjA4m5IJK3bpAQF9/Lelu/Z9ZcdhTRLf4cajlB+8VEhFFRjWgfy3M1O4rO2GQ/b2dLwCUGpiF/eATNQ==}engines: {node: '>=18'}@@ -2303,12 +2258,6 @@ packages:cpu: [x64]os: [freebsd]- '@esbuild/[email protected]':- resolution: {integrity: sha512-sZOuFz/xWnZ4KH3YfFrKCf1WyPZHakVzTiqji3WDc0BCl2kBwiJLCXpzLzUBLgmp4veFZdvN5ChW4Eq/8Fc2Fg==}- engines: {node: '>=18'}- cpu: [arm64]- os: [linux]-'@esbuild/[email protected]':resolution: {integrity: sha512-RZPHBoxXuNnPQO9rvjh5jdkRmVizktkT7TCDkDmQ0W2SwHInKCAV95GRuvdSvA7w4VMwfCjUiPwDi0ZO6Nfe9A==}engines: {node: '>=18'}@@ -2327,12 +2276,6 @@ packages:cpu: [arm64]os: [linux]- '@esbuild/[email protected]':- resolution: {integrity: sha512-s6nPv2QkSupJwLYyfS+gwdirm0ukyTFNl3KTgZEAiJDd+iHZcbTPPcWCcRYH+WlNbwChgH2QkE9NSlNrMT8Gfw==}- engines: {node: '>=18'}- cpu: [arm]- os: [linux]-'@esbuild/[email protected]':resolution: {integrity: sha512-RkT/YXYBTSULo3+af8Ib0ykH8u2MBh57o7q/DAs3lTJlyVQkgQvlrPTnjIzzRPQyavxtPtfg0EopvDyIt0j1rA==}engines: {node: '>=18'}@@ -2351,12 +2294,6 @@ packages:cpu: [arm]os: [linux]- '@esbuild/[email protected]':- resolution: {integrity: sha512-yGlQYjdxtLdh0a3jHjuwOrxQjOZYD/C9PfdbgJJF3TIZWnm/tMd/RcNiLngiu4iwcBAOezdnSLAwQDPqTmtTYg==}- engines: {node: '>=18'}- cpu: [ia32]- os: [linux]-'@esbuild/[email protected]':resolution: {integrity: sha512-GA48aKNkyQDbd3KtkplYWT102C5sn/EZTY4XROkxONgruHPU72l+gW+FfF8tf2cFjeHaRbWpOYa/uRBz/Xq1Pg==}engines: {node: '>=18'}@@ -2375,12 +2312,6 @@ packages:cpu: [ia32]os: [linux]- '@esbuild/[email protected]':- resolution: {integrity: sha512-WO60Sn8ly3gtzhyjATDgieJNet/KqsDlX5nRC5Y3oTFcS1l0KWba+SEa9Ja1GfDqSF1z6hif/SkpQJbL63cgOA==}- engines: {node: '>=18'}- cpu: [loong64]- os: [linux]-'@esbuild/[email protected]':resolution: {integrity: sha512-a4POruNM2oWsD4WKvBSEKGIiWQF8fZOAsycHOt6JBpZ+JN2n2JH9WAv56SOyu9X5IqAjqSIPTaJkqN8F7XOQ5Q==}engines: {node: '>=18'}@@ -2399,12 +2330,6 @@ packages:cpu: [loong64]os: [linux]- '@esbuild/[email protected]':- resolution: {integrity: sha512-APsymYA6sGcZ4pD6k+UxbDjOFSvPWyZhjaiPyl/f79xKxwTnrn5QUnXR5prvetuaSMsb4jgeHewIDCIWljrSxw==}- engines: {node: '>=18'}- cpu: [mips64el]- os: [linux]-'@esbuild/[email protected]':resolution: {integrity: sha512-KabT5I6StirGfIz0FMgl1I+R1H73Gp0ofL9A3nG3i/cYFJzKHhouBV5VWK1CSgKvVaG4q1RNpCTR2LuTVB3fIw==}engines: {node: '>=18'}@@ -2423,12 +2348,6 @@ packages:cpu: [mips64el]os: [linux]- '@esbuild/[email protected]':- resolution: {integrity: sha512-eizBnTeBefojtDb9nSh4vvVQ3V9Qf9Df01PfawPcRzJH4gFSgrObw+LveUyDoKU3kxi5+9RJTCWlj4FjYXVPEA==}- engines: {node: '>=18'}- cpu: [ppc64]- os: [linux]-'@esbuild/[email protected]':resolution: {integrity: sha512-gRsL4x6wsGHGRqhtI+ifpN/vpOFTQtnbsupUF5R5YTAg+y/lKelYR1hXbnBdzDjGbMYjVJLJTd2OFmMewAgwlQ==}engines: {node: '>=18'}@@ -2447,12 +2366,6 @@ packages:cpu: [ppc64]os: [linux]- '@esbuild/[email protected]':- resolution: {integrity: sha512-3Emwh0r5wmfm3ssTWRQSyVhbOHvqegUDRd0WhmXKX2mkHJe1SFCMJhagUleMq+Uci34wLSipf8Lagt4LlpRFWQ==}- engines: {node: '>=18'}- cpu: [riscv64]- os: [linux]-'@esbuild/[email protected]':resolution: {integrity: sha512-hL25LbxO1QOngGzu2U5xeXtxXcW+/GvMN3ejANqXkxZ/opySAZMrc+9LY/WyjAan41unrR3YrmtTsUpwT66InQ==}engines: {node: '>=18'}@@ -2471,12 +2384,6 @@ packages:cpu: [riscv64]os: [linux]- '@esbuild/[email protected]':- resolution: {integrity: sha512-pBHUx9LzXWBc7MFIEEL0yD/ZVtNgLytvx60gES28GcWMqil8ElCYR4kvbV2BDqsHOvVDRrOxGySBM9Fcv744hw==}- engines: {node: '>=18'}- cpu: [s390x]- os: [linux]-'@esbuild/[email protected]':resolution: {integrity: sha512-2k8go8Ycu1Kb46vEelhu1vqEP+UeRVj2zY1pSuPdgvbd5ykAw82Lrro28vXUrRmzEsUV0NzCf54yARIK8r0fdw==}engines: {node: '>=18'}@@ -2495,12 +2402,6 @@ packages:cpu: [s390x]os: [linux]- '@esbuild/[email protected]':- resolution: {integrity: sha512-Czi8yzXUWIQYAtL/2y6vogER8pvcsOsk5cpwL4Gk5nJqH5UZiVByIY8Eorm5R13gq+DQKYg0+JyQoytLQas4dA==}- engines: {node: '>=18'}- cpu: [x64]- os: [linux]-'@esbuild/[email protected]':resolution: {integrity: sha512-hzznmADPt+OmsYzw1EE33ccA+HPdIqiCRq7cQeL1Jlq2gb1+OyWBkMCrYGBJ+sxVzve2ZJEVeePbLM2iEIZSxA==}engines: {node: '>=18'}@@ -2519,12 +2420,6 @@ packages:cpu: [x64]os: [linux]- '@esbuild/[email protected]':- resolution: {integrity: sha512-sDpk0RgmTCR/5HguIZa9n9u+HVKf40fbEUt+iTzSnCaGvY9kFP0YKBWZtJaraonFnqef5SlJ8/TiPAxzyS+UoA==}- engines: {node: '>=18'}- cpu: [arm64]- os: [netbsd]-'@esbuild/[email protected]':resolution: {integrity: sha512-b6pqtrQdigZBwZxAn1UpazEisvwaIDvdbMbmrly7cDTMFnw/+3lVxxCTGOrkPVnsYIosJJXAsILG9XcQS+Yu6w==}engines: {node: '>=18'}@@ -2543,12 +2438,6 @@ packages:cpu: [arm64]os: [netbsd]- '@esbuild/[email protected]':- resolution: {integrity: sha512-P14lFKJl/DdaE00LItAukUdZO5iqNH7+PjoBm+fLQjtxfcfFE20Xf5CrLsmZdq5LFFZzb5JMZ9grUwvtVYzjiA==}- engines: {node: '>=18'}- cpu: [x64]- os: [netbsd]-'@esbuild/[email protected]':resolution: {integrity: sha512-OfatkLojr6U+WN5EDYuoQhtM+1xco+/6FSzJJnuWiUw5eVcicbyK3dq5EeV/QHT1uy6GoDhGbFpprUiHUYggrw==}engines: {node: '>=18'}@@ -2567,12 +2456,6 @@ packages:cpu: [x64]os: [netbsd]- '@esbuild/[email protected]':- resolution: {integrity: sha512-AIcMP77AvirGbRl/UZFTq5hjXK+2wC7qFRGoHSDrZ5v5b8DK/GYpXW3CPRL53NkvDqb9D+alBiC/dV0Fb7eJcw==}- engines: {node: '>=18'}- cpu: [arm64]- os: [openbsd]-'@esbuild/[email protected]':resolution: {integrity: sha512-AFuojMQTxAz75Fo8idVcqoQWEHIXFRbOc1TrVcFSgCZtQfSdc1RXgB3tjOn/krRHENUB4j00bfGjyl2mJrU37A==}engines: {node: '>=18'}@@ -2591,12 +2474,6 @@ packages:cpu: [arm64]os: [openbsd]- '@esbuild/[email protected]':- resolution: {integrity: sha512-DnW2sRrBzA+YnE70LKqnM3P+z8vehfJWHXECbwBmH/CU51z6FiqTQTHFenPlHmo3a8UgpLyH3PT+87OViOh1AQ==}- engines: {node: '>=18'}- cpu: [x64]- os: [openbsd]-'@esbuild/[email protected]':resolution: {integrity: sha512-+A1NJmfM8WNDv5CLVQYJ5PshuRm/4cI6WMZRg1by1GwPIQPCTs1GLEUHwiiQGT5zDdyLiRM/l1G0Pv54gvtKIg==}engines: {node: '>=18'}@@ -2615,12 +2492,6 @@ packages:cpu: [x64]os: [openbsd]- '@esbuild/[email protected]':- resolution: {integrity: sha512-NinAEgr/etERPTsZJ7aEZQvvg/A6IsZG/LgZy+81wON2huV7SrK3e63dU0XhyZP4RKGyTm7aOgmQk0bGp0fy2g==}- engines: {node: '>=18'}- cpu: [arm64]- os: [openharmony]-'@esbuild/[email protected]':resolution: {integrity: sha512-+KrvYb/C8zA9CU/g0sR6w2RBw7IGc5J2BPnc3dYc5VJxHCSF1yNMxTV5LQ7GuKteQXZtspjFbiuW5/dOj7H4Yw==}engines: {node: '>=18'}@@ -2639,12 +2510,6 @@ packages:cpu: [arm64]os: [openharmony]- '@esbuild/[email protected]':- resolution: {integrity: sha512-PanZ+nEz+eWoBJ8/f8HKxTTD172SKwdXebZ0ndd953gt1HRBbhMsaNqjTyYLGLPdoWHy4zLU7bDVJztF5f3BHA==}- engines: {node: '>=18'}- cpu: [x64]- os: [sunos]-'@esbuild/[email protected]':resolution: {integrity: sha512-ikktIhFBzQNt/QDyOL580ti9+5mL/YZeUPKU2ivGtGjdTYoqz6jObj6nOMfhASpS4GU4Q/Clh1QtxWAvcYKamA==}engines: {node: '>=18'}@@ -2663,12 +2528,6 @@ packages:cpu: [x64]os: [sunos]- '@esbuild/[email protected]':- resolution: {integrity: sha512-B2t59lWWYrbRDw/tjiWOuzSsFh1Y/E95ofKz7rIVYSQkUYBjfSgf6oeYPNWHToFRr2zx52JKApIcAS/D5TUBnA==}- engines: {node: '>=18'}- cpu: [arm64]- os: [win32]-'@esbuild/[email protected]':resolution: {integrity: sha512-7yRhbHvPqSpRUV7Q20VuDwbjW5kIMwTHpptuUzV+AA46kiPze5Z7qgt6CLCK3pWFrHeNfDd1VKgyP4O+ng17CA==}engines: {node: '>=18'}@@ -2687,12 +2546,6 @@ packages:cpu: [arm64]os: [win32]- '@esbuild/[email protected]':- resolution: {integrity: sha512-QLKSFeXNS8+tHW7tZpMtjlNb7HKau0QDpwm49u0vUp9y1WOF+PEzkU84y9GqYaAVW8aH8f3GcBck26jh54cX4Q==}- engines: {node: '>=18'}- cpu: [ia32]- os: [win32]-'@esbuild/[email protected]':resolution: {integrity: sha512-SmwKXe6VHIyZYbBLJrhOoCJRB/Z1tckzmgTLfFYOfpMAx63BJEaL9ExI8x7v0oAO3Zh6D/Oi1gVxEYr5oUCFhw==}engines: {node: '>=18'}@@ -2711,12 +2564,6 @@ packages:cpu: [ia32]os: [win32]- '@esbuild/[email protected]':- resolution: {integrity: sha512-4uJGhsxuptu3OcpVAzli+/gWusVGwZZHTlS63hh++ehExkVT8SgiEf7/uC/PclrPPkLhZqGgCTjd0VWLo6xMqA==}- engines: {node: '>=18'}- cpu: [x64]- os: [win32]-'@esbuild/[email protected]':resolution: {integrity: sha512-56hiAJPhwQ1R4i+21FVF7V8kSD5zZTdHcVuRFMW0hn753vVfQN8xlx4uOPT4xoGH0Z/oVATuR82AiqSTDIpaHg==}engines: {node: '>=18'}@@ -7971,11 +7818,6 @@ packages:resolution: {integrity: sha512-8Ja+rNJ0Lt56Pcf3TAmpBZjmx8ZcK5Ts4cAzIOjsjevg9oSXJnl6SUQ2EevU8tv3h6ZLWmoKL5H4fgWvdvfETw==}- resolution: {integrity: sha512-8VwMnyGCONIs6cWue2IdpHxHnAjzxnw2Zr7MkVxB2vjmQ2ivqGFb4LEG3SMnv0Gb2F/G/2yA8zUaiL1gywDCCg==}- engines: {node: '>=18'}- hasBin: true-resolution: {integrity: sha512-IxpibTjyVnmrIQo5aqNpCgoACA/dTKLTlhMHihVHhdkxKyPO1uBBthumT0rdHmcsk9uMonIWS0m4FljWzILh3w==}engines: {node: '>=18'}@@ -14168,9 +14010,6 @@ snapshots:tslib: 2.8.1optional: true- '@esbuild/[email protected]':- optional: true-'@esbuild/[email protected]':optional: true@@ -14180,9 +14019,6 @@ snapshots:'@esbuild/[email protected]':optional: true- '@esbuild/[email protected]':- optional: true-'@esbuild/[email protected]':optional: true@@ -14192,9 +14028,6 @@ snapshots:'@esbuild/[email protected]':optional: true- '@esbuild/[email protected]':- optional: true-'@esbuild/[email protected]':optional: true@@ -14204,9 +14037,6 @@ snapshots:'@esbuild/[email protected]':optional: true- '@esbuild/[email protected]':- optional: true-'@esbuild/[email protected]':optional: true@@ -14216,9 +14046,6 @@ snapshots:'@esbuild/[email protected]':optional: true- '@esbuild/[email protected]':- optional: true-'@esbuild/[email protected]':optional: true@@ -14228,9 +14055,6 @@ snapshots:'@esbuild/[email protected]':optional: true- '@esbuild/[email protected]':- optional: true-'@esbuild/[email protected]':optional: true@@ -14240,9 +14064,6 @@ snapshots:'@esbuild/[email protected]':optional: true- '@esbuild/[email protected]':- optional: true-'@esbuild/[email protected]':optional: true@@ -14252,9 +14073,6 @@ snapshots:'@esbuild/[email protected]':optional: true- '@esbuild/[email protected]':- optional: true-'@esbuild/[email protected]':optional: true@@ -14264,9 +14082,6 @@ snapshots:'@esbuild/[email protected]':optional: true- '@esbuild/[email protected]':- optional: true-'@esbuild/[email protected]':optional: true@@ -14276,9 +14091,6 @@ snapshots:'@esbuild/[email protected]':optional: true- '@esbuild/[email protected]':- optional: true-'@esbuild/[email protected]':optional: true@@ -14288,9 +14100,6 @@ snapshots:'@esbuild/[email protected]':optional: true- '@esbuild/[email protected]':- optional: true-'@esbuild/[email protected]':optional: true@@ -14300,9 +14109,6 @@ snapshots:'@esbuild/[email protected]':optional: true- '@esbuild/[email protected]':- optional: true-'@esbuild/[email protected]':optional: true@@ -14312,9 +14118,6 @@ snapshots:'@esbuild/[email protected]':optional: true- '@esbuild/[email protected]':- optional: true-'@esbuild/[email protected]':optional: true@@ -14324,9 +14127,6 @@ snapshots:'@esbuild/[email protected]':optional: true- '@esbuild/[email protected]':- optional: true-'@esbuild/[email protected]':optional: true@@ -14336,9 +14136,6 @@ snapshots:'@esbuild/[email protected]':optional: true- '@esbuild/[email protected]':- optional: true-'@esbuild/[email protected]':optional: true@@ -14348,9 +14145,6 @@ snapshots:'@esbuild/[email protected]':optional: true- '@esbuild/[email protected]':- optional: true-'@esbuild/[email protected]':optional: true@@ -14360,9 +14154,6 @@ snapshots:'@esbuild/[email protected]':optional: true- '@esbuild/[email protected]':- optional: true-'@esbuild/[email protected]':optional: true@@ -14372,9 +14163,6 @@ snapshots:'@esbuild/[email protected]':optional: true- '@esbuild/[email protected]':- optional: true-'@esbuild/[email protected]':optional: true@@ -14384,9 +14172,6 @@ snapshots:'@esbuild/[email protected]':optional: true- '@esbuild/[email protected]':- optional: true-'@esbuild/[email protected]':optional: true@@ -14396,9 +14181,6 @@ snapshots:'@esbuild/[email protected]':optional: true- '@esbuild/[email protected]':- optional: true-'@esbuild/[email protected]':optional: true@@ -14408,9 +14190,6 @@ snapshots:'@esbuild/[email protected]':optional: true- '@esbuild/[email protected]':- optional: true-'@esbuild/[email protected]':optional: true@@ -14420,9 +14199,6 @@ snapshots:'@esbuild/[email protected]':optional: true- '@esbuild/[email protected]':- optional: true-'@esbuild/[email protected]':optional: true@@ -14432,9 +14208,6 @@ snapshots:'@esbuild/[email protected]':optional: true- '@esbuild/[email protected]':- optional: true-'@esbuild/[email protected]':optional: true@@ -14444,9 +14217,6 @@ snapshots:'@esbuild/[email protected]':optional: true- '@esbuild/[email protected]':- optional: true-'@esbuild/[email protected]':optional: true@@ -14456,9 +14226,6 @@ snapshots:'@esbuild/[email protected]':optional: true- '@esbuild/[email protected]':- optional: true-'@esbuild/[email protected]':optional: true@@ -14468,9 +14235,6 @@ snapshots:'@esbuild/[email protected]':optional: true- '@esbuild/[email protected]':- optional: true-'@esbuild/[email protected]':optional: true@@ -20729,35 +20493,6 @@ snapshots:esast-util-from-estree: 2.0.0vfile-message: 4.0.3- optionalDependencies:- '@esbuild/aix-ppc64': 0.27.3- '@esbuild/android-arm': 0.27.3- '@esbuild/android-arm64': 0.27.3- '@esbuild/android-x64': 0.27.3- '@esbuild/darwin-arm64': 0.27.3- '@esbuild/darwin-x64': 0.27.3- '@esbuild/freebsd-arm64': 0.27.3- '@esbuild/freebsd-x64': 0.27.3- '@esbuild/linux-arm': 0.27.3- '@esbuild/linux-arm64': 0.27.3- '@esbuild/linux-ia32': 0.27.3- '@esbuild/linux-loong64': 0.27.3- '@esbuild/linux-mips64el': 0.27.3- '@esbuild/linux-ppc64': 0.27.3- '@esbuild/linux-riscv64': 0.27.3- '@esbuild/linux-s390x': 0.27.3- '@esbuild/linux-x64': 0.27.3- '@esbuild/netbsd-arm64': 0.27.3- '@esbuild/netbsd-x64': 0.27.3- '@esbuild/openbsd-arm64': 0.27.3- '@esbuild/openbsd-x64': 0.27.3- '@esbuild/openharmony-arm64': 0.27.3- '@esbuild/sunos-x64': 0.27.3- '@esbuild/win32-arm64': 0.27.3- '@esbuild/win32-ia32': 0.27.3- '@esbuild/win32-x64': 0.27.3-optionalDependencies:'@esbuild/aix-ppc64': 0.27.7@@ -25735,7 +25470,7 @@ snapshots:dependencies:- esbuild: 0.27.3+ esbuild: 0.27.7get-tsconfig: 4.13.3optionalDependencies:fsevents: 2.3.3