posthog-js 1.304.0 → 1.305.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3018,10 +3018,27 @@ interface JSONContent {
3018
3018
  }[];
3019
3019
  text?: string;
3020
3020
  }
3021
+ type ProductTourSurveyQuestionType = 'open' | 'rating';
3022
+ interface ProductTourSurveyQuestion {
3023
+ type: ProductTourSurveyQuestionType;
3024
+ questionText: string;
3025
+ /** Rating display type - emoji or number */
3026
+ display?: 'emoji' | 'number';
3027
+ /** Rating scale - 3 or 5 for emoji, 5 or 10 for number */
3028
+ scale?: 3 | 5 | 10;
3029
+ /** Label for low end of rating scale (e.g., "Not likely") */
3030
+ lowerBoundLabel?: string;
3031
+ /** Label for high end of rating scale (e.g., "Very likely") */
3032
+ upperBoundLabel?: string;
3033
+ }
3021
3034
  interface ProductTourStep {
3022
3035
  id: string;
3023
3036
  selector?: string;
3024
3037
  content: JSONContent | null;
3038
+ /** Inline survey question config - if present, this is a survey step */
3039
+ survey?: ProductTourSurveyQuestion;
3040
+ /** ID of the auto-created survey for this step (set by backend) */
3041
+ linkedSurveyId?: string;
3025
3042
  }
3026
3043
  interface ProductTourConditions {
3027
3044
  url?: string;
@@ -4976,4 +4993,4 @@ declare class PostHog {
4976
4993
  declare const posthog: PostHog;
4977
4994
 
4978
4995
  export { COPY_AUTOCAPTURE_EVENT, Compression, DEFAULT_PRODUCT_TOUR_APPEARANCE, DisplaySurveyType, PostHog, SurveyEventName, SurveyEventProperties, SurveyEventType, SurveyPosition, SurveyQuestionBranchingType, SurveyQuestionType, SurveySchedule, SurveyTabPosition, SurveyType, SurveyWidgetType, posthog as default, posthog, severityLevels };
4979
- export type { ActionStepStringMatching, ActionStepType, AutocaptureCompatibleElement, AutocaptureConfig, BasicSurveyQuestion, BeforeSendFn, BootstrapConfig, Breaker, CaptureOptions, CaptureResult, CapturedNetworkRequest, ConfigDefaults, DeadClickCandidate, DeadClicksAutoCaptureConfig, DisplaySurveyOptions, DomAutocaptureEvents, EarlyAccessFeature, EarlyAccessFeatureCallback, EarlyAccessFeatureResponse, EarlyAccessFeatureStage, ErrorEventArgs, ErrorTrackingOptions, ErrorTrackingSuppressionRule, ErrorTrackingSuppressionRuleValue, EvaluationReason, EventHandler, EventName, ExceptionAutoCaptureConfig, ExternalIntegrationKind, FeatureFlagDetail, FeatureFlagMetadata, FeatureFlagsCallback, FlagVariant, FlagsResponse, Headers, HeatmapConfig, InitiatorType, JSONContent, JsonRecord, JsonType, KnownEventName, LinkSurveyQuestion, MultipleSurveyQuestion, NetworkRecordOptions, NetworkRequest, OverrideConfig, PerformanceCaptureConfig, PersistentStore, PostHogConfig, ProductTour, ProductTourAppearance, ProductTourCallback, ProductTourConditions, ProductTourDismissReason, ProductTourRenderReason, ProductTourSelectorError, ProductTourStep, Properties, Property, PropertyFilters, PropertyMatchType, QueuedRequestWithOptions, RageclickConfig, RatingSurveyQuestion, RemoteConfig, RemoteConfigFeatureFlagCallback, RequestCallback, RequestQueueConfig, RequestResponse, RequestWithOptions, RetriableRequestWithOptions, SessionIdChangedCallback, SessionRecordingCanvasOptions, SessionRecordingOptions, SessionRecordingPersistedConfig, SessionRecordingRemoteConfig, SessionRecordingUrlTrigger, SessionStartReason, SeverityLevel, SiteApp, SiteAppGlobals, SiteAppLoader, SnippetArrayItem, SupportedWebVitalsMetrics, Survey, SurveyActionType, SurveyAppearance, SurveyCallback, SurveyConfig, SurveyElement, SurveyEventWithFilters, SurveyQuestion, SurveyQuestionDescriptionContentType, SurveyRenderReason, SurveyWithTypeAndAppearance, ToolbarParams, ToolbarSource, ToolbarUserIntent, ToolbarVersion };
4996
+ export type { ActionStepStringMatching, ActionStepType, AutocaptureCompatibleElement, AutocaptureConfig, BasicSurveyQuestion, BeforeSendFn, BootstrapConfig, Breaker, CaptureOptions, CaptureResult, CapturedNetworkRequest, ConfigDefaults, DeadClickCandidate, DeadClicksAutoCaptureConfig, DisplaySurveyOptions, DomAutocaptureEvents, EarlyAccessFeature, EarlyAccessFeatureCallback, EarlyAccessFeatureResponse, EarlyAccessFeatureStage, ErrorEventArgs, ErrorTrackingOptions, ErrorTrackingSuppressionRule, ErrorTrackingSuppressionRuleValue, EvaluationReason, EventHandler, EventName, ExceptionAutoCaptureConfig, ExternalIntegrationKind, FeatureFlagDetail, FeatureFlagMetadata, FeatureFlagsCallback, FlagVariant, FlagsResponse, Headers, HeatmapConfig, InitiatorType, JSONContent, JsonRecord, JsonType, KnownEventName, LinkSurveyQuestion, MultipleSurveyQuestion, NetworkRecordOptions, NetworkRequest, OverrideConfig, PerformanceCaptureConfig, PersistentStore, PostHogConfig, ProductTour, ProductTourAppearance, ProductTourCallback, ProductTourConditions, ProductTourDismissReason, ProductTourRenderReason, ProductTourSelectorError, ProductTourStep, ProductTourSurveyQuestion, ProductTourSurveyQuestionType, Properties, Property, PropertyFilters, PropertyMatchType, QueuedRequestWithOptions, RageclickConfig, RatingSurveyQuestion, RemoteConfig, RemoteConfigFeatureFlagCallback, RequestCallback, RequestQueueConfig, RequestResponse, RequestWithOptions, RetriableRequestWithOptions, SessionIdChangedCallback, SessionRecordingCanvasOptions, SessionRecordingOptions, SessionRecordingPersistedConfig, SessionRecordingRemoteConfig, SessionRecordingUrlTrigger, SessionStartReason, SeverityLevel, SiteApp, SiteAppGlobals, SiteAppLoader, SnippetArrayItem, SupportedWebVitalsMetrics, Survey, SurveyActionType, SurveyAppearance, SurveyCallback, SurveyConfig, SurveyElement, SurveyEventWithFilters, SurveyQuestion, SurveyQuestionDescriptionContentType, SurveyRenderReason, SurveyWithTypeAndAppearance, ToolbarParams, ToolbarSource, ToolbarUserIntent, ToolbarVersion };