Skip to content

OpenPanel is an open-source web and product analytics platform, an open-source alternative to Mixpanel with optional self-hosting.

core: drop 298 barrel exports nothing imports

Carl-Gerhard Lindesvärd04128772a89d
diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts
index be1ccc733..21d330034 100644
--- a/packages/core/src/index.ts
+++ b/packages/core/src/index.ts
@@ -54,23 +54,10 @@ export {
// on the barrel: they are boot singletons on `AppDeps`, built once by
// `main.ts`, never module singletons. V1's packages/db/src/buffers/index.ts
// calls this once and re-exports the instances, so both boots share one set.
-export type {
- AddObservation,
- AddObserver,
- BufferDeps,
- FlushObservation,
- FlushObserver,
- FlushPhaseTimings,
- FlushTrigger,
-} from './buffers/base-buffer';
+export type { BufferDeps } from './buffers/base-buffer';
export { registerBufferMetrics } from './buffers/buffer.metrics';
export type { Buffers } from './buffers/create-buffers';
export { createBuffers } from './buffers/create-buffers';
-export type { IGroupBufferInput } from './buffers/group-buffer';
-export type { ProfileBackfillEntry } from './buffers/profile-backfill-buffer';
-export type { IClickhouseSessionReplayChunk } from './buffers/replay-buffer';
-export type { SessionIngestResult } from './buffers/session-buffer';
-export { resolveSessionTimeoutMs } from './buffers/session-buffer';
// R13, M15-008: of the ~35 `clients/` symbols this barrel used to re-export,
// `main.ts` imported one (`createClients`) and `apps/start` none. The rest —
// every AI call, the Slack/Discord senders, the geo lookups, the object-store
@@ -79,12 +66,10 @@ export { resolveSessionTimeoutMs } from './buffers/session-buffer';
// concrete implementation of `./logger`'s structural interface; main.ts builds
// its own named logger from it and mirrors a fatal to the real stderr with the
// write captured before `interceptProcessOutput` wrapped the stream.
-export type { ServiceClients } from './clients/create-clients';
export { createClients } from './clients/create-clients';
export {
isRetryableStatus,
ProviderError,
- type ProviderErrorOptions,
} from './clients/provider-error';
// The one config VALUE the loader needs from core: the accepted SASL
// mechanisms, so `KAFKA_SASL_MECHANISM` is validated against the list the
@@ -96,7 +81,6 @@ export type {
Ctx,
HttpCtx,
JobCtx,
- ScopeMeta,
Session,
} from './context';
export { createCtx, extendCtx } from './context';
@@ -108,39 +92,26 @@ export { requestContext, requestLogging } from './http/context';
// The root chain `main.ts` hangs every surface on: V1's CORS delegator and V1's
// error handler, both ported and both taking their deployment-derived values as
// arguments — core reads no environment.
-export type { CorsOptions } from './http/cors';
-export { CORS_PRIVATE_PATHS, corsDelegator } from './http/cors';
-export type { ErrorHandlerOptions } from './http/errors';
+export { corsDelegator } from './http/cors';
export { errorHandler } from './http/errors';
// The two runtime seams over the registry. `main.ts` builds producers in every
// role and workers only where the role consumes; both take the registry as
// data, so neither opens a connection until it is called.
export type {
AnyJob,
- EnqueueOptions,
QueueDefinition,
- RepeatSchedule,
} from './jobs/define';
-export type { JobEnvelope, JobMeta } from './jobs/envelope';
+export type { JobMeta } from './jobs/envelope';
export type { CountableQueue } from './jobs/jobs.metrics';
export { registerQueueMetrics } from './jobs/jobs.metrics';
export { queueKey } from './jobs/naming';
-export type { CreateProducersOptions } from './jobs/producers';
export { createProducers } from './jobs/producers';
-export type {
- SchedulerDefinition,
- SchedulerFlags,
-} from './jobs/schedulers';
export {
PING_SCHEDULE,
schedulersFromRegistry,
startSchedulers,
} from './jobs/schedulers';
-export type {
- StartWorkersOptions,
- TerminalFailure,
- WorkerHandle,
-} from './jobs/workers';
+export type { WorkerHandle } from './jobs/workers';
export { runJob, startWorkers } from './jobs/workers';
export type {
QueueProducerHandle,
@@ -148,7 +119,7 @@ export type {
Queues,
} from './jobs.registry';
export { CRON_SCHEDULES, queues } from './jobs.registry';
-export type { LogFn, Logger, LogLevel } from './logger';
+export type { LogFn, Logger } from './logger';
export {
REQUEST_ID_HEADER,
REQUEST_ID_LENGTH,
@@ -166,12 +137,7 @@ export { registerDefaultMetrics } from './metrics';
// the one type past `AppRouter` that crosses into apps/start
// (`src/agents/client.ts`); it stays a TYPE, so no value of this module reaches
// a browser bundle.
-export type {
- ChatApp,
- ChatRunContext,
- FilterCommandResult,
- RunFilterCommandInput,
-} from './modules/assistant/assistant.service';
+export type { ChatApp } from './modules/assistant/assistant.service';
export { createAssistantService } from './modules/assistant/assistant.service';
// Dissolved from @openpanel/auth — apps/api's OAuth callbacks call these
// directly; V1's now-deleted @openpanel/trpc auth/share/user/gsc routers did
@@ -183,67 +149,22 @@ export { createAssistantService } from './modules/assistant/assistant.service';
// here — V1's now-deleted packages/trpc auth router and
// apps/api/src/controllers/oauth-callback.controller.tsx called these directly,
// the same way V1 reached every other dissolved service here.
-export type {
- AuthProvider,
- CompleteOAuthCallbackInput,
- OAuth2Tokens,
- OAuthUser,
- SignInEmailInput,
- SignInEmailResult,
- SignInShareInput,
- SignInTotpInput,
- SignUpEmailInput,
- StartOAuthSignInInput,
- StartOAuthSignInResult,
-} from './modules/auth/auth.service';
export {
Arctic,
- assertOAuthState,
- buildOtpauthUrl,
- COOKIE_MAX_AGE,
- consumeRecoveryCode,
cookieOptions,
createAuthService,
- decodeSessionToken,
deleteSessionTokenCookie,
- fetchGithubOAuthUser,
- fetchGoogleOAuthUser,
- generateQrDataUrl,
- generateRecoveryCodes,
- generateSessionToken,
- generateTotpSecret,
githubClient,
googleClient,
googleGscClient,
- hashPassword as hashUserPassword,
- hashRecoveryCodes,
- hashSessionToken,
- normalizeRecoveryCode,
- OAuthCallbackError,
parseCookieDomain,
- setLastAuthProviderCookie,
- setSessionTokenCookie,
- startOAuthSignIn,
- verifyPasswordHash,
- verifyTotpCode,
} from './modules/auth/auth.service';
-export type {
- AccessChecks,
- AccessLookups,
- OrganizationAccessLike,
- ProjectAccessLike,
-} from './modules/auth/src/access';
+export type { AccessLookups } from './modules/auth/src/access';
export { createAccessChecks } from './modules/auth/src/access';
// Moved from packages/db/src/services/auth-session.service.ts — the
// Postgres-backed login session CRUD. packages/db keeps a re-export shim
// (existing `@openpanel/db` importers, apps/api's app.ts).
-export type { SessionValidationResult } from './modules/auth/src/login-session';
-export {
- createDemoSession,
- createSession,
- invalidateSession,
- validateSessionToken,
-} from './modules/auth/src/login-session';
+export { validateSessionToken } from './modules/auth/src/login-session';
export { getIsRegistrationAllowed } from './modules/auth/src/registration';
// Dissolved from @openpanel/db's services/chart.service.ts and engine/ —
// packages/trpc's chart router, apps/api's export controller, V1's
@@ -253,92 +174,34 @@ export { getIsRegistrationAllowed } from './modules/auth/src/registration';
// re-export shims.
export type {
AggregateChartSqlInput,
- ChartBucketProfilesInput,
- ChartBucketProfilesRequest,
- ChartEventOption,
ChartSqlInput,
- CohortMetadata,
- ConcreteSeries,
- FilterTableScope,
- FunnelStepProfilesRequest,
Plan,
- ProjectCardChartRow,
- ProjectCardMetrics,
- ProjectCardTrend,
- RetentionChartInput,
- SeriesDefinition,
- ShareableReportInput,
} from './modules/chart/chart.service';
export {
- buildAllCohortsLabelExpr,
- buildAllCohortsMembershipQuery,
- buildCohortMembershipQuery,
- buildInlineCohortJoin,
- CHART_TABLE,
- ChartCohortIdError,
- collectBreakdownCohortIds,
collectProfilePropertyKeys,
createChartService,
- EVENT_FIELD_ALIASES,
- EVENT_TOP_LEVEL_COLUMNS,
evaluateFormula,
- extractCohortId,
- getCohortAlias,
- getCohortCteName,
getEventFiltersWhereClause,
- getGroupPropertySelect,
- getGroupPropertySql,
- getProfilePropertySelect,
getSelectPropertyKey,
- InvalidFormulaError,
- isAllCohortsBreakdown,
isKnownEventField,
- isNumericColumn,
isValidFormula,
normalizeEventField,
profilePropertiesCteSelect,
- resolveReportInput,
- rewriteProfilePropertyRefs,
- transformPropertyKey,
} from './modules/chart/chart.service';
// Dissolved from @openpanel/db's services/funnel.service.ts — packages/db's
// reports.service, apps/api's insights controller and the mcp/assistant tools
// call these. packages/db/src/services/funnel.service.ts stays a re-export
// shim.
-export type {
- BuildFunnelBaseInput,
- FunnelStep,
-} from './modules/chart/funnel.service';
-export {
- buildSessionsCte,
- EMPTY_BREAKDOWN_LABEL,
- getFunnelGroup,
- toSeries,
-} from './modules/chart/funnel.service';
+export { toSeries } from './modules/chart/funnel.service';
// Dissolved from @openpanel/db's services/retention.service.ts — apps/api's
// insights controller and the mcp/assistant tools call these.
// packages/db/src/services/retention.service.ts stays a re-export shim.
-export type {
- IGetRetentionCohortInput,
- IRetentionCohortRow,
- IRetentionCriteria,
- IRetentionInterval,
- IServiceRetentionRollingActiveUsers,
-} from './modules/chart/retention.service';
+export type { IRetentionCohortRow } from './modules/chart/retention.service';
export { processCohortData } from './modules/chart/retention.service';
// Dissolved from @openpanel/db's services/sankey.service.ts — apps/api's
// insights controller and the mcp/assistant tools call these.
// packages/db/src/services/sankey.service.ts stays a re-export shim.
-export type {
- IGetSankeyInput,
- SankeyLink,
- SankeyNode,
- SankeyResult,
-} from './modules/chart/sankey.service';
-export {
- getRawWhereClause,
- zGetSankeyInput,
-} from './modules/chart/sankey.service';
+export { getRawWhereClause } from './modules/chart/sankey.service';
// Moved from packages/db/src/services/filter-where.service.ts — the
// sessions/profiles/events-table filter compiler, distinct from
// `getEventFiltersWhereClause` above. packages/db/src/services/
@@ -349,12 +212,7 @@ export { buildFilterWhere } from './modules/chart/src/table-filter-where';
// client router, apps/api's manage controller and mcp/utils auth call these
// directly, the same way V1 reaches every other dissolved service here.
// packages/db/src/services/clients.service.ts stays a re-export shim.
-export type {
- CreatedClient,
- IPublicClient,
- IServiceClient,
- IServiceClientWithProject,
-} from './modules/client/client.service';
+export type { IPublicClient } from './modules/client/client.service';
export {
createClientService,
// apps/api's session e2e clears one client's cache between runs.
@@ -370,11 +228,6 @@ export {
// apps/api's live chat route and this package's own assistant.routes.ts stub
// call these directly. packages/db keeps a re-export shim (unlike cohort): both
// non-trpc call sites still reach it through `@openpanel/db`'s barrel.
-export type {
- IServiceChatMessage,
- IServiceConversation,
- IServiceConversationWithMessages,
-} from './modules/conversation/conversation.service';
export { createConversationService } from './modules/conversation/conversation.service';
// Dissolved from @openpanel/db's services/dashboard.service.ts, plus V1's
// dashboard router mutation bodies — packages/trpc's dashboard router,
@@ -384,23 +237,18 @@ export type {
IServiceDashboard,
IServiceDashboards,
} from './modules/dashboard/dashboard.service';
-export { createDashboardService } from './modules/dashboard/dashboard.service';
// R + C only: the router's three bodies are three small `db.emailUnsubscribe`
// calls, small enough to live inline in `email.rpc.ts` rather than a dedicated
// `email.service.ts` — see that file's header. `emailCategories` moved from
// packages/constants (ADR-008's module map: email owns "C"); packages/constants
// keeps a re-export shim.
-export type { EmailCategory } from './modules/email/email.constants';
export { emailCategories } from './modules/email/email.constants';
// Moved from apps/worker/src/jobs/lib/email-sequence.ts — shared by the
// onboarding module and, since M9-003, the organization module's wind-down
// track.
export type {
- RunSequenceOptions,
- SequenceResult,
SequenceStep,
SequenceSubject,
- StepResult,
} from './modules/email/src/sequence';
export { runSequence, step } from './modules/email/src/sequence';
// Dissolved from @openpanel/db's services/event.service.ts, profile.service.ts
@@ -416,97 +264,49 @@ export { runSequence, step } from './modules/email/src/sequence';
// M12-003: its only caller now composes a `sql` fragment and uses
// `profileSearchCondition`.
export type {
- EventListSelect,
- GetEventListOptions,
IClickhouseBotEvent,
IClickhouseEvent,
- IEventColumn,
- IImportedEvent,
- IServiceBotEvent,
- IServiceCreateBotEventPayload,
IServiceCreateEventPayload,
- IServiceCreateEventPayloadWithId,
IServiceEvent,
IServiceEventMinimal,
- IServiceImportedEventPayload,
- IServicePage,
- QueryEventsInput,
} from './modules/event/event.service';
export {
- EVENT_COLUMNS,
transformEvent,
- transformMinimalEvent,
transformSessionToEvent,
} from './modules/event/event.service';
-export { createExportService } from './modules/export/export.service';
-export type {
- GetGroupListOptions,
- GetGroupMemberProfilesOptions,
- IServiceGroup,
- IServiceGroupStats,
- IServiceUpsertGroup,
-} from './modules/group/group.service';
+export type { IServiceGroup } from './modules/group/group.service';
// Dissolved from @openpanel/db's src/gsc.ts + services/gsc.service.ts —
// apps/worker's gsc job file, apps/api's gsc OAuth callback controller and
// packages/trpc's gsc router call these directly, the same way V1 reaches every
// other dissolved service here. packages/db/src/gsc.ts and
// packages/db/src/services/gsc.service.ts re-export the subset MCP's gsc tools
// and the assistant's SEO tools still reach via `@openpanel/db`.
-export type {
- GscCannibalizedQuery,
- GscConnectionSummary,
- GscDateRangeInput,
- GscOAuthCallbackInput,
- GscOAuthCallbackResult,
- GscQueryOpportunity,
- GscSite,
-} from './modules/gsc/gsc.service';
export { getGscCannibalization } from './modules/gsc/gsc.service';
-export { isShuttingDown, setShuttingDown } from './modules/health/src/shutdown';
+export { setShuttingDown } from './modules/health/src/shutdown';
// Dissolved from @openpanel/db's services/import.service.ts + apps/worker's job
// file + apps/api's /import controller — apps/worker's import job file and
// apps/api's import controller call these directly, the same way V1 reaches
// every other dissolved service here.
// packages/db/src/services/import.service.ts is deleted outright: nothing else
// reached it through @openpanel/db's barrel (same as cohort).
-export type {
- ImportJobProgress,
- ImportStageResult,
- ImportSteps,
- InsertRawEventsResult,
- UpdateImportStatusOptions,
-} from './modules/import/import.service';
// The ingestion pipeline. apps/api's /track controller, its three route hooks
// and the legacy /event controller are thin delegates over these — the same
// functions core's own `ingestRoutes` calls.
export type {
BotMatch,
- BotSuspicion,
- DeviceIdentity,
IncomingEventPayload,
- IncomingEventProducer,
- IngestAuthErrorPayload,
- IngestAuthOutcome,
- IngestBuffers,
- IngestHeaders,
IngestTransport,
- TrackOutcome,
- TrackRequest,
} from './modules/ingest/ingest.service';
export {
applyBotSuspicion,
checkIngestBot,
detectBot,
- fetchDeviceIdentity,
getDeviceId,
getOverrideDeviceId,
- getStringHeaders,
getTimestamp,
handleReplay,
ingestTrack,
isBot,
- isDuplicatedEvent,
- isDuplicateIngestRequest,
stripBotProperties,
summarizeBotSignals,
validateIngestRequest,
@@ -516,13 +316,8 @@ export {
// injection seam that used to cross a package boundary and now just crosses two
// files.
export type {
- ConsumerLogger,
- ConsumerMetrics,
DeadLetterMessage,
- DeadLetterReason,
- EventsBatchHandler,
EventsBatchHandlerDeps,
- EventsConsumerDeps,
KafkaConsumerHandle,
} from './modules/ingest/src/consumer';
export {
@@ -534,21 +329,13 @@ export { createIncomingEventHandler } from './modules/ingest/src/consumer-handle
// `onActivity`; `setShuttingDown` is main.ts's signal handler.
export {
enableEventsHeartbeat,
- getEventsHeartbeat,
markEventsActivity,
} from './modules/ingest/src/heartbeat';
export type {
IncomingEventBindings,
- IncomingEventDelivery,
IncomingEventDeps,
- IncomingEventMetrics,
- IncomingEventProject,
- IncomingEventSessions,
-} from './modules/ingest/src/incoming-event-handler';
-export {
- createIncomingEventDeps,
- incomingEvent,
} from './modules/ingest/src/incoming-event-handler';
+export { incomingEvent } from './modules/ingest/src/incoming-event-handler';
export { ingestConsumerMetrics } from './modules/ingest/src/ingest.metrics';
// The Kafka transport itself: producer, consumer factory, admin/lag sampling
// and every topic/group/retry constant, moved from @openpanel/queue's kafka.ts
@@ -559,7 +346,6 @@ export type {
ConsumerGroupLag,
EachBatchPayload,
KafkaMessage,
- PartitionLag,
} from './modules/ingest/src/kafka';
export {
assertKafkaConfigured,
@@ -571,21 +357,12 @@ export {
produceIncomingEvent,
sampleConsumerGroupLag,
} from './modules/ingest/src/kafka';
-export type {
- DailyInsightCandidate,
- GetReferrerSpikesInput,
- ReferrerSpikeCluster,
- WeeklyDigestPreview,
- WeeklyDigestResult,
-} from './modules/insight/insight.service';
export { explainInsight } from './modules/insight/insight.service';
// Moved from packages/trpc/src/routers/integration.ts, plus the Slack OAuth
// callback business logic out of apps/api/src/controllers/webhook.controller.ts
// (ADR-008's module map: integration owns "S"+"C") — packages/trpc's
// integration router and apps/api's webhook controller call these directly, the
// same way V1 reaches every other dissolved service here.
-export type { CompleteSlackOAuthCallbackResult } from './modules/integration/integration.service';
-export { SlackOAuthCallbackError } from './modules/integration/integration.service';
// Slack's OAuth token-exchange wire contract — not integration config (stays
// out of the `*.constants` subpath, see
// modules/integration/src/slack-contract.ts's header), but apps/api's webhook
@@ -597,39 +374,17 @@ export { zSlackAuthResponse } from './modules/integration/src/slack-contract';
// types only. `handleStatelessMcpRequest` needs the API's `deps`, so the app
// shell reaches MCP the one way it ever did — `rest.routes.ts`'s
// `.use(mcpRoutes(deps))` and `ctx.services.mcp`.
-export type {
- McpAuthContext,
- McpHttpResult,
-} from './modules/mcp/mcp.service';
-export { createMcpService } from './modules/mcp/mcp.service';
+export type { McpAuthContext } from './modules/mcp/mcp.service';
// Ported from apps/api's misc controller + apps/worker's cron.ping.ts —
// apps/api's misc controller and the worker's ping cron job call these
// directly, the same way V1 reaches every other dissolved service here. `GET
// /misc/og/clear` and `/misc/favicon/clear` are NOT ported (ADR-015 entry #6:
// RULED + DEAD).
-export type {
- GeoReport,
- ImageAssetResult,
- PingRecord,
- StatsResult,
-} from './modules/misc/misc.service';
+export type { INotificationPayload } from './modules/notification/notification.service';
export {
- getFavicon,
- getGeoReport,
- getOgImage,
-} from './modules/misc/misc.service';
-export type {
- INotificationPayload,
- INotificationRuleCached,
-} from './modules/notification/notification.service';
-export {
- APP_NOTIFICATION_INTEGRATION_ID,
- BASE_INTEGRATIONS,
createNotificationService,
- EMAIL_NOTIFICATION_INTEGRATION_ID,
getFunnelRules,
getHasFunnelRules,
- getNotificationRulesByProjectId,
isBaseIntegration,
matchEvent,
matchEventFilters,
@@ -649,10 +404,6 @@ export { checkNotificationRulesForEvent } from './modules/notification/src/notif
// now-deleted packages/trpc onboarding router and apps/worker's onboarding cron
// job called these directly, the same way V1 reached every other dissolved
// service here.
-export type {
- CreateOnboardingProjectResult,
- OnboardingCronSummary,
-} from './modules/onboarding/onboarding.service';
export { createOnboardingService } from './modules/onboarding/onboarding.service';
// Dissolved from @openpanel/db's services/organization.service.ts +
// services/delete.service.ts (folded together per the module map) —
@@ -663,16 +414,11 @@ export { createOnboardingService } from './modules/onboarding/onboarding.service
// (unlike delete.service.ts, which packages/db loses entirely — nothing but the
// worker's cron job reached it through @openpanel/db's barrel).
export type {
- DeleteCronResult,
- InviteUserResult,
- IServiceInvite,
IServiceMember,
IServiceOrganization,
- IServiceProjectAccess,
} from './modules/organization/organization.service';
export {
createOrganizationService,
- getOrganizationBillingEventsCountSerieCached,
getOrganizationByProjectIdCached,
} from './modules/organization/organization.service';
// Dissolved from @openpanel/db's services/overview.service.ts +
@@ -680,61 +426,23 @@ export {
// insights controller, apps/worker's win-back job and the mcp/assistant tools
// call these directly. packages/db/src/services/ overview.service.ts and
// pages.service.ts stay re-export shims.
-export type {
- IGetMapDataInput,
- IGetMetricsInput,
- IGetTopEntryExitInput,
- IGetTopEventsInput,
- IGetTopGenericInput,
- IGetTopGenericSeriesInput,
- IGetTopLinkOutInput,
- IGetTopPagesInput,
- IGetUserJourneyInput,
- ILiveData,
- ILiveMinuteCount,
- SegmentDailyPoint,
- TrafficColumn,
-} from './modules/overview/overview.service';
-export {
- zGetMapDataInput,
- zGetMetricsInput,
- zGetTopEntryExitInput,
- zGetTopEventsInput,
- zGetTopGenericInput,
- zGetTopGenericSeriesInput,
- zGetTopLinkOutInput,
- zGetTopPagesInput,
- zGetUserJourneyInput,
-} from './modules/overview/overview.service';
-export type {
- IGetPagesInput,
- IPageConversionRow,
- IPageTimeseriesRow,
- ITopPage,
-} from './modules/overview/pages.service';
+export type { IGetTopGenericInput } from './modules/overview/overview.service';
export type {
AdjustProfilePropertyResult,
- FindProfilesInput,
- GetProfileListOptions,
IClickhouseProfile,
IdentifyProfileInput,
IProfileMetrics,
IServiceProfile,
- IServiceUpsertProfile,
ProfileRequestContext,
} from './modules/profile/profile.service';
-export { transformProfile } from './modules/profile/profile.service';
// Dissolved from @openpanel/db's services/project.service.ts — packages/trpc's
// project router, apps/api's manage controller and several core modules'
// `src/access.ts` call these directly, the same way V1 reaches every other
// dissolved service here. packages/db/src/services/ project.service.ts stays a
// re-export shim.
-export { ProjectTypeNames } from './modules/project/project.constants';
export type {
- CreatedProjectClient,
IServiceProject,
IServiceProjectWithClients,
- ProjectActivationStatus,
} from './modules/project/project.service';
export { createProjectService } from './modules/project/project.service';
// The six ClickHouse queries moved from packages/trpc/src/routers/realtime.ts —
@@ -743,10 +451,6 @@ export { createProjectService } from './modules/project/project.service';
// file stays internal to core/realtime.routes.ts; V1's own Fastify `/live`
// controller is untouched (see realtime.service.ts's header) so nothing else
// needs it from this barrel.
-export type {
- RealtimeBadgeDetailScope,
- RealtimeLocation,
-} from './modules/realtime/realtime.service';
// Moved from packages/db/src/services/reference.service.ts, plus the
// query/mutation bodies packages/trpc/src/routers/reference.ts held inline —
// packages/trpc's reference router calls these directly, the same way V1
@@ -760,7 +464,6 @@ export { createReferenceService } from './modules/reference/reference.service';
// the vocabulary directly through @openpanel/core here, same shape as
// `emailCategories`/`ProjectTypeNames` below. Both origin packages stay
// re-export shims.
-export type { IFilterValueType } from './modules/report/report.constants';
export {
alphabetIds,
chartColors,
@@ -783,48 +486,19 @@ export {
operators,
operatorsShort,
timeWindows,
- zChartBreakdown,
- zChartBreakdowns,
- zChartEvent,
- zChartEventFilter,
- zChartEventItem,
- zChartEventSegment,
- zChartEventWithType,
- zChartFormula,
- zChartInput,
- zChartSeries,
- zChartType,
zCriteria,
- zFunnelOptions,
- zHistogramOptions,
- zLineType,
- zMetric,
- zRange,
- zReport,
zReportInput,
- zReportOptions,
- zRetentionOptions,
- zSankeyOptions,
- zTimeInterval,
- zWidgetOptions,
- zWidgetType,
} from './modules/report/report.constants';
// Dissolved from @openpanel/db's services/reports.service.ts, plus V1's report
// router mutation bodies — packages/trpc's report router, apps/api's insights
// controller and the mcp/assistant tools call these.
// packages/db/src/services/reports.service.ts stays a re-export shim.
export type { IServiceReport } from './modules/report/report.service';
-export {
- createReportService,
- transformFilter,
- transformReport,
- transformReportEventItem,
-} from './modules/report/report.service';
+export { transformReport } from './modules/report/report.service';
export {
getChartStartEndDate,
getDatesFromRange,
} from './modules/report/src/chart-dates';
-export type { ReportEventItem } from './modules/report/src/series';
export {
mergeGlobalFilters,
onlyReportEvents,
@@ -834,7 +508,6 @@ export {
// `createInitialSalts(deps)` directly at boot; `salt.jobs.ts`'s cron handler
// and everything else reach `rotateSalt`/`getSalts` through
// `ctx.services.salt`.
-export type { Salts } from './modules/salt/salt.service';
export {
createInitialSalts,
createSaltService,
@@ -849,27 +522,15 @@ export {
// reaper/vacuum cron fragments are registered in jobs.registry.ts, not
// exported.
export type {
- GetSessionListOptions,
IClickhouseSession,
IServiceSession,
- ISessionReplayChunkMeta,
- QuerySessionsInput,
- SessionDistinctField,
-} from './modules/session/session.service';
-export {
- getSessionsCountCached,
- SESSION_DISTINCT_FIELDS,
- transformSession,
} from './modules/session/session.service';
+export { SESSION_DISTINCT_FIELDS } from './modules/session/session.service';
// Dissolved from @openpanel/db's services/insights* + referrer-spikes.service —
// apps/worker's insight job files and packages/trpc's insight router call these
// directly, the same way V1 reaches every other dissolved service here.
export type { SessionMetricsRedis } from './modules/session/src/session.metrics';
export { registerSessionScrapeMetrics } from './modules/session/src/session.metrics';
-export type {
- EnqueueSessionEndInput,
- SessionEndJobData,
-} from './modules/session/src/session-end';
export {
createSessionEnd,
getSessionEndJobId,
@@ -878,7 +539,6 @@ export {
} from './modules/session/src/session-end';
export { reapIdleSessions } from './modules/session/src/session-reaper';
export { vacuumStaleSessions } from './modules/session/src/session-vacuum';
-export { updateEventsCount } from './modules/session/src/usage';
// Moved from packages/db/src/services/share.service.ts, plus the query/mutation
// bodies packages/trpc/src/routers/share.ts held inline (ADR-008's module map:
// share owns "C") — packages/trpc's share router calls these directly, the same
@@ -897,22 +557,11 @@ export { createShareService } from './modules/share/share.service';
// (ADR-008's module map: subscription owns "S"+"C") — packages/trpc's
// subscription router and apps/api's webhook controller call these directly,
// the same way V1 reaches every other dissolved service here.
-export {
- createSubscriptionService,
- getCurrentSubscriptionProduct,
- toSubscriptionDiscount,
-} from './modules/subscription/subscription.service';
+export { toSubscriptionDiscount } from './modules/subscription/subscription.service';
// New module — apps/api's tools controller calls these directly, the same way
// V1 reaches every other dissolved service here.
-export type {
- IpLookupOutcome,
- IpLookupResult,
-} from './modules/tools/src/ip-lookup';
export { runIpLookup } from './modules/tools/src/ip-lookup';
-export type {
- SiteCheckOutcome,
- SiteCheckResult,
-} from './modules/tools/src/site-checker';
+export type { SiteCheckResult } from './modules/tools/src/site-checker';
export { runSiteCheck } from './modules/tools/src/site-checker';
// Dissolved from @openpanel/db's services/user.service.ts — packages/trpc's
// auth/onboarding routers call `getUserById`/ `getUserAccount` directly through
@@ -925,7 +574,6 @@ export {
getServiceName,
interceptProcessOutput,
rawStderrWrite,
- rawStdoutWrite,
} from './pino-logger';
export {
dashboardRoutes,
@@ -939,11 +587,7 @@ export {
// builder the same way, before all 28 routers moved into
// `modules/<name>/<name>.rpc.ts` and the package itself was deleted.
export type {
- CacheMiddlewareDeps,
- EnforceRateLimit,
Meta,
- RateLimitOptions,
- RpcCache,
TrpcContext,
TrpcContextOptions,
} from './rpc/base';
@@ -954,8 +598,6 @@ export {
middleware,
procedure,
protectedProcedure,
- protectedProcedureWithoutAccess,
- publicProcedure,
} from './rpc/base';
export { RPC_DEADLINE_MS } from './rpc/deadline';
export {
@@ -978,11 +620,6 @@ export {
getOrganizationAccess,
getProjectAccess,
} from './shared/access-lookups';
-export {
- als,
- getAlsSessionId,
- runWithAlsSession,
-} from './shared/als-session';
export {
DEFAULT_IP_HEADER_ORDER,
getClientIpFromHeaders,
@@ -990,7 +627,6 @@ export {
TRUSTED_IP_HEADER_ORDER,
} from './shared/get-client-ip';
export { getReferrerWithQuery, parseReferrer } from './shared/parse-referrer';
-export { generateDeviceId } from './shared/profileId';
// Below the transports since M15-007: `rpc/base.ts` needs the empty shape and
// may not deep-import a module to get it.
export { EMPTY_SESSION } from './shared/session';