From 51253a0dfcbb7d4010436b603eadaee3c5575428 Mon Sep 17 00:00:00 2001 From: Phani Raj Date: Fri, 11 Oct 2024 12:22:22 -0500 Subject: [PATCH] feat(surveys): API for team level survey config (#25542) This PR adds a new survey_config property to the Team database table and updates its corresponding controllers and tests. The /surveys endpoint used by posthog-js is also updated to support retrieving any team level survey config that the library might need to use to customize appearance. Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> --- latest_migrations.manifest | 2 +- posthog/api/project.py | 33 +++++++++ posthog/api/survey.py | 20 +++++- posthog/api/team.py | 34 +++++++++ .../api/test/__snapshots__/test_action.ambr | 3 + .../test/__snapshots__/test_annotation.ambr | 3 + .../api/test/__snapshots__/test_decide.ambr | 12 ++++ .../test_early_access_feature.ambr | 2 + .../api/test/__snapshots__/test_element.ambr | 1 + .../test/__snapshots__/test_feature_flag.ambr | 8 +++ .../api/test/__snapshots__/test_insight.ambr | 11 +++ .../test_organization_feature_flag.ambr | 12 ++++ .../test/__snapshots__/test_preflight.ambr | 1 + .../api/test/__snapshots__/test_survey.ambr | 1 + .../__snapshots__/test_dashboard.ambr | 69 +++++++++++++++++++ .../__snapshots__/test_notebook.ambr | 4 ++ posthog/api/test/test_survey.py | 21 +++++- posthog/api/test/test_team.py | 40 +++++++++-- posthog/migrations/0487_team_survey_config.py | 17 +++++ .../test/__snapshots__/test_filter.ambr | 5 ++ posthog/models/team/team.py | 1 + .../test_session_recordings.ambr | 35 ++++++++++ .../test_process_scheduled_changes.ambr | 2 + .../test/__snapshots__/test_feature_flag.ambr | 3 + 24 files changed, 333 insertions(+), 7 deletions(-) create mode 100644 posthog/migrations/0487_team_survey_config.py diff --git a/latest_migrations.manifest b/latest_migrations.manifest index ed247df68feb6..bd99d5cde082a 100644 --- a/latest_migrations.manifest +++ b/latest_migrations.manifest @@ -5,7 +5,7 @@ contenttypes: 0002_remove_content_type_name ee: 0016_rolemembership_organization_member otp_static: 0002_throttling otp_totp: 0002_auto_20190420_0723 -posthog: 0486_cohort_last_error_at +posthog: 0487_team_survey_config sessions: 0001_initial social_django: 0010_uid_db_index two_factor: 0007_auto_20201201_1019 diff --git a/posthog/api/project.py b/posthog/api/project.py index e517d20a3c826..af933e440b5a3 100644 --- a/posthog/api/project.py +++ b/posthog/api/project.py @@ -98,6 +98,7 @@ class Meta: "session_recording_linked_flag", # Compat with TeamSerializer "session_recording_network_payload_capture_config", # Compat with TeamSerializer "session_replay_config", # Compat with TeamSerializer + "survey_config", "access_control", # Compat with TeamSerializer "week_start_day", # Compat with TeamSerializer "primary_dashboard", # Compat with TeamSerializer @@ -159,6 +160,7 @@ class Meta: "session_recording_linked_flag", "session_recording_network_payload_capture_config", "session_replay_config", + "survey_config", "access_control", "week_start_day", "primary_dashboard", @@ -269,6 +271,37 @@ def update(self, instance: Project, validated_data: dict[str, Any]) -> Project: team_before_update = team.__dict__.copy() project_before_update = instance.__dict__.copy() + if "survey_config" in validated_data: + if team.survey_config is not None and validated_data.get("survey_config") is not None: + validated_data["survey_config"] = { + **team.survey_config, + **validated_data["survey_config"], + } + + if validated_data.get("survey_config") is None: + del team_before_update["survey_config"] + + survey_config_changes_between = dict_changes_between( + "Survey", + team_before_update.get("survey_config", {}), + validated_data.get("survey_config", {}), + use_field_exclusions=True, + ) + if survey_config_changes_between: + log_activity( + organization_id=cast(UUIDT, instance.organization_id), + team_id=instance.pk, + user=cast(User, self.context["request"].user), + was_impersonated=is_impersonated_session(request), + scope="Survey", + item_id="#", + activity="updated", + detail=Detail( + name="Survey Config", + changes=survey_config_changes_between, + ), + ) + if ( "session_replay_config" in validated_data and validated_data["session_replay_config"] is not None diff --git a/posthog/api/survey.py b/posthog/api/survey.py index 4e3bb5356ef1b..b2faf7a419186 100644 --- a/posthog/api/survey.py +++ b/posthog/api/survey.py @@ -646,6 +646,12 @@ def activity(self, request: request.Request, **kwargs): return activity_page_response(activity_page, limit, page, request) +class SurveyConfigSerializer(serializers.ModelSerializer): + class Meta: + model = Team + fields = ["survey_config"] + + class SurveyAPISerializer(serializers.ModelSerializer): """ Serializer for the exposed /api/surveys endpoint, to be used in posthog-js and for headless APIs. @@ -732,7 +738,19 @@ def surveys(request: Request): many=True, ).data - return cors_response(request, JsonResponse({"surveys": surveys})) + serialized_survey_config: dict[str, Any] = {} + if team.survey_config is not None: + serialized_survey_config = SurveyConfigSerializer(team).data + + return cors_response( + request, + JsonResponse( + { + "surveys": surveys, + "survey_config": serialized_survey_config.get("survey_config", None), + } + ), + ) @contextmanager diff --git a/posthog/api/team.py b/posthog/api/team.py index 182eec7b1a59a..c37054c3bedc5 100644 --- a/posthog/api/team.py +++ b/posthog/api/team.py @@ -104,6 +104,7 @@ class Meta: "session_recording_linked_flag", "session_recording_network_payload_capture_config", "session_replay_config", + "survey_config", "recording_domains", "inject_web_apps", "surveys_opt_in", @@ -156,6 +157,7 @@ class Meta: "session_recording_linked_flag", "session_recording_network_payload_capture_config", "session_replay_config", + "survey_config", "effective_membership_level", "access_control", "week_start_day", @@ -328,6 +330,38 @@ def create(self, validated_data: dict[str, Any], **kwargs) -> Team: def update(self, instance: Team, validated_data: dict[str, Any]) -> Team: before_update = instance.__dict__.copy() + if "survey_config" in validated_data: + if instance.survey_config is not None and validated_data.get("survey_config") is not None: + validated_data["survey_config"] = { + **instance.survey_config, + **validated_data["survey_config"], + } + + if validated_data.get("survey_config") is None: + del before_update["survey_config"] + + survey_config_changes_between = dict_changes_between( + "Survey", + before_update.get("survey_config", {}), + validated_data.get("survey_config", {}), + use_field_exclusions=True, + ) + + if survey_config_changes_between: + log_activity( + organization_id=cast(UUIDT, instance.organization_id), + team_id=instance.pk, + user=cast(User, self.context["request"].user), + was_impersonated=is_impersonated_session(request), + scope="Survey", + item_id="", + activity="updated", + detail=Detail( + name="Team Survey Config", + changes=survey_config_changes_between, + ), + ) + if ( "session_replay_config" in validated_data and validated_data["session_replay_config"] is not None diff --git a/posthog/api/test/__snapshots__/test_action.ambr b/posthog/api/test/__snapshots__/test_action.ambr index e31bb6984783f..22b2c810b3c44 100644 --- a/posthog/api/test/__snapshots__/test_action.ambr +++ b/posthog/api/test/__snapshots__/test_action.ambr @@ -58,6 +58,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -147,6 +148,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -468,6 +470,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", diff --git a/posthog/api/test/__snapshots__/test_annotation.ambr b/posthog/api/test/__snapshots__/test_annotation.ambr index ebf0634a89a6e..4180dd11bd55c 100644 --- a/posthog/api/test/__snapshots__/test_annotation.ambr +++ b/posthog/api/test/__snapshots__/test_annotation.ambr @@ -58,6 +58,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -115,6 +116,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -369,6 +371,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", diff --git a/posthog/api/test/__snapshots__/test_decide.ambr b/posthog/api/test/__snapshots__/test_decide.ambr index 7d14f67211293..6c941c07a93cb 100644 --- a/posthog/api/test/__snapshots__/test_decide.ambr +++ b/posthog/api/test/__snapshots__/test_decide.ambr @@ -108,6 +108,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -173,6 +174,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -239,6 +241,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -386,6 +389,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -461,6 +465,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -592,6 +597,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -668,6 +674,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -765,6 +772,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -920,6 +928,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1017,6 +1026,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1178,6 +1188,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1292,6 +1303,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", diff --git a/posthog/api/test/__snapshots__/test_early_access_feature.ambr b/posthog/api/test/__snapshots__/test_early_access_feature.ambr index ca93bf4cc878d..d56fba9679c00 100644 --- a/posthog/api/test/__snapshots__/test_early_access_feature.ambr +++ b/posthog/api/test/__snapshots__/test_early_access_feature.ambr @@ -26,6 +26,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -168,6 +169,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", diff --git a/posthog/api/test/__snapshots__/test_element.ambr b/posthog/api/test/__snapshots__/test_element.ambr index b270c6665a3ea..add01fdba35fa 100644 --- a/posthog/api/test/__snapshots__/test_element.ambr +++ b/posthog/api/test/__snapshots__/test_element.ambr @@ -58,6 +58,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", diff --git a/posthog/api/test/__snapshots__/test_feature_flag.ambr b/posthog/api/test/__snapshots__/test_feature_flag.ambr index 7be6faab8299e..db27b28fd8ee2 100644 --- a/posthog/api/test/__snapshots__/test_feature_flag.ambr +++ b/posthog/api/test/__snapshots__/test_feature_flag.ambr @@ -467,6 +467,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -675,6 +676,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1043,6 +1045,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1184,6 +1187,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1484,6 +1488,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1601,6 +1606,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1672,6 +1678,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1736,6 +1743,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", diff --git a/posthog/api/test/__snapshots__/test_insight.ambr b/posthog/api/test/__snapshots__/test_insight.ambr index 241c537bf4612..1882356bb6d29 100644 --- a/posthog/api/test/__snapshots__/test_insight.ambr +++ b/posthog/api/test/__snapshots__/test_insight.ambr @@ -697,6 +697,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -754,6 +755,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -887,6 +889,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1131,6 +1134,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1283,6 +1287,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1421,6 +1426,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1538,6 +1544,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1690,6 +1697,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1782,6 +1790,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1873,6 +1882,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1937,6 +1947,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", diff --git a/posthog/api/test/__snapshots__/test_organization_feature_flag.ambr b/posthog/api/test/__snapshots__/test_organization_feature_flag.ambr index 91cb4c5b70902..cae9ed3e59c63 100644 --- a/posthog/api/test/__snapshots__/test_organization_feature_flag.ambr +++ b/posthog/api/test/__snapshots__/test_organization_feature_flag.ambr @@ -107,6 +107,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -219,6 +220,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -311,6 +313,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -375,6 +378,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -517,6 +521,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -581,6 +586,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -673,6 +679,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -737,6 +744,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -893,6 +901,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -980,6 +989,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1423,6 +1433,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -2116,6 +2127,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", diff --git a/posthog/api/test/__snapshots__/test_preflight.ambr b/posthog/api/test/__snapshots__/test_preflight.ambr index 2e4c27a3fa1ba..e6642ac4aee62 100644 --- a/posthog/api/test/__snapshots__/test_preflight.ambr +++ b/posthog/api/test/__snapshots__/test_preflight.ambr @@ -58,6 +58,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", diff --git a/posthog/api/test/__snapshots__/test_survey.ambr b/posthog/api/test/__snapshots__/test_survey.ambr index 10f642ef9affd..f20862f313aac 100644 --- a/posthog/api/test/__snapshots__/test_survey.ambr +++ b/posthog/api/test/__snapshots__/test_survey.ambr @@ -173,6 +173,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", diff --git a/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambr b/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambr index fbfa40cef3d19..911d8d728be53 100644 --- a/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambr +++ b/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambr @@ -58,6 +58,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -193,6 +194,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -392,6 +394,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -712,6 +715,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1096,6 +1100,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1160,6 +1165,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1327,6 +1333,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1384,6 +1391,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1517,6 +1525,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1633,6 +1642,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1837,6 +1847,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -2057,6 +2068,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -2149,6 +2161,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -2240,6 +2253,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -2304,6 +2318,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -2400,6 +2415,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -2496,6 +2512,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -2664,6 +2681,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -2777,6 +2795,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -2869,6 +2888,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -2960,6 +2980,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -3024,6 +3045,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -3096,6 +3118,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -3229,6 +3252,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -3345,6 +3369,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -3557,6 +3582,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -3756,6 +3782,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -3918,6 +3945,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -4101,6 +4129,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -4568,6 +4597,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -4685,6 +4715,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -4861,6 +4892,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -4998,6 +5030,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -5101,6 +5134,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -5192,6 +5226,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -5256,6 +5291,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -5320,6 +5356,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -5453,6 +5490,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -5543,6 +5581,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -5607,6 +5646,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -5740,6 +5780,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -5856,6 +5897,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -6048,6 +6090,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -6161,6 +6204,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -6267,6 +6311,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -6358,6 +6403,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -6422,6 +6468,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -6486,6 +6533,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -6619,6 +6667,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -6742,6 +6791,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -6922,6 +6972,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -7011,6 +7062,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -7099,6 +7151,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -7191,6 +7244,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -7282,6 +7336,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -7346,6 +7401,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -7410,6 +7466,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -7557,6 +7614,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -7673,6 +7731,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -7864,6 +7923,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -8063,6 +8123,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -8243,6 +8304,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -8451,6 +8513,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -8547,6 +8610,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -8723,6 +8787,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -8914,6 +8979,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -9031,6 +9097,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -9207,6 +9274,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -9495,6 +9563,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", diff --git a/posthog/api/test/notebooks/__snapshots__/test_notebook.ambr b/posthog/api/test/notebooks/__snapshots__/test_notebook.ambr index a2c541d95986d..d59c1815c0042 100644 --- a/posthog/api/test/notebooks/__snapshots__/test_notebook.ambr +++ b/posthog/api/test/notebooks/__snapshots__/test_notebook.ambr @@ -58,6 +58,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -147,6 +148,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -420,6 +422,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -521,6 +524,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", diff --git a/posthog/api/test/test_survey.py b/posthog/api/test/test_survey.py index e77e41d2e489b..4f171d91b6c14 100644 --- a/posthog/api/test/test_survey.py +++ b/posthog/api/test/test_survey.py @@ -12,7 +12,7 @@ from posthog.api.survey import nh3_clean_with_allow_list from posthog.constants import AvailableFeature -from posthog.models import Action, FeatureFlag +from posthog.models import Action, FeatureFlag, Team from posthog.models.cohort.cohort import Cohort from posthog.models.feedback.survey import Survey from posthog.test.base import ( @@ -2573,6 +2573,25 @@ def _get_surveys( REMOTE_ADDR=ip, ) + def test_can_get_survey_config(self): + survey_appearance = { + "thankYouMessageHeader": "Thanks for your feedback!", + "thankYouMessageDescription": "We'll use it to make notebooks better", + } + self.team.survey_config = {"appearance": survey_appearance} + + self.team.save() + + self.team = Team.objects.get(id=self.team.id) + + self.client.logout() + response = self._get_surveys() + response_data = response.json() + assert response.status_code == status.HTTP_200_OK, response_data + assert response.status_code == status.HTTP_200_OK, response_data + assert response_data["survey_config"] is not None + assert response_data["survey_config"]["appearance"] == survey_appearance + def test_list_surveys_with_actions(self): action = Action.objects.create( team=self.team, diff --git a/posthog/api/test/test_team.py b/posthog/api/test/test_team.py index 405197ecc637d..74a5995d2ac5b 100644 --- a/posthog/api/test/test_team.py +++ b/posthog/api/test/test_team.py @@ -887,6 +887,27 @@ def test_can_set_and_unset_session_recording_network_payload_capture_config(self second_get_response = self.client.get("/api/environments/@current/") assert second_get_response.json()["session_recording_network_payload_capture_config"] is None + def test_can_set_and_unset_survey_settings(self): + survey_appearance = { + "thankYouMessageHeader": "Thanks for your feedback!", + "thankYouMessageDescription": "We'll use it to make notebooks better", + "backgroundColor": "#ffcc99", + } + + self._patch_config("survey_config", {"appearance": survey_appearance}) + self._assert_surveys_config_is({"appearance": survey_appearance}) + + survey_appearance["zIndex"] = "100001" + self._patch_config("survey_config", {"appearance": survey_appearance}) + self._assert_surveys_config_is({"appearance": survey_appearance}) + + survey_appearance["thankYouMessageHeader"] = "Thanks!" + self._patch_config("survey_config", {"appearance": survey_appearance}) + self._assert_surveys_config_is({"appearance": survey_appearance}) + + self._patch_config("survey_config", None) + self._assert_replay_config_is(None) + def test_can_set_and_unset_session_replay_config(self) -> None: # can set self._patch_session_replay_config({"record_canvas": True}) @@ -1054,23 +1075,34 @@ def test_can_complete_product_onboarding( ) def _assert_replay_config_is(self, expected: dict[str, Any] | None) -> HttpResponse: + return self._assert_config_is("session_replay_config", expected) + + def _assert_surveys_config_is(self, expected: dict[str, Any] | None) -> HttpResponse: + return self._assert_config_is("survey_config", expected) + + def _assert_config_is(self, config_name, expected: dict[str, Any] | None) -> HttpResponse: get_response = self.client.get("/api/environments/@current/") assert get_response.status_code == status.HTTP_200_OK, get_response.json() - assert get_response.json()["session_replay_config"] == expected + assert get_response.json()[config_name] == expected return get_response - def _patch_session_replay_config( - self, config: dict[str, Any] | None, expected_status: int = status.HTTP_200_OK + def _patch_config( + self, config_name, config: dict[str, Any] | None, expected_status: int = status.HTTP_200_OK ) -> HttpResponse: patch_response = self.client.patch( "/api/environments/@current/", - {"session_replay_config": config}, + {config_name: config}, ) assert patch_response.status_code == expected_status, patch_response.json() return patch_response + def _patch_session_replay_config( + self, config: dict[str, Any] | None, expected_status: int = status.HTTP_200_OK + ) -> HttpResponse: + return self._patch_config("session_replay_config", config, expected_status) + def _assert_linked_flag_config(self, expected_config: dict | None) -> HttpResponse: response = self.client.get("/api/environments/@current/") assert response.status_code == status.HTTP_200_OK diff --git a/posthog/migrations/0487_team_survey_config.py b/posthog/migrations/0487_team_survey_config.py new file mode 100644 index 0000000000000..5fed324fc21ac --- /dev/null +++ b/posthog/migrations/0487_team_survey_config.py @@ -0,0 +1,17 @@ +# Generated by Django 4.2.15 on 2024-10-10 17:48 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("posthog", "0486_cohort_last_error_at"), + ] + + operations = [ + migrations.AddField( + model_name="team", + name="survey_config", + field=models.JSONField(blank=True, null=True), + ), + ] diff --git a/posthog/models/filters/test/__snapshots__/test_filter.ambr b/posthog/models/filters/test/__snapshots__/test_filter.ambr index 1361c0f5facfc..cd2bf85143d05 100644 --- a/posthog/models/filters/test/__snapshots__/test_filter.ambr +++ b/posthog/models/filters/test/__snapshots__/test_filter.ambr @@ -26,6 +26,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -90,6 +91,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -154,6 +156,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -218,6 +221,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -282,6 +286,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", diff --git a/posthog/models/team/team.py b/posthog/models/team/team.py index 89b119a0bfe98..30d2cb546892c 100644 --- a/posthog/models/team/team.py +++ b/posthog/models/team/team.py @@ -247,6 +247,7 @@ class Meta: session_recording_linked_flag = models.JSONField(null=True, blank=True) session_recording_network_payload_capture_config = models.JSONField(null=True, blank=True) session_replay_config = models.JSONField(null=True, blank=True) + survey_config = models.JSONField(null=True, blank=True) capture_console_log_opt_in = models.BooleanField(null=True, blank=True, default=True) capture_performance_opt_in = models.BooleanField(null=True, blank=True, default=True) surveys_opt_in = models.BooleanField(null=True, blank=True) diff --git a/posthog/session_recordings/test/__snapshots__/test_session_recordings.ambr b/posthog/session_recordings/test/__snapshots__/test_session_recordings.ambr index a7a08b736a83e..cf5c8dd3c7dde 100644 --- a/posthog/session_recordings/test/__snapshots__/test_session_recordings.ambr +++ b/posthog/session_recordings/test/__snapshots__/test_session_recordings.ambr @@ -26,6 +26,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -90,6 +91,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -154,6 +156,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -218,6 +221,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -282,6 +286,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -454,6 +459,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -543,6 +549,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -911,6 +918,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1007,6 +1015,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1071,6 +1080,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1135,6 +1145,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1199,6 +1210,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1263,6 +1275,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1327,6 +1340,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1423,6 +1437,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1619,6 +1634,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1753,6 +1769,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -2213,6 +2230,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -2347,6 +2365,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -2495,6 +2514,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -2846,6 +2866,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -2999,6 +3020,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -3455,6 +3477,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -3621,6 +3644,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -3894,6 +3918,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -4117,6 +4142,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -4251,6 +4277,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -5116,6 +5143,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -5250,6 +5278,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -5687,6 +5716,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -5842,6 +5872,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -6342,6 +6373,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -6495,6 +6527,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -6936,6 +6969,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -7070,6 +7104,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", diff --git a/posthog/tasks/test/__snapshots__/test_process_scheduled_changes.ambr b/posthog/tasks/test/__snapshots__/test_process_scheduled_changes.ambr index a15676702daaa..bae606bc1022e 100644 --- a/posthog/tasks/test/__snapshots__/test_process_scheduled_changes.ambr +++ b/posthog/tasks/test/__snapshots__/test_process_scheduled_changes.ambr @@ -97,6 +97,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -359,6 +360,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", diff --git a/posthog/test/__snapshots__/test_feature_flag.ambr b/posthog/test/__snapshots__/test_feature_flag.ambr index 7d1abd00ada24..339a4714be80f 100644 --- a/posthog/test/__snapshots__/test_feature_flag.ambr +++ b/posthog/test/__snapshots__/test_feature_flag.ambr @@ -150,6 +150,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -320,6 +321,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -655,6 +657,7 @@ "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", "posthog_team"."session_replay_config", + "posthog_team"."survey_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in",