diff --git a/.github/workflows/api-v3-spec.yml b/.github/workflows/api-v3-spec.yml new file mode 100644 index 000000000000..10ca53ba8e18 --- /dev/null +++ b/.github/workflows/api-v3-spec.yml @@ -0,0 +1,49 @@ +name: API v3 Spec + +on: + pull_request: + paths: + - "docs/api-v3-reference/**" + - ".github/workflows/api-v3-spec.yml" + +concurrency: + group: api-v3-spec-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +permissions: + contents: read + +jobs: + validate: + name: Lint source & verify bundle freshness + runs-on: ubuntu-latest + timeout-minutes: 10 + + steps: + - name: Harden the runner (Audit all outbound calls) + uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0 + with: + egress-policy: audit + + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + with: + persist-credentials: false + + - name: Setup Node.js 22.x + uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 + with: + node-version: 22.x + + - name: Install pnpm + uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 + + # Root importer only: installs the lockfile-pinned @redocly/cli (and other root devDeps) + # without building the whole workspace. bundle.mjs falls back to pinned npx when absent. + - name: Install spec tooling (root dev dependencies) + run: pnpm install --frozen-lockfile --ignore-scripts --filter formbricks + + - name: Lint OpenAPI v3 source tree + run: node docs/api-v3-reference/scripts/bundle.mjs --lint + + - name: Verify committed bundle is in sync with src/ + run: node docs/api-v3-reference/scripts/bundle.mjs --check diff --git a/docs/api-v3-reference/openapi.yml b/docs/api-v3-reference/openapi.yml index fefc5d0788f9..5c6db05ca3e2 100644 --- a/docs/api-v3-reference/openapi.yml +++ b/docs/api-v3-reference/openapi.yml @@ -1,13 +1,15 @@ -# V3 API — Surveys (hand-maintained; not generated by generate-api-specs). -# Implementation: apps/web/app/api/v3/surveys/route.ts, apps/web/app/api/v3/surveys/generate/route.ts, and apps/web/app/api/v3/surveys/[surveyId]/route.ts - -openapi: 3.1.0 +# GENERATED FILE — do not edit. Source of truth: docs/api-v3-reference/src/ (one file per path/schema). +# Regenerate with `pnpm api:v3:bundle`; CI verifies freshness with `pnpm api:v3:check`. +# V3 API — Surveys and Workflows extension (hand-maintained source; not produced by generate-api-specs). +openapi: 3.1.1 info: title: Formbricks API v3 description: | - **GET /api/v3/surveys**, **POST /api/v3/surveys**, **POST /api/v3/surveys/generate**, **POST /api/v3/surveys/validate**, **GET /api/v3/surveys/{surveyId}**, **PATCH /api/v3/surveys/{surveyId}**, and **DELETE /api/v3/surveys/{surveyId}** — authenticate with **session cookie** or **`x-api-key`** (management key with access to the workspace). + **Surveys**: **GET /api/v3/surveys**, **POST /api/v3/surveys**, **POST /api/v3/surveys/generate**, **POST /api/v3/surveys/validate**, **GET /api/v3/surveys/{surveyId}**, **PATCH /api/v3/surveys/{surveyId}**, and **DELETE /api/v3/surveys/{surveyId}**. + + Authenticate all management endpoints with **session cookie** or **`x-api-key`** (management key with access to the workspace). - **Spec location:** `docs/api-v3-reference/openapi.yml` (alongside v2 at `docs/api-v2-reference/openapi.yml`). + **Spec location:** source of truth is the multi-file tree at `docs/api-v3-reference/src/` (root `openapi.yml` plus one file per path and component); `docs/api-v3-reference/openapi.yml` is the generated single-file bundle (alongside v2 at `docs/api-v2-reference/openapi.yml`). **workspaceId** Query param `workspaceId` is the canonical container identifier for this API. @@ -16,10 +18,10 @@ info: Authenticate with either a session cookie or **`x-api-key`**. In dual-auth mode, V3 checks the API key first when the header is present, otherwise it uses the session path. Unauthenticated callers get **401** before query validation. **Pagination** - Cursor-based pagination with **limit** + opaque **cursor** token. Responses return `meta.nextCursor`; pass that value back as `cursor` to fetch the next page. Responses also include `meta.totalCount`, the total number of surveys matching the current filters across all pages. There is no `offset` in this contract. + Cursor-based pagination with **limit** + opaque **cursor** token. Responses return `meta.nextCursor`; pass that value back as `cursor` to fetch the next page. Survey list responses also include `meta.totalCount`, the total number of surveys matching the current filters across all pages. There is no `offset` in this contract. **Filtering** - Filters use explicit operator-style query parameters under the **`filter[...]` family**. This endpoint supports `filter[name][contains]`, `filter[status][in]`, and `filter[type][in]`. Multi-value filters use repeated keys or comma-separated values (e.g. `filter[status][in]=draft&filter[status][in]=inProgress` or `filter[status][in]=draft,inProgress`). Sorting remains a flat `sortBy` query parameter. + Filters use explicit operator-style query parameters under the **`filter[...]` family**. The survey list supports `filter[name][contains]`, `filter[status][in]`, and `filter[type][in]`. Resource-scoping identifiers (`workspaceId`, `responseId`) stay plain query parameters. Multi-value filters use repeated keys or comma-separated values (e.g. `filter[status][in]=draft&filter[status][in]=inProgress` or `filter[status][in]=draft,inProgress`). Sorting remains a flat `sortBy` query parameter. **Security** Missing/forbidden workspace returns **403** with a generic message (not **404**) so resource existence is not leaked. List responses use `private, no-store`. @@ -29,7 +31,7 @@ info: Prompt text is sent to the configured AI provider for generation, but it is not stored by this endpoint, not logged by default, and not included in audit data. **OpenAPI** - This YAML is **not** produced by `pnpm generate-api-specs` (that script only builds v2 → `docs/api-v2-reference/openapi.yml`). Update this file when the route contract changes. + This spec is **not** produced by `pnpm generate-api-specs` (that script only builds v2 → `docs/api-v2-reference/openapi.yml`). When the route contract changes, edit the files under `docs/api-v3-reference/src/`, then run `pnpm api:v3:bundle` to regenerate the committed single-file bundle. `pnpm api:v3:lint` lints the source tree; `pnpm api:v3:check` (CI) fails when the bundle is stale. **Overview migration note** The v3-backed survey overview page intentionally removes actions that are not yet exposed by this contract: `Created by` filtering, `Duplicate`, `Copy...`, `Preview`, and `Copy link`. @@ -44,8 +46,12 @@ info: auth: apps/web/app/api/v3/lib/auth.ts workspace-resolution: apps/web/app/api/v3/lib/workspace-context.ts openapi-generated: false + spec-source: docs/api-v3-reference/src (regenerate bundle with `pnpm api:v3:bundle`) pagination-model: cursor cursor-pagination: supported +servers: + - url: https://app.formbricks.com + description: Formbricks Cloud. Paths in this spec already include the `/api/v3` prefix; self-hosted instances substitute their own origin. paths: /api/v3/surveys: get: @@ -97,7 +103,11 @@ paths: type: array items: type: string - enum: [draft, inProgress, paused, completed] + enum: + - draft + - inProgress + - paused + - completed style: form explode: true description: | @@ -108,7 +118,9 @@ paths: type: array items: type: string - enum: [link, app] + enum: + - link + - app style: form explode: true description: Survey type filter (`link` / `app`). Same repeat-or-comma rules as `filter[status][in]`. @@ -116,10 +128,14 @@ paths: name: sortBy schema: type: string - enum: [createdAt, updatedAt, name, relevance] + enum: + - createdAt + - updatedAt + - name + - relevance description: Sort order. Defaults to `updatedAt`. The `cursor` token is bound to the selected sort order. responses: - "200": + '200': description: Surveys retrieved successfully headers: X-Request-Id: @@ -129,51 +145,58 @@ paths: Cache-Control: schema: type: string - example: "private, no-store" + example: private, no-store content: application/json: schema: type: object - required: [data, meta] + required: + - data + - meta properties: data: type: array items: - $ref: "#/components/schemas/SurveyListItem" + $ref: '#/components/schemas/SurveyListItem' meta: type: object - required: [limit, nextCursor, totalCount] + required: + - limit + - nextCursor + - totalCount properties: limit: type: integer nextCursor: - type: string - nullable: true + type: + - string + - 'null' description: Opaque cursor for the next page. `null` when there are no more results. totalCount: - type: integer - nullable: true + type: + - integer + - 'null' minimum: 0 description: Total number of surveys matching the current filters across all pages. `null` when `includeTotalCount=false`. - "400": + '400': description: Bad Request content: application/problem+json: schema: - $ref: "#/components/schemas/Problem" - "401": + $ref: '#/components/schemas/Problem' + '401': description: Not authenticated (no valid session or API key) content: application/problem+json: schema: - $ref: "#/components/schemas/Problem" - "403": + $ref: '#/components/schemas/Problem' + '403': description: Forbidden — no access, or workspace does not exist (404 not used; avoids existence leak) content: application/problem+json: schema: - $ref: "#/components/schemas/Problem" - "429": + $ref: '#/components/schemas/Problem' + '429': description: Rate limit exceeded headers: Retry-After: @@ -183,13 +206,13 @@ paths: content: application/problem+json: schema: - $ref: "#/components/schemas/Problem" - "500": + $ref: '#/components/schemas/Problem' + '500': description: Internal Server Error content: application/problem+json: schema: - $ref: "#/components/schemas/Problem" + $ref: '#/components/schemas/Problem' security: - sessionAuth: [] - apiKeyAuth: [] @@ -222,7 +245,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/CreateSurveyRequest" + $ref: '#/components/schemas/CreateSurveyRequest' examples: productFeedback: summary: Create a multilingual block-based survey @@ -330,7 +353,7 @@ paths: en-US: Thanks for your feedback! de-DE: Danke für dein Feedback! responses: - "201": + '201': description: Survey created successfully headers: Location: @@ -345,36 +368,37 @@ paths: Cache-Control: schema: type: string - example: "private, no-store" + example: private, no-store content: application/json: schema: type: object - required: [data] + required: + - data properties: data: - $ref: "#/components/schemas/SurveyResource" - "400": + $ref: '#/components/schemas/SurveyResource' + '400': description: | Bad Request — invalid JSON, unsupported fields, malformed multilingual maps, duplicate stable ids, or dangling logic/reference ids. content: application/problem+json: schema: - $ref: "#/components/schemas/Problem" - "401": + $ref: '#/components/schemas/Problem' + '401': description: Not authenticated (no valid session or API key) content: application/problem+json: schema: - $ref: "#/components/schemas/Problem" - "403": + $ref: '#/components/schemas/Problem' + '403': description: Forbidden — no write access, missing external URL permission, or workspace does not exist (404 not used; avoids existence leak) content: application/problem+json: schema: - $ref: "#/components/schemas/Problem" - "429": + $ref: '#/components/schemas/Problem' + '429': description: Rate limit exceeded headers: Retry-After: @@ -384,13 +408,13 @@ paths: content: application/problem+json: schema: - $ref: "#/components/schemas/Problem" - "500": + $ref: '#/components/schemas/Problem' + '500': description: Internal Server Error content: application/problem+json: schema: - $ref: "#/components/schemas/Problem" + $ref: '#/components/schemas/Problem' security: - sessionAuth: [] - apiKeyAuth: [] @@ -418,7 +442,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/GenerateSurveyRequest" + $ref: '#/components/schemas/GenerateSurveyRequest' examples: onboarding: summary: Create a link survey draft @@ -428,7 +452,7 @@ paths: language: en-US prompt: Understand why new users stop during onboarding and what would help them finish setup. responses: - "200": + '200': description: Survey create payload generated successfully. The survey has not been created yet. headers: X-Request-Id: @@ -438,15 +462,16 @@ paths: Cache-Control: schema: type: string - example: "private, no-store" + example: private, no-store content: application/json: schema: type: object - required: [data] + required: + - data properties: data: - $ref: "#/components/schemas/GenerateSurveyResult" + $ref: '#/components/schemas/GenerateSurveyResult' examples: generated: summary: Generated draft create payload @@ -497,12 +522,12 @@ paths: - code: en-US default: true enabled: true - "400": + '400': description: Malformed body or a prompt that is too short or underspecified content: application/problem+json: schema: - $ref: "#/components/schemas/Problem" + $ref: '#/components/schemas/Problem' examples: shortPrompt: summary: Prompt needs more detail @@ -515,18 +540,18 @@ paths: invalid_params: - name: prompt reason: Describe the survey goal, audience, or topic in a sentence so the AI can create a useful draft. - "401": + '401': description: Not authenticated (no valid session or API key) content: application/problem+json: schema: - $ref: "#/components/schemas/Problem" - "403": + $ref: '#/components/schemas/Problem' + '403': description: Forbidden — no write access, workspace does not exist, AI is not in plan, or AI smart tools are disabled content: application/problem+json: schema: - $ref: "#/components/schemas/Problem" + $ref: '#/components/schemas/Problem' examples: noWorkspaceWriteAccess: summary: No workspace write access @@ -544,25 +569,25 @@ paths: detail: AI smart tools are disabled for this organization. code: ai_smart_tools_disabled requestId: req_123 - "422": + '422': description: AI generated an invalid payload after schema and v3 create validation content: application/problem+json: schema: - $ref: "#/components/schemas/Problem" + $ref: '#/components/schemas/Problem' examples: invalidGeneratedPayload: summary: Invalid generated payload value: title: Unprocessable Content status: 422 - detail: "Generated survey payload is invalid: generatedSurvey.blocks: Too small" + detail: 'Generated survey payload is invalid: generatedSurvey.blocks: Too small' code: ai_generated_payload_invalid requestId: req_123 invalid_params: - name: generatedSurvey.blocks reason: Too small - "429": + '429': description: Rate limit exceeded headers: Retry-After: @@ -572,13 +597,19 @@ paths: content: application/problem+json: schema: - $ref: "#/components/schemas/Problem" - "502": + $ref: '#/components/schemas/Problem' + '500': + description: Internal Server Error + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Problem' + '502': description: The configured AI provider failed or could not produce a valid draft content: application/problem+json: schema: - $ref: "#/components/schemas/Problem" + $ref: '#/components/schemas/Problem' examples: providerFailed: summary: AI provider failed @@ -588,12 +619,12 @@ paths: detail: The AI provider could not generate a valid survey draft. Try again or add more detail. code: bad_gateway requestId: req_123 - "503": + '503': description: AI is not configured on this Formbricks instance content: application/problem+json: schema: - $ref: "#/components/schemas/Problem" + $ref: '#/components/schemas/Problem' examples: instanceNotConfigured: summary: AI instance configuration missing @@ -603,12 +634,6 @@ paths: detail: AI is not configured for this Formbricks instance. code: ai_instance_not_configured requestId: req_123 - "500": - description: Internal Server Error - content: - application/problem+json: - schema: - $ref: "#/components/schemas/Problem" security: - sessionAuth: [] - apiKeyAuth: [] @@ -630,7 +655,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ValidateSurveyRequest" + $ref: '#/components/schemas/ValidateSurveyRequest' examples: createValidation: summary: Validate a create payload @@ -665,7 +690,7 @@ paths: en-US: What should we improve? required: true responses: - "200": + '200': description: Validation completed. The survey document may still be invalid. headers: X-Request-Id: @@ -675,15 +700,16 @@ paths: Cache-Control: schema: type: string - example: "private, no-store" + example: private, no-store content: application/json: schema: type: object - required: [data] + required: + - data properties: data: - $ref: "#/components/schemas/SurveyValidationResult" + $ref: '#/components/schemas/SurveyValidationResult' examples: invalid: summary: Invalid survey document @@ -706,25 +732,25 @@ paths: default: true enabled: true writeBehavior: connect_or_create - "400": + '400': description: Malformed validation envelope, invalid route/query data, or unsupported operation content: application/problem+json: schema: - $ref: "#/components/schemas/Problem" - "401": + $ref: '#/components/schemas/Problem' + '401': description: Not authenticated (no valid session or API key) content: application/problem+json: schema: - $ref: "#/components/schemas/Problem" - "403": + $ref: '#/components/schemas/Problem' + '403': description: Forbidden — no write access, or survey/workspace does not exist content: application/problem+json: schema: - $ref: "#/components/schemas/Problem" - "429": + $ref: '#/components/schemas/Problem' + '429': description: Rate limit exceeded headers: Retry-After: @@ -734,13 +760,13 @@ paths: content: application/problem+json: schema: - $ref: "#/components/schemas/Problem" - "500": + $ref: '#/components/schemas/Problem' + '500': description: Internal Server Error content: application/problem+json: schema: - $ref: "#/components/schemas/Problem" + $ref: '#/components/schemas/Problem' security: - sessionAuth: [] - apiKeyAuth: [] @@ -772,11 +798,12 @@ paths: items: type: string examples: - - [de-DE] - - [de-DE, pt-PT] - - [de] - - [zh-Hans] - - [zh-Hans-CN] + - - de-DE + - - de-DE + - pt-PT + - - de + - - zh-Hans + - - zh-Hans-CN description: | Comma-separated language selector filter for translatable fields, for example `?lang=de-DE,pt-PT`. The response shape stays stable: translatable fields are always maps, never strings, and response @@ -789,7 +816,7 @@ paths: Disabled-but-configured languages are readable in the management API so unfinished translations can be completed. responses: - "200": + '200': description: Survey retrieved successfully headers: X-Request-Id: @@ -799,15 +826,16 @@ paths: Cache-Control: schema: type: string - example: "private, no-store" + example: private, no-store content: application/json: schema: type: object - required: [data] + required: + - data properties: data: - $ref: "#/components/schemas/SurveyResource" + $ref: '#/components/schemas/SurveyResource' examples: multilingual: summary: Multilingual authoring resource @@ -815,8 +843,8 @@ paths: data: id: clseedsurveycsat000000 workspaceId: clseedworkspace000000000 - createdAt: "2026-05-18T09:24:54.014Z" - updatedAt: "2026-05-18T09:24:54.014Z" + createdAt: '2026-05-18T09:24:54.014Z' + updatedAt: '2026-05-18T09:24:54.014Z' name: CSAT Survey type: link status: inProgress @@ -854,8 +882,8 @@ paths: data: id: clseedsurveycsat000000 workspaceId: clseedworkspace000000000 - createdAt: "2026-05-18T09:24:54.014Z" - updatedAt: "2026-05-18T09:24:54.014Z" + createdAt: '2026-05-18T09:24:54.014Z' + updatedAt: '2026-05-18T09:24:54.014Z' name: CSAT Survey type: link status: inProgress @@ -886,25 +914,25 @@ paths: hiddenFields: enabled: false variables: [] - "400": + '400': description: Invalid survey id, unsupported query parameter, unknown language, or unsupported legacy survey shape content: application/problem+json: schema: - $ref: "#/components/schemas/Problem" - "401": + $ref: '#/components/schemas/Problem' + '401': description: Not authenticated (no valid session or API key) content: application/problem+json: schema: - $ref: "#/components/schemas/Problem" - "403": + $ref: '#/components/schemas/Problem' + '403': description: Forbidden — no access, or survey does not exist (404 not used; avoids existence leak) content: application/problem+json: schema: - $ref: "#/components/schemas/Problem" - "429": + $ref: '#/components/schemas/Problem' + '429': description: Rate limit exceeded headers: Retry-After: @@ -914,13 +942,13 @@ paths: content: application/problem+json: schema: - $ref: "#/components/schemas/Problem" - "500": + $ref: '#/components/schemas/Problem' + '500': description: Internal Server Error content: application/problem+json: schema: - $ref: "#/components/schemas/Problem" + $ref: '#/components/schemas/Problem' security: - sessionAuth: [] - apiKeyAuth: [] @@ -959,7 +987,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/PatchSurveyRequest" + $ref: '#/components/schemas/PatchSurveyRequest' examples: renameSurvey: summary: Rename a survey @@ -989,7 +1017,7 @@ paths: range: 5 scale: smiley responses: - "200": + '200': description: Survey updated successfully headers: X-Request-Id: @@ -999,16 +1027,17 @@ paths: Cache-Control: schema: type: string - example: "private, no-store" + example: private, no-store content: application/json: schema: type: object - required: [data] + required: + - data properties: data: - $ref: "#/components/schemas/SurveyResource" - "400": + $ref: '#/components/schemas/SurveyResource' + '400': description: | Bad Request — malformed JSON, unsupported query parameter, unsupported field, invalid locale map, duplicate id, immutable element id change, dangling reference, @@ -1016,20 +1045,20 @@ paths: content: application/problem+json: schema: - $ref: "#/components/schemas/Problem" - "401": + $ref: '#/components/schemas/Problem' + '401': description: Not authenticated (no valid session or API key) content: application/problem+json: schema: - $ref: "#/components/schemas/Problem" - "403": + $ref: '#/components/schemas/Problem' + '403': description: Forbidden — no write access, or survey does not exist (404 not used; avoids existence leak) content: application/problem+json: schema: - $ref: "#/components/schemas/Problem" - "429": + $ref: '#/components/schemas/Problem' + '429': description: Rate limit exceeded headers: Retry-After: @@ -1039,13 +1068,13 @@ paths: content: application/problem+json: schema: - $ref: "#/components/schemas/Problem" - "500": + $ref: '#/components/schemas/Problem' + '500': description: Internal Server Error content: application/problem+json: schema: - $ref: "#/components/schemas/Problem" + $ref: '#/components/schemas/Problem' security: - sessionAuth: [] - apiKeyAuth: [] @@ -1064,7 +1093,7 @@ paths: format: cuid2 description: Survey identifier. responses: - "204": + '204': description: Survey deleted successfully headers: X-Request-Id: @@ -1074,26 +1103,26 @@ paths: Cache-Control: schema: type: string - example: "private, no-store" - "400": + example: private, no-store + '400': description: Bad Request content: application/problem+json: schema: - $ref: "#/components/schemas/Problem" - "401": + $ref: '#/components/schemas/Problem' + '401': description: Not authenticated (no valid session or API key) content: application/problem+json: schema: - $ref: "#/components/schemas/Problem" - "403": + $ref: '#/components/schemas/Problem' + '403': description: Forbidden — no access, or survey does not exist (404 not used; avoids existence leak) content: application/problem+json: schema: - $ref: "#/components/schemas/Problem" - "429": + $ref: '#/components/schemas/Problem' + '429': description: Rate limit exceeded headers: Retry-After: @@ -1103,17 +1132,16 @@ paths: content: application/problem+json: schema: - $ref: "#/components/schemas/Problem" - "500": + $ref: '#/components/schemas/Problem' + '500': description: Internal Server Error content: application/problem+json: schema: - $ref: "#/components/schemas/Problem" + $ref: '#/components/schemas/Problem' security: - sessionAuth: [] - apiKeyAuth: [] - components: securitySchemes: sessionAuth: @@ -1130,120 +1158,198 @@ components: description: | Management API key; must include **workspaceId** as an allowed workspace with read, write, or manage permission. schemas: - LocaleCode: - type: string - pattern: ^[a-z]{2}(?:-[A-Z][a-z]{3})?-[A-Z]{2}$ - description: Canonical locale code accepted by v3 survey APIs, for example `en-US`, `de-DE`, or `zh-Hans-CN`. - example: en-US - AISurveyGenerationLocaleCode: - type: string - enum: - - de-DE - - en-US - - es-ES - - fr-FR - - hu-HU - - ja-JP - - nl-NL - - pt-BR - - pt-PT - - ro-RO - - ru-RU - - sv-SE - - tr-TR - - zh-Hans-CN - - zh-Hant-TW - description: Supported app locale code that AI survey creation can return. - example: en-US - CreateSurveyRequest: + SurveyListItem: type: object description: | - Strict v3 survey creation document. This endpoint accepts survey structure only: name, - metadata, languages, welcome card, blocks/elements/logic, endings, hidden fields, and variables. - It rejects legacy `questions` and out-of-scope settings such as styling, targeting, segments, - follow-ups, recaptcha, single-use/email verification, slug, custom scripts, analytics fields, - timestamps, and `createdBy`. - - Translatable fields use real locale-code maps. The map must include the canonical - `defaultLanguage` key, such as `en-US`, so the server can persist the internal default - translation. Locale keys must be canonical BCP 47 codes such as `de-DE`, `pt-PT`, or - `zh-Hans-CN`. Non-default locale keys must be declared in `languages`; undeclared locale - keys in metadata, welcome cards, blocks, or endings are rejected with `unsupported_locale`. - - `blocks[].id` and `variables[].id` may be omitted on create and will be generated by the - server. Provide explicit cuid2 ids when other fields in the same request reference them. - For normal sequential flow, omit `logicFallback`. It is only valid together with a non-empty - `logic` array on the same block. - required: [workspaceId, name, blocks] + Shape returned by `GET /api/v3/surveys`. Serialized dates are ISO 8601 strings. + The v3 overview contract intentionally omits internal fields such as `_count`. + Legacy DB rows may include survey **type** values `website` or `web` (see Prisma); filter **type** only accepts `link` | `app`. properties: + id: + type: string + name: + type: string workspaceId: type: string - format: cuid2 - description: Workspace where the survey will be created. Requires read/write access. + type: + type: string + enum: + - link + - app + - website + - web + status: + type: string + enum: + - draft + - inProgress + - paused + - completed + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + responseCount: + type: integer + creator: + type: + - object + - 'null' + properties: + name: + type: string + singleUse: + type: + - object + - 'null' + properties: + enabled: + type: boolean + isEncrypted: + type: boolean + InvalidParam: + type: object + description: | + Field-level validation error. `name` and `reason` are always intended for humans. + Optional machine-readable fields are included when the API can identify the semantic error, + especially for survey locale, identifier, and reference validation used by MCP and agent clients. + required: + - name + - reason + properties: name: type: string - minLength: 1 + description: Dot-path to the invalid request field. + reason: + type: string + description: Human-readable repair guidance. + code: + type: string + enum: + - dangling_reference + - duplicate_identifier + - duplicate_locale + - forbidden_identifier + - immutable_identifier + - invalid_locale + - invalid_reference + - missing_required_field + - missing_translation + - unsupported_field + - unsupported_locale + description: Machine-readable validation category, when available. + identifier: + type: string + description: Identifier involved in the validation failure, when available. For language errors, this can be the normalized language code. + referenceType: + type: string + enum: + - block + - element + - ending + - hiddenField + - language + - variable + - variableName + - recall + description: Identifier namespace involved in the validation failure. + missingId: + type: string + description: Referenced id that does not exist in the submitted survey document. + firstUsedAt: + type: string + description: Dot-path where a duplicate identifier was first used. + conflictsWith: + type: string + description: Dot-path to the existing identifier that conflicts with this field. + additionalProperties: false + Problem: + type: object + description: RFC 9457 Problem Details for HTTP APIs (`application/problem+json`). Responses typically include a machine-readable `code` field alongside `title`, `status`, `detail`, and `requestId`. + required: + - title + - status + - detail + - requestId + properties: type: type: string - enum: [link, app] - default: link - description: | - Optional compatibility field. `link` and `app` survey types are accepted here; app/in-app - survey distribution settings remain outside this structure-focused create endpoint. + format: uri + title: + type: string status: + type: integer + detail: type: string - enum: [draft, inProgress, paused, completed] - default: draft - metadata: - allOf: - - $ref: "#/components/schemas/SurveyMetadata" - default: {} - defaultLanguage: - allOf: - - $ref: "#/components/schemas/LocaleCode" - default: en-US - description: Default authoring locale. Translatable maps must include this locale key. - languages: - type: array - default: [] - items: - $ref: "#/components/schemas/CreateSurveyLanguage" - description: | - Optional survey language configuration. Every non-default locale used by translatable maps - must be declared here; omitted languages are not inferred from map keys. - welcomeCard: - allOf: - - $ref: "#/components/schemas/SurveyWelcomeCard" - default: - enabled: false - blocks: - type: array - minItems: 1 - items: - $ref: "#/components/schemas/CreateSurveyBlock" - endings: - type: array - default: [] - items: - $ref: "#/components/schemas/SurveyEnding" - hiddenFields: - allOf: - - $ref: "#/components/schemas/SurveyHiddenFields" - default: - enabled: false - variables: + instance: + type: string + code: + type: string + enum: + - ai_features_not_enabled + - ai_generated_payload_invalid + - ai_instance_not_configured + - ai_smart_tools_disabled + - bad_gateway + - bad_request + - forbidden + - internal_server_error + - not_authenticated + - too_many_requests + - unprocessable_content + requestId: + type: string + details: + type: object + invalid_params: type: array - default: [] items: - $ref: "#/components/schemas/CreateSurveyVariable" - additionalProperties: false + $ref: '#/components/schemas/InvalidParam' + TranslatableTextMap: + type: object + description: Multilingual text map keyed by the emitted `languages[].code` values for this survey. + propertyNames: + type: string + description: Survey language code/tag, for example `en-US`, `de-DE`, or `zh-Hans-CN`. + additionalProperties: + type: string + TranslatableText: + allOf: + - $ref: '#/components/schemas/TranslatableTextMap' + description: | + Survey authoring text. `GET /api/v3/surveys/{surveyId}` always returns maps keyed by the emitted + `languages[].code` values for this survey. Use `?lang=` to filter which language keys are included. + The internal storage key `default` is never exposed by v3. + examples: + - en-US: What should we improve? + de-DE: Was sollten wir verbessern? + SurveyMetadata: + type: object + description: | + Arbitrary JSON survey context for customer- or operation-specific metadata. v3 preserves + arbitrary metadata values as-is. If present, `title` and `description` are treated as + translatable text maps and returned with real locale-code keys. + properties: + title: + $ref: '#/components/schemas/TranslatableText' + description: + $ref: '#/components/schemas/TranslatableText' + additionalProperties: true + LocaleCode: + type: string + pattern: ^[a-z]{2}(?:-[A-Z][a-z]{3})?-[A-Z]{2}$ + description: Canonical locale code accepted by v3 survey APIs, for example `en-US`, `de-DE`, or `zh-Hans-CN`. + example: en-US CreateSurveyLanguage: type: object description: Language to connect to the created survey. `default`, if provided, must match `defaultLanguage`. - required: [code] + required: + - code properties: code: - $ref: "#/components/schemas/LocaleCode" + $ref: '#/components/schemas/LocaleCode' default: type: boolean description: Optional marker for readability; only the `defaultLanguage` entry may set this to true. @@ -1252,619 +1358,40 @@ components: default: true description: Whether this language is enabled for respondent-facing delivery. additionalProperties: false - GenerateSurveyRequest: + SurveyWelcomeCard: type: object - description: | - AI survey creation request. `prompt` is used only to create a draft payload; it is not - persisted by this endpoint. The generated payload is validated and returned to the caller for - a separate create request. - required: [workspaceId, prompt] + description: Optional card shown before the first survey block. + required: + - enabled properties: - workspaceId: + enabled: + type: boolean + headline: + $ref: '#/components/schemas/TranslatableText' + subheader: + $ref: '#/components/schemas/TranslatableText' + buttonLabel: + $ref: '#/components/schemas/TranslatableText' + fileUrl: type: string - format: cuid2 - description: Workspace where the AI-created survey draft would be created. Requires read/write access. - prompt: + videoUrl: type: string - minLength: 4 - maxLength: 1200 - description: | - Natural-language survey goal and audience. Prompts with fewer than 24 characters or fewer - than four whitespace-separated words return prompt feedback before any AI provider call. - type: - type: string - enum: [link] - default: link - description: Link Survey is the only AI-created type until the v3 create endpoint supports additional types. - language: - $ref: "#/components/schemas/AISurveyGenerationLocaleCode" - description: | - Preferred survey language. Session clients should send the logged-in user's language. - The generator uses it when the prompt language is ambiguous or cannot be confidently - matched to a supported app locale. - additionalProperties: false - GenerateSurveyResult: - type: object - required: [language, payload, validation] - properties: - language: - $ref: "#/components/schemas/AISurveyGenerationLocaleCode" - description: Supported app locale used for the AI-created survey content and create payload language maps. - payload: - allOf: - - $ref: "#/components/schemas/CreateSurveyRequest" - description: | - Strict create payload ready for `POST /api/v3/surveys`. It always has `status: draft`. - validation: - $ref: "#/components/schemas/GeneratedSurveyValidationResult" - additionalProperties: false - GeneratedSurveyValidationResult: - type: object - required: [valid, invalid_params, languages] - properties: - valid: - type: boolean - description: Whether the generated create payload passed the same v3 create preparation pipeline. - invalid_params: - type: array - description: Repairable validation errors. Successful generate responses return an empty array. - items: - $ref: "#/components/schemas/InvalidParam" - languages: - type: array - description: Languages that the generated create payload would connect or create. - items: - $ref: "#/components/schemas/GeneratedSurveyValidationLanguage" - additionalProperties: false - GeneratedSurveyValidationLanguage: - type: object - required: [code, default, enabled] - properties: - code: - $ref: "#/components/schemas/AISurveyGenerationLocaleCode" - default: - type: boolean - enabled: - type: boolean - additionalProperties: false - PatchSurveyRequest: - type: object - minProperties: 1 - description: | - Patch payload shape. Top-level fields are partial; any provided nested object or array - fully replaces that subtree. Omitted top-level fields are preserved. Immutable/system fields - such as `id`, `workspaceId`, `type`, `defaultLanguage`, timestamps, `questions`, analytics, - distribution, styling, targeting, and scripts are rejected. - - `metadata`, `languages`, `welcomeCard`, `blocks`, `endings`, `hiddenFields`, and `variables` - replace their full top-level value when provided. Missing ids in replaced arrays are deletions. - Non-default locale keys in translatable maps must be declared in `languages`; undeclared locale - keys are rejected with `unsupported_locale`. To remove a language, remove it from both - `languages` and every translatable map that contains that locale key. - Use `/api/v3/surveys/validate` with `operation: patch` before committing automated or agentic - changes. - properties: - name: - type: string - minLength: 1 - status: - type: string - enum: [draft, inProgress, paused, completed] - metadata: - allOf: - - $ref: "#/components/schemas/SurveyMetadata" - languages: - type: array - items: - $ref: "#/components/schemas/CreateSurveyLanguage" - description: | - Replaces the survey language configuration. The default language cannot be changed through - PATCH; any `default: true` entry must match the existing default language. Languages referenced - by `metadata`, `welcomeCard`, `blocks`, or `endings` translatable maps must be explicitly - declared here, so remove the locale key from those maps as well when intentionally removing - a language. - welcomeCard: - $ref: "#/components/schemas/SurveyWelcomeCard" - blocks: - type: array - minItems: 1 - items: - $ref: "#/components/schemas/SurveyBlock" - endings: - type: array - items: - $ref: "#/components/schemas/SurveyEnding" - hiddenFields: - $ref: "#/components/schemas/SurveyHiddenFields" - variables: - type: array - items: - $ref: "#/components/schemas/SurveyVariable" - additionalProperties: false - ValidateSurveyRequest: - oneOf: - - $ref: "#/components/schemas/ValidateSurveyCreateRequest" - - $ref: "#/components/schemas/ValidateSurveyPatchRequest" - discriminator: - propertyName: operation - mapping: - create: "#/components/schemas/ValidateSurveyCreateRequest" - patch: "#/components/schemas/ValidateSurveyPatchRequest" - ValidateSurveyCreateRequest: - type: object - required: [operation, data] - properties: - operation: - type: string - enum: [create] - data: - description: Intended create payload. Invalid documents are allowed so the endpoint can return repairable validation errors. - anyOf: - - $ref: "#/components/schemas/CreateSurveyRequest" - - type: object - additionalProperties: true - additionalProperties: false - ValidateSurveyPatchRequest: - type: object - required: [operation, surveyId, data] - properties: - operation: - type: string - enum: [patch] - surveyId: - type: string - format: cuid2 - data: - description: Intended patch payload. Invalid documents are allowed so the endpoint can return repairable validation errors. - anyOf: - - $ref: "#/components/schemas/PatchSurveyRequest" - - type: object - additionalProperties: true - additionalProperties: false - SurveyValidationResult: - type: object - required: [valid, operation, invalid_params] - properties: - valid: - type: boolean - description: Whether the submitted survey document is valid. - operation: - type: string - enum: [create, patch] - invalid_params: - type: array - description: Repairable validation errors using document-relative paths. - items: - $ref: "#/components/schemas/InvalidParam" - languages: - type: array - description: Languages that a successful write would connect or create. Present only when `valid=true`. - items: - $ref: "#/components/schemas/SurveyValidationLanguage" - additionalProperties: false - SurveyValidationLanguage: - type: object - required: [code, default, enabled, writeBehavior] - properties: - code: - $ref: "#/components/schemas/LocaleCode" - default: - type: boolean - enabled: - type: boolean - writeBehavior: - type: string - enum: [connect_or_create] - description: Validation is read-only; a real write would connect an existing language or create it if missing. - additionalProperties: false - SurveyListItem: - type: object - description: | - Shape returned by `GET /api/v3/surveys`. Serialized dates are ISO 8601 strings. - The v3 overview contract intentionally omits internal fields such as `_count`. - Legacy DB rows may include survey **type** values `website` or `web` (see Prisma); filter **type** only accepts `link` | `app`. - properties: - id: - type: string - name: - type: string - workspaceId: - type: string - type: - type: string - enum: [link, app, website, web] - status: - type: string - enum: [draft, inProgress, paused, completed] - createdAt: - type: string - format: date-time - updatedAt: - type: string - format: date-time - responseCount: - type: integer - creator: - type: object - nullable: true - properties: - name: - type: string - singleUse: - type: object - nullable: true - properties: - enabled: - type: boolean - isEncrypted: - type: boolean - TranslatableText: - allOf: - - $ref: "#/components/schemas/TranslatableTextMap" - description: | - Survey authoring text. `GET /api/v3/surveys/{surveyId}` always returns maps keyed by the emitted - `languages[].code` values for this survey. Use `?lang=` to filter which language keys are included. - The internal storage key `default` is never exposed by v3. - examples: - - en-US: What should we improve? - de-DE: Was sollten wir verbessern? - TranslatableTextMap: - type: object - description: Multilingual text map keyed by the emitted `languages[].code` values for this survey. - propertyNames: - type: string - description: Survey language code/tag, for example `en-US`, `de-DE`, `vi`, or `zh-Hans`. - additionalProperties: - type: string - SurveyMetadata: - type: object - description: | - Arbitrary JSON survey context for customer- or operation-specific metadata. v3 preserves - arbitrary metadata values as-is. If present, `title` and `description` are treated as - translatable text maps and returned with real locale-code keys. - properties: - title: - $ref: "#/components/schemas/TranslatableText" - description: - $ref: "#/components/schemas/TranslatableText" - additionalProperties: true - SurveyLanguage: - type: object - description: | - Language configured for this survey. GET responses expose the server-emitted code/tag used as the - translatable map key. Existing surveys can use region-qualified, language-only, or script-only codes. - Disabled languages can still be read by the management API so unfinished translations can be completed. - required: [code, default, enabled] - properties: - code: - type: string - description: Server-emitted survey language code/tag used as the translatable map key. - example: en-US - alias: - type: string - nullable: true - description: Optional configured alias accepted by `?lang` for compatibility and agent discovery. - example: english - default: - type: boolean - description: Whether this is the default authoring language. - enabled: - type: boolean - description: Whether this language is enabled for respondent-facing delivery. - SurveyWelcomeCard: - type: object - description: Optional card shown before the first survey block. - required: [enabled] - properties: - enabled: - type: boolean - headline: - $ref: "#/components/schemas/TranslatableText" - subheader: - $ref: "#/components/schemas/TranslatableText" - buttonLabel: - $ref: "#/components/schemas/TranslatableText" - fileUrl: - type: string - videoUrl: - type: string - timeToFinish: - type: boolean - showResponseCount: - type: boolean - additionalProperties: false - SurveyHiddenFields: - type: object - description: | - Hidden fields, sometimes called embedded data in other survey products. Field ids are stable - public identifiers and may be referenced by logic, recall, quotas, integrations, and response data. - Use only letters, numbers, underscores, and hyphens; avoid spaces and reserved ids. - required: [enabled] - properties: - enabled: - type: boolean - fieldIds: - type: array - items: - type: string - pattern: "^[a-zA-Z0-9_-]+$" - uniqueItems: true - additionalProperties: false - SurveyVariable: - oneOf: - - $ref: "#/components/schemas/SurveyNumberVariable" - - $ref: "#/components/schemas/SurveyTextVariable" - description: | - Survey variable. Variable ids are stable references used by logic and calculation actions. - Variable names are human-readable labels and must be unique within the survey. - CreateSurveyVariable: - oneOf: - - $ref: "#/components/schemas/CreateSurveyNumberVariable" - - $ref: "#/components/schemas/CreateSurveyTextVariable" - description: | - Survey variable accepted by `POST /api/v3/surveys`. `id` may be omitted and will be - generated by the server. Provide an explicit cuid2 id when logic in the same request needs - to reference this variable. - CreateSurveyNumberVariable: - type: object - required: [name, type, value] - properties: - id: - type: string - format: cuid2 - description: Optional stable variable id. Generated when omitted. - name: - type: string - pattern: "^[a-z0-9_]+$" - description: Unique variable name. Lowercase letters, numbers, and underscores only. - type: - type: string - enum: [number] - value: - type: number - description: Default numeric value. - additionalProperties: false - CreateSurveyTextVariable: - type: object - required: [name, type, value] - properties: - id: - type: string - format: cuid2 - description: Optional stable variable id. Generated when omitted. - name: - type: string - pattern: "^[a-z0-9_]+$" - description: Unique variable name. Lowercase letters, numbers, and underscores only. - type: - type: string - enum: [text] - value: - type: string - description: Default text value. - additionalProperties: false - SurveyNumberVariable: - type: object - description: | - Number variable. Used by `calculate` logic actions with numeric operators such as `add`, - `subtract`, `multiply`, `divide`, or `assign`. - required: [id, name, type, value] - properties: - id: - type: string - format: cuid2 - description: Stable variable id referenced from logic. - name: - type: string - pattern: "^[a-z0-9_]+$" - description: Unique variable name. Lowercase letters, numbers, and underscores only. - type: - type: string - enum: [number] - value: - type: number - description: Default numeric value. - additionalProperties: false - SurveyTextVariable: - type: object - description: | - Text variable. Used by `calculate` logic actions with text operators such as `assign` or `concat`. - required: [id, name, type, value] - properties: - id: - type: string - format: cuid2 - description: Stable variable id referenced from logic. - name: - type: string - pattern: "^[a-z0-9_]+$" - description: Unique variable name. Lowercase letters, numbers, and underscores only. - type: - type: string - enum: [text] - value: - type: string - description: Default text value. - additionalProperties: false - SurveyEnding: - oneOf: - - $ref: "#/components/schemas/SurveyEndScreenEnding" - - $ref: "#/components/schemas/SurveyRedirectEnding" - discriminator: - propertyName: type - mapping: - endScreen: "#/components/schemas/SurveyEndScreenEnding" - redirectToUrl: "#/components/schemas/SurveyRedirectEnding" - description: | - Ending reached after the last block or a jump action. `type` selects the allowed shape; - unsupported fields are rejected instead of ignored. - SurveyEndScreenEnding: - type: object - description: Visual end screen displayed after survey completion. - required: [id, type] - properties: - id: - type: string - format: cuid2 - description: Stable ending id. `jumpToBlock.target` may point to this id. - type: - type: string - enum: [endScreen] - headline: - $ref: "#/components/schemas/TranslatableText" - subheader: - $ref: "#/components/schemas/TranslatableText" - buttonLabel: - $ref: "#/components/schemas/TranslatableText" - buttonLink: - type: string - imageUrl: - type: string - videoUrl: - type: string - additionalProperties: false - SurveyRedirectEnding: - type: object - description: | - Redirects the respondent to a URL after survey completion. External redirects require the - organization's external URL permission; otherwise write endpoints return `403 Forbidden`. - required: [id, type, url] - properties: - id: - type: string - format: cuid2 - description: Stable ending id. `jumpToBlock.target` may point to this id. - type: - type: string - enum: [redirectToUrl] - url: - type: string - description: External redirect URL. Requires the organization's external URL permission. - label: - type: string - description: Optional internal label for redirect endings. - additionalProperties: false - SurveyBlock: - type: object - description: | - Block-based survey section. Block ids are stable public identifiers. Logic and fallbacks can - jump to block ids or ending ids, so clients and agents should preserve ids unless intentionally - creating/deleting a block. - required: [id, name, elements] - properties: - id: - type: string - format: cuid2 - description: Stable block id. - name: - type: string - minLength: 1 - elements: - type: array - minItems: 1 - items: - $ref: "#/components/schemas/SurveyElement" - logic: - type: array - items: - $ref: "#/components/schemas/SurveyBlockLogic" - logicFallback: - type: string - format: cuid2 - description: | - Block or ending id used when no logic condition matches. Only valid when this same block - has at least one `logic` rule; omit it for normal sequential flow. - buttonLabel: - $ref: "#/components/schemas/TranslatableText" - backButtonLabel: - $ref: "#/components/schemas/TranslatableText" - additionalProperties: false - CreateSurveyBlock: - type: object - description: | - Block accepted by `POST /api/v3/surveys`. `id` may be omitted and will be generated by the - server. Provide an explicit cuid2 id when logic in the same request needs to jump to this block. - For normal sequential flow, omit `logic` and `logicFallback`. `logicFallback` is only valid - when this same block has at least one `logic` rule. - required: [name, elements] - properties: - id: - type: string - format: cuid2 - description: Optional stable block id. Generated when omitted. - name: - type: string - minLength: 1 - elements: - type: array - minItems: 1 - items: - $ref: "#/components/schemas/SurveyElement" - logic: - type: array - items: - $ref: "#/components/schemas/SurveyBlockLogic" - logicFallback: - type: string - format: cuid2 - description: | - Block or ending id used when no logic condition matches. Only valid when this same block - has at least one `logic` rule; omit it for normal sequential flow. - buttonLabel: - $ref: "#/components/schemas/TranslatableText" - backButtonLabel: - $ref: "#/components/schemas/TranslatableText" + timeToFinish: + type: boolean + showResponseCount: + type: boolean additionalProperties: false - SurveyElement: - oneOf: - - $ref: "#/components/schemas/SurveyOpenTextElement" - - $ref: "#/components/schemas/SurveyConsentElement" - - $ref: "#/components/schemas/SurveyMultipleChoiceSingleElement" - - $ref: "#/components/schemas/SurveyMultipleChoiceMultiElement" - - $ref: "#/components/schemas/SurveyNpsElement" - - $ref: "#/components/schemas/SurveyCtaElement" - - $ref: "#/components/schemas/SurveyRatingElement" - - $ref: "#/components/schemas/SurveyPictureSelectionElement" - - $ref: "#/components/schemas/SurveyDateElement" - - $ref: "#/components/schemas/SurveyFileUploadElement" - - $ref: "#/components/schemas/SurveyCalElement" - - $ref: "#/components/schemas/SurveyMatrixElement" - - $ref: "#/components/schemas/SurveyAddressElement" - - $ref: "#/components/schemas/SurveyRankingElement" - - $ref: "#/components/schemas/SurveyContactInfoElement" - - $ref: "#/components/schemas/SurveyCsatElement" - - $ref: "#/components/schemas/SurveyCesElement" - discriminator: - propertyName: type - mapping: - openText: "#/components/schemas/SurveyOpenTextElement" - consent: "#/components/schemas/SurveyConsentElement" - multipleChoiceSingle: "#/components/schemas/SurveyMultipleChoiceSingleElement" - multipleChoiceMulti: "#/components/schemas/SurveyMultipleChoiceMultiElement" - nps: "#/components/schemas/SurveyNpsElement" - cta: "#/components/schemas/SurveyCtaElement" - rating: "#/components/schemas/SurveyRatingElement" - pictureSelection: "#/components/schemas/SurveyPictureSelectionElement" - date: "#/components/schemas/SurveyDateElement" - fileUpload: "#/components/schemas/SurveyFileUploadElement" - cal: "#/components/schemas/SurveyCalElement" - matrix: "#/components/schemas/SurveyMatrixElement" - address: "#/components/schemas/SurveyAddressElement" - ranking: "#/components/schemas/SurveyRankingElement" - contactInfo: "#/components/schemas/SurveyContactInfoElement" - csat: "#/components/schemas/SurveyCsatElement" - ces: "#/components/schemas/SurveyCesElement" - description: | - Survey element/question inside a block. Element ids are stable public identifiers used by - logic, recall strings, response data, quotas, integrations, and analysis. `type` selects the - allowed shape; unsupported fields are rejected instead of ignored. SurveyElementBase: type: object - required: [id, type, headline, required] + required: + - id + - type + - headline + - required properties: id: type: string - pattern: "^[a-zA-Z0-9_-]+$" + pattern: ^[a-zA-Z0-9_-]+$ description: Stable element id. Avoid spaces and reserved ids. type: type: string @@ -1887,9 +1414,9 @@ components: - ranking - contactInfo headline: - $ref: "#/components/schemas/TranslatableText" + $ref: '#/components/schemas/TranslatableText' subheader: - $ref: "#/components/schemas/TranslatableText" + $ref: '#/components/schemas/TranslatableText' required: type: boolean imageUrl: @@ -1899,153 +1426,313 @@ components: isDraft: type: boolean description: Draft marker used by the editor and future update rules. + SurveyCharLimit: + type: object + description: Optional `openText` character limit configuration. + properties: + enabled: + type: boolean + default: false + min: + type: number + max: + type: number + additionalProperties: false + SurveyValidationRule: + type: object + required: + - id + - type + - params + properties: + id: + type: string + type: + type: string + enum: + - minLength + - maxLength + - pattern + - email + - url + - phone + - equals + - doesNotEqual + - contains + - doesNotContain + - minValue + - maxValue + - isGreaterThan + - isLessThan + - minSelections + - maxSelections + - minRanked + - rankAll + - minRowsAnswered + - answerAllRows + - isLaterThan + - isEarlierThan + - isBetween + - isNotBetween + - fileExtensionIs + - fileExtensionIsNot + params: + type: object + additionalProperties: true + field: + type: string + enum: + - addressLine1 + - addressLine2 + - city + - state + - zip + - country + - firstName + - lastName + - email + - phone + - company + additionalProperties: false + SurveyValidation: + type: object + description: Optional element-level validation rules. + required: + - rules + properties: + logic: + type: string + enum: + - and + - or + default: and + rules: + type: array + items: + $ref: '#/components/schemas/SurveyValidationRule' + additionalProperties: false SurveyOpenTextElement: allOf: - - $ref: "#/components/schemas/SurveyElementBase" + - $ref: '#/components/schemas/SurveyElementBase' - type: object properties: type: type: string - enum: [openText] + enum: + - openText placeholder: - $ref: "#/components/schemas/TranslatableText" + $ref: '#/components/schemas/TranslatableText' longAnswer: type: boolean inputType: type: string - enum: [text, email, url, number, phone] + enum: + - text + - email + - url + - number + - phone default: text insightsEnabled: type: boolean default: false charLimit: - $ref: "#/components/schemas/SurveyCharLimit" + $ref: '#/components/schemas/SurveyCharLimit' validation: - $ref: "#/components/schemas/SurveyValidation" + $ref: '#/components/schemas/SurveyValidation' unevaluatedProperties: false SurveyConsentElement: allOf: - - $ref: "#/components/schemas/SurveyElementBase" + - $ref: '#/components/schemas/SurveyElementBase' - type: object - required: [label] + required: + - label properties: type: type: string - enum: [consent] + enum: + - consent label: - $ref: "#/components/schemas/TranslatableText" + $ref: '#/components/schemas/TranslatableText' validation: - $ref: "#/components/schemas/SurveyValidation" + $ref: '#/components/schemas/SurveyValidation' unevaluatedProperties: false + SurveyChoice: + type: object + required: + - id + - label + properties: + id: + type: string + description: Stable choice id. + label: + $ref: '#/components/schemas/TranslatableText' + additionalProperties: false + SurveyShuffleOption: + type: string + enum: + - none + - all + - exceptLast + - reverseOrderOccasionally + - reverseOrderExceptLast + SurveyMultipleChoiceDisplayType: + type: string + enum: + - list + - dropdown SurveyMultipleChoiceSingleElement: allOf: - - $ref: "#/components/schemas/SurveyElementBase" + - $ref: '#/components/schemas/SurveyElementBase' - type: object - required: [choices] + required: + - choices properties: type: type: string - enum: [multipleChoiceSingle] + enum: + - multipleChoiceSingle choices: type: array minItems: 2 items: - $ref: "#/components/schemas/SurveyChoice" + $ref: '#/components/schemas/SurveyChoice' shuffleOption: - $ref: "#/components/schemas/SurveyShuffleOption" + $ref: '#/components/schemas/SurveyShuffleOption' otherOptionPlaceholder: - $ref: "#/components/schemas/TranslatableText" + $ref: '#/components/schemas/TranslatableText' displayType: - $ref: "#/components/schemas/SurveyMultipleChoiceDisplayType" + $ref: '#/components/schemas/SurveyMultipleChoiceDisplayType' unevaluatedProperties: false SurveyMultipleChoiceMultiElement: allOf: - - $ref: "#/components/schemas/SurveyElementBase" + - $ref: '#/components/schemas/SurveyElementBase' - type: object - required: [choices] + required: + - choices properties: type: type: string - enum: [multipleChoiceMulti] + enum: + - multipleChoiceMulti choices: type: array minItems: 2 items: - $ref: "#/components/schemas/SurveyChoice" + $ref: '#/components/schemas/SurveyChoice' shuffleOption: - $ref: "#/components/schemas/SurveyShuffleOption" + $ref: '#/components/schemas/SurveyShuffleOption' otherOptionPlaceholder: - $ref: "#/components/schemas/TranslatableText" + $ref: '#/components/schemas/TranslatableText' validation: - $ref: "#/components/schemas/SurveyValidation" + $ref: '#/components/schemas/SurveyValidation' displayType: - $ref: "#/components/schemas/SurveyMultipleChoiceDisplayType" + $ref: '#/components/schemas/SurveyMultipleChoiceDisplayType' unevaluatedProperties: false SurveyNpsElement: allOf: - - $ref: "#/components/schemas/SurveyElementBase" + - $ref: '#/components/schemas/SurveyElementBase' - type: object properties: type: type: string - enum: [nps] + enum: + - nps lowerLabel: - $ref: "#/components/schemas/TranslatableText" + $ref: '#/components/schemas/TranslatableText' upperLabel: - $ref: "#/components/schemas/TranslatableText" + $ref: '#/components/schemas/TranslatableText' isColorCodingEnabled: type: boolean default: false unevaluatedProperties: false SurveyCtaElement: allOf: - - $ref: "#/components/schemas/SurveyElementBase" + - $ref: '#/components/schemas/SurveyElementBase' - type: object description: If `buttonExternal` is true, `buttonUrl` and `ctaButtonLabel` are required. properties: type: type: string - enum: [cta] + enum: + - cta buttonExternal: type: boolean default: false buttonUrl: type: string ctaButtonLabel: - $ref: "#/components/schemas/TranslatableText" + $ref: '#/components/schemas/TranslatableText' + - if: + required: + - buttonExternal + properties: + buttonExternal: + const: true + then: + required: + - buttonUrl + - ctaButtonLabel unevaluatedProperties: false SurveyRatingElement: allOf: - - $ref: "#/components/schemas/SurveyElementBase" + - $ref: '#/components/schemas/SurveyElementBase' - type: object - required: [scale, range] + required: + - scale + - range properties: type: type: string - enum: [rating] + enum: + - rating scale: type: string - enum: [number, smiley, star] + enum: + - number + - smiley + - star range: type: integer - enum: [3, 4, 5, 6, 7, 10] + enum: + - 3 + - 4 + - 5 + - 6 + - 7 + - 10 lowerLabel: - $ref: "#/components/schemas/TranslatableText" + $ref: '#/components/schemas/TranslatableText' upperLabel: - $ref: "#/components/schemas/TranslatableText" + $ref: '#/components/schemas/TranslatableText' isColorCodingEnabled: type: boolean default: false unevaluatedProperties: false + SurveyPictureChoice: + type: object + required: + - id + - imageUrl + properties: + id: + type: string + description: Stable picture choice id. + imageUrl: + type: string + additionalProperties: false SurveyPictureSelectionElement: allOf: - - $ref: "#/components/schemas/SurveyElementBase" + - $ref: '#/components/schemas/SurveyElementBase' - type: object - required: [choices] + required: + - choices properties: type: type: string - enum: [pictureSelection] + enum: + - pictureSelection allowMulti: type: boolean default: false @@ -2053,36 +1740,43 @@ components: type: array minItems: 2 items: - $ref: "#/components/schemas/SurveyPictureChoice" + $ref: '#/components/schemas/SurveyPictureChoice' validation: - $ref: "#/components/schemas/SurveyValidation" + $ref: '#/components/schemas/SurveyValidation' unevaluatedProperties: false SurveyDateElement: allOf: - - $ref: "#/components/schemas/SurveyElementBase" + - $ref: '#/components/schemas/SurveyElementBase' - type: object - required: [format] + required: + - format properties: type: type: string - enum: [date] + enum: + - date html: - $ref: "#/components/schemas/TranslatableText" + $ref: '#/components/schemas/TranslatableText' format: type: string - enum: [M-d-y, d-M-y, y-M-d] + enum: + - M-d-y + - d-M-y + - y-M-d validation: - $ref: "#/components/schemas/SurveyValidation" + $ref: '#/components/schemas/SurveyValidation' unevaluatedProperties: false SurveyFileUploadElement: allOf: - - $ref: "#/components/schemas/SurveyElementBase" + - $ref: '#/components/schemas/SurveyElementBase' - type: object - required: [allowMultipleFiles] + required: + - allowMultipleFiles properties: type: type: string - enum: [fileUpload] + enum: + - fileUpload allowMultipleFiles: type: boolean maxSizeInMB: @@ -2092,17 +1786,19 @@ components: items: type: string validation: - $ref: "#/components/schemas/SurveyValidation" + $ref: '#/components/schemas/SurveyValidation' unevaluatedProperties: false SurveyCalElement: allOf: - - $ref: "#/components/schemas/SurveyElementBase" + - $ref: '#/components/schemas/SurveyElementBase' - type: object - required: [calUserName] + required: + - calUserName properties: type: type: string - enum: [cal] + enum: + - cal calUserName: type: string minLength: 1 @@ -2111,435 +1807,838 @@ components: unevaluatedProperties: false SurveyMatrixElement: allOf: - - $ref: "#/components/schemas/SurveyElementBase" + - $ref: '#/components/schemas/SurveyElementBase' - type: object - required: [rows, columns] + required: + - rows + - columns properties: type: type: string - enum: [matrix] + enum: + - matrix rows: type: array items: - $ref: "#/components/schemas/SurveyChoice" + $ref: '#/components/schemas/SurveyChoice' columns: type: array items: - $ref: "#/components/schemas/SurveyChoice" + $ref: '#/components/schemas/SurveyChoice' shuffleOption: - $ref: "#/components/schemas/SurveyShuffleOption" + $ref: '#/components/schemas/SurveyShuffleOption' validation: - $ref: "#/components/schemas/SurveyValidation" + $ref: '#/components/schemas/SurveyValidation' unevaluatedProperties: false + SurveyToggleInputConfig: + type: object + description: Field config for address and contact info elements. + required: + - show + - required + - placeholder + properties: + show: + type: boolean + required: + type: boolean + placeholder: + $ref: '#/components/schemas/TranslatableText' + additionalProperties: false SurveyAddressElement: allOf: - - $ref: "#/components/schemas/SurveyElementBase" + - $ref: '#/components/schemas/SurveyElementBase' - type: object - required: [addressLine1, addressLine2, city, state, zip, country] + required: + - addressLine1 + - addressLine2 + - city + - state + - zip + - country properties: type: type: string - enum: [address] + enum: + - address addressLine1: - $ref: "#/components/schemas/SurveyToggleInputConfig" + $ref: '#/components/schemas/SurveyToggleInputConfig' addressLine2: - $ref: "#/components/schemas/SurveyToggleInputConfig" + $ref: '#/components/schemas/SurveyToggleInputConfig' city: - $ref: "#/components/schemas/SurveyToggleInputConfig" + $ref: '#/components/schemas/SurveyToggleInputConfig' state: - $ref: "#/components/schemas/SurveyToggleInputConfig" + $ref: '#/components/schemas/SurveyToggleInputConfig' zip: - $ref: "#/components/schemas/SurveyToggleInputConfig" + $ref: '#/components/schemas/SurveyToggleInputConfig' country: - $ref: "#/components/schemas/SurveyToggleInputConfig" + $ref: '#/components/schemas/SurveyToggleInputConfig' validation: - $ref: "#/components/schemas/SurveyValidation" + $ref: '#/components/schemas/SurveyValidation' unevaluatedProperties: false SurveyRankingElement: allOf: - - $ref: "#/components/schemas/SurveyElementBase" + - $ref: '#/components/schemas/SurveyElementBase' - type: object - required: [choices] + required: + - choices properties: type: type: string - enum: [ranking] + enum: + - ranking choices: type: array minItems: 2 maxItems: 25 items: - $ref: "#/components/schemas/SurveyChoice" + $ref: '#/components/schemas/SurveyChoice' otherOptionPlaceholder: - $ref: "#/components/schemas/TranslatableText" + $ref: '#/components/schemas/TranslatableText' shuffleOption: - $ref: "#/components/schemas/SurveyShuffleOption" + $ref: '#/components/schemas/SurveyShuffleOption' validation: - $ref: "#/components/schemas/SurveyValidation" + $ref: '#/components/schemas/SurveyValidation' unevaluatedProperties: false SurveyContactInfoElement: allOf: - - $ref: "#/components/schemas/SurveyElementBase" + - $ref: '#/components/schemas/SurveyElementBase' - type: object - required: [firstName, lastName, email, phone, company] + required: + - firstName + - lastName + - email + - phone + - company properties: type: type: string - enum: [contactInfo] + enum: + - contactInfo firstName: - $ref: "#/components/schemas/SurveyToggleInputConfig" + $ref: '#/components/schemas/SurveyToggleInputConfig' lastName: - $ref: "#/components/schemas/SurveyToggleInputConfig" + $ref: '#/components/schemas/SurveyToggleInputConfig' email: - $ref: "#/components/schemas/SurveyToggleInputConfig" + $ref: '#/components/schemas/SurveyToggleInputConfig' phone: - $ref: "#/components/schemas/SurveyToggleInputConfig" + $ref: '#/components/schemas/SurveyToggleInputConfig' company: - $ref: "#/components/schemas/SurveyToggleInputConfig" + $ref: '#/components/schemas/SurveyToggleInputConfig' validation: - $ref: "#/components/schemas/SurveyValidation" + $ref: '#/components/schemas/SurveyValidation' unevaluatedProperties: false SurveyCsatElement: allOf: - - $ref: "#/components/schemas/SurveyElementBase" + - $ref: '#/components/schemas/SurveyElementBase' - type: object - required: [scale, range] + required: + - scale + - range properties: type: type: string - enum: [csat] + enum: + - csat scale: type: string - enum: [number, smiley, star] + enum: + - number + - smiley + - star range: type: integer - enum: [5] + enum: + - 5 lowerLabel: - $ref: "#/components/schemas/TranslatableText" + $ref: '#/components/schemas/TranslatableText' upperLabel: - $ref: "#/components/schemas/TranslatableText" + $ref: '#/components/schemas/TranslatableText' isColorCodingEnabled: type: boolean default: false unevaluatedProperties: false SurveyCesElement: allOf: - - $ref: "#/components/schemas/SurveyElementBase" + - $ref: '#/components/schemas/SurveyElementBase' - type: object - required: [scale, range] + required: + - scale + - range properties: type: type: string - enum: [ces] + enum: + - ces scale: type: string - enum: [number, smiley, star] + enum: + - number + - smiley + - star range: type: integer - enum: [5, 7] + enum: + - 5 + - 7 lowerLabel: - $ref: "#/components/schemas/TranslatableText" + $ref: '#/components/schemas/TranslatableText' upperLabel: - $ref: "#/components/schemas/TranslatableText" + $ref: '#/components/schemas/TranslatableText' isColorCodingEnabled: type: boolean default: false unevaluatedProperties: false - SurveyCharLimit: + SurveyElement: + oneOf: + - $ref: '#/components/schemas/SurveyOpenTextElement' + - $ref: '#/components/schemas/SurveyConsentElement' + - $ref: '#/components/schemas/SurveyMultipleChoiceSingleElement' + - $ref: '#/components/schemas/SurveyMultipleChoiceMultiElement' + - $ref: '#/components/schemas/SurveyNpsElement' + - $ref: '#/components/schemas/SurveyCtaElement' + - $ref: '#/components/schemas/SurveyRatingElement' + - $ref: '#/components/schemas/SurveyPictureSelectionElement' + - $ref: '#/components/schemas/SurveyDateElement' + - $ref: '#/components/schemas/SurveyFileUploadElement' + - $ref: '#/components/schemas/SurveyCalElement' + - $ref: '#/components/schemas/SurveyMatrixElement' + - $ref: '#/components/schemas/SurveyAddressElement' + - $ref: '#/components/schemas/SurveyRankingElement' + - $ref: '#/components/schemas/SurveyContactInfoElement' + - $ref: '#/components/schemas/SurveyCsatElement' + - $ref: '#/components/schemas/SurveyCesElement' + discriminator: + propertyName: type + mapping: + openText: '#/components/schemas/SurveyOpenTextElement' + consent: '#/components/schemas/SurveyConsentElement' + multipleChoiceSingle: '#/components/schemas/SurveyMultipleChoiceSingleElement' + multipleChoiceMulti: '#/components/schemas/SurveyMultipleChoiceMultiElement' + nps: '#/components/schemas/SurveyNpsElement' + cta: '#/components/schemas/SurveyCtaElement' + rating: '#/components/schemas/SurveyRatingElement' + pictureSelection: '#/components/schemas/SurveyPictureSelectionElement' + date: '#/components/schemas/SurveyDateElement' + fileUpload: '#/components/schemas/SurveyFileUploadElement' + cal: '#/components/schemas/SurveyCalElement' + matrix: '#/components/schemas/SurveyMatrixElement' + address: '#/components/schemas/SurveyAddressElement' + ranking: '#/components/schemas/SurveyRankingElement' + contactInfo: '#/components/schemas/SurveyContactInfoElement' + csat: '#/components/schemas/SurveyCsatElement' + ces: '#/components/schemas/SurveyCesElement' + description: | + Survey element/question inside a block. Element ids are stable public identifiers used by + logic, recall strings, response data, quotas, integrations, and analysis. `type` selects the + allowed shape; unsupported fields are rejected instead of ignored. + SurveyDynamicReference: + type: object + description: Dynamic reference to another value in the survey document. + required: + - type + - value + properties: + type: + type: string + enum: + - element + - variable + - hiddenField + value: + type: string + description: Element id, variable id, or hidden field id depending on `type`. + meta: + type: object + additionalProperties: + type: string + additionalProperties: false + SurveyLogicOperand: + oneOf: + - type: object + required: + - type + - value + properties: + type: + type: string + enum: + - static + value: + oneOf: + - type: string + - type: number + - type: array + items: + type: string + additionalProperties: false + - $ref: '#/components/schemas/SurveyDynamicReference' + SurveyCondition: + type: object + description: | + Single condition. Operators such as `isSubmitted`, `isSkipped`, `isClicked`, `isAccepted`, + `isBooked`, `isSet`, and `isEmpty` do not use `rightOperand`; comparison operators do. + required: + - id + - leftOperand + - operator + properties: + id: + type: string + format: cuid2 + leftOperand: + $ref: '#/components/schemas/SurveyDynamicReference' + operator: + type: string + enum: + - equals + - doesNotEqual + - contains + - doesNotContain + - startsWith + - doesNotStartWith + - endsWith + - doesNotEndWith + - isSubmitted + - isSkipped + - isGreaterThan + - isLessThan + - isGreaterThanOrEqual + - isLessThanOrEqual + - equalsOneOf + - includesAllOf + - includesOneOf + - doesNotIncludeOneOf + - doesNotIncludeAllOf + - isClicked + - isNotClicked + - isAccepted + - isBefore + - isAfter + - isBooked + - isPartiallySubmitted + - isCompletelySubmitted + - isSet + - isNotSet + - isEmpty + - isNotEmpty + - isAnyOf + rightOperand: + $ref: '#/components/schemas/SurveyLogicOperand' + additionalProperties: false + SurveyConditionGroup: type: object - description: Optional `openText` character limit configuration. + required: + - id + - connector + - conditions properties: - enabled: - type: boolean - default: false - min: - type: number - max: - type: number + id: + type: string + format: cuid2 + connector: + type: string + enum: + - and + - or + conditions: + type: array + items: + oneOf: + - $ref: '#/components/schemas/SurveyCondition' + - $ref: '#/components/schemas/SurveyConditionGroup' additionalProperties: false - SurveyShuffleOption: - type: string - enum: [none, all, exceptLast, reverseOrderOccasionally, reverseOrderExceptLast] - SurveyMultipleChoiceDisplayType: - type: string - enum: [list, dropdown] - SurveyChoice: + SurveyCalculateAction: type: object - required: [id, label] + description: Updates a survey variable when the logic rule matches. + required: + - id + - objective + - variableId + - operator + - value properties: id: type: string - description: Stable choice id. - label: - $ref: "#/components/schemas/TranslatableText" + format: cuid2 + objective: + type: string + enum: + - calculate + variableId: + type: string + format: cuid2 + description: Variable id for `calculate`. + operator: + type: string + enum: + - assign + - concat + - add + - subtract + - multiply + - divide + value: + $ref: '#/components/schemas/SurveyLogicOperand' additionalProperties: false - SurveyPictureChoice: + SurveyRequireAnswerAction: type: object - required: [id, imageUrl] + description: Requires an element/question to be answered before continuing. + required: + - id + - objective + - target properties: id: type: string - description: Stable picture choice id. - imageUrl: + format: cuid2 + objective: + type: string + enum: + - requireAnswer + target: type: string + description: Target element id. additionalProperties: false - SurveyToggleInputConfig: + SurveyJumpToBlockAction: type: object - description: Field config for address and contact info elements. - required: [show, required, placeholder] + description: Jumps to another block or ending when the logic rule matches. + required: + - id + - objective + - target properties: - show: - type: boolean - required: - type: boolean - placeholder: - $ref: "#/components/schemas/TranslatableText" + id: + type: string + format: cuid2 + objective: + type: string + enum: + - jumpToBlock + target: + type: string + format: cuid2 + description: Target block id or ending id. additionalProperties: false - SurveyValidation: + SurveyLogicAction: + oneOf: + - $ref: '#/components/schemas/SurveyCalculateAction' + - $ref: '#/components/schemas/SurveyRequireAnswerAction' + - $ref: '#/components/schemas/SurveyJumpToBlockAction' + description: | + Logic action. Keep referenced ids stable: `calculate.variableId` points to a variable id, + `requireAnswer.target` points to an element id, and `jumpToBlock.target` points to a block id + or ending id. + SurveyBlockLogic: type: object - description: Optional element-level validation rules. - required: [rules] + description: Conditional logic rule evaluated at block level. + required: + - id + - conditions + - actions properties: - logic: + id: type: string - enum: [and, or] - default: and - rules: + format: cuid2 + conditions: + $ref: '#/components/schemas/SurveyConditionGroup' + actions: type: array items: - $ref: "#/components/schemas/SurveyValidationRule" + $ref: '#/components/schemas/SurveyLogicAction' additionalProperties: false - SurveyValidationRule: + CreateSurveyBlock: + type: object + description: | + Block accepted by `POST /api/v3/surveys`. `id` may be omitted and will be generated by the + server. Provide an explicit cuid2 id when logic in the same request needs to jump to this block. + For normal sequential flow, omit `logic` and `logicFallback`. `logicFallback` is only valid + when this same block has at least one `logic` rule. + required: + - name + - elements + properties: + id: + type: string + format: cuid2 + description: Optional stable block id. Generated when omitted. + name: + type: string + minLength: 1 + elements: + type: array + minItems: 1 + items: + $ref: '#/components/schemas/SurveyElement' + logic: + type: array + items: + $ref: '#/components/schemas/SurveyBlockLogic' + logicFallback: + type: string + format: cuid2 + description: | + Block or ending id used when no logic condition matches. Only valid when this same block + has at least one `logic` rule; omit it for normal sequential flow. + buttonLabel: + $ref: '#/components/schemas/TranslatableText' + backButtonLabel: + $ref: '#/components/schemas/TranslatableText' + additionalProperties: false + SurveyEndScreenEnding: type: object - required: [id, type, params] + description: Visual end screen displayed after survey completion. + required: + - id + - type properties: id: type: string + format: cuid2 + description: Stable ending id. `jumpToBlock.target` may point to this id. type: type: string enum: - - minLength - - maxLength - - pattern - - email - - url - - phone - - equals - - doesNotEqual - - contains - - doesNotContain - - minValue - - maxValue - - isGreaterThan - - isLessThan - - minSelections - - maxSelections - - minRanked - - rankAll - - minRowsAnswered - - answerAllRows - - isLaterThan - - isEarlierThan - - isBetween - - isNotBetween - - fileExtensionIs - - fileExtensionIsNot - params: - type: object - additionalProperties: true - field: + - endScreen + headline: + $ref: '#/components/schemas/TranslatableText' + subheader: + $ref: '#/components/schemas/TranslatableText' + buttonLabel: + $ref: '#/components/schemas/TranslatableText' + buttonLink: + type: string + imageUrl: + type: string + videoUrl: type: string - enum: - [ - addressLine1, - addressLine2, - city, - state, - zip, - country, - firstName, - lastName, - email, - phone, - company, - ] additionalProperties: false - SurveyBlockLogic: + SurveyRedirectEnding: type: object - description: Conditional logic rule evaluated at block level. - required: [id, conditions, actions] + description: | + Redirects the respondent to a URL after survey completion. External redirects require the + organization's external URL permission; otherwise write endpoints return `403 Forbidden`. + required: + - id + - type + - url properties: id: type: string format: cuid2 - conditions: - $ref: "#/components/schemas/SurveyConditionGroup" - actions: + description: Stable ending id. `jumpToBlock.target` may point to this id. + type: + type: string + enum: + - redirectToUrl + url: + type: string + format: uri + description: External redirect URL. Requires the organization's external URL permission. + label: + type: string + description: Optional internal label for redirect endings. + additionalProperties: false + SurveyEnding: + oneOf: + - $ref: '#/components/schemas/SurveyEndScreenEnding' + - $ref: '#/components/schemas/SurveyRedirectEnding' + discriminator: + propertyName: type + mapping: + endScreen: '#/components/schemas/SurveyEndScreenEnding' + redirectToUrl: '#/components/schemas/SurveyRedirectEnding' + description: | + Ending reached after the last block or a jump action. `type` selects the allowed shape; + unsupported fields are rejected instead of ignored. + SurveyHiddenFields: + type: object + description: | + Hidden fields, sometimes called embedded data in other survey products. Field ids are stable + public identifiers and may be referenced by logic, recall, quotas, integrations, and response data. + Use only letters, numbers, underscores, and hyphens; avoid spaces and reserved ids. + required: + - enabled + properties: + enabled: + type: boolean + fieldIds: type: array items: - $ref: "#/components/schemas/SurveyLogicAction" + type: string + pattern: ^[a-zA-Z0-9_-]+$ + uniqueItems: true additionalProperties: false - SurveyConditionGroup: + CreateSurveyNumberVariable: type: object - required: [id, connector, conditions] + required: + - name + - type + - value properties: id: type: string format: cuid2 - connector: + description: Optional stable variable id. Generated when omitted. + name: type: string - enum: [and, or] - conditions: - type: array - items: - oneOf: - - $ref: "#/components/schemas/SurveyCondition" - - $ref: "#/components/schemas/SurveyConditionGroup" + pattern: ^[a-z0-9_]+$ + description: Unique variable name. Lowercase letters, numbers, and underscores only. + type: + type: string + enum: + - number + value: + type: number + description: Default numeric value. additionalProperties: false - SurveyCondition: + CreateSurveyTextVariable: type: object - description: | - Single condition. Operators such as `isSubmitted`, `isSkipped`, `isClicked`, `isAccepted`, - `isBooked`, `isSet`, and `isEmpty` do not use `rightOperand`; comparison operators do. - required: [id, leftOperand, operator] + required: + - name + - type + - value properties: id: type: string format: cuid2 - leftOperand: - $ref: "#/components/schemas/SurveyDynamicReference" - operator: + description: Optional stable variable id. Generated when omitted. + name: + type: string + pattern: ^[a-z0-9_]+$ + description: Unique variable name. Lowercase letters, numbers, and underscores only. + type: type: string enum: - - equals - - doesNotEqual - - contains - - doesNotContain - - startsWith - - doesNotStartWith - - endsWith - - doesNotEndWith - - isSubmitted - - isSkipped - - isGreaterThan - - isLessThan - - isGreaterThanOrEqual - - isLessThanOrEqual - - equalsOneOf - - includesAllOf - - includesOneOf - - doesNotIncludeOneOf - - doesNotIncludeAllOf - - isClicked - - isNotClicked - - isAccepted - - isBefore - - isAfter - - isBooked - - isPartiallySubmitted - - isCompletelySubmitted - - isSet - - isNotSet - - isEmpty - - isNotEmpty - - isAnyOf - rightOperand: - $ref: "#/components/schemas/SurveyLogicOperand" + - text + value: + type: string + description: Default text value. additionalProperties: false - SurveyLogicOperand: + CreateSurveyVariable: oneOf: - - type: object - required: [type, value] - properties: - type: - type: string - enum: [static] - value: - oneOf: - - type: string - - type: number - - type: array - items: - type: string - additionalProperties: false - - $ref: "#/components/schemas/SurveyDynamicReference" - SurveyDynamicReference: + - $ref: '#/components/schemas/CreateSurveyNumberVariable' + - $ref: '#/components/schemas/CreateSurveyTextVariable' + description: | + Survey variable accepted by `POST /api/v3/surveys`. `id` may be omitted and will be + generated by the server. Provide an explicit cuid2 id when logic in the same request needs + to reference this variable. + CreateSurveyRequest: type: object - description: Dynamic reference to another value in the survey document. - required: [type, value] + description: | + Strict v3 survey creation document. This endpoint accepts survey structure only: name, + metadata, languages, welcome card, blocks/elements/logic, endings, hidden fields, and variables. + It rejects legacy `questions` and out-of-scope settings such as styling, targeting, segments, + follow-ups, recaptcha, single-use/email verification, slug, custom scripts, analytics fields, + timestamps, and `createdBy`. + + Translatable fields use real locale-code maps. The map must include the canonical + `defaultLanguage` key, such as `en-US`, so the server can persist the internal default + translation. Locale keys must be canonical BCP 47 codes such as `de-DE`, `pt-PT`, or + `zh-Hans-CN`. Non-default locale keys must be declared in `languages`; undeclared locale + keys in metadata, welcome cards, blocks, or endings are rejected with `unsupported_locale`. + + `blocks[].id` and `variables[].id` may be omitted on create and will be generated by the + server. Provide explicit cuid2 ids when other fields in the same request reference them. + For normal sequential flow, omit `logicFallback`. It is only valid together with a non-empty + `logic` array on the same block. + required: + - workspaceId + - name + - blocks properties: + workspaceId: + type: string + format: cuid2 + description: Workspace where the survey will be created. Requires read/write access. + name: + type: string + minLength: 1 type: type: string - enum: [element, variable, hiddenField] - value: + enum: + - link + - app + default: link + description: | + Optional compatibility field. `link` and `app` survey types are accepted here; app/in-app + survey distribution settings remain outside this structure-focused create endpoint. + status: type: string - description: Element id, variable id, or hidden field id depending on `type`. - meta: - type: object - additionalProperties: - type: string + enum: + - draft + - inProgress + - paused + - completed + default: draft + metadata: + allOf: + - $ref: '#/components/schemas/SurveyMetadata' + default: {} + defaultLanguage: + allOf: + - $ref: '#/components/schemas/LocaleCode' + default: en-US + description: Default authoring locale. Translatable maps must include this locale key. + languages: + type: array + default: [] + items: + $ref: '#/components/schemas/CreateSurveyLanguage' + description: | + Optional survey language configuration. Every non-default locale used by translatable maps + must be declared here; omitted languages are not inferred from map keys. + welcomeCard: + allOf: + - $ref: '#/components/schemas/SurveyWelcomeCard' + default: + enabled: false + blocks: + type: array + minItems: 1 + items: + $ref: '#/components/schemas/CreateSurveyBlock' + endings: + type: array + default: [] + items: + $ref: '#/components/schemas/SurveyEnding' + hiddenFields: + allOf: + - $ref: '#/components/schemas/SurveyHiddenFields' + default: + enabled: false + variables: + type: array + default: [] + items: + $ref: '#/components/schemas/CreateSurveyVariable' additionalProperties: false - SurveyLogicAction: - oneOf: - - $ref: "#/components/schemas/SurveyCalculateAction" - - $ref: "#/components/schemas/SurveyRequireAnswerAction" - - $ref: "#/components/schemas/SurveyJumpToBlockAction" + SurveyLanguage: + type: object description: | - Logic action. Keep referenced ids stable: `calculate.variableId` points to a variable id, - `requireAnswer.target` points to an element id, and `jumpToBlock.target` points to a block id - or ending id. - SurveyCalculateAction: + Language configured for this survey. GET responses expose the server-emitted code/tag used as the + translatable map key. Existing surveys can use region-qualified, language-only, or script-only codes. + Disabled languages can still be read by the management API so unfinished translations can be completed. + required: + - code + - default + - enabled + properties: + code: + type: string + description: Server-emitted survey language code/tag used as the translatable map key. + example: en-US + alias: + type: + - string + - 'null' + description: Optional configured alias accepted by `?lang` for compatibility and agent discovery. + example: english + default: + type: boolean + description: Whether this is the default authoring language. + enabled: + type: boolean + description: Whether this language is enabled for respondent-facing delivery. + SurveyBlock: type: object - description: Updates a survey variable when the logic rule matches. - required: [id, objective, variableId, operator, value] + description: | + Block-based survey section. Block ids are stable public identifiers. Logic and fallbacks can + jump to block ids or ending ids, so clients and agents should preserve ids unless intentionally + creating/deleting a block. + required: + - id + - name + - elements properties: id: type: string format: cuid2 - objective: + description: Stable block id. + name: type: string - enum: [calculate] - variableId: + minLength: 1 + elements: + type: array + minItems: 1 + items: + $ref: '#/components/schemas/SurveyElement' + logic: + type: array + items: + $ref: '#/components/schemas/SurveyBlockLogic' + logicFallback: type: string format: cuid2 - description: Variable id for `calculate`. - operator: - type: string - enum: [assign, concat, add, subtract, multiply, divide] - value: - $ref: "#/components/schemas/SurveyLogicOperand" + description: | + Block or ending id used when no logic condition matches. Only valid when this same block + has at least one `logic` rule; omit it for normal sequential flow. + buttonLabel: + $ref: '#/components/schemas/TranslatableText' + backButtonLabel: + $ref: '#/components/schemas/TranslatableText' additionalProperties: false - SurveyRequireAnswerAction: + SurveyNumberVariable: type: object - description: Requires an element/question to be answered before continuing. - required: [id, objective, target] + description: | + Number variable. Used by `calculate` logic actions with numeric operators such as `add`, + `subtract`, `multiply`, `divide`, or `assign`. + required: + - id + - name + - type + - value properties: id: type: string format: cuid2 - objective: + description: Stable variable id referenced from logic. + name: type: string - enum: [requireAnswer] - target: + pattern: ^[a-z0-9_]+$ + description: Unique variable name. Lowercase letters, numbers, and underscores only. + type: type: string - description: Target element id. + enum: + - number + value: + type: number + description: Default numeric value. additionalProperties: false - SurveyJumpToBlockAction: + SurveyTextVariable: type: object - description: Jumps to another block or ending when the logic rule matches. - required: [id, objective, target] + description: | + Text variable. Used by `calculate` logic actions with text operators such as `assign` or `concat`. + required: + - id + - name + - type + - value properties: id: type: string format: cuid2 - objective: + description: Stable variable id referenced from logic. + name: + type: string + pattern: ^[a-z0-9_]+$ + description: Unique variable name. Lowercase letters, numbers, and underscores only. + type: type: string - enum: [jumpToBlock] - target: + enum: + - text + value: type: string - format: cuid2 - description: Target block id or ending id. + description: Default text value. additionalProperties: false + SurveyVariable: + oneOf: + - $ref: '#/components/schemas/SurveyNumberVariable' + - $ref: '#/components/schemas/SurveyTextVariable' + description: | + Survey variable. Variable ids are stable references used by logic and calculation actions. + Variable names are human-readable labels and must be unique within the survey. SurveyResource: type: object required: @@ -2573,118 +2672,300 @@ components: type: string type: type: string - enum: [link, app, website, web] + enum: + - link + - app + - website + - web status: type: string - enum: [draft, inProgress, paused, completed] + enum: + - draft + - inProgress + - paused + - completed metadata: - allOf: - - $ref: "#/components/schemas/SurveyMetadata" - nullable: true + anyOf: + - $ref: '#/components/schemas/SurveyMetadata' + - type: 'null' defaultLanguage: type: string description: Emitted language code/tag for the survey default language. The internal `default` translation key is never exposed. languages: type: array items: - $ref: "#/components/schemas/SurveyLanguage" + $ref: '#/components/schemas/SurveyLanguage' welcomeCard: - $ref: "#/components/schemas/SurveyWelcomeCard" + $ref: '#/components/schemas/SurveyWelcomeCard' blocks: type: array items: - $ref: "#/components/schemas/SurveyBlock" + $ref: '#/components/schemas/SurveyBlock' endings: type: array items: - $ref: "#/components/schemas/SurveyEnding" + $ref: '#/components/schemas/SurveyEnding' hiddenFields: - $ref: "#/components/schemas/SurveyHiddenFields" + $ref: '#/components/schemas/SurveyHiddenFields' variables: type: array items: - $ref: "#/components/schemas/SurveyVariable" - InvalidParam: + $ref: '#/components/schemas/SurveyVariable' + AISurveyGenerationLocaleCode: + type: string + enum: + - de-DE + - en-US + - es-ES + - fr-FR + - hu-HU + - ja-JP + - nl-NL + - pt-BR + - pt-PT + - ro-RO + - ru-RU + - sv-SE + - tr-TR + - zh-Hans-CN + - zh-Hant-TW + description: Supported app locale code that AI survey creation can return. + example: en-US + GenerateSurveyRequest: type: object description: | - Field-level validation error. `name` and `reason` are always intended for humans. - Optional machine-readable fields are included when the API can identify the semantic error, - especially for survey locale, identifier, and reference validation used by MCP and agent clients. - required: [name, reason] + AI survey creation request. `prompt` is used only to create a draft payload; it is not + persisted by this endpoint. The generated payload is validated and returned to the caller for + a separate create request. + required: + - workspaceId + - prompt properties: - name: + workspaceId: type: string - description: Dot-path to the invalid request field. - reason: + format: cuid2 + description: Workspace where the AI-created survey draft would be created. Requires read/write access. + prompt: type: string - description: Human-readable repair guidance. - code: + minLength: 4 + maxLength: 1200 + description: | + Natural-language survey goal and audience. Prompts with fewer than 24 characters or fewer + than four whitespace-separated words return prompt feedback before any AI provider call. + type: type: string enum: - - dangling_reference - - duplicate_identifier - - duplicate_locale - - forbidden_identifier - - immutable_identifier - - invalid_locale - - invalid_reference - - missing_required_field - - missing_translation - - unsupported_field - - unsupported_locale - description: Machine-readable validation category, when available. - identifier: - type: string - description: Identifier involved in the validation failure, when available. For language errors, this can be the normalized language code. - referenceType: - type: string - enum: [block, element, ending, hiddenField, language, variable, variableName, recall] - description: Identifier namespace involved in the validation failure. - missingId: - type: string - description: Referenced id that does not exist in the submitted survey document. - firstUsedAt: - type: string - description: Dot-path where a duplicate identifier was first used. - conflictsWith: - type: string - description: Dot-path to the existing identifier that conflicts with this field. + - link + default: link + description: Link Survey is the only AI-created type until the v3 create endpoint supports additional types. + language: + $ref: '#/components/schemas/AISurveyGenerationLocaleCode' + description: | + Preferred survey language. Session clients should send the logged-in user's language. + The generator uses it when the prompt language is ambiguous or cannot be confidently + matched to a supported app locale. additionalProperties: false - Problem: + GeneratedSurveyValidationLanguage: type: object - description: RFC 9457 Problem Details for HTTP APIs (`application/problem+json`). Responses typically include a machine-readable `code` field alongside `title`, `status`, `detail`, and `requestId`. - required: [title, status, detail, requestId] + required: + - code + - default + - enabled properties: - type: + code: + $ref: '#/components/schemas/AISurveyGenerationLocaleCode' + default: + type: boolean + enabled: + type: boolean + additionalProperties: false + GeneratedSurveyValidationResult: + type: object + required: + - valid + - invalid_params + - languages + properties: + valid: + type: boolean + description: Whether the generated create payload passed the same v3 create preparation pipeline. + invalid_params: + type: array + description: Repairable validation errors. Successful generate responses return an empty array. + items: + $ref: '#/components/schemas/InvalidParam' + languages: + type: array + description: Languages that the generated create payload would connect or create. + items: + $ref: '#/components/schemas/GeneratedSurveyValidationLanguage' + additionalProperties: false + GenerateSurveyResult: + type: object + required: + - language + - payload + - validation + properties: + language: + $ref: '#/components/schemas/AISurveyGenerationLocaleCode' + description: Supported app locale used for the AI-created survey content and create payload language maps. + payload: + allOf: + - $ref: '#/components/schemas/CreateSurveyRequest' + description: | + Strict create payload ready for `POST /api/v3/surveys`. It always has `status: draft`. + validation: + $ref: '#/components/schemas/GeneratedSurveyValidationResult' + additionalProperties: false + ValidateSurveyCreateRequest: + type: object + required: + - operation + - data + properties: + operation: type: string - format: uri - title: + enum: + - create + data: + description: Intended create payload. Invalid documents are allowed so the endpoint can return repairable validation errors. + anyOf: + - $ref: '#/components/schemas/CreateSurveyRequest' + - type: object + additionalProperties: true + additionalProperties: false + PatchSurveyRequest: + type: object + minProperties: 1 + description: | + Patch payload shape. Top-level fields are partial; any provided nested object or array + fully replaces that subtree. Omitted top-level fields are preserved. Immutable/system fields + such as `id`, `workspaceId`, `type`, `defaultLanguage`, timestamps, `questions`, analytics, + distribution, styling, targeting, and scripts are rejected. + + `metadata`, `languages`, `welcomeCard`, `blocks`, `endings`, `hiddenFields`, and `variables` + replace their full top-level value when provided. Missing ids in replaced arrays are deletions. + Non-default locale keys in translatable maps must be declared in `languages`; undeclared locale + keys are rejected with `unsupported_locale`. To remove a language, remove it from both + `languages` and every translatable map that contains that locale key. + Use `/api/v3/surveys/validate` with `operation: patch` before committing automated or agentic + changes. + properties: + name: type: string + minLength: 1 status: - type: integer - detail: type: string - instance: + enum: + - draft + - inProgress + - paused + - completed + metadata: + allOf: + - $ref: '#/components/schemas/SurveyMetadata' + languages: + type: array + items: + $ref: '#/components/schemas/CreateSurveyLanguage' + description: | + Replaces the survey language configuration. The default language cannot be changed through + PATCH; any `default: true` entry must match the existing default language. Languages referenced + by `metadata`, `welcomeCard`, `blocks`, or `endings` translatable maps must be explicitly + declared here, so remove the locale key from those maps as well when intentionally removing + a language. + welcomeCard: + $ref: '#/components/schemas/SurveyWelcomeCard' + blocks: + type: array + minItems: 1 + items: + $ref: '#/components/schemas/SurveyBlock' + endings: + type: array + items: + $ref: '#/components/schemas/SurveyEnding' + hiddenFields: + $ref: '#/components/schemas/SurveyHiddenFields' + variables: + type: array + items: + $ref: '#/components/schemas/SurveyVariable' + additionalProperties: false + ValidateSurveyPatchRequest: + type: object + required: + - operation + - surveyId + - data + properties: + operation: + type: string + enum: + - patch + surveyId: type: string + format: cuid2 + data: + description: Intended patch payload. Invalid documents are allowed so the endpoint can return repairable validation errors. + anyOf: + - $ref: '#/components/schemas/PatchSurveyRequest' + - type: object + additionalProperties: true + additionalProperties: false + ValidateSurveyRequest: + oneOf: + - $ref: '#/components/schemas/ValidateSurveyCreateRequest' + - $ref: '#/components/schemas/ValidateSurveyPatchRequest' + discriminator: + propertyName: operation + mapping: + create: '#/components/schemas/ValidateSurveyCreateRequest' + patch: '#/components/schemas/ValidateSurveyPatchRequest' + SurveyValidationLanguage: + type: object + required: + - code + - default + - enabled + - writeBehavior + properties: code: + $ref: '#/components/schemas/LocaleCode' + default: + type: boolean + enabled: + type: boolean + writeBehavior: type: string enum: - - ai_features_not_enabled - - ai_generated_payload_invalid - - ai_instance_not_configured - - ai_smart_tools_disabled - - bad_gateway - - bad_request - - forbidden - - internal_server_error - - not_authenticated - - too_many_requests - - unprocessable_content - requestId: + - connect_or_create + description: Validation is read-only; a real write would connect an existing language or create it if missing. + additionalProperties: false + SurveyValidationResult: + type: object + required: + - valid + - operation + - invalid_params + properties: + valid: + type: boolean + description: Whether the submitted survey document is valid. + operation: type: string - details: - type: object + enum: + - create + - patch invalid_params: type: array + description: Repairable validation errors using document-relative paths. + items: + $ref: '#/components/schemas/InvalidParam' + languages: + type: array + description: Languages that a successful write would connect or create. Present only when `valid=true`. items: - $ref: "#/components/schemas/InvalidParam" + $ref: '#/components/schemas/SurveyValidationLanguage' + additionalProperties: false diff --git a/docs/api-v3-reference/redocly.yaml b/docs/api-v3-reference/redocly.yaml new file mode 100644 index 000000000000..7cc49c4c55f6 --- /dev/null +++ b/docs/api-v3-reference/redocly.yaml @@ -0,0 +1,14 @@ +# Lint configuration for the v3 OpenAPI source tree (used by `pnpm api:v3:lint` via scripts/bundle.mjs). +# Known accepted findings live in .redocly.lint-ignore.yaml; anything new fails CI as an error. +extends: + - recommended +rules: + # Parity with the v2 spec, which also ships without an info.license field. + info-license: off + # Raised from warn so NEW ambiguous paths fail CI. The six known overlaps between + # /api/v3/workflows/runs/{runId} and /api/v3/workflows/{workflowId}/* are a deliberate + # ENG-1101 decision (run ids are globally unique; cuid2 never equals the literal "runs") + # and are listed in .redocly.lint-ignore.yaml. + no-ambiguous-paths: error + # Raised from warn: response examples must validate against their schemas. + no-invalid-media-type-examples: error diff --git a/docs/api-v3-reference/scripts/bundle.mjs b/docs/api-v3-reference/scripts/bundle.mjs new file mode 100644 index 000000000000..b55eede6688d --- /dev/null +++ b/docs/api-v3-reference/scripts/bundle.mjs @@ -0,0 +1,109 @@ +#!/usr/bin/env node +/* Single entry point for the v3 OpenAPI spec tooling (pins @redocly/cli in exactly one place). + * + * node docs/api-v3-reference/scripts/bundle.mjs # regenerate docs/api-v3-reference/openapi.yml + * node docs/api-v3-reference/scripts/bundle.mjs --check # fail if the committed artifact is stale + * node docs/api-v3-reference/scripts/bundle.mjs --lint # lint the multi-file source tree + * + * Mintlify only resolves $refs inside a single document, so the committed openapi.yml must stay a + * self-contained bundle. The --check mode compares canonical JSON (sorted keys) so comments and + * YAML formatting never cause false positives. Lint runs with docs/api-v3-reference as cwd so + * redocly.yaml and .redocly.lint-ignore.yaml are picked up. Stdlib only — safe to run in CI + * without installing workspace dependencies. + */ +import { execFileSync } from "node:child_process"; +import { mkdtempSync, readFileSync, writeFileSync, rmSync } from "node:fs"; +import { createRequire } from "node:module"; +import { tmpdir } from "node:os"; +import { dirname, join, resolve } from "node:path"; +import { fileURLToPath } from "node:url"; + +// Fallback pin for environments without the workspace install. Keep in sync with the +// @redocly/cli entry in the root package.json devDependencies (the preferred, lockfile-pinned path). +const REDOCLY_NPX_FALLBACK = "@redocly/cli@1.34.3"; +const here = dirname(fileURLToPath(import.meta.url)); +const srcRoot = resolve(here, "../src/openapi.yml"); +const artifact = resolve(here, "../openapi.yml"); + +const localRedoclyBin = (() => { + try { + const pkgPath = createRequire(import.meta.url).resolve("@redocly/cli/package.json"); + const pkg = JSON.parse(readFileSync(pkgPath, "utf8")); + const binRel = typeof pkg.bin === "string" ? pkg.bin : pkg.bin.redocly; + return join(dirname(pkgPath), binRel); + } catch { + return null; + } +})(); + +const HEADER = `# GENERATED FILE — do not edit. Source of truth: docs/api-v3-reference/src/ (one file per path/schema). +# Regenerate with \`pnpm api:v3:bundle\`; CI verifies freshness with \`pnpm api:v3:check\`. +# V3 API — Surveys and Workflows extension (hand-maintained source; not produced by generate-api-specs). +`; + +const redocly = (args, opts = {}) => + localRedoclyBin + ? execFileSync(process.execPath, [localRedoclyBin, ...args], { + stdio: ["ignore", "pipe", "inherit"], + ...opts, + }) + : execFileSync("npx", ["-y", REDOCLY_NPX_FALLBACK, ...args], { + stdio: ["ignore", "pipe", "inherit"], + ...opts, + }); + +// Code-unit comparison, NOT localeCompare: the canonical form must be byte-identical across +// machines and locales (RFC 8785-style ordering), and localeCompare depends on the ICU build. +const compareCodeUnits = (a, b) => { + if (a < b) { + return -1; + } + if (a > b) { + return 1; + } + return 0; +}; + +const sortKeys = (value) => { + if (Array.isArray(value)) { + return value.map(sortKeys); + } + if (value && typeof value === "object") { + return Object.fromEntries( + Object.keys(value) + .sort(compareCodeUnits) + .map((key) => [key, sortKeys(value[key])]) + ); + } + return value; +}; + +const canonical = (jsonFile) => JSON.stringify(sortKeys(JSON.parse(readFileSync(jsonFile, "utf8")))); + +if (process.argv.includes("--lint")) { + try { + redocly(["lint", "src/openapi.yml"], { stdio: "inherit", cwd: resolve(here, "..") }); + } catch (error) { + process.exit(typeof error.status === "number" ? error.status : 1); + } +} else if (process.argv.includes("--check")) { + const tmp = mkdtempSync(join(tmpdir(), "v3-spec-")); + try { + redocly(["bundle", srcRoot, "-o", join(tmp, "from-src.json"), "--ext", "json"]); + redocly(["bundle", artifact, "-o", join(tmp, "from-artifact.json"), "--ext", "json"]); + if (canonical(join(tmp, "from-src.json")) !== canonical(join(tmp, "from-artifact.json"))) { + console.error( + "✗ docs/api-v3-reference/openapi.yml is out of sync with docs/api-v3-reference/src/.\n" + + " Run `pnpm api:v3:bundle` and commit the result." + ); + process.exit(1); + } + console.log("✓ openapi.yml bundle is in sync with src/."); + } finally { + rmSync(tmp, { recursive: true, force: true }); + } +} else { + redocly(["bundle", srcRoot, "-o", artifact]); + writeFileSync(artifact, HEADER + readFileSync(artifact, "utf8")); + console.log(`✓ bundled src/ → ${artifact}`); +} diff --git a/docs/api-v3-reference/src/components/parameters/CursorQuery.yml b/docs/api-v3-reference/src/components/parameters/CursorQuery.yml new file mode 100644 index 000000000000..71c0b70a5a9c --- /dev/null +++ b/docs/api-v3-reference/src/components/parameters/CursorQuery.yml @@ -0,0 +1,7 @@ +in: query +name: cursor +schema: + type: string +description: >- + Opaque cursor returned as `meta.nextCursor` from the previous page. Omit on + the first request. diff --git a/docs/api-v3-reference/src/components/parameters/LimitQuery.yml b/docs/api-v3-reference/src/components/parameters/LimitQuery.yml new file mode 100644 index 000000000000..4e2a0bf73eef --- /dev/null +++ b/docs/api-v3-reference/src/components/parameters/LimitQuery.yml @@ -0,0 +1,8 @@ +in: query +name: limit +schema: + type: integer + minimum: 1 + maximum: 100 + default: 20 +description: Page size (max 100). diff --git a/docs/api-v3-reference/src/components/parameters/WorkspaceIdQuery.yml b/docs/api-v3-reference/src/components/parameters/WorkspaceIdQuery.yml new file mode 100644 index 000000000000..9f5b0803ae34 --- /dev/null +++ b/docs/api-v3-reference/src/components/parameters/WorkspaceIdQuery.yml @@ -0,0 +1,7 @@ +in: query +name: workspaceId +required: true +schema: + type: string + format: cuid2 +description: Workspace identifier. This is the canonical container ID for v3 APIs. diff --git a/docs/api-v3-reference/src/components/responses/V3BadRequest.yml b/docs/api-v3-reference/src/components/responses/V3BadRequest.yml new file mode 100644 index 000000000000..037d30d61ae2 --- /dev/null +++ b/docs/api-v3-reference/src/components/responses/V3BadRequest.yml @@ -0,0 +1,16 @@ +description: >- + Bad Request — malformed JSON, invalid query/body/params, duplicate name, or + unsupported field. +headers: + X-Request-Id: + schema: + type: string + description: Request correlation ID + Cache-Control: + schema: + type: string + example: private, no-store +content: + application/problem+json: + schema: + $ref: ../schemas/Problem.yml diff --git a/docs/api-v3-reference/src/components/responses/V3Conflict.yml b/docs/api-v3-reference/src/components/responses/V3Conflict.yml new file mode 100644 index 000000000000..7fa1fe6785f6 --- /dev/null +++ b/docs/api-v3-reference/src/components/responses/V3Conflict.yml @@ -0,0 +1,17 @@ +description: >- + Conflict — an `Idempotency-Key` retry arrived while the original request was still being + processed (IETF `draft-ietf-httpapi-idempotency-key-header` semantics). Retry after the original + request completes to receive its stored result. +headers: + X-Request-Id: + schema: + type: string + description: Request correlation ID + Cache-Control: + schema: + type: string + example: private, no-store +content: + application/problem+json: + schema: + $ref: ../schemas/Problem.yml diff --git a/docs/api-v3-reference/src/components/responses/V3Forbidden.yml b/docs/api-v3-reference/src/components/responses/V3Forbidden.yml new file mode 100644 index 000000000000..c88a5678ac78 --- /dev/null +++ b/docs/api-v3-reference/src/components/responses/V3Forbidden.yml @@ -0,0 +1,16 @@ +description: >- + Forbidden — no workspace access, or resource does not exist (404 not used; + avoids existence leak). +headers: + X-Request-Id: + schema: + type: string + description: Request correlation ID + Cache-Control: + schema: + type: string + example: private, no-store +content: + application/problem+json: + schema: + $ref: ../schemas/Problem.yml diff --git a/docs/api-v3-reference/src/components/responses/V3InternalServerError.yml b/docs/api-v3-reference/src/components/responses/V3InternalServerError.yml new file mode 100644 index 000000000000..1819ccd161c0 --- /dev/null +++ b/docs/api-v3-reference/src/components/responses/V3InternalServerError.yml @@ -0,0 +1,14 @@ +description: Internal Server Error. +headers: + X-Request-Id: + schema: + type: string + description: Request correlation ID + Cache-Control: + schema: + type: string + example: private, no-store +content: + application/problem+json: + schema: + $ref: ../schemas/Problem.yml diff --git a/docs/api-v3-reference/src/components/responses/V3TooManyRequests.yml b/docs/api-v3-reference/src/components/responses/V3TooManyRequests.yml new file mode 100644 index 000000000000..950bad23efdc --- /dev/null +++ b/docs/api-v3-reference/src/components/responses/V3TooManyRequests.yml @@ -0,0 +1,18 @@ +description: Rate limit exceeded. +headers: + X-Request-Id: + schema: + type: string + description: Request correlation ID + Cache-Control: + schema: + type: string + example: private, no-store + Retry-After: + schema: + type: integer + description: Seconds until the current rate-limit window resets. +content: + application/problem+json: + schema: + $ref: ../schemas/Problem.yml diff --git a/docs/api-v3-reference/src/components/responses/V3Unauthorized.yml b/docs/api-v3-reference/src/components/responses/V3Unauthorized.yml new file mode 100644 index 000000000000..ae8182b380b0 --- /dev/null +++ b/docs/api-v3-reference/src/components/responses/V3Unauthorized.yml @@ -0,0 +1,14 @@ +description: Not authenticated (no valid session or API key). +headers: + X-Request-Id: + schema: + type: string + description: Request correlation ID + Cache-Control: + schema: + type: string + example: private, no-store +content: + application/problem+json: + schema: + $ref: ../schemas/Problem.yml diff --git a/docs/api-v3-reference/src/components/responses/V3UnprocessableContent.yml b/docs/api-v3-reference/src/components/responses/V3UnprocessableContent.yml new file mode 100644 index 000000000000..48f002d2de16 --- /dev/null +++ b/docs/api-v3-reference/src/components/responses/V3UnprocessableContent.yml @@ -0,0 +1,16 @@ +description: >- + Unprocessable Content — semantic validation failed or the requested lifecycle + transition is invalid. +headers: + X-Request-Id: + schema: + type: string + description: Request correlation ID + Cache-Control: + schema: + type: string + example: private, no-store +content: + application/problem+json: + schema: + $ref: ../schemas/Problem.yml diff --git a/docs/api-v3-reference/src/components/schemas/AISurveyGenerationLocaleCode.yml b/docs/api-v3-reference/src/components/schemas/AISurveyGenerationLocaleCode.yml new file mode 100644 index 000000000000..d56fe804d1dc --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/AISurveyGenerationLocaleCode.yml @@ -0,0 +1,19 @@ +type: string +enum: + - de-DE + - en-US + - es-ES + - fr-FR + - hu-HU + - ja-JP + - nl-NL + - pt-BR + - pt-PT + - ro-RO + - ru-RU + - sv-SE + - tr-TR + - zh-Hans-CN + - zh-Hant-TW +description: Supported app locale code that AI survey creation can return. +example: en-US diff --git a/docs/api-v3-reference/src/components/schemas/CreateSurveyBlock.yml b/docs/api-v3-reference/src/components/schemas/CreateSurveyBlock.yml new file mode 100644 index 000000000000..623a2fe0bf1e --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/CreateSurveyBlock.yml @@ -0,0 +1,45 @@ +type: object +description: > + Block accepted by `POST /api/v3/surveys`. `id` may be omitted and will be + generated by the + + server. Provide an explicit cuid2 id when logic in the same request needs to + jump to this block. + + For normal sequential flow, omit `logic` and `logicFallback`. `logicFallback` + is only valid + + when this same block has at least one `logic` rule. +required: + - name + - elements +properties: + id: + type: string + format: cuid2 + description: Optional stable block id. Generated when omitted. + name: + type: string + minLength: 1 + elements: + type: array + minItems: 1 + items: + $ref: ./SurveyElement.yml + logic: + type: array + items: + $ref: ./SurveyBlockLogic.yml + logicFallback: + type: string + format: cuid2 + description: > + Block or ending id used when no logic condition matches. Only valid when + this same block + + has at least one `logic` rule; omit it for normal sequential flow. + buttonLabel: + $ref: ./TranslatableText.yml + backButtonLabel: + $ref: ./TranslatableText.yml +additionalProperties: false diff --git a/docs/api-v3-reference/src/components/schemas/CreateSurveyLanguage.yml b/docs/api-v3-reference/src/components/schemas/CreateSurveyLanguage.yml new file mode 100644 index 000000000000..3a74f64385b6 --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/CreateSurveyLanguage.yml @@ -0,0 +1,19 @@ +type: object +description: >- + Language to connect to the created survey. `default`, if provided, must match + `defaultLanguage`. +required: + - code +properties: + code: + $ref: ./LocaleCode.yml + default: + type: boolean + description: >- + Optional marker for readability; only the `defaultLanguage` entry may set + this to true. + enabled: + type: boolean + default: true + description: Whether this language is enabled for respondent-facing delivery. +additionalProperties: false diff --git a/docs/api-v3-reference/src/components/schemas/CreateSurveyNumberVariable.yml b/docs/api-v3-reference/src/components/schemas/CreateSurveyNumberVariable.yml new file mode 100644 index 000000000000..c52a1d7553b4 --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/CreateSurveyNumberVariable.yml @@ -0,0 +1,22 @@ +type: object +required: + - name + - type + - value +properties: + id: + type: string + format: cuid2 + description: Optional stable variable id. Generated when omitted. + name: + type: string + pattern: ^[a-z0-9_]+$ + description: Unique variable name. Lowercase letters, numbers, and underscores only. + type: + type: string + enum: + - number + value: + type: number + description: Default numeric value. +additionalProperties: false diff --git a/docs/api-v3-reference/src/components/schemas/CreateSurveyRequest.yml b/docs/api-v3-reference/src/components/schemas/CreateSurveyRequest.yml new file mode 100644 index 000000000000..0fda94d2e33b --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/CreateSurveyRequest.yml @@ -0,0 +1,120 @@ +type: object +description: > + Strict v3 survey creation document. This endpoint accepts survey structure + only: name, + + metadata, languages, welcome card, blocks/elements/logic, endings, hidden + fields, and variables. + + It rejects legacy `questions` and out-of-scope settings such as styling, + targeting, segments, + + follow-ups, recaptcha, single-use/email verification, slug, custom scripts, + analytics fields, + + timestamps, and `createdBy`. + + + Translatable fields use real locale-code maps. The map must include the + canonical + + `defaultLanguage` key, such as `en-US`, so the server can persist the internal + default + + translation. Locale keys must be canonical BCP 47 codes such as `de-DE`, + `pt-PT`, or + + `zh-Hans-CN`. Non-default locale keys must be declared in `languages`; + undeclared locale + + keys in metadata, welcome cards, blocks, or endings are rejected with + `unsupported_locale`. + + + `blocks[].id` and `variables[].id` may be omitted on create and will be + generated by the + + server. Provide explicit cuid2 ids when other fields in the same request + reference them. + + For normal sequential flow, omit `logicFallback`. It is only valid together + with a non-empty + + `logic` array on the same block. +required: + - workspaceId + - name + - blocks +properties: + workspaceId: + type: string + format: cuid2 + description: Workspace where the survey will be created. Requires read/write access. + name: + type: string + minLength: 1 + type: + type: string + enum: + - link + - app + default: link + description: > + Optional compatibility field. `link` and `app` survey types are accepted + here; app/in-app + + survey distribution settings remain outside this structure-focused create + endpoint. + status: + type: string + enum: + - draft + - inProgress + - paused + - completed + default: draft + metadata: + allOf: + - $ref: ./SurveyMetadata.yml + default: {} + defaultLanguage: + allOf: + - $ref: ./LocaleCode.yml + default: en-US + description: Default authoring locale. Translatable maps must include this locale key. + languages: + type: array + default: [] + items: + $ref: ./CreateSurveyLanguage.yml + description: > + Optional survey language configuration. Every non-default locale used by + translatable maps + + must be declared here; omitted languages are not inferred from map keys. + welcomeCard: + allOf: + - $ref: ./SurveyWelcomeCard.yml + default: + enabled: false + blocks: + type: array + minItems: 1 + items: + $ref: ./CreateSurveyBlock.yml + endings: + type: array + default: [] + items: + $ref: ./SurveyEnding.yml + hiddenFields: + allOf: + - $ref: ./SurveyHiddenFields.yml + default: + enabled: false + variables: + type: array + default: [] + items: + $ref: ./CreateSurveyVariable.yml +additionalProperties: false diff --git a/docs/api-v3-reference/src/components/schemas/CreateSurveyTextVariable.yml b/docs/api-v3-reference/src/components/schemas/CreateSurveyTextVariable.yml new file mode 100644 index 000000000000..ba00ebf2bd4b --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/CreateSurveyTextVariable.yml @@ -0,0 +1,22 @@ +type: object +required: + - name + - type + - value +properties: + id: + type: string + format: cuid2 + description: Optional stable variable id. Generated when omitted. + name: + type: string + pattern: ^[a-z0-9_]+$ + description: Unique variable name. Lowercase letters, numbers, and underscores only. + type: + type: string + enum: + - text + value: + type: string + description: Default text value. +additionalProperties: false diff --git a/docs/api-v3-reference/src/components/schemas/CreateSurveyVariable.yml b/docs/api-v3-reference/src/components/schemas/CreateSurveyVariable.yml new file mode 100644 index 000000000000..3dd5365b4756 --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/CreateSurveyVariable.yml @@ -0,0 +1,11 @@ +oneOf: + - $ref: ./CreateSurveyNumberVariable.yml + - $ref: ./CreateSurveyTextVariable.yml +description: > + Survey variable accepted by `POST /api/v3/surveys`. `id` may be omitted and + will be + + generated by the server. Provide an explicit cuid2 id when logic in the same + request needs + + to reference this variable. diff --git a/docs/api-v3-reference/src/components/schemas/CursorPaginationMeta.yml b/docs/api-v3-reference/src/components/schemas/CursorPaginationMeta.yml new file mode 100644 index 000000000000..750bd37c746e --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/CursorPaginationMeta.yml @@ -0,0 +1,15 @@ +type: object +required: + - limit + - nextCursor +properties: + limit: + type: integer + minimum: 1 + maximum: 100 + nextCursor: + type: + - string + - 'null' + description: Opaque cursor for the next page. `null` when there are no more results. +additionalProperties: false diff --git a/docs/api-v3-reference/src/components/schemas/GenerateSurveyRequest.yml b/docs/api-v3-reference/src/components/schemas/GenerateSurveyRequest.yml new file mode 100644 index 000000000000..585476585594 --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/GenerateSurveyRequest.yml @@ -0,0 +1,48 @@ +type: object +description: > + AI survey creation request. `prompt` is used only to create a draft payload; + it is not + + persisted by this endpoint. The generated payload is validated and returned to + the caller for + + a separate create request. +required: + - workspaceId + - prompt +properties: + workspaceId: + type: string + format: cuid2 + description: >- + Workspace where the AI-created survey draft would be created. Requires + read/write access. + prompt: + type: string + minLength: 4 + maxLength: 1200 + description: > + Natural-language survey goal and audience. Prompts with fewer than 24 + characters or fewer + + than four whitespace-separated words return prompt feedback before any AI + provider call. + type: + type: string + enum: + - link + default: link + description: >- + Link Survey is the only AI-created type until the v3 create endpoint + supports additional types. + language: + $ref: ./AISurveyGenerationLocaleCode.yml + description: > + Preferred survey language. Session clients should send the logged-in + user's language. + + The generator uses it when the prompt language is ambiguous or cannot be + confidently + + matched to a supported app locale. +additionalProperties: false diff --git a/docs/api-v3-reference/src/components/schemas/GenerateSurveyResult.yml b/docs/api-v3-reference/src/components/schemas/GenerateSurveyResult.yml new file mode 100644 index 000000000000..57cfae8ce5dd --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/GenerateSurveyResult.yml @@ -0,0 +1,20 @@ +type: object +required: + - language + - payload + - validation +properties: + language: + $ref: ./AISurveyGenerationLocaleCode.yml + description: >- + Supported app locale used for the AI-created survey content and create + payload language maps. + payload: + allOf: + - $ref: ./CreateSurveyRequest.yml + description: > + Strict create payload ready for `POST /api/v3/surveys`. It always has + `status: draft`. + validation: + $ref: ./GeneratedSurveyValidationResult.yml +additionalProperties: false diff --git a/docs/api-v3-reference/src/components/schemas/GeneratedSurveyValidationLanguage.yml b/docs/api-v3-reference/src/components/schemas/GeneratedSurveyValidationLanguage.yml new file mode 100644 index 000000000000..bdd72b8039a0 --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/GeneratedSurveyValidationLanguage.yml @@ -0,0 +1,13 @@ +type: object +required: + - code + - default + - enabled +properties: + code: + $ref: ./AISurveyGenerationLocaleCode.yml + default: + type: boolean + enabled: + type: boolean +additionalProperties: false diff --git a/docs/api-v3-reference/src/components/schemas/GeneratedSurveyValidationResult.yml b/docs/api-v3-reference/src/components/schemas/GeneratedSurveyValidationResult.yml new file mode 100644 index 000000000000..cb06c596fa45 --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/GeneratedSurveyValidationResult.yml @@ -0,0 +1,24 @@ +type: object +required: + - valid + - invalid_params + - languages +properties: + valid: + type: boolean + description: >- + Whether the generated create payload passed the same v3 create preparation + pipeline. + invalid_params: + type: array + description: >- + Repairable validation errors. Successful generate responses return an + empty array. + items: + $ref: ./InvalidParam.yml + languages: + type: array + description: Languages that the generated create payload would connect or create. + items: + $ref: ./GeneratedSurveyValidationLanguage.yml +additionalProperties: false diff --git a/docs/api-v3-reference/src/components/schemas/InvalidParam.yml b/docs/api-v3-reference/src/components/schemas/InvalidParam.yml new file mode 100644 index 000000000000..6f7646f1ba8b --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/InvalidParam.yml @@ -0,0 +1,63 @@ +type: object +description: > + Field-level validation error. `name` and `reason` are always intended for + humans. + + Optional machine-readable fields are included when the API can identify the + semantic error, + + especially for survey locale, identifier, and reference validation used by MCP + and agent clients. +required: + - name + - reason +properties: + name: + type: string + description: Dot-path to the invalid request field. + reason: + type: string + description: Human-readable repair guidance. + code: + type: string + enum: + - dangling_reference + - duplicate_identifier + - duplicate_locale + - forbidden_identifier + - immutable_identifier + - invalid_locale + - invalid_reference + - missing_required_field + - missing_translation + - unsupported_field + - unsupported_locale + description: Machine-readable validation category, when available. + identifier: + type: string + description: >- + Identifier involved in the validation failure, when available. For + language errors, this can be the normalized language code. + referenceType: + type: string + enum: + - block + - element + - ending + - hiddenField + - language + - variable + - variableName + - recall + description: >- + Identifier namespace involved in the validation failure. + missingId: + type: string + description: Referenced id that does not exist in the submitted survey document. + firstUsedAt: + type: string + description: Dot-path where a duplicate identifier was first used. + conflictsWith: + type: string + description: Dot-path to the existing identifier that conflicts with this field. +additionalProperties: false diff --git a/docs/api-v3-reference/src/components/schemas/LocaleCode.yml b/docs/api-v3-reference/src/components/schemas/LocaleCode.yml new file mode 100644 index 000000000000..f6294232afd8 --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/LocaleCode.yml @@ -0,0 +1,6 @@ +type: string +pattern: ^[a-z]{2}(?:-[A-Z][a-z]{3})?-[A-Z]{2}$ +description: >- + Canonical locale code accepted by v3 survey APIs, for example `en-US`, + `de-DE`, or `zh-Hans-CN`. +example: en-US diff --git a/docs/api-v3-reference/src/components/schemas/PatchSurveyRequest.yml b/docs/api-v3-reference/src/components/schemas/PatchSurveyRequest.yml new file mode 100644 index 000000000000..aef63d1ee880 --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/PatchSurveyRequest.yml @@ -0,0 +1,83 @@ +type: object +minProperties: 1 +description: > + Patch payload shape. Top-level fields are partial; any provided nested object + or array + + fully replaces that subtree. Omitted top-level fields are preserved. + Immutable/system fields + + such as `id`, `workspaceId`, `type`, `defaultLanguage`, timestamps, + `questions`, analytics, + + distribution, styling, targeting, and scripts are rejected. + + + `metadata`, `languages`, `welcomeCard`, `blocks`, `endings`, `hiddenFields`, + and `variables` + + replace their full top-level value when provided. Missing ids in replaced + arrays are deletions. + + Non-default locale keys in translatable maps must be declared in `languages`; + undeclared locale + + keys are rejected with `unsupported_locale`. To remove a language, remove it + from both + + `languages` and every translatable map that contains that locale key. + + Use `/api/v3/surveys/validate` with `operation: patch` before committing + automated or agentic + + changes. +properties: + name: + type: string + minLength: 1 + status: + type: string + enum: + - draft + - inProgress + - paused + - completed + metadata: + allOf: + - $ref: ./SurveyMetadata.yml + languages: + type: array + items: + $ref: ./CreateSurveyLanguage.yml + description: > + Replaces the survey language configuration. The default language cannot be + changed through + + PATCH; any `default: true` entry must match the existing default language. + Languages referenced + + by `metadata`, `welcomeCard`, `blocks`, or `endings` translatable maps + must be explicitly + + declared here, so remove the locale key from those maps as well when + intentionally removing + + a language. + welcomeCard: + $ref: ./SurveyWelcomeCard.yml + blocks: + type: array + minItems: 1 + items: + $ref: ./SurveyBlock.yml + endings: + type: array + items: + $ref: ./SurveyEnding.yml + hiddenFields: + $ref: ./SurveyHiddenFields.yml + variables: + type: array + items: + $ref: ./SurveyVariable.yml +additionalProperties: false diff --git a/docs/api-v3-reference/src/components/schemas/Problem.yml b/docs/api-v3-reference/src/components/schemas/Problem.yml new file mode 100644 index 000000000000..59fee8f077c5 --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/Problem.yml @@ -0,0 +1,44 @@ +type: object +description: >- + RFC 9457 Problem Details for HTTP APIs (`application/problem+json`). Responses + typically include a machine-readable `code` field alongside `title`, `status`, + `detail`, and `requestId`. +required: + - title + - status + - detail + - requestId +properties: + type: + type: string + format: uri + title: + type: string + status: + type: integer + detail: + type: string + instance: + type: string + code: + type: string + enum: + - ai_features_not_enabled + - ai_generated_payload_invalid + - ai_instance_not_configured + - ai_smart_tools_disabled + - bad_gateway + - bad_request + - forbidden + - internal_server_error + - not_authenticated + - too_many_requests + - unprocessable_content + requestId: + type: string + details: + type: object + invalid_params: + type: array + items: + $ref: ./InvalidParam.yml diff --git a/docs/api-v3-reference/src/components/schemas/SurveyAddressElement.yml b/docs/api-v3-reference/src/components/schemas/SurveyAddressElement.yml new file mode 100644 index 000000000000..28f7df5eb16f --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/SurveyAddressElement.yml @@ -0,0 +1,30 @@ +allOf: + - $ref: ./SurveyElementBase.yml + - type: object + required: + - addressLine1 + - addressLine2 + - city + - state + - zip + - country + properties: + type: + type: string + enum: + - address + addressLine1: + $ref: ./SurveyToggleInputConfig.yml + addressLine2: + $ref: ./SurveyToggleInputConfig.yml + city: + $ref: ./SurveyToggleInputConfig.yml + state: + $ref: ./SurveyToggleInputConfig.yml + zip: + $ref: ./SurveyToggleInputConfig.yml + country: + $ref: ./SurveyToggleInputConfig.yml + validation: + $ref: ./SurveyValidation.yml +unevaluatedProperties: false diff --git a/docs/api-v3-reference/src/components/schemas/SurveyBlock.yml b/docs/api-v3-reference/src/components/schemas/SurveyBlock.yml new file mode 100644 index 000000000000..00e74d61ebab --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/SurveyBlock.yml @@ -0,0 +1,43 @@ +type: object +description: > + Block-based survey section. Block ids are stable public identifiers. Logic and + fallbacks can + + jump to block ids or ending ids, so clients and agents should preserve ids + unless intentionally + + creating/deleting a block. +required: + - id + - name + - elements +properties: + id: + type: string + format: cuid2 + description: Stable block id. + name: + type: string + minLength: 1 + elements: + type: array + minItems: 1 + items: + $ref: ./SurveyElement.yml + logic: + type: array + items: + $ref: ./SurveyBlockLogic.yml + logicFallback: + type: string + format: cuid2 + description: > + Block or ending id used when no logic condition matches. Only valid when + this same block + + has at least one `logic` rule; omit it for normal sequential flow. + buttonLabel: + $ref: ./TranslatableText.yml + backButtonLabel: + $ref: ./TranslatableText.yml +additionalProperties: false diff --git a/docs/api-v3-reference/src/components/schemas/SurveyBlockLogic.yml b/docs/api-v3-reference/src/components/schemas/SurveyBlockLogic.yml new file mode 100644 index 000000000000..8e1345667a9b --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/SurveyBlockLogic.yml @@ -0,0 +1,17 @@ +type: object +description: Conditional logic rule evaluated at block level. +required: + - id + - conditions + - actions +properties: + id: + type: string + format: cuid2 + conditions: + $ref: ./SurveyConditionGroup.yml + actions: + type: array + items: + $ref: ./SurveyLogicAction.yml +additionalProperties: false diff --git a/docs/api-v3-reference/src/components/schemas/SurveyCalElement.yml b/docs/api-v3-reference/src/components/schemas/SurveyCalElement.yml new file mode 100644 index 000000000000..2dda3e34abad --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/SurveyCalElement.yml @@ -0,0 +1,16 @@ +allOf: + - $ref: ./SurveyElementBase.yml + - type: object + required: + - calUserName + properties: + type: + type: string + enum: + - cal + calUserName: + type: string + minLength: 1 + calHost: + type: string +unevaluatedProperties: false diff --git a/docs/api-v3-reference/src/components/schemas/SurveyCalculateAction.yml b/docs/api-v3-reference/src/components/schemas/SurveyCalculateAction.yml new file mode 100644 index 000000000000..11f247042a7f --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/SurveyCalculateAction.yml @@ -0,0 +1,32 @@ +type: object +description: Updates a survey variable when the logic rule matches. +required: + - id + - objective + - variableId + - operator + - value +properties: + id: + type: string + format: cuid2 + objective: + type: string + enum: + - calculate + variableId: + type: string + format: cuid2 + description: Variable id for `calculate`. + operator: + type: string + enum: + - assign + - concat + - add + - subtract + - multiply + - divide + value: + $ref: ./SurveyLogicOperand.yml +additionalProperties: false diff --git a/docs/api-v3-reference/src/components/schemas/SurveyCesElement.yml b/docs/api-v3-reference/src/components/schemas/SurveyCesElement.yml new file mode 100644 index 000000000000..33a70e6d5421 --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/SurveyCesElement.yml @@ -0,0 +1,30 @@ +allOf: + - $ref: ./SurveyElementBase.yml + - type: object + required: + - scale + - range + properties: + type: + type: string + enum: + - ces + scale: + type: string + enum: + - number + - smiley + - star + range: + type: integer + enum: + - 5 + - 7 + lowerLabel: + $ref: ./TranslatableText.yml + upperLabel: + $ref: ./TranslatableText.yml + isColorCodingEnabled: + type: boolean + default: false +unevaluatedProperties: false diff --git a/docs/api-v3-reference/src/components/schemas/SurveyCharLimit.yml b/docs/api-v3-reference/src/components/schemas/SurveyCharLimit.yml new file mode 100644 index 000000000000..d96556fee789 --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/SurveyCharLimit.yml @@ -0,0 +1,11 @@ +type: object +description: Optional `openText` character limit configuration. +properties: + enabled: + type: boolean + default: false + min: + type: number + max: + type: number +additionalProperties: false diff --git a/docs/api-v3-reference/src/components/schemas/SurveyChoice.yml b/docs/api-v3-reference/src/components/schemas/SurveyChoice.yml new file mode 100644 index 000000000000..483c0e61d9a0 --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/SurveyChoice.yml @@ -0,0 +1,11 @@ +type: object +required: + - id + - label +properties: + id: + type: string + description: Stable choice id. + label: + $ref: ./TranslatableText.yml +additionalProperties: false diff --git a/docs/api-v3-reference/src/components/schemas/SurveyCondition.yml b/docs/api-v3-reference/src/components/schemas/SurveyCondition.yml new file mode 100644 index 000000000000..d0acd85365f5 --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/SurveyCondition.yml @@ -0,0 +1,55 @@ +type: object +description: > + Single condition. Operators such as `isSubmitted`, `isSkipped`, `isClicked`, + `isAccepted`, + + `isBooked`, `isSet`, and `isEmpty` do not use `rightOperand`; comparison + operators do. +required: + - id + - leftOperand + - operator +properties: + id: + type: string + format: cuid2 + leftOperand: + $ref: ./SurveyDynamicReference.yml + operator: + type: string + enum: + - equals + - doesNotEqual + - contains + - doesNotContain + - startsWith + - doesNotStartWith + - endsWith + - doesNotEndWith + - isSubmitted + - isSkipped + - isGreaterThan + - isLessThan + - isGreaterThanOrEqual + - isLessThanOrEqual + - equalsOneOf + - includesAllOf + - includesOneOf + - doesNotIncludeOneOf + - doesNotIncludeAllOf + - isClicked + - isNotClicked + - isAccepted + - isBefore + - isAfter + - isBooked + - isPartiallySubmitted + - isCompletelySubmitted + - isSet + - isNotSet + - isEmpty + - isNotEmpty + - isAnyOf + rightOperand: + $ref: ./SurveyLogicOperand.yml +additionalProperties: false diff --git a/docs/api-v3-reference/src/components/schemas/SurveyConditionGroup.yml b/docs/api-v3-reference/src/components/schemas/SurveyConditionGroup.yml new file mode 100644 index 000000000000..58ffc2e82f87 --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/SurveyConditionGroup.yml @@ -0,0 +1,21 @@ +type: object +required: + - id + - connector + - conditions +properties: + id: + type: string + format: cuid2 + connector: + type: string + enum: + - and + - or + conditions: + type: array + items: + oneOf: + - $ref: ./SurveyCondition.yml + - $ref: ./SurveyConditionGroup.yml +additionalProperties: false diff --git a/docs/api-v3-reference/src/components/schemas/SurveyConsentElement.yml b/docs/api-v3-reference/src/components/schemas/SurveyConsentElement.yml new file mode 100644 index 000000000000..ded596332d0e --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/SurveyConsentElement.yml @@ -0,0 +1,15 @@ +allOf: + - $ref: ./SurveyElementBase.yml + - type: object + required: + - label + properties: + type: + type: string + enum: + - consent + label: + $ref: ./TranslatableText.yml + validation: + $ref: ./SurveyValidation.yml +unevaluatedProperties: false diff --git a/docs/api-v3-reference/src/components/schemas/SurveyContactInfoElement.yml b/docs/api-v3-reference/src/components/schemas/SurveyContactInfoElement.yml new file mode 100644 index 000000000000..ee105fb2f5f2 --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/SurveyContactInfoElement.yml @@ -0,0 +1,27 @@ +allOf: + - $ref: ./SurveyElementBase.yml + - type: object + required: + - firstName + - lastName + - email + - phone + - company + properties: + type: + type: string + enum: + - contactInfo + firstName: + $ref: ./SurveyToggleInputConfig.yml + lastName: + $ref: ./SurveyToggleInputConfig.yml + email: + $ref: ./SurveyToggleInputConfig.yml + phone: + $ref: ./SurveyToggleInputConfig.yml + company: + $ref: ./SurveyToggleInputConfig.yml + validation: + $ref: ./SurveyValidation.yml +unevaluatedProperties: false diff --git a/docs/api-v3-reference/src/components/schemas/SurveyCsatElement.yml b/docs/api-v3-reference/src/components/schemas/SurveyCsatElement.yml new file mode 100644 index 000000000000..7061a0179731 --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/SurveyCsatElement.yml @@ -0,0 +1,29 @@ +allOf: + - $ref: ./SurveyElementBase.yml + - type: object + required: + - scale + - range + properties: + type: + type: string + enum: + - csat + scale: + type: string + enum: + - number + - smiley + - star + range: + type: integer + enum: + - 5 + lowerLabel: + $ref: ./TranslatableText.yml + upperLabel: + $ref: ./TranslatableText.yml + isColorCodingEnabled: + type: boolean + default: false +unevaluatedProperties: false diff --git a/docs/api-v3-reference/src/components/schemas/SurveyCtaElement.yml b/docs/api-v3-reference/src/components/schemas/SurveyCtaElement.yml new file mode 100644 index 000000000000..df8b1a955582 --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/SurveyCtaElement.yml @@ -0,0 +1,29 @@ +allOf: + - $ref: ./SurveyElementBase.yml + - type: object + description: >- + If `buttonExternal` is true, `buttonUrl` and `ctaButtonLabel` are + required. + properties: + type: + type: string + enum: + - cta + buttonExternal: + type: boolean + default: false + buttonUrl: + type: string + ctaButtonLabel: + $ref: ./TranslatableText.yml + - if: + required: + - buttonExternal + properties: + buttonExternal: + const: true + then: + required: + - buttonUrl + - ctaButtonLabel +unevaluatedProperties: false diff --git a/docs/api-v3-reference/src/components/schemas/SurveyDateElement.yml b/docs/api-v3-reference/src/components/schemas/SurveyDateElement.yml new file mode 100644 index 000000000000..9187a7977b57 --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/SurveyDateElement.yml @@ -0,0 +1,21 @@ +allOf: + - $ref: ./SurveyElementBase.yml + - type: object + required: + - format + properties: + type: + type: string + enum: + - date + html: + $ref: ./TranslatableText.yml + format: + type: string + enum: + - M-d-y + - d-M-y + - y-M-d + validation: + $ref: ./SurveyValidation.yml +unevaluatedProperties: false diff --git a/docs/api-v3-reference/src/components/schemas/SurveyDynamicReference.yml b/docs/api-v3-reference/src/components/schemas/SurveyDynamicReference.yml new file mode 100644 index 000000000000..6d7b5e9a7af9 --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/SurveyDynamicReference.yml @@ -0,0 +1,20 @@ +type: object +description: Dynamic reference to another value in the survey document. +required: + - type + - value +properties: + type: + type: string + enum: + - element + - variable + - hiddenField + value: + type: string + description: Element id, variable id, or hidden field id depending on `type`. + meta: + type: object + additionalProperties: + type: string +additionalProperties: false diff --git a/docs/api-v3-reference/src/components/schemas/SurveyElement.yml b/docs/api-v3-reference/src/components/schemas/SurveyElement.yml new file mode 100644 index 000000000000..f9d5e7ed8ce6 --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/SurveyElement.yml @@ -0,0 +1,46 @@ +oneOf: + - $ref: ./SurveyOpenTextElement.yml + - $ref: ./SurveyConsentElement.yml + - $ref: ./SurveyMultipleChoiceSingleElement.yml + - $ref: ./SurveyMultipleChoiceMultiElement.yml + - $ref: ./SurveyNpsElement.yml + - $ref: ./SurveyCtaElement.yml + - $ref: ./SurveyRatingElement.yml + - $ref: ./SurveyPictureSelectionElement.yml + - $ref: ./SurveyDateElement.yml + - $ref: ./SurveyFileUploadElement.yml + - $ref: ./SurveyCalElement.yml + - $ref: ./SurveyMatrixElement.yml + - $ref: ./SurveyAddressElement.yml + - $ref: ./SurveyRankingElement.yml + - $ref: ./SurveyContactInfoElement.yml + - $ref: ./SurveyCsatElement.yml + - $ref: ./SurveyCesElement.yml +discriminator: + propertyName: type + mapping: + openText: ./SurveyOpenTextElement.yml + consent: ./SurveyConsentElement.yml + multipleChoiceSingle: ./SurveyMultipleChoiceSingleElement.yml + multipleChoiceMulti: ./SurveyMultipleChoiceMultiElement.yml + nps: ./SurveyNpsElement.yml + cta: ./SurveyCtaElement.yml + rating: ./SurveyRatingElement.yml + pictureSelection: ./SurveyPictureSelectionElement.yml + date: ./SurveyDateElement.yml + fileUpload: ./SurveyFileUploadElement.yml + cal: ./SurveyCalElement.yml + matrix: ./SurveyMatrixElement.yml + address: ./SurveyAddressElement.yml + ranking: ./SurveyRankingElement.yml + contactInfo: ./SurveyContactInfoElement.yml + csat: ./SurveyCsatElement.yml + ces: ./SurveyCesElement.yml +description: > + Survey element/question inside a block. Element ids are stable public + identifiers used by + + logic, recall strings, response data, quotas, integrations, and analysis. + `type` selects the + + allowed shape; unsupported fields are rejected instead of ignored. diff --git a/docs/api-v3-reference/src/components/schemas/SurveyElementBase.yml b/docs/api-v3-reference/src/components/schemas/SurveyElementBase.yml new file mode 100644 index 000000000000..47592ef55b2c --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/SurveyElementBase.yml @@ -0,0 +1,44 @@ +type: object +required: + - id + - type + - headline + - required +properties: + id: + type: string + pattern: ^[a-zA-Z0-9_-]+$ + description: Stable element id. Avoid spaces and reserved ids. + type: + type: string + enum: + - openText + - multipleChoiceSingle + - multipleChoiceMulti + - nps + - rating + - csat + - ces + - consent + - pictureSelection + - cta + - date + - fileUpload + - cal + - matrix + - address + - ranking + - contactInfo + headline: + $ref: ./TranslatableText.yml + subheader: + $ref: ./TranslatableText.yml + required: + type: boolean + imageUrl: + type: string + videoUrl: + type: string + isDraft: + type: boolean + description: Draft marker used by the editor and future update rules. diff --git a/docs/api-v3-reference/src/components/schemas/SurveyEndScreenEnding.yml b/docs/api-v3-reference/src/components/schemas/SurveyEndScreenEnding.yml new file mode 100644 index 000000000000..bfca651ffddc --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/SurveyEndScreenEnding.yml @@ -0,0 +1,27 @@ +type: object +description: Visual end screen displayed after survey completion. +required: + - id + - type +properties: + id: + type: string + format: cuid2 + description: Stable ending id. `jumpToBlock.target` may point to this id. + type: + type: string + enum: + - endScreen + headline: + $ref: ./TranslatableText.yml + subheader: + $ref: ./TranslatableText.yml + buttonLabel: + $ref: ./TranslatableText.yml + buttonLink: + type: string + imageUrl: + type: string + videoUrl: + type: string +additionalProperties: false diff --git a/docs/api-v3-reference/src/components/schemas/SurveyEnding.yml b/docs/api-v3-reference/src/components/schemas/SurveyEnding.yml new file mode 100644 index 000000000000..c310472b3dbc --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/SurveyEnding.yml @@ -0,0 +1,13 @@ +oneOf: + - $ref: ./SurveyEndScreenEnding.yml + - $ref: ./SurveyRedirectEnding.yml +discriminator: + propertyName: type + mapping: + endScreen: ./SurveyEndScreenEnding.yml + redirectToUrl: ./SurveyRedirectEnding.yml +description: > + Ending reached after the last block or a jump action. `type` selects the + allowed shape; + + unsupported fields are rejected instead of ignored. diff --git a/docs/api-v3-reference/src/components/schemas/SurveyFileUploadElement.yml b/docs/api-v3-reference/src/components/schemas/SurveyFileUploadElement.yml new file mode 100644 index 000000000000..2c6f8b37e5bc --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/SurveyFileUploadElement.yml @@ -0,0 +1,21 @@ +allOf: + - $ref: ./SurveyElementBase.yml + - type: object + required: + - allowMultipleFiles + properties: + type: + type: string + enum: + - fileUpload + allowMultipleFiles: + type: boolean + maxSizeInMB: + type: number + allowedFileExtensions: + type: array + items: + type: string + validation: + $ref: ./SurveyValidation.yml +unevaluatedProperties: false diff --git a/docs/api-v3-reference/src/components/schemas/SurveyHiddenFields.yml b/docs/api-v3-reference/src/components/schemas/SurveyHiddenFields.yml new file mode 100644 index 000000000000..897cbe37ffb4 --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/SurveyHiddenFields.yml @@ -0,0 +1,22 @@ +type: object +description: > + Hidden fields, sometimes called embedded data in other survey products. Field + ids are stable + + public identifiers and may be referenced by logic, recall, quotas, + integrations, and response data. + + Use only letters, numbers, underscores, and hyphens; avoid spaces and reserved + ids. +required: + - enabled +properties: + enabled: + type: boolean + fieldIds: + type: array + items: + type: string + pattern: ^[a-zA-Z0-9_-]+$ + uniqueItems: true +additionalProperties: false diff --git a/docs/api-v3-reference/src/components/schemas/SurveyJumpToBlockAction.yml b/docs/api-v3-reference/src/components/schemas/SurveyJumpToBlockAction.yml new file mode 100644 index 000000000000..12c2fba26e9b --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/SurveyJumpToBlockAction.yml @@ -0,0 +1,19 @@ +type: object +description: Jumps to another block or ending when the logic rule matches. +required: + - id + - objective + - target +properties: + id: + type: string + format: cuid2 + objective: + type: string + enum: + - jumpToBlock + target: + type: string + format: cuid2 + description: Target block id or ending id. +additionalProperties: false diff --git a/docs/api-v3-reference/src/components/schemas/SurveyLanguage.yml b/docs/api-v3-reference/src/components/schemas/SurveyLanguage.yml new file mode 100644 index 000000000000..f5ab180e5dbf --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/SurveyLanguage.yml @@ -0,0 +1,33 @@ +type: object +description: > + Language configured for this survey. GET responses expose the server-emitted + code/tag used as the + + translatable map key. Existing surveys can use region-qualified, + language-only, or script-only codes. + + Disabled languages can still be read by the management API so unfinished + translations can be completed. +required: + - code + - default + - enabled +properties: + code: + type: string + description: Server-emitted survey language code/tag used as the translatable map key. + example: en-US + alias: + type: + - string + - 'null' + description: >- + Optional configured alias accepted by `?lang` for compatibility and agent + discovery. + example: english + default: + type: boolean + description: Whether this is the default authoring language. + enabled: + type: boolean + description: Whether this language is enabled for respondent-facing delivery. diff --git a/docs/api-v3-reference/src/components/schemas/SurveyListItem.yml b/docs/api-v3-reference/src/components/schemas/SurveyListItem.yml new file mode 100644 index 000000000000..d65543ef0e7d --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/SurveyListItem.yml @@ -0,0 +1,54 @@ +type: object +description: > + Shape returned by `GET /api/v3/surveys`. Serialized dates are ISO 8601 + strings. + + The v3 overview contract intentionally omits internal fields such as `_count`. + + Legacy DB rows may include survey **type** values `website` or `web` (see + Prisma); filter **type** only accepts `link` | `app`. +properties: + id: + type: string + name: + type: string + workspaceId: + type: string + type: + type: string + enum: + - link + - app + - website + - web + status: + type: string + enum: + - draft + - inProgress + - paused + - completed + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + responseCount: + type: integer + creator: + type: + - object + - 'null' + properties: + name: + type: string + singleUse: + type: + - object + - 'null' + properties: + enabled: + type: boolean + isEncrypted: + type: boolean diff --git a/docs/api-v3-reference/src/components/schemas/SurveyLogicAction.yml b/docs/api-v3-reference/src/components/schemas/SurveyLogicAction.yml new file mode 100644 index 000000000000..1e303ba44076 --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/SurveyLogicAction.yml @@ -0,0 +1,12 @@ +oneOf: + - $ref: ./SurveyCalculateAction.yml + - $ref: ./SurveyRequireAnswerAction.yml + - $ref: ./SurveyJumpToBlockAction.yml +description: > + Logic action. Keep referenced ids stable: `calculate.variableId` points to a + variable id, + + `requireAnswer.target` points to an element id, and `jumpToBlock.target` + points to a block id + + or ending id. diff --git a/docs/api-v3-reference/src/components/schemas/SurveyLogicOperand.yml b/docs/api-v3-reference/src/components/schemas/SurveyLogicOperand.yml new file mode 100644 index 000000000000..d32bcde2837d --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/SurveyLogicOperand.yml @@ -0,0 +1,19 @@ +oneOf: + - type: object + required: + - type + - value + properties: + type: + type: string + enum: + - static + value: + oneOf: + - type: string + - type: number + - type: array + items: + type: string + additionalProperties: false + - $ref: ./SurveyDynamicReference.yml diff --git a/docs/api-v3-reference/src/components/schemas/SurveyMatrixElement.yml b/docs/api-v3-reference/src/components/schemas/SurveyMatrixElement.yml new file mode 100644 index 000000000000..3ea6fff8dbe3 --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/SurveyMatrixElement.yml @@ -0,0 +1,24 @@ +allOf: + - $ref: ./SurveyElementBase.yml + - type: object + required: + - rows + - columns + properties: + type: + type: string + enum: + - matrix + rows: + type: array + items: + $ref: ./SurveyChoice.yml + columns: + type: array + items: + $ref: ./SurveyChoice.yml + shuffleOption: + $ref: ./SurveyShuffleOption.yml + validation: + $ref: ./SurveyValidation.yml +unevaluatedProperties: false diff --git a/docs/api-v3-reference/src/components/schemas/SurveyMetadata.yml b/docs/api-v3-reference/src/components/schemas/SurveyMetadata.yml new file mode 100644 index 000000000000..3ee8cea0642b --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/SurveyMetadata.yml @@ -0,0 +1,15 @@ +type: object +description: > + Arbitrary JSON survey context for customer- or operation-specific metadata. v3 + preserves + + arbitrary metadata values as-is. If present, `title` and `description` are + treated as + + translatable text maps and returned with real locale-code keys. +properties: + title: + $ref: ./TranslatableText.yml + description: + $ref: ./TranslatableText.yml +additionalProperties: true diff --git a/docs/api-v3-reference/src/components/schemas/SurveyMultipleChoiceDisplayType.yml b/docs/api-v3-reference/src/components/schemas/SurveyMultipleChoiceDisplayType.yml new file mode 100644 index 000000000000..67045087f7d9 --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/SurveyMultipleChoiceDisplayType.yml @@ -0,0 +1,4 @@ +type: string +enum: + - list + - dropdown diff --git a/docs/api-v3-reference/src/components/schemas/SurveyMultipleChoiceMultiElement.yml b/docs/api-v3-reference/src/components/schemas/SurveyMultipleChoiceMultiElement.yml new file mode 100644 index 000000000000..a40f90bff38e --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/SurveyMultipleChoiceMultiElement.yml @@ -0,0 +1,24 @@ +allOf: + - $ref: ./SurveyElementBase.yml + - type: object + required: + - choices + properties: + type: + type: string + enum: + - multipleChoiceMulti + choices: + type: array + minItems: 2 + items: + $ref: ./SurveyChoice.yml + shuffleOption: + $ref: ./SurveyShuffleOption.yml + otherOptionPlaceholder: + $ref: ./TranslatableText.yml + validation: + $ref: ./SurveyValidation.yml + displayType: + $ref: ./SurveyMultipleChoiceDisplayType.yml +unevaluatedProperties: false diff --git a/docs/api-v3-reference/src/components/schemas/SurveyMultipleChoiceSingleElement.yml b/docs/api-v3-reference/src/components/schemas/SurveyMultipleChoiceSingleElement.yml new file mode 100644 index 000000000000..c8db577fb12f --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/SurveyMultipleChoiceSingleElement.yml @@ -0,0 +1,22 @@ +allOf: + - $ref: ./SurveyElementBase.yml + - type: object + required: + - choices + properties: + type: + type: string + enum: + - multipleChoiceSingle + choices: + type: array + minItems: 2 + items: + $ref: ./SurveyChoice.yml + shuffleOption: + $ref: ./SurveyShuffleOption.yml + otherOptionPlaceholder: + $ref: ./TranslatableText.yml + displayType: + $ref: ./SurveyMultipleChoiceDisplayType.yml +unevaluatedProperties: false diff --git a/docs/api-v3-reference/src/components/schemas/SurveyNpsElement.yml b/docs/api-v3-reference/src/components/schemas/SurveyNpsElement.yml new file mode 100644 index 000000000000..a90deab43a7e --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/SurveyNpsElement.yml @@ -0,0 +1,16 @@ +allOf: + - $ref: ./SurveyElementBase.yml + - type: object + properties: + type: + type: string + enum: + - nps + lowerLabel: + $ref: ./TranslatableText.yml + upperLabel: + $ref: ./TranslatableText.yml + isColorCodingEnabled: + type: boolean + default: false +unevaluatedProperties: false diff --git a/docs/api-v3-reference/src/components/schemas/SurveyNumberVariable.yml b/docs/api-v3-reference/src/components/schemas/SurveyNumberVariable.yml new file mode 100644 index 000000000000..d40ed1f9d56b --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/SurveyNumberVariable.yml @@ -0,0 +1,28 @@ +type: object +description: > + Number variable. Used by `calculate` logic actions with numeric operators such + as `add`, + + `subtract`, `multiply`, `divide`, or `assign`. +required: + - id + - name + - type + - value +properties: + id: + type: string + format: cuid2 + description: Stable variable id referenced from logic. + name: + type: string + pattern: ^[a-z0-9_]+$ + description: Unique variable name. Lowercase letters, numbers, and underscores only. + type: + type: string + enum: + - number + value: + type: number + description: Default numeric value. +additionalProperties: false diff --git a/docs/api-v3-reference/src/components/schemas/SurveyOpenTextElement.yml b/docs/api-v3-reference/src/components/schemas/SurveyOpenTextElement.yml new file mode 100644 index 000000000000..eebf0899b383 --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/SurveyOpenTextElement.yml @@ -0,0 +1,29 @@ +allOf: + - $ref: ./SurveyElementBase.yml + - type: object + properties: + type: + type: string + enum: + - openText + placeholder: + $ref: ./TranslatableText.yml + longAnswer: + type: boolean + inputType: + type: string + enum: + - text + - email + - url + - number + - phone + default: text + insightsEnabled: + type: boolean + default: false + charLimit: + $ref: ./SurveyCharLimit.yml + validation: + $ref: ./SurveyValidation.yml +unevaluatedProperties: false diff --git a/docs/api-v3-reference/src/components/schemas/SurveyPictureChoice.yml b/docs/api-v3-reference/src/components/schemas/SurveyPictureChoice.yml new file mode 100644 index 000000000000..6ec395cb8d4b --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/SurveyPictureChoice.yml @@ -0,0 +1,11 @@ +type: object +required: + - id + - imageUrl +properties: + id: + type: string + description: Stable picture choice id. + imageUrl: + type: string +additionalProperties: false diff --git a/docs/api-v3-reference/src/components/schemas/SurveyPictureSelectionElement.yml b/docs/api-v3-reference/src/components/schemas/SurveyPictureSelectionElement.yml new file mode 100644 index 000000000000..6d8714958d5b --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/SurveyPictureSelectionElement.yml @@ -0,0 +1,21 @@ +allOf: + - $ref: ./SurveyElementBase.yml + - type: object + required: + - choices + properties: + type: + type: string + enum: + - pictureSelection + allowMulti: + type: boolean + default: false + choices: + type: array + minItems: 2 + items: + $ref: ./SurveyPictureChoice.yml + validation: + $ref: ./SurveyValidation.yml +unevaluatedProperties: false diff --git a/docs/api-v3-reference/src/components/schemas/SurveyRankingElement.yml b/docs/api-v3-reference/src/components/schemas/SurveyRankingElement.yml new file mode 100644 index 000000000000..187909558f1c --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/SurveyRankingElement.yml @@ -0,0 +1,23 @@ +allOf: + - $ref: ./SurveyElementBase.yml + - type: object + required: + - choices + properties: + type: + type: string + enum: + - ranking + choices: + type: array + minItems: 2 + maxItems: 25 + items: + $ref: ./SurveyChoice.yml + otherOptionPlaceholder: + $ref: ./TranslatableText.yml + shuffleOption: + $ref: ./SurveyShuffleOption.yml + validation: + $ref: ./SurveyValidation.yml +unevaluatedProperties: false diff --git a/docs/api-v3-reference/src/components/schemas/SurveyRatingElement.yml b/docs/api-v3-reference/src/components/schemas/SurveyRatingElement.yml new file mode 100644 index 000000000000..0f4181c7acf7 --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/SurveyRatingElement.yml @@ -0,0 +1,34 @@ +allOf: + - $ref: ./SurveyElementBase.yml + - type: object + required: + - scale + - range + properties: + type: + type: string + enum: + - rating + scale: + type: string + enum: + - number + - smiley + - star + range: + type: integer + enum: + - 3 + - 4 + - 5 + - 6 + - 7 + - 10 + lowerLabel: + $ref: ./TranslatableText.yml + upperLabel: + $ref: ./TranslatableText.yml + isColorCodingEnabled: + type: boolean + default: false +unevaluatedProperties: false diff --git a/docs/api-v3-reference/src/components/schemas/SurveyRedirectEnding.yml b/docs/api-v3-reference/src/components/schemas/SurveyRedirectEnding.yml new file mode 100644 index 000000000000..9fe911b57c1d --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/SurveyRedirectEnding.yml @@ -0,0 +1,30 @@ +type: object +description: > + Redirects the respondent to a URL after survey completion. External redirects + require the + + organization's external URL permission; otherwise write endpoints return `403 + Forbidden`. +required: + - id + - type + - url +properties: + id: + type: string + format: cuid2 + description: Stable ending id. `jumpToBlock.target` may point to this id. + type: + type: string + enum: + - redirectToUrl + url: + type: string + format: uri + description: >- + External redirect URL. Requires the organization's external URL + permission. + label: + type: string + description: Optional internal label for redirect endings. +additionalProperties: false diff --git a/docs/api-v3-reference/src/components/schemas/SurveyRequireAnswerAction.yml b/docs/api-v3-reference/src/components/schemas/SurveyRequireAnswerAction.yml new file mode 100644 index 000000000000..00c10802633e --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/SurveyRequireAnswerAction.yml @@ -0,0 +1,18 @@ +type: object +description: Requires an element/question to be answered before continuing. +required: + - id + - objective + - target +properties: + id: + type: string + format: cuid2 + objective: + type: string + enum: + - requireAnswer + target: + type: string + description: Target element id. +additionalProperties: false diff --git a/docs/api-v3-reference/src/components/schemas/SurveyResource.yml b/docs/api-v3-reference/src/components/schemas/SurveyResource.yml new file mode 100644 index 000000000000..2c0b7d6f8b2f --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/SurveyResource.yml @@ -0,0 +1,73 @@ +type: object +required: + - id + - workspaceId + - createdAt + - updatedAt + - name + - type + - status + - metadata + - defaultLanguage + - languages + - welcomeCard + - blocks + - endings + - hiddenFields + - variables +properties: + id: + type: string + workspaceId: + type: string + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + name: + type: string + type: + type: string + enum: + - link + - app + - website + - web + status: + type: string + enum: + - draft + - inProgress + - paused + - completed + metadata: + anyOf: + - $ref: ./SurveyMetadata.yml + - type: 'null' + defaultLanguage: + type: string + description: >- + Emitted language code/tag for the survey default language. The internal + `default` translation key is never exposed. + languages: + type: array + items: + $ref: ./SurveyLanguage.yml + welcomeCard: + $ref: ./SurveyWelcomeCard.yml + blocks: + type: array + items: + $ref: ./SurveyBlock.yml + endings: + type: array + items: + $ref: ./SurveyEnding.yml + hiddenFields: + $ref: ./SurveyHiddenFields.yml + variables: + type: array + items: + $ref: ./SurveyVariable.yml diff --git a/docs/api-v3-reference/src/components/schemas/SurveyShuffleOption.yml b/docs/api-v3-reference/src/components/schemas/SurveyShuffleOption.yml new file mode 100644 index 000000000000..7a329e11cfbc --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/SurveyShuffleOption.yml @@ -0,0 +1,7 @@ +type: string +enum: + - none + - all + - exceptLast + - reverseOrderOccasionally + - reverseOrderExceptLast diff --git a/docs/api-v3-reference/src/components/schemas/SurveyTextVariable.yml b/docs/api-v3-reference/src/components/schemas/SurveyTextVariable.yml new file mode 100644 index 000000000000..26ffaf6d3e29 --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/SurveyTextVariable.yml @@ -0,0 +1,26 @@ +type: object +description: > + Text variable. Used by `calculate` logic actions with text operators such as + `assign` or `concat`. +required: + - id + - name + - type + - value +properties: + id: + type: string + format: cuid2 + description: Stable variable id referenced from logic. + name: + type: string + pattern: ^[a-z0-9_]+$ + description: Unique variable name. Lowercase letters, numbers, and underscores only. + type: + type: string + enum: + - text + value: + type: string + description: Default text value. +additionalProperties: false diff --git a/docs/api-v3-reference/src/components/schemas/SurveyToggleInputConfig.yml b/docs/api-v3-reference/src/components/schemas/SurveyToggleInputConfig.yml new file mode 100644 index 000000000000..a732ad0b4057 --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/SurveyToggleInputConfig.yml @@ -0,0 +1,14 @@ +type: object +description: Field config for address and contact info elements. +required: + - show + - required + - placeholder +properties: + show: + type: boolean + required: + type: boolean + placeholder: + $ref: ./TranslatableText.yml +additionalProperties: false diff --git a/docs/api-v3-reference/src/components/schemas/SurveyValidation.yml b/docs/api-v3-reference/src/components/schemas/SurveyValidation.yml new file mode 100644 index 000000000000..02b4dbdaf80d --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/SurveyValidation.yml @@ -0,0 +1,16 @@ +type: object +description: Optional element-level validation rules. +required: + - rules +properties: + logic: + type: string + enum: + - and + - or + default: and + rules: + type: array + items: + $ref: ./SurveyValidationRule.yml +additionalProperties: false diff --git a/docs/api-v3-reference/src/components/schemas/SurveyValidationLanguage.yml b/docs/api-v3-reference/src/components/schemas/SurveyValidationLanguage.yml new file mode 100644 index 000000000000..09d57c7b0188 --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/SurveyValidationLanguage.yml @@ -0,0 +1,21 @@ +type: object +required: + - code + - default + - enabled + - writeBehavior +properties: + code: + $ref: ./LocaleCode.yml + default: + type: boolean + enabled: + type: boolean + writeBehavior: + type: string + enum: + - connect_or_create + description: >- + Validation is read-only; a real write would connect an existing language + or create it if missing. +additionalProperties: false diff --git a/docs/api-v3-reference/src/components/schemas/SurveyValidationResult.yml b/docs/api-v3-reference/src/components/schemas/SurveyValidationResult.yml new file mode 100644 index 000000000000..d70992e4a0c6 --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/SurveyValidationResult.yml @@ -0,0 +1,27 @@ +type: object +required: + - valid + - operation + - invalid_params +properties: + valid: + type: boolean + description: Whether the submitted survey document is valid. + operation: + type: string + enum: + - create + - patch + invalid_params: + type: array + description: Repairable validation errors using document-relative paths. + items: + $ref: ./InvalidParam.yml + languages: + type: array + description: >- + Languages that a successful write would connect or create. Present only + when `valid=true`. + items: + $ref: ./SurveyValidationLanguage.yml +additionalProperties: false diff --git a/docs/api-v3-reference/src/components/schemas/SurveyValidationRule.yml b/docs/api-v3-reference/src/components/schemas/SurveyValidationRule.yml new file mode 100644 index 000000000000..a1787c958446 --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/SurveyValidationRule.yml @@ -0,0 +1,55 @@ +type: object +required: + - id + - type + - params +properties: + id: + type: string + type: + type: string + enum: + - minLength + - maxLength + - pattern + - email + - url + - phone + - equals + - doesNotEqual + - contains + - doesNotContain + - minValue + - maxValue + - isGreaterThan + - isLessThan + - minSelections + - maxSelections + - minRanked + - rankAll + - minRowsAnswered + - answerAllRows + - isLaterThan + - isEarlierThan + - isBetween + - isNotBetween + - fileExtensionIs + - fileExtensionIsNot + params: + type: object + additionalProperties: true + field: + type: string + enum: + - addressLine1 + - addressLine2 + - city + - state + - zip + - country + - firstName + - lastName + - email + - phone + - company +additionalProperties: false diff --git a/docs/api-v3-reference/src/components/schemas/SurveyVariable.yml b/docs/api-v3-reference/src/components/schemas/SurveyVariable.yml new file mode 100644 index 000000000000..9722cce4f772 --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/SurveyVariable.yml @@ -0,0 +1,8 @@ +oneOf: + - $ref: ./SurveyNumberVariable.yml + - $ref: ./SurveyTextVariable.yml +description: > + Survey variable. Variable ids are stable references used by logic and + calculation actions. + + Variable names are human-readable labels and must be unique within the survey. diff --git a/docs/api-v3-reference/src/components/schemas/SurveyWelcomeCard.yml b/docs/api-v3-reference/src/components/schemas/SurveyWelcomeCard.yml new file mode 100644 index 000000000000..237a1f3bd3af --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/SurveyWelcomeCard.yml @@ -0,0 +1,22 @@ +type: object +description: Optional card shown before the first survey block. +required: + - enabled +properties: + enabled: + type: boolean + headline: + $ref: ./TranslatableText.yml + subheader: + $ref: ./TranslatableText.yml + buttonLabel: + $ref: ./TranslatableText.yml + fileUrl: + type: string + videoUrl: + type: string + timeToFinish: + type: boolean + showResponseCount: + type: boolean +additionalProperties: false diff --git a/docs/api-v3-reference/src/components/schemas/TranslatableText.yml b/docs/api-v3-reference/src/components/schemas/TranslatableText.yml new file mode 100644 index 000000000000..c0437b0451cb --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/TranslatableText.yml @@ -0,0 +1,13 @@ +allOf: + - $ref: ./TranslatableTextMap.yml +description: > + Survey authoring text. `GET /api/v3/surveys/{surveyId}` always returns maps + keyed by the emitted + + `languages[].code` values for this survey. Use `?lang=` to filter which + language keys are included. + + The internal storage key `default` is never exposed by v3. +examples: + - en-US: What should we improve? + de-DE: Was sollten wir verbessern? diff --git a/docs/api-v3-reference/src/components/schemas/TranslatableTextMap.yml b/docs/api-v3-reference/src/components/schemas/TranslatableTextMap.yml new file mode 100644 index 000000000000..30d6dee00585 --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/TranslatableTextMap.yml @@ -0,0 +1,9 @@ +type: object +description: >- + Multilingual text map keyed by the emitted `languages[].code` values for this + survey. +propertyNames: + type: string + description: Survey language code/tag, for example `en-US`, `de-DE`, or `zh-Hans-CN`. +additionalProperties: + type: string diff --git a/docs/api-v3-reference/src/components/schemas/ValidateSurveyCreateRequest.yml b/docs/api-v3-reference/src/components/schemas/ValidateSurveyCreateRequest.yml new file mode 100644 index 000000000000..81a59c1b3439 --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/ValidateSurveyCreateRequest.yml @@ -0,0 +1,18 @@ +type: object +required: + - operation + - data +properties: + operation: + type: string + enum: + - create + data: + description: >- + Intended create payload. Invalid documents are allowed so the endpoint can + return repairable validation errors. + anyOf: + - $ref: ./CreateSurveyRequest.yml + - type: object + additionalProperties: true +additionalProperties: false diff --git a/docs/api-v3-reference/src/components/schemas/ValidateSurveyPatchRequest.yml b/docs/api-v3-reference/src/components/schemas/ValidateSurveyPatchRequest.yml new file mode 100644 index 000000000000..7dea338471f4 --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/ValidateSurveyPatchRequest.yml @@ -0,0 +1,22 @@ +type: object +required: + - operation + - surveyId + - data +properties: + operation: + type: string + enum: + - patch + surveyId: + type: string + format: cuid2 + data: + description: >- + Intended patch payload. Invalid documents are allowed so the endpoint can + return repairable validation errors. + anyOf: + - $ref: ./PatchSurveyRequest.yml + - type: object + additionalProperties: true +additionalProperties: false diff --git a/docs/api-v3-reference/src/components/schemas/ValidateSurveyRequest.yml b/docs/api-v3-reference/src/components/schemas/ValidateSurveyRequest.yml new file mode 100644 index 000000000000..f4016d8217d6 --- /dev/null +++ b/docs/api-v3-reference/src/components/schemas/ValidateSurveyRequest.yml @@ -0,0 +1,8 @@ +oneOf: + - $ref: ./ValidateSurveyCreateRequest.yml + - $ref: ./ValidateSurveyPatchRequest.yml +discriminator: + propertyName: operation + mapping: + create: ./ValidateSurveyCreateRequest.yml + patch: ./ValidateSurveyPatchRequest.yml diff --git a/docs/api-v3-reference/src/openapi.yml b/docs/api-v3-reference/src/openapi.yml new file mode 100644 index 000000000000..10cb96d32f02 --- /dev/null +++ b/docs/api-v3-reference/src/openapi.yml @@ -0,0 +1,143 @@ +# V3 API source of truth — multi-file spec (hand-maintained; not generated by generate-api-specs). +# Edit files under docs/api-v3-reference/src/, then run `pnpm api:v3:bundle` to regenerate ../openapi.yml +# (the self-contained artifact Mintlify and other single-file consumers read). CI gate: `pnpm api:v3:check`. +# Survey implementation: apps/web/app/api/v3/surveys/. +openapi: 3.1.1 +info: + title: Formbricks API v3 + description: > + **Surveys**: **GET /api/v3/surveys**, **POST /api/v3/surveys**, **POST + /api/v3/surveys/generate**, **POST /api/v3/surveys/validate**, **GET + /api/v3/surveys/{surveyId}**, **PATCH /api/v3/surveys/{surveyId}**, and + **DELETE /api/v3/surveys/{surveyId}**. + + + Authenticate all management endpoints with **session cookie** or + **`x-api-key`** (management key with access to the workspace). + + + **Spec location:** source of truth is the multi-file tree at + `docs/api-v3-reference/src/` (root `openapi.yml` plus one file per path and + component); `docs/api-v3-reference/openapi.yml` is the generated + single-file bundle (alongside v2 at `docs/api-v2-reference/openapi.yml`). + + + **workspaceId** + + Query param `workspaceId` is the canonical container identifier for this + API. + + + **Auth** + + Authenticate with either a session cookie or **`x-api-key`**. In dual-auth + mode, V3 checks the API key first when the header is present, otherwise it + uses the session path. Unauthenticated callers get **401** before query + validation. + + + **Pagination** + + Cursor-based pagination with **limit** + opaque **cursor** token. Responses + return `meta.nextCursor`; pass that value back as `cursor` to fetch the next + page. Survey list responses also include `meta.totalCount`, the total number + of surveys matching the current filters across all pages. There is no + `offset` in this contract. + + + **Filtering** + + Filters use explicit operator-style query parameters under the + **`filter[...]` family**. The survey list supports `filter[name][contains]`, + `filter[status][in]`, and `filter[type][in]`. Resource-scoping identifiers + (`workspaceId`, `responseId`) stay plain query parameters. Multi-value + filters use repeated keys or comma-separated values (e.g. + `filter[status][in]=draft&filter[status][in]=inProgress` or + `filter[status][in]=draft,inProgress`). Sorting remains a flat `sortBy` + query parameter. + + + **Security** + + Missing/forbidden workspace returns **403** with a generic message (not + **404**) so resource existence is not leaked. List responses use `private, + no-store`. + + + **AI survey creation** + + `POST /api/v3/surveys/generate` returns a draft `POST /api/v3/surveys` + payload plus validation metadata. It does not create a survey. Generated + payloads are currently link-survey only because the v3 create contract + accepts only `type: link`. + + Prompt text is sent to the configured AI provider for generation, but it is + not stored by this endpoint, not logged by default, and not included in + audit data. + + + **OpenAPI** + + This spec is **not** produced by `pnpm generate-api-specs` (that script only + builds v2 → `docs/api-v2-reference/openapi.yml`). When the route contract + changes, edit the files under `docs/api-v3-reference/src/`, then run + `pnpm api:v3:bundle` to regenerate the committed single-file bundle. + `pnpm api:v3:lint` lints the source tree; `pnpm api:v3:check` (CI) fails + when the bundle is stale. + + + **Overview migration note** + + The v3-backed survey overview page intentionally removes actions that are + not yet exposed by this contract: `Created by` filtering, `Duplicate`, + `Copy...`, `Preview`, and `Copy link`. + + + **Next steps (out of scope for this spec)** + + Additional v3 survey update endpoints, optional ETag/304, field selection, + translation-specific writes, and survey version history. + version: 0.1.0 + x-implementation-notes: + route: apps/web/app/api/v3/surveys/route.ts + generate-route: apps/web/app/api/v3/surveys/generate/route.ts + query-parser: apps/web/app/api/v3/surveys/parse-v3-surveys-list-query.ts + auth: apps/web/app/api/v3/lib/auth.ts + workspace-resolution: apps/web/app/api/v3/lib/workspace-context.ts + openapi-generated: false + spec-source: docs/api-v3-reference/src (regenerate bundle with `pnpm api:v3:bundle`) + pagination-model: cursor + cursor-pagination: supported +servers: + - url: https://app.formbricks.com + description: >- + Formbricks Cloud. Paths in this spec already include the `/api/v3` prefix; + self-hosted instances substitute their own origin. +paths: + /api/v3/surveys: + $ref: paths/api_v3_surveys.yml + /api/v3/surveys/generate: + $ref: paths/api_v3_surveys_generate.yml + /api/v3/surveys/validate: + $ref: paths/api_v3_surveys_validate.yml + /api/v3/surveys/{surveyId}: + $ref: paths/api_v3_surveys_{surveyId}.yml +components: + securitySchemes: + sessionAuth: + type: apiKey + in: cookie + name: next-auth.session-token + description: > + NextAuth session JWT cookie. **Development:** often + `next-auth.session-token`. + + **Production (HTTPS):** often `__Secure-next-auth.session-token`. Send + the cookie your browser receives after sign-in. + apiKeyAuth: + type: apiKey + in: header + name: x-api-key + description: > + Management API key; must include **workspaceId** as an allowed workspace + with read, write, or manage permission. diff --git a/docs/api-v3-reference/src/paths/api_v3_surveys.yml b/docs/api-v3-reference/src/paths/api_v3_surveys.yml new file mode 100644 index 000000000000..fccbfdabdc7a --- /dev/null +++ b/docs/api-v3-reference/src/paths/api_v3_surveys.yml @@ -0,0 +1,412 @@ +get: + operationId: getSurveysV3 + summary: List surveys + description: | + Returns surveys for the workspace. Session cookie or x-api-key. + tags: + - V3 Surveys + parameters: + - in: query + name: workspaceId + required: true + schema: + type: string + format: cuid2 + description: | + Workspace identifier. This is the canonical container ID for v3 APIs. + - in: query + name: limit + schema: + type: integer + minimum: 1 + maximum: 100 + default: 20 + description: Page size (max 100) + - in: query + name: cursor + schema: + type: string + description: > + Opaque cursor returned as `meta.nextCursor` from the previous page. Omit + on the first request. + - in: query + name: includeTotalCount + schema: + type: boolean + default: true + description: > + Whether to calculate `meta.totalCount` for this request. Set to `false` + on cursor-pagination follow-up requests to skip the extra count query; + in that case `meta.totalCount` is `null`. + - in: query + name: filter[name][contains] + schema: + type: string + maxLength: 512 + description: >- + Case-insensitive substring match on survey name (same as in-app list + filters). + - in: query + name: filter[status][in] + schema: + type: array + items: + type: string + enum: + - draft + - inProgress + - paused + - completed + style: form + explode: true + description: > + Survey status filter. Repeat the parameter + (`filter[status][in]=draft&filter[status][in]=inProgress`) or use + comma-separated values (`filter[status][in]=draft,inProgress`). Invalid + values → **400**. + - in: query + name: filter[type][in] + schema: + type: array + items: + type: string + enum: + - link + - app + style: form + explode: true + description: >- + Survey type filter (`link` / `app`). Same repeat-or-comma rules as + `filter[status][in]`. + - in: query + name: sortBy + schema: + type: string + enum: + - createdAt + - updatedAt + - name + - relevance + description: >- + Sort order. Defaults to `updatedAt`. The `cursor` token is bound to the + selected sort order. + responses: + '200': + description: Surveys retrieved successfully + headers: + X-Request-Id: + schema: + type: string + description: Request correlation ID + Cache-Control: + schema: + type: string + example: private, no-store + content: + application/json: + schema: + type: object + required: + - data + - meta + properties: + data: + type: array + items: + $ref: ../components/schemas/SurveyListItem.yml + meta: + type: object + required: + - limit + - nextCursor + - totalCount + properties: + limit: + type: integer + nextCursor: + type: + - string + - 'null' + description: >- + Opaque cursor for the next page. `null` when there are no + more results. + totalCount: + type: + - integer + - 'null' + minimum: 0 + description: >- + Total number of surveys matching the current filters + across all pages. `null` when `includeTotalCount=false`. + '400': + description: Bad Request + content: + application/problem+json: + schema: + $ref: ../components/schemas/Problem.yml + '401': + description: Not authenticated (no valid session or API key) + content: + application/problem+json: + schema: + $ref: ../components/schemas/Problem.yml + '403': + description: >- + Forbidden — no access, or workspace does not exist (404 not used; avoids + existence leak) + content: + application/problem+json: + schema: + $ref: ../components/schemas/Problem.yml + '429': + description: Rate limit exceeded + headers: + Retry-After: + schema: + type: integer + description: Seconds until the current rate-limit window resets + content: + application/problem+json: + schema: + $ref: ../components/schemas/Problem.yml + '500': + description: Internal Server Error + content: + application/problem+json: + schema: + $ref: ../components/schemas/Problem.yml + security: + - sessionAuth: [] + - apiKeyAuth: [] +post: + operationId: createSurveyV3 + summary: Create a survey + description: > + Creates a block-based survey template from one strict survey document. The + endpoint accepts + + multilingual authoring maps keyed by real locale codes and converts them to + Formbricks' + + internal default-language representation. Non-default locale keys in + translated content + + must be declared in `languages`; undeclared locale keys return + `unsupported_locale` in + + `invalid_params` instead of silently mutating workspace languages. + + + `blocks[].id` and `variables[].id` are stable public identifiers. They may + be omitted on + + create, in which case the server generates cuid2 ids. If the same create + request needs to + + reference a block or variable from logic, provide explicit valid ids and use + those references + + consistently. + + + For normal sequential surveys, omit `logic` and `logicFallback`. + `logicFallback` is only valid + + when the same block has at least one `logic` rule; otherwise the API returns + + `invalid_reference`. + + + This first write surface intentionally stays structure-focused: `type` may + be omitted or set + + to `link` or `app`, but in-app survey creation and distribution-channel + settings are not part + + of this operation. Unsupported fields are rejected instead of ignored. + tags: + - V3 Surveys + requestBody: + required: true + content: + application/json: + schema: + $ref: ../components/schemas/CreateSurveyRequest.yml + examples: + productFeedback: + summary: Create a multilingual block-based survey + value: + workspaceId: clxx1234567890123456789012 + name: Product Feedback Survey + status: draft + defaultLanguage: en-US + metadata: + cx_operation: enterprise_onboarding + title: + en-US: Product Feedback + de-DE: Produktfeedback + languages: + - code: de-DE + enabled: true + welcomeCard: + enabled: true + headline: + en-US: Welcome + de-DE: Willkommen + blocks: + - name: Main Block + elements: + - id: satisfaction + type: openText + headline: + en-US: What should we improve? + de-DE: Was sollen wir verbessern? + required: true + endings: [] + hiddenFields: + enabled: false + variables: [] + sequentialProductSurvey: + summary: Create a richer sequential survey without logicFallback + description: > + Multi-block survey with generated block and variable ids. + Sequential surveys should + + omit `logic` and `logicFallback`; blocks are shown in array order. + value: + workspaceId: clxx1234567890123456789012 + name: Sequential Product Survey + defaultLanguage: en-US + languages: + - code: de-DE + enabled: true + metadata: + cx_operation: product_feedback + title: + en-US: Sequential Product Survey + de-DE: Sequenzielle Produktumfrage + welcomeCard: + enabled: true + headline: + en-US: Help us improve the product + de-DE: Hilf uns, das Produkt zu verbessern + hiddenFields: + enabled: true + fieldIds: + - account_id + - plan + variables: + - name: feedback_score + type: number + value: 0 + blocks: + - name: Satisfaction + elements: + - id: overall_rating + type: rating + headline: + en-US: How satisfied are you with the product? + de-DE: Wie zufrieden bist du mit dem Produkt? + required: true + range: 5 + scale: smiley + - id: product_area + type: multipleChoiceSingle + headline: + en-US: Which area should we improve first? + de-DE: Welchen Bereich sollten wir zuerst verbessern? + required: true + choices: + - id: onboarding + label: + en-US: Onboarding + de-DE: Onboarding + - id: analytics + label: + en-US: Analytics + de-DE: Analysen + - name: Feedback + elements: + - id: free_text_feedback + type: openText + headline: + en-US: What is one thing we should change? + de-DE: Was sollten wir ändern? + required: false + longAnswer: true + endings: + - id: cmpsequentialend0000000000 + type: endScreen + headline: + en-US: Thanks for your feedback! + de-DE: Danke für dein Feedback! + responses: + '201': + description: Survey created successfully + headers: + Location: + schema: + type: string + description: Relative URL of the created survey resource. + example: /api/v3/surveys/clsv1234567890123456789012 + X-Request-Id: + schema: + type: string + description: Request correlation ID + Cache-Control: + schema: + type: string + example: private, no-store + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: ../components/schemas/SurveyResource.yml + '400': + description: > + Bad Request — invalid JSON, unsupported fields, malformed multilingual + maps, duplicate + + stable ids, or dangling logic/reference ids. + content: + application/problem+json: + schema: + $ref: ../components/schemas/Problem.yml + '401': + description: Not authenticated (no valid session or API key) + content: + application/problem+json: + schema: + $ref: ../components/schemas/Problem.yml + '403': + description: >- + Forbidden — no write access, missing external URL permission, or + workspace does not exist (404 not used; avoids existence leak) + content: + application/problem+json: + schema: + $ref: ../components/schemas/Problem.yml + '429': + description: Rate limit exceeded + headers: + Retry-After: + schema: + type: integer + description: Seconds until the current rate-limit window resets + content: + application/problem+json: + schema: + $ref: ../components/schemas/Problem.yml + '500': + description: Internal Server Error + content: + application/problem+json: + schema: + $ref: ../components/schemas/Problem.yml + security: + - sessionAuth: [] + - apiKeyAuth: [] diff --git a/docs/api-v3-reference/src/paths/api_v3_surveys_generate.yml b/docs/api-v3-reference/src/paths/api_v3_surveys_generate.yml new file mode 100644 index 000000000000..bb6ee3a8b4d1 --- /dev/null +++ b/docs/api-v3-reference/src/paths/api_v3_surveys_generate.yml @@ -0,0 +1,247 @@ +post: + operationId: generateSurveyV3 + summary: Create a survey draft payload with AI + description: > + Creates a strict v3 `POST /api/v3/surveys` create payload from a creator + prompt and returns + + validation metadata. This endpoint is single-purpose: it does **not** + persist the survey. + + Clients should validate the returned payload with `/api/v3/surveys/validate` + or use the + + embedded validation metadata, then create the draft through `POST + /api/v3/surveys`. + + + The generated payload always sets `status: draft`. The initial contract + supports only + + `type: link`; app and website survey creation must stay disabled until the + v3 create + + endpoint accepts those types. + + + Prompt privacy: prompt text is sent to the configured AI provider to create + the payload, but + + this endpoint does not store prompts and server logs should use request ids + and failure + + categories instead of raw prompt content. + tags: + - V3 Surveys + requestBody: + required: true + content: + application/json: + schema: + $ref: ../components/schemas/GenerateSurveyRequest.yml + examples: + onboarding: + summary: Create a link survey draft + value: + workspaceId: clxx1234567890123456789012 + type: link + language: en-US + prompt: >- + Understand why new users stop during onboarding and what would + help them finish setup. + responses: + '200': + description: >- + Survey create payload generated successfully. The survey has not been + created yet. + headers: + X-Request-Id: + schema: + type: string + description: Request correlation ID + Cache-Control: + schema: + type: string + example: private, no-store + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: ../components/schemas/GenerateSurveyResult.yml + examples: + generated: + summary: Generated draft create payload + value: + data: + language: en-US + payload: + workspaceId: clxx1234567890123456789012 + type: link + name: Onboarding Completion Survey + status: draft + defaultLanguage: en-US + languages: + - code: en-US + default: true + enabled: true + metadata: + title: + en-US: Onboarding Completion Survey + welcomeCard: + enabled: false + blocks: + - id: clbk1234567890123456789012 + name: Main + elements: + - id: q_1_example + type: openText + headline: + en-US: What made onboarding hard to complete? + required: false + isDraft: true + inputType: text + longAnswer: false + charLimit: + enabled: false + endings: + - id: clen1234567890123456789012 + type: endScreen + headline: + en-US: Thanks for your feedback + hiddenFields: + enabled: false + variables: [] + validation: + valid: true + invalid_params: [] + languages: + - code: en-US + default: true + enabled: true + '400': + description: Malformed body or a prompt that is too short or underspecified + content: + application/problem+json: + schema: + $ref: ../components/schemas/Problem.yml + examples: + shortPrompt: + summary: Prompt needs more detail + value: + title: Bad Request + status: 400 + detail: Prompt needs more detail + code: bad_request + requestId: req_123 + invalid_params: + - name: prompt + reason: >- + Describe the survey goal, audience, or topic in a sentence + so the AI can create a useful draft. + '401': + description: Not authenticated (no valid session or API key) + content: + application/problem+json: + schema: + $ref: ../components/schemas/Problem.yml + '403': + description: >- + Forbidden — no write access, workspace does not exist, AI is not in + plan, or AI smart tools are disabled + content: + application/problem+json: + schema: + $ref: ../components/schemas/Problem.yml + examples: + noWorkspaceWriteAccess: + summary: No workspace write access + value: + title: Forbidden + status: 403 + detail: You are not authorized to access this resource + code: forbidden + requestId: req_123 + aiDisabled: + summary: AI smart tools disabled + value: + title: AI Unavailable + status: 403 + detail: AI smart tools are disabled for this organization. + code: ai_smart_tools_disabled + requestId: req_123 + '422': + description: AI generated an invalid payload after schema and v3 create validation + content: + application/problem+json: + schema: + $ref: ../components/schemas/Problem.yml + examples: + invalidGeneratedPayload: + summary: Invalid generated payload + value: + title: Unprocessable Content + status: 422 + detail: >- + Generated survey payload is invalid: generatedSurvey.blocks: + Too small + code: ai_generated_payload_invalid + requestId: req_123 + invalid_params: + - name: generatedSurvey.blocks + reason: Too small + '429': + description: Rate limit exceeded + headers: + Retry-After: + schema: + type: integer + description: Seconds until the current rate-limit window resets + content: + application/problem+json: + schema: + $ref: ../components/schemas/Problem.yml + '500': + description: Internal Server Error + content: + application/problem+json: + schema: + $ref: ../components/schemas/Problem.yml + '502': + description: The configured AI provider failed or could not produce a valid draft + content: + application/problem+json: + schema: + $ref: ../components/schemas/Problem.yml + examples: + providerFailed: + summary: AI provider failed + value: + title: Bad Gateway + status: 502 + detail: >- + The AI provider could not generate a valid survey draft. Try + again or add more detail. + code: bad_gateway + requestId: req_123 + '503': + description: AI is not configured on this Formbricks instance + content: + application/problem+json: + schema: + $ref: ../components/schemas/Problem.yml + examples: + instanceNotConfigured: + summary: AI instance configuration missing + value: + title: AI Unavailable + status: 503 + detail: AI is not configured for this Formbricks instance. + code: ai_instance_not_configured + requestId: req_123 + security: + - sessionAuth: [] + - apiKeyAuth: [] diff --git a/docs/api-v3-reference/src/paths/api_v3_surveys_validate.yml b/docs/api-v3-reference/src/paths/api_v3_surveys_validate.yml new file mode 100644 index 000000000000..b29caa47c2de --- /dev/null +++ b/docs/api-v3-reference/src/paths/api_v3_surveys_validate.yml @@ -0,0 +1,144 @@ +post: + operationId: validateSurveyV3 + summary: Validate a survey document + description: > + Validates a future create or patch survey payload without writing data, + creating languages, + + or creating survey versions. Invalid survey documents return `200` with + `data.valid=false` + + so agents and MCP clients can repair payloads from structured + `invalid_params`. + + + Use `400` only for malformed validation envelopes, unsupported operations, + invalid `surveyId`, + + or unsupported query parameters. + tags: + - V3 Surveys + requestBody: + required: true + content: + application/json: + schema: + $ref: ../components/schemas/ValidateSurveyRequest.yml + examples: + createValidation: + summary: Validate a create payload + value: + operation: create + data: + workspaceId: clxx1234567890123456789012 + name: Product Feedback Survey + defaultLanguage: en-US + blocks: + - id: clbk1234567890123456789012 + name: Main Block + elements: + - id: satisfaction + type: openText + headline: + en-US: What should we improve? + required: true + patchValidation: + summary: Validate a patch payload + value: + operation: patch + surveyId: clsv1234567890123456789012 + data: + blocks: + - id: clbk1234567890123456789012 + name: Main Block + elements: + - id: satisfaction + type: openText + headline: + en-US: What should we improve? + required: true + responses: + '200': + description: Validation completed. The survey document may still be invalid. + headers: + X-Request-Id: + schema: + type: string + description: Request correlation ID + Cache-Control: + schema: + type: string + example: private, no-store + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: ../components/schemas/SurveyValidationResult.yml + examples: + invalid: + summary: Invalid survey document + value: + data: + valid: false + operation: create + invalid_params: + - name: blocks.0.elements.0.buttonUrl + reason: >- + Unsupported field 'buttonUrl' for element type + 'openText'. Allowed fields... + valid: + summary: Valid survey document + value: + data: + valid: true + operation: create + invalid_params: [] + languages: + - code: en-US + default: true + enabled: true + writeBehavior: connect_or_create + '400': + description: >- + Malformed validation envelope, invalid route/query data, or unsupported + operation + content: + application/problem+json: + schema: + $ref: ../components/schemas/Problem.yml + '401': + description: Not authenticated (no valid session or API key) + content: + application/problem+json: + schema: + $ref: ../components/schemas/Problem.yml + '403': + description: Forbidden — no write access, or survey/workspace does not exist + content: + application/problem+json: + schema: + $ref: ../components/schemas/Problem.yml + '429': + description: Rate limit exceeded + headers: + Retry-After: + schema: + type: integer + description: Seconds until the current rate-limit window resets + content: + application/problem+json: + schema: + $ref: ../components/schemas/Problem.yml + '500': + description: Internal Server Error + content: + application/problem+json: + schema: + $ref: ../components/schemas/Problem.yml + security: + - sessionAuth: [] + - apiKeyAuth: [] diff --git a/docs/api-v3-reference/src/paths/api_v3_surveys_{surveyId}.yml b/docs/api-v3-reference/src/paths/api_v3_surveys_{surveyId}.yml new file mode 100644 index 000000000000..6877b8d82e0e --- /dev/null +++ b/docs/api-v3-reference/src/paths/api_v3_surveys_{surveyId}.yml @@ -0,0 +1,426 @@ +get: + operationId: getSurveyV3 + summary: Retrieve a survey + description: > + Returns the public v3 survey management resource for one survey. By default, + translatable + + fields are returned as stable multilingual maps keyed by the language codes + emitted in + + `languages[].code`. Use `lang` to filter those maps to one or more requested + language selectors. + tags: + - V3 Surveys + parameters: + - in: path + name: surveyId + required: true + schema: + type: string + format: cuid2 + description: Survey identifier. + - in: query + name: lang + required: false + style: form + explode: false + schema: + type: array + items: + type: string + examples: + - - de-DE + - - de-DE + - pt-PT + - - de + - - zh-Hans + - - zh-Hans-CN + description: > + Comma-separated language selector filter for translatable fields, for + example `?lang=de-DE,pt-PT`. + + The response shape stays stable: translatable fields are always maps, + never strings, and response + + keys match the emitted `languages[].code` values for this survey. + + For compatibility with existing Formbricks surveys, GET accepts language + tags such as `de`, + + `de-DE`, `zh-Hans`, and `zh-Hans-CN`, accepts `_` or `-` separators, is + case-insensitive, and + + accepts configured workspace aliases such as `english`. Bare language + selectors are resolved + + against the survey's configured languages and return `400` if ambiguous, + for example if both + + `en-US` and `en-GB` are configured. + + Disabled-but-configured languages are readable in the management API so + unfinished translations can + + be completed. + responses: + '200': + description: Survey retrieved successfully + headers: + X-Request-Id: + schema: + type: string + description: Request correlation ID + Cache-Control: + schema: + type: string + example: private, no-store + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: ../components/schemas/SurveyResource.yml + examples: + multilingual: + summary: Multilingual authoring resource + value: + data: + id: clseedsurveycsat000000 + workspaceId: clseedworkspace000000000 + createdAt: '2026-05-18T09:24:54.014Z' + updatedAt: '2026-05-18T09:24:54.014Z' + name: CSAT Survey + type: link + status: inProgress + metadata: {} + defaultLanguage: en-US + languages: + - code: en-US + default: true + enabled: true + - code: de-DE + alias: german + default: false + enabled: false + welcomeCard: + enabled: false + blocks: + - id: e0tfwzqk63op37y14z95qq3k + name: Main Block + elements: + - id: nzte4cm8836hgjw63pesziht + type: rating + range: 5 + scale: smiley + headline: + en-US: How satisfied are you with our product? + de-DE: Wie zufrieden sind Sie mit unserem Produkt? + required: true + endings: [] + hiddenFields: + enabled: false + variables: [] + filtered: + summary: Language-filtered projection with ?lang=de-DE + value: + data: + id: clseedsurveycsat000000 + workspaceId: clseedworkspace000000000 + createdAt: '2026-05-18T09:24:54.014Z' + updatedAt: '2026-05-18T09:24:54.014Z' + name: CSAT Survey + type: link + status: inProgress + metadata: {} + defaultLanguage: en-US + languages: + - code: en-US + default: true + enabled: true + - code: de-DE + alias: german + default: false + enabled: false + welcomeCard: + enabled: false + blocks: + - id: e0tfwzqk63op37y14z95qq3k + name: Main Block + elements: + - id: nzte4cm8836hgjw63pesziht + type: rating + range: 5 + scale: smiley + headline: + de-DE: Wie zufrieden sind Sie mit unserem Produkt? + required: true + endings: [] + hiddenFields: + enabled: false + variables: [] + '400': + description: >- + Invalid survey id, unsupported query parameter, unknown language, or + unsupported legacy survey shape + content: + application/problem+json: + schema: + $ref: ../components/schemas/Problem.yml + '401': + description: Not authenticated (no valid session or API key) + content: + application/problem+json: + schema: + $ref: ../components/schemas/Problem.yml + '403': + description: >- + Forbidden — no access, or survey does not exist (404 not used; avoids + existence leak) + content: + application/problem+json: + schema: + $ref: ../components/schemas/Problem.yml + '429': + description: Rate limit exceeded + headers: + Retry-After: + schema: + type: integer + description: Seconds until the current rate-limit window resets + content: + application/problem+json: + schema: + $ref: ../components/schemas/Problem.yml + '500': + description: Internal Server Error + content: + application/problem+json: + schema: + $ref: ../components/schemas/Problem.yml + security: + - sessionAuth: [] + - apiKeyAuth: [] +patch: + operationId: patchSurveyV3 + summary: Update a survey + description: > + Updates a survey through a strict top-level partial document. Omitted + top-level fields are + + preserved. Provided top-level objects and arrays replace that whole subtree; + this endpoint + + does not deep-merge nested objects and does not implement JSON Patch. + + + This write endpoint accepts the canonical multilingual authoring document + only. Translatable + + fields must be locale-code maps, not strings. `PATCH ?lang=...` and + `?version=...` are not + + supported in Scope 1. + + + For MCP and AI-agent workflows, fetch the current survey first, modify only + the intended + + top-level fields, call `/api/v3/surveys/validate` with `operation: patch` + for preflight, then + + submit the same patch here. Missing ids in replaced arrays are treated as + deletions. Variable + + name renames are allowed but may be destructive for downstream exports or + integrations. + + Element id changes are rejected once the survey and element are no longer + drafts. + + + Optimistic concurrency (`ETag`, `If-Match`, or revision tokens) is future + work; until then, + + overlapping writes are last-write-wins. + tags: + - V3 Surveys + parameters: + - in: path + name: surveyId + required: true + schema: + type: string + format: cuid2 + description: Survey identifier. + requestBody: + required: true + content: + application/json: + schema: + $ref: ../components/schemas/PatchSurveyRequest.yml + examples: + renameSurvey: + summary: Rename a survey + value: + name: Updated Product Feedback + replaceMetadata: + summary: Replace metadata + value: + metadata: + title: + en-US: Product Feedback + de-DE: Produktfeedback + cx_operation: product_feedback + replaceBlocks: + summary: Replace survey blocks + value: + blocks: + - id: clbk1234567890123456789012 + name: Main Block + elements: + - id: satisfaction + type: rating + headline: + en-US: How satisfied are you? + de-DE: Wie zufrieden sind Sie? + required: true + range: 5 + scale: smiley + responses: + '200': + description: Survey updated successfully + headers: + X-Request-Id: + schema: + type: string + description: Request correlation ID + Cache-Control: + schema: + type: string + example: private, no-store + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: ../components/schemas/SurveyResource.yml + '400': + description: > + Bad Request — malformed JSON, unsupported query parameter, unsupported + field, + + invalid locale map, duplicate id, immutable element id change, dangling + reference, + + or invalid survey document. + content: + application/problem+json: + schema: + $ref: ../components/schemas/Problem.yml + '401': + description: Not authenticated (no valid session or API key) + content: + application/problem+json: + schema: + $ref: ../components/schemas/Problem.yml + '403': + description: >- + Forbidden — no write access, or survey does not exist (404 not used; + avoids existence leak) + content: + application/problem+json: + schema: + $ref: ../components/schemas/Problem.yml + '429': + description: Rate limit exceeded + headers: + Retry-After: + schema: + type: integer + description: Seconds until the current rate-limit window resets + content: + application/problem+json: + schema: + $ref: ../components/schemas/Problem.yml + '500': + description: Internal Server Error + content: + application/problem+json: + schema: + $ref: ../components/schemas/Problem.yml + security: + - sessionAuth: [] + - apiKeyAuth: [] +delete: + operationId: deleteSurveyV3 + summary: Delete a survey + description: Deletes a survey by id. Session cookie or x-api-key. + tags: + - V3 Surveys + parameters: + - in: path + name: surveyId + required: true + schema: + type: string + format: cuid2 + description: Survey identifier. + responses: + '204': + description: Survey deleted successfully + headers: + X-Request-Id: + schema: + type: string + description: Request correlation ID + Cache-Control: + schema: + type: string + example: private, no-store + '400': + description: Bad Request + content: + application/problem+json: + schema: + $ref: ../components/schemas/Problem.yml + '401': + description: Not authenticated (no valid session or API key) + content: + application/problem+json: + schema: + $ref: ../components/schemas/Problem.yml + '403': + description: >- + Forbidden — no access, or survey does not exist (404 not used; avoids + existence leak) + content: + application/problem+json: + schema: + $ref: ../components/schemas/Problem.yml + '429': + description: Rate limit exceeded + headers: + Retry-After: + schema: + type: integer + description: Seconds until the current rate-limit window resets + content: + application/problem+json: + schema: + $ref: ../components/schemas/Problem.yml + '500': + description: Internal Server Error + content: + application/problem+json: + schema: + $ref: ../components/schemas/Problem.yml + security: + - sessionAuth: [] + - apiKeyAuth: [] diff --git a/package.json b/package.json index d92d38d9a5fd..b8a619f56822 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,10 @@ "start": "turbo run start --parallel", "format": "prettier --write \"**/*.{ts,tsx,md}\"", "generate": "turbo run generate", - "lint": "turbo run lint", + "lint": "turbo run lint && pnpm api:v3:lint", + "api:v3:bundle": "node docs/api-v3-reference/scripts/bundle.mjs", + "api:v3:lint": "node docs/api-v3-reference/scripts/bundle.mjs --lint", + "api:v3:check": "node docs/api-v3-reference/scripts/bundle.mjs --check", "typecheck": "turbo run typecheck", "test": "turbo run test --no-cache", "test:coverage": "turbo run test:coverage --no-cache", @@ -47,6 +50,7 @@ "@azure/playwright": "1.1.5", "@formbricks/eslint-config": "workspace:*", "@playwright/test": "1.58.2", + "@redocly/cli": "1.34.3", "dotenv": "17.3.1", "eslint": "8.57.1", "husky": "9.1.7", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0f66d7c4e2ca..856c6d8a70a5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -52,6 +52,9 @@ importers: '@playwright/test': specifier: 1.58.2 version: 1.58.2 + '@redocly/cli': + specifier: 1.34.3 + version: 1.34.3(ajv@6.14.0)(encoding@0.1.13) dotenv: specifier: 17.3.1 version: 17.3.1 @@ -327,7 +330,7 @@ importers: version: 4.1.0 framer-motion: specifier: 12.35.2 - version: 12.35.2(react-dom@19.2.6(react@19.2.6))(react@19.2.6) + version: 12.35.2(@emotion/is-prop-valid@1.4.0)(react-dom@19.2.6(react@19.2.6))(react@19.2.6) googleapis: specifier: 171.4.0 version: 171.4.0 @@ -1940,6 +1943,12 @@ packages: '@emnapi/wasi-threads@1.2.1': resolution: {integrity: sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w==} + '@emotion/is-prop-valid@1.4.0': + resolution: {integrity: sha512-QgD4fyscGcbbKwJmqNvUMSE02OsHUa+lAWKdEUIJKgqe5IwRSKd7+KhibEWdaKwgjLj0DRSHA9biAIqGBk05lw==} + + '@emotion/memoize@0.9.0': + resolution: {integrity: sha512-30FAj7/EoJ5mwVPOWhAyCX+FPfMDrVecJAM+Iw9NRoSl4BBAQeqj4cApHHUXOVvIPgLVDsCFoz/hGD+5QQD1GQ==} + '@epic-web/invariant@1.0.0': resolution: {integrity: sha512-lrTPqgvfFQtR/eY/qkIzp98OGdNJu0m5ji3q/nJI8v3SXkRKEnWiOxMmbvcSoAIzv/cGiuvRy57k4suKQSAdwA==} @@ -2126,6 +2135,13 @@ packages: '@noble/hashes': optional: true + '@exodus/schemasafe@1.3.0': + resolution: {integrity: sha512-5Aap/GaRupgNx/feGBwLLTVv8OQFfv3pq2lPRzPg9R+IOBnDgghTGW7l7EuVXOvg5cc/xSAlRW8rBrjIC3Nvqw==} + + '@faker-js/faker@7.6.0': + resolution: {integrity: sha512-XK6BTq1NDMo9Xqw/YkYyGjSsg44fbNwYRx7QK2CuoQgyy+f1rrTDHoExVM5PsyXCtfl2vs2vVJ0MN0yN6LppRw==} + engines: {node: '>=14.0.0', npm: '>=6.0.0'} + '@fastify/otel@0.16.0': resolution: {integrity: sha512-2304BdM5Q/kUvQC9qJO1KZq3Zn1WWsw+WWkVmFEaj1UE2hEIiuFqrPeglQOwEtw/ftngisqfQ3v70TWMmwhhHA==} peerDependencies: @@ -2209,6 +2225,10 @@ packages: resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} engines: {node: '>=12.22'} + '@humanwhocodes/momoa@2.0.4': + resolution: {integrity: sha512-RE815I4arJFtt+FVeU1Tgp9/Xvecacji8w/V6XtXsWWH/wz/eNkNbhb+ny/+PlVZjV0rxQpRSQKNKE3lcktHEA==} + engines: {node: '>=10.10.0'} + '@humanwhocodes/object-schema@2.0.3': resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} deprecated: Use @eslint/object-schema instead @@ -2373,6 +2393,10 @@ packages: resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} engines: {node: '>=12'} + '@jest/schemas@29.6.3': + resolution: {integrity: sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + '@joshwooding/vite-plugin-react-docgen-typescript@0.7.0': resolution: {integrity: sha512-qvsTEwEFefhdirGOPnu9Wp6ChfIwy2dBCRuETU3uE+4cC+PFoxMSiiEhxk4lOluA34eARHA0OxqsEUYDqRMgeQ==} peerDependencies: @@ -2410,6 +2434,18 @@ packages: '@js-sdsl/ordered-map@4.4.2': resolution: {integrity: sha512-iUKgm52T8HOE/makSxjqoWhe95ZJA1/G1sYsGev2JDKUSS14KAgg1LHb+Ba+IPow0xflbnSkOsZcO08C7w1gYw==} + '@jsep-plugin/assignment@1.3.0': + resolution: {integrity: sha512-VVgV+CXrhbMI3aSusQyclHkenWSAm95WaiKrMxRFam3JSUiIaQjoMIw2sEs/OX4XifnqeQUN4DYbJjlA8EfktQ==} + engines: {node: '>= 10.16.0'} + peerDependencies: + jsep: ^0.4.0||^1.0.0 + + '@jsep-plugin/regex@1.0.4': + resolution: {integrity: sha512-q7qL4Mgjs1vByCaTnDFcBnV9HS7GVPJX5vyVoCgZHNSC9rjwIlmbXG5sUuorR5ndfHAIlJ8pVStxvjXHbNvtUg==} + engines: {node: '>= 10.16.0'} + peerDependencies: + jsep: ^0.4.0||^1.0.0 + '@json2csv/formatters@7.0.6': resolution: {integrity: sha512-hjIk1H1TR4ydU5ntIENEPgoMGW+Q7mJ+537sDFDbsk+Y3EPl2i4NfFVjw0NJRgT+ihm8X30M67mA8AS6jPidSA==} @@ -2698,6 +2734,10 @@ packages: resolution: {integrity: sha512-Cdq0jW2lknrNfrAm92MyEAvpe2cRsKjdnQLHUL6xRA4IVUnsWx6P65E7NcUO0Y+L4w1Aee5iV8FvjSwd+lrs9A==} engines: {node: '>=8.0.0'} + '@opentelemetry/api-logs@0.53.0': + resolution: {integrity: sha512-8HArjKx+RaAI8uEIgcORbZIPklyh1YLjPSBus8hjRmvLi6DeFzgOcdZ7KwPabKj8mXF8dX0hyfAyGfycz0DbFw==} + engines: {node: '>=14'} + '@opentelemetry/api@1.9.0': resolution: {integrity: sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg==} engines: {node: '>=8.0.0'} @@ -2715,6 +2755,12 @@ packages: peerDependencies: '@opentelemetry/api': ^1.9.0 + '@opentelemetry/context-async-hooks@1.26.0': + resolution: {integrity: sha512-HedpXXYzzbaoutw6DFLWLDket2FwLkLpil4hGCZ1xYEIMTcivdfwEOISgdbLEWyG3HW52gTq2V9mOVJrONgiwg==} + engines: {node: '>=14'} + peerDependencies: + '@opentelemetry/api': '>=1.0.0 <1.10.0' + '@opentelemetry/context-async-hooks@2.6.0': resolution: {integrity: sha512-L8UyDwqpTcbkIK5cgwDRDYDoEhQoj8wp8BwsO19w3LB1Z41yEQm2VJyNfAi9DrLP/YTqXqWpKHyZfR9/tFYo1Q==} engines: {node: ^18.19.0 || >=20.6.0} @@ -2823,6 +2869,12 @@ packages: peerDependencies: '@opentelemetry/api': ^1.3.0 + '@opentelemetry/exporter-trace-otlp-http@0.53.0': + resolution: {integrity: sha512-m7F5ZTq+V9mKGWYpX8EnZ7NjoqAU7VemQ1E2HAG+W/u0wpY1x0OmbxAXfGKFHCspdJk8UKlwPGrpcB8nay3P8A==} + engines: {node: '>=14'} + peerDependencies: + '@opentelemetry/api': ^1.0.0 + '@opentelemetry/exporter-trace-otlp-proto@0.217.0': resolution: {integrity: sha512-nPV8gKHUiSuTZpQcnZU3/pBlK7crSyEGpZuh5MtWySB0vv6NNG0QvvfKitQt+Fc2Mc6qfyU54KlZcurwoTbrVg==} engines: {node: ^18.19.0 || >=20.6.0} @@ -3249,6 +3301,12 @@ packages: peerDependencies: '@opentelemetry/api': ^1.3.0 + '@opentelemetry/otlp-exporter-base@0.53.0': + resolution: {integrity: sha512-UCWPreGQEhD6FjBaeDuXhiMf6kkBODF0ZQzrk/tuQcaVDJ+dDQ/xhJp192H9yWnKxVpEjFrSSLnpqmX4VwX+eA==} + engines: {node: '>=14'} + peerDependencies: + '@opentelemetry/api': ^1.0.0 + '@opentelemetry/otlp-grpc-exporter-base@0.212.0': resolution: {integrity: sha512-YidOSlzpsun9uw0iyIWrQp6HxpMtBlECE3tiHGAsnpEqJWbAUWcMnIffvIuvTtTQ1OyRtwwaE79dWSQ8+eiB7g==} engines: {node: ^18.19.0 || >=20.6.0} @@ -3279,12 +3337,30 @@ packages: peerDependencies: '@opentelemetry/api': ^1.3.0 + '@opentelemetry/otlp-transformer@0.53.0': + resolution: {integrity: sha512-rM0sDA9HD8dluwuBxLetUmoqGJKSAbWenwD65KY9iZhUxdBHRLrIdrABfNDP7aiTjcgK8XFyTn5fhDz7N+W6DA==} + engines: {node: '>=14'} + peerDependencies: + '@opentelemetry/api': ^1.3.0 + + '@opentelemetry/propagator-b3@1.26.0': + resolution: {integrity: sha512-vvVkQLQ/lGGyEy9GT8uFnI047pajSOVnZI2poJqVGD3nJ+B9sFGdlHNnQKophE3lHfnIH0pw2ubrCTjZCgIj+Q==} + engines: {node: '>=14'} + peerDependencies: + '@opentelemetry/api': '>=1.0.0 <1.10.0' + '@opentelemetry/propagator-b3@2.7.1': resolution: {integrity: sha512-RJid6E2CKyeGfKBzXKF21ejabGMHypFkPAh3qZ+NvI+SGjuIye79t3PmiqcDgtRzdKH6ynXzbfslQ8DfpRUg2A==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': '>=1.0.0 <1.10.0' + '@opentelemetry/propagator-jaeger@1.26.0': + resolution: {integrity: sha512-DelFGkCdaxA1C/QA0Xilszfr0t4YbGd3DjxiCDPh34lfnFr+VkkrjV9S8ZTJvAzfdKERXhfOxIKBoGPJwoSz7Q==} + engines: {node: '>=14'} + peerDependencies: + '@opentelemetry/api': '>=1.0.0 <1.10.0' + '@opentelemetry/propagator-jaeger@2.7.1': resolution: {integrity: sha512-KMjVBHzP4N60bOzxja76M1F1hZZ43lGPga5ix+mkv9+kk1nx9SbkxSvJsMbuVUxdPQmsPTqGShmhN8ulrMOg6Q==} engines: {node: ^18.19.0 || >=20.6.0} @@ -3329,6 +3405,12 @@ packages: peerDependencies: '@opentelemetry/api': ^1.0.0 + '@opentelemetry/resources@1.26.0': + resolution: {integrity: sha512-CPNYchBE7MBecCSVy0HKpUISEeJOniWqcHaAHpmasZ3j9o6V3AyBzhRc90jdmemq0HOxDr6ylhUbDhBqqPpeNw==} + engines: {node: '>=14'} + peerDependencies: + '@opentelemetry/api': '>=1.0.0 <1.10.0' + '@opentelemetry/resources@2.2.0': resolution: {integrity: sha512-1pNQf/JazQTMA0BiO5NINUzH0cbLbbl7mntLa4aJNmCCXSj0q03T5ZXXL0zw4G55TjdL9Tz32cznGClf+8zr5A==} engines: {node: ^18.19.0 || >=20.6.0} @@ -3365,6 +3447,18 @@ packages: peerDependencies: '@opentelemetry/api': '>=1.4.0 <1.10.0' + '@opentelemetry/sdk-logs@0.53.0': + resolution: {integrity: sha512-dhSisnEgIj/vJZXZV6f6KcTnyLDx/VuQ6l3ejuZpMpPlh9S1qMHiZU9NMmOkVkwwHkMy3G6mEBwdP23vUZVr4g==} + engines: {node: '>=14'} + peerDependencies: + '@opentelemetry/api': '>=1.4.0 <1.10.0' + + '@opentelemetry/sdk-metrics@1.26.0': + resolution: {integrity: sha512-0SvDXmou/JjzSDOjUmetAAvcKQW6ZrvosU0rkbDGpXvvZN+pQF6JbK/Kd4hNdK4q/22yeruqvukXEJyySTzyTQ==} + engines: {node: '>=14'} + peerDependencies: + '@opentelemetry/api': '>=1.3.0 <1.10.0' + '@opentelemetry/sdk-metrics@2.2.0': resolution: {integrity: sha512-G5KYP6+VJMZzpGipQw7Giif48h6SGQ2PFKEYCybeXJsOCB4fp8azqMAAzE5lnnHK3ZVwYQrgmFbsUJO/zOnwGw==} engines: {node: ^18.19.0 || >=20.6.0} @@ -3389,6 +3483,12 @@ packages: peerDependencies: '@opentelemetry/api': '>=1.3.0 <1.10.0' + '@opentelemetry/sdk-trace-base@1.26.0': + resolution: {integrity: sha512-olWQldtvbK4v22ymrKLbIcBi9L2SpMO84sCPY54IVsJhP9fRsxJT194C/AVaAuJzLE30EdhhM1VmvVYR7az+cw==} + engines: {node: '>=14'} + peerDependencies: + '@opentelemetry/api': '>=1.0.0 <1.10.0' + '@opentelemetry/sdk-trace-base@2.2.0': resolution: {integrity: sha512-xWQgL0Bmctsalg6PaXExmzdedSp3gyKV8mQBwK/j9VGdCDu2fmXIb2gAehBKbkXCpJ4HPkgv3QfoJWRT4dHWbw==} engines: {node: ^18.19.0 || >=20.6.0} @@ -3407,12 +3507,22 @@ packages: peerDependencies: '@opentelemetry/api': '>=1.3.0 <1.10.0' + '@opentelemetry/sdk-trace-node@1.26.0': + resolution: {integrity: sha512-Fj5IVKrj0yeUwlewCRwzOVcr5avTuNnMHWf7GPc1t6WaT78J6CJyF3saZ/0RkZfdeNO8IcBl/bNcWMVZBMRW8Q==} + engines: {node: '>=14'} + peerDependencies: + '@opentelemetry/api': '>=1.0.0 <1.10.0' + '@opentelemetry/sdk-trace-node@2.7.1': resolution: {integrity: sha512-pCpQxU68lV+I9s9svqMyVu5iHdDDUnqUpSxqwyCU8A9ejEsSnMPCbearwsUO4yk08ZJzAIUCFuReMdVQvHrdvg==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': '>=1.0.0 <1.10.0' + '@opentelemetry/semantic-conventions@1.27.0': + resolution: {integrity: sha512-sAay1RrB+ONOem0OZanAR1ZI/k7yDpnOQSQmTMuGImUQb2y8EbSaCJ94FQluM74xoU03vlb2d2U90hZluL6nQg==} + engines: {node: '>=14'} + '@opentelemetry/semantic-conventions@1.40.0': resolution: {integrity: sha512-cifvXDhcqMwwTlTK04GBNeIe7yyo28Mfby85QXFe1Yk8nmi36Ab/5UQwptOx84SsoGNRg+EVSjwzfSZMy6pmlw==} engines: {node: '>=14'} @@ -4358,6 +4468,28 @@ packages: peerDependencies: '@redis/client': ^5.11.0 + '@redocly/ajv@8.11.2': + resolution: {integrity: sha512-io1JpnwtIcvojV7QKDUSIuMN/ikdOUd1ReEnUnMKGfDVridQZ31J0MmIuqwuRjWDZfmvr+Q0MqCcfHM2gTivOg==} + + '@redocly/ajv@8.18.3': + resolution: {integrity: sha512-l42u0of3hY98sN2A+M4qTX1O/KrpgGH32Hu9kP2GtHyD5Dfqq86PKFLe5dwaD8DEnNmlOlll2BAmeEtf0DaySg==} + + '@redocly/cli@1.34.3': + resolution: {integrity: sha512-GJNBTMfm5wTCtH6K+RtPQZuGbqflMclXqAZ5My12tfux6xFDMW1l0MNd5RMpnIS1aeFcDX++P1gnnROWlesj4w==} + engines: {node: '>=18.17.0', npm: '>=9.5.0'} + hasBin: true + + '@redocly/config@0.22.2': + resolution: {integrity: sha512-roRDai8/zr2S9YfmzUfNhKjOF0NdcOIqF7bhf4MVC5UxpjIysDjyudvlAiVbpPHp3eDRWbdzUgtkK1a7YiDNyQ==} + + '@redocly/openapi-core@1.34.3': + resolution: {integrity: sha512-3arRdUp1fNx55itnjKiUhO6t4Mf91TsrTIYINDNLAZPS0TPd5YpiXRctwjel0qqWoOOhjA34cZ3m4dksLDFUYg==} + engines: {node: '>=18.17.0', npm: '>=9.5.0'} + + '@redocly/respect-core@1.34.3': + resolution: {integrity: sha512-vo/gu7dRGwTVsRueVSjVk04jOQuL0w22RBJRdRUWkfyse791tYXgMCOx35ijKekL83Q/7Okxf/YX6UY1v5CAug==} + engines: {node: '>=18.17.0', npm: '>=9.5.0'} + '@rolldown/binding-android-arm64@1.0.3': resolution: {integrity: sha512-454rs7jHngixp/NMxd5srYD57OnzSlZ/eFTETjORQHLwJG1lRtmNOJcBerZlfu4GjKqeq8aCCIQrMdHyhI51Hw==} engines: {node: ^20.19.0 || >=22.12.0} @@ -4805,6 +4937,9 @@ packages: peerDependencies: webpack: '>=5.0.0' + '@sinclair/typebox@0.27.10': + resolution: {integrity: sha512-MTBk/3jGLNB2tVxv6uLlFh1iu64iYOQ2PbdOSK3NW8JZsmlaOh2q6sdtKowBhfw8QFLmYNzTW4/oK4uATIi6ZA==} + '@smithy/abort-controller@4.2.11': resolution: {integrity: sha512-Hj4WoYWMJnSpM6/kchsm4bUNTL9XiSyhvoMb2KIq4VJzyDt7JpGHUZHkVNPZVC7YE1tf8tPeVauxpFBKGW4/KQ==} engines: {node: '>=18.0.0'} @@ -6539,6 +6674,12 @@ packages: resolution: {integrity: sha512-GlF5wPWnSa/X5LKM1o0wz0suXIINz1iHRLvTS+sLyi7XPbe5ycmYI3DlZqVGZZtDgl4DmasFg7gOB3JYbphV5g==} hasBin: true + better-ajv-errors@1.2.0: + resolution: {integrity: sha512-UW+IsFycygIo7bclP9h5ugkNH8EjCSgqyFB/yQ4Hqqa1OEYDtb0uFIkYE0b6+CjkgJYVM5UKI/pJPxjYe9EZlA==} + engines: {node: '>= 12.13.0'} + peerDependencies: + ajv: 6.14.0 + better-result@2.9.2: resolution: {integrity: sha512-WIFoBPCdnTOdk9inkE1ZRvCZ4P0CpSkAiLlchC65N7n9DcjZ3NhqkBOlafzpOVnO8ixyi37kicmSJ3ENhPZl7Q==} @@ -6660,6 +6801,9 @@ packages: resolution: {integrity: sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==} engines: {node: '>= 0.4'} + call-me-maybe@1.0.2: + resolution: {integrity: sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==} + callsites@3.1.0: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} @@ -6750,6 +6894,9 @@ packages: class-variance-authority@0.7.1: resolution: {integrity: sha512-Ka+9Trutv7G8M6WT6SeiRWz792K5qEqIGEGzXKhAE6xOWAY6pPH8U+9IY3oCMv6kqTmLsv7Xh/2w2RigkePMsg==} + classnames@2.5.1: + resolution: {integrity: sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==} + clean-regexp@1.0.0: resolution: {integrity: sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw==} engines: {node: '>=4'} @@ -6776,6 +6923,9 @@ packages: cliui@6.0.0: resolution: {integrity: sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==} + cliui@7.0.4: + resolution: {integrity: sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==} + cliui@8.0.1: resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} engines: {node: '>=12'} @@ -6809,6 +6959,9 @@ packages: resolution: {integrity: sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==} hasBin: true + colorette@1.4.0: + resolution: {integrity: sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==} + colorette@2.0.20: resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} @@ -6844,6 +6997,10 @@ packages: concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + concat-stream@2.0.0: + resolution: {integrity: sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==} + engines: {'0': node >= 6.0} + concurrently@9.2.1: resolution: {integrity: sha512-fsfrO0MxV64Znoy8/l1vVIjjHa29SZyyqPgQBwhiDcaW8wJc2W3XWVOGx4M3oJBnv/zdUZIIp1gDeS98GzP8Ng==} engines: {node: '>=18'} @@ -7084,6 +7241,9 @@ packages: decimal.js@10.6.0: resolution: {integrity: sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg==} + decko@1.2.0: + resolution: {integrity: sha512-m8FnyHXV1QX+S1cl+KPFDIl6NMkxtKsy6+U/aYyjrOqWMuwAwYWu7ePqrsUHtDR5Y8Yk2pi/KIDSgF+vT4cPOQ==} + decompress-response@6.0.0: resolution: {integrity: sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==} engines: {node: '>=10'} @@ -7181,6 +7341,10 @@ packages: didyoumean@1.2.2: resolution: {integrity: sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==} + diff-sequences@29.6.3: + resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + diff@4.0.4: resolution: {integrity: sha512-X07nttJQkwkfKfvTPG/KSnE2OMdcUCao6+eXF3wmnIQRn2aPAHH3VxDbDOdegkd6JbPsXqShpvEOHfAT+nCNwQ==} engines: {node: '>=0.3.1'} @@ -7248,6 +7412,10 @@ packages: resolution: {integrity: sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==} engines: {node: '>=12'} + dotenv@16.4.5: + resolution: {integrity: sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==} + engines: {node: '>=12'} + dotenv@16.6.1: resolution: {integrity: sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==} engines: {node: '>=12'} @@ -7388,6 +7556,9 @@ packages: resolution: {integrity: sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g==} engines: {node: '>= 0.4'} + es6-promise@3.3.1: + resolution: {integrity: sha512-SOp9Phqvqn7jtEUxPWdWfWoLmyt2VaJ6MpvP9Comy1MceMXqE6bxvaTu4iaxpYYPzhny28Lc+M87/c2cPK6lDg==} + esbuild@0.28.1: resolution: {integrity: sha512-HrJrvZv5ayxBzPfwphOoNzkzOIIlifzk0KJrGK2c8R4+LKpMtpYLQeUdjnwjWv/LZlkH2laZk+4w78pi99D4Vw==} engines: {node: '>=18'} @@ -7822,10 +7993,17 @@ packages: resolution: {integrity: sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==} engines: {node: '>= 0.4'} + foreach@2.0.6: + resolution: {integrity: sha512-k6GAGDyqLe9JaebCsFCoudPPWfihKu8pylYXRlqP1J7ms39iPoTtk2fviNglIeQEwdh0bQeKJ01ZPyuyQvKzwg==} + foreground-child@3.3.1: resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==} engines: {node: '>=14'} + form-data@4.0.0: + resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} + engines: {node: '>= 6'} + form-data@4.0.5: resolution: {integrity: sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==} engines: {node: '>= 6'} @@ -8051,6 +8229,11 @@ packages: graphmatch@1.1.1: resolution: {integrity: sha512-5ykVn/EXM1hF0XCaWh05VbYvEiOL2lY1kBxZtaYsyvjp7cmWOU1XsAdfQBwClraEofXDT197lFbXOEVMHpvQOg==} + handlebars@4.7.9: + resolution: {integrity: sha512-4E71E0rpOaQuJR2A3xDZ+GM1HyWYv1clR58tC8emQNeQe3RH7MAzSbat+V0wG78LQBo6m6bzSG/L4pBuCsgnUQ==} + engines: {node: '>=0.4.7'} + hasBin: true + happy-dom@20.8.9: resolution: {integrity: sha512-Tz23LR9T9jOGVZm2x1EPdXqwA37G/owYMxRwU0E4miurAtFsPMQ1d2Jc2okUaSjZqAFz2oEn3FLXC5a0a+siyA==} engines: {node: '>=20.0.0'} @@ -8149,6 +8332,9 @@ packages: http-status-codes@2.3.0: resolution: {integrity: sha512-RJ8XvFvpPM/Dmc5SV+dC4y5PCeOhT3x1Hq0NU3rjGeg5a/CqlhZ7uudknPwZFz4aeAXDcbAyaeP7GAo9lvngtA==} + http2-client@1.3.5: + resolution: {integrity: sha512-EC2utToWl4RKfs5zd36Mxq7nzHHBuomZboI0yYL6Y0RmBgT7Sgkq4rQ0ezFTYoIsSs7Tm9SJe+o2FcAg6GBhGA==} + https-proxy-agent@5.0.1: resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==} engines: {node: '>= 6'} @@ -8493,6 +8679,18 @@ packages: javascript-natural-sort@0.7.1: resolution: {integrity: sha512-nO6jcEfZWQXDhOiBtG2KvKyEptz7RVbpGP4vTD2hLBdmNQSsCiicO2Ioinv6UI4y9ukqnBpy+XZ9H6uLNgJTlw==} + jest-diff@29.7.0: + resolution: {integrity: sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-get-type@29.6.3: + resolution: {integrity: sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-matcher-utils@29.7.0: + resolution: {integrity: sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + jest-worker@27.5.1: resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==} engines: {node: '>= 10.13.0'} @@ -8529,6 +8727,10 @@ packages: resolution: {integrity: sha512-z/wZZgDrkNV1eA0ULjM/F9/50Ya8fbzgKneSpoPsXSGd0KnpdtHfOZWK+GcwLk+EZbS4F9RBhU+K2RgzuDaItw==} engines: {node: '>=20'} + js-levenshtein@1.1.6: + resolution: {integrity: sha512-X2BB11YZtrRqY4EnQcLX5Rh373zbK4alC1FW7D7MBhL2gtcC17cTnr6DmfHZeS0s2rTHjUTMMHfG7gO8SSdw+g==} + engines: {node: '>=0.10.0'} + js-md4@0.3.2: resolution: {integrity: sha512-/GDnfQYsltsjRswQhN9fhv3EMw2sCpUdrdxyWDOUK7eyD++r3gRhzgiQgc/x4MAv2i1iuQ4lxO5mvqM3vj4bwA==} @@ -8538,6 +8740,10 @@ packages: js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + js-yaml@4.1.0: + resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} + hasBin: true + js-yaml@4.1.1: resolution: {integrity: sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==} hasBin: true @@ -8551,6 +8757,10 @@ packages: canvas: optional: true + jsep@1.4.0: + resolution: {integrity: sha512-B7qPcEVE3NVkmSJbaYxvv4cHkVW7DQsZz13pUMrfS8z8Q/BuShN+gcTXrUlPiGqM2/t/EEaI030bpxMqY8gMlw==} + engines: {node: '>= 10.16.0'} + jsesc@0.5.0: resolution: {integrity: sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==} hasBin: true @@ -8572,6 +8782,9 @@ packages: json-parse-even-better-errors@2.3.1: resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} + json-pointer@0.6.2: + resolution: {integrity: sha512-vLWcKbOaXlO+jvRy4qNd+TI1QUPZzfJj1tpJ3vAXDych5XJf93ftpUKe5pKCrzyIIwgBJcOcCVRUfqQP25afBw==} + json-schema-traverse@0.4.1: resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} @@ -8599,6 +8812,15 @@ packages: jsonfile@6.2.0: resolution: {integrity: sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==} + jsonpath-plus@10.4.0: + resolution: {integrity: sha512-T92WWatJXmhBbKsgH/0hl+jxjdXrifi5IKeMY02DWggRxX0UElcbVzPlmgLTbvsPeW1PasQ6xE2Q75stkhGbsA==} + engines: {node: '>=18.0.0'} + hasBin: true + + jsonpointer@5.0.1: + resolution: {integrity: sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ==} + engines: {node: '>=0.10.0'} + jsonwebtoken@9.0.3: resolution: {integrity: sha512-MT/xP0CrubFRNLNKvxJ2BYfy53Zkm++5bX9dtuPbqAeQpTVe0MQTFhao8+Cp//EmJp244xt6Drw/GVEGCUj40g==} engines: {node: '>=12', npm: '>=6'} @@ -8636,6 +8858,10 @@ packages: leac@0.6.0: resolution: {integrity: sha512-y+SqErxb8h7nE/fiEX07jsbuhrpO9lL8eca7/Y1nuWV2moNlXhyd59iDGcRf6moVyDMbmTNzL40SUyrFU/yDpg==} + leven@3.1.0: + resolution: {integrity: sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==} + engines: {node: '>=6'} + levn@0.4.1: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} engines: {node: '>= 0.8.0'} @@ -8849,6 +9075,9 @@ packages: peerDependencies: react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0 + lunr@2.3.9: + resolution: {integrity: sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==} + luxon@3.7.2: resolution: {integrity: sha512-vtEhXh/gNjI9Yg1u4jX/0YVPMvxzHuGgCm6tC5kZyb08yjGWGnqAjGJvcXbqQR2P3MyMEFnRbpcdFS6PBcLqew==} engines: {node: '>=12'} @@ -8874,6 +9103,9 @@ packages: resolution: {integrity: sha512-+zopwDy7DNknmwPQplem5lAZX/eCOzSvSNNcSKm5eVwTkOBzoktEfXsa9L23J/GIRhxRsaxzkPEhrJEpE2F4Gg==} engines: {node: '>= 10'} + mark.js@8.11.1: + resolution: {integrity: sha512-1I+1qpDt4idfgLQG+BNWmrqku+7/2bi5nLf4YwF8y8zXvmfiTBY3PV3ZibfrjBueCByROpuBjLLFCajqkgYoLQ==} + markdown-it@14.1.1: resolution: {integrity: sha512-BuU2qnTti9YKgK5N+IeMubp14ZUKUUw7yeJbkjtosvHiP0AZ5c8IAgEMk79D0eC8F23r4Ac/q8cAIFdm2FtyoA==} hasBin: true @@ -8883,6 +9115,11 @@ packages: engines: {node: '>= 18'} hasBin: true + marked@4.3.0: + resolution: {integrity: sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==} + engines: {node: '>= 12'} + hasBin: true + math-intrinsics@1.1.0: resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} engines: {node: '>= 0.4'} @@ -8971,6 +9208,10 @@ packages: minimatch@3.1.5: resolution: {integrity: sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==} + minimatch@5.1.9: + resolution: {integrity: sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw==} + engines: {node: '>=10'} + minimatch@9.0.9: resolution: {integrity: sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==} engines: {node: '>=16 || 14 >=14.17'} @@ -9032,6 +9273,35 @@ packages: mnemonist@0.38.3: resolution: {integrity: sha512-2K9QYubXx/NAjv4VLq1d1Ly8pWNC5L3BrixtdkyTegXWJIqY+zLNDhhX/A+ZwWt70tB1S8H4BE8FLYEFyNoOBw==} + mobx-react-lite@4.1.1: + resolution: {integrity: sha512-iUxiMpsvNraCKXU+yPotsOncNNmyeS2B5DKL+TL6Tar/xm+wwNJAubJmtRSeAoYawdZqwv8Z/+5nPRHeQxTiXg==} + peerDependencies: + mobx: ^6.9.0 + react: ^16.8.0 || ^17 || ^18 || ^19 + react-dom: '*' + react-native: '*' + peerDependenciesMeta: + react-dom: + optional: true + react-native: + optional: true + + mobx-react@9.2.2: + resolution: {integrity: sha512-ShszmQzR/VrhU3M0cQ7DA/s8qNcLcF2emSuudJ/TnDILS3C1Im48mdaG6CpyjZHy8+WqgXUCC9mPqSRIwPPMuQ==} + peerDependencies: + mobx: ^6.9.0 + react: ^16.8.0 || ^17 || ^18 || ^19 + react-dom: '*' + react-native: '*' + peerDependenciesMeta: + react-dom: + optional: true + react-native: + optional: true + + mobx@6.16.1: + resolution: {integrity: sha512-syNcDdX3KT+Jq3je6eGjBhuc24Z68td2VG0zNFqRswaE433D9SNH5VRy/xrGbJsUixfppLLccXhAW9JSf6n+SQ==} + module-details-from-path@1.0.4: resolution: {integrity: sha512-EGWKgxALGMgzvxYF1UyGTy0HXX/2vHLkw6+NvDKW2jypWbHpjQuj4UMcqQWXHERJhVGKikolT06G3bcKe4fi7w==} @@ -9205,6 +9475,10 @@ packages: engines: {node: '>=10.5.0'} deprecated: Use your platform's native DOMException instead + node-fetch-h2@2.3.0: + resolution: {integrity: sha512-ofRW94Ab0T4AOh5Fk8t0h8OBWrmjb0SSB20xh1H8YnPV9EJ+f5AMoYSUQ2zgJ4Iq2HAK0I2l5/Nequ8YzFS3Hg==} + engines: {node: 4.x || >=6.0.0} + node-fetch@2.7.0: resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} engines: {node: 4.x || >=6.0.0} @@ -9237,6 +9511,9 @@ packages: node-html-parser@7.1.0: resolution: {integrity: sha512-iJo8b2uYGT40Y8BTyy5ufL6IVbN8rbm/1QK2xffXU/1a/v3AAa0d1YAoqBNYqaS4R/HajkWIpIfdE6KcyFh1AQ==} + node-readfiles@0.2.0: + resolution: {integrity: sha512-SU00ZarexNlE4Rjdm83vglt5Y9yiQ+XI1XpflWlb7q7UTN1JUItm69xMeiQCTxtTfnzt+83T8Cx+vI2ED++VDA==} + node-releases@2.0.27: resolution: {integrity: sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA==} @@ -9273,6 +9550,22 @@ packages: engines: {node: '>=18'} hasBin: true + oas-kit-common@1.0.8: + resolution: {integrity: sha512-pJTS2+T0oGIwgjGpw7sIRU8RQMcUoKCDWFLdBqKB2BNmGpbBMH2sdqAaOXUg8OzonZHU0L7vfJu1mJFEiYDWOQ==} + + oas-linter@3.2.2: + resolution: {integrity: sha512-KEGjPDVoU5K6swgo9hJVA/qYGlwfbFx+Kg2QB/kd7rzV5N8N5Mg6PlsoCMohVnQmo+pzJap/F610qTodKzecGQ==} + + oas-resolver@2.5.6: + resolution: {integrity: sha512-Yx5PWQNZomfEhPPOphFbZKi9W93CocQj18NlD2Pa4GWZzdZpSJvYwoiuurRI7m3SpcChrnO08hkuQDL3FGsVFQ==} + hasBin: true + + oas-schema-walker@1.1.5: + resolution: {integrity: sha512-2yucenq1a9YPmeNExoUa9Qwrt9RFkjqaMAA1X+U7sbb0AqBeTIdMHky9SQQ6iN94bO5NW0W4TRYXerG+BdAvAQ==} + + oas-validator@5.0.8: + resolution: {integrity: sha512-cu20/HE5N5HKqVygs3dt94eYJfBi0TsZvPVXDhbXQHiEityDN+RROTleefoKRKKJ9dFAF2JBkDHgvWj0sjKGmw==} + oauth4webapi@3.8.6: resolution: {integrity: sha512-iwemM91xz8nryHti2yTmg5fhyEMVOkOXwHNqbvcATjyajb5oQxCQzrNOA6uElRHuMhQQTKUyFKV9y/CNyg25BQ==} @@ -9359,6 +9652,9 @@ packages: resolution: {integrity: sha512-smsWv2LzFjP03xmvFoJ331ss6h+jixfA4UUV/Bsiyuu4YJPfN+FIQGOIiv4w9/+MoHkfkJ22UIaQWRVFRfH6Vw==} engines: {node: '>=20'} + openapi-sampler@1.7.4: + resolution: {integrity: sha512-CKS/rd5ucPCuEDbJnjGDXZTsuGWcmv53aCmQx7soZlPEONUGN4af0/dY5+THRFZraSEjeA78nlfzdFswC/N5SA==} + openid-client@5.7.1: resolution: {integrity: sha512-jDBPgSVfTnkIh71Hg9pRvtJc6wTwqjRkN88+gCFtYWrlP4Yx2Dsrow8uPi3qLr/aeymPF3o2+dS+wOpglK04ew==} @@ -9379,6 +9675,9 @@ packages: otplib@12.0.1: resolution: {integrity: sha512-xDGvUOQjop7RDgxTQ+o4pOol0/3xSZzawTiPKRrHnQWAy0WjhNs/5HdIDJCrqC4MBynmjXgULc6YfioaxZeFgg==} + outdent@0.8.0: + resolution: {integrity: sha512-KiOAIsdpUTcAXuykya5fnVVT+/5uS0Q1mrkRHcF89tpieSmY33O/tmc54CqwA+bfhbtEfZUNLHaPUiB9X3jt1A==} + own-keys@1.0.1: resolution: {integrity: sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg==} engines: {node: '>= 0.4'} @@ -9490,6 +9789,9 @@ packages: perfect-debounce@2.1.0: resolution: {integrity: sha512-LjgdTytVFXeUgtHZr9WYViYSM/g8MkcTPYDlPa3cDqMirHjKiSZPYd6DoL7pK8AJQr+uWkQvCjHNdiMqsrJs+g==} + perfect-scrollbar@1.5.6: + resolution: {integrity: sha512-rixgxw3SxyJbCaSpo1n35A/fwI1r2rdwMKOTCg/AcG+xOEyZcE8UHVjpZMFCVImzsFoCZeJTT+M/rdEIQYO2nw==} + pg-cloudflare@1.3.0: resolution: {integrity: sha512-6lswVVSztmHiRtD6I8hw4qP/nDm1EJbKMRhf3HCYaqud7frGysPv7FYJ5noZQdhQtN2xJnimfMtvQq21pdbzyQ==} @@ -9603,6 +9905,10 @@ packages: resolution: {integrity: sha512-TRzzuFRRmEoSW/p1KVAmiOgPco2Irlah+bGFCeNfJXxxYGwSw7YwAOAcd7X28K/m5bjBWKsC29KyoMfHbypayg==} engines: {node: '>=12.13.0'} + polished@4.3.1: + resolution: {integrity: sha512-OBatVyC/N7SCW/FaDHrSd+vn0o5cS855TOmYi4OkdWUMSJCET/xip//ch8xGUvtr3i44X9LVyWwQlRMTN3pwSA==} + engines: {node: '>=10'} + possible-typed-array-names@1.1.0: resolution: {integrity: sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==} engines: {node: '>= 0.4'} @@ -9791,6 +10097,10 @@ packages: resolution: {integrity: sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} + pretty-format@29.7.0: + resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + pretty-format@3.8.0: resolution: {integrity: sha512-WuxUnVtlWL1OfZFQFuqvnvs6MiAGk9UNsBostyBOB0Is9wb5uRESevA6rnl/rkksXaGX3GzZhPup5d6Vp1nFew==} @@ -9920,6 +10230,9 @@ packages: ramda@0.27.2: resolution: {integrity: sha512-SbiLPU40JuJniHexQSAgad32hfwd+DRUdwF2PlVuI5RZD0/vahUco7R8vD86J/tcEKKF9vZrUVwgtmGCqlCKyA==} + randombytes@2.1.0: + resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} + range-parser@1.2.1: resolution: {integrity: sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==} engines: {node: '>= 0.6'} @@ -10083,6 +10396,11 @@ packages: '@types/react': optional: true + react-tabs@6.1.1: + resolution: {integrity: sha512-CPiuKoMFf89B7QlbFfdBD9XmUWiE3qudQputMVZB8GQvPJZRX/gqjDaDWOPDwGinEfpJKEuBCkGt83Tt4efeyA==} + peerDependencies: + react: ^18.0.0 || ^19.0.0 + react-transition-group@4.4.5: resolution: {integrity: sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g==} peerDependencies: @@ -10183,6 +10501,16 @@ packages: resolution: {integrity: sha512-YwXjATVDT+AuxcyfOwZn046aml9jMlQPvU1VXIlLDVAExe0u93aTfPYSeRgG4p9Q/Jlkj+LXJ1XEoFV+j2JKcQ==} engines: {node: '>= 18'} + redoc@2.5.0: + resolution: {integrity: sha512-NpYsOZ1PD9qFdjbLVBZJWptqE+4Y6TkUuvEOqPUmoH7AKOmPcE+hYjotLxQNTqVoWL4z0T2uxILmcc8JGDci+Q==} + engines: {node: '>=6.9', npm: '>=3.0.0'} + peerDependencies: + core-js: ^3.1.4 + mobx: ^6.0.4 + react: ^16.8.4 || ^17.0.0 || ^18.0.0 || ^19.0.0 + react-dom: ^16.8.4 || ^17.0.0 || ^18.0.0 || ^19.0.0 + styled-components: ^4.1.1 || ^5.1.1 || ^6.0.5 + reflect-metadata@0.2.2: resolution: {integrity: sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q==} @@ -10190,6 +10518,9 @@ packages: resolution: {integrity: sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw==} engines: {node: '>= 0.4'} + reftools@1.1.9: + resolution: {integrity: sha512-OVede/NQE13xBQ+ob5CKd5KyeJYU2YInb1bmV4nRoOfquZPkAkxuOXicSe1PvqIuZZ4kD13sPKBbR7UFDmli6w==} + regexp-tree@0.1.27: resolution: {integrity: sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==} hasBin: true @@ -10407,6 +10738,9 @@ packages: set-blocking@2.0.0: resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} + set-cookie-parser@2.7.2: + resolution: {integrity: sha512-oeM1lpU/UvhTxw+g3cIfxXHyJRc/uidd3yK1P242gzHds0udQBYzs3y8j4gCCW+ZJ7ad0yctld8RYO+bdurlvw==} + set-function-length@1.2.2: resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} engines: {node: '>= 0.4'} @@ -10447,6 +10781,24 @@ packages: resolution: {integrity: sha512-VsC6n6vz1ihYYyZZwX7YZSF5l5x36ca17OC+a69h94YqB7X6XLwf+5MOgynYir2SLFUbl8gIYvBo8K8RoNQ6bQ==} engines: {node: '>= 0.4'} + should-equal@2.0.0: + resolution: {integrity: sha512-ZP36TMrK9euEuWQYBig9W55WPC7uo37qzAEmbjHz4gfyuXrEUgF8cUvQVO+w+d3OMfPvSRQJ22lSm8MQJ43LTA==} + + should-format@3.0.3: + resolution: {integrity: sha512-hZ58adtulAk0gKtua7QxevgUaXTTXxIi8t41L3zo9AHvjXO1/7sdLECuHeIN2SRtYXpNkmhoUP2pdeWgricQ+Q==} + + should-type-adaptors@1.1.0: + resolution: {integrity: sha512-JA4hdoLnN+kebEp2Vs8eBe9g7uy0zbRo+RMcU0EsNy+R+k049Ki+N5tT5Jagst2g7EAja+euFuoXFCa8vIklfA==} + + should-type@1.4.0: + resolution: {integrity: sha512-MdAsTu3n25yDbIe1NeN69G4n6mUnJGtSJHygX3+oN0ZbO3DTiATnf7XnYJdGT42JCXurTb1JI0qOBR65shvhPQ==} + + should-util@1.0.1: + resolution: {integrity: sha512-oXF8tfxx5cDk8r2kYqlkUJzZpDBqVY/II2WhvU0n9Y3XYvAYRmeaf1PvvIvTgPnv4KJ+ES5M0PyDq5Jp+Ygy2g==} + + should@13.2.3: + resolution: {integrity: sha512-ggLesLtu2xp+ZxI+ysJTmNjh2U0TsC+rQ/pfED9bUZZ4DKefP27D+7YJVVTvKsmjLpIi9jAa7itwDGkDDmt1GQ==} + side-channel-list@1.0.0: resolution: {integrity: sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==} engines: {node: '>= 0.4'} @@ -10482,6 +10834,9 @@ packages: simple-get@4.0.1: resolution: {integrity: sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==} + simple-websocket@9.1.0: + resolution: {integrity: sha512-8MJPnjRN6A8UCp1I+H/dSFyjwJhp6wta4hsVRhjf8w9qBHRzxYt14RaOcjvQnhD1N4yKOddEjflwMnQM4VtXjQ==} + sisteransi@1.0.5: resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} @@ -10497,6 +10852,10 @@ packages: resolution: {integrity: sha512-stxByr12oeeOyY2BlviTNQlYV5xOj47GirPr4yA1hE9JCtxfQN0+tVbkxwCtYDQWhEKWFHsEK48ORg5jrouCAg==} engines: {node: '>=20'} + slugify@1.4.7: + resolution: {integrity: sha512-tf+h5W1IrjNm/9rKKj0JU2MDMruiopx0jjVA5zCdBtcGjfp0+c5rHw/zADLC3IeKlGHtVbHtpfzvYA0OYT+HKg==} + engines: {node: '>=8.0.0'} + smart-buffer@4.2.0: resolution: {integrity: sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==} engines: {node: '>= 6.0.0', npm: '>= 3.0.0'} @@ -10637,6 +10996,9 @@ packages: resolution: {integrity: sha512-UhDfHmA92YAlNnCfhmq0VeNL5bDbiZGg7sZ2IvPsXubGkiNa9EC+tUTsjBRsYUAz87btI6/1wf4XoVvQ3uRnmQ==} engines: {node: '>=18'} + stickyfill@1.1.1: + resolution: {integrity: sha512-GCp7vHAfpao+Qh/3Flh9DXEJ/qSi0KJwJw6zYlZOtRYXWUIpMM6mC2rIep/dK8RQqwW0KxGJIllmjPIBOGN8AA==} + stop-iteration-iterator@1.1.0: resolution: {integrity: sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ==} engines: {node: '>= 0.4'} @@ -10752,6 +11114,22 @@ packages: stubborn-utils@1.0.2: resolution: {integrity: sha512-zOh9jPYI+xrNOyisSelgym4tolKTJCQd5GBhK0+0xJvcYDcwlOoxF/rnFKQ2KRZknXSG9jWAp66fwP6AxN9STg==} + styled-components@6.4.2: + resolution: {integrity: sha512-xZBhBJsMtGqb+aKcwKgaT+BtuFums9VynX2JRvXJGTx5UfZzN12rk5r4nVdhXYvRw+hE7yiYxVrOqJZaK2+Txg==} + engines: {node: '>= 16'} + peerDependencies: + css-to-react-native: '>= 3.2.0' + react: '>= 16.8.0' + react-dom: '>= 16.8.0' + react-native: '>= 0.68.0' + peerDependenciesMeta: + css-to-react-native: + optional: true + react-dom: + optional: true + react-native: + optional: true + styled-jsx@5.1.6: resolution: {integrity: sha512-qSVyDTeMotdvQYoHWLNGwRFJHC+i+ZvdBRYosOFgC+Wg1vx4frN2/RG/NA7SYqqvKNLf39P2LSRA2pu6n0XYZA==} engines: {node: '>= 12.0.0'} @@ -10785,6 +11163,10 @@ packages: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} + swagger2openapi@7.0.8: + resolution: {integrity: sha512-upi/0ZGkYgEcLeGieoz8gT74oWHA0E7JivX7aN9mAf+Tc7BQoRBvnIGHoPDw+f9TXTW4s6kGYCZJtauP6OYp7g==} + hasBin: true + symbol-tree@3.2.4: resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==} @@ -11134,6 +11516,9 @@ packages: resolution: {integrity: sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==} engines: {node: '>= 0.4'} + typedarray@0.0.6: + resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==} + typeorm@0.3.28: resolution: {integrity: sha512-6GH7wXhtfq2D33ZuRXYwIsl/qM5685WZcODZb7noOOcRMteM9KF2x2ap3H0EBjnSV0VO4gNAfJT5Ukp0PkOlvg==} engines: {node: '>=16.13.0'} @@ -11212,6 +11597,11 @@ packages: ufo@1.6.1: resolution: {integrity: sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA==} + uglify-js@3.19.3: + resolution: {integrity: sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==} + engines: {node: '>=0.8.0'} + hasBin: true + uint8array-extras@1.5.0: resolution: {integrity: sha512-rvKSBiC5zqCCiDZ9kAOszZcDvdAHwwIKJG33Ykj43OKcWsnmcBRL09YTU4nOeHZ8Y2a7l1MgTd08SBe9A8Qj6A==} engines: {node: '>=18'} @@ -11226,6 +11616,10 @@ packages: undici-types@7.18.2: resolution: {integrity: sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==} + undici@6.27.0: + resolution: {integrity: sha512-YmfV3YnEDzXRC5lZ2jWtWWHKGUm1zIt8AhesR1tens+HTNv+YZlN/dp6G727LOvMJ8xjP9Be7Y2Sdr96LDm+pg==} + engines: {node: '>=18.17'} + undici@7.24.8: resolution: {integrity: sha512-6KQ/+QxK49Z/p3HO6E5ZCZWNnCasyZLa5ExaVYyvPxUwKtbCPMKELJOqh7EqOle0t9cH/7d2TaaTRRa6Nhs4YQ==} engines: {node: '>=20.18.1'} @@ -11261,6 +11655,9 @@ packages: peerDependencies: browserslist: '>= 4.21.0' + uri-js-replace@1.0.1: + resolution: {integrity: sha512-W+C9NWNLFOoBI2QWDp4UT9pv65r2w5Cx+3sTYFvtMdDBxkKt1syCqsUdSFAChbEe1uK5TfS04wt/nGwmaeIQ0g==} + uri-js@4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} @@ -11587,6 +11984,9 @@ packages: resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} engines: {node: '>=0.10.0'} + wordwrap@1.0.0: + resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==} + wrap-ansi@6.2.0: resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} engines: {node: '>=8'} @@ -11606,6 +12006,18 @@ packages: wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + ws@7.5.11: + resolution: {integrity: sha512-zS54Oen9bITtp7kp2XM3AydrCIq1D+HwJOuH+c+e4LfpL/lotP5osijd+UoMnxwAam1GN8R4KtLAyIrIcBNpiA==} + engines: {node: '>=8.3.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: ^5.0.2 + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + ws@8.21.0: resolution: {integrity: sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g==} engines: {node: '>=10.0.0'} @@ -11687,6 +12099,13 @@ packages: yallist@4.0.0: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} + yaml-ast-parser@0.0.43: + resolution: {integrity: sha512-2PTINUwsRqSd+s8XxKaJWQlUuEMHJQyEuh2edBbW8KNJz0SJPwUSD2zRWqezFEdN7IzAgeuYHFUCF7o8zRdZ0A==} + + yaml@1.10.3: + resolution: {integrity: sha512-vIYeF1u3CjlhAFekPPAk2h/Kv4T3mAkMox5OymRiJQB0spDP10LHvt+K7G9Ny6NuuMAb25/6n1qyUjAcGNf/AA==} + engines: {node: '>= 6'} + yaml@2.9.0: resolution: {integrity: sha512-2AvhNX3mb8zd6Zy7INTtSpl1F15HW6Wnqj0srWlkKLcpYl/gMIMJiyuGq2KeI2YFxUPjdlB+3Lc10seMLtL4cA==} engines: {node: '>= 14.6'} @@ -11696,6 +12115,10 @@ packages: resolution: {integrity: sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==} engines: {node: '>=6'} + yargs-parser@20.2.9: + resolution: {integrity: sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==} + engines: {node: '>=10'} + yargs-parser@21.1.1: resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} engines: {node: '>=12'} @@ -11708,6 +12131,10 @@ packages: resolution: {integrity: sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==} engines: {node: '>=8'} + yargs@17.0.1: + resolution: {integrity: sha512-xBBulfCc8Y6gLFcrPvtqKz9hz8SO0l1Ni8GgDekvBX2ro0HRQImDGnikfc33cgzcYUSncapnNcZDjVFIH3f6KQ==} + engines: {node: '>=12'} + yargs@17.7.2: resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} engines: {node: '>=12'} @@ -13449,6 +13876,12 @@ snapshots: tslib: 2.8.1 optional: true + '@emotion/is-prop-valid@1.4.0': + dependencies: + '@emotion/memoize': 0.9.0 + + '@emotion/memoize@0.9.0': {} + '@epic-web/invariant@1.0.0': {} '@esbuild/aix-ppc64@0.28.1': @@ -13556,6 +13989,10 @@ snapshots: optionalDependencies: '@noble/hashes': 2.0.1 + '@exodus/schemasafe@1.3.0': {} + + '@faker-js/faker@7.6.0': {} + '@fastify/otel@0.16.0(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 @@ -13661,6 +14098,8 @@ snapshots: '@humanwhocodes/module-importer@1.0.1': {} + '@humanwhocodes/momoa@2.0.4': {} + '@humanwhocodes/object-schema@2.0.3': {} '@img/colour@1.0.0': {} @@ -13770,6 +14209,10 @@ snapshots: wrap-ansi: 8.1.0 wrap-ansi-cjs: wrap-ansi@7.0.0 + '@jest/schemas@29.6.3': + dependencies: + '@sinclair/typebox': 0.27.10 + '@joshwooding/vite-plugin-react-docgen-typescript@0.7.0(typescript@5.9.3)(vite@7.3.5(@types/node@25.4.0)(jiti@2.6.1)(lightningcss@1.32.0)(terser@5.47.1)(tsx@4.21.0)(yaml@2.9.0))': dependencies: glob: 13.0.6 @@ -13812,6 +14255,14 @@ snapshots: '@js-sdsl/ordered-map@4.4.2': {} + '@jsep-plugin/assignment@1.3.0(jsep@1.4.0)': + dependencies: + jsep: 1.4.0 + + '@jsep-plugin/regex@1.0.4(jsep@1.4.0)': + dependencies: + jsep: 1.4.0 + '@json2csv/formatters@7.0.6': {} '@json2csv/node@7.0.6': @@ -14187,6 +14638,10 @@ snapshots: dependencies: '@opentelemetry/api': 1.9.0 + '@opentelemetry/api-logs@0.53.0': + dependencies: + '@opentelemetry/api': 1.9.0 + '@opentelemetry/api@1.9.0': {} '@opentelemetry/auto-instrumentations-node@0.75.0(@opentelemetry/api@1.9.0)(@opentelemetry/core@2.8.0(@opentelemetry/api@1.9.0))': @@ -14250,6 +14705,10 @@ snapshots: '@opentelemetry/core': 2.8.0(@opentelemetry/api@1.9.0) yaml: 2.9.0 + '@opentelemetry/context-async-hooks@1.26.0(@opentelemetry/api@1.9.0)': + dependencies: + '@opentelemetry/api': 1.9.0 + '@opentelemetry/context-async-hooks@2.6.0(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 @@ -14412,6 +14871,15 @@ snapshots: '@opentelemetry/resources': 2.7.1(@opentelemetry/api@1.9.0) '@opentelemetry/sdk-trace-base': 2.7.1(@opentelemetry/api@1.9.0) + '@opentelemetry/exporter-trace-otlp-http@0.53.0(@opentelemetry/api@1.9.0)': + dependencies: + '@opentelemetry/api': 1.9.0 + '@opentelemetry/core': 2.8.0(@opentelemetry/api@1.9.0) + '@opentelemetry/otlp-exporter-base': 0.53.0(@opentelemetry/api@1.9.0) + '@opentelemetry/otlp-transformer': 0.53.0(@opentelemetry/api@1.9.0) + '@opentelemetry/resources': 1.26.0(@opentelemetry/api@1.9.0) + '@opentelemetry/sdk-trace-base': 1.26.0(@opentelemetry/api@1.9.0) + '@opentelemetry/exporter-trace-otlp-proto@0.217.0(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 @@ -15014,6 +15482,12 @@ snapshots: '@opentelemetry/core': 2.8.0(@opentelemetry/api@1.9.0) '@opentelemetry/otlp-transformer': 0.217.0(@opentelemetry/api@1.9.0) + '@opentelemetry/otlp-exporter-base@0.53.0(@opentelemetry/api@1.9.0)': + dependencies: + '@opentelemetry/api': 1.9.0 + '@opentelemetry/core': 2.8.0(@opentelemetry/api@1.9.0) + '@opentelemetry/otlp-transformer': 0.53.0(@opentelemetry/api@1.9.0) + '@opentelemetry/otlp-grpc-exporter-base@0.212.0(@opentelemetry/api@1.9.0)': dependencies: '@grpc/grpc-js': 1.14.4 @@ -15063,11 +15537,32 @@ snapshots: '@opentelemetry/sdk-trace-base': 2.7.1(@opentelemetry/api@1.9.0) protobufjs: 8.6.3 + '@opentelemetry/otlp-transformer@0.53.0(@opentelemetry/api@1.9.0)': + dependencies: + '@opentelemetry/api': 1.9.0 + '@opentelemetry/api-logs': 0.53.0 + '@opentelemetry/core': 2.8.0(@opentelemetry/api@1.9.0) + '@opentelemetry/resources': 1.26.0(@opentelemetry/api@1.9.0) + '@opentelemetry/sdk-logs': 0.53.0(@opentelemetry/api@1.9.0) + '@opentelemetry/sdk-metrics': 1.26.0(@opentelemetry/api@1.9.0) + '@opentelemetry/sdk-trace-base': 1.26.0(@opentelemetry/api@1.9.0) + protobufjs: 7.6.3 + + '@opentelemetry/propagator-b3@1.26.0(@opentelemetry/api@1.9.0)': + dependencies: + '@opentelemetry/api': 1.9.0 + '@opentelemetry/core': 2.8.0(@opentelemetry/api@1.9.0) + '@opentelemetry/propagator-b3@2.7.1(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 '@opentelemetry/core': 2.8.0(@opentelemetry/api@1.9.0) + '@opentelemetry/propagator-jaeger@1.26.0(@opentelemetry/api@1.9.0)': + dependencies: + '@opentelemetry/api': 1.9.0 + '@opentelemetry/core': 2.8.0(@opentelemetry/api@1.9.0) + '@opentelemetry/propagator-jaeger@2.7.1(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 @@ -15112,6 +15607,12 @@ snapshots: transitivePeerDependencies: - supports-color + '@opentelemetry/resources@1.26.0(@opentelemetry/api@1.9.0)': + dependencies: + '@opentelemetry/api': 1.9.0 + '@opentelemetry/core': 2.8.0(@opentelemetry/api@1.9.0) + '@opentelemetry/semantic-conventions': 1.27.0 + '@opentelemetry/resources@2.2.0(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 @@ -15152,6 +15653,19 @@ snapshots: '@opentelemetry/resources': 2.7.1(@opentelemetry/api@1.9.0) '@opentelemetry/semantic-conventions': 1.40.0 + '@opentelemetry/sdk-logs@0.53.0(@opentelemetry/api@1.9.0)': + dependencies: + '@opentelemetry/api': 1.9.0 + '@opentelemetry/api-logs': 0.53.0 + '@opentelemetry/core': 2.8.0(@opentelemetry/api@1.9.0) + '@opentelemetry/resources': 1.26.0(@opentelemetry/api@1.9.0) + + '@opentelemetry/sdk-metrics@1.26.0(@opentelemetry/api@1.9.0)': + dependencies: + '@opentelemetry/api': 1.9.0 + '@opentelemetry/core': 2.8.0(@opentelemetry/api@1.9.0) + '@opentelemetry/resources': 1.26.0(@opentelemetry/api@1.9.0) + '@opentelemetry/sdk-metrics@2.2.0(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 @@ -15201,6 +15715,13 @@ snapshots: transitivePeerDependencies: - supports-color + '@opentelemetry/sdk-trace-base@1.26.0(@opentelemetry/api@1.9.0)': + dependencies: + '@opentelemetry/api': 1.9.0 + '@opentelemetry/core': 2.8.0(@opentelemetry/api@1.9.0) + '@opentelemetry/resources': 1.26.0(@opentelemetry/api@1.9.0) + '@opentelemetry/semantic-conventions': 1.27.0 + '@opentelemetry/sdk-trace-base@2.2.0(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 @@ -15222,6 +15743,16 @@ snapshots: '@opentelemetry/resources': 2.7.1(@opentelemetry/api@1.9.0) '@opentelemetry/semantic-conventions': 1.40.0 + '@opentelemetry/sdk-trace-node@1.26.0(@opentelemetry/api@1.9.0)': + dependencies: + '@opentelemetry/api': 1.9.0 + '@opentelemetry/context-async-hooks': 1.26.0(@opentelemetry/api@1.9.0) + '@opentelemetry/core': 2.8.0(@opentelemetry/api@1.9.0) + '@opentelemetry/propagator-b3': 1.26.0(@opentelemetry/api@1.9.0) + '@opentelemetry/propagator-jaeger': 1.26.0(@opentelemetry/api@1.9.0) + '@opentelemetry/sdk-trace-base': 1.26.0(@opentelemetry/api@1.9.0) + semver: 7.8.0 + '@opentelemetry/sdk-trace-node@2.7.1(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 @@ -15229,6 +15760,8 @@ snapshots: '@opentelemetry/core': 2.8.0(@opentelemetry/api@1.9.0) '@opentelemetry/sdk-trace-base': 2.7.1(@opentelemetry/api@1.9.0) + '@opentelemetry/semantic-conventions@1.27.0': {} + '@opentelemetry/semantic-conventions@1.40.0': {} '@opentelemetry/sql-common@0.41.2(@opentelemetry/api@1.9.0)': @@ -16152,6 +16685,98 @@ snapshots: dependencies: '@redis/client': 5.11.0 + '@redocly/ajv@8.11.2': + dependencies: + fast-deep-equal: 3.1.3 + json-schema-traverse: 1.0.0 + require-from-string: 2.0.2 + uri-js-replace: 1.0.1 + + '@redocly/ajv@8.18.3': + dependencies: + fast-deep-equal: 3.1.3 + fast-uri: 3.1.2 + json-schema-traverse: 1.0.0 + require-from-string: 2.0.2 + + '@redocly/cli@1.34.3(ajv@6.14.0)(encoding@0.1.13)': + dependencies: + '@opentelemetry/api': 1.9.0 + '@opentelemetry/exporter-trace-otlp-http': 0.53.0(@opentelemetry/api@1.9.0) + '@opentelemetry/resources': 1.26.0(@opentelemetry/api@1.9.0) + '@opentelemetry/sdk-trace-node': 1.26.0(@opentelemetry/api@1.9.0) + '@opentelemetry/semantic-conventions': 1.27.0 + '@redocly/config': 0.22.2 + '@redocly/openapi-core': 1.34.3 + '@redocly/respect-core': 1.34.3(ajv@6.14.0) + abort-controller: 3.0.0 + chokidar: 3.6.0 + colorette: 1.4.0 + core-js: 3.48.0 + dotenv: 16.6.1 + form-data: 4.0.5 + get-port-please: 3.2.0 + glob: 7.2.3 + handlebars: 4.7.9 + mobx: 6.16.1 + pluralize: 8.0.0 + react: 19.2.6 + react-dom: 19.2.6(react@19.2.6) + redoc: 2.5.0(core-js@3.48.0)(encoding@0.1.13)(mobx@6.16.1)(react-dom@19.2.6(react@19.2.6))(react@19.2.6)(styled-components@6.4.2(react-dom@19.2.6(react@19.2.6))(react@19.2.6)) + semver: 7.8.0 + simple-websocket: 9.1.0 + styled-components: 6.4.2(react-dom@19.2.6(react@19.2.6))(react@19.2.6) + yargs: 17.0.1 + transitivePeerDependencies: + - ajv + - bufferutil + - css-to-react-native + - encoding + - react-native + - supports-color + - utf-8-validate + + '@redocly/config@0.22.2': {} + + '@redocly/openapi-core@1.34.3': + dependencies: + '@redocly/ajv': 8.18.3 + '@redocly/config': 0.22.2 + colorette: 1.4.0 + https-proxy-agent: 7.0.6 + js-levenshtein: 1.1.6 + js-yaml: 4.1.1 + minimatch: 5.1.9 + pluralize: 8.0.0 + yaml-ast-parser: 0.0.43 + transitivePeerDependencies: + - supports-color + + '@redocly/respect-core@1.34.3(ajv@6.14.0)': + dependencies: + '@faker-js/faker': 7.6.0 + '@redocly/ajv': 8.11.2 + '@redocly/openapi-core': 1.34.3 + better-ajv-errors: 1.2.0(ajv@6.14.0) + colorette: 2.0.20 + concat-stream: 2.0.0 + cookie: 0.7.2 + dotenv: 16.4.5 + form-data: 4.0.0 + jest-diff: 29.7.0 + jest-matcher-utils: 29.7.0 + js-yaml: 4.1.0 + json-pointer: 0.6.2 + jsonpath-plus: 10.4.0 + open: 10.2.0 + openapi-sampler: 1.7.4 + outdent: 0.8.0 + set-cookie-parser: 2.7.2 + undici: 6.27.0 + transitivePeerDependencies: + - ajv + - supports-color + '@rolldown/binding-android-arm64@1.0.3': optional: true @@ -16558,6 +17183,8 @@ snapshots: - encoding - supports-color + '@sinclair/typebox@0.27.10': {} + '@smithy/abort-controller@4.2.11': dependencies: '@smithy/types': 4.13.0 @@ -17859,7 +18486,7 @@ snapshots: '@typescript-eslint/visitor-keys': 8.57.0 debug: 4.4.3 minimatch: 10.2.5 - semver: 7.7.3 + semver: 7.8.0 tinyglobby: 0.2.16 ts-api-utils: 2.4.0(typescript@5.9.3) typescript: 5.9.3 @@ -17874,7 +18501,7 @@ snapshots: '@typescript-eslint/visitor-keys': 8.57.2 debug: 4.4.3 minimatch: 10.2.5 - semver: 7.7.3 + semver: 7.8.0 tinyglobby: 0.2.15 ts-api-utils: 2.4.0(typescript@5.9.3) typescript: 5.9.3 @@ -18648,6 +19275,15 @@ snapshots: bcryptjs@3.0.3: {} + better-ajv-errors@1.2.0(ajv@6.14.0): + dependencies: + '@babel/code-frame': 7.29.7 + '@humanwhocodes/momoa': 2.0.4 + ajv: 6.14.0 + chalk: 4.1.2 + jsonpointer: 5.0.1 + leven: 3.1.0 + better-result@2.9.2: {} better-sqlite3@12.8.0: @@ -18830,6 +19466,8 @@ snapshots: call-bind-apply-helpers: 1.0.2 get-intrinsic: 1.3.0 + call-me-maybe@1.0.2: {} + callsites@3.1.0: {} camelcase-css@2.0.1: {} @@ -18902,6 +19540,8 @@ snapshots: dependencies: clsx: 2.1.1 + classnames@2.5.1: {} + clean-regexp@1.0.0: dependencies: escape-string-regexp: 1.0.5 @@ -18928,6 +19568,12 @@ snapshots: strip-ansi: 6.0.1 wrap-ansi: 6.2.0 + cliui@7.0.4: + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 7.0.0 + cliui@8.0.1: dependencies: string-width: 4.2.3 @@ -18965,6 +19611,8 @@ snapshots: color-support@1.1.3: optional: true + colorette@1.4.0: {} + colorette@2.0.20: {} combined-stream@1.0.8: @@ -18987,6 +19635,13 @@ snapshots: concat-map@0.0.1: {} + concat-stream@2.0.0: + dependencies: + buffer-from: 1.1.2 + inherits: 2.0.4 + readable-stream: 3.6.2 + typedarray: 0.0.6 + concurrently@9.2.1: dependencies: chalk: 4.1.2 @@ -19005,7 +19660,7 @@ snapshots: dot-prop: 10.1.0 env-paths: 3.0.0 json-schema-typed: 8.0.2 - semver: 7.7.3 + semver: 7.8.0 uint8array-extras: 1.5.0 confbox@0.1.8: {} @@ -19205,6 +19860,8 @@ snapshots: decimal.js@10.6.0: {} + decko@1.2.0: {} + decompress-response@6.0.0: dependencies: mimic-response: 3.1.0 @@ -19288,6 +19945,8 @@ snapshots: didyoumean@1.2.2: {} + diff-sequences@29.6.3: {} + diff@4.0.4: optional: true @@ -19357,6 +20016,8 @@ snapshots: dotenv@16.0.3: {} + dotenv@16.4.5: {} + dotenv@16.6.1: {} dotenv@17.3.1: {} @@ -19569,6 +20230,8 @@ snapshots: is-date-object: 1.1.0 is-symbol: 1.1.1 + es6-promise@3.3.1: {} + esbuild@0.28.1: optionalDependencies: '@esbuild/aix-ppc64': 0.28.1 @@ -19872,7 +20535,7 @@ snapshots: read-pkg-up: 7.0.1 regexp-tree: 0.1.27 regjsparser: 0.10.0 - semver: 7.7.3 + semver: 7.8.0 strip-indent: 3.0.0 transitivePeerDependencies: - supports-color @@ -20153,11 +20816,19 @@ snapshots: dependencies: is-callable: 1.2.7 + foreach@2.0.6: {} + foreground-child@3.3.1: dependencies: cross-spawn: 7.0.6 signal-exit: 4.1.0 + form-data@4.0.0: + dependencies: + asynckit: 0.4.0 + combined-stream: 1.0.8 + mime-types: 2.1.35 + form-data@4.0.5: dependencies: asynckit: 0.4.0 @@ -20176,12 +20847,13 @@ snapshots: fraction.js@5.3.4: {} - framer-motion@12.35.2(react-dom@19.2.6(react@19.2.6))(react@19.2.6): + framer-motion@12.35.2(@emotion/is-prop-valid@1.4.0)(react-dom@19.2.6(react@19.2.6))(react@19.2.6): dependencies: motion-dom: 12.35.2 motion-utils: 12.29.2 tslib: 2.8.1 optionalDependencies: + '@emotion/is-prop-valid': 1.4.0 react: 19.2.6 react-dom: 19.2.6(react@19.2.6) @@ -20414,6 +21086,15 @@ snapshots: graphmatch@1.1.1: {} + handlebars@4.7.9: + dependencies: + minimist: 1.2.8 + neo-async: 2.6.2 + source-map: 0.6.1 + wordwrap: 1.0.0 + optionalDependencies: + uglify-js: 3.19.3 + happy-dom@20.8.9: dependencies: '@types/node': 25.4.0 @@ -20539,6 +21220,8 @@ snapshots: http-status-codes@2.3.0: {} + http2-client@1.3.5: {} + https-proxy-agent@5.0.1: dependencies: agent-base: 6.0.2 @@ -20884,6 +21567,22 @@ snapshots: javascript-natural-sort@0.7.1: {} + jest-diff@29.7.0: + dependencies: + chalk: 4.1.2 + diff-sequences: 29.6.3 + jest-get-type: 29.6.3 + pretty-format: 29.7.0 + + jest-get-type@29.6.3: {} + + jest-matcher-utils@29.7.0: + dependencies: + chalk: 4.1.2 + jest-diff: 29.7.0 + jest-get-type: 29.6.3 + pretty-format: 29.7.0 + jest-worker@27.5.1: dependencies: '@types/node': 25.4.0 @@ -20908,12 +21607,18 @@ snapshots: js-cookie@3.0.7: {} + js-levenshtein@1.1.6: {} + js-md4@0.3.2: {} js-tokens@10.0.0: {} js-tokens@4.0.0: {} + js-yaml@4.1.0: + dependencies: + argparse: 2.0.1 + js-yaml@4.1.1: dependencies: argparse: 2.0.1 @@ -20944,6 +21649,8 @@ snapshots: transitivePeerDependencies: - '@noble/hashes' + jsep@1.4.0: {} + jsesc@0.5.0: {} jsesc@3.1.0: {} @@ -20958,6 +21665,10 @@ snapshots: json-parse-even-better-errors@2.3.1: {} + json-pointer@0.6.2: + dependencies: + foreach: 2.0.6 + json-schema-traverse@0.4.1: {} json-schema-traverse@1.0.0: {} @@ -20980,6 +21691,14 @@ snapshots: optionalDependencies: graceful-fs: 4.2.11 + jsonpath-plus@10.4.0: + dependencies: + '@jsep-plugin/assignment': 1.3.0(jsep@1.4.0) + '@jsep-plugin/regex': 1.0.4(jsep@1.4.0) + jsep: 1.4.0 + + jsonpointer@5.0.1: {} + jsonwebtoken@9.0.3: dependencies: jws: 4.0.1 @@ -21031,6 +21750,8 @@ snapshots: leac@0.6.0: {} + leven@3.1.0: {} + levn@0.4.1: dependencies: prelude-ls: 1.2.1 @@ -21207,6 +21928,8 @@ snapshots: dependencies: react: 19.2.6 + lunr@2.3.9: {} + luxon@3.7.2: {} lz-string@1.5.0: {} @@ -21251,6 +21974,8 @@ snapshots: - supports-color optional: true + mark.js@8.11.1: {} + markdown-it@14.1.1: dependencies: argparse: 2.0.1 @@ -21262,6 +21987,8 @@ snapshots: marked@15.0.12: {} + marked@4.3.0: {} + math-intrinsics@1.1.0: {} mcp-handler@1.1.0(@modelcontextprotocol/sdk@1.26.0(zod@4.3.6))(next@16.2.6(@opentelemetry/api@1.9.0)(@playwright/test@1.58.2)(react-dom@19.2.6(react@19.2.6))(react@19.2.6)): @@ -21326,6 +22053,10 @@ snapshots: dependencies: brace-expansion: 1.1.14 + minimatch@5.1.9: + dependencies: + brace-expansion: 2.1.0 + minimatch@9.0.9: dependencies: brace-expansion: 2.1.0 @@ -21400,6 +22131,24 @@ snapshots: dependencies: obliterator: 1.6.1 + mobx-react-lite@4.1.1(mobx@6.16.1)(react-dom@19.2.6(react@19.2.6))(react@19.2.6): + dependencies: + mobx: 6.16.1 + react: 19.2.6 + use-sync-external-store: 1.6.0(react@19.2.6) + optionalDependencies: + react-dom: 19.2.6(react@19.2.6) + + mobx-react@9.2.2(mobx@6.16.1)(react-dom@19.2.6(react@19.2.6))(react@19.2.6): + dependencies: + mobx: 6.16.1 + mobx-react-lite: 4.1.1(mobx@6.16.1)(react-dom@19.2.6(react@19.2.6))(react@19.2.6) + react: 19.2.6 + optionalDependencies: + react-dom: 19.2.6(react@19.2.6) + + mobx@6.16.1: {} + module-details-from-path@1.0.4: {} mongodb-connection-string-url@7.0.1: @@ -21579,6 +22328,10 @@ snapshots: node-domexception@1.0.0: {} + node-fetch-h2@2.3.0: + dependencies: + http2-client: 1.3.5 + node-fetch@2.7.0(encoding@0.1.13): dependencies: whatwg-url: 5.0.0 @@ -21625,6 +22378,10 @@ snapshots: css-select: 5.2.2 he: 1.2.0 + node-readfiles@0.2.0: + dependencies: + es6-promise: 3.3.1 + node-releases@2.0.27: {} node-releases@2.0.45: {} @@ -21663,6 +22420,37 @@ snapshots: pathe: 2.0.3 tinyexec: 1.0.2 + oas-kit-common@1.0.8: + dependencies: + fast-safe-stringify: 2.1.1 + + oas-linter@3.2.2: + dependencies: + '@exodus/schemasafe': 1.3.0 + should: 13.2.3 + yaml: 1.10.3 + + oas-resolver@2.5.6: + dependencies: + node-fetch-h2: 2.3.0 + oas-kit-common: 1.0.8 + reftools: 1.1.9 + yaml: 1.10.3 + yargs: 17.7.2 + + oas-schema-walker@1.1.5: {} + + oas-validator@5.0.8: + dependencies: + call-me-maybe: 1.0.2 + oas-kit-common: 1.0.8 + oas-linter: 3.2.2 + oas-resolver: 2.5.6 + oas-schema-walker: 1.1.5 + reftools: 1.1.9 + should: 13.2.3 + yaml: 1.10.3 + oauth4webapi@3.8.6: {} oauth@0.9.15: {} @@ -21756,6 +22544,12 @@ snapshots: powershell-utils: 0.1.0 wsl-utils: 0.3.1 + openapi-sampler@1.7.4: + dependencies: + '@types/json-schema': 7.0.15 + fast-xml-parser: 5.7.0 + json-pointer: 0.6.2 + openid-client@5.7.1: dependencies: jose: 4.15.9 @@ -21806,6 +22600,8 @@ snapshots: '@otplib/preset-default': 12.0.1 '@otplib/preset-v11': 12.0.1 + outdent@0.8.0: {} + own-keys@1.0.1: dependencies: get-intrinsic: 1.3.0 @@ -21849,7 +22645,7 @@ snapshots: parse-json@5.2.0: dependencies: - '@babel/code-frame': 7.29.0 + '@babel/code-frame': 7.29.7 error-ex: 1.3.4 json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.2.4 @@ -21903,6 +22699,8 @@ snapshots: perfect-debounce@2.1.0: {} + perfect-scrollbar@1.5.6: {} + pg-cloudflare@1.3.0: optional: true @@ -22034,6 +22832,10 @@ snapshots: pngjs@6.0.0: {} + polished@4.3.1: + dependencies: + '@babel/runtime': 7.28.6 + possible-typed-array-names@1.1.0: {} postcss-import@15.1.0(postcss@8.5.14): @@ -22168,6 +22970,12 @@ snapshots: ansi-styles: 5.2.0 react-is: 17.0.2 + pretty-format@29.7.0: + dependencies: + '@jest/schemas': 29.6.3 + ansi-styles: 5.2.0 + react-is: 18.3.1 + pretty-format@3.8.0: {} prisma-json-types-generator@4.1.1(@prisma/client@7.8.0(prisma@7.8.0(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(better-sqlite3@12.8.0)(magicast@0.5.2)(react-dom@19.2.6(react@19.2.6))(react@19.2.6)(typescript@5.9.3))(typescript@5.9.3))(prisma@7.8.0(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(better-sqlite3@12.8.0)(magicast@0.5.2)(react-dom@19.2.6(react@19.2.6))(react@19.2.6)(typescript@5.9.3))(typescript@5.9.3): @@ -22299,6 +23107,10 @@ snapshots: ramda@0.27.2: {} + randombytes@2.1.0: + dependencies: + safe-buffer: 5.2.1 + range-parser@1.2.1: {} raw-body@3.0.2: @@ -22492,6 +23304,12 @@ snapshots: optionalDependencies: '@types/react': 19.2.14 + react-tabs@6.1.1(react@19.2.6): + dependencies: + clsx: 2.1.1 + prop-types: 15.8.1 + react: 19.2.6 + react-transition-group@4.4.5(react-dom@19.2.6(react@19.2.6))(react@19.2.6): dependencies: '@babel/runtime': 7.28.6 @@ -22638,6 +23456,39 @@ snapshots: transitivePeerDependencies: - '@node-rs/xxhash' + redoc@2.5.0(core-js@3.48.0)(encoding@0.1.13)(mobx@6.16.1)(react-dom@19.2.6(react@19.2.6))(react@19.2.6)(styled-components@6.4.2(react-dom@19.2.6(react@19.2.6))(react@19.2.6)): + dependencies: + '@redocly/openapi-core': 1.34.3 + classnames: 2.5.1 + core-js: 3.48.0 + decko: 1.2.0 + dompurify: 3.4.9 + eventemitter3: 5.0.1 + json-pointer: 0.6.2 + lunr: 2.3.9 + mark.js: 8.11.1 + marked: 4.3.0 + mobx: 6.16.1 + mobx-react: 9.2.2(mobx@6.16.1)(react-dom@19.2.6(react@19.2.6))(react@19.2.6) + openapi-sampler: 1.7.4 + path-browserify: 1.0.1 + perfect-scrollbar: 1.5.6 + polished: 4.3.1 + prismjs: 1.30.0 + prop-types: 15.8.1 + react: 19.2.6 + react-dom: 19.2.6(react@19.2.6) + react-tabs: 6.1.1(react@19.2.6) + slugify: 1.4.7 + stickyfill: 1.1.1 + styled-components: 6.4.2(react-dom@19.2.6(react@19.2.6))(react@19.2.6) + swagger2openapi: 7.0.8(encoding@0.1.13) + url-template: 2.0.8 + transitivePeerDependencies: + - encoding + - react-native + - supports-color + reflect-metadata@0.2.2: {} reflect.getprototypeof@1.0.10: @@ -22651,6 +23502,8 @@ snapshots: get-proto: 1.0.1 which-builtin-type: 1.2.1 + reftools@1.1.9: {} + regexp-tree@0.1.27: {} regexp.prototype.flags@1.5.4: @@ -22922,6 +23775,8 @@ snapshots: set-blocking@2.0.0: {} + set-cookie-parser@2.7.2: {} + set-function-length@1.2.2: dependencies: define-data-property: 1.1.4 @@ -22993,6 +23848,32 @@ snapshots: shell-quote@1.8.4: {} + should-equal@2.0.0: + dependencies: + should-type: 1.4.0 + + should-format@3.0.3: + dependencies: + should-type: 1.4.0 + should-type-adaptors: 1.1.0 + + should-type-adaptors@1.1.0: + dependencies: + should-type: 1.4.0 + should-util: 1.0.1 + + should-type@1.4.0: {} + + should-util@1.0.1: {} + + should@13.2.3: + dependencies: + should-equal: 2.0.0 + should-format: 3.0.3 + should-type: 1.4.0 + should-type-adaptors: 1.1.0 + should-util: 1.0.1 + side-channel-list@1.0.0: dependencies: es-errors: 1.3.0 @@ -23039,6 +23920,18 @@ snapshots: once: 1.4.0 simple-concat: 1.0.1 + simple-websocket@9.1.0: + dependencies: + debug: 4.4.3 + queue-microtask: 1.2.3 + randombytes: 2.1.0 + readable-stream: 3.6.2 + ws: 7.5.11 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + sisteransi@1.0.5: {} slash@3.0.0: {} @@ -23053,6 +23946,8 @@ snapshots: ansi-styles: 6.2.3 is-fullwidth-code-point: 5.1.0 + slugify@1.4.7: {} + smart-buffer@4.2.0: optional: true @@ -23215,6 +24110,8 @@ snapshots: stdin-discarder@0.2.2: {} + stickyfill@1.1.1: {} + stop-iteration-iterator@1.1.0: dependencies: es-errors: 1.3.0 @@ -23361,6 +24258,15 @@ snapshots: stubborn-utils@1.0.2: {} + styled-components@6.4.2(react-dom@19.2.6(react@19.2.6))(react@19.2.6): + dependencies: + '@emotion/is-prop-valid': 1.4.0 + csstype: 3.2.3 + react: 19.2.6 + stylis: 4.3.6 + optionalDependencies: + react-dom: 19.2.6(react@19.2.6) + styled-jsx@5.1.6(react@19.2.6): dependencies: client-only: 0.0.1 @@ -23388,6 +24294,22 @@ snapshots: supports-preserve-symlinks-flag@1.0.0: {} + swagger2openapi@7.0.8(encoding@0.1.13): + dependencies: + call-me-maybe: 1.0.2 + node-fetch: 2.7.0(encoding@0.1.13) + node-fetch-h2: 2.3.0 + node-readfiles: 0.2.0 + oas-kit-common: 1.0.8 + oas-resolver: 2.5.6 + oas-schema-walker: 1.1.5 + oas-validator: 5.0.8 + reftools: 1.1.9 + yaml: 1.10.3 + yargs: 17.7.2 + transitivePeerDependencies: + - encoding + symbol-tree@3.2.4: {} synckit@0.11.11: @@ -23738,6 +24660,8 @@ snapshots: possible-typed-array-names: 1.1.0 reflect.getprototypeof: 1.0.10 + typedarray@0.0.6: {} + typeorm@0.3.28(better-sqlite3@12.8.0)(ioredis@5.8.1)(mongodb@7.1.0(@aws-sdk/credential-providers@3.1013.0)(socks@2.8.7))(mssql@12.2.1)(mysql2@3.20.0(@types/node@25.4.0))(pg@8.20.0)(redis@4.7.1)(sqlite3@5.1.7)(ts-node@10.9.2(@types/node@25.4.0)(typescript@5.9.3)): dependencies: '@sqltools/formatter': 1.2.5 @@ -23785,6 +24709,9 @@ snapshots: ufo@1.6.1: {} + uglify-js@3.19.3: + optional: true + uint8array-extras@1.5.0: {} unbox-primitive@1.1.0: @@ -23798,6 +24725,8 @@ snapshots: undici-types@7.18.2: {} + undici@6.27.0: {} + undici@7.24.8: {} undici@7.25.0: {} @@ -23859,6 +24788,8 @@ snapshots: escalade: 3.2.0 picocolors: 1.1.1 + uri-js-replace@1.0.1: {} + uri-js@4.4.1: dependencies: punycode: 2.3.1 @@ -24260,6 +25191,8 @@ snapshots: word-wrap@1.2.5: {} + wordwrap@1.0.0: {} + wrap-ansi@6.2.0: dependencies: ansi-styles: 4.3.0 @@ -24286,6 +25219,8 @@ snapshots: wrappy@1.0.2: {} + ws@7.5.11: {} + ws@8.21.0: {} wsl-utils@0.1.0: @@ -24340,6 +25275,10 @@ snapshots: yallist@4.0.0: {} + yaml-ast-parser@0.0.43: {} + + yaml@1.10.3: {} + yaml@2.9.0: {} yargs-parser@18.1.3: @@ -24347,6 +25286,8 @@ snapshots: camelcase: 5.3.1 decamelize: 1.2.0 + yargs-parser@20.2.9: {} + yargs-parser@21.1.1: {} yargs-parser@22.0.0: {} @@ -24365,6 +25306,16 @@ snapshots: y18n: 4.0.3 yargs-parser: 18.1.3 + yargs@17.0.1: + dependencies: + cliui: 7.0.4 + escalade: 3.2.0 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + string-width: 4.2.3 + y18n: 5.0.8 + yargs-parser: 20.2.9 + yargs@17.7.2: dependencies: cliui: 8.0.1