:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
chore(nodejs): move schema into cdp/ (#66027)
José Sequeirabcd9c877108f
diff --git a/nodejs/src/cdp/_tests/builders/hogflow.builder.ts b/nodejs/src/cdp/_tests/builders/hogflow.builder.tsindex 384d1b2cfac3..b14cb1a72a88 100644--- a/nodejs/src/cdp/_tests/builders/hogflow.builder.ts+++ b/nodejs/src/cdp/_tests/builders/hogflow.builder.ts@@ -1,7 +1,7 @@import { randomUUID } from 'crypto'+import { HogFlow, HogFlowAction, HogFlowEdge } from '~/cdp/schema/hogflow'import { findActionByType } from '~/cdp/services/hogflows/hogflow-utils'-import { HogFlow, HogFlowAction, HogFlowEdge } from '~/schema/hogflow'import { logger } from '~/utils/logger'import { HOG_FILTERS_EXAMPLES } from '../examples'diff --git a/nodejs/src/cdp/_tests/fixtures-hogflows.ts b/nodejs/src/cdp/_tests/fixtures-hogflows.tsindex 9e6065233e84..80eed11943cd 100644--- a/nodejs/src/cdp/_tests/fixtures-hogflows.ts+++ b/nodejs/src/cdp/_tests/fixtures-hogflows.ts@@ -1,4 +1,4 @@-import { HogFlow } from '~/schema/hogflow'+import { HogFlow } from '~/cdp/schema/hogflow'import { insertRow } from '~/tests/helpers/sql'import { PostgresRouter } from '../../utils/db/postgres'diff --git a/nodejs/src/cdp/async-functions/conversations.ts b/nodejs/src/cdp/async-functions/conversations.tsindex 0cd17a6a5a47..d5c1d80baa5e 100644--- a/nodejs/src/cdp/async-functions/conversations.ts+++ b/nodejs/src/cdp/async-functions/conversations.ts@@ -1,6 +1,6 @@import { DateTime } from 'luxon'-import { CyclotronInvocationQueueParametersFetchSchema } from '~/schema/cyclotron'+import { CyclotronInvocationQueueParametersFetchSchema } from '~/cdp/schema/cyclotron'import { registerAsyncFunction } from '../async-function-registry'diff --git a/nodejs/src/cdp/async-functions/customer_analytics.ts b/nodejs/src/cdp/async-functions/customer_analytics.tsindex d8728ccef913..23b1d285a72b 100644--- a/nodejs/src/cdp/async-functions/customer_analytics.ts+++ b/nodejs/src/cdp/async-functions/customer_analytics.ts@@ -1,6 +1,6 @@import { DateTime } from 'luxon'-import { CyclotronInvocationQueueParametersFetchSchema } from '~/schema/cyclotron'+import { CyclotronInvocationQueueParametersFetchSchema } from '~/cdp/schema/cyclotron'import { registerAsyncFunction } from '../async-function-registry'diff --git a/nodejs/src/cdp/async-functions/fetch-handler.ts b/nodejs/src/cdp/async-functions/fetch-handler.tsindex cbe7c1d428b2..f8679b5d0cb9 100644--- a/nodejs/src/cdp/async-functions/fetch-handler.ts+++ b/nodejs/src/cdp/async-functions/fetch-handler.ts@@ -1,7 +1,7 @@import { pickBy } from 'lodash'import { DateTime } from 'luxon'-import { CyclotronInvocationQueueParametersFetchSchema } from '~/schema/cyclotron'+import { CyclotronInvocationQueueParametersFetchSchema } from '~/cdp/schema/cyclotron'import { registerAsyncFunction } from '../async-function-registry'diff --git a/nodejs/src/cdp/async-functions/send-email.ts b/nodejs/src/cdp/async-functions/send-email.tsindex d96d8439f77e..df495c5b3aa8 100644--- a/nodejs/src/cdp/async-functions/send-email.ts+++ b/nodejs/src/cdp/async-functions/send-email.ts@@ -1,6 +1,6 @@import { DateTime } from 'luxon'-import { CyclotronInvocationQueueParametersEmailSchema } from '~/schema/cyclotron'+import { CyclotronInvocationQueueParametersEmailSchema } from '~/cdp/schema/cyclotron'import { registerAsyncFunction } from '../async-function-registry'diff --git a/nodejs/src/cdp/cdp-api.test.ts b/nodejs/src/cdp/cdp-api.test.tsindex 2a514c868725..913a104c1e7b 100644--- a/nodejs/src/cdp/cdp-api.test.ts+++ b/nodejs/src/cdp/cdp-api.test.ts@@ -7,9 +7,9 @@ import supertest from 'supertest'import express from 'ultimate-express'import { setupExpressApp } from '~/api/router'+import { HogFlow } from '~/cdp/schema/hogflow'import { deleteKeysWithPrefix } from '~/common/redis/_tests/redis'import { createRedisV2PoolFromConfig } from '~/common/redis/redis-v2'-import { HogFlow } from '~/schema/hogflow'import { createCdpConsumerDeps } from '../../tests/helpers/cdp'import { forSnapshot } from '../../tests/helpers/snapshots'diff --git a/nodejs/src/cdp/consumers/cdp-batch-hogflow.consumer.test.ts b/nodejs/src/cdp/consumers/cdp-batch-hogflow.consumer.test.tsindex 75b8d160c22e..031d78e4a7b2 100644--- a/nodejs/src/cdp/consumers/cdp-batch-hogflow.consumer.test.ts+++ b/nodejs/src/cdp/consumers/cdp-batch-hogflow.consumer.test.ts@@ -1,6 +1,6 @@import { createMockJobQueue } from '../../../tests/helpers/mocks/job-queue.mock'-import { HogFlow } from '~/schema/hogflow'+import { HogFlow } from '~/cdp/schema/hogflow'import { UUIDT } from '~/utils/utils'import { createCdpConsumerDeps } from '../../../tests/helpers/cdp'diff --git a/nodejs/src/cdp/consumers/cdp-batch-hogflow.consumer.ts b/nodejs/src/cdp/consumers/cdp-batch-hogflow.consumer.tsindex 2bfbd1c3eab5..041a1958eb2b 100644--- a/nodejs/src/cdp/consumers/cdp-batch-hogflow.consumer.ts+++ b/nodejs/src/cdp/consumers/cdp-batch-hogflow.consumer.ts@@ -1,9 +1,9 @@import { Message } from 'node-rdkafka'+import { HogFlow } from '~/cdp/schema/hogflow'import { InternalFetchService } from '~/common/services/internal-fetch'import { instrumentFn, instrumented } from '~/common/tracing/tracing-utils'import { KAFKA_CDP_BATCH_HOGFLOW_REQUESTS } from '~/config/kafka-topics'-import { HogFlow } from '~/schema/hogflow'import { parseJSON } from '~/utils/json-parse'import { captureException } from '~/utils/posthog'diff --git a/nodejs/src/cdp/consumers/cdp-cyclotron-worker-hogflow-personhog.test.ts b/nodejs/src/cdp/consumers/cdp-cyclotron-worker-hogflow-personhog.test.tsindex 7538f6bc27cd..7afdd99907c5 100644--- a/nodejs/src/cdp/consumers/cdp-cyclotron-worker-hogflow-personhog.test.ts+++ b/nodejs/src/cdp/consumers/cdp-cyclotron-worker-hogflow-personhog.test.ts@@ -2,8 +2,8 @@ import { createMockJobQueue } from '~/tests/helpers/mocks/job-queue.mock'import { DateTime } from 'luxon'+import { HogFlow } from '~/cdp/schema/hogflow'import { PersonReadRepository } from '~/common/persons/repositories/person-repository'-import { HogFlow } from '~/schema/hogflow'import { createCdpConsumerDeps } from '~/tests/helpers/cdp'import { getFirstTeam, resetTestDatabase } from '~/tests/helpers/sql'diff --git a/nodejs/src/cdp/consumers/cdp-cyclotron-worker-hogflow.test.ts b/nodejs/src/cdp/consumers/cdp-cyclotron-worker-hogflow.test.tsindex 6ce116f6f970..fb2222d1397a 100644--- a/nodejs/src/cdp/consumers/cdp-cyclotron-worker-hogflow.test.ts+++ b/nodejs/src/cdp/consumers/cdp-cyclotron-worker-hogflow.test.ts@@ -2,8 +2,8 @@ import { createMockJobQueue } from '~/tests/helpers/mocks/job-queue.mock'import { DateTime } from 'luxon'+import { HogFlow } from '~/cdp/schema/hogflow'import { InternalPersonWithDistinctId, PersonReadRepository } from '~/common/persons/repositories/person-repository'-import { HogFlow } from '~/schema/hogflow'import { createCdpConsumerDeps } from '~/tests/helpers/cdp'import { createTeam, getFirstTeam, getTeam, resetTestDatabase } from '~/tests/helpers/sql'import { PostgresUse } from '~/utils/db/postgres'diff --git a/nodejs/src/cdp/consumers/cdp-data-warehouse-events.consumer.test.ts b/nodejs/src/cdp/consumers/cdp-data-warehouse-events.consumer.test.tsindex 3eeafd614d1d..70918ce28e04 100644--- a/nodejs/src/cdp/consumers/cdp-data-warehouse-events.consumer.test.ts+++ b/nodejs/src/cdp/consumers/cdp-data-warehouse-events.consumer.test.ts@@ -1,7 +1,7 @@import { createMockJobQueue } from '../../../tests/helpers/mocks/job-queue.mock'import { mockProducerObserver } from '../../../tests/helpers/mocks/producer.mock'-import { HogFlow } from '~/schema/hogflow'+import { HogFlow } from '~/cdp/schema/hogflow'import { createCdpConsumerDeps } from '../../../tests/helpers/cdp'import { createOrganization, createTeam, getFirstTeam, getTeam, resetTestDatabase } from '../../../tests/helpers/sql'diff --git a/nodejs/src/cdp/consumers/cdp-events-consumer.test.ts b/nodejs/src/cdp/consumers/cdp-events-consumer.test.tsindex e817a4d28101..f8b320e6e951 100644--- a/nodejs/src/cdp/consumers/cdp-events-consumer.test.ts+++ b/nodejs/src/cdp/consumers/cdp-events-consumer.test.ts@@ -1,8 +1,8 @@import { createMockJobQueue } from '../../../tests/helpers/mocks/job-queue.mock'import { mockProducerObserver } from '../../../tests/helpers/mocks/producer.mock'+import { HogFlow } from '~/cdp/schema/hogflow'import { GroupReadRepository } from '~/common/groups/repositories/group-repository.interface'-import { HogFlow } from '~/schema/hogflow'import { createCdpConsumerDeps } from '../../../tests/helpers/cdp'import {diff --git a/nodejs/src/cdp/consumers/cdp-hogflow-subscription-matcher.consumer.test.ts b/nodejs/src/cdp/consumers/cdp-hogflow-subscription-matcher.consumer.test.tsindex 366562e45879..17ee9c3d41c4 100644--- a/nodejs/src/cdp/consumers/cdp-hogflow-subscription-matcher.consumer.test.ts+++ b/nodejs/src/cdp/consumers/cdp-hogflow-subscription-matcher.consumer.test.ts@@ -1,4 +1,5 @@-import { HogFlow } from '../../schema/hogflow'+import { HogFlow } from '~/cdp/schema/hogflow'+import { parseJSON } from '../../utils/json-parse'import { logger } from '../../utils/logger'import * as posthogUtils from '../../utils/posthog'diff --git a/nodejs/src/cdp/consumers/cdp-hogflow-subscription-matcher.consumer.ts b/nodejs/src/cdp/consumers/cdp-hogflow-subscription-matcher.consumer.tsindex a6255da1ebbb..aec7b776cd5f 100644--- a/nodejs/src/cdp/consumers/cdp-hogflow-subscription-matcher.consumer.ts+++ b/nodejs/src/cdp/consumers/cdp-hogflow-subscription-matcher.consumer.ts@@ -2,11 +2,11 @@ import { Message } from 'node-rdkafka'import { Pool } from 'pg'import { Counter, Histogram } from 'prom-client'+import { HogFlow, HogFlowAction } from '~/cdp/schema/hogflow'import { instrumentFn, instrumented } from '~/common/tracing/tracing-utils'import { KAFKA_EVENTS_JSON } from '../../config/kafka-topics'import { KafkaConsumerInterface, RdKafkaConsumerConfig, createKafkaConsumer } from '../../kafka/consumer'-import { HogFlow, HogFlowAction } from '../../schema/hogflow'import { HealthCheckResult, PluginsServerConfig, RawClickHouseEvent } from '../../types'import { parseJSON } from '../../utils/json-parse'import { logger } from '../../utils/logger'diff --git a/nodejs/src/cdp/consumers/cdp-source-webhooks.consumer.test.ts b/nodejs/src/cdp/consumers/cdp-source-webhooks.consumer.test.tsindex a65705e90d65..c3fc3781f2bb 100644--- a/nodejs/src/cdp/consumers/cdp-source-webhooks.consumer.test.ts+++ b/nodejs/src/cdp/consumers/cdp-source-webhooks.consumer.test.ts@@ -10,10 +10,10 @@ import express from 'ultimate-express'import { setupExpressApp } from '~/api/router'import { insertHogFunction, insertHogFunctionTemplate } from '~/cdp/_tests/fixtures'import { CdpApi } from '~/cdp/cdp-api'+import { HogFlow } from '~/cdp/schema/hogflow'import { template as pixelTemplate } from '~/cdp/templates/_sources/pixel/pixel.template'import { template as incomingWebhookTemplate } from '~/cdp/templates/_sources/webhook/incoming_webhook.template'import { CyclotronJobInvocationHogFunction, CyclotronJobInvocationResult, HogFunctionType } from '~/cdp/types'-import { HogFlow } from '~/schema/hogflow'import { createCdpConsumerDeps } from '~/tests/helpers/cdp'import { forSnapshot } from '~/tests/helpers/snapshots'import { getFirstTeam, resetTestDatabase } from '~/tests/helpers/sql'diff --git a/nodejs/src/cdp/consumers/cdp-source-webhooks.consumer.ts b/nodejs/src/cdp/consumers/cdp-source-webhooks.consumer.tsindex de88cc8f29a5..db9a5987d474 100644--- a/nodejs/src/cdp/consumers/cdp-source-webhooks.consumer.ts+++ b/nodejs/src/cdp/consumers/cdp-source-webhooks.consumer.ts@@ -1,8 +1,8 @@import { DateTime } from 'luxon'import type { ModifiedRequest } from '~/api/router'+import { HogFlow } from '~/cdp/schema/hogflow'import { instrumented } from '~/common/tracing/tracing-utils'-import { HogFlow } from '~/schema/hogflow'import { HealthCheckResult, HealthCheckResultOk, PluginsServerConfig } from '../../types'import { logger } from '../../utils/logger'diff --git a/nodejs/src/schema/cyclotron.ts b/nodejs/src/cdp/schema/cyclotron.tssimilarity index 100%rename from nodejs/src/schema/cyclotron.tsrename to nodejs/src/cdp/schema/cyclotron.tsdiff --git a/nodejs/src/schema/hogflow.test.ts b/nodejs/src/cdp/schema/hogflow.test.tssimilarity index 100%rename from nodejs/src/schema/hogflow.test.tsrename to nodejs/src/cdp/schema/hogflow.test.tsdiff --git a/nodejs/src/schema/hogflow.ts b/nodejs/src/cdp/schema/hogflow.tssimilarity index 100%rename from nodejs/src/schema/hogflow.tsrename to nodejs/src/cdp/schema/hogflow.tsdiff --git a/nodejs/src/cdp/services/hog-executor.service.test.ts b/nodejs/src/cdp/services/hog-executor.service.test.tsindex 58182e46d6dd..fc52ffefb01a 100644--- a/nodejs/src/cdp/services/hog-executor.service.test.ts+++ b/nodejs/src/cdp/services/hog-executor.service.test.ts@@ -3,7 +3,7 @@ import { createServer } from 'http'import { DateTime } from 'luxon'import { AddressInfo } from 'net'-import { CyclotronInvocationQueueParametersFetchType } from '~/schema/cyclotron'+import { CyclotronInvocationQueueParametersFetchType } from '~/cdp/schema/cyclotron'import { logger } from '~/utils/logger'import { HogExecutorService } from '../../../src/cdp/services/hog-executor.service'diff --git a/nodejs/src/cdp/services/hog-flow-invocation-pipeline.service.ts b/nodejs/src/cdp/services/hog-flow-invocation-pipeline.service.tsindex d60d8b391dae..6c9b92491dfa 100644--- a/nodejs/src/cdp/services/hog-flow-invocation-pipeline.service.ts+++ b/nodejs/src/cdp/services/hog-flow-invocation-pipeline.service.ts@@ -1,7 +1,7 @@import { DateTime } from 'luxon'+import { HogFlow } from '~/cdp/schema/hogflow'import { instrumentFn, instrumented } from '~/common/tracing/tracing-utils'-import { HogFlow } from '~/schema/hogflow'import { RedisV2 } from '../../common/redis/redis-v2'import { KeyedRateLimitRequest, KeyedRateLimiterService } from '../../common/services/keyed-rate-limiter.service'diff --git a/nodejs/src/cdp/services/hog-inputs.service.ts b/nodejs/src/cdp/services/hog-inputs.service.tsindex d4cc68c65cf3..309dc84cfad5 100644--- a/nodejs/src/cdp/services/hog-inputs.service.ts+++ b/nodejs/src/cdp/services/hog-inputs.service.ts@@ -1,7 +1,7 @@import { convertHogToJS } from '@posthog/hogvm'+import { CyclotronInputType } from '~/cdp/schema/cyclotron'import { ACCESS_TOKEN_PLACEHOLDER } from '~/config/constants'-import { CyclotronInputType } from '~/schema/cyclotron'import { HogFunctionInvocationGlobals, HogFunctionInvocationGlobalsWithInputs, HogFunctionType } from '../types'import { execHog } from '../utils/hog-exec'diff --git a/nodejs/src/cdp/services/hogflows/actions/action.interface.ts b/nodejs/src/cdp/services/hogflows/actions/action.interface.tsindex f2d8a21f7ffd..877244e368d8 100644--- a/nodejs/src/cdp/services/hogflows/actions/action.interface.ts+++ b/nodejs/src/cdp/services/hogflows/actions/action.interface.ts@@ -1,6 +1,7 @@import { DateTime } from 'luxon'-import { HogFlowAction } from '../../../../schema/hogflow'+import { HogFlowAction } from '~/cdp/schema/hogflow'+import { CyclotronJobInvocationHogFlow, CyclotronJobInvocationResult } from '../../../types'import { HogExecutorExecuteAsyncOptions } from '../../hog-executor.service'diff --git a/nodejs/src/cdp/services/hogflows/actions/conditional_branch.test.ts b/nodejs/src/cdp/services/hogflows/actions/conditional_branch.test.tsindex 030f3cf5d1d3..b13a79dabd24 100644--- a/nodejs/src/cdp/services/hogflows/actions/conditional_branch.test.ts+++ b/nodejs/src/cdp/services/hogflows/actions/conditional_branch.test.ts@@ -3,9 +3,9 @@ import { DateTime } from 'luxon'import { FixtureHogFlowBuilder } from '~/cdp/_tests/builders/hogflow.builder'import { HOG_FILTERS_EXAMPLES } from '~/cdp/_tests/examples'import { createExampleHogFlowInvocation } from '~/cdp/_tests/fixtures-hogflows'+import { HogFlow, HogFlowAction } from '~/cdp/schema/hogflow'import { CyclotronJobInvocationHogFlow } from '~/cdp/types'import { createInvocationResult } from '~/cdp/utils/invocation-utils'-import { HogFlow, HogFlowAction } from '~/schema/hogflow'import { findActionById, findActionByType } from '../hogflow-utils'import { ConditionalBranchHandler, checkConditions } from './conditional_branch'diff --git a/nodejs/src/cdp/services/hogflows/actions/conditional_branch.ts b/nodejs/src/cdp/services/hogflows/actions/conditional_branch.tsindex b0bf00abd07d..70dd58277ef3 100644--- a/nodejs/src/cdp/services/hogflows/actions/conditional_branch.ts+++ b/nodejs/src/cdp/services/hogflows/actions/conditional_branch.ts@@ -1,8 +1,8 @@import { DateTime } from 'luxon'+import { HogFlowAction } from '~/cdp/schema/hogflow'import { CyclotronJobInvocationHogFlow } from '~/cdp/types'import { filterFunctionInstrumented } from '~/cdp/utils/hog-function-filtering'-import { HogFlowAction } from '~/schema/hogflow'import { findContinueAction, findNextAction, isEvaluableCondition } from '../hogflow-utils'import { ActionHandler, ActionHandlerOptions, ActionHandlerResult } from './action.interface'diff --git a/nodejs/src/cdp/services/hogflows/actions/delay.ts b/nodejs/src/cdp/services/hogflows/actions/delay.tsindex a502791b5da7..505f10e106f4 100644--- a/nodejs/src/cdp/services/hogflows/actions/delay.ts+++ b/nodejs/src/cdp/services/hogflows/actions/delay.ts@@ -1,6 +1,7 @@import { DateTime, DurationLike } from 'luxon'-import { HogFlowAction } from '../../../../schema/hogflow'+import { HogFlowAction } from '~/cdp/schema/hogflow'+import { findContinueAction } from '../hogflow-utils'import { ActionHandler, ActionHandlerOptions, ActionHandlerResult } from './action.interface'diff --git a/nodejs/src/cdp/services/hogflows/actions/hog_function.test.ts b/nodejs/src/cdp/services/hogflows/actions/hog_function.test.tsindex cf56367937fb..3b32d2cfd08a 100644--- a/nodejs/src/cdp/services/hogflows/actions/hog_function.test.ts+++ b/nodejs/src/cdp/services/hogflows/actions/hog_function.test.ts@@ -5,12 +5,12 @@ import { DateTime } from 'luxon'import { FixtureHogFlowBuilder } from '~/cdp/_tests/builders/hogflow.builder'import { insertHogFunctionTemplate, insertIntegration } from '~/cdp/_tests/fixtures'import { createExampleHogFlowInvocation } from '~/cdp/_tests/fixtures-hogflows'+import { HogFlowAction } from '~/cdp/schema/hogflow'import { createInvocationResult } from '~/cdp/utils/invocation-utils'import { getFirstTeam, resetTestDatabase } from '~/tests/helpers/sql'import { Hub, Team } from '~/types'import { closeHub, createHub } from '~/utils/db/hub'-import { HogFlowAction } from '../../../../schema/hogflow'import { CyclotronJobInvocationHogFlow, DBHogFunctionTemplate } from '../../../types'import { HogExecutorService } from '../../hog-executor.service'import { HogInputsService } from '../../hog-inputs.service'diff --git a/nodejs/src/cdp/services/hogflows/actions/hog_function.ts b/nodejs/src/cdp/services/hogflows/actions/hog_function.tsindex 96f4f4f3c82c..fe8f10820f94 100644--- a/nodejs/src/cdp/services/hogflows/actions/hog_function.ts+++ b/nodejs/src/cdp/services/hogflows/actions/hog_function.ts@@ -1,6 +1,7 @@import { DateTime } from 'luxon'-import { HogFlowAction } from '../../../../schema/hogflow'+import { HogFlowAction } from '~/cdp/schema/hogflow'+import {CyclotronJobInvocationHogFlow,CyclotronJobInvocationHogFunction,diff --git a/nodejs/src/cdp/services/hogflows/actions/random_cohort_branch.test.ts b/nodejs/src/cdp/services/hogflows/actions/random_cohort_branch.test.tsindex c870fc16424c..1c7a0f885751 100644--- a/nodejs/src/cdp/services/hogflows/actions/random_cohort_branch.test.ts+++ b/nodejs/src/cdp/services/hogflows/actions/random_cohort_branch.test.ts@@ -1,7 +1,7 @@import { FixtureHogFlowBuilder } from '~/cdp/_tests/builders/hogflow.builder'import { createExampleHogFlowInvocation } from '~/cdp/_tests/fixtures-hogflows'+import { HogFlowAction } from '~/cdp/schema/hogflow'import { CyclotronJobInvocationHogFlow } from '~/cdp/types'-import { HogFlowAction } from '~/schema/hogflow'import { findActionById, findActionByType } from '../hogflow-utils'import { getRandomCohort } from './random_cohort_branch'diff --git a/nodejs/src/cdp/services/hogflows/actions/random_cohort_branch.ts b/nodejs/src/cdp/services/hogflows/actions/random_cohort_branch.tsindex d8249ee33944..2054b6c40dee 100644--- a/nodejs/src/cdp/services/hogflows/actions/random_cohort_branch.ts+++ b/nodejs/src/cdp/services/hogflows/actions/random_cohort_branch.ts@@ -1,5 +1,5 @@+import { HogFlowAction } from '~/cdp/schema/hogflow'import { CyclotronJobInvocationHogFlow } from '~/cdp/types'-import { HogFlowAction } from '~/schema/hogflow'import { findNextAction } from '../hogflow-utils'import { ActionHandler, ActionHandlerOptions, ActionHandlerResult } from './action.interface'diff --git a/nodejs/src/cdp/services/hogflows/actions/trigger.handler.ts b/nodejs/src/cdp/services/hogflows/actions/trigger.handler.tsindex 847ce32e8a18..c747e6db3903 100644--- a/nodejs/src/cdp/services/hogflows/actions/trigger.handler.ts+++ b/nodejs/src/cdp/services/hogflows/actions/trigger.handler.ts@@ -1,5 +1,5 @@+import { HogFlowAction } from '~/cdp/schema/hogflow'import { filterFunctionInstrumented } from '~/cdp/utils/hog-function-filtering'-import { HogFlowAction } from '~/schema/hogflow'import { findContinueAction } from '../hogflow-utils'import { ActionHandler, ActionHandlerOptions, ActionHandlerResult } from './action.interface'diff --git a/nodejs/src/cdp/services/hogflows/actions/wait_until_time_window.test.ts b/nodejs/src/cdp/services/hogflows/actions/wait_until_time_window.test.tsindex 9b7c5d62b983..be35b0d1b06d 100644--- a/nodejs/src/cdp/services/hogflows/actions/wait_until_time_window.test.ts+++ b/nodejs/src/cdp/services/hogflows/actions/wait_until_time_window.test.ts@@ -1,8 +1,8 @@import { DateTime } from 'luxon'import { FixtureHogFlowBuilder } from '~/cdp/_tests/builders/hogflow.builder'+import { HogFlowAction } from '~/cdp/schema/hogflow'import { CyclotronPerson } from '~/cdp/types'-import { HogFlowAction } from '~/schema/hogflow'import { findActionByType } from '../hogflow-utils'import { getWaitUntilTime, resolveTimezone } from './wait_until_time_window'diff --git a/nodejs/src/cdp/services/hogflows/actions/wait_until_time_window.ts b/nodejs/src/cdp/services/hogflows/actions/wait_until_time_window.tsindex 4125787c0046..0b5907633f9d 100644--- a/nodejs/src/cdp/services/hogflows/actions/wait_until_time_window.ts+++ b/nodejs/src/cdp/services/hogflows/actions/wait_until_time_window.ts@@ -1,7 +1,7 @@import { DateTime } from 'luxon'+import { HogFlowAction } from '~/cdp/schema/hogflow'import { CyclotronPerson } from '~/cdp/types'-import { HogFlowAction } from '~/schema/hogflow'import { findContinueAction } from '../hogflow-utils'import { ActionHandler, ActionHandlerOptions, ActionHandlerResult } from './action.interface'diff --git a/nodejs/src/cdp/services/hogflows/hogflow-duplicate-observer.service.ts b/nodejs/src/cdp/services/hogflows/hogflow-duplicate-observer.service.tsindex 0081198f1b00..91a9067b09d8 100644--- a/nodejs/src/cdp/services/hogflows/hogflow-duplicate-observer.service.ts+++ b/nodejs/src/cdp/services/hogflows/hogflow-duplicate-observer.service.ts@@ -1,8 +1,8 @@import { Counter } from 'prom-client'+import { HogFlowAction } from '~/cdp/schema/hogflow'import { RedisClient, RedisV2 } from '~/common/redis/redis-v2'-import { HogFlowAction } from '../../../schema/hogflow'import { logger } from '../../../utils/logger'import { CyclotronJobInvocationHogFlow } from '../../types'import { mirrorCall } from '../../utils/mirror-call'diff --git a/nodejs/src/cdp/services/hogflows/hogflow-executor.service.test.ts b/nodejs/src/cdp/services/hogflows/hogflow-executor.service.test.tsindex 237d1e65c7ec..84e3df87935a 100644--- a/nodejs/src/cdp/services/hogflows/hogflow-executor.service.test.ts+++ b/nodejs/src/cdp/services/hogflows/hogflow-executor.service.test.ts@@ -5,7 +5,7 @@ import { FixtureHogFlowBuilder, SimpleHogFlowRepresentation } from '~/cdp/_testsimport { createHogExecutionGlobals, insertHogFunctionTemplate, insertIntegration } from '~/cdp/_tests/fixtures'import { compileHog } from '~/cdp/templates/compiler'import { template as posthogCaptureTemplate } from '~/cdp/templates/_destinations/posthog_capture/posthog-capture.template'-import { HogFlow } from '~/schema/hogflow'+import { HogFlow } from '~/cdp/schema/hogflow'import { getFirstTeam, resetTestDatabase } from '~/tests/helpers/sql'import { fetch } from '~/utils/request'diff --git a/nodejs/src/cdp/services/hogflows/hogflow-executor.service.ts b/nodejs/src/cdp/services/hogflows/hogflow-executor.service.tsindex f7f9f1d68172..0e0f51928def 100644--- a/nodejs/src/cdp/services/hogflows/hogflow-executor.service.ts+++ b/nodejs/src/cdp/services/hogflows/hogflow-executor.service.ts@@ -1,7 +1,8 @@import { get } from 'lodash'import { DateTime } from 'luxon'-import { HogFlow, HogFlowAction } from '../../../schema/hogflow'+import { HogFlow, HogFlowAction } from '~/cdp/schema/hogflow'+import { logger } from '../../../utils/logger'import { UUIDT } from '../../../utils/utils'import {diff --git a/nodejs/src/cdp/services/hogflows/hogflow-functions.service.ts b/nodejs/src/cdp/services/hogflows/hogflow-functions.service.tsindex f5a8ea783680..a9fa7abe21b1 100644--- a/nodejs/src/cdp/services/hogflows/hogflow-functions.service.ts+++ b/nodejs/src/cdp/services/hogflows/hogflow-functions.service.ts@@ -1,3 +1,4 @@+import { HogFlow, HogFlowAction } from '~/cdp/schema/hogflow'import {CyclotronJobInvocationHogFlow,CyclotronJobInvocationHogFunction,@@ -5,7 +6,6 @@ import {HogFunctionInvocationGlobals,HogFunctionType,} from '~/cdp/types'-import { HogFlow, HogFlowAction } from '~/schema/hogflow'import { HogExecutorExecuteAsyncOptions, HogExecutorService } from '../hog-executor.service'import { HogFunctionTemplateManagerService } from '../managers/hog-function-template-manager.service'diff --git a/nodejs/src/cdp/services/hogflows/hogflow-manager.service.test.ts b/nodejs/src/cdp/services/hogflows/hogflow-manager.service.test.tsindex 5cc58f8a0d51..717a06b1bc0b 100644--- a/nodejs/src/cdp/services/hogflows/hogflow-manager.service.test.ts+++ b/nodejs/src/cdp/services/hogflows/hogflow-manager.service.test.ts@@ -1,7 +1,7 @@import '~/tests/helpers/mocks/date.mock'import { FixtureHogFlowBuilder } from '~/cdp/_tests/builders/hogflow.builder'-import { HogFlow } from '~/schema/hogflow'+import { HogFlow } from '~/cdp/schema/hogflow'import { forSnapshot } from '~/tests/helpers/snapshots'import { createTeam, getTeam, resetTestDatabase } from '~/tests/helpers/sql'import { Hub } from '~/types'diff --git a/nodejs/src/cdp/services/hogflows/hogflow-manager.service.ts b/nodejs/src/cdp/services/hogflows/hogflow-manager.service.tsindex ea8224fdbc90..e867454acccd 100644--- a/nodejs/src/cdp/services/hogflows/hogflow-manager.service.ts+++ b/nodejs/src/cdp/services/hogflows/hogflow-manager.service.ts@@ -1,4 +1,4 @@-import { HogFlow } from '~/schema/hogflow'+import { HogFlow } from '~/cdp/schema/hogflow'import { Team } from '~/types'import { PostgresRouter, PostgresUse } from '~/utils/db/postgres'import { LazyLoader } from '~/utils/lazy-loader'diff --git a/nodejs/src/cdp/services/hogflows/hogflow-quota-limiting.test.ts b/nodejs/src/cdp/services/hogflows/hogflow-quota-limiting.test.tsindex b6c0a2690694..35a458be5c6d 100644--- a/nodejs/src/cdp/services/hogflows/hogflow-quota-limiting.test.ts+++ b/nodejs/src/cdp/services/hogflows/hogflow-quota-limiting.test.ts@@ -1,5 +1,6 @@+import { HogFlow } from '~/cdp/schema/hogflow'+import { QuotaLimiting } from '../../../common/services/quota-limiting.service'-import { HogFlow } from '../../../schema/hogflow'import { CyclotronJobInvocationHogFlow } from '../../types'import { HogFunctionMonitoringService } from '../monitoring/hog-function-monitoring.service'import {diff --git a/nodejs/src/cdp/services/hogflows/hogflow-quota-limiting.ts b/nodejs/src/cdp/services/hogflows/hogflow-quota-limiting.tsindex 1d88a6e38614..93d7c0ebfecd 100644--- a/nodejs/src/cdp/services/hogflows/hogflow-quota-limiting.ts+++ b/nodejs/src/cdp/services/hogflows/hogflow-quota-limiting.ts@@ -1,7 +1,8 @@import { Counter } from 'prom-client'+import { HogFlow } from '~/cdp/schema/hogflow'+import { QuotaLimiting } from '../../../common/services/quota-limiting.service'-import { HogFlow } from '../../../schema/hogflow'import { CyclotronJobInvocationHogFlow } from '../../types'import { HogFunctionMonitoringService } from '../monitoring/hog-function-monitoring.service'diff --git a/nodejs/src/cdp/services/hogflows/hogflow-utils.ts b/nodejs/src/cdp/services/hogflows/hogflow-utils.tsindex a5a32336141b..5de355b30153 100644--- a/nodejs/src/cdp/services/hogflows/hogflow-utils.ts+++ b/nodejs/src/cdp/services/hogflows/hogflow-utils.ts@@ -1,9 +1,9 @@import { DateTime } from 'luxon'import { Summary } from 'prom-client'+import { HogFlow, HogFlowAction } from '~/cdp/schema/hogflow'import { CyclotronJobInvocationHogFlow, CyclotronJobInvocationResult } from '~/cdp/types'import { filterFunctionInstrumented } from '~/cdp/utils/hog-function-filtering'-import { HogFlow, HogFlowAction } from '~/schema/hogflow'export const findActionById = (hogFlow: HogFlow, id: string): HogFlowAction => {const action = hogFlow.actions.find((action) => action.id === id)diff --git a/nodejs/src/cdp/services/job-queue/job-queue-postgres.ts b/nodejs/src/cdp/services/job-queue/job-queue-postgres.tsindex 8665f2cf3f6d..6c5a5de259f3 100644--- a/nodejs/src/cdp/services/job-queue/job-queue-postgres.ts+++ b/nodejs/src/cdp/services/job-queue/job-queue-postgres.ts@@ -15,7 +15,7 @@ import {CyclotronWorker,} from '@posthog/cyclotron'-import { CyclotronInvocationQueueParametersType } from '~/schema/cyclotron'+import { CyclotronInvocationQueueParametersType } from '~/cdp/schema/cyclotron'import { HealthCheckResult, HealthCheckResultError, HealthCheckResultOk } from '../../../types'import { logger } from '../../../utils/logger'diff --git a/nodejs/src/cdp/services/messaging/email.service.test.ts b/nodejs/src/cdp/services/messaging/email.service.test.tsindex 17f69377c11c..5b3bd69d662b 100644--- a/nodejs/src/cdp/services/messaging/email.service.test.ts+++ b/nodejs/src/cdp/services/messaging/email.service.test.ts@@ -3,8 +3,8 @@ import { mockFetch } from '~/tests/helpers/mocks/request.mock'import { MessageRejected, SendingPausedException, TooManyRequestsException } from '@aws-sdk/client-sesv2'import { createExampleInvocation, insertIntegration } from '~/cdp/_tests/fixtures'+import { CyclotronInvocationQueueParametersEmailType } from '~/cdp/schema/cyclotron'import { CyclotronJobInvocationHogFunction } from '~/cdp/types'-import { CyclotronInvocationQueueParametersEmailType } from '~/schema/cyclotron'import { waitForExpect } from '~/tests/helpers/expectations'import { getFirstTeam, resetTestDatabase } from '~/tests/helpers/sql'import { closeHub, createHub } from '~/utils/db/hub'diff --git a/nodejs/src/cdp/services/messaging/email.service.ts b/nodejs/src/cdp/services/messaging/email.service.tsindex fe6731fb725f..da229c5ca5d0 100644--- a/nodejs/src/cdp/services/messaging/email.service.ts+++ b/nodejs/src/cdp/services/messaging/email.service.ts@@ -3,10 +3,10 @@ import { DateTime } from 'luxon'import { SendMailOptions } from 'nodemailer'import { Counter } from 'prom-client'+import { CyclotronInvocationQueueParametersEmailType } from '~/cdp/schema/cyclotron'import { CyclotronJobInvocationHogFunction, CyclotronJobInvocationResult, IntegrationType } from '~/cdp/types'import { createAddLogFunction, logEntry } from '~/cdp/utils'import { createInvocationResult } from '~/cdp/utils/invocation-utils'-import { CyclotronInvocationQueueParametersEmailType } from '~/schema/cyclotron'import { IntegrationManagerService } from '../managers/integration-manager.service'import { RecipientManagerRecipient } from '../managers/recipients-manager.service'diff --git a/nodejs/src/cdp/services/messaging/recipient-preferences.service.test.ts b/nodejs/src/cdp/services/messaging/recipient-preferences.service.test.tsindex 3e3f3a9dd5ed..4368cd670980 100644--- a/nodejs/src/cdp/services/messaging/recipient-preferences.service.test.ts+++ b/nodejs/src/cdp/services/messaging/recipient-preferences.service.test.ts@@ -1,5 +1,6 @@import { FixtureHogFlowBuilder } from '~/cdp/_tests/builders/hogflow.builder'import { createExampleInvocation } from '~/cdp/_tests/fixtures'+import { HogFlowAction } from '~/cdp/schema/hogflow'import { CyclotronJobInvocationHogFunction } from '~/cdp/types'import { getFirstTeam, resetTestDatabase } from '~/tests/helpers/sql'import { Hub, Team } from '~/types'@@ -7,7 +8,6 @@ import { closeHub, createHub } from '~/utils/db/hub'import { logger } from '~/utils/logger'import { UUIDT } from '~/utils/utils'-import { HogFlowAction } from '../../../schema/hogflow'import { RecipientsManagerService } from '../managers/recipients-manager.service'import { RecipientPreferencesService } from './recipient-preferences.service'import { RecipientTokensService } from './recipient-tokens.service'diff --git a/nodejs/src/cdp/services/messaging/recipient-preferences.service.ts b/nodejs/src/cdp/services/messaging/recipient-preferences.service.tsindex 97d5d86a7ff1..44a4ff663ef2 100644--- a/nodejs/src/cdp/services/messaging/recipient-preferences.service.ts+++ b/nodejs/src/cdp/services/messaging/recipient-preferences.service.ts@@ -1,6 +1,6 @@+import { HogFlowAction } from '~/cdp/schema/hogflow'import { logger } from '~/utils/logger'-import { HogFlowAction } from '../../../schema/hogflow'import { CyclotronJobInvocationHogFunction } from '../../types'import { RecipientsManagerService } from '../managers/recipients-manager.service'diff --git a/nodejs/src/cdp/services/monitoring/hog-masker.service.test.ts b/nodejs/src/cdp/services/monitoring/hog-masker.service.test.tsindex e70afc8cf93b..cd5a5e9ccceb 100644--- a/nodejs/src/cdp/services/monitoring/hog-masker.service.test.ts+++ b/nodejs/src/cdp/services/monitoring/hog-masker.service.test.ts@@ -1,6 +1,6 @@+import { HogFlow } from '~/cdp/schema/hogflow'import { deleteKeysWithPrefix } from '~/common/redis/_tests/redis'import { RedisV2, createRedisV2PoolFromConfig } from '~/common/redis/redis-v2'-import { HogFlow } from '~/schema/hogflow'import { Hub } from '~/types'import { closeHub, createHub } from '~/utils/db/hub'import { delay } from '~/utils/utils'diff --git a/nodejs/src/cdp/templates/test/test-helpers.ts b/nodejs/src/cdp/templates/test/test-helpers.tsindex 35ff4eacca78..8162159e9128 100644--- a/nodejs/src/cdp/templates/test/test-helpers.ts+++ b/nodejs/src/cdp/templates/test/test-helpers.ts@@ -3,11 +3,11 @@ import { merge as mergeDeep } from 'lodash'import { Settings } from 'luxon'import { getTransformationFunctions } from '~/cdp/hog-transformations/transformation-functions'+import { CyclotronInputType } from '~/cdp/schema/cyclotron'import { formatLiquidInput } from '~/cdp/services/hog-inputs.service'import { NativeDestinationExecutorService } from '~/cdp/services/native-destination-executor.service'import { isNativeHogFunction } from '~/cdp/utils'import { defaultConfig } from '~/config/config'-import { CyclotronInputType } from '~/schema/cyclotron'import { GeoIPService, GeoIp } from '~/utils/geoip'import { PluginsServerConfig } from '../../../types'diff --git a/nodejs/src/cdp/types.ts b/nodejs/src/cdp/types.tsindex dd67ef043c20..c0bb5ae58512 100644--- a/nodejs/src/cdp/types.ts+++ b/nodejs/src/cdp/types.ts@@ -2,9 +2,9 @@ import { DateTime } from 'luxon'import { VMState } from '@posthog/hogvm'-import { CyclotronInputType, CyclotronInvocationQueueParametersType } from '~/schema/cyclotron'+import { CyclotronInputType, CyclotronInvocationQueueParametersType } from '~/cdp/schema/cyclotron'+import { HogFlow } from '~/cdp/schema/hogflow'-import { HogFlow } from '../schema/hogflow'import {ClickHouseTimestamp,ElementPropertyFilter,diff --git a/nodejs/src/cdp/utils/aws-sigv4.test.ts b/nodejs/src/cdp/utils/aws-sigv4.test.tsindex a2aa0137825d..b9e8f58f1c29 100644--- a/nodejs/src/cdp/utils/aws-sigv4.test.ts+++ b/nodejs/src/cdp/utils/aws-sigv4.test.ts@@ -1,4 +1,4 @@-import { CyclotronInvocationQueueParametersFetchAwsSigV4Type } from '~/schema/cyclotron'+import { CyclotronInvocationQueueParametersFetchAwsSigV4Type } from '~/cdp/schema/cyclotron'import { HogFunctionType } from '../types'import { resolveAwsSigV4Credentials, signAwsRequest } from './aws-sigv4'diff --git a/nodejs/src/cdp/utils/aws-sigv4.ts b/nodejs/src/cdp/utils/aws-sigv4.tsindex 437917bc62c4..a493d3e2f8d8 100644--- a/nodejs/src/cdp/utils/aws-sigv4.ts+++ b/nodejs/src/cdp/utils/aws-sigv4.ts@@ -1,6 +1,6 @@import { createHash, createHmac } from 'node:crypto'-import { CyclotronInvocationQueueParametersFetchAwsSigV4Type } from '~/schema/cyclotron'+import { CyclotronInvocationQueueParametersFetchAwsSigV4Type } from '~/cdp/schema/cyclotron'import { HogFunctionType } from '../types'diff --git a/nodejs/src/cdp/utils/hog-function-filtering.ts b/nodejs/src/cdp/utils/hog-function-filtering.tsindex db2f163d3b24..c84892cfd76f 100644--- a/nodejs/src/cdp/utils/hog-function-filtering.ts+++ b/nodejs/src/cdp/utils/hog-function-filtering.ts@@ -3,7 +3,8 @@ import { Counter, Histogram } from 'prom-client'import { ExecResult } from '@posthog/hogvm'-import { HogFlow } from '../../schema/hogflow'+import { HogFlow } from '~/cdp/schema/hogflow'+import { RawClickHouseEvent } from '../../types'import { parseJSON } from '../../utils/json-parse'import { logger } from '../../utils/logger'diff --git a/nodejs/src/cdp/workflows-e2e.test.ts b/nodejs/src/cdp/workflows-e2e.test.tsindex d8a85d239767..b5dffa4d3587 100644--- a/nodejs/src/cdp/workflows-e2e.test.ts+++ b/nodejs/src/cdp/workflows-e2e.test.ts@@ -19,6 +19,7 @@ import { DateTime } from 'luxon'import { Pool } from 'pg'import { register } from 'prom-client'+import { HogFlow } from '~/cdp/schema/hogflow'import { InternalPersonWithDistinctId, PersonReadRepository } from '~/common/persons/repositories/person-repository'import { deleteKeysWithPrefix } from '~/common/redis/_tests/redis'import { createCdpConsumerDeps } from '~/tests/helpers/cdp'@@ -28,7 +29,6 @@ import { getFirstTeam, resetTestDatabase } from '~/tests/helpers/sql'import { KAFKA_APP_METRICS_2, KAFKA_LOG_ENTRIES } from '../../src/config/kafka-topics'import { KafkaProducerWrapper } from '../../src/kafka/producer'-import { HogFlow } from '../../src/schema/hogflow'import { Hub, Team } from '../../src/types'import { closeHub, createHub } from '../../src/utils/db/hub'import { PostgresUse } from '../../src/utils/db/postgres'