Skip to main content
Glama
surveys-utils.d.ts2.74 kB
import { VNode } from 'preact'; import { PostHog } from '../../posthog-core'; import { MultipleSurveyQuestion, Survey, SurveyAppearance, SurveyQuestion } from '../../posthog-surveys-types'; export declare const SURVEY_DEFAULT_Z_INDEX = 2147483647; export declare function getFontFamily(fontFamily?: string): string; export declare function getSurveyResponseKey(questionId: string): string; export declare const style: (appearance: SurveyAppearance | null) => string; export declare function getContrastingTextColor(color?: string): "black" | "white"; export declare function getTextColor(el: HTMLElement): "black" | "white"; export declare const defaultSurveyAppearance: SurveyAppearance; export declare const defaultBackgroundColor = "#eeeded"; export declare const createShadow: (styleSheet: string, surveyId: string, element?: Element, posthog?: PostHog) => ShadowRoot; export declare const sendSurveyEvent: (responses: Record<string, string | number | string[] | null> | undefined, survey: Survey, posthog?: PostHog) => void; export declare const dismissedSurveyEvent: (survey: Survey, posthog?: PostHog, readOnly?: boolean) => void; export declare const shuffle: (array: any[]) => any[]; export declare const getDisplayOrderChoices: (question: MultipleSurveyQuestion) => string[]; export declare const getDisplayOrderQuestions: (survey: Survey) => SurveyQuestion[]; export declare const hasEvents: (survey: Pick<Survey, "conditions">) => boolean; export declare const canActivateRepeatedly: (survey: Pick<Survey, "schedule" | "type" | "conditions">) => boolean; /** * getSurveySeen checks local storage for the surveySeen Key a * and overrides this value if the survey can be repeatedly activated by its events. * @param survey */ export declare const getSurveySeen: (survey: Survey) => boolean; export declare const getSurveySeenKey: (survey: Survey) => string; export declare const getSurveySeenStorageKeys: () => string[]; export declare const hasWaitPeriodPassed: (lastSeenSurveyDate: string | null, waitPeriodInDays: number | undefined) => boolean; interface SurveyContextProps { isPreviewMode: boolean; previewPageIndex: number | undefined; onPopupSurveyDismissed: () => void; isPopup: boolean; onPreviewSubmit: (res: string | string[] | number | null) => void; onPopupSurveySent: () => void; } export declare const SurveyContext: import("preact").Context<SurveyContextProps>; interface RenderProps { component: VNode<{ className: string; }>; children: string; renderAsHtml?: boolean; style?: React.CSSProperties; } export declare const renderChildrenAsTextOrHtml: ({ component, children, renderAsHtml, style }: RenderProps) => VNode<{ className: string; }>; export {};

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sadiuysal/mem0-mcp-server-ts'

If you have feedback or need assistance with the MCP directory API, please join our Discord server