Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

1.1 KB
Raw Blame
/**
 * Generated by orval v8.14.0 🍺
 * Do not edit manually.
 * PostHog API - 1 ops
 * OpenAPI spec version: 1.0.0
 */
import { z as zod } from 'zod'

import { WidgetDateRange } from './widgetDateRange.zod'

export const surveyResultsWidgetConfigLimitDefault = 10
export const surveyResultsWidgetConfigLimitMax = 25

export const SurveyResultsWidgetConfig = /* @__PURE__ */ zod.object({
    dateRange: zod
        .union([WidgetDateRange, zod.null()])
        .optional()
        .describe("Null or omitted means all time (the survey's full lifetime)."),
    surveyId: zod
        .union([zod.string(), zod.null()])
        .optional()
        .describe('Survey to show performance stats and recent responses for. Null until the user picks one.'),
    limit: zod
        .number()
        .min(1)
        .max(surveyResultsWidgetConfigLimitMax)
        .default(surveyResultsWidgetConfigLimitDefault)
        .describe('Maximum number of recent responses to return.'),
})

export type SurveyResultsWidgetConfig = zod.input<typeof SurveyResultsWidgetConfig>
export type SurveyResultsWidgetConfigOutput = zod.output<typeof SurveyResultsWidgetConfig>