From 7d4659405f3ffbffb011b1d775f51b7a2601c4b1 Mon Sep 17 00:00:00 2001 From: Paul D'Ambra Date: Wed, 8 Nov 2023 12:41:28 +0000 Subject: [PATCH] fix: :team_id isn't the path any more --- frontend/src/exporter/Exporter.stories.tsx | 2 +- .../navigation-3000/Navigation.stories.tsx | 10 +++--- .../components/Sidebar.stories.tsx | 4 +-- .../annotationsOverlayLogic.test.ts | 6 ++-- .../EventSelect/EventSelect.stories.tsx | 2 +- .../PersonPropertySelect.stories.tsx | 2 +- .../taxonomicFilterMocksDecorator.ts | 10 +++--- frontend/src/mocks/handlers.ts | 36 +++++++++---------- frontend/src/models/dashboardsModel.test.ts | 2 +- .../models/propertyDefinitionsModel.test.ts | 2 +- .../nodes/DataNode/DataNode.stories.tsx | 4 +-- .../nodes/DataTable/DataTable.stories.tsx | 4 +-- .../annotations/Annotations.stories.tsx | 4 +-- .../scenes/apps/AppMetricsScene.stories.tsx | 2 +- .../batch_exports/__mocks__/api-mocks.ts | 16 ++++----- .../scenes/dashboard/Dashboards.stories.tsx | 12 +++---- .../DataManagementScene.stories.tsx | 4 +-- .../EarlyAccessFeatures.stories.tsx | 6 ++-- frontend/src/scenes/events/Events.stories.tsx | 2 +- .../scenes/experiments/Experiment.stories.tsx | 12 +++---- .../FeatureFlagCodeInstructions.stories.tsx | 4 +-- .../feature-flags/FeatureFlags.stories.tsx | 6 ++-- .../src/scenes/feedback/Feedback.stories.tsx | 4 +-- .../EmptyStates/EmptyStates.stories.tsx | 10 +++--- .../src/scenes/insights/Insights.stories.tsx | 14 ++++---- .../insights/__mocks__/createInsightScene.tsx | 2 +- .../scenes/insights/insightDataLogic.test.ts | 2 +- .../insights/insightVizDataLogic.test.ts | 2 +- .../notebooks/Notebook/Notebook.stories.tsx | 20 +++++------ .../NotebookSelectButton.stories.tsx | 2 +- .../src/scenes/persons/personsLogic.test.ts | 2 +- .../ProjectHomepage.stories.tsx | 6 ++-- .../saved-insights/SavedInsights.stories.tsx | 4 +-- ...sionsRecordings-player-success.stories.tsx | 8 ++--- ...onsRecordings-playlist-listing.stories.tsx | 4 +-- .../src/scenes/surveys/Surveys.stories.tsx | 10 +++--- 36 files changed, 121 insertions(+), 121 deletions(-) diff --git a/frontend/src/exporter/Exporter.stories.tsx b/frontend/src/exporter/Exporter.stories.tsx index ef3ecd3caf8a3..4c5acbd7257aa 100644 --- a/frontend/src/exporter/Exporter.stories.tsx +++ b/frontend/src/exporter/Exporter.stories.tsx @@ -42,7 +42,7 @@ TrendsLineInsight.args = { insight: require('../mocks/fixtures/api/projects/team export const TrendsLineMultiInsight: Story = Template.bind({}) TrendsLineMultiInsight.args = { - insight: require('../mocks/fixtures/api/projects/:team_id/insights/trendsLineMulti.json'), + insight: require('../mocks/fixtures/api/projects/team_id/insights/trendsLineMulti.json'), } TrendsLineMultiInsight.parameters = { mockDate: '2023-07-10', diff --git a/frontend/src/layout/navigation-3000/Navigation.stories.tsx b/frontend/src/layout/navigation-3000/Navigation.stories.tsx index 73d7298878007..0abff5b5b5673 100644 --- a/frontend/src/layout/navigation-3000/Navigation.stories.tsx +++ b/frontend/src/layout/navigation-3000/Navigation.stories.tsx @@ -12,11 +12,11 @@ const meta: Meta = { decorators: [ mswDecorator({ get: { - '/api/projects/:team_id/dashboards/': require('../../scenes/dashboard/__mocks__/dashboards.json'), - '/api/projects/:team_id/dashboards/1/': require('../../scenes/dashboard/__mocks__/dashboard1.json'), - '/api/projects/:team_id/dashboards/1/collaborators/': [], - '/api/projects/:team_id/insights/my_last_viewed/': require('../../scenes/saved-insights/__mocks__/insightsMyLastViewed.json'), - '/api/projects/:team_id/session_recordings/': EMPTY_PAGINATED_RESPONSE, + '/api/projects/team_id/dashboards/': require('../../scenes/dashboard/__mocks__/dashboards.json'), + '/api/projects/team_id/dashboards/1/': require('../../scenes/dashboard/__mocks__/dashboard1.json'), + '/api/projects/team_id/dashboards/1/collaborators/': [], + '/api/projects/team_id/insights/my_last_viewed/': require('../../scenes/saved-insights/__mocks__/insightsMyLastViewed.json'), + '/api/projects/team_id/session_recordings/': EMPTY_PAGINATED_RESPONSE, }, }), ], diff --git a/frontend/src/layout/navigation-3000/components/Sidebar.stories.tsx b/frontend/src/layout/navigation-3000/components/Sidebar.stories.tsx index be58ae746db17..9db8862ea4a5d 100644 --- a/frontend/src/layout/navigation-3000/components/Sidebar.stories.tsx +++ b/frontend/src/layout/navigation-3000/components/Sidebar.stories.tsx @@ -35,7 +35,7 @@ const multipliedFeatureFlagsJson = { export function Dashboards(): JSX.Element { useStorybookMocks({ get: { - '/api/projects/:team_id/dashboards/': dashboardsJson, + '/api/projects/team_id/dashboards/': dashboardsJson, }, }) const { showSidebar } = useActions(navigation3000Logic) @@ -54,7 +54,7 @@ export function Dashboards(): JSX.Element { export function FeatureFlags(): JSX.Element { useStorybookMocks({ get: { - '/api/projects/:team_id/feature_flags/': multipliedFeatureFlagsJson, + '/api/projects/team_id/feature_flags/': multipliedFeatureFlagsJson, }, }) const { showSidebar } = useActions(navigation3000Logic) diff --git a/frontend/src/lib/components/AnnotationsOverlay/annotationsOverlayLogic.test.ts b/frontend/src/lib/components/AnnotationsOverlay/annotationsOverlayLogic.test.ts index 8e98373a9a201..30cb455fe91d1 100644 --- a/frontend/src/lib/components/AnnotationsOverlay/annotationsOverlayLogic.test.ts +++ b/frontend/src/lib/components/AnnotationsOverlay/annotationsOverlayLogic.test.ts @@ -130,7 +130,7 @@ function useInsightMocks(interval: string = 'day', timezone: string = 'UTC'): vo } useMocks({ get: { - '/api/projects/:team_id/insights/': () => { + '/api/projects/team_id/insights/': () => { return [ 200, { @@ -138,7 +138,7 @@ function useInsightMocks(interval: string = 'day', timezone: string = 'UTC'): vo }, ] }, - [`/api/projects/:team_id/insights/${MOCK_INSIGHT_NUMERIC_ID}`]: () => { + [`/api/projects/team_id/insights/${MOCK_INSIGHT_NUMERIC_ID}`]: () => { return [200, insight] }, }, @@ -148,7 +148,7 @@ function useInsightMocks(interval: string = 'day', timezone: string = 'UTC'): vo function useAnnotationsMocks(): void { useMocks({ get: { - '/api/projects/:team_id/annotations/': { + '/api/projects/team_id/annotations/': { results: [ MOCK_ANNOTATION_ORG_SCOPED, MOCK_ANNOTATION_ORG_SCOPED_FROM_INSIGHT_3, diff --git a/frontend/src/lib/components/EventSelect/EventSelect.stories.tsx b/frontend/src/lib/components/EventSelect/EventSelect.stories.tsx index b13517b039dd5..d9f0e81e47982 100644 --- a/frontend/src/lib/components/EventSelect/EventSelect.stories.tsx +++ b/frontend/src/lib/components/EventSelect/EventSelect.stories.tsx @@ -27,7 +27,7 @@ const meta: Meta = { mswDecorator({ get: { '/api/projects/:team_id': { id: 2 }, - '/api/projects/:team_id/event_definitions': { + '/api/projects/team_id/event_definitions': { count: eventDefinitions.length, next: null, previous: null, diff --git a/frontend/src/lib/components/PersonPropertySelect/PersonPropertySelect.stories.tsx b/frontend/src/lib/components/PersonPropertySelect/PersonPropertySelect.stories.tsx index c65b8df3f901c..a3325e16057d6 100644 --- a/frontend/src/lib/components/PersonPropertySelect/PersonPropertySelect.stories.tsx +++ b/frontend/src/lib/components/PersonPropertySelect/PersonPropertySelect.stories.tsx @@ -10,7 +10,7 @@ const meta: Meta = { decorators: [ mswDecorator({ get: { - '/api/projects/:team_id/persons/properties': [ + '/api/projects/team_id/persons/properties': [ { name: 'Property A', count: 10 }, { name: 'Property B', count: 20 }, { name: 'Property C', count: 30 }, diff --git a/frontend/src/lib/components/TaxonomicFilter/__mocks__/taxonomicFilterMocksDecorator.ts b/frontend/src/lib/components/TaxonomicFilter/__mocks__/taxonomicFilterMocksDecorator.ts index 9c29ae50e755c..beb54d7297ec9 100644 --- a/frontend/src/lib/components/TaxonomicFilter/__mocks__/taxonomicFilterMocksDecorator.ts +++ b/frontend/src/lib/components/TaxonomicFilter/__mocks__/taxonomicFilterMocksDecorator.ts @@ -3,14 +3,14 @@ import { mockActionDefinition } from '~/test/mocks' export const taxonomicFilterMocksDecorator = mswDecorator({ get: { - '/api/projects/:team_id/actions': { results: [mockActionDefinition] }, - '/api/projects/:team_id/persons/properties': [ + '/api/projects/team_id/actions': { results: [mockActionDefinition] }, + '/api/projects/team_id/persons/properties': [ { id: 1, name: 'location', count: 1 }, { id: 2, name: 'role', count: 2 }, { id: 3, name: 'height', count: 3 }, { id: 4, name: '$browser', count: 4 }, ], - '/api/projects/:team_id/property_definitions': [ + '/api/projects/team_id/property_definitions': [ { name: 'file_count', count: 205, @@ -36,7 +36,7 @@ export const taxonomicFilterMocksDecorator = mswDecorator({ count: 205, }, ], - '/api/projects/:team_id/event_definitions': [ + '/api/projects/team_id/event_definitions': [ { id: 'a', name: 'signed up', @@ -57,7 +57,7 @@ export const taxonomicFilterMocksDecorator = mswDecorator({ count: 103, }, ], - '/api/projects/:team_id/cohorts/': [ + '/api/projects/team_id/cohorts/': [ { id: 1, name: 'Properties Cohort', diff --git a/frontend/src/mocks/handlers.ts b/frontend/src/mocks/handlers.ts index 7b17d549ffc8a..288907c7c191c 100644 --- a/frontend/src/mocks/handlers.ts +++ b/frontend/src/mocks/handlers.ts @@ -25,26 +25,26 @@ export const toPaginatedResponse = (results: any[]): typeof EMPTY_PAGINATED_RESP export const defaultMocks: Mocks = { get: { - '/api/projects/:team_id/activity_log/important_changes/': EMPTY_PAGINATED_RESPONSE, - '/api/projects/:team_id/actions/': EMPTY_PAGINATED_RESPONSE, - '/api/projects/:team_id/annotations/': EMPTY_PAGINATED_RESPONSE, - '/api/projects/:team_id/event_definitions/': EMPTY_PAGINATED_RESPONSE, - '/api/projects/:team_id/cohorts/': toPaginatedResponse([MOCK_DEFAULT_COHORT]), - '/api/projects/:team_id/dashboards/': EMPTY_PAGINATED_RESPONSE, + '/api/projects/team_id/activity_log/important_changes/': EMPTY_PAGINATED_RESPONSE, + '/api/projects/team_id/actions/': EMPTY_PAGINATED_RESPONSE, + '/api/projects/team_id/annotations/': EMPTY_PAGINATED_RESPONSE, + '/api/projects/team_id/event_definitions/': EMPTY_PAGINATED_RESPONSE, + '/api/projects/team_id/cohorts/': toPaginatedResponse([MOCK_DEFAULT_COHORT]), + '/api/projects/team_id/dashboards/': EMPTY_PAGINATED_RESPONSE, '/api/projects/@current/dashboard_templates/repository/': [], - '/api/projects/:team_id/groups/': EMPTY_PAGINATED_RESPONSE, - '/api/projects/:team_id/groups_types/': [], - '/api/projects/:team_id/insights/': EMPTY_PAGINATED_RESPONSE, - '/api/projects/:team_id/insights/:insight_id/sharing/': { + '/api/projects/team_id/groups/': EMPTY_PAGINATED_RESPONSE, + '/api/projects/team_id/groups_types/': [], + '/api/projects/team_id/insights/': EMPTY_PAGINATED_RESPONSE, + '/api/projects/team_id/insights/:insight_id/sharing/': { enabled: false, access_token: 'foo', created_at: '2020-11-11T00:00:00Z', } as SharingConfigurationType, - '/api/projects/:team_id/property_definitions/': EMPTY_PAGINATED_RESPONSE, - '/api/projects/:team_id/feature_flags/': EMPTY_PAGINATED_RESPONSE, - 'api/projects/:team_id/feature_flags/:feature_flag_id/role_access': EMPTY_PAGINATED_RESPONSE, - '/api/projects/:team_id/experiments/': EMPTY_PAGINATED_RESPONSE, - '/api/projects/:team_id/explicit_members/': [], + '/api/projects/team_id/property_definitions/': EMPTY_PAGINATED_RESPONSE, + '/api/projects/team_id/feature_flags/': EMPTY_PAGINATED_RESPONSE, + 'api/projects/team_id/feature_flags/:feature_flag_id/role_access': EMPTY_PAGINATED_RESPONSE, + '/api/projects/team_id/experiments/': EMPTY_PAGINATED_RESPONSE, + '/api/projects/team_id/explicit_members/': [], '/api/organizations/@current/': (): MockSignature => [ 200, { ...MOCK_DEFAULT_ORGANIZATION, available_features: getAvailableFeatures() }, @@ -61,8 +61,8 @@ export const defaultMocks: Mocks = { '/api/plugin_config/': toPaginatedResponse([MOCK_DEFAULT_PLUGIN_CONFIG]), [`/api/projects/${MOCK_TEAM_ID}/plugin_configs/${MOCK_DEFAULT_PLUGIN_CONFIG.id}/`]: MOCK_DEFAULT_PLUGIN_CONFIG, '/api/projects/@current/persons/properties/': toPaginatedResponse(MOCK_PERSON_PROPERTIES), - '/api/projects/:team_id/persons': EMPTY_PAGINATED_RESPONSE, - '/api/projects/:team_id/persons/properties/': toPaginatedResponse(MOCK_PERSON_PROPERTIES), + '/api/projects/team_id/persons': EMPTY_PAGINATED_RESPONSE, + '/api/projects/team_id/persons/properties/': toPaginatedResponse(MOCK_PERSON_PROPERTIES), '/api/personal_api_keys/': [], '/api/users/@me/': (): MockSignature => [ 200, @@ -94,7 +94,7 @@ export const defaultMocks: Mocks = { 'https://app.posthog.com/decide/': (): MockSignature => [200, 'ok'], '/decide/': (): MockSignature => [200, 'ok'], 'https://app.posthog.com/engage/': (): MockSignature => [200, 'ok'], - '/api/projects/:team_id/insights/:insight_id/viewed/': (): MockSignature => [201, null], + '/api/projects/team_id/insights/:insight_id/viewed/': (): MockSignature => [201, null], }, patch: { '/api/prompts/my_prompts': (): MockSignature => [200, {}], diff --git a/frontend/src/models/dashboardsModel.test.ts b/frontend/src/models/dashboardsModel.test.ts index dcbba56fe24b2..f8ac51c689aea 100644 --- a/frontend/src/models/dashboardsModel.test.ts +++ b/frontend/src/models/dashboardsModel.test.ts @@ -60,7 +60,7 @@ describe('the dashboards model', () => { beforeEach(async () => { useMocks({ get: { - '/api/projects/:team_id/dashboards/': () => { + '/api/projects/team_id/dashboards/': () => { return [ 200, { diff --git a/frontend/src/models/propertyDefinitionsModel.test.ts b/frontend/src/models/propertyDefinitionsModel.test.ts index bf08b2bff4112..765de11603893 100644 --- a/frontend/src/models/propertyDefinitionsModel.test.ts +++ b/frontend/src/models/propertyDefinitionsModel.test.ts @@ -42,7 +42,7 @@ describe('the property definitions model', () => { beforeEach(async () => { useMocks({ get: { - '/api/projects/:team_id/property_definitions/': (req) => { + '/api/projects/team_id/property_definitions/': (req) => { const propertiesToFind = (req.url.searchParams.get('properties') || '').split(',') if (propertiesToFind[0] === 'network error') { return diff --git a/frontend/src/queries/nodes/DataNode/DataNode.stories.tsx b/frontend/src/queries/nodes/DataNode/DataNode.stories.tsx index e91daaf1ca310..a0f4f8cd6779c 100644 --- a/frontend/src/queries/nodes/DataNode/DataNode.stories.tsx +++ b/frontend/src/queries/nodes/DataNode/DataNode.stories.tsx @@ -17,8 +17,8 @@ const meta: Meta = { decorators: [ mswDecorator({ get: { - '/api/projects/:team_id/events': events, - '/api/projects/:team_id/persons': persons, + '/api/projects/team_id/events': events, + '/api/projects/team_id/persons': persons, }, }), ], diff --git a/frontend/src/queries/nodes/DataTable/DataTable.stories.tsx b/frontend/src/queries/nodes/DataTable/DataTable.stories.tsx index 60072dd702ddb..d0f9090223bf2 100644 --- a/frontend/src/queries/nodes/DataTable/DataTable.stories.tsx +++ b/frontend/src/queries/nodes/DataTable/DataTable.stories.tsx @@ -17,8 +17,8 @@ const meta: Meta = { decorators: [ mswDecorator({ get: { - '/api/projects/:team_id/events': events, - '/api/projects/:team_id/persons': persons, + '/api/projects/team_id/events': events, + '/api/projects/team_id/persons': persons, }, }), ], diff --git a/frontend/src/scenes/annotations/Annotations.stories.tsx b/frontend/src/scenes/annotations/Annotations.stories.tsx index 8a99d5c64f7a5..f2a5c5344c4e7 100644 --- a/frontend/src/scenes/annotations/Annotations.stories.tsx +++ b/frontend/src/scenes/annotations/Annotations.stories.tsx @@ -19,8 +19,8 @@ const meta: Meta = { decorators: [ mswDecorator({ get: { - '/api/projects/:team_id/annotations/': annotations, - '/api/projects/:team_id/annotations/:annotationId/': (req) => [ + '/api/projects/team_id/annotations/': annotations, + '/api/projects/team_id/annotations/:annotationId/': (req) => [ 200, annotations.results.find((r) => r.id === Number(req.params['annotationId'])), ], diff --git a/frontend/src/scenes/apps/AppMetricsScene.stories.tsx b/frontend/src/scenes/apps/AppMetricsScene.stories.tsx index 638bb317fc462..252b957629895 100644 --- a/frontend/src/scenes/apps/AppMetricsScene.stories.tsx +++ b/frontend/src/scenes/apps/AppMetricsScene.stories.tsx @@ -20,7 +20,7 @@ const meta: Meta = { decorators: [ mswDecorator({ get: { - '/api/projects/:team_id/app_metrics/:plugin_config_id/': { + '/api/projects/team_id/app_metrics/:plugin_config_id/': { metrics: { dates: [ '2023-01-10', diff --git a/frontend/src/scenes/batch_exports/__mocks__/api-mocks.ts b/frontend/src/scenes/batch_exports/__mocks__/api-mocks.ts index ab62ca297b39e..f72eae63e6164 100644 --- a/frontend/src/scenes/batch_exports/__mocks__/api-mocks.ts +++ b/frontend/src/scenes/batch_exports/__mocks__/api-mocks.ts @@ -6,8 +6,8 @@ export const createExportServiceHandlers = ( ): { exports: { [id: number]: BatchExportConfiguration }; handlers: any } => { const handlers = { get: { - '/api/projects/:team_id/groups_types/': [], - '/api/projects/:team_id/batch_exports/': (_req: any, res: any, ctx: any) => { + '/api/projects/team_id/groups_types/': [], + '/api/projects/team_id/batch_exports/': (_req: any, res: any, ctx: any) => { return res( ctx.delay(1000), ctx.json({ @@ -15,11 +15,11 @@ export const createExportServiceHandlers = ( } as CountedPaginatedResponse) ) }, - '/api/projects/:team_id/batch_exports/:export_id': (req: any, res: any, ctx: any) => { + '/api/projects/team_id/batch_exports/:export_id': (req: any, res: any, ctx: any) => { const id = req.params.export_id as string return res(ctx.delay(1000), ctx.json(exports[id])) }, - '/api/projects/:team_id/batch_exports/:export_id/runs': (req: any, res: any, ctx: any) => { + '/api/projects/team_id/batch_exports/:export_id/runs': (req: any, res: any, ctx: any) => { const id = req.params.export_id as string return res( ctx.delay(1000), @@ -30,7 +30,7 @@ export const createExportServiceHandlers = ( }, }, post: { - '/api/projects/:team_id/batch_exports/': (req: any, res: any, ctx: any) => { + '/api/projects/team_id/batch_exports/': (req: any, res: any, ctx: any) => { const body = req.body as BatchExportConfiguration const id = (Object.keys(exports).length + 1).toString() exports[id] = { @@ -44,19 +44,19 @@ export const createExportServiceHandlers = ( } return res(ctx.delay(1000), ctx.json(exports[id])) }, - '/api/projects/:team_id/batch_exports/:export_id/pause/': (req: any, res: any, ctx: any) => { + '/api/projects/team_id/batch_exports/:export_id/pause/': (req: any, res: any, ctx: any) => { const id = req.params.export_id as string exports[id].paused = true return res(ctx.delay(1000), ctx.json(exports[id])) }, - '/api/projects/:team_id/batch_exports/:export_id/unpause/': (req: any, res: any, ctx: any) => { + '/api/projects/team_id/batch_exports/:export_id/unpause/': (req: any, res: any, ctx: any) => { const id = req.params.export_id as string exports[id].paused = false return res(ctx.delay(1000), ctx.json(exports[id])) }, }, delete: { - '/api/projects/:team_id/batch_exports/:export_id': (req: any, res: any, ctx: any) => { + '/api/projects/team_id/batch_exports/:export_id': (req: any, res: any, ctx: any) => { const id = req.params.export_id as string delete exports[id] return res(ctx.delay(1000)) diff --git a/frontend/src/scenes/dashboard/Dashboards.stories.tsx b/frontend/src/scenes/dashboard/Dashboards.stories.tsx index 1794572670043..5f05fc354cb02 100644 --- a/frontend/src/scenes/dashboard/Dashboards.stories.tsx +++ b/frontend/src/scenes/dashboard/Dashboards.stories.tsx @@ -16,12 +16,12 @@ const meta: Meta = { decorators: [ mswDecorator({ get: { - '/api/projects/:team_id/dashboards/': require('./__mocks__/dashboards.json'), - '/api/projects/:team_id/dashboards/1/': require('./__mocks__/dashboard1.json'), - '/api/projects/:team_id/dashboards/1/collaborators/': [], - '/api/projects/:team_id/dashboard_templates/': require('./__mocks__/dashboard_templates.json'), - '/api/projects/:team_id/dashboard_templates/json_schema/': require('./__mocks__/dashboard_template_schema.json'), - '/api/projects/:team_id/dashboards/:dash_id/sharing/': { + '/api/projects/team_id/dashboards/': require('./__mocks__/dashboards.json'), + '/api/projects/team_id/dashboards/1/': require('./__mocks__/dashboard1.json'), + '/api/projects/team_id/dashboards/1/collaborators/': [], + '/api/projects/team_id/dashboard_templates/': require('./__mocks__/dashboard_templates.json'), + '/api/projects/team_id/dashboard_templates/json_schema/': require('./__mocks__/dashboard_template_schema.json'), + '/api/projects/team_id/dashboards/:dash_id/sharing/': { created_at: '2023-02-25T13:28:20.454940Z', enabled: false, access_token: 'a-secret-token', diff --git a/frontend/src/scenes/data-management/DataManagementScene.stories.tsx b/frontend/src/scenes/data-management/DataManagementScene.stories.tsx index e1c6f67232a9e..e4c26d0022935 100644 --- a/frontend/src/scenes/data-management/DataManagementScene.stories.tsx +++ b/frontend/src/scenes/data-management/DataManagementScene.stories.tsx @@ -92,12 +92,12 @@ const meta: Meta = { decorators: [ mswDecorator({ get: { - '/api/projects/:team_id/ingestion_warnings/': () => { + '/api/projects/team_id/ingestion_warnings/': () => { return [200, ingestionWarningsResponse(dayjs('2023-02-15T16:00:00.000Z'))] }, }, post: { - '/api/projects/:team_id/query/': (req) => { + '/api/projects/team_id/query/': (req) => { if ((req.body as any).query.kind === 'DatabaseSchemaQuery') { return [200, MOCK_DATABASE] } diff --git a/frontend/src/scenes/early-access-features/EarlyAccessFeatures.stories.tsx b/frontend/src/scenes/early-access-features/EarlyAccessFeatures.stories.tsx index b340f584e6cce..341176cc79fce 100644 --- a/frontend/src/scenes/early-access-features/EarlyAccessFeatures.stories.tsx +++ b/frontend/src/scenes/early-access-features/EarlyAccessFeatures.stories.tsx @@ -118,19 +118,19 @@ const meta: Meta = { decorators: [ mswDecorator({ get: { - '/api/projects/:team_id/early-access-feature': { + '/api/projects/team_id/early-access-feature': { count: 2, results: EARLY_ACCESS_FEATURE_RESULT as any[], next: null, previous: null, }, - '/api/projects/:team_id/early-access-feature/not-found/': [ + '/api/projects/team_id/early-access-feature/not-found/': [ 404, { detail: 'Not found.', }, ], - '/api/projects/:team_id/early-access-feature/:flagId/': + '/api/projects/team_id/early-access-feature/:flagId/': EARLY_ACCESS_FEATURE_RESULT[0] as EarlyAccessFeatureType, }, }), diff --git a/frontend/src/scenes/events/Events.stories.tsx b/frontend/src/scenes/events/Events.stories.tsx index 8ee043b5c500c..6d9edf8c72f8c 100644 --- a/frontend/src/scenes/events/Events.stories.tsx +++ b/frontend/src/scenes/events/Events.stories.tsx @@ -12,7 +12,7 @@ const meta: Meta = { decorators: [ mswDecorator({ post: { - '/api/projects/:team_id/query': eventsQuery, + '/api/projects/team_id/query': eventsQuery, }, }), ], diff --git a/frontend/src/scenes/experiments/Experiment.stories.tsx b/frontend/src/scenes/experiments/Experiment.stories.tsx index f4befaccc04fe..24ba7c1b37899 100644 --- a/frontend/src/scenes/experiments/Experiment.stories.tsx +++ b/frontend/src/scenes/experiments/Experiment.stories.tsx @@ -454,7 +454,7 @@ const MOCK_TREND_EXPERIMENT_RESULTS: TrendsExperimentResults = { }, aggregated_value: 0, label: '$pageview - control', - count: 11.421053, // eslint-disable-line no-loss-of-precision + count: 11.421053, data: [ 2.4210526315789473, 1.4210526315789473, 3.4210526315789473, 0.4210526315789473, 3.4210526315789473, ], @@ -585,14 +585,14 @@ const meta: Meta = { decorators: [ mswDecorator({ get: { - '/api/projects/:team_id/experiments/': toPaginatedResponse([ + '/api/projects/team_id/experiments/': toPaginatedResponse([ MOCK_FUNNEL_EXPERIMENT, MOCK_TREND_EXPERIMENT, ]), - '/api/projects/:team_id/experiments/1/': MOCK_FUNNEL_EXPERIMENT, - '/api/projects/:team_id/experiments/1/results/': MOCK_EXPERIMENT_RESULTS, - '/api/projects/:team_id/experiments/2/': MOCK_TREND_EXPERIMENT, - '/api/projects/:team_id/experiments/2/results/': MOCK_TREND_EXPERIMENT_RESULTS, + '/api/projects/team_id/experiments/1/': MOCK_FUNNEL_EXPERIMENT, + '/api/projects/team_id/experiments/1/results/': MOCK_EXPERIMENT_RESULTS, + '/api/projects/team_id/experiments/2/': MOCK_TREND_EXPERIMENT, + '/api/projects/team_id/experiments/2/results/': MOCK_TREND_EXPERIMENT_RESULTS, }, }), ], diff --git a/frontend/src/scenes/feature-flags/FeatureFlagCodeInstructions.stories.tsx b/frontend/src/scenes/feature-flags/FeatureFlagCodeInstructions.stories.tsx index 48605e78b7123..75cdcbb734b1b 100644 --- a/frontend/src/scenes/feature-flags/FeatureFlagCodeInstructions.stories.tsx +++ b/frontend/src/scenes/feature-flags/FeatureFlagCodeInstructions.stories.tsx @@ -110,7 +110,7 @@ export const CodeInstructionsRubyWithGroupFlagLocalEvaluation = (): JSX.Element useAvailableFeatures([AvailableFeature.GROUP_ANALYTICS, AvailableFeature.MULTIVARIATE_FLAGS]) useStorybookMocks({ get: { - '/api/projects/:team_id/groups_types/': [ + '/api/projects/team_id/groups_types/': [ { group_type: 'project', group_type_index: 0, name_singular: null, name_plural: null }, { group_type: 'organization', group_type_index: 1, name_singular: null, name_plural: null }, { group_type: 'instance', group_type_index: 2, name_singular: null, name_plural: null }, @@ -135,7 +135,7 @@ export const CodeInstructionsNodeWithGroupMultivariateFlagLocalEvaluation = (): useAvailableFeatures([AvailableFeature.GROUP_ANALYTICS, AvailableFeature.MULTIVARIATE_FLAGS]) useStorybookMocks({ get: { - '/api/projects/:team_id/groups_types/': [ + '/api/projects/team_id/groups_types/': [ { group_type: 'project', group_type_index: 0, name_singular: null, name_plural: null }, { group_type: 'organization', group_type_index: 1, name_singular: null, name_plural: null }, { group_type: 'instance', group_type_index: 2, name_singular: null, name_plural: null }, diff --git a/frontend/src/scenes/feature-flags/FeatureFlags.stories.tsx b/frontend/src/scenes/feature-flags/FeatureFlags.stories.tsx index eb74c9fe61248..56b8c0c18015d 100644 --- a/frontend/src/scenes/feature-flags/FeatureFlags.stories.tsx +++ b/frontend/src/scenes/feature-flags/FeatureFlags.stories.tsx @@ -21,8 +21,8 @@ const meta: Meta = { decorators: [ mswDecorator({ get: { - '/api/projects/:team_id/feature_flags': featureFlags, - '/api/projects/:team_id/feature_flags/1111111111111/': [ + '/api/projects/team_id/feature_flags': featureFlags, + '/api/projects/team_id/feature_flags/1111111111111/': [ 404, { type: 'invalid', @@ -30,7 +30,7 @@ const meta: Meta = { detail: 'Not found.', }, ], - '/api/projects/:team_id/feature_flags/:flagId/': (req) => [ + '/api/projects/team_id/feature_flags/:flagId/': (req) => [ 200, featureFlags.results.find((r) => r.id === Number(req.params['flagId'])), ], diff --git a/frontend/src/scenes/feedback/Feedback.stories.tsx b/frontend/src/scenes/feedback/Feedback.stories.tsx index 1fb673c9d23e0..f4b491b08bc94 100644 --- a/frontend/src/scenes/feedback/Feedback.stories.tsx +++ b/frontend/src/scenes/feedback/Feedback.stories.tsx @@ -22,8 +22,8 @@ const meta: Meta = { decorators: [ mswDecorator({ get: { - '/api/projects/:team_id/events/': require('./__mocks__/events.json'), - 'api/projects/:team_id/insights/trend/': require('./__mocks__/trend.json'), + '/api/projects/team_id/events/': require('./__mocks__/events.json'), + 'api/projects/team_id/insights/trend/': require('./__mocks__/trend.json'), }, }), ], diff --git a/frontend/src/scenes/insights/EmptyStates/EmptyStates.stories.tsx b/frontend/src/scenes/insights/EmptyStates/EmptyStates.stories.tsx index ab3e7206c558f..d16bcc1a04746 100644 --- a/frontend/src/scenes/insights/EmptyStates/EmptyStates.stories.tsx +++ b/frontend/src/scenes/insights/EmptyStates/EmptyStates.stories.tsx @@ -22,7 +22,7 @@ export default meta export function EmptyState(): JSX.Element { useStorybookMocks({ get: { - '/api/projects/:team_id/insights/': (_, __, ctx) => [ + '/api/projects/team_id/insights/': (_, __, ctx) => [ ctx.delay(100), ctx.status(200), ctx.json({ count: 1, results: [{ ...insight, result: [] }] }), @@ -38,12 +38,12 @@ export function EmptyState(): JSX.Element { export function ErrorState(): JSX.Element { useStorybookMocks({ get: { - '/api/projects/:team_id/insights/': (_, __, ctx) => [ + '/api/projects/team_id/insights/': (_, __, ctx) => [ ctx.delay(100), ctx.status(200), ctx.json({ count: 1, results: [{ ...insight, result: null }] }), ], - '/api/projects/:team_id/insights/:id': (_, __, ctx) => [ + '/api/projects/team_id/insights/:id': (_, __, ctx) => [ ctx.delay(100), ctx.status(500), ctx.json({ detail: 'a fake error' }), @@ -59,11 +59,11 @@ export function ErrorState(): JSX.Element { export function TimeoutState(): JSX.Element { useStorybookMocks({ get: { - '/api/projects/:team_id/insights/': (_, __, ctx) => [ + '/api/projects/team_id/insights/': (_, __, ctx) => [ ctx.status(200), ctx.json({ count: 1, results: [{ ...insight, result: null }] }), ], - '/api/projects/:team_id/insights/trend/': (_, __, ctx) => [ + '/api/projects/team_id/insights/trend/': (_, __, ctx) => [ ctx.delay(86400000), ctx.status(200), ctx.json({ result: insight.result }), diff --git a/frontend/src/scenes/insights/Insights.stories.tsx b/frontend/src/scenes/insights/Insights.stories.tsx index 0a96fde02f67d..89ab7fb54c622 100644 --- a/frontend/src/scenes/insights/Insights.stories.tsx +++ b/frontend/src/scenes/insights/Insights.stories.tsx @@ -19,10 +19,10 @@ const meta: Meta = { decorators: [ mswDecorator({ get: { - '/api/projects/:team_id/persons/retention': sampleRetentionPeopleResponse, - '/api/projects/:team_id/persons/properties': samplePersonProperties, - '/api/projects/:team_id/groups_types': [], - '/api/projects/:team_id/notebooks': () => { + '/api/projects/team_id/persons/retention': sampleRetentionPeopleResponse, + '/api/projects/team_id/persons/properties': samplePersonProperties, + '/api/projects/team_id/groups_types': [], + '/api/projects/team_id/notebooks': () => { // this was matching on `?contains=query` but that made MSW unhappy and seems unnecessary return [ 200, @@ -34,7 +34,7 @@ const meta: Meta = { }, }, post: { - '/api/projects/:team_id/cohorts/': { id: 1 }, + '/api/projects/team_id/cohorts/': { id: 1 }, }, }), ], @@ -57,13 +57,13 @@ TrendsLineEdit.parameters = { } export const TrendsLineMulti: Story = createInsightStory( - require('../../mocks/fixtures/api/projects/:team_id/insights/trendsLineMulti.json') + require('../../mocks/fixtures/api/projects/team_id/insights/trendsLineMulti.json') ) TrendsLine.parameters = { testOptions: { waitForSelector: '[data-attr=trend-line-graph] > canvas' }, } export const TrendsLineMultiEdit: Story = createInsightStory( - require('../../mocks/fixtures/api/projects/:team_id/insights/trendsLineMulti.json'), + require('../../mocks/fixtures/api/projects/team_id/insights/trendsLineMulti.json'), 'edit' ) TrendsLineEdit.parameters = { diff --git a/frontend/src/scenes/insights/__mocks__/createInsightScene.tsx b/frontend/src/scenes/insights/__mocks__/createInsightScene.tsx index 7326a262550eb..976a14a428a8b 100644 --- a/frontend/src/scenes/insights/__mocks__/createInsightScene.tsx +++ b/frontend/src/scenes/insights/__mocks__/createInsightScene.tsx @@ -15,7 +15,7 @@ export function createInsightStory( return function InsightStory() { useStorybookMocks({ get: { - '/api/projects/:team_id/insights/': (_, __, ctx) => [ + '/api/projects/team_id/insights/': (_, __, ctx) => [ ctx.delay(100), ctx.status(200), ctx.json({ diff --git a/frontend/src/scenes/insights/insightDataLogic.test.ts b/frontend/src/scenes/insights/insightDataLogic.test.ts index 52c99c600f902..8322781683f1e 100644 --- a/frontend/src/scenes/insights/insightDataLogic.test.ts +++ b/frontend/src/scenes/insights/insightDataLogic.test.ts @@ -19,7 +19,7 @@ describe('insightDataLogic', () => { beforeEach(() => { useMocks({ get: { - '/api/projects/:team_id/insights/trend': [], + '/api/projects/team_id/insights/trend': [], }, }) initKeaTests() diff --git a/frontend/src/scenes/insights/insightVizDataLogic.test.ts b/frontend/src/scenes/insights/insightVizDataLogic.test.ts index 1eb6bac3b5ddc..4ecbb0f1eed0b 100644 --- a/frontend/src/scenes/insights/insightVizDataLogic.test.ts +++ b/frontend/src/scenes/insights/insightVizDataLogic.test.ts @@ -21,7 +21,7 @@ describe('insightVizDataLogic', () => { beforeEach(() => { useMocks({ get: { - '/api/projects/:team_id/insights/trend': [], + '/api/projects/team_id/insights/trend': [], }, }) initKeaTests() diff --git a/frontend/src/scenes/notebooks/Notebook/Notebook.stories.tsx b/frontend/src/scenes/notebooks/Notebook/Notebook.stories.tsx index 4424251929804..1638ddf71d691 100644 --- a/frontend/src/scenes/notebooks/Notebook/Notebook.stories.tsx +++ b/frontend/src/scenes/notebooks/Notebook/Notebook.stories.tsx @@ -10,7 +10,7 @@ import { NotebookType } from '~/types' // a list of test cases to run, showing different types of content in notebooks const testCases: Record = { - 'api/projects/:team_id/notebooks/text-formats': notebookTestTemplate('text-formats', [ + 'api/projects/team_id/notebooks/text-formats': notebookTestTemplate('text-formats', [ { type: 'paragraph', content: [ @@ -71,7 +71,7 @@ const testCases: Record = { ], }, ]), - 'api/projects/:team_id/notebooks/headings': notebookTestTemplate('headings', [ + 'api/projects/team_id/notebooks/headings': notebookTestTemplate('headings', [ { type: 'heading', attrs: { @@ -109,7 +109,7 @@ const testCases: Record = { ], }, ]), - 'api/projects/:team_id/notebooks/numbered-list': notebookTestTemplate('numbered-list', [ + 'api/projects/team_id/notebooks/numbered-list': notebookTestTemplate('numbered-list', [ { type: 'orderedList', content: [ @@ -144,7 +144,7 @@ const testCases: Record = { ], }, ]), - 'api/projects/:team_id/notebooks/bullet-list': notebookTestTemplate('bullet-list', [ + 'api/projects/team_id/notebooks/bullet-list': notebookTestTemplate('bullet-list', [ { type: 'bulletList', content: [ @@ -179,7 +179,7 @@ const testCases: Record = { ], }, ]), - 'api/projects/:team_id/notebooks/recordings-playlist': notebookTestTemplate('recordings-playlist', [ + 'api/projects/team_id/notebooks/recordings-playlist': notebookTestTemplate('recordings-playlist', [ { type: 'ph-recording-playlist', attrs: { @@ -191,7 +191,7 @@ const testCases: Record = { }, }, ]), - 'api/projects/:team_id/notebooks/empty': notebookTestTemplate('empty', []), + 'api/projects/team_id/notebooks/empty': notebookTestTemplate('empty', []), } const meta: Meta = { @@ -204,7 +204,7 @@ const meta: Meta = { decorators: [ mswDecorator({ post: { - 'api/projects/:team_id/query': { + 'api/projects/team_id/query': { clickhouse: "SELECT nullIf(nullIf(events.`$session_id`, ''), 'null') AS session_id, any(events.properties) AS properties FROM events WHERE and(equals(events.team_id, 1), in(events.event, [%(hogql_val_0)s, %(hogql_val_1)s]), ifNull(in(session_id, [%(hogql_val_2)s]), 0), ifNull(greaterOrEquals(toTimeZone(events.timestamp, %(hogql_val_3)s), %(hogql_val_4)s), 0), ifNull(lessOrEquals(toTimeZone(events.timestamp, %(hogql_val_5)s), %(hogql_val_6)s), 0)) GROUP BY session_id LIMIT 100 SETTINGS readonly=2, max_execution_time=60, allow_experimental_object_type=True", columns: ['session_id', 'properties'], @@ -223,7 +223,7 @@ const meta: Meta = { }, }, get: { - 'api/projects/:team_id/notebooks': { + 'api/projects/team_id/notebooks': { count: 1, next: null, previous: null, @@ -272,8 +272,8 @@ const meta: Meta = { }, ], }, - 'api/projects/:team_id/notebooks/12345': notebook12345Json, - 'api/projects/:team_id/session_recordings': { + 'api/projects/team_id/notebooks/12345': notebook12345Json, + 'api/projects/team_id/session_recordings': { results: [ { id: '018a8a51-a39d-7b18-897f-94054eec5f61', diff --git a/frontend/src/scenes/notebooks/NotebookSelectButton/NotebookSelectButton.stories.tsx b/frontend/src/scenes/notebooks/NotebookSelectButton/NotebookSelectButton.stories.tsx index a68a60d9b5bdc..d963c33f8599a 100644 --- a/frontend/src/scenes/notebooks/NotebookSelectButton/NotebookSelectButton.stories.tsx +++ b/frontend/src/scenes/notebooks/NotebookSelectButton/NotebookSelectButton.stories.tsx @@ -40,7 +40,7 @@ const Template: StoryFn = (props) => { setFeatureFlags([FEATURE_FLAGS.NOTEBOOKS]) useStorybookMocks({ get: { - '/api/projects/:team_id/notebooks/': (req, res, ctx) => { + '/api/projects/team_id/notebooks/': (req, res, ctx) => { const contains = req.url.searchParams.get('contains') const sessionRecordingId = contains?.split(':')[1] const unfiltered = contains == null && sessionRecordingId === undefined diff --git a/frontend/src/scenes/persons/personsLogic.test.ts b/frontend/src/scenes/persons/personsLogic.test.ts index f8bc7fbc3a53f..e95984bcb0efc 100644 --- a/frontend/src/scenes/persons/personsLogic.test.ts +++ b/frontend/src/scenes/persons/personsLogic.test.ts @@ -14,7 +14,7 @@ describe('personsLogic', () => { beforeEach(() => { useMocks({ get: { - '/api/projects/:team_id/persons/': (req) => { + '/api/projects/team_id/persons/': (req) => { if (['+', 'abc', 'xyz'].includes(req.url.searchParams.get('distinct_id') ?? '')) { return [200, { results: ['person from api'] }] } diff --git a/frontend/src/scenes/project-homepage/ProjectHomepage.stories.tsx b/frontend/src/scenes/project-homepage/ProjectHomepage.stories.tsx index ee72de13b7ad1..0f4fd4a8f5e3b 100644 --- a/frontend/src/scenes/project-homepage/ProjectHomepage.stories.tsx +++ b/frontend/src/scenes/project-homepage/ProjectHomepage.stories.tsx @@ -10,9 +10,9 @@ const meta: Meta = { decorators: [ mswDecorator({ get: { - '/api/projects/:team_id/dashboards/': require('../dashboard/__mocks__/dashboards.json'), - '/api/projects/:team_id/dashboards/1/': require('../dashboard/__mocks__/dashboard1.json'), - '/api/projects/:team_id/dashboards/1/collaborators/': [], + '/api/projects/team_id/dashboards/': require('../dashboard/__mocks__/dashboards.json'), + '/api/projects/team_id/dashboards/1/': require('../dashboard/__mocks__/dashboard1.json'), + '/api/projects/team_id/dashboards/1/collaborators/': [], }, }), ], diff --git a/frontend/src/scenes/saved-insights/SavedInsights.stories.tsx b/frontend/src/scenes/saved-insights/SavedInsights.stories.tsx index 3b4ee1eb9a163..c682e27c253ec 100644 --- a/frontend/src/scenes/saved-insights/SavedInsights.stories.tsx +++ b/frontend/src/scenes/saved-insights/SavedInsights.stories.tsx @@ -27,7 +27,7 @@ const meta: Meta = { decorators: [ mswDecorator({ get: { - '/api/projects/:team_id/insights': toPaginatedResponse( + '/api/projects/team_id/insights': toPaginatedResponse( insightsJson.results.slice(0, 6).map((result, i) => ({ // Keep size of response in check ...result, @@ -60,7 +60,7 @@ CardView.parameters = { export const EmptyState: Story = () => { useStorybookMocks({ get: { - '/api/projects/:team_id/insights': EMPTY_PAGINATED_RESPONSE, + '/api/projects/team_id/insights': EMPTY_PAGINATED_RESPONSE, }, }) useEffect(() => { diff --git a/frontend/src/scenes/session-recordings/SessionsRecordings-player-success.stories.tsx b/frontend/src/scenes/session-recordings/SessionsRecordings-player-success.stories.tsx index 501351427ee2a..a769e034795b4 100644 --- a/frontend/src/scenes/session-recordings/SessionsRecordings-player-success.stories.tsx +++ b/frontend/src/scenes/session-recordings/SessionsRecordings-player-success.stories.tsx @@ -22,7 +22,7 @@ const meta: Meta = { decorators: [ mswDecorator({ get: { - '/api/projects/:team_id/session_recordings': (req) => { + '/api/projects/team_id/session_recordings': (req) => { const version = req.url.searchParams.get('version') return [ 200, @@ -33,8 +33,8 @@ const meta: Meta = { }, ] }, - '/api/projects/:team_id/session_recording_playlists': recording_playlists, - '/api/projects/:team_id/session_recording_playlists/:playlist_id': (req) => { + '/api/projects/team_id/session_recording_playlists': recording_playlists, + '/api/projects/team_id/session_recording_playlists/:playlist_id': (req) => { const playlistId = req.params.playlist_id return [ @@ -82,7 +82,7 @@ const meta: Meta = { }, ] }, - '/api/projects/:team_id/session_recording_playlists/:playlist_id/recordings': (req) => { + '/api/projects/team_id/session_recording_playlists/:playlist_id/recordings': (req) => { const playlistId = req.params.playlist_id const response = playlistId === '1234567' ? recordings : [] return [200, { has_next: false, results: response, version: 1 }] diff --git a/frontend/src/scenes/session-recordings/SessionsRecordings-playlist-listing.stories.tsx b/frontend/src/scenes/session-recordings/SessionsRecordings-playlist-listing.stories.tsx index 657fbccf4bc29..b87d0b00046c6 100644 --- a/frontend/src/scenes/session-recordings/SessionsRecordings-playlist-listing.stories.tsx +++ b/frontend/src/scenes/session-recordings/SessionsRecordings-playlist-listing.stories.tsx @@ -19,8 +19,8 @@ const meta: Meta = { decorators: [ mswDecorator({ get: { - '/api/projects/:team_id/session_recording_playlists': recording_playlists, - '/api/projects/:team_id/session_recordings': (req) => { + '/api/projects/team_id/session_recording_playlists': recording_playlists, + '/api/projects/team_id/session_recordings': (req) => { const version = req.url.searchParams.get('version') return [ 200, diff --git a/frontend/src/scenes/surveys/Surveys.stories.tsx b/frontend/src/scenes/surveys/Surveys.stories.tsx index f7217ccd16db9..c9f11e2cdc3e1 100644 --- a/frontend/src/scenes/surveys/Surveys.stories.tsx +++ b/frontend/src/scenes/surveys/Surveys.stories.tsx @@ -163,16 +163,16 @@ const meta: Meta = { decorators: [ mswDecorator({ get: { - '/api/projects/:team_id/surveys/': toPaginatedResponse([ + '/api/projects/team_id/surveys/': toPaginatedResponse([ MOCK_BASIC_SURVEY, MOCK_SURVEY_WITH_RELEASE_CONS, ]), - '/api/projects/:team_id/surveys/0187c279-bcae-0000-34f5-4f121921f005/': MOCK_BASIC_SURVEY, - '/api/projects/:team_id/surveys/0187c279-bcae-0000-34f5-4f121921f006/': MOCK_SURVEY_WITH_RELEASE_CONS, - '/api/projects/:team_id/surveys/responses_count/': MOCK_RESPONSES_COUNT, + '/api/projects/team_id/surveys/0187c279-bcae-0000-34f5-4f121921f005/': MOCK_BASIC_SURVEY, + '/api/projects/team_id/surveys/0187c279-bcae-0000-34f5-4f121921f006/': MOCK_SURVEY_WITH_RELEASE_CONS, + '/api/projects/team_id/surveys/responses_count/': MOCK_RESPONSES_COUNT, }, post: { - '/api/projects/:team_id/query/': (req) => { + '/api/projects/team_id/query/': (req) => { if ((req.body as any).kind == 'EventsQuery') { return MOCK_SURVEY_RESULTS }