: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(frontend): inline Kea types batch 6 (#71460)
Marius Andra4f22498b653c
diff --git a/.kearc b/.kearcindex a611dbcfb89e..412ceb6fcdb6 100644--- a/.kearc+++ b/.kearc@@ -69,19 +69,19 @@"./products/wizard","./.kea-inline-separator-05","./.kea-inline-separator-05-b",- "./.kea-inline-batch-06-slot-01",- "./.kea-inline-batch-06-slot-02",- "./.kea-inline-batch-06-slot-03",- "./.kea-inline-batch-06-slot-04",- "./.kea-inline-batch-06-slot-05",- "./.kea-inline-batch-06-slot-06",- "./.kea-inline-batch-06-slot-07",- "./.kea-inline-batch-06-slot-08",- "./.kea-inline-batch-06-slot-09",- "./.kea-inline-batch-06-slot-10",- "./.kea-inline-batch-06-slot-11",- "./.kea-inline-batch-06-slot-12",- "./.kea-inline-batch-06-slot-13",+ "./frontend/src/scenes/appLogic.tsx",+ "./frontend/src/scenes/approvals",+ "./frontend/src/scenes/instance",+ "./frontend/src/scenes/max",+ "./frontend/src/scenes/organizationLogic.tsx",+ "./frontend/src/scenes/resource-transfer",+ "./frontend/src/scenes/userLogic.ts",+ "./frontend/src/toolbar",+ "./products/data_warehouse",+ "./products/engineering_analytics",+ "./products/feature_flags",+ "./products/mcp_store",+ "./products/workflows","./.kea-inline-separator-06","./.kea-inline-separator-06-b","./frontend/src/scenes/appContextLogic.ts",diff --git a/frontend/bin/check-toolbar-graph.mjs b/frontend/bin/check-toolbar-graph.mjsindex e16c743e4071..00eb719ae88a 100644--- a/frontend/bin/check-toolbar-graph.mjs+++ b/frontend/bin/check-toolbar-graph.mjs@@ -41,7 +41,7 @@ const FORBIDDEN_PACKAGES = [// Ratchet policy: when an edge is cut, lower the budget to lock it in; raise it only as a// conscious, reviewed decision in the PR that needs it. There is headroom for churn, but any// reintroduced leak jumps the graph back toward ~100 MiB and fails loudly.-const TOTAL_INPUT_BYTES_BUDGET = 14_400_000+const TOTAL_INPUT_BYTES_BUDGET = 14_415_000function fail(message) {console.error(`\n❌ ${message}`)diff --git a/frontend/src/lib/components/MCPHint/mcpHintLogic.tsx b/frontend/src/lib/components/MCPHint/mcpHintLogic.tsxindex 6518893ce633..4e4feb0348ec 100644--- a/frontend/src/lib/components/MCPHint/mcpHintLogic.tsx+++ b/frontend/src/lib/components/MCPHint/mcpHintLogic.tsx@@ -68,7 +68,7 @@ export interface mcpHintLogicActions {} // eventUsageLogicupdateUser: (user: Partial<UserType>,- successCallback?: () => void+ successCallback?: (() => void) | undefined) => {successCallback: (() => void) | undefineduser: Partial<UserType>diff --git a/frontend/src/lib/components/TimeSensitiveAuthentication/timeSensitiveAuthenticationLogic.ts b/frontend/src/lib/components/TimeSensitiveAuthentication/timeSensitiveAuthenticationLogic.tsindex aada91e2504d..f2c964fb7076 100644--- a/frontend/src/lib/components/TimeSensitiveAuthentication/timeSensitiveAuthenticationLogic.ts+++ b/frontend/src/lib/components/TimeSensitiveAuthentication/timeSensitiveAuthenticationLogic.ts@@ -66,7 +66,7 @@ export interface timeSensitiveAuthenticationLogicActions {setTimeSensitiveAuthenticationRequired: (required: boolean | [onSuccess: () => void, onFailure: () => void]) => {required: boolean | [onSuccess: () => void, onFailure: () => void]} // apiStatusLogic- loadUser: (resetOnFailure?: boolean) => {+ loadUser: (resetOnFailure?: boolean | undefined) => {resetOnFailure: boolean | undefined} // userLogicbeginPasskey2FA: () => {diff --git a/frontend/src/lib/logic/themeLogic.ts b/frontend/src/lib/logic/themeLogic.tsindex f43db6dfbf7b..bc3fde653329 100644--- a/frontend/src/lib/logic/themeLogic.ts+++ b/frontend/src/lib/logic/themeLogic.ts@@ -27,7 +27,7 @@ export interface themeLogicValues {export interface themeLogicActions {updateUser: (user: Partial<UserType>,- successCallback?: () => void+ successCallback?: (() => void) | undefined) => {successCallback: (() => void) | undefineduser: Partial<UserType>diff --git a/frontend/src/scenes/appLogic.tsx b/frontend/src/scenes/appLogic.tsxindex 687b38ecb10f..5b511be4aa47 100644--- a/frontend/src/scenes/appLogic.tsx+++ b/frontend/src/scenes/appLogic.tsx@@ -1,4 +1,4 @@-import { actions, connect, events, kea, path, reducers, selectors } from 'kea'+import { MakeLogicType, actions, connect, events, kea, path, reducers, selectors } from 'kea'import { urlToAction } from 'kea-router'import { featureFlagLogic } from 'lib/logic/featureFlagLogic'@@ -7,7 +7,44 @@ import { preflightLogic } from 'scenes/PreflightCheck/preflightLogic'import { teamLogic } from 'scenes/teamLogic'import { userLogic } from 'scenes/userLogic'-import type { appLogicType } from './appLogicType'+import type { PreflightStatus } from '../types'++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface appLogicValues {+ featureFlagsTimedOut: boolean+ showApp: boolean | PreflightStatus | null+ showingDelayedSpinner: boolean+ showingDevTools: boolean+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface appLogicActions {+ enableDelayedSpinner: () => {+ value: true+ }+ ignoreFeatureFlags: () => {+ value: true+ }+ showDevTools: () => {+ value: true+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface appLogicMeta {+ __keaTypeGenInternalSelectorTypes: {+ showApp: (+ userLoading: boolean,+ user: null | import('../types').UserType,+ receivedFeatureFlags: boolean,+ featureFlagsTimedOut: boolean,+ preflightLoading: boolean,+ preflight: PreflightStatus | null+ ) => boolean | PreflightStatus | null+ }+}++export type appLogicType = MakeLogicType<appLogicValues, appLogicActions, Record<string, any>, appLogicMeta>export const appLogic = kea<appLogicType>([path(['scenes', 'App']),@@ -33,7 +70,14 @@ export const appLogic = kea<appLogicType>([preflightLogic.selectors.preflightLoading,preflightLogic.selectors.preflight,],- (userLoading, user, receivedFeatureFlags, featureFlagsTimedOut, preflightLoading, preflight) => {+ (+ userLoading: boolean,+ user: null | import('../types').UserType,+ receivedFeatureFlags: boolean,+ featureFlagsTimedOut: boolean,+ preflightLoading: boolean,+ preflight: null | import('../types').PreflightStatus+ ) => {return ((!userLoading || user) &&(receivedFeatureFlags || featureFlagsTimedOut) &&diff --git a/frontend/src/scenes/approvals/approvalLogic.tsx b/frontend/src/scenes/approvals/approvalLogic.tsxindex 97bd0423f277..18279b677234 100644--- a/frontend/src/scenes/approvals/approvalLogic.tsx+++ b/frontend/src/scenes/approvals/approvalLogic.tsx@@ -1,4 +1,4 @@-import { actions, afterMount, connect, kea, key, listeners, path, props, reducers, selectors } from 'kea'+import { MakeLogicType, actions, afterMount, connect, kea, key, listeners, path, props, reducers, selectors } from 'kea'import { loaders } from 'kea-loaders'import { router, urlToAction } from 'kea-router'@@ -15,14 +15,83 @@ import { userLogic } from 'scenes/userLogic'import { AvailableFeature, Breadcrumb, ChangeRequest, ChangeRequestState } from '~/types'-import type { approvalLogicType } from './approvalLogicType'-export interface ApprovalLogicProps {id: string}export type ProposedChangesTab = 'gated' | 'full'+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface approvalLogicValues {+ currentTeamId: number | null // teamLogic+ hasAvailableFeature: (feature: AvailableFeature, currentUsage?: number | undefined) => boolean // userLogic+ breadcrumbs: Breadcrumb[]+ changeRequest: ChangeRequest | null+ changeRequestLoading: boolean+ changeRequestMissing: boolean+ isApprovalsFeatureEnabled: boolean+ proposedChangesTab: ProposedChangesTab+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface approvalLogicActions {+ loadAllMembers: () => {+ value: true+ } // membersLogic+ loadRoles: () => any // rolesLogic+ approveChangeRequest: (reason?: string) => {+ reason: string | undefined+ }+ cancelChangeRequest: (reason?: string) => {+ reason: string | undefined+ }+ loadChangeRequest: () => {+ value: true+ }+ loadChangeRequestFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadChangeRequestSuccess: (+ changeRequest: ChangeRequest | null,+ payload?: {+ value: true+ }+ ) => {+ changeRequest: ChangeRequest | null+ payload?: {+ value: true+ }+ }+ rejectChangeRequest: (reason: string) => {+ reason: string+ }+ setProposedChangesTab: (tab: ProposedChangesTab) => {+ tab: ProposedChangesTab+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface approvalLogicMeta {+ key: string+ __keaTypeGenInternalSelectorTypes: {+ isApprovalsFeatureEnabled: (+ hasAvailableFeature: (feature: AvailableFeature, currentUsage?: number | undefined) => boolean+ ) => boolean+ breadcrumbs: (changeRequest: ChangeRequest | null) => Breadcrumb[]+ }+}++export type approvalLogicType = MakeLogicType<+ approvalLogicValues,+ approvalLogicActions,+ ApprovalLogicProps,+ approvalLogicMeta+>+export const approvalLogic = kea<approvalLogicType>([path(['scenes', 'approvals', 'approvalLogic']),props({} as ApprovalLogicProps),@@ -72,11 +141,12 @@ export const approvalLogic = kea<approvalLogicType>([selectors({isApprovalsFeatureEnabled: [(s) => [s.hasAvailableFeature],- (hasAvailableFeature): boolean => hasAvailableFeature(AvailableFeature.APPROVALS),+ (hasAvailableFeature: (feature: AvailableFeature, currentUsage?: number | undefined) => boolean): boolean =>+ hasAvailableFeature(AvailableFeature.APPROVALS),],breadcrumbs: [(s) => [s.changeRequest],- (changeRequest): Breadcrumb[] => [+ (changeRequest: ChangeRequest | null): Breadcrumb[] => [{key: Scene.Settings,name: 'Approvals',diff --git a/frontend/src/scenes/approvals/approvalsLogic.tsx b/frontend/src/scenes/approvals/approvalsLogic.tsxindex f60aff865b04..6fd0113b6555 100644--- a/frontend/src/scenes/approvals/approvalsLogic.tsx+++ b/frontend/src/scenes/approvals/approvalsLogic.tsx@@ -1,4 +1,4 @@-import { actions, afterMount, connect, kea, listeners, path, reducers, selectors } from 'kea'+import { MakeLogicType, actions, afterMount, connect, kea, listeners, path, reducers, selectors } from 'kea'import { loaders } from 'kea-loaders'import { lemonToast } from '@posthog/lemon-ui'@@ -9,8 +9,6 @@ import { userLogic } from 'scenes/userLogic'import { AvailableFeature, ChangeRequest, ChangeRequestState } from '~/types'-import type { approvalsLogicType } from './approvalsLogicType'-export interface ApprovalsFilters {state?: ChangeRequestStateaction_key?: string@@ -43,6 +41,79 @@ function mergeChangeRequestsData(}}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface approvalsLogicValues {+ currentTeamId: number | null // teamLogic+ hasAvailableFeature: (feature: AvailableFeature, currentUsage?: number | undefined) => boolean // userLogic+ changeRequests: ChangeRequest[]+ changeRequestsCount: number+ changeRequestsData: ApprovalDataState+ changeRequestsDataLoading: boolean+ filters: ApprovalsFilters+ hasMore: boolean+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface approvalsLogicActions {+ approveChangeRequest: (+ id: string,+ reason?: string+ ) => {+ id: string+ reason: string | undefined+ }+ loadChangeRequests: (url?: string) => {+ url: string | undefined+ }+ loadChangeRequestsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadChangeRequestsSuccess: (+ changeRequestsData: ApprovalDataState,+ payload?: {+ url: string | undefined+ }+ ) => {+ changeRequestsData: ApprovalDataState+ payload?: {+ url: string | undefined+ }+ }+ loadMore: () => {+ value: true+ }+ rejectChangeRequest: (+ id: string,+ reason: string+ ) => {+ id: string+ reason: string+ }+ setFilters: (filters: Partial<ApprovalsFilters>) => {+ filters: Partial<ApprovalsFilters>+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface approvalsLogicMeta {+ __keaTypeGenInternalSelectorTypes: {+ changeRequests: (changeRequestsData: ApprovalDataState) => ChangeRequest[]+ changeRequestsCount: (changeRequestsData: ApprovalDataState) => number+ hasMore: (changeRequests: ChangeRequest[], changeRequestsCount: number) => boolean+ }+}++export type approvalsLogicType = MakeLogicType<+ approvalsLogicValues,+ approvalsLogicActions,+ Record<string, any>,+ approvalsLogicMeta+>+export const approvalsLogic = kea<approvalsLogicType>([path(['scenes', 'approvals', 'approvalsLogic']),connect(() => ({@@ -95,15 +166,15 @@ export const approvalsLogic = kea<approvalsLogicType>([selectors({changeRequests: [(s) => [s.changeRequestsData],- (changeRequestsData): ChangeRequest[] => changeRequestsData.changeRequests,+ (changeRequestsData: ApprovalDataState): ChangeRequest[] => changeRequestsData.changeRequests,],changeRequestsCount: [(s) => [s.changeRequestsData],- (changeRequestsData): number => changeRequestsData.changeRequestsCount,+ (changeRequestsData: ApprovalDataState): number => changeRequestsData.changeRequestsCount,],hasMore: [(s) => [s.changeRequests, s.changeRequestsCount],- (changeRequests, changeRequestsCount): boolean => {+ (changeRequests: ChangeRequest[], changeRequestsCount: number): boolean => {return changeRequests.length < changeRequestsCount},],diff --git a/frontend/src/scenes/approvals/changeRequestsLogic.ts b/frontend/src/scenes/approvals/changeRequestsLogic.tsindex adf0ab8a94fa..45d34baa67af 100644--- a/frontend/src/scenes/approvals/changeRequestsLogic.ts+++ b/frontend/src/scenes/approvals/changeRequestsLogic.ts@@ -1,4 +1,4 @@-import { actions, afterMount, connect, kea, key, listeners, path, props, selectors } from 'kea'+import { MakeLogicType, actions, afterMount, connect, kea, key, listeners, path, props, selectors } from 'kea'import { loaders } from 'kea-loaders'import { lemonToast } from '@posthog/lemon-ui'@@ -10,7 +10,6 @@ import { userLogic } from 'scenes/userLogic'import { AvailableFeature, ChangeRequest, ChangeRequestState } from '~/types'-import type { changeRequestsLogicType } from './changeRequestsLogicType'import type { ApprovalContext, ChangeRequestCreatedEventDetail } from './utils'export interface ChangeRequestsLogicProps {@@ -41,6 +40,76 @@ export function getChangeRequestButtonVisibility(changeRequest: ChangeRequest):}}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface changeRequestsLogicValues {+ currentTeamId: number | null // teamLogic+ hasAvailableFeature: (feature: AvailableFeature, currentUsage?: number | undefined) => boolean // userLogic+ buttonVisibility: ChangeRequestButtonVisibility | null+ changeRequests: ChangeRequest[]+ changeRequestsLoading: boolean+ pendingChangeRequest: ChangeRequest | null+ shouldShowBanner: boolean+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface changeRequestsLogicActions {+ approveRequest: (id: string) => {+ id: string+ }+ cancelRequest: (+ id: string,+ reason?: string+ ) => {+ id: string+ reason: string | undefined+ }+ loadChangeRequests: () => {+ value: true+ }+ loadChangeRequestsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadChangeRequestsSuccess: (+ changeRequests: ChangeRequest[],+ payload?: {+ value: true+ }+ ) => {+ changeRequests: ChangeRequest[]+ payload?: {+ value: true+ }+ }+ rejectRequest: (+ id: string,+ reason?: string+ ) => {+ id: string+ reason: string | undefined+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface changeRequestsLogicMeta {+ key: string+ __keaTypeGenInternalSelectorTypes: {+ pendingChangeRequest: (changeRequests: ChangeRequest[]) => ChangeRequest | null+ shouldShowBanner: (pendingChangeRequest: ChangeRequest | null) => boolean+ buttonVisibility: (pendingChangeRequest: ChangeRequest | null) => ChangeRequestButtonVisibility | null+ }+}++export type changeRequestsLogicType = MakeLogicType<+ changeRequestsLogicValues,+ changeRequestsLogicActions,+ ChangeRequestsLogicProps,+ changeRequestsLogicMeta+>+export const changeRequestsLogic = kea<changeRequestsLogicType>([path(['scenes', 'approvals', 'changeRequestsLogic']),props({} as ChangeRequestsLogicProps),@@ -88,7 +157,7 @@ export const changeRequestsLogic = kea<changeRequestsLogicType>([selectors({pendingChangeRequest: [(s) => [s.changeRequests],- (changeRequests): ChangeRequest | null => {+ (changeRequests: ChangeRequest[]): ChangeRequest | null => {const pending = changeRequests.filter((cr) => cr.state === ChangeRequestState.Pending || cr.state === ChangeRequestState.Approved)@@ -98,14 +167,14 @@ export const changeRequestsLogic = kea<changeRequestsLogicType>([shouldShowBanner: [(s) => [s.pendingChangeRequest],- (pendingChangeRequest): boolean => {+ (pendingChangeRequest: ChangeRequest | null): boolean => {return pendingChangeRequest !== null},],buttonVisibility: [(s) => [s.pendingChangeRequest],- (pendingChangeRequest): ChangeRequestButtonVisibility | null => {+ (pendingChangeRequest: ChangeRequest | null): ChangeRequestButtonVisibility | null => {if (!pendingChangeRequest) {return null}diff --git a/frontend/src/scenes/approvals/pendingApprovalsLogic.ts b/frontend/src/scenes/approvals/pendingApprovalsLogic.tsindex 6d17367bf7af..e2e9a3607961 100644--- a/frontend/src/scenes/approvals/pendingApprovalsLogic.ts+++ b/frontend/src/scenes/approvals/pendingApprovalsLogic.ts@@ -1,4 +1,4 @@-import { afterMount, connect, kea, path, selectors } from 'kea'+import { MakeLogicType, afterMount, connect, kea, path, selectors } from 'kea'import { loaders } from 'kea-loaders'import api from 'lib/api'@@ -8,7 +8,51 @@ import { userLogic } from 'scenes/userLogic'import { AvailableFeature, ChangeRequest, ChangeRequestState } from '~/types'-import type { pendingApprovalsLogicType } from './pendingApprovalsLogicType'+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface pendingApprovalsLogicValues {+ currentTeamId: number | null // teamLogic+ hasAvailableFeature: (feature: AvailableFeature, currentUsage?: number | undefined) => boolean // userLogic+ actionableChangeRequests: ChangeRequest[]+ actionableCount: number+ unresolvedChangeRequests: ChangeRequest[]+ unresolvedChangeRequestsLoading: boolean+ unresolvedCount: number+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface pendingApprovalsLogicActions {+ loadUnresolvedChangeRequests: () => any+ loadUnresolvedChangeRequestsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadUnresolvedChangeRequestsSuccess: (+ unresolvedChangeRequests: ChangeRequest[],+ payload?: any+ ) => {+ unresolvedChangeRequests: ChangeRequest[]+ payload?: any+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface pendingApprovalsLogicMeta {+ __keaTypeGenInternalSelectorTypes: {+ actionableChangeRequests: (unresolvedChangeRequests: ChangeRequest[]) => ChangeRequest[]+ actionableCount: (actionableChangeRequests: ChangeRequest[]) => number+ unresolvedCount: (unresolvedChangeRequests: ChangeRequest[]) => number+ }+}++export type pendingApprovalsLogicType = MakeLogicType<+ pendingApprovalsLogicValues,+ pendingApprovalsLogicActions,+ Record<string, any>,+ pendingApprovalsLogicMeta+>export const pendingApprovalsLogic = kea<pendingApprovalsLogicType>([path(['scenes', 'approvals', 'pendingApprovalsLogic']),@@ -39,13 +83,19 @@ export const pendingApprovalsLogic = kea<pendingApprovalsLogicType>([selectors({actionableChangeRequests: [(s) => [s.unresolvedChangeRequests],- (changeRequests): ChangeRequest[] =>+ (changeRequests: ChangeRequest[]): ChangeRequest[] =>changeRequests.filter((cr) => cr.state === ChangeRequestState.Pending && cr.can_approve && !cr.user_decision),],- actionableCount: [(s) => [s.actionableChangeRequests], (actionable): number => actionable.length],- unresolvedCount: [(s) => [s.unresolvedChangeRequests], (unresolved): number => unresolved.length],+ actionableCount: [+ (s) => [s.actionableChangeRequests],+ (actionable: ChangeRequest[]): number => actionable.length,+ ],+ unresolvedCount: [+ (s) => [s.unresolvedChangeRequests],+ (unresolved: ChangeRequest[]): number => unresolved.length,+ ],}),afterMount(({ actions }) => {diff --git a/frontend/src/scenes/instance/AsyncMigrations/asyncMigrationParameterFormLogic.ts b/frontend/src/scenes/instance/AsyncMigrations/asyncMigrationParameterFormLogic.tsindex 5137d127408c..b962eceab688 100644--- a/frontend/src/scenes/instance/AsyncMigrations/asyncMigrationParameterFormLogic.ts+++ b/frontend/src/scenes/instance/AsyncMigrations/asyncMigrationParameterFormLogic.ts@@ -1,10 +1,76 @@-import { kea, key, path, props } from 'kea'+import { MakeLogicType, kea, key, path, props } from 'kea'import { forms } from 'kea-forms'+import type { DeepPartial, DeepPartialMap, FieldName, ValidationErrorType } from 'kea-forms'import { isNumber } from 'lib/utils/guards'import { AsyncMigrationModalProps, asyncMigrationsLogic } from 'scenes/instance/AsyncMigrations/asyncMigrationsLogic'-import type { asyncMigrationParameterFormLogicType } from './asyncMigrationParameterFormLogicType'+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface asyncMigrationParameterFormLogicValues {+ isParametersSubmitting: boolean+ isParametersValid: boolean+ parameters: Record<string, number>+ parametersAllErrors: Record<string, any>+ parametersChanged: boolean+ parametersErrors: DeepPartialMap<Record<string, number>, ValidationErrorType>+ parametersHasErrors: boolean+ parametersManualErrors: Record<string, any>+ parametersTouched: boolean+ parametersTouches: Record<string, boolean>+ parametersValidationErrors: DeepPartialMap<Record<string, number>, ValidationErrorType>+ showParametersErrors: boolean+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface asyncMigrationParameterFormLogicActions {+ resetParameters: (values?: Record<string, number>) => {+ values?: Record<string, number>+ }+ setParametersManualErrors: (errors: Record<string, any>) => {+ errors: Record<string, any>+ }+ setParametersValue: (+ key: FieldName,+ value: any+ ) => {+ name: FieldName+ value: any+ }+ setParametersValues: (values: DeepPartial<Record<string, number>>) => {+ values: DeepPartial<Record<string, number>>+ }+ submitParameters: () => {+ value: boolean+ }+ submitParametersFailure: (+ error: Error,+ errors: Record<string, any>+ ) => {+ error: Error+ errors: Record<string, any>+ }+ submitParametersRequest: (parameters: Record<string, number>) => {+ parameters: Record<string, number>+ }+ submitParametersSuccess: (parameters: Record<string, number>) => {+ parameters: Record<string, number>+ }+ touchParametersField: (key: string) => {+ key: string+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface asyncMigrationParameterFormLogicMeta {+ key: number+}++export type asyncMigrationParameterFormLogicType = MakeLogicType<+ asyncMigrationParameterFormLogicValues,+ asyncMigrationParameterFormLogicActions,+ AsyncMigrationModalProps,+ asyncMigrationParameterFormLogicMeta+>export const asyncMigrationParameterFormLogic = kea<asyncMigrationParameterFormLogicType>([path(['scenes', 'instance', 'AsyncMigrations', 'asyncMigrationParameterFormLogic']),diff --git a/frontend/src/scenes/instance/AsyncMigrations/asyncMigrationsLogic.ts b/frontend/src/scenes/instance/AsyncMigrations/asyncMigrationsLogic.tsindex 67b436defb77..b9987ee277cf 100644--- a/frontend/src/scenes/instance/AsyncMigrations/asyncMigrationsLogic.ts+++ b/frontend/src/scenes/instance/AsyncMigrations/asyncMigrationsLogic.ts@@ -1,4 +1,4 @@-import { actions, connect, events, kea, listeners, path, reducers, selectors } from 'kea'+import { MakeLogicType, actions, connect, events, kea, listeners, path, reducers, selectors } from 'kea'import { loaders } from 'kea-loaders'import { actionToUrl, urlToAction } from 'kea-router'@@ -10,7 +10,7 @@ import { userLogic } from 'scenes/userLogic'import { InstanceSetting } from '~/types'-import type { asyncMigrationsLogicType } from './asyncMigrationsLogicType'+import type { PreflightStatus } from '../../../types'export type TabName = 'overview' | 'internal_metrics'@@ -71,6 +71,135 @@ export interface AsyncMigrationModalProps {message: string}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface asyncMigrationsLogicValues {+ preflight: PreflightStatus | null // preflightLogic+ actionableMigrations: AsyncMigration[]+ activeAsyncMigrationModal: AsyncMigrationModalProps | null+ activeTab: AsyncMigrationsTab+ asyncMigrationErrors: Record<number, AsyncMigrationError[]>+ asyncMigrationErrorsLoading: Record<number, boolean>+ asyncMigrationSettings: InstanceSetting[]+ asyncMigrationSettingsLoading: boolean+ asyncMigrations: AsyncMigration[]+ asyncMigrationsLoading: boolean+ futureMigrations: AsyncMigration[]+ isAnyMigrationRunning: boolean+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface asyncMigrationsLogicActions {+ closeAsyncMigrationsModal: () => {+ value: true+ }+ forceStopMigration: (migration: AsyncMigration) => {+ migration: AsyncMigration+ }+ forceStopMigrationWithoutRollback: (migration: AsyncMigration) => {+ migration: AsyncMigration+ }+ loadAsyncMigrationErrors: (migrationId: number) => {+ migrationId: number+ }+ loadAsyncMigrationErrorsFailure: (+ migrationId: number,+ error: any+ ) => {+ error: any+ migrationId: number+ }+ loadAsyncMigrationErrorsSuccess: (+ migrationId: number,+ errors: AsyncMigrationError[]+ ) => {+ errors: AsyncMigrationError[]+ migrationId: number+ }+ loadAsyncMigrationSettings: () => any+ loadAsyncMigrationSettingsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadAsyncMigrationSettingsSuccess: (+ asyncMigrationSettings: InstanceSetting[],+ payload?: any+ ) => {+ asyncMigrationSettings: InstanceSetting[]+ payload?: any+ }+ loadAsyncMigrations: () => any+ loadAsyncMigrationsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadAsyncMigrationsSuccess: (+ asyncMigrations: AsyncMigration[],+ payload?: any+ ) => {+ asyncMigrations: AsyncMigration[]+ payload?: any+ }+ openAsyncMigrationsModal: (+ migration: AsyncMigration,+ endpoint: string,+ message: string+ ) => {+ endpoint: string+ message: string+ migration: AsyncMigration+ }+ resumeMigration: (migration: AsyncMigration) => {+ migration: AsyncMigration+ }+ rollbackMigration: (migration: AsyncMigration) => {+ migration: AsyncMigration+ }+ setActiveTab: (tab: AsyncMigrationsTab) => {+ tab: AsyncMigrationsTab+ }+ triggerMigration: (migration: AsyncMigration) => {+ migration: AsyncMigration+ }+ updateMigrationStatus: (+ migration: AsyncMigration,+ endpoint: string,+ message: string+ ) => {+ endpoint: string+ message: string+ migration: AsyncMigration+ }+ updateSetting: (+ settingKey: string,+ newValue: string+ ) => {+ newValue: string+ settingKey: string+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface asyncMigrationsLogicMeta {+ __keaTypeGenInternalSelectorTypes: {+ isAnyMigrationRunning: (asyncMigrations: AsyncMigration[]) => boolean+ actionableMigrations: (asyncMigrations: AsyncMigration[]) => AsyncMigration[]+ futureMigrations: (asyncMigrations: AsyncMigration[]) => AsyncMigration[]+ }+}++export type asyncMigrationsLogicType = MakeLogicType<+ asyncMigrationsLogicValues,+ asyncMigrationsLogicActions,+ Record<string, any>,+ asyncMigrationsLogicMeta+>+export const asyncMigrationsLogic = kea<asyncMigrationsLogicType>([path(['scenes', 'instance', 'AsyncMigrations', 'asyncMigrationsLogic']),connect(() => ({@@ -165,18 +294,18 @@ export const asyncMigrationsLogic = kea<asyncMigrationsLogicType>([selectors({isAnyMigrationRunning: [(s) => [s.asyncMigrations],- (asyncMigrations) =>+ (asyncMigrations: AsyncMigration[]) =>asyncMigrations.some((migration) =>[AsyncMigrationStatus.Running, AsyncMigrationStatus.Starting].includes(migration.status)),],actionableMigrations: [(s) => [s.asyncMigrations],- (asyncMigrations) => asyncMigrations.filter((migration) => migration.is_available),+ (asyncMigrations: AsyncMigration[]) => asyncMigrations.filter((migration) => migration.is_available),],futureMigrations: [(s) => [s.asyncMigrations],- (asyncMigrations) => asyncMigrations.filter((migration) => !migration.is_available),+ (asyncMigrations: AsyncMigration[]) => asyncMigrations.filter((migration) => !migration.is_available),],}),diff --git a/frontend/src/scenes/instance/DeadLetterQueue/deadLetterQueueLogic.ts b/frontend/src/scenes/instance/DeadLetterQueue/deadLetterQueueLogic.tsindex ce7b9c2afb63..9bd0070fbf0e 100644--- a/frontend/src/scenes/instance/DeadLetterQueue/deadLetterQueueLogic.ts+++ b/frontend/src/scenes/instance/DeadLetterQueue/deadLetterQueueLogic.ts@@ -1,11 +1,10 @@-import { actions, afterMount, kea, listeners, path, reducers, selectors } from 'kea'+import { MakeLogicType, actions, afterMount, kea, listeners, path, reducers, selectors } from 'kea'import { loaders } from 'kea-loaders'import api from 'lib/api'import { userLogic } from 'scenes/userLogic'import { AppMetricsV2RequestParams, SystemStatusRow } from './../../../types'-import type { deadLetterQueueLogicType } from './deadLetterQueueLogicType'export type TabName = 'overview' | 'internal_metrics'@@ -27,6 +26,67 @@ const DEFAULT_FILTERS: MetricsFilters = {interval: 'day',}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface deadLetterQueueLogicValues {+ activeTab: DeadLetterQueueTab+ deadLetterQueueMetrics: DeadLetterQueueMetricRow[]+ deadLetterQueueMetricsLoading: boolean+ filters: MetricsFilters+ rowsPerMetric: Record<string, string[][]>+ singleValueMetrics: DeadLetterQueueMetricRow[]+ tableMetrics: DeadLetterQueueMetricRow[]+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface deadLetterQueueLogicActions {+ addRowsToMetric: (+ key: string,+ rows: string[][]+ ) => {+ key: string+ rows: string[][]+ }+ loadDeadLetterQueueMetrics: () => any+ loadDeadLetterQueueMetricsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadDeadLetterQueueMetricsSuccess: (+ deadLetterQueueMetrics: DeadLetterQueueMetricRow[],+ payload?: any+ ) => {+ deadLetterQueueMetrics: DeadLetterQueueMetricRow[]+ payload?: any+ }+ loadMoreRows: (key: string) => {+ key: string+ }+ setActiveTab: (tabKey: DeadLetterQueueTab) => {+ tabKey: DeadLetterQueueTab+ }+ setFilters: (filters: Partial<MetricsFilters>) => {+ filters: Partial<MetricsFilters>+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface deadLetterQueueLogicMeta {+ __keaTypeGenInternalSelectorTypes: {+ singleValueMetrics: (deadLetterQueueMetrics: DeadLetterQueueMetricRow[]) => DeadLetterQueueMetricRow[]+ tableMetrics: (deadLetterQueueMetrics: DeadLetterQueueMetricRow[]) => DeadLetterQueueMetricRow[]+ }+}++export type deadLetterQueueLogicType = MakeLogicType<+ deadLetterQueueLogicValues,+ deadLetterQueueLogicActions,+ Record<string, any>,+ deadLetterQueueLogicMeta+>+export const deadLetterQueueLogic = kea<deadLetterQueueLogicType>([path(['scenes', 'instance', 'DeadLetterQueue', 'deadLetterQueueLogic']),diff --git a/frontend/src/scenes/instance/QueryPerformance/queryPerformanceLogic.ts b/frontend/src/scenes/instance/QueryPerformance/queryPerformanceLogic.tsindex 65c8ee04f667..e7d7a9034450 100644--- a/frontend/src/scenes/instance/QueryPerformance/queryPerformanceLogic.ts+++ b/frontend/src/scenes/instance/QueryPerformance/queryPerformanceLogic.ts@@ -1,11 +1,9 @@-import { actions, afterMount, kea, listeners, path, reducers, selectors } from 'kea'+import { MakeLogicType, actions, afterMount, kea, listeners, path, reducers, selectors } from 'kea'import { loaders } from 'kea-loaders'import api from 'lib/api'import { userLogic } from 'scenes/userLogic'-import type { queryPerformanceLogicType } from './queryPerformanceLogicType'-export interface PrecomputationTeam {team_id: numberteam_name: string@@ -153,6 +151,177 @@ export interface SlowestQuery {sub_queries: SlowestQuery[]}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface queryPerformanceLogicValues {+ cacheHealth: CacheHealthResponse | null+ cacheHealthLoading: boolean+ cachePartitionRows: CachePartitionRow[]+ exceptionCodeFilter: string+ experimentIdFilter: string+ experimentsTab: ExperimentsTab+ hoursBack: number+ metricTypeFilter: string+ overviewHoursBack: number+ precomputationTeams: PrecomputationTeam[]+ precomputationTeamsLoading: boolean+ precomputeOverview: PrecomputeOverviewResponse | null+ precomputeOverviewLoading: boolean+ precomputeTimeseries: PrecomputeTimeseriesResponse | null+ precomputeTimeseriesLoading: boolean+ search: string+ slowestQueries: SlowestQuery[]+ slowestQueriesLoading: boolean+ teamIdFilter: string+ timeseriesHoursBack: number+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface queryPerformanceLogicActions {+ loadCacheHealth: () => any+ loadCacheHealthFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadCacheHealthSuccess: (+ cacheHealth: CacheHealthResponse | null,+ payload?: any+ ) => {+ cacheHealth: CacheHealthResponse | null+ payload?: any+ }+ loadPrecomputationTeams: () => any+ loadPrecomputationTeamsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadPrecomputationTeamsSuccess: (+ precomputationTeams: PrecomputationTeam[],+ payload?: any+ ) => {+ precomputationTeams: PrecomputationTeam[]+ payload?: any+ }+ loadPrecomputeOverview: () => any+ loadPrecomputeOverviewFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadPrecomputeOverviewSuccess: (+ precomputeOverview: PrecomputeOverviewResponse | null,+ payload?: any+ ) => {+ precomputeOverview: PrecomputeOverviewResponse | null+ payload?: any+ }+ loadPrecomputeTimeseries: () => any+ loadPrecomputeTimeseriesFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadPrecomputeTimeseriesSuccess: (+ precomputeTimeseries: PrecomputeTimeseriesResponse | null,+ payload?: any+ ) => {+ precomputeTimeseries: PrecomputeTimeseriesResponse | null+ payload?: any+ }+ loadSlowestQueries: () => any+ loadSlowestQueriesFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadSlowestQueriesSuccess: (+ slowestQueries: SlowestQuery[],+ payload?: any+ ) => {+ slowestQueries: SlowestQuery[]+ payload?: any+ }+ setExceptionCodeFilter: (exceptionCode: string) => {+ exceptionCode: string+ }+ setExperimentIdFilter: (experimentId: string) => {+ experimentId: string+ }+ setExperimentsTab: (tab: ExperimentsTab) => {+ tab: ExperimentsTab+ }+ setHoursBack: (hours: number) => {+ hours: number+ }+ setMetricTypeFilter: (metricType: string) => {+ metricType: string+ }+ setOverviewHoursBack: (hours: number) => {+ hours: number+ }+ setPrecomputation: (+ teamId: number,+ enabled: boolean+ ) => {+ enabled: boolean+ teamId: number+ }+ setPrecomputationFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ setPrecomputationSuccess: (+ precomputationTeams: PrecomputationTeam[],+ payload?: {+ enabled: boolean+ teamId: number+ }+ ) => {+ precomputationTeams: PrecomputationTeam[]+ payload?: {+ enabled: boolean+ teamId: number+ }+ }+ setSearch: (search: string) => {+ search: string+ }+ setTeamIdFilter: (teamId: string) => {+ teamId: string+ }+ setTimeseriesHoursBack: (hours: number) => {+ hours: number+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface queryPerformanceLogicMeta {+ __keaTypeGenInternalSelectorTypes: {+ cachePartitionRows: (cacheHealth: CacheHealthResponse | null) => CachePartitionRow[]+ }+}++export type queryPerformanceLogicType = MakeLogicType<+ queryPerformanceLogicValues,+ queryPerformanceLogicActions,+ Record<string, any>,+ queryPerformanceLogicMeta+>+export const queryPerformanceLogic = kea<queryPerformanceLogicType>([path(['scenes', 'instance', 'QueryPerformance', 'queryPerformanceLogic']),actions({@@ -305,7 +474,7 @@ export const queryPerformanceLogic = kea<queryPerformanceLogicType>([selectors({cachePartitionRows: [(s) => [s.cacheHealth],- (cacheHealth): CachePartitionRow[] => {+ (cacheHealth: CacheHealthResponse | null): CachePartitionRow[] => {const byPartition: Record<string, CachePartitionRow> = {}for (const table of cacheHealth?.tables ?? []) {for (const partition of table.partitions) {diff --git a/frontend/src/scenes/instance/SystemStatus/staffUsersLogic.ts b/frontend/src/scenes/instance/SystemStatus/staffUsersLogic.tsindex 762169e69560..821faeb72308 100644--- a/frontend/src/scenes/instance/SystemStatus/staffUsersLogic.ts+++ b/frontend/src/scenes/instance/SystemStatus/staffUsersLogic.ts@@ -1,4 +1,4 @@-import { actions, connect, events, kea, path, reducers, selectors } from 'kea'+import { MakeLogicType, actions, connect, events, kea, path, reducers, selectors } from 'kea'import { loaders } from 'kea-loaders'import { router } from 'kea-router'@@ -8,7 +8,101 @@ import { userLogic } from 'scenes/userLogic'import { UserType } from '~/types'-import type { staffUsersLogicType } from './staffUsersLogicType'+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface staffUsersLogicValues {+ user: UserType | null // userLogic+ allUsers: UserType[]+ allUsersLoading: boolean+ nonStaffUsers: UserType[]+ staffUserToBeDeleted: UserType | null+ staffUsers: UserType[]+ staffUsersToBeAdded: string[]+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface staffUsersLogicActions {+ loadUser: (resetOnFailure?: boolean | undefined) => {+ resetOnFailure: boolean | undefined+ } // userLogic+ addStaffUsers: () => {+ value: true+ }+ addStaffUsersFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ addStaffUsersSuccess: (+ allUsers: UserType[],+ payload?: {+ value: true+ }+ ) => {+ allUsers: UserType[]+ payload?: {+ value: true+ }+ }+ deleteStaffUser: (userUuid: string) => {+ userUuid: string+ }+ deleteStaffUserFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ deleteStaffUserSuccess: (+ allUsers: UserType[],+ payload?: {+ userUuid: string+ }+ ) => {+ allUsers: UserType[]+ payload?: {+ userUuid: string+ }+ }+ loadAllUsers: () => any+ loadAllUsersFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadAllUsersSuccess: (+ allUsers: UserType[],+ payload?: any+ ) => {+ allUsers: UserType[]+ payload?: any+ }+ setStaffUserToBeDeleted: (user: UserType | null) => {+ user: UserType | null+ }+ setStaffUsersToBeAdded: (userUuids: string[]) => {+ userUuids: string[]+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface staffUsersLogicMeta {+ __keaTypeGenInternalSelectorTypes: {+ staffUsers: (allUsers: UserType[]) => UserType[]+ nonStaffUsers: (allUsers: UserType[]) => UserType[]+ }+}++export type staffUsersLogicType = MakeLogicType<+ staffUsersLogicValues,+ staffUsersLogicActions,+ Record<string, any>,+ staffUsersLogicMeta+>export const staffUsersLogic = kea<staffUsersLogicType>([path(['scenes', 'instance', 'SystemStatus', 'staffUsersLogic']),@@ -76,8 +170,14 @@ export const staffUsersLogic = kea<staffUsersLogicType>([],}),selectors({- staffUsers: [(s) => [s.allUsers], (allUsers): UserType[] => allUsers.filter((user) => user.is_staff)],- nonStaffUsers: [(s) => [s.allUsers], (allUsers): UserType[] => allUsers.filter((user) => !user.is_staff)],+ staffUsers: [+ (s) => [s.allUsers],+ (allUsers: UserType[]): UserType[] => allUsers.filter((user) => user.is_staff),+ ],+ nonStaffUsers: [+ (s) => [s.allUsers],+ (allUsers: UserType[]): UserType[] => allUsers.filter((user) => !user.is_staff),+ ],}),events(({ actions }) => ({afterMount: [actions.loadAllUsers],diff --git a/frontend/src/scenes/instance/SystemStatus/systemStatusLogic.ts b/frontend/src/scenes/instance/SystemStatus/systemStatusLogic.tsindex 8f1b35e59cc0..66620db901da 100644--- a/frontend/src/scenes/instance/SystemStatus/systemStatusLogic.ts+++ b/frontend/src/scenes/instance/SystemStatus/systemStatusLogic.ts@@ -1,4 +1,4 @@-import { actions, events, kea, listeners, path, reducers, selectors } from 'kea'+import { MakeLogicType, actions, events, kea, listeners, path, reducers, selectors } from 'kea'import { loaders } from 'kea-loaders'import { actionToUrl, urlToAction } from 'kea-router'@@ -11,8 +11,6 @@ import { userLogic } from 'scenes/userLogic'import { InstanceSetting, SystemStatus, SystemStatusQueriesResult, SystemStatusRow } from '~/types'-import type { systemStatusLogicType } from './systemStatusLogicType'-export enum ConfigMode {View = 'view',Edit = 'edit',@@ -69,6 +67,116 @@ const EDITABLE_INSTANCE_SETTINGS = ['SENTRY_ORGANIZATION',]+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface systemStatusLogicValues {+ editableInstanceSettings: InstanceSetting[]+ error: string | null+ instanceConfigEditingState: Record<string, boolean | number | string>+ instanceConfigMode: ConfigMode+ instanceSettings: InstanceSetting[]+ instanceSettingsLoading: boolean+ openSections: string[]+ overview: SystemStatusRow[]+ queries: SystemStatusQueriesResult | null+ queriesLoading: boolean+ systemStatus: SystemStatus | null+ systemStatusLoading: boolean+ tab: InstanceStatusTabName+ updatedInstanceConfigCount: number | null+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface systemStatusLogicActions {+ clearInstanceConfigEditing: () => {+ value: true+ }+ increaseUpdatedInstanceConfigCount: () => {+ value: true+ }+ loadInstanceSettings: () => any+ loadInstanceSettingsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadInstanceSettingsSuccess: (+ instanceSettings: InstanceSetting[],+ payload?: any+ ) => {+ instanceSettings: InstanceSetting[]+ payload?: any+ }+ loadQueries: () => any+ loadQueriesFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadQueriesSuccess: (+ queries: SystemStatusQueriesResult | null,+ payload?: any+ ) => {+ queries: SystemStatusQueriesResult | null+ payload?: any+ }+ loadSystemStatus: () => any+ loadSystemStatusFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadSystemStatusSuccess: (+ systemStatus: SystemStatus | null,+ payload?: any+ ) => {+ systemStatus: SystemStatus | null+ payload?: any+ }+ saveInstanceConfig: () => {+ value: true+ }+ setInstanceConfigMode: (mode: ConfigMode) => {+ mode: ConfigMode+ }+ setOpenSections: (sections: string[]) => {+ sections: string[]+ }+ setTab: (tab: InstanceStatusTabName) => {+ tab: InstanceStatusTabName+ }+ setUpdatedInstanceConfigCount: (count: number | null) => {+ count: number | null+ }+ updateInstanceConfigValue: (+ key: string,+ value?: boolean | number | string+ ) => {+ key: string+ value: boolean | number | string | undefined+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface systemStatusLogicMeta {+ __keaTypeGenInternalSelectorTypes: {+ overview: (systemStatus: SystemStatus | null) => SystemStatusRow[]+ editableInstanceSettings: (instanceSettings: InstanceSetting[]) => InstanceSetting[]+ }+}++export type systemStatusLogicType = MakeLogicType<+ systemStatusLogicValues,+ systemStatusLogicActions,+ Record<string, any>,+ systemStatusLogicMeta+>+// Note: This logic does some heavy calculations - avoid connecting it outside of system status pages!export const systemStatusLogic = kea<systemStatusLogicType>([path(['scenes', 'instance', 'SystemStatus', 'systemStatusLogic']),@@ -172,7 +280,7 @@ export const systemStatusLogic = kea<systemStatusLogicType>([],editableInstanceSettings: [(s) => [s.instanceSettings],- (instanceSettings): InstanceSetting[] =>+ (instanceSettings: InstanceSetting[]): InstanceSetting[] =>instanceSettings.filter((item) => item.editable && EDITABLE_INSTANCE_SETTINGS.includes(item.key)),],})),diff --git a/frontend/src/scenes/max/feedbackPromptLogic.ts b/frontend/src/scenes/max/feedbackPromptLogic.tsindex f8dd22bae3a8..458d39031887 100644--- a/frontend/src/scenes/max/feedbackPromptLogic.ts+++ b/frontend/src/scenes/max/feedbackPromptLogic.ts@@ -1,10 +1,9 @@-import { actions, kea, key, listeners, path, props, reducers, selectors } from 'kea'+import { MakeLogicType, actions, kea, key, listeners, path, props, reducers, selectors } from 'kea'import posthog from 'posthog-js'import { FEATURE_FLAGS } from 'lib/constants'import { getFeatureFlagPayload } from 'lib/logic/featureFlagLogic'-import type { feedbackPromptLogicType } from './feedbackPromptLogicType'import { maxThreadLogic } from './maxThreadLogic'import { FeedbackRating, FeedbackTriggerType, captureFeedback } from './utils'@@ -41,6 +40,83 @@ export interface FeedbackPromptLogicProps {conversationId: string}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface feedbackPromptLogicValues {+ canShowPrompt: boolean+ currentTriggerType: FeedbackTriggerType+ feedbackConfig: FeedbackConfig | null+ isDetailedFeedbackVisible: boolean+ isPromptVisible: boolean+ isThankYouVisible: boolean+ lastTriggeredIntervalIndex: number+ messageInterval: number+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface feedbackPromptLogicActions {+ checkShouldShowPrompt: (+ messageCount: number,+ retryCount: number,+ cancelCount: number+ ) => {+ cancelCount: number+ messageCount: number+ retryCount: number+ }+ completeDetailedFeedback: () => {+ value: true+ }+ hideDetailedFeedback: () => {+ value: true+ }+ hidePrompt: () => {+ value: true+ }+ hideThankYou: () => {+ value: true+ }+ implicitDismissDetailedFeedback: () => {+ value: true+ }+ implicitDismissPrompt: () => {+ value: true+ }+ recordFeedbackShown: () => {+ value: true+ }+ setLastTriggeredIntervalIndex: (index: number) => {+ index: number+ }+ showDetailedFeedback: () => {+ value: true+ }+ showPrompt: (triggerType: FeedbackTriggerType) => {+ triggerType: FeedbackTriggerType+ }+ showThankYou: () => {+ value: true+ }+ submitRating: (rating: FeedbackRating) => {+ rating: FeedbackRating+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface feedbackPromptLogicMeta {+ key: string+ __keaTypeGenInternalSelectorTypes: {+ canShowPrompt: (feedbackConfig: FeedbackConfig | null) => boolean+ messageInterval: (feedbackConfig: FeedbackConfig | null) => number+ }+}++export type feedbackPromptLogicType = MakeLogicType<+ feedbackPromptLogicValues,+ feedbackPromptLogicActions,+ FeedbackPromptLogicProps,+ feedbackPromptLogicMeta+>+export const feedbackPromptLogic = kea<feedbackPromptLogicType>([path(['scenes', 'max', 'feedbackPromptLogic']),@@ -134,7 +210,7 @@ export const feedbackPromptLogic = kea<feedbackPromptLogicType>([],canShowPrompt: [(s) => [s.feedbackConfig],- (feedbackConfig): boolean => {+ (feedbackConfig: FeedbackConfig | null): boolean => {if (!feedbackConfig) {return false}@@ -145,7 +221,10 @@ export const feedbackPromptLogic = kea<feedbackPromptLogicType>([return Date.now() - parseInt(lastShown, 10) > feedbackConfig.cooldownMs},],- messageInterval: [(s) => [s.feedbackConfig], (feedbackConfig): number => feedbackConfig?.messageInterval ?? 10],+ messageInterval: [+ (s) => [s.feedbackConfig],+ (feedbackConfig: FeedbackConfig | null): number => feedbackConfig?.messageInterval ?? 10,+ ],}),listeners(({ actions, values, props }) => ({diff --git a/frontend/src/scenes/max/floatingMaxPositionLogic.tsx b/frontend/src/scenes/max/floatingMaxPositionLogic.tsxindex 17f0b3c9c178..6947197b48c5 100644--- a/frontend/src/scenes/max/floatingMaxPositionLogic.tsx+++ b/frontend/src/scenes/max/floatingMaxPositionLogic.tsx@@ -1,6 +1,4 @@-import { actions, kea, listeners, path, reducers } from 'kea'--import type { floatingMaxPositionLogicType } from './floatingMaxPositionLogicType'+import { MakeLogicType, actions, kea, listeners, path, reducers } from 'kea'export interface FloatingMaxPosition {side: 'left' | 'right'@@ -8,6 +6,23 @@ export interface FloatingMaxPosition {const FLOATING_MAX_POSITION_STORAGE_KEY = 'floating_max_position'+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface floatingMaxPositionLogicValues {+ position: FloatingMaxPosition+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface floatingMaxPositionLogicActions {+ setPosition: (position: FloatingMaxPosition) => {+ position: FloatingMaxPosition+ }+}++export type floatingMaxPositionLogicType = MakeLogicType<+ floatingMaxPositionLogicValues,+ floatingMaxPositionLogicActions+>+export const floatingMaxPositionLogic = kea<floatingMaxPositionLogicType>([path(['scenes', 'max', 'floatingMaxPositionLogic']),diff --git a/frontend/src/scenes/max/handsFreeLogic.ts b/frontend/src/scenes/max/handsFreeLogic.tsindex 414760d1dc8d..56eb0af9f5ef 100644--- a/frontend/src/scenes/max/handsFreeLogic.ts+++ b/frontend/src/scenes/max/handsFreeLogic.ts@@ -1,13 +1,12 @@// Hands-free conversational mode for Max — STT via ElevenLabs Scribe (browser → WS direct),// TTS via the browser's native speechSynthesis. Built for mobile-web use (gym, walking).-import { actions, afterMount, connect, kea, key, listeners, path, props, reducers, selectors } from 'kea'+import { MakeLogicType, actions, afterMount, connect, kea, key, listeners, path, props, reducers, selectors } from 'kea'import posthog from 'posthog-js'import api from 'lib/api'import { FEATURE_FLAGS } from 'lib/constants'import { lemonToast } from 'lib/lemon-ui/LemonToast/LemonToast'-import type { handsFreeLogicType } from './handsFreeLogicType'import { AssistantSummary, buildSpokenText } from './handsFreeUtils'import { maxLogic } from './maxLogic'import { maxThreadLogic } from './maxThreadLogic'@@ -65,6 +64,74 @@ async function loadScribeSdk(): Promise<{return cachedSdkPromise}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface handsFreeLogicValues {+ threadLogicKey: string // maxLogic+ canUseHandsFree: boolean+ connection: HandsFreeConnection+ error: string | null+ isActive: boolean+ partialTranscript: string+ sdkAvailable: boolean | null+ status: HandsFreeStatus+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface handsFreeLogicActions {+ cancelSpeaking: () => {+ value: true+ }+ commitTranscript: (text: string) => {+ text: string+ }+ enterHandsFree: () => {+ value: true+ }+ exitHandsFree: (reason?: string) => {+ reason: string+ }+ interruptSpeaking: () => {+ value: true+ }+ setConnection: (connection: HandsFreeConnection) => {+ connection: HandsFreeConnection+ }+ setError: (error: string | null) => {+ error: string | null+ }+ setPartialTranscript: (text: string) => {+ text: string+ }+ setSdkAvailable: (available: boolean) => {+ available: boolean+ }+ setStatus: (status: HandsFreeStatus) => {+ status: HandsFreeStatus+ }+ speakAssistantResponse: (summary: AssistantSummary) => {+ summary: AssistantSummary+ }+ toggleHandsFree: () => {+ value: true+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface handsFreeLogicMeta {+ key: string+ __keaTypeGenInternalSelectorTypes: {+ isActive: (status: HandsFreeStatus) => boolean+ canUseHandsFree: (sdkAvailable: boolean | null) => boolean+ }+}++export type handsFreeLogicType = MakeLogicType<+ handsFreeLogicValues,+ handsFreeLogicActions,+ HandsFreeLogicProps,+ handsFreeLogicMeta+>+export const handsFreeLogic = kea<handsFreeLogicType>([props({} as HandsFreeLogicProps),key((props) => props.panelId as string),@@ -132,10 +199,10 @@ export const handsFreeLogic = kea<handsFreeLogicType>([}),selectors({- isActive: [(s) => [s.status], (status) => status !== 'off'],+ isActive: [(s) => [s.status], (status: HandsFreeStatus) => status !== 'off'],// Render the mic button when the probe hasn't completed yet (null) or has succeeded (true).// Hide it only once we've confirmed the SDK can't be used.- canUseHandsFree: [(s) => [s.sdkAvailable], (sdkAvailable) => sdkAvailable !== false],+ canUseHandsFree: [(s) => [s.sdkAvailable], (sdkAvailable: boolean | null) => sdkAvailable !== false],}),listeners(({ actions, values, cache, props }) => ({diff --git a/frontend/src/scenes/max/logics/maxMessageRatingsLogic.ts b/frontend/src/scenes/max/logics/maxMessageRatingsLogic.tsindex 13ff571f08c6..98d97294a6d1 100644--- a/frontend/src/scenes/max/logics/maxMessageRatingsLogic.ts+++ b/frontend/src/scenes/max/logics/maxMessageRatingsLogic.ts@@ -1,12 +1,49 @@-import { actions, kea, listeners, path, reducers, selectors } from 'kea'--import type { maxMessageRatingsLogicType } from './maxMessageRatingsLogicType'+import { MakeLogicType, actions, kea, listeners, path, reducers, selectors } from 'kea'export type MaxMessageRating = 'good' | 'bad'export type MaxMessageRatingOrNull = MaxMessageRating | nullconst MAX_STORED_RATINGS = 1000+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface maxMessageRatingsLogicValues {+ ratingForTraceId: (traceId: string | null | undefined) => MaxMessageRatingOrNull+ ratingsByTraceId: Record<string, MaxMessageRating>+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface maxMessageRatingsLogicActions {+ clearAllRatings: () => {+ value: true+ }+ clearRatingForTraceId: (payload: { traceId: string }) => {+ traceId: string+ }+ pruneOldRatings: () => {+ value: true+ }+ setRatingForTraceId: (payload: { rating: MaxMessageRating; traceId: string }) => {+ rating: MaxMessageRating+ traceId: string+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface maxMessageRatingsLogicMeta {+ __keaTypeGenInternalSelectorTypes: {+ ratingForTraceId: (+ ratingsByTraceId: Record<string, MaxMessageRating>+ ) => (traceId: string | null | undefined) => MaxMessageRatingOrNull+ }+}++export type maxMessageRatingsLogicType = MakeLogicType<+ maxMessageRatingsLogicValues,+ maxMessageRatingsLogicActions,+ Record<string, any>,+ maxMessageRatingsLogicMeta+>+/*** Persists Max AI message ratings ("good"/"bad") keyed by trace ID.*diff --git a/frontend/src/scenes/max/logics/maxWebAnalyticsNudgeLogic.ts b/frontend/src/scenes/max/logics/maxWebAnalyticsNudgeLogic.tsindex ba4866dc5d91..36de995f3a98 100644--- a/frontend/src/scenes/max/logics/maxWebAnalyticsNudgeLogic.ts+++ b/frontend/src/scenes/max/logics/maxWebAnalyticsNudgeLogic.ts@@ -1,4 +1,4 @@-import { actions, afterMount, connect, kea, key, listeners, path, props, selectors } from 'kea'+import { MakeLogicType, actions, afterMount, connect, kea, key, listeners, path, props, selectors } from 'kea'import { router } from 'kea-router'import { subscriptions } from 'kea-subscriptions'import posthog from 'posthog-js'@@ -13,11 +13,11 @@ import { recentItemsModel } from '~/models/recentItemsModel'import { HumanMessage } from '~/queries/schema/schema-assistant-messages'import { ConversationTopic } from '~/types'+import type { FeatureFlagsSet } from '../../../lib/logic/featureFlagLogic'import { maxGlobalLogic } from '../maxGlobalLogic'import type { ThreadMessage } from '../maxThreadLogic'import { isHumanMessage } from '../utils'import { isWebAnalyticsRelatedMessage, isWebAnalyticsRelatedQuestion } from '../utils/detectWebAnalyticsQuery'-import type { maxWebAnalyticsNudgeLogicType } from './maxWebAnalyticsNudgeLogicType'import { maxWebAnalyticsNudgeSessionLogic } from './maxWebAnalyticsNudgeSessionLogic'const WEB_ANALYTICS_RECENT_DAYS = 30@@ -61,6 +61,95 @@ export interface NudgeReportProperties {trigger: NudgeTrigger}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface maxWebAnalyticsNudgeLogicValues {+ featureFlags: FeatureFlagsSet // featureFlagLogic+ dismissedThisSession: boolean // maxWebAnalyticsNudgeSessionLogic+ eligibleReportedThisSession: boolean // maxWebAnalyticsNudgeSessionLogic+ shownForMessageId: string | null // maxWebAnalyticsNudgeSessionLogic+ sceneLogViewsByRef: Record<string, string> // recentItemsModel+ sceneLogViewsHasLoaded: boolean // recentItemsModel+ finalAnswerGroup: ThreadMessage[]+ groupHasWebChart: boolean+ isEligible: boolean+ isWebAnalyticsAnswer: boolean+ lastHumanQuestion: string | null+ reportProperties: NudgeReportProperties+ shouldShowNudge: boolean+ topicIsWebAnalytics: boolean+ trigger: NudgeTrigger+ variant: string | null+ visitedWebAnalyticsRecently: boolean+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface maxWebAnalyticsNudgeLogicActions {+ markEligibleReported: () => {+ value: true+ } // maxWebAnalyticsNudgeSessionLogic+ markNudgeDismissed: () => {+ value: true+ } // maxWebAnalyticsNudgeSessionLogic+ markNudgeShown: (messageId: string) => {+ messageId: string+ } // maxWebAnalyticsNudgeSessionLogic+ evaluateReporting: () => {+ value: true+ }+ nudgeClicked: () => {+ value: true+ }+ nudgeDismissed: () => {+ value: true+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface maxWebAnalyticsNudgeLogicMeta {+ key: string+ __keaTypeGenInternalSelectorTypes: {+ variant: (featureFlags: FeatureFlagsSet) => string | null+ finalAnswerGroup: (threadGrouped: ThreadMessage[]) => ThreadMessage[]+ lastHumanQuestion: (threadGrouped: ThreadMessage[]) => string | null+ groupHasWebChart: (finalAnswerGroup: ThreadMessage[]) => boolean+ topicIsWebAnalytics: (conversationTopic: ConversationTopic | null) => boolean+ trigger: (topicIsWebAnalytics: boolean, groupHasWebChart: boolean) => NudgeTrigger+ isWebAnalyticsAnswer: (+ topicIsWebAnalytics: boolean,+ groupHasWebChart: boolean,+ lastHumanQuestion: string | null+ ) => boolean+ visitedWebAnalyticsRecently: (sceneLogViewsByRef: Record<string, string>) => boolean+ isEligible: (+ isWebAnalyticsAnswer: boolean,+ visitedWebAnalyticsRecently: boolean,+ sceneLogViewsHasLoaded: boolean,+ isCompleted: boolean,+ isSharedThread: boolean+ ) => boolean+ shouldShowNudge: (+ isEligible: boolean,+ variant: string | null,+ dismissedThisSession: boolean,+ shownForMessageId: string | null,+ messageId: string+ ) => boolean+ reportProperties: (+ variant: string | null,+ trigger: NudgeTrigger,+ conversationId: string | null,+ messageId: string+ ) => NudgeReportProperties+ }+}++export type maxWebAnalyticsNudgeLogicType = MakeLogicType<+ maxWebAnalyticsNudgeLogicValues,+ maxWebAnalyticsNudgeLogicActions,+ MaxWebAnalyticsNudgeLogicProps,+ maxWebAnalyticsNudgeLogicMeta+>+export const maxWebAnalyticsNudgeLogic = kea<maxWebAnalyticsNudgeLogicType>([path(['scenes', 'max', 'logics', 'maxWebAnalyticsNudgeLogic']),props({} as MaxWebAnalyticsNudgeLogicProps),@@ -87,7 +176,7 @@ export const maxWebAnalyticsNudgeLogic = kea<maxWebAnalyticsNudgeLogicType>([selectors({variant: [(s) => [s.featureFlags],- (featureFlags): string | null => {+ (featureFlags: import('lib/logic/featureFlagLogic').FeatureFlagsSet): string | null => {const value = featureFlags[FEATURE_FLAGS.MAX_WEB_ANALYTICS_NUDGE]return typeof value === 'string' ? value : null},diff --git a/frontend/src/scenes/max/logics/maxWebAnalyticsNudgeSessionLogic.ts b/frontend/src/scenes/max/logics/maxWebAnalyticsNudgeSessionLogic.tsindex ec9538fd5ef1..4e598d63b097 100644--- a/frontend/src/scenes/max/logics/maxWebAnalyticsNudgeSessionLogic.ts+++ b/frontend/src/scenes/max/logics/maxWebAnalyticsNudgeSessionLogic.ts@@ -1,9 +1,7 @@-import { actions, afterMount, kea, listeners, path, reducers } from 'kea'+import { MakeLogicType, actions, afterMount, kea, listeners, path, reducers } from 'kea'import { permanentlyMount } from 'lib/utils/kea-logic-builders'-import type { maxWebAnalyticsNudgeSessionLogicType } from './maxWebAnalyticsNudgeSessionLogicType'-const STORAGE_KEY = 'posthog-ai-web-analytics-nudge-session'export interface NudgeSessionState {@@ -38,6 +36,34 @@ function writeState(state: NudgeSessionState): void {}}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface maxWebAnalyticsNudgeSessionLogicValues {+ dismissedThisSession: boolean+ eligibleReportedThisSession: boolean+ shownForMessageId: string | null+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface maxWebAnalyticsNudgeSessionLogicActions {+ hydrateFromStorage: (state: NudgeSessionState) => {+ state: NudgeSessionState+ }+ markEligibleReported: () => {+ value: true+ }+ markNudgeDismissed: () => {+ value: true+ }+ markNudgeShown: (messageId: string) => {+ messageId: string+ }+}++export type maxWebAnalyticsNudgeSessionLogicType = MakeLogicType<+ maxWebAnalyticsNudgeSessionLogicValues,+ maxWebAnalyticsNudgeSessionLogicActions+>+export const maxWebAnalyticsNudgeSessionLogic = kea<maxWebAnalyticsNudgeSessionLogicType>([path(['scenes', 'max', 'logics', 'maxWebAnalyticsNudgeSessionLogic']),diff --git a/frontend/src/scenes/max/maxBillingContextLogic.tsx b/frontend/src/scenes/max/maxBillingContextLogic.tsxindex 475b5c057fad..8d668333a93f 100644--- a/frontend/src/scenes/max/maxBillingContextLogic.tsx+++ b/frontend/src/scenes/max/maxBillingContextLogic.tsx@@ -1,4 +1,4 @@-import { connect, kea, path, selectors } from 'kea'+import { MakeLogicType, connect, kea, path, selectors } from 'kea'import { objectsEqual } from 'kea-test-utils'import { dayjs } from 'lib/dayjs'@@ -13,7 +13,8 @@ import { teamLogic } from 'scenes/teamLogic'import { BillingType, HogFunctionType, TeamType } from '~/types'-import type { maxBillingContextLogicType } from './maxBillingContextLogicType'+import type { FeatureFlagsSet } from '../../lib/logic/featureFlagLogic'+import type { TeamPublicType } from '../../types'export const DEFAULT_BILLING_DATE_FROM = dayjs().subtract(1, 'month').subtract(1, 'day').format('YYYY-MM-DD')export const DEFAULT_BILLING_DATE_TO = dayjs().subtract(1, 'day').format('YYYY-MM-DD')@@ -245,6 +246,40 @@ export const billingToMaxContext = (}}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface maxBillingContextLogicValues {+ billing: BillingType | null // billingLogic+ billingSpendResponse: BillingSpendResponse | null // billingSpendLogic+ billingUsageResponse: BillingUsageResponse | null // billingUsageLogic+ featureFlags: FeatureFlagsSet // featureFlagLogic+ hogFunctions: HogFunctionType[] // hogFunctionsListLogic+ isAdminOrOwner: boolean | null // organizationLogic+ currentTeam: TeamPublicType | TeamType | null // teamLogic+ billingContext: MaxBillingContext | null+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface maxBillingContextLogicMeta {+ __keaTypeGenInternalSelectorTypes: {+ billingContext: (+ billing: any,+ billingUsageResponse: any,+ billingSpendResponse: any,+ isAdminOrOwner: any,+ currentTeam: any,+ featureFlags: any,+ hogFunctions: any+ ) => MaxBillingContext | null+ }+}++export type maxBillingContextLogicType = MakeLogicType<+ maxBillingContextLogicValues,+ {},+ Record<string, any>,+ maxBillingContextLogicMeta+>+export const maxBillingContextLogic = kea<maxBillingContextLogicType>([path(['scenes', 'max', 'maxBillingContextLogic']),connect(() => ({diff --git a/frontend/src/scenes/max/maxChangelogLogic.ts b/frontend/src/scenes/max/maxChangelogLogic.tsindex d21dafa88da5..7f06a56b34a2 100644--- a/frontend/src/scenes/max/maxChangelogLogic.ts+++ b/frontend/src/scenes/max/maxChangelogLogic.ts@@ -1,10 +1,11 @@-import { actions, connect, kea, listeners, path, reducers, selectors } from 'kea'+import { MakeLogicType, actions, connect, kea, listeners, path, reducers, selectors } from 'kea'import { incidentStatusLogic } from 'lib/components/HelpMenu/incidentStatusLogic'import { FEATURE_FLAGS } from 'lib/constants'import { featureFlagLogic, getFeatureFlagPayload } from 'lib/logic/featureFlagLogic'-import type { maxChangelogLogicType } from './maxChangelogLogicType'+import type { ComponentIncidentAlert } from '../../lib/components/HelpMenu/incidentStatusLogic'+import type { FeatureFlagsSet } from '../../lib/logic/featureFlagLogic'export interface ChangelogEntry {title: string@@ -94,6 +95,70 @@ function clearDismissedFromStorage(): void {}}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface maxChangelogLogicValues {+ featureFlags: FeatureFlagsSet // featureFlagLogic+ aiIncidentAlerts: ComponentIncidentAlert[] // incidentStatusLogic+ alerts: AlertEntry[]+ entries: ChangelogEntry[]+ entriesHash: string | null+ entriesOverride: ChangelogEntry[] | null+ hasAlerts: boolean+ hasEntries: boolean+ hasUnread: boolean+ isDismissed: boolean+ isDismissedOverride: boolean | null+ isOpen: boolean+ isVisible: boolean+ lastSeenHash: string | null+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface maxChangelogLogicActions {+ closeChangelog: () => {+ value: true+ }+ dismissChangelog: () => {+ value: true+ }+ enableChangelog: () => {+ value: true+ }+ openChangelog: () => {+ value: true+ }+ setEntries: (entries: ChangelogEntry[]) => {+ entries: ChangelogEntry[]+ }+ setIsDismissed: (isDismissed: boolean) => {+ isDismissed: boolean+ }+ setLastSeenHash: (hash: string | null) => {+ hash: string | null+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface maxChangelogLogicMeta {+ __keaTypeGenInternalSelectorTypes: {+ entries: (entriesOverride: ChangelogEntry[] | null, featureFlags: FeatureFlagsSet) => ChangelogEntry[]+ alerts: (aiIncidentAlerts: ComponentIncidentAlert[]) => AlertEntry[]+ entriesHash: (entries: ChangelogEntry[]) => string | null+ hasEntries: (entries: ChangelogEntry[]) => boolean+ hasAlerts: (alerts: AlertEntry[]) => boolean+ hasUnread: (entriesHash: string | null, lastSeenHash: string | null) => boolean+ isDismissed: (isDismissedOverride: boolean | null, entriesHash: string | null) => boolean+ isVisible: (hasEntries: boolean, hasAlerts: boolean, isDismissed: boolean, isOpen: boolean) => boolean+ }+}++export type maxChangelogLogicType = MakeLogicType<+ maxChangelogLogicValues,+ maxChangelogLogicActions,+ Record<string, any>,+ maxChangelogLogicMeta+>+export const maxChangelogLogic = kea<maxChangelogLogicType>([path(['scenes', 'max', 'maxChangelogLogic']),@@ -148,7 +213,10 @@ export const maxChangelogLogic = kea<maxChangelogLogicType>([// Derive entries from feature flag payload, with override for testingentries: [(s) => [s.entriesOverride, s.featureFlags],- (entriesOverride, featureFlags): ChangelogEntry[] => {+ (+ entriesOverride: ChangelogEntry[] | null,+ featureFlags: import('lib/logic/featureFlagLogic').FeatureFlagsSet+ ): ChangelogEntry[] => {if (entriesOverride !== null) {return entriesOverride}@@ -161,20 +229,26 @@ export const maxChangelogLogic = kea<maxChangelogLogicType>([},],// Derive alerts from ongoing incident.io incidents tagged to PostHog AI- alerts: [(s) => [s.aiIncidentAlerts], (aiIncidentAlerts): AlertEntry[] => aiIncidentAlerts],+ alerts: [+ (s) => [s.aiIncidentAlerts],+ (+ aiIncidentAlerts: import('lib/components/HelpMenu/incidentStatusLogic').ComponentIncidentAlert[]+ ): AlertEntry[] => aiIncidentAlerts,+ ],entriesHash: [(s) => [s.entries],- (entries): string | null => (entries.length > 0 ? generateEntriesHash(entries) : null),+ (entries: ChangelogEntry[]): string | null => (entries.length > 0 ? generateEntriesHash(entries) : null),],- hasEntries: [(s) => [s.entries], (entries): boolean => entries.length > 0],- hasAlerts: [(s) => [s.alerts], (alerts): boolean => alerts.length > 0],+ hasEntries: [(s) => [s.entries], (entries: ChangelogEntry[]): boolean => entries.length > 0],+ hasAlerts: [(s) => [s.alerts], (alerts: AlertEntry[]): boolean => alerts.length > 0],hasUnread: [(s) => [s.entriesHash, s.lastSeenHash],- (entriesHash, lastSeenHash): boolean => !!entriesHash && entriesHash !== lastSeenHash,+ (entriesHash: string | null, lastSeenHash: string | null): boolean =>+ !!entriesHash && entriesHash !== lastSeenHash,],isDismissed: [(s) => [s.isDismissedOverride, s.entriesHash],- (isDismissedOverride, entriesHash): boolean => {+ (isDismissedOverride: boolean | null, entriesHash: string | null): boolean => {if (isDismissedOverride !== null) {return isDismissedOverride}@@ -183,7 +257,7 @@ export const maxChangelogLogic = kea<maxChangelogLogicType>([],isVisible: [(s) => [s.hasEntries, s.hasAlerts, s.isDismissed, s.isOpen],- (hasEntries, hasAlerts, isDismissed, isOpen): boolean =>+ (hasEntries: boolean, hasAlerts: boolean, isDismissed: boolean, isOpen: boolean): boolean =>hasAlerts || (hasEntries && (!isDismissed || isOpen)),],}),diff --git a/frontend/src/scenes/max/maxContextLogic.ts b/frontend/src/scenes/max/maxContextLogic.tsindex e16be5505b26..6e037ff53dba 100644--- a/frontend/src/scenes/max/maxContextLogic.ts+++ b/frontend/src/scenes/max/maxContextLogic.ts@@ -1,5 +1,7 @@-import { actions, afterMount, connect, kea, listeners, path, reducers, selectors } from 'kea'+import { MakeLogicType, actions, afterMount, connect, kea, listeners, path, reducers, selectors } from 'kea'+import type { BuiltLogic } from 'kea'import { router } from 'kea-router'+import type { LocationChangedPayload } from 'kea-router/lib/types'import posthog from 'posthog-js'import { IconBug, IconCheckbox, IconDashboard, IconGraph, IconNotebook } from '@posthog/icons'@@ -17,7 +19,9 @@ import { ActionType, DashboardType, EventDefinition, InsightShortId, QueryBasedIimport type { RevenueAnalyticsQuery } from 'products/revenue_analytics/frontend/revenueAnalyticsLogic'-import type { maxContextLogicType } from './maxContextLogicType'+import type { Node } from '../../queries/schema/schema-general'+import type { LoadedScene } from '../sceneTypes'+import type { ToolRegistration } from './max-constants'import { maxGlobalLogic } from './maxGlobalLogic'import {InsightWithQuery,@@ -92,6 +96,198 @@ const reportSceneContextError = (error: unknown): void => {export type LoadedEntitiesMap = { dashboard: number[]; insight: string[] }+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface maxContextLogicValues {+ toolMap: {+ [x: string]: ToolRegistration+ } // maxGlobalLogic+ activeLoadedScene: LoadedScene | null // sceneLogic+ activeSceneId: string | null // sceneLogic+ activeSceneLogic: BuiltLogic | null // sceneLogic+ compiledContext: MaxUIContext | null+ contextActions: MaxActionContext[]+ contextDashboards: MaxDashboardContext[]+ contextErrorTrackingIssues: MaxErrorTrackingIssueContext[]+ contextEvaluations: MaxEvaluationContext[]+ contextEvents: MaxEventContext[]+ contextInsights: MaxInsightContext[]+ contextNotebooks: MaxNotebookContext[]+ contextOptions: MaxContextTaxonomicFilterOption[]+ hasData: boolean+ loadedEntities: LoadedEntitiesMap+ mainTaxonomicGroupType: TaxonomicFilterGroupType+ rawSceneContext: MaxContextItem[]+ sceneContext: MaxContextItem[]+ taxonomicGroupTypes: TaxonomicFilterGroupType[]+ toolContextItems: Array<{+ icon: any+ text: string+ }>+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface maxContextLogicActions {+ locationChanged: ({+ method,+ pathname,+ search,+ searchParams,+ hash,+ hashParams,+ initial,+ url,+ routerState,+ }: LocationChangedPayload) => {+ hash: string+ hashParams: Record<string, any>+ initial: boolean+ method: 'POP' | 'PUSH' | 'REPLACE'+ pathname: string+ routerState: Record<string, any>+ search: string+ searchParams: Record<string, any>+ url: string+ } // router+ addOrUpdateContextAction: (data: ActionType) => {+ data: ActionType+ }+ addOrUpdateContextDashboard: (data: DashboardType<QueryBasedInsightModel>) => {+ data: DashboardType<QueryBasedInsightModel<Node<Record<string, any>>>>+ }+ addOrUpdateContextErrorTrackingIssue: (data: { id: string; name?: string | null }) => {+ data: {+ id: string+ name?: string | null | undefined+ }+ }+ addOrUpdateContextEvaluation: (data: {+ description?: string | null+ evaluation_type: EvaluationRuntime+ hog_source?: string | null+ id: string+ name?: string | null+ }) => {+ data: {+ description?: string | null | undefined+ evaluation_type: EvaluationRuntime+ hog_source?: string | null | undefined+ id: string+ name?: string | null | undefined+ }+ }+ addOrUpdateContextEvent: (data: EventDefinition) => {+ data: EventDefinition+ }+ addOrUpdateContextInsight: (+ data: InsightWithQuery,+ filtersOverride?: DashboardFilter,+ variablesOverride?: Record<string, HogQLVariable>+ ) => {+ data: InsightWithQuery+ filtersOverride: DashboardFilter | undefined+ variablesOverride: Record<string, HogQLVariable> | undefined+ }+ addOrUpdateContextNotebook: (data: { short_id: string; title?: string | null }) => {+ data: {+ short_id: string+ title?: string | null | undefined+ }+ }+ handleTaxonomicFilterChange: (+ value: number | string,+ groupType: TaxonomicFilterGroupType,+ item: TaxonomicItem+ ) => {+ groupType: TaxonomicFilterGroupType+ item: TaxonomicItem+ value: number | string+ }+ loadAndProcessDashboard: (data: DashboardItemInfo) => {+ data: DashboardItemInfo+ }+ loadAndProcessInsight: (+ data: InsightItemInfo,+ filtersOverride?: DashboardFilter,+ variablesOverride?: Record<string, HogQLVariable>,+ revenueAnalyticsQuery?: RevenueAnalyticsQuery+ ) => {+ data: InsightItemInfo+ filtersOverride: DashboardFilter | undefined+ revenueAnalyticsQuery: RevenueAnalyticsQuery | undefined+ variablesOverride: Record<string, HogQLVariable> | undefined+ }+ removeContextAction: (id: number | string) => {+ id: number | string+ }+ removeContextDashboard: (id: number | string) => {+ id: number | string+ }+ removeContextErrorTrackingIssue: (id: string) => {+ id: string+ }+ removeContextEvaluation: (id: string) => {+ id: string+ }+ removeContextEvent: (id: number | string) => {+ id: number | string+ }+ removeContextInsight: (id: number | string) => {+ id: number | string+ }+ removeContextNotebook: (id: string) => {+ id: string+ }+ resetContext: () => {+ value: true+ }+ setSelectedContextOption: (value: string) => {+ value: string+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface maxContextLogicMeta {+ __keaTypeGenInternalSelectorTypes: {+ rawSceneContext: (arg: MaxContextInput[]) => MaxContextItem[]+ sceneContext: (rawSceneContext: any) => MaxContextItem[]+ contextOptions: (sceneContext: any) => MaxContextTaxonomicFilterOption[]+ mainTaxonomicGroupType: (contextOptions: any) => TaxonomicFilterGroupType+ taxonomicGroupTypes: (contextOptions: any) => TaxonomicFilterGroupType[]+ compiledContext: (+ hasData: any,+ contextInsights: any,+ contextDashboards: any,+ contextEvents: any,+ contextActions: any,+ contextErrorTrackingIssues: any,+ contextNotebooks: any,+ contextEvaluations: any,+ sceneContext: any+ ) => MaxUIContext | null+ hasData: (+ contextInsights: any,+ contextDashboards: any,+ contextEvents: any,+ contextActions: any,+ contextErrorTrackingIssues: any,+ contextNotebooks: any,+ contextEvaluations: any,+ sceneContext: any+ ) => boolean+ toolContextItems: (toolMap: any) => Array<{+ icon: any+ text: string+ }>+ }+}++export type maxContextLogicType = MakeLogicType<+ maxContextLogicValues,+ maxContextLogicActions,+ Record<string, any>,+ maxContextLogicMeta+>+export const maxContextLogic = kea<maxContextLogicType>([path(['scenes', 'max', 'maxContextLogic']),connect(() => ({diff --git a/frontend/src/scenes/max/maxGlobalLogic.tsx b/frontend/src/scenes/max/maxGlobalLogic.tsxindex 0d9849d7f0e2..c3efe4b821de 100644--- a/frontend/src/scenes/max/maxGlobalLogic.tsx+++ b/frontend/src/scenes/max/maxGlobalLogic.tsx@@ -1,6 +1,7 @@-import { actions, afterMount, connect, kea, listeners, path, reducers, selectors } from 'kea'+import { MakeLogicType, actions, afterMount, connect, kea, listeners, path, reducers, selectors } from 'kea'import { loaders } from 'kea-loaders'import { router } from 'kea-router'+import type { LocationChangedPayload } from 'kea-router/lib/types'import api from 'lib/api'import { FEATURE_FLAGS } from 'lib/constants'@@ -20,9 +21,11 @@ import { Conversation, ConversationDetail, SidePanelTab } from '~/types'import { conversationsDestroy } from 'products/conversations/frontend/generated/api'+import type { FeatureFlagsSet } from '../../lib/logic/featureFlagLogic'+import type { OrganizationType, PreflightStatus } from '../../types'+import type { SceneConfig } from '../sceneTypes'import { TOOL_DEFINITIONS, ToolRegistration } from './max-constants'import { PHAI_VIEW_MODE_KEY } from './max-storage-keys'-import type { maxGlobalLogicType } from './maxGlobalLogicType'import { SIDE_PANEL_PANEL_ID, maxLogic, mergeConversationHistory, mergeConversations } from './maxLogic'/**@@ -84,6 +87,181 @@ export const STATIC_TOOLS: ToolRegistration[] = [},]+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface maxGlobalLogicValues {+ aiAccessRequested: boolean // aiConsentLogic+ dataProcessingAccepted: boolean // aiConsentLogic+ dataProcessingApprovalDisabledReason: string | null // aiConsentLogic+ dataProcessingDismissed: boolean // aiConsentLogic+ requestingAiAccess: boolean // aiConsentLogic+ featureFlags: FeatureFlagsSet // featureFlagLogic+ currentOrganization: OrganizationType | null // organizationLogic+ isCloudOrDev: boolean | undefined // preflightLogic+ preflight: PreflightStatus | null // preflightLogic+ sceneConfig: SceneConfig | null // sceneLogic+ sceneId: string | null // sceneLogic+ selectedTab: SidePanelTab | null // sidePanelStateLogic+ sidePanelOpen: boolean // sidePanelStateLogic+ currentTeamIdStrict: number | string // teamLogic+ availableStaticTools: ToolRegistration[]+ conversationHistory: ConversationDetail[]+ conversationHistoryLoading: boolean+ currentConversationId: string | null+ editInsightToolRegistered: true+ effectivePhaiView: PhaiViewMode+ isMaxAvailable: boolean+ isOrganizationCreatedRecently: boolean+ isPhaiSandboxFlagOn: boolean+ liabilityNoticeDismissed: boolean+ phaiViewMode: PhaiViewMode+ registeredToolMap: Record<string, ToolRegistration>+ shouldShowLiabilityNotice: boolean+ toolMap: {+ [x: string]: ToolRegistration+ }+ toolSuggestions: string[]+ tools: ToolRegistration[]+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface maxGlobalLogicActions {+ acceptDataProcessing: (testOnlyOverride?: boolean) => {+ testOnlyOverride: boolean | undefined+ } // aiConsentLogic+ dismissDataProcessing: () => {+ value: true+ } // aiConsentLogic+ requestAiAccess: () => {+ value: true+ } // aiConsentLogic+ locationChanged: ({+ method,+ pathname,+ search,+ searchParams,+ hash,+ hashParams,+ initial,+ url,+ routerState,+ }: LocationChangedPayload) => {+ hash: string+ hashParams: Record<string, any>+ initial: boolean+ method: 'POP' | 'PUSH' | 'REPLACE'+ pathname: string+ routerState: Record<string, any>+ search: string+ searchParams: Record<string, any>+ url: string+ } // router+ openSidePanel: (+ tab: SidePanelTab,+ options?: string+ ) => {+ options: string | undefined+ tab: SidePanelTab+ } // sidePanelStateLogic+ askSidePanelMax: (prompt: string) => {+ prompt: string+ }+ deleteConversation: (id: string) => {+ id: string+ }+ deregisterTool: (key: string) => {+ key: string+ }+ dismissLiabilityNotice: () => {+ value: true+ }+ loadConversation: (conversationId: string) => string+ loadConversationFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadConversationHistory: (_?: {+ /** If true, the current thread will not be updated with the retrieved conversation. */+ doNotUpdateCurrentThread?: boolean+ }) => {+ doNotUpdateCurrentThread?: boolean+ }+ loadConversationHistoryFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadConversationHistorySuccess: (+ conversationHistory: ConversationDetail[],+ payload?: {+ doNotUpdateCurrentThread?: boolean+ }+ ) => {+ conversationHistory: ConversationDetail[]+ payload?: {+ doNotUpdateCurrentThread?: boolean+ }+ }+ loadConversationSuccess: (+ conversationHistory: ConversationDetail[],+ payload?: string+ ) => {+ conversationHistory: ConversationDetail[]+ payload?: string+ }+ openSidePanelMax: (conversationId?: string) => {+ conversationId: string | undefined+ }+ openSidePanelMaxWithTaskBind: (taskId: string) => {+ taskId: string+ }+ prependOrReplaceConversation: (conversation: Conversation | ConversationDetail) => {+ conversation: Conversation | ConversationDetail+ }+ registerTool: (tool: ToolRegistration) => {+ tool: ToolRegistration+ }+ setPhaiViewMode: (mode: PhaiViewMode) => {+ mode: PhaiViewMode+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface maxGlobalLogicMeta {+ __keaTypeGenInternalSelectorTypes: {+ currentConversationId: (searchParams: Record<string, any>) => string | null+ isMaxAvailable: (isCloudOrDev: boolean | undefined, preflight: PreflightStatus | null) => boolean+ isOrganizationCreatedRecently: (currentOrganization: OrganizationType | null) => boolean+ shouldShowLiabilityNotice: (+ isOrganizationCreatedRecently: boolean,+ liabilityNoticeDismissed: boolean+ ) => boolean+ isPhaiSandboxFlagOn: (featureFlags: FeatureFlagsSet) => boolean+ effectivePhaiView: (isPhaiSandboxFlagOn: boolean, phaiViewMode: PhaiViewMode) => PhaiViewMode+ availableStaticTools: (featureFlags: FeatureFlagsSet) => ToolRegistration[]+ toolMap: (+ registeredToolMap: Record<string, ToolRegistration>,+ availableStaticTools: ToolRegistration[]+ ) => {+ [x: string]: ToolRegistration+ }+ tools: (toolMap: { [x: string]: ToolRegistration }) => ToolRegistration[]+ editInsightToolRegistered: (registeredToolMap: Record<string, ToolRegistration>) => true+ toolSuggestions: (tools: ToolRegistration[]) => string[]+ }+}++export type maxGlobalLogicType = MakeLogicType<+ maxGlobalLogicValues,+ maxGlobalLogicActions,+ Record<string, any>,+ maxGlobalLogicMeta+>+export const maxGlobalLogic = kea<maxGlobalLogicType>([path(['scenes', 'max', 'maxGlobalLogic']),connect(() => ({@@ -268,7 +446,7 @@ export const maxGlobalLogic = kea<maxGlobalLogicType>([selectors({currentConversationId: [() => [router.selectors.searchParams],- (searchParams): string | null => searchParams?.chat ?? null,+ (searchParams: Record<string, any>): string | null => searchParams?.chat ?? null,],// On Cloud/dev a provider key is always present. On a self-hosted (hobby) instance Max only// works once ANTHROPIC_API_KEY is configured, so we surface a "set the key" state instead.@@ -276,35 +454,38 @@ export const maxGlobalLogic = kea<maxGlobalLogicType>([// before preflight resolves — once loaded we gate on cloud/dev or the key being present.isMaxAvailable: [(s) => [s.isCloudOrDev, s.preflight],- (isCloudOrDev, preflight): boolean => !preflight || !!isCloudOrDev || !!preflight.anthropic_available,+ (isCloudOrDev: boolean | undefined, preflight: null | import('~/types').PreflightStatus): boolean =>+ !preflight || !!isCloudOrDev || !!preflight.anthropic_available,],isOrganizationCreatedRecently: [(s) => [s.currentOrganization],- (currentOrganization): boolean => {+ (currentOrganization: null | import('~/types').OrganizationType): boolean => {const orgCreatedAt = currentOrganization?.created_atreturn orgCreatedAt ? dayjs().diff(dayjs(orgCreatedAt), 'day') <= 15 : false},],shouldShowLiabilityNotice: [(s) => [s.isOrganizationCreatedRecently, s.liabilityNoticeDismissed],- (isOrganizationCreatedRecently, liabilityNoticeDismissed): boolean =>+ (isOrganizationCreatedRecently: boolean, liabilityNoticeDismissed: boolean): boolean =>isOrganizationCreatedRecently && !liabilityNoticeDismissed,],// Gates the new-vs-legacy toggle: only flagged users can switch, and the new surface only// exists for them.isPhaiSandboxFlagOn: [(s) => [s.featureFlags],- (featureFlags): boolean => !!featureFlags[FEATURE_FLAGS.PHAI_SANDBOX_MODE],+ (featureFlags: import('lib/logic/featureFlagLogic').FeatureFlagsSet): boolean =>+ !!featureFlags[FEATURE_FLAGS.PHAI_SANDBOX_MODE],],// The implementation the Max scene actually renders: the user's choice while the flag is on,// always legacy otherwise (so non-flagged users are unaffected regardless of any stored value).effectivePhaiView: [(s) => [s.isPhaiSandboxFlagOn, s.phaiViewMode],- (isPhaiSandboxFlagOn, phaiViewMode): PhaiViewMode => (isPhaiSandboxFlagOn ? phaiViewMode : 'legacy'),+ (isPhaiSandboxFlagOn: boolean, phaiViewMode: PhaiViewMode): PhaiViewMode =>+ isPhaiSandboxFlagOn ? phaiViewMode : 'legacy',],availableStaticTools: [(s) => [s.featureFlags],- (featureFlags): ToolRegistration[] => {+ (featureFlags: import('lib/logic/featureFlagLogic').FeatureFlagsSet): ToolRegistration[] => {const staticTools = STATIC_TOOLS.filter((tool) => {// Only register the static tools that either aren't flagged or have their flag enabledconst toolDefinition = TOOL_DEFINITIONS[tool.identifier]@@ -315,19 +496,22 @@ export const maxGlobalLogic = kea<maxGlobalLogicType>([],toolMap: [(s) => [s.registeredToolMap, s.availableStaticTools],- (registeredToolMap, availableStaticTools) => ({+ (registeredToolMap: Record<string, ToolRegistration>, availableStaticTools: ToolRegistration[]) => ({...Object.fromEntries(availableStaticTools.map((tool) => [tool.identifier, tool])),...registeredToolMap,}),],- tools: [(s) => [s.toolMap], (toolMap): ToolRegistration[] => Object.values(toolMap)],+ tools: [+ (s) => [s.toolMap],+ (toolMap: { [x: string]: ToolRegistration }): ToolRegistration[] => Object.values(toolMap),+ ],editInsightToolRegistered: [(s) => [s.registeredToolMap],- (registeredToolMap) => !!registeredToolMap.create_insight,+ (registeredToolMap: Record<string, ToolRegistration>) => !!registeredToolMap.create_insight,],toolSuggestions: [(s) => [s.tools],- (tools): string[] => {+ (tools: ToolRegistration[]): string[] => {const suggestions: string[] = []for (const tool of tools) {if (tool.suggestions) {diff --git a/frontend/src/scenes/max/maxLogic.tsx b/frontend/src/scenes/max/maxLogic.tsxindex 75f67c69f75d..7e345e9fc877 100644--- a/frontend/src/scenes/max/maxLogic.tsx+++ b/frontend/src/scenes/max/maxLogic.tsx@@ -1,4 +1,4 @@-import { actions, afterMount, connect, kea, key, listeners, path, props, reducers, selectors } from 'kea'+import { MakeLogicType, actions, afterMount, connect, kea, key, listeners, path, props, reducers, selectors } from 'kea'import { router, urlToAction } from 'kea-router'import { IconBook } from '@posthog/icons'@@ -27,10 +27,11 @@ import {SidePanelTab,} from '~/types'+import type { ActionType } from '../../types'+import type { ToolRegistration } from './max-constants'import { PENDING_AI_PROMPT_KEY } from './max-storage-keys'import { maxContextLogic } from './maxContextLogic'import { maxGlobalLogic, type PhaiViewMode } from './maxGlobalLogic'-import type { maxLogicType } from './maxLogicType'import { MaxUIContext } from './maxTypes'/** Maximum age for restored prompts (5 minutes) */@@ -156,6 +157,224 @@ function sceneTabId(panelId?: string, syncUrl?: boolean): string | null {return syncUrl !== false && panelId && panelId !== SIDE_PANEL_PANEL_ID ? panelId : null}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface maxLogicValues {+ actions: ActionType[] // actionsModel+ conversationHistory: ConversationDetail[] // maxGlobalLogic+ conversationHistoryLoading: boolean // maxGlobalLogic+ dataProcessingAccepted: boolean // maxGlobalLogic+ dataProcessingApprovalDisabledReason: string | null // maxGlobalLogic+ effectivePhaiView: PhaiViewMode // maxGlobalLogic+ toolSuggestions: string[] // maxGlobalLogic+ tools: ToolRegistration[] // maxGlobalLogic+ searchParams: Record<string, any> // router+ chatDraftFor: (tabId: string | undefined) => string // tabUiStateLogic+ activeStreamingThreads: number+ activeSuggestionGroup: SuggestionGroup | null+ autoRun: boolean+ backButtonDisabled: boolean+ backToScreen: 'history' | null+ breadcrumbs: Breadcrumb[]+ chatTitle: string | null+ conversation: ConversationDetail | null+ conversationHistoryVisible: boolean+ conversationId: string | null+ conversationLoading: boolean+ fillInHint: string | null+ focusCounter: number+ frontendConversationId: string+ headline: string | undefined+ messagesLoading: boolean+ onAcceptSessionFilters: ((filters: RecordingUniversalFilters) => void) | null+ panelId: any+ pendingBindTaskId: string | null+ question: string+ threadLogicKey: string+ threadLogicProps: {+ conversation: ConversationDetail | null+ conversationId: string+ panelId: any+ }+ threadVisible: boolean+ toolDescriptions: (string | undefined)[]+ toolHeadlines: (string | undefined)[]+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface maxLogicActions {+ resetContext: () => {+ value: true+ } // maxContextLogic+ deleteConversation: (id: string) => {+ id: string+ } // maxGlobalLogic+ loadConversationHistory: (+ _?:+ | {+ doNotUpdateCurrentThread?: boolean+ }+ | undefined+ ) => {+ doNotUpdateCurrentThread?: boolean+ } // maxGlobalLogic+ loadConversationHistorySuccess: (+ conversationHistory: ConversationDetail[],+ payload?:+ | {+ doNotUpdateCurrentThread?: boolean+ }+ | undefined+ ) => {+ conversationHistory: ConversationDetail[]+ payload?: {+ doNotUpdateCurrentThread?: boolean+ }+ } // maxGlobalLogic+ prependOrReplaceConversation: (conversation: Conversation | ConversationDetail) => {+ conversation: Conversation | ConversationDetail+ } // maxGlobalLogic+ setChatDraftForTab: (+ tabId: string | undefined,+ draft: string+ ) => {+ draft: string+ tabId: string+ } // tabUiStateLogic+ askMax: (+ prompt: string | null,+ addToThread?: boolean,+ uiContext?: Partial<MaxUIContext>+ ) => {+ addToThread: boolean+ prompt: string | null+ uiContext: Partial<MaxUIContext> | undefined+ }+ decrActiveStreamingThreads: () => {+ value: true+ }+ focusInput: () => {+ value: true+ }+ goBack: () => {+ value: true+ }+ incrActiveStreamingThreads: () => {+ value: true+ }+ loadThread: (conversation: ConversationDetail) => {+ conversation: ConversationDetail+ }+ openConversation: (conversationId: string) => {+ conversationId: string+ }+ pollConversation: (+ conversationId: string,+ currentRecursionDepth?: number,+ leadingTimeout?: number+ ) => {+ conversationId: string+ currentRecursionDepth: number+ leadingTimeout: number+ }+ scrollThreadToBottom: (behavior?: 'instant' | 'smooth') => {+ behavior: 'instant' | 'smooth' | undefined+ }+ setActiveGroup: (group: SuggestionGroup | null) => {+ group: SuggestionGroup | null+ }+ setAutoRun: (autoRun: boolean) => {+ autoRun: boolean+ }+ setBackScreen: (screen: 'history') => {+ screen: 'history'+ }+ setConversationId: (conversationId: string) => {+ conversationId: string+ }+ setFillInHint: (hint: string | null) => {+ hint: string | null+ }+ setPendingBindTaskId: (taskId: string | null) => {+ taskId: string | null+ }+ setQuestion: (question: string) => {+ question: string+ }+ startNewConversation: () => {+ value: true+ }+ toggleConversationHistory: (visible?: boolean) => {+ visible: boolean | undefined+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface maxLogicMeta {+ key: string+ __keaTypeGenInternalSelectorTypes: {+ panelId: (arg: any) => any+ onAcceptSessionFilters: (+ arg: ((filters: RecordingUniversalFilters) => void) | null+ ) => ((filters: RecordingUniversalFilters) => void) | null+ conversation: (+ conversationHistory: ConversationDetail[],+ conversationId: string | null+ ) => ConversationDetail | null+ toolHeadlines: (tools: ToolRegistration[]) => (string | undefined)[]+ toolDescriptions: (tools: ToolRegistration[]) => (string | undefined)[]+ headline: (+ conversation: ConversationDetail | null,+ toolHeadlines: (string | undefined)[],+ frontendConversationId: string+ ) => string | undefined+ conversationLoading: (+ conversationHistory: ConversationDetail[],+ conversationHistoryLoading: boolean,+ conversationId: string | null,+ conversation: ConversationDetail | null+ ) => boolean+ messagesLoading: (conversation: ConversationDetail | null, conversationId: string | null) => boolean+ threadVisible: (conversationId: string | null) => boolean+ backButtonDisabled: (threadVisible: boolean, conversationHistoryVisible: boolean) => boolean+ chatTitle: (+ conversationId: string | null,+ conversation: ConversationDetail | null,+ conversationHistoryVisible: boolean+ ) => string | null+ threadLogicKey: (conversationId: string | null, frontendConversationId: string) => string+ threadLogicProps: (+ panelId: any,+ conversation: ConversationDetail | null,+ threadLogicKey: string+ ) => {+ conversation: ConversationDetail | null+ conversationId: string+ panelId: any+ }+ breadcrumbs: (+ conversationId: string | null,+ chatTitle: string | null,+ conversationHistoryVisible: boolean,+ searchParams: Record<string, any>,+ activeStreamingThreads: number+ ) => Breadcrumb[]+ }+ __keaTypeGenInternalReducerActions: {+ 'open side panel (scenes.navigation.sidepanel.sidePanelStateLogic)': (+ tab: SidePanelTab,+ options?: string+ ) => {+ payload: {+ options: string | undefined+ tab: SidePanelTab+ }+ type: 'open side panel (scenes.navigation.sidepanel.sidePanelStateLogic)'+ }+ }+}++export type maxLogicType = MakeLogicType<maxLogicValues, maxLogicActions, MaxLogicProps, maxLogicMeta>+export const maxLogic = kea<maxLogicType>([props({} as MaxLogicProps),key((props) => props.panelId || SCENE_PANEL_ID),@@ -327,7 +546,7 @@ export const maxLogic = kea<maxLogicType>([],conversation: [(s) => [s.conversationHistory, s.conversationId],- (conversationHistory, conversationId) => {+ (conversationHistory: ConversationDetail[], conversationId: string | null) => {if (conversationId) {return conversationHistory.find((c) => c.id === conversationId) ?? null}@@ -335,16 +554,25 @@ export const maxLogic = kea<maxLogicType>([},],- toolHeadlines: [(s) => [s.tools], (tools) => tools.map((tool) => tool.introOverride?.headline).filter(Boolean)],+ toolHeadlines: [+ (s) => [s.tools],+ (tools: import('./max-constants').ToolRegistration[]) =>+ tools.map((tool) => tool.introOverride?.headline).filter(Boolean),+ ],toolDescriptions: [(s) => [s.tools],- (tools) => tools.map((tool) => tool.introOverride?.description).filter(Boolean),+ (tools: import('./max-constants').ToolRegistration[]) =>+ tools.map((tool) => tool.introOverride?.description).filter(Boolean),],headline: [(s) => [s.conversation, s.toolHeadlines, s.frontendConversationId],- (conversation, toolHeadlines, frontendConversationId) => {+ (+ conversation: ConversationDetail | null,+ toolHeadlines: (string | undefined)[],+ frontendConversationId: string+ ) => {if (inStorybook() || inStorybookTestRunner()) {return HEADLINES[0] // Preventing UI snapshots from being different every time}@@ -362,30 +590,39 @@ export const maxLogic = kea<maxLogicType>([conversationLoading: [(s) => [s.conversationHistory, s.conversationHistoryLoading, s.conversationId, s.conversation],- (conversationHistory, conversationHistoryLoading, conversationId, conversation) => {+ (+ conversationHistory: ConversationDetail[],+ conversationHistoryLoading: boolean,+ conversationId: string | null,+ conversation: ConversationDetail | null+ ) => {return !conversationHistory.length && conversationHistoryLoading && !!conversationId && !conversation},],messagesLoading: [(s) => [s.conversation, s.conversationId],- (conversation, conversationId) => {+ (conversation: ConversationDetail | null, conversationId: string | null) => {return !!conversationId && !!conversation && conversation.messages === undefined},],- threadVisible: [(s) => [s.conversationId], (conversationId) => !!conversationId],+ threadVisible: [(s) => [s.conversationId], (conversationId: string | null) => !!conversationId],backButtonDisabled: [(s) => [s.threadVisible, s.conversationHistoryVisible],- (threadVisible, conversationHistoryVisible) => {+ (threadVisible: boolean, conversationHistoryVisible: boolean) => {return !threadVisible && !conversationHistoryVisible},],chatTitle: [(s) => [s.conversationId, s.conversation, s.conversationHistoryVisible],- (conversationId, conversation, conversationHistoryVisible) => {+ (+ conversationId: string | null,+ conversation: ConversationDetail | null,+ conversationHistoryVisible: boolean+ ) => {if (conversationHistoryVisible) {return CHAT_TITLE_HISTORY}@@ -401,7 +638,7 @@ export const maxLogic = kea<maxLogicType>([threadLogicKey: [(s) => [s.conversationId, s.frontendConversationId],- (conversationId, frontendConversationId) => {+ (conversationId: string | null, frontendConversationId: string) => {if (conversationId) {return conversationId}@@ -411,7 +648,7 @@ export const maxLogic = kea<maxLogicType>([threadLogicProps: [(s) => [s.panelId, s.conversation, s.threadLogicKey],- (panelId, conversation, threadLogicKey) => ({+ (panelId, conversation: ConversationDetail | null, threadLogicKey: string) => ({panelId,conversationId: threadLogicKey,conversation,@@ -427,11 +664,11 @@ export const maxLogic = kea<maxLogicType>([s.activeStreamingThreads,],(- conversationId,- chatTitle,- conversationHistoryVisible,- searchParams,- activeStreamingThreads+ conversationId: string | null,+ chatTitle: string | null,+ conversationHistoryVisible: boolean,+ searchParams: Record<string, any>,+ activeStreamingThreads: number): Breadcrumb[] => {const isStreaming = activeStreamingThreads > 0const hasConversationBreadcrumb = !conversationHistoryVisible && conversationIddiff --git a/frontend/src/scenes/max/maxThreadLogic.tsx b/frontend/src/scenes/max/maxThreadLogic.tsxindex b6c4d9dae303..8c66665961ce 100644--- a/frontend/src/scenes/max/maxThreadLogic.tsx+++ b/frontend/src/scenes/max/maxThreadLogic.tsx@@ -1,5 +1,6 @@import { createParser } from 'eventsource-parser'import {+ MakeLogicType,BuiltLogic,actions,afterMount,@@ -73,6 +74,8 @@ import {} from 'products/posthog_ai/frontend/api/logics'import { LogEntry, parseLogEvent } from 'products/posthog_ai/frontend/lib/parse-logs'+import type { PermissionRequestRecord } from '../../../../products/posthog_ai/frontend/types/streamTypes'+import type { FeatureFlagsSet } from '../../lib/logic/featureFlagLogic'import { handsFreeLogic } from './handsFreeLogic'import { summariseAssistantThread } from './handsFreeUtils'import {@@ -86,7 +89,6 @@ import { PENDING_AI_PROMPT_KEY } from './max-storage-keys'import { MaxBillingContext, maxBillingContextLogic } from './maxBillingContextLogic'import { maxGlobalLogic } from './maxGlobalLogic'import { SCENE_PANEL_ID, SIDE_PANEL_PANEL_ID, maxLogic } from './maxLogic'-import type { maxThreadLogicType } from './maxThreadLogicType'import { AttachedContext, MaxUIContext } from './maxTypes'import { posthogAiContextLogic } from './posthogAiContextLogic'import { MAX_SLASH_COMMANDS, SlashCommand } from './slash-commands'@@ -127,6 +129,548 @@ export interface MaxThreadLogicProps {skipInitialLoad?: boolean}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface maxThreadLogicValues {+ featureFlags: FeatureFlagsSet // featureFlagLogic+ billingContext: MaxBillingContext | null // maxBillingContextLogic+ compiledContext: MaxUIContext | null // maxContextLogic+ availableStaticTools: ToolRegistration[] // maxGlobalLogic+ dataProcessingAccepted: boolean // maxGlobalLogic+ toolMap: {+ [x: string]: ToolRegistration+ } // maxGlobalLogic+ tools: ToolRegistration[] // maxGlobalLogic+ activeStreamingThreads: number // maxLogic+ activeThreadKey: string // maxLogic+ autoRun: boolean // maxLogic+ parentConversationId: string | null // maxLogic+ pendingBindTaskId: string | null // maxLogic+ question: string // maxLogic+ sandboxAttachments: AttachedContext[] // posthogAiContextLogic+ pendingSandboxPermissionRequest: PermissionRequestRecord | null // runStreamLogic+ sandboxCurrentMode: string | null // runStreamLogic+ sceneId: string | null // sceneLogic+ activeDangerousOperationApproval: {+ payload: Record<string, any>+ preview: string+ proposalId: string+ status: 'pending_approval'+ toolName: string+ } | null+ activeMultiQuestionForm: MultiQuestionForm | null+ agentMode: AgentMode | null+ agentModeLockedByUser: boolean+ cancelCount: number+ cancelLoading: boolean+ contextDisabledReason: string | undefined+ conversation: Conversation | null+ conversationId: string+ conversationLoading: boolean+ currentThinkingMessage: string | null+ effectiveApprovalStatuses: Record<+ string,+ {+ feedback?: string+ status: ApprovalDecisionStatus+ }+ >+ filteredCommands: SlashCommand[]+ formPending: boolean+ inputDisabled: boolean+ isAnotherAgenticIterationScheduled: boolean+ isConvertedConversation: boolean+ isImpersonatingExistingConversation: boolean+ isSandboxMode: boolean+ isSharedThread: boolean+ multiQuestionFormPending: boolean+ pendingApprovalProposalId: string | null+ pendingApprovalsData: Record<string, PendingApproval>+ pendingPrompt: string | null+ queueData: {+ limit: number+ messages: ConversationQueueMessage[]+ }+ queueDataLoading: boolean+ queueDisabledReason: string | undefined+ queueIsFull: boolean+ queueLimit: number+ queueSubmitting: boolean+ queuedMessages: ConversationQueueMessage[]+ queueingEnabled: boolean+ resolvedApprovalStatuses: Record<+ string,+ {+ feedback?: string+ status: 'approved' | 'auto_rejected' | 'rejected'+ }+ >+ retryCount: number+ sandboxConversationKey: string+ sandboxEntries: LogEntry[]+ showContextUI: boolean+ showDeepResearchModeToggle: boolean+ streamingActive: boolean+ submissionDisabledReason: string | undefined+ supportOverrideEnabled: boolean+ threadGrouped: ThreadMessage[]+ threadLoading: boolean+ threadMessageCount: number+ threadRaw: ThreadMessage[]+ toolCallUpdateMap: Map<string, string[]>+ traceId: string | null+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface maxThreadLogicActions {+ loadConversation: (conversationId: string) => string // maxGlobalLogic+ askMax: (+ prompt: string | null,+ addToThread?: boolean | undefined,+ uiContext?: Partial<MaxUIContext> | undefined+ ) => {+ addToThread: boolean+ prompt: string | null+ uiContext: Partial<MaxUIContext> | undefined+ } // maxLogic+ decrActiveStreamingThreads: () => {+ value: true+ } // maxLogic+ incrActiveStreamingThreads: () => {+ value: true+ } // maxLogic+ loadConversationHistory: (+ _?:+ | {+ doNotUpdateCurrentThread?: boolean+ }+ | undefined+ ) => {+ doNotUpdateCurrentThread?: boolean+ } // maxLogic+ loadConversationHistorySuccess: (+ conversationHistory: ConversationDetail[],+ payload?:+ | {+ doNotUpdateCurrentThread?: boolean+ }+ | undefined+ ) => {+ conversationHistory: ConversationDetail[]+ payload?: {+ doNotUpdateCurrentThread?: boolean+ }+ } // maxLogic+ setAutoRun: (autoRun: boolean) => {+ autoRun: boolean+ } // maxLogic+ setConversationId: (conversationId: string) => {+ conversationId: string+ } // maxLogic+ setPendingBindTaskId: (taskId: string | null) => {+ taskId: string | null+ } // maxLogic+ setQuestion: (question: string) => {+ question: string+ } // maxLogic+ updateGlobalConversationCache: (conversation: Conversation | ConversationDetail) => {+ conversation: Conversation | ConversationDetail+ } // maxLogic+ clearSandboxAttachments: () => {+ value: true+ } // posthogAiContextLogic+ bootstrapSandboxRun: (payload: { justCreatedRun?: boolean; runId: string; taskId: string; traceId?: string }) => {+ justCreatedRun?: boolean | undefined+ runId: string+ taskId: string+ traceId?: string | undefined+ } // runStreamLogic+ cancelSandboxRun: (run?: { runId: string; taskId: string }) => {+ run:+ | {+ runId: string+ taskId: string+ }+ | undefined+ } // runStreamLogic+ openSandboxSse: (payload: { runId: string; startLatest?: boolean; taskId: string; traceId?: string }) => {+ runId: string+ startLatest?: boolean | undefined+ taskId: string+ traceId?: string | undefined+ } // runStreamLogic+ pushSandboxError: (+ errorMessage: string,+ variant?: 'crash' | 'error'+ ) => {+ errorMessage: string+ variant: 'crash' | 'error'+ } // runStreamLogic+ pushSandboxHumanMessage: (content: string) => {+ content: string+ } // runStreamLogic+ resetSandboxStream: () => {+ value: true+ } // runStreamLogic+ setSandboxRunOpening: (opening: boolean) => {+ opening: boolean+ } // runStreamLogic+ activateCommand: (command: SlashCommand) => {+ command: SlashCommand+ }+ addMessage: (message: ThreadMessage) => {+ message: ThreadMessage+ }+ addPendingApprovalData: (approval: PendingApproval) => {+ approval: PendingApproval+ }+ appendMessageToConversation: (message: string) => {+ message: string+ }+ appendSandboxEntry: (entry: LogEntry) => {+ entry: LogEntry+ }+ clearPendingApproval: () => {+ value: true+ }+ clearQueuedMessages: () => {+ value: true+ }+ completeThreadGeneration: () => {+ value: true+ }+ consumeQueuedMessage: (message: ConversationQueueMessage) => {+ message: ConversationQueueMessage+ }+ continueAfterApproval: (proposalId: string) => {+ proposalId: string+ }+ continueAfterForm: (formAnswers: MultiQuestionFormAnswers) => {+ formAnswers: MultiQuestionFormAnswers+ }+ continueAfterFormDismissal: () => {+ value: true+ }+ continueAfterRejection: (+ proposalId: string,+ feedback?: string+ ) => {+ feedback: string | undefined+ proposalId: string+ }+ continueWithClientToolResult: (+ result: Record<string, unknown>,+ toolCallId: string+ ) => {+ result: Record<string, unknown>+ toolCallId: string+ }+ deleteQueuedMessage: (queueId: string) => {+ queueId: string+ }+ endStreaming: () => {+ value: true+ }+ enqueueQueuedMessage: (payload: {+ agentMode?: AgentMode | null+ billingContext?: MaxBillingContext | null+ content: string+ contextualTools?: Record<string, any>+ uiContext?: MaxUIContext+ }) => {+ agentMode?: AgentMode | null | undefined+ billingContext?: MaxBillingContext | null | undefined+ content: string+ contextualTools?: Record<string, any> | undefined+ uiContext?: MaxUIContext | undefined+ }+ executePendingClientToolCall: () => {+ value: true+ }+ finalizeStreamingMessages: () => {+ value: true+ }+ loadPendingApprovalsData: (approvals: PendingApproval[]) => {+ approvals: PendingApproval[]+ }+ loadQueueData: () => any+ loadQueueDataFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadQueueDataSuccess: (+ queueData: {+ limit: number+ messages: ConversationQueueMessage[]+ },+ payload?: any+ ) => {+ queueData: {+ limit: number+ messages: ConversationQueueMessage[]+ }+ payload?: any+ }+ prewarmSandbox: () => {+ value: true+ }+ processNotebookUpdate: (+ notebookId: string,+ notebookContent: JSONContent+ ) => {+ notebookContent: JSONContent+ notebookId: string+ }+ reconnectToStream: () => {+ value: true+ }+ refreshSandboxEntries: () => {+ value: true+ }+ releaseSandboxPrewarm: () => {+ value: true+ }+ replaceMessage: (+ index: number,+ message: ThreadMessage+ ) => {+ index: number+ message: ThreadMessage+ }+ resetCancelCount: () => {+ value: true+ }+ resetRetryCount: () => {+ value: true+ }+ resetSandboxEntries: () => {+ value: true+ }+ resetThread: () => {+ value: true+ }+ retryLastMessage: () => {+ value: true+ }+ selectCommand: (command: SlashCommand) => {+ command: SlashCommand+ }+ setAgentMode: (agentMode: AgentMode | null) => {+ agentMode: AgentMode | null+ }+ setCancelLoading: (cancelLoading: boolean) => {+ cancelLoading: boolean+ }+ setConversation: (conversation: Conversation) => {+ conversation: Conversation+ }+ setForAnotherAgenticIteration: (value: boolean) => {+ value: boolean+ }+ setIsSandboxMode: (isSandboxMode: boolean) => {+ isSandboxMode: boolean+ }+ setMessageStatus: (+ index: number,+ status: MessageStatus+ ) => {+ index: number+ status: MessageStatus+ }+ setPendingApproval: (proposalId: string) => {+ proposalId: string+ }+ setQueueLimit: (limit: number) => {+ limit: number+ }+ setQueuedMessages: (messages: ConversationQueueMessage[]) => {+ messages: ConversationQueueMessage[]+ }+ setResolvedApprovalStatus: (+ proposalId: string,+ status: 'approved' | 'auto_rejected' | 'rejected',+ feedback?: string+ ) => {+ feedback: string | undefined+ proposalId: string+ status: 'approved' | 'auto_rejected' | 'rejected'+ }+ setSupportOverrideEnabled: (enabled: boolean) => {+ enabled: boolean+ }+ setThread: (thread: ThreadMessage[]) => {+ thread: ThreadMessage[]+ }+ setToolCallUpdate: (+ update: AssistantUpdateEvent | SubagentUpdateEvent,+ toolMap: Record<string, ToolRegistration>+ ) => {+ toolMap: Record<string, ToolRegistration>+ update: AssistantUpdateEvent | SubagentUpdateEvent+ }+ setTraceId: (traceId: string) => {+ traceId: string+ }+ stopGeneration: () => {+ value: true+ }+ streamConversation: (+ streamData: {+ agent_mode: AgentMode | null+ content: string | null+ contextual_tools?: Record<string, any>+ conversation?: string+ is_sandbox?: boolean+ resume_payload?: ResumePayload | null+ ui_context?: any+ },+ generationAttempt: number,+ addToThread?: boolean+ ) => {+ addToThread: boolean+ generationAttempt: number+ streamData: {+ agent_mode: AgentMode | null+ content: string | null+ contextual_tools?: Record<string, any> | undefined+ conversation?: string | undefined+ is_sandbox?: boolean | undefined+ resume_payload?: ResumePayload | null | undefined+ ui_context?: any+ }+ }+ syncAgentModeFromConversation: (agentMode: AgentMode | null) => {+ agentMode: AgentMode | null+ }+ updateQueuedMessage: (+ queueId: string,+ content: string+ ) => {+ content: string+ queueId: string+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface maxThreadLogicMeta {+ key: string+ __keaTypeGenInternalSelectorTypes: {+ conversationId: (conversation: Conversation | null, conversationId: string) => string+ sandboxConversationKey: (conversationId: string) => string+ isConvertedConversation: (conversation: Conversation | null, threadRaw: ThreadMessage[]) => boolean+ effectiveApprovalStatuses: (+ resolvedApprovalStatuses: Record<+ string,+ {+ feedback?: string+ status: 'approved' | 'auto_rejected' | 'rejected'+ }+ >,+ pendingApprovalsData: Record<string, PendingApproval>+ ) => Record<+ string,+ {+ feedback?: string+ status: ApprovalDecisionStatus+ }+ >+ isSharedThread: (conversation: Conversation | null, user: null | import('~/types').UserType) => boolean+ isImpersonatingExistingConversation: (+ conversation: Conversation | null,+ supportOverrideEnabled: boolean,+ user: null | import('~/types').UserType+ ) => boolean+ threadLoading: (conversationLoading: boolean, streamingActive: boolean) => boolean+ queueingEnabled: (featureFlags: FeatureFlagsSet, isSandboxMode: boolean) => boolean+ queueIsFull: (queuedMessages: ConversationQueueMessage[], queueLimit: number) => boolean+ queueDisabledReason: (+ queueingEnabled: boolean,+ threadLoading: boolean,+ queueIsFull: boolean+ ) => string | undefined+ threadGrouped: (+ threadRaw: ThreadMessage[],+ threadLoading: boolean,+ toolCallUpdateMap: Map<string, string[]>,+ pendingApprovalsData: Record<string, PendingApproval>,+ resolvedApprovalStatuses: Record<+ string,+ {+ feedback?: string+ status: 'approved' | 'auto_rejected' | 'rejected'+ }+ >,+ currentThinkingMessage: string | null+ ) => ThreadMessage[]+ threadMessageCount: (threadRaw: ThreadMessage[]) => number+ formPending: (threadRaw: ThreadMessage[]) => boolean+ multiQuestionFormPending: (threadRaw: ThreadMessage[]) => boolean+ activeMultiQuestionForm: (threadRaw: ThreadMessage[]) => MultiQuestionForm | null+ activeDangerousOperationApproval: (+ pendingApprovalProposalId: string | null,+ pendingApprovalsData: Record<string, PendingApproval>,+ resolvedApprovalStatuses: Record<+ string,+ {+ feedback?: string+ status: 'approved' | 'auto_rejected' | 'rejected'+ }+ >+ ) => {+ payload: Record<string, any>+ preview: string+ proposalId: string+ status: 'pending_approval'+ toolName: string+ } | null+ inputDisabled: (+ formPending: boolean,+ multiQuestionFormPending: boolean,+ threadLoading: boolean,+ dataProcessingAccepted: boolean,+ isSharedThread: boolean,+ isImpersonatingExistingConversation: boolean,+ pendingApprovalProposalId: string | null,+ resolvedApprovalStatuses: Record<+ string,+ {+ feedback?: string+ status: 'approved' | 'auto_rejected' | 'rejected'+ }+ >+ ) => boolean+ contextDisabledReason: (+ formPending: boolean,+ multiQuestionFormPending: boolean,+ threadLoading: boolean,+ activeStreamingThreads: number,+ isImpersonatingExistingConversation: boolean+ ) => string | undefined+ submissionDisabledReason: (+ contextDisabledReason: string | undefined,+ question: string,+ queueDisabledReason: string | undefined+ ) => string | undefined+ filteredCommands: (+ question: string,+ featureFlags: FeatureFlagsSet,+ threadLoading: boolean,+ conversation: Conversation | null+ ) => SlashCommand[]+ showDeepResearchModeToggle: (conversation: Conversation | null, featureFlags: FeatureFlagsSet) => boolean+ showContextUI: (conversation: Conversation | null, featureFlags: FeatureFlagsSet) => boolean+ }+}++export type maxThreadLogicType = MakeLogicType<+ maxThreadLogicValues,+ maxThreadLogicActions,+ MaxThreadLogicProps,+ maxThreadLogicMeta+>+export const maxThreadLogic = kea<maxThreadLogicType>([// Mirror maxLogic's key fallback: the bare /ai scene has no panelId, and both logics must// resolve to the same `scene` instance (maxThreadLogic connects to maxLogic({ panelId })).@@ -1841,12 +2385,13 @@ export const maxThreadLogic = kea<maxThreadLogicType>([selectors({conversationId: [(s, p) => [s.conversation, p.conversationId],- (conversation, propsConversationId) => (conversation?.id ? conversation.id : propsConversationId),+ (conversation: Conversation | null, propsConversationId: string) =>+ conversation?.id ? conversation.id : propsConversationId,],// The exact id this instance was keyed with. React must bind the per-conversation sandbox// logics with the same id connect() used above, or the two would resolve different instances.- sandboxConversationKey: [(_, p) => [p.conversationId], (conversationId): string => conversationId],+ sandboxConversationKey: [(_, p) => [p.conversationId], (conversationId: string): string => conversationId],// A converted conversation: now on the sandbox runtime but still carrying its legacy// LangGraph history. Drives the dual render (full legacy thread → "history was converted"@@ -1854,12 +2399,22 @@ export const maxThreadLogic = kea<maxThreadLogicType>([// thinking-loader injected into `threadGrouped` can't be mistaken for legacy content.isConvertedConversation: [(s) => [s.conversation, s.threadRaw],- (conversation, threadRaw): boolean => conversation?.agent_runtime === 'sandbox' && threadRaw.length > 0,+ (conversation: Conversation | null, threadRaw: ThreadMessage[]): boolean =>+ conversation?.agent_runtime === 'sandbox' && threadRaw.length > 0,],effectiveApprovalStatuses: [(s) => [s.resolvedApprovalStatuses, s.pendingApprovalsData],- (resolved, pendingApprovalsData): Record<string, { status: ApprovalDecisionStatus; feedback?: string }> => {+ (+ resolved: Record<+ string,+ {+ feedback?: string+ status: 'approved' | 'auto_rejected' | 'rejected'+ }+ >,+ pendingApprovalsData: Record<string, PendingApproval>+ ): Record<string, { status: ApprovalDecisionStatus; feedback?: string }> => {// Get statuses from pending approvals dataconst baseStatuses: Record<string, { status: ApprovalDecisionStatus; feedback?: string }> = {}for (const [proposalId, approval] of Object.entries(pendingApprovalsData)) {@@ -1876,13 +2431,18 @@ export const maxThreadLogic = kea<maxThreadLogicType>([isSharedThread: [(s) => [s.conversation, userLogic.selectors.user],- (conversation, user): boolean => !!conversation?.user && !!user && conversation.user.uuid !== user.uuid,+ (conversation: Conversation | null, user: null | import('~/types').UserType): boolean =>+ !!conversation?.user && !!user && conversation.user.uuid !== user.uuid,],// Whether the current user is impersonating and viewing an existing conversationisImpersonatingExistingConversation: [(s) => [s.conversation, s.supportOverrideEnabled, userLogic.selectors.user],- (conversation, supportOverrideEnabled, user): boolean => {+ (+ conversation: Conversation | null,+ supportOverrideEnabled: boolean,+ user: null | import('~/types').UserType+ ): boolean => {// Only when user is impersonatingif (!user?.is_impersonated) {return false@@ -1905,7 +2465,7 @@ export const maxThreadLogic = kea<maxThreadLogicType>([threadLoading: [(s) => [s.conversationLoading, s.streamingActive],- (conversationLoading, streamingActive) => conversationLoading || streamingActive,+ (conversationLoading: boolean, streamingActive: boolean) => conversationLoading || streamingActive,],queueingEnabled: [@@ -1913,19 +2473,19 @@ export const maxThreadLogic = kea<maxThreadLogicType>([// aren't flag-gated, and the sandbox runtime drives the drain itself); LangGraph stays// behind the rollout flag.(s) => [s.featureFlags, s.isSandboxMode],- (featureFlags, isSandboxMode): boolean =>+ (featureFlags: import('lib/logic/featureFlagLogic').FeatureFlagsSet, isSandboxMode: boolean): boolean =>!!featureFlags[FEATURE_FLAGS.POSTHOG_AI_QUEUE_MESSAGES_SYSTEM] || isSandboxMode,],queueIsFull: [(s) => [s.queuedMessages, s.queueLimit],- (queuedMessages, queueLimit): boolean =>+ (queuedMessages: ConversationQueueMessage[], queueLimit: number): boolean =>queueLimit !== null && queueLimit > 0 ? queuedMessages.length >= queueLimit : false,],queueDisabledReason: [(s) => [s.queueingEnabled, s.threadLoading, s.queueIsFull],- (queueingEnabled, threadLoading, queueIsFull): string | undefined =>+ (queueingEnabled: boolean, threadLoading: boolean, queueIsFull: boolean): string | undefined =>queueingEnabled && threadLoading && queueIsFull ? 'Queue is full' : undefined,],@@ -1939,12 +2499,18 @@ export const maxThreadLogic = kea<maxThreadLogicType>([s.currentThinkingMessage,],(- thread,- threadLoading,- toolCallUpdateMap,- pendingApprovalsData,- resolvedApprovalStatuses,- currentThinkingMessage+ thread: ThreadMessage[],+ threadLoading: boolean,+ toolCallUpdateMap: Map<string, string[]>,+ pendingApprovalsData: Record<string, PendingApproval>,+ resolvedApprovalStatuses: Record<+ string,+ {+ feedback?: string+ status: 'approved' | 'auto_rejected' | 'rejected'+ }+ >,+ currentThinkingMessage: string | null): ThreadMessage[] => {// Filter out messages that shouldn't be displayedlet processedThread: ThreadMessage[] = []@@ -2027,11 +2593,11 @@ export const maxThreadLogic = kea<maxThreadLogicType>([},],- threadMessageCount: [(s) => [s.threadRaw], (threadRaw) => threadRaw.length],+ threadMessageCount: [(s) => [s.threadRaw], (threadRaw: ThreadMessage[]) => threadRaw.length],formPending: [(s) => [s.threadRaw],- (threadRaw) => {+ (threadRaw: ThreadMessage[]) => {const lastMessage = threadRaw[threadRaw.length - 1]if (lastMessage && isAssistantMessage(lastMessage)) {return !!lastMessage.meta?.form@@ -2042,7 +2608,7 @@ export const maxThreadLogic = kea<maxThreadLogicType>([multiQuestionFormPending: [(s) => [s.threadRaw],- (threadRaw) => {+ (threadRaw: ThreadMessage[]) => {return threadEndsWithMultiQuestionForm(threadRaw)},],@@ -2050,7 +2616,7 @@ export const maxThreadLogic = kea<maxThreadLogicType>([// Returns the multi-question form data if one is pendingactiveMultiQuestionForm: [(s) => [s.threadRaw],- (threadRaw): MultiQuestionForm | null => {+ (threadRaw: ThreadMessage[]): MultiQuestionForm | null => {if (!threadEndsWithMultiQuestionForm(threadRaw)) {return null}@@ -2069,7 +2635,17 @@ export const maxThreadLogic = kea<maxThreadLogicType>([// Returns the pending dangerous operation approval data if one is pendingactiveDangerousOperationApproval: [(s) => [s.pendingApprovalProposalId, s.pendingApprovalsData, s.resolvedApprovalStatuses],- (pendingApprovalProposalId, pendingApprovalsData, resolvedApprovalStatuses) => {+ (+ pendingApprovalProposalId: string | null,+ pendingApprovalsData: Record<string, PendingApproval>,+ resolvedApprovalStatuses: Record<+ string,+ {+ feedback?: string+ status: 'approved' | 'auto_rejected' | 'rejected'+ }+ >+ ) => {if (!pendingApprovalProposalId || resolvedApprovalStatuses[pendingApprovalProposalId]?.status) {return null}@@ -2099,14 +2675,20 @@ export const maxThreadLogic = kea<maxThreadLogicType>([s.resolvedApprovalStatuses,],(- formPending,- multiQuestionFormPending,- threadLoading,- dataProcessingAccepted,- isSharedThread,- isImpersonatingExistingConversation,- pendingApprovalProposalId,- resolvedApprovalStatuses+ formPending: boolean,+ multiQuestionFormPending: boolean,+ threadLoading: boolean,+ dataProcessingAccepted: boolean,+ isSharedThread: boolean,+ isImpersonatingExistingConversation: boolean,+ pendingApprovalProposalId: string | null,+ resolvedApprovalStatuses: Record<+ string,+ {+ feedback?: string+ status: 'approved' | 'auto_rejected' | 'rejected'+ }+ >) => {// Check if there's an unresolved pending approvalconst hasPendingApproval =@@ -2132,11 +2714,11 @@ export const maxThreadLogic = kea<maxThreadLogicType>([s.isImpersonatingExistingConversation,],(- formPending,- multiQuestionFormPending,- threadLoading,- activeStreamingThreads,- isImpersonatingExistingConversation+ formPending: boolean,+ multiQuestionFormPending: boolean,+ threadLoading: boolean,+ activeStreamingThreads: number,+ isImpersonatingExistingConversation: boolean): string | undefined => {// Allow users to cancel the generationif (threadLoading) {@@ -2167,7 +2749,11 @@ export const maxThreadLogic = kea<maxThreadLogicType>([submissionDisabledReason: [(s) => [s.contextDisabledReason, s.question, s.queueDisabledReason],- (contextDisabledReason, question, queueDisabledReason): string | undefined => {+ (+ contextDisabledReason: string | undefined,+ question: string,+ queueDisabledReason: string | undefined+ ): string | undefined => {// Context-related reasons take precedence (form pending, streaming, etc.)if (contextDisabledReason) {return contextDisabledReason@@ -2208,7 +2794,7 @@ export const maxThreadLogic = kea<maxThreadLogicType>([showDeepResearchModeToggle: [(s) => [s.conversation, s.featureFlags],- (conversation, featureFlags) =>+ (conversation: Conversation | null, featureFlags: import('lib/logic/featureFlagLogic').FeatureFlagsSet) =>// if a conversation is already marked as research, or has already started (has title/is in progress), don't show the toggle!!featureFlags[FEATURE_FLAGS.MAX_DEEP_RESEARCH] &&conversation?.type !== ConversationType.DeepResearch &&@@ -2218,7 +2804,7 @@ export const maxThreadLogic = kea<maxThreadLogicType>([showContextUI: [(s) => [s.conversation, s.featureFlags],- (conversation, featureFlags) =>+ (conversation: Conversation | null, featureFlags: import('lib/logic/featureFlagLogic').FeatureFlagsSet) =>featureFlags[FEATURE_FLAGS.MAX_DEEP_RESEARCH]? conversation?.type !== ConversationType.DeepResearch: true,diff --git a/frontend/src/scenes/max/phaiAiComposerSeedLogic.ts b/frontend/src/scenes/max/phaiAiComposerSeedLogic.tsindex ba9cc4804ae3..64b5a27f405c 100644--- a/frontend/src/scenes/max/phaiAiComposerSeedLogic.ts+++ b/frontend/src/scenes/max/phaiAiComposerSeedLogic.ts@@ -1,12 +1,26 @@-import { connect, kea, path } from 'kea'+import { MakeLogicType, connect, kea, path } from 'kea'import { urlToAction } from 'kea-router'import { urls } from 'scenes/urls'import { composerSeedLogic } from 'products/posthog_ai/frontend/api/logics'+import type { ComposerSeed } from '../../../../products/posthog_ai/frontend/logics/composerSeedLogic'import { maxGlobalLogic } from './maxGlobalLogic'-import type { phaiAiComposerSeedLogicType } from './phaiAiComposerSeedLogicType'++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface phaiAiComposerSeedLogicValues {+ dataProcessingAccepted: boolean // maxGlobalLogic+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface phaiAiComposerSeedLogicActions {+ setSeed: (seed: ComposerSeed) => {+ seed: ComposerSeed+ } // composerSeedLogic+}++export type phaiAiComposerSeedLogicType = MakeLogicType<phaiAiComposerSeedLogicValues, phaiAiComposerSeedLogicActions>/*** Forwards the existing `/ai?ask=...` deep link into the new task composer. This logic is mounted only whilediff --git a/frontend/src/scenes/max/phaiSidePanelComposerSeedLogic.ts b/frontend/src/scenes/max/phaiSidePanelComposerSeedLogic.tsindex 22f348efc3fc..8a41f8007ed5 100644--- a/frontend/src/scenes/max/phaiSidePanelComposerSeedLogic.ts+++ b/frontend/src/scenes/max/phaiSidePanelComposerSeedLogic.ts@@ -1,4 +1,4 @@-import { afterMount, connect, kea, key, listeners, path, props } from 'kea'+import { MakeLogicType, afterMount, connect, kea, key, listeners, path, props } from 'kea'import { sidePanelStateLogic } from '~/layout/navigation-3000/sidepanel/sidePanelStateLogic'import { SidePanelTab } from '~/types'@@ -7,7 +7,6 @@ import { ComposerSeed, composerSeedLogic } from 'products/posthog_ai/frontend/apimport { maxGlobalLogic } from './maxGlobalLogic'import { parseCommandString } from './maxLogic'-import type { phaiSidePanelComposerSeedLogicType } from './phaiSidePanelComposerSeedLogicType'export interface PhaiSidePanelComposerSeedLogicProps {/** The embedded composer's panel key — the same one passed to its `taskTrackerSceneLogic`/`composerSeedLogic`. */@@ -35,6 +34,44 @@ function forwardSeed(setSeed({ prompt: question, autoSubmit: autoRun && dataProcessingAccepted })}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface phaiSidePanelComposerSeedLogicValues {+ dataProcessingAccepted: boolean // maxGlobalLogic+ selectedTab: SidePanelTab | null // sidePanelStateLogic+ selectedTabOptions: string | null // sidePanelStateLogic+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface phaiSidePanelComposerSeedLogicActions {+ setSeed: (seed: ComposerSeed) => {+ seed: ComposerSeed+ } // composerSeedLogic+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface phaiSidePanelComposerSeedLogicMeta {+ key: string+ __keaTypeGenInternalReducerActions: {+ 'open side panel (scenes.navigation.sidepanel.sidePanelStateLogic)': (+ tab: SidePanelTab,+ options?: string+ ) => {+ payload: {+ options: string | undefined+ tab: SidePanelTab+ }+ type: 'open side panel (scenes.navigation.sidepanel.sidePanelStateLogic)'+ }+ }+}++export type phaiSidePanelComposerSeedLogicType = MakeLogicType<+ phaiSidePanelComposerSeedLogicValues,+ phaiSidePanelComposerSeedLogicActions,+ PhaiSidePanelComposerSeedLogicProps,+ phaiSidePanelComposerSeedLogicMeta+>+/*** Bridges the legacy `initialMaxPrompt` side-panel option into the new PostHog AI composer. `openMax` (and any* other producer) still rides the prompt on `openSidePanel(SidePanelTab.Max, prompt)` — the option only thediff --git a/frontend/src/scenes/max/posthogAiContextLogic.tsx b/frontend/src/scenes/max/posthogAiContextLogic.tsxindex 03aeb5252b56..21b4f6054e8f 100644--- a/frontend/src/scenes/max/posthogAiContextLogic.tsx+++ b/frontend/src/scenes/max/posthogAiContextLogic.tsx@@ -1,4 +1,5 @@-import { actions, connect, kea, key, listeners, path, props, reducers, selectors } from 'kea'+import { MakeLogicType, actions, connect, kea, key, listeners, path, props, reducers, selectors } from 'kea'+import type { BuiltLogic } from 'kea'import posthog from 'posthog-js'import type { ReactNode } from 'react'@@ -8,7 +9,6 @@ import { IconAction, IconEvent } from 'lib/lemon-ui/icons'import { sceneLogic } from 'scenes/sceneLogic'import { AttachedContext, MaxContextInput, MaxContextType } from './maxTypes'-import type { posthogAiContextLogicType } from './posthogAiContextLogicType'import { activeSceneLogicHasMaxContext } from './utils'export interface PosthogAiContextLogicProps {@@ -73,6 +73,52 @@ function labelForItem(item: AttachedContext): string {return `${item.type} ${item.id ?? ''}`.trim()}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface posthogAiContextLogicValues {+ activeSceneLogic: BuiltLogic | null // sceneLogic+ attachments: AttachedContext[]+ chipsForDisplay: {+ icon: ReactNode+ key: string+ label: string+ }[]+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface posthogAiContextLogicActions {+ attach: (item: AttachedContext) => {+ item: AttachedContext+ }+ clearAttachments: () => {+ value: true+ }+ detach: (key: string) => {+ key: string+ }+ syncSceneAttachments: () => {+ value: true+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface posthogAiContextLogicMeta {+ key: string+ __keaTypeGenInternalSelectorTypes: {+ chipsForDisplay: (attachments: AttachedContext[]) => {+ icon: ReactNode+ key: string+ label: string+ }[]+ }+}++export type posthogAiContextLogicType = MakeLogicType<+ posthogAiContextLogicValues,+ posthogAiContextLogicActions,+ PosthogAiContextLogicProps,+ posthogAiContextLogicMeta+>+/*** Sandbox-runtime context store. Holds one flat `attachments` reducer plus a scene-pull* listener that reads the existing scenes' `maxContext` selectors and projects their rich@@ -121,7 +167,7 @@ export const posthogAiContextLogic = kea<posthogAiContextLogicType>([(s) => [s.attachments],// No onRemove closures here — removal dispatches `detach(key)` on the consumer's// bound instance, so chips stay instance-agnostic data.- (attachments): { key: string; label: string; icon: ReactNode }[] =>+ (attachments: AttachedContext[]): { key: string; label: string; icon: ReactNode }[] =>attachments.map((item) => ({key: attachedContextKey(item),label: labelForItem(item),diff --git a/frontend/src/scenes/notebooks/Notebook/MarkdownNotebookInlineAI.tsx b/frontend/src/scenes/notebooks/Notebook/MarkdownNotebookInlineAI.tsxindex 388b84ae82fa..c131c0ab0acc 100644--- a/frontend/src/scenes/notebooks/Notebook/MarkdownNotebookInlineAI.tsx+++ b/frontend/src/scenes/notebooks/Notebook/MarkdownNotebookInlineAI.tsx@@ -2,7 +2,7 @@ import { useActions, useMountedLogic, useValues } from 'kea'import { useContext, useEffect, useMemo, useRef } from 'react'import { maxLogic } from 'scenes/max/maxLogic'-import type { maxLogicType } from 'scenes/max/maxLogicType'+import type { maxLogicType } from 'scenes/max/maxLogic'import { MaxThreadLogicProps, ThreadMessage, maxThreadLogic } from 'scenes/max/maxThreadLogic'import type { MaxUIContext } from 'scenes/max/maxTypes'diff --git a/frontend/src/scenes/organizationLogic.tsx b/frontend/src/scenes/organizationLogic.tsxindex f2977a5af3dc..8bb3f61d246b 100644--- a/frontend/src/scenes/organizationLogic.tsx+++ b/frontend/src/scenes/organizationLogic.tsx@@ -1,6 +1,7 @@-import { actions, afterMount, connect, kea, listeners, path, reducers, selectors } from 'kea'+import { MakeLogicType, actions, afterMount, connect, kea, listeners, path, reducers, selectors } from 'kea'import { loaders } from 'kea-loaders'import { router } from 'kea-router'+import type { LocationChangedPayload } from 'kea-router/lib/types'import posthog from 'posthog-js'import api, { ApiConfig, ApiError } from 'lib/api'@@ -14,7 +15,6 @@ import { getAppContext } from 'lib/utils/getAppContext'import { sidePanelStateLogic } from '~/layout/navigation-3000/sidepanel/sidePanelStateLogic'import { AvailableFeature, OrganizationType } from '~/types'-import type { organizationLogicType } from './organizationLogicType'import { urls } from './urls'import { userLogic } from './userLogic'@@ -36,6 +36,159 @@ export type OrganizationUpdatePayload = Partial<>>+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface organizationLogicValues {+ hasAvailableFeature: (feature: AvailableFeature, currentUsage?: number | undefined) => boolean // userLogic+ currentOrganization: OrganizationType | null+ currentOrganizationId: string+ currentOrganizationLoading: boolean+ isAdminOrOwner: boolean | null+ isCurrentOrganizationNew: boolean+ isCurrentOrganizationUnavailable: boolean+ isNotActiveReason: string | null+ migrateAccessControlVersionLoading: boolean+ organizationBeingDeleted: string | null+ projectCreationForbiddenReason: string | null+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface organizationLogicActions {+ locationChanged: ({+ method,+ pathname,+ search,+ searchParams,+ hash,+ hashParams,+ initial,+ url,+ routerState,+ }: LocationChangedPayload) => {+ hash: string+ hashParams: Record<string, any>+ initial: boolean+ method: 'POP' | 'PUSH' | 'REPLACE'+ pathname: string+ routerState: Record<string, any>+ search: string+ searchParams: Record<string, any>+ url: string+ } // router+ loadUser: (resetOnFailure?: boolean | undefined) => {+ resetOnFailure: boolean | undefined+ } // userLogic+ completeOnboarding: () => any+ completeOnboardingFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ completeOnboardingSuccess: (+ currentOrganization: OrganizationType | null,+ payload?: any+ ) => {+ currentOrganization: OrganizationType | null+ payload?: any+ }+ createOrganization: (name: string) => string+ createOrganizationFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ createOrganizationSuccess: (+ currentOrganization: OrganizationType | null,+ payload?: string+ ) => {+ currentOrganization: OrganizationType | null+ payload?: string+ }+ deleteOrganization: ({ organizationId, redirectPath }: { organizationId: string; redirectPath?: string }) => {+ organizationId: string+ redirectPath: string | undefined+ }+ deleteOrganizationFailure: (error: string) => {+ error: string+ }+ deleteOrganizationSuccess: ({ redirectPath }: { redirectPath?: string }) => {+ redirectPath: string | undefined+ }+ loadCurrentOrganization: () => any+ loadCurrentOrganizationFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadCurrentOrganizationSuccess: (+ currentOrganization: OrganizationType | null,+ payload?: any+ ) => {+ currentOrganization: OrganizationType | null+ payload?: any+ }+ migrateAccessControlVersion: () => any+ migrateAccessControlVersionFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ migrateAccessControlVersionSuccess: (+ currentOrganization: OrganizationType | null,+ payload?: any+ ) => {+ currentOrganization: OrganizationType | null+ payload?: any+ }+ updateOrganization: (payload: OrganizationUpdatePayload) => OrganizationUpdatePayload+ updateOrganizationFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ updateOrganizationSuccess: (+ currentOrganization: OrganizationType | null,+ payload?: OrganizationUpdatePayload+ ) => {+ currentOrganization: OrganizationType | null+ payload?: OrganizationUpdatePayload+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface organizationLogicMeta {+ __keaTypeGenInternalSelectorTypes: {+ currentOrganizationId: (currentOrganization: OrganizationType | null) => string+ isCurrentOrganizationUnavailable: (+ currentOrganization: OrganizationType | null,+ currentOrganizationLoading: boolean+ ) => boolean+ projectCreationForbiddenReason: (+ currentOrganization: OrganizationType | null,+ hasAvailableFeature: (feature: AvailableFeature, currentUsage?: number | undefined) => boolean+ ) => string | null+ isAdminOrOwner: (currentOrganization: OrganizationType | null) => boolean | null+ isCurrentOrganizationNew: (currentOrganization: OrganizationType | null) => boolean+ isNotActiveReason: (currentOrganization: OrganizationType | null) => string | null+ }+}++export type organizationLogicType = MakeLogicType<+ organizationLogicValues,+ organizationLogicActions,+ Record<string, any>,+ organizationLogicMeta+>+export const organizationLogic = kea<organizationLogicType>([path(['scenes', 'organizationLogic']),actions({@@ -113,7 +266,7 @@ export const organizationLogic = kea<organizationLogicType>([selectors({currentOrganizationId: [(s) => [s.currentOrganization],- (currentOrganization): string => {+ (currentOrganization: OrganizationType | null): string => {if (!currentOrganization || !currentOrganization.id) {// TODO: Fix callers that access currentOrganizationId before the organization is loaded,// then restore the throw. Temporarily falling back to "@current" to avoid crashes.@@ -128,12 +281,15 @@ export const organizationLogic = kea<organizationLogicType>([],isCurrentOrganizationUnavailable: [(s) => [s.currentOrganization, s.currentOrganizationLoading],- (currentOrganization, currentOrganizationLoading): boolean =>+ (currentOrganization: OrganizationType | null, currentOrganizationLoading: boolean): boolean =>!currentOrganization?.membership_level && !currentOrganizationLoading,],projectCreationForbiddenReason: [(s) => [s.currentOrganization, s.hasAvailableFeature],- (currentOrganization, hasAvailableFeature): string | null => {+ (+ currentOrganization: OrganizationType | null,+ hasAvailableFeature: (feature: AvailableFeature, currentUsage?: number | undefined) => boolean+ ): string | null => {const isAdminOrAbove =!!currentOrganization?.membership_level &¤tOrganization.membership_level >= OrganizationMembershipLevel.Admin@@ -149,7 +305,7 @@ export const organizationLogic = kea<organizationLogicType>([],isAdminOrOwner: [(s) => [s.currentOrganization],- (currentOrganization): boolean | null =>+ (currentOrganization: OrganizationType | null): boolean | null =>!!(currentOrganization?.membership_level &&[OrganizationMembershipLevel.Admin, OrganizationMembershipLevel.Owner].includes(@@ -159,14 +315,15 @@ export const organizationLogic = kea<organizationLogicType>([],isCurrentOrganizationNew: [(s) => [s.currentOrganization],- (currentOrganization): boolean => {+ (currentOrganization: OrganizationType | null): boolean => {const orgCreatedAt = currentOrganization?.created_atreturn orgCreatedAt ? dayjs().diff(dayjs(orgCreatedAt), 'month') < 3 : false},],isNotActiveReason: [(s) => [s.currentOrganization],- (currentOrganization): string | null => currentOrganization?.is_not_active_reason ?? null,+ (currentOrganization: OrganizationType | null): string | null =>+ currentOrganization?.is_not_active_reason ?? null,],}),listeners(({ actions, values }) => ({diff --git a/frontend/src/scenes/resource-transfer/interProjectCopyLogic.ts b/frontend/src/scenes/resource-transfer/interProjectCopyLogic.tsindex 5ac75e2bcda8..406a5b3c574f 100644--- a/frontend/src/scenes/resource-transfer/interProjectCopyLogic.ts+++ b/frontend/src/scenes/resource-transfer/interProjectCopyLogic.ts@@ -1,10 +1,30 @@-import { kea, path, selectors } from 'kea'+import { MakeLogicType, kea, path, selectors } from 'kea'import { FEATURE_FLAGS } from 'lib/constants'import { featureFlagLogic } from 'lib/logic/featureFlagLogic'import { organizationLogic } from 'scenes/organizationLogic'-import type { interProjectCopyLogicType } from './interProjectCopyLogicType'+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface interProjectCopyLogicValues {+ canCopyToProject: boolean+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface interProjectCopyLogicMeta {+ __keaTypeGenInternalSelectorTypes: {+ canCopyToProject: (+ currentOrganization: null | import('../../types').OrganizationType,+ featureFlags: import('lib/logic/featureFlagLogic').FeatureFlagsSet+ ) => boolean+ }+}++export type interProjectCopyLogicType = MakeLogicType<+ interProjectCopyLogicValues,+ {},+ Record<string, any>,+ interProjectCopyLogicMeta+>export const interProjectCopyLogic = kea<interProjectCopyLogicType>([path(['scenes', 'resource-transfer', 'interProjectCopyLogic']),@@ -12,7 +32,10 @@ export const interProjectCopyLogic = kea<interProjectCopyLogicType>([selectors({canCopyToProject: [() => [organizationLogic.selectors.currentOrganization, featureFlagLogic.selectors.featureFlags],- (currentOrganization, featureFlags): boolean => {+ (+ currentOrganization: null | import('../../types').OrganizationType,+ featureFlags: import('lib/logic/featureFlagLogic').FeatureFlagsSet+ ): boolean => {const hasMultipleProjects = (currentOrganization?.teams?.length ?? 0) > 1const interProjectTransfersEnabled = !!featureFlags[FEATURE_FLAGS.INTER_PROJECT_TRANSFERS]return hasMultipleProjects && interProjectTransfersEnableddiff --git a/frontend/src/scenes/resource-transfer/resourceTransferLogic.ts b/frontend/src/scenes/resource-transfer/resourceTransferLogic.tsindex 807477cc1c25..9da28ff53ac9 100644--- a/frontend/src/scenes/resource-transfer/resourceTransferLogic.ts+++ b/frontend/src/scenes/resource-transfer/resourceTransferLogic.ts@@ -1,4 +1,4 @@-import { actions, connect, kea, key, listeners, path, props, reducers, selectors } from 'kea'+import { MakeLogicType, actions, connect, kea, key, listeners, path, props, reducers, selectors } from 'kea'import { loaders } from 'kea-loaders'import api from 'lib/api'@@ -8,7 +8,7 @@ import { teamLogic } from 'scenes/teamLogic'import { TeamBasicType } from '~/types'-import type { resourceTransferLogicType } from './resourceTransferLogicType'+import type { OrganizationType } from '../../types'export interface ResourceTransferLogicProps {resourceKind: string@@ -57,6 +57,97 @@ export interface TransferResponse {count: number}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface resourceTransferLogicValues {+ currentOrganization: OrganizationType | null // organizationLogic+ currentTeamId: number | null // teamLogic+ destinationTeamId: number | null+ preview: PreviewResponse | null+ previewLoading: boolean+ rootResourceName: string | null+ substitutionChoices: Record<string, SubstitutionChoice>+ substitutionPayload: {+ destination_resource_id: string+ destination_resource_kind: string+ source_resource_id: string+ source_resource_kind: string+ }[]+ teamOptions: any+ transferResult: TransferResponse | null+ transferResultLoading: boolean+ userFacingResources: PreviewResource[]+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface resourceTransferLogicActions {+ initializeSubstitutionChoices: (choices: Record<string, SubstitutionChoice>) => {+ choices: Record<string, SubstitutionChoice>+ }+ loadPreview: () => any+ loadPreviewFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadPreviewSuccess: (+ preview: PreviewResponse,+ payload?: any+ ) => {+ preview: PreviewResponse+ payload?: any+ }+ setDestinationTeamId: (teamId: unknown) => {+ teamId: number | null+ }+ setSubstitutionChoice: (+ resourceKey: string,+ choice: unknown+ ) => {+ choice: SubstitutionChoice+ resourceKey: string+ }+ submitTransfer: () => any+ submitTransferFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ submitTransferSuccess: (+ transferResult: TransferResponse,+ payload?: any+ ) => {+ transferResult: TransferResponse+ payload?: any+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface resourceTransferLogicMeta {+ key: string+ __keaTypeGenInternalSelectorTypes: {+ teamOptions: (currentOrganization: any, currentTeamId: any) => any+ rootResourceName: (preview: any, resourceKind: any, resourceId: any) => string | null+ userFacingResources: (preview: any, resourceKind: any, resourceId: any) => PreviewResource[]+ substitutionPayload: (substitutionChoices: any) => {+ destination_resource_id: string+ destination_resource_kind: string+ source_resource_id: string+ source_resource_kind: string+ }[]+ }+}++export type resourceTransferLogicType = MakeLogicType<+ resourceTransferLogicValues,+ resourceTransferLogicActions,+ ResourceTransferLogicProps,+ resourceTransferLogicMeta+>+export const resourceTransferLogic = kea<resourceTransferLogicType>([path(['scenes', 'resource-transfer', 'resourceTransferLogic']),props({} as ResourceTransferLogicProps),diff --git a/frontend/src/scenes/resource-transfer/resourceTransferRowLogic.ts b/frontend/src/scenes/resource-transfer/resourceTransferRowLogic.tsindex 0b1aceb4e631..33782c55e2fb 100644--- a/frontend/src/scenes/resource-transfer/resourceTransferRowLogic.ts+++ b/frontend/src/scenes/resource-transfer/resourceTransferRowLogic.ts@@ -1,16 +1,71 @@-import { actions, connect, kea, key, path, props, reducers } from 'kea'+import { MakeLogicType, actions, connect, kea, key, path, props, reducers } from 'kea'import { loaders } from 'kea-loaders'import api from 'lib/api'+import type { OrganizationType } from '../../types'import { type ResourceTransferLogicProps, type SearchResponse, resourceTransferLogic } from './resourceTransferLogic'-import type { resourceTransferRowLogicType } from './resourceTransferRowLogicType'export interface ResourceTransferRowLogicProps {resourceKey: stringtransferLogicProps: ResourceTransferLogicProps}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface resourceTransferRowLogicValues {+ currentOrganization: OrganizationType | null // resourceTransferLogic+ destinationTeamId: number | null // resourceTransferLogic+ isSearching: boolean+ searchResults: SearchResponse | null+ searchResultsLoading: boolean+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface resourceTransferRowLogicActions {+ searchResources: (+ resourceKind: string,+ query: string+ ) => {+ query: string+ resourceKind: string+ }+ searchResourcesFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ searchResourcesSuccess: (+ searchResults: SearchResponse,+ payload?: {+ query: string+ resourceKind: string+ }+ ) => {+ searchResults: SearchResponse+ payload?: {+ query: string+ resourceKind: string+ }+ }+ setIsSearching: (isSearching: boolean) => {+ isSearching: boolean+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface resourceTransferRowLogicMeta {+ key: string+}++export type resourceTransferRowLogicType = MakeLogicType<+ resourceTransferRowLogicValues,+ resourceTransferRowLogicActions,+ ResourceTransferRowLogicProps,+ resourceTransferRowLogicMeta+>+export const resourceTransferRowLogic = kea<resourceTransferRowLogicType>([path(['scenes', 'resource-transfer', 'resourceTransferRowLogic']),props({} as ResourceTransferRowLogicProps),diff --git a/frontend/src/scenes/userLogic.ts b/frontend/src/scenes/userLogic.tsindex f1ce8f367065..e36e2c4e359d 100644--- a/frontend/src/scenes/userLogic.ts+++ b/frontend/src/scenes/userLogic.ts@@ -1,5 +1,6 @@-import { actions, afterMount, kea, listeners, path, reducers, selectors } from 'kea'+import { MakeLogicType, actions, afterMount, kea, listeners, path, reducers, selectors } from 'kea'import { forms } from 'kea-forms'+import type { DeepPartial, DeepPartialMap, FieldName, ValidationErrorType } from 'kea-forms'import { loaders } from 'kea-loaders'import { router } from 'kea-router'import posthog from 'posthog-js'@@ -15,8 +16,8 @@ import { sidePanelStateLogic } from '~/layout/navigation-3000/sidepanel/sidePaneimport { ProductKey } from '~/queries/schema/schema-general'import { AvailableFeature, NotificationSettings, OrganizationBasicType, UserRole, UserTheme, UserType } from '~/types'+import type { BillingFeatureType } from '../types'import { urls } from './urls'-import type { userLogicType } from './userLogicType'export interface UserDetailsFormType {first_name: string@@ -64,6 +65,355 @@ function updateDigestProjectSettings(})}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface userLogicValues {+ availableFeature: (feature: AvailableFeature) => BillingFeatureType | null | undefined+ credentialReviewDismissedInSession: boolean+ hasAvailableFeature: (feature: AvailableFeature, currentUsage?: number | undefined) => boolean+ isImpersonationUpgradeInProgress: boolean+ isProvisionedUser: boolean+ isUserDetailsSubmitting: boolean+ isUserDetailsValid: boolean+ isUserNonTechnical: boolean+ optimisticThemeMode: UserTheme | null+ otherOrganizations: OrganizationBasicType[]+ showUserDetailsErrors: boolean+ themeMode: UserTheme+ user: UserType | null+ userDetails: UserDetailsFormType+ userDetailsAllErrors: Record<string, any>+ userDetailsChanged: boolean+ userDetailsErrors: DeepPartialMap<Record<string, any>, ValidationErrorType>+ userDetailsHasErrors: boolean+ userDetailsManualErrors: Record<string, any>+ userDetailsTouched: boolean+ userDetailsTouches: Record<string, boolean>+ userDetailsValidationErrors: DeepPartialMap<Record<string, any>, ValidationErrorType>+ userLoading: boolean+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface userLogicActions {+ cancelEmailChangeRequest: () => {+ value: true+ }+ cancelEmailChangeRequestFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ cancelEmailChangeRequestSuccess: (+ user: UserType,+ payload?: {+ value: true+ }+ ) => {+ user: UserType+ payload?: {+ value: true+ }+ }+ credentialReviewDismissed: () => {+ value: true+ }+ deleteUser: () => {+ value: true+ }+ deleteUserFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ deleteUserSuccess: (+ user: UserType | null,+ payload?: {+ value: true+ }+ ) => {+ user: UserType | null+ payload?: {+ value: true+ }+ }+ loadUser: (resetOnFailure?: boolean) => {+ resetOnFailure: boolean | undefined+ }+ loadUserFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadUserSuccess: (+ user: UserType | null,+ payload?: {+ resetOnFailure: boolean | undefined+ }+ ) => {+ user: UserType | null+ payload?: {+ resetOnFailure: boolean | undefined+ }+ }+ logout: (preserveLocation?: any) => {+ preserveLocation: any+ }+ resetUserDetails: (values?: Record<string, any>) => {+ values?: Record<string, any>+ }+ setUserDetailsManualErrors: (errors: Record<string, any>) => {+ errors: Record<string, any>+ }+ setUserDetailsValue: (+ key: FieldName,+ value: any+ ) => {+ name: FieldName+ value: any+ }+ setUserDetailsValues: (values: DeepPartial<Record<string, any>>) => {+ values: DeepPartial<Record<string, any>>+ }+ setUserScenePersonalisation: (+ scene: DashboardCompatibleScenes,+ dashboard: number+ ) => {+ dashboard: number+ scene: DashboardCompatibleScenes+ }+ setUserScenePersonalisationFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ setUserScenePersonalisationSuccess: (+ user: UserType,+ payload?: {+ dashboard: number+ scene: DashboardCompatibleScenes+ }+ ) => {+ user: UserType+ payload?: {+ dashboard: number+ scene: DashboardCompatibleScenes+ }+ }+ submitUserDetails: () => {+ value: boolean+ }+ submitUserDetailsFailure: (+ error: Error,+ errors: Record<string, any>+ ) => {+ error: Error+ errors: Record<string, any>+ }+ submitUserDetailsRequest: (userDetails: Record<string, any>) => {+ userDetails: Record<string, any>+ }+ submitUserDetailsSuccess: (userDetails: Record<string, any>) => {+ userDetails: Record<string, any>+ }+ switchTeam: (+ teamId: number | string,+ destination?: string+ ) => {+ destination: string | undefined+ teamId: number | string+ }+ touchUserDetailsField: (key: string) => {+ key: string+ }+ updateAllRealtimeNotifications: (+ teamIds: number[],+ types: string[],+ enabled: boolean+ ) => {+ enabled: boolean+ teamIds: number[]+ types: string[]+ }+ updateCurrentOrganization: (+ organizationId: string,+ destination?: string+ ) => {+ destination: string | undefined+ organizationId: string+ }+ updateDataPipelineErrorThreshold: (threshold: number) => {+ threshold: number+ }+ updateETWeeklyDigestForAllTeams: (+ teamIds: number[],+ enabled: boolean+ ) => {+ enabled: boolean+ teamIds: number[]+ }+ updateETWeeklyDigestForTeam: (+ teamId: number,+ enabled: boolean+ ) => {+ enabled: boolean+ teamId: number+ }+ updateHasSeenProductIntroFor: (+ productKey: ProductKey,+ value?: boolean+ ) => {+ productKey: ProductKey+ value: boolean+ }+ updateMemberJoinEmailForAllOrganizations: (+ organizationIds: string[],+ enabled: boolean+ ) => {+ enabled: boolean+ organizationIds: string[]+ }+ updateMemberJoinEmailForOrganization: (+ organizationId: string,+ enabled: boolean+ ) => {+ enabled: boolean+ organizationId: string+ }+ updatePipelineNotification: (+ pipelineId: string,+ enabled: boolean+ ) => {+ enabled: boolean+ pipelineId: string+ }+ updatePipelineNotificationForAll: (+ pipelineIds: string[],+ enabled: boolean+ ) => {+ enabled: boolean+ pipelineIds: string[]+ }+ updateRealtimeNotificationForProject: (+ teamId: number,+ types: string[],+ enabled: boolean+ ) => {+ enabled: boolean+ teamId: number+ types: string[]+ }+ updateRealtimeNotificationForTeam: (+ type: string,+ teamId: number,+ enabled: boolean+ ) => {+ enabled: boolean+ teamId: number+ type: string+ }+ updateUser: (+ user: Partial<UserType>,+ successCallback?: () => void+ ) => {+ successCallback: (() => void) | undefined+ user: Partial<UserType>+ }+ updateUserFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ updateUserSuccess: (+ user: UserType,+ payload?: {+ successCallback: (() => void) | undefined+ user: Partial<UserType>+ }+ ) => {+ user: UserType+ payload?: {+ successCallback: (() => void) | undefined+ user: Partial<UserType>+ }+ }+ updateWAWeeklyDigestForAllTeams: (+ teamIds: number[],+ enabled: boolean+ ) => {+ enabled: boolean+ teamIds: number[]+ }+ updateWAWeeklyDigestForTeam: (+ teamId: number,+ enabled: boolean+ ) => {+ enabled: boolean+ teamId: number+ }+ updateWeeklyDigestForAllTeams: (+ teamIds: number[],+ enabled: boolean+ ) => {+ enabled: boolean+ teamIds: number[]+ }+ updateWeeklyDigestForTeam: (+ teamId: number,+ enabled: boolean+ ) => {+ enabled: boolean+ teamId: number+ }+ upgradeImpersonation: (reason: string) => {+ reason: string+ }+ upgradeImpersonationFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ upgradeImpersonationSuccess: (+ user: UserType | null,+ payload?: {+ reason: string+ }+ ) => {+ user: UserType | null+ payload?: {+ reason: string+ }+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface userLogicMeta {+ __keaTypeGenInternalSelectorTypes: {+ hasAvailableFeature: (+ user: UserType | null+ ) => (feature: AvailableFeature, currentUsage?: number | undefined) => boolean+ availableFeature: (+ user: UserType | null+ ) => (feature: AvailableFeature) => BillingFeatureType | null | undefined+ isProvisionedUser: (user: UserType | null) => boolean+ otherOrganizations: (user: UserType | null) => OrganizationBasicType[]+ themeMode: (user: UserType | null, optimisticThemeMode: UserTheme | null) => UserTheme+ isUserNonTechnical: (user: UserType | null) => boolean+ }+}++export type userLogicType = MakeLogicType<userLogicValues, userLogicActions, Record<string, any>, userLogicMeta>+export const userLogic = kea<userLogicType>([path(['scenes', 'userLogic']),actions(() => ({@@ -614,7 +964,7 @@ export const userLogic = kea<userLogicType>([selectors({hasAvailableFeature: [(s) => [s.user],- (user) => {+ (user: UserType | null) => {return (feature: AvailableFeature, currentUsage?: number) => {const availableProductFeatures = user?.organization?.available_product_featuresif (availableProductFeatures && availableProductFeatures.length > 0) {@@ -633,7 +983,7 @@ export const userLogic = kea<userLogicType>([],availableFeature: [(s) => [s.user],- (user) => {+ (user: UserType | null) => {return (feature: AvailableFeature) => {const availableProductFeatures = user?.organization?.available_product_featuresif (availableProductFeatures && availableProductFeatures.length > 0) {@@ -646,11 +996,14 @@ export const userLogic = kea<userLogicType>([// True for accounts created by a partner drop flow (onboarding skipped with reason// 'provisioned'). Drives the provisioned welcome experience — background-install FAB,// welcome dialog, quick-start seeding, and the homepage banner.- isProvisionedUser: [(s) => [s.user], (user): boolean => user?.onboarding_skipped_reason === 'provisioned'],+ isProvisionedUser: [+ (s) => [s.user],+ (user: UserType | null): boolean => user?.onboarding_skipped_reason === 'provisioned',+ ],otherOrganizations: [(s) => [s.user],- (user): OrganizationBasicType[] =>+ (user: UserType | null): OrganizationBasicType[] =>user? user.organizations?.filter((organization) => organization.id !== user.organization?.id)@@ -662,14 +1015,14 @@ export const userLogic = kea<userLogicType>([themeMode: [(s) => [s.user, s.optimisticThemeMode],- (user, optimisticThemeMode): UserTheme => {+ (user: UserType | null, optimisticThemeMode: UserTheme | null): UserTheme => {return optimisticThemeMode ?? user?.theme_mode ?? 'light'},],isUserNonTechnical: [(s) => [s.user],- (user): boolean => {+ (user: UserType | null): boolean => {const nonTechnicalRoles = [UserRole.Founder,UserRole.Leadership,diff --git a/frontend/src/toolbar/actions/actionsLogic.ts b/frontend/src/toolbar/actions/actionsLogic.tsindex ce1508adee85..a5dc115c7433 100644--- a/frontend/src/toolbar/actions/actionsLogic.ts+++ b/frontend/src/toolbar/actions/actionsLogic.ts@@ -1,4 +1,4 @@-import { actions, kea, path, reducers, selectors } from 'kea'+import { MakeLogicType, actions, kea, path, reducers, selectors } from 'kea'import { loaders } from 'kea-loaders'import { createFuse } from 'lib/utils/fuseSearch'@@ -7,7 +7,93 @@ import { permanentlyMount } from 'lib/utils/kea-logic-builders'import { toolbarApi } from '~/toolbar/toolbarApi'import { ActionType } from '~/types'-import type { actionsLogicType } from './actionsLogicType'+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface actionsLogicValues {+ actionCount: number+ allActions: ActionType[]+ allActionsLoading: boolean+ searchTerm: string+ sortedActions: ActionType[]+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface actionsLogicActions {+ deleteAction: ({ id }: { id: number }) => {+ id: number+ }+ deleteActionFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ deleteActionSuccess: (+ allActions: ActionType[],+ payload?: {+ id: number+ }+ ) => {+ allActions: ActionType[]+ payload?: {+ id: number+ }+ }+ getActions: (_?: any) => any+ getActionsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ getActionsSuccess: (+ allActions: ActionType[],+ payload?: any+ ) => {+ allActions: ActionType[]+ payload?: any+ }+ setSearchTerm: (searchTerm: string) => {+ searchTerm: string+ }+ updateAction: ({ action }: { action: ActionType }) => {+ action: ActionType+ }+ updateActionFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ updateActionSuccess: (+ allActions: ActionType[],+ payload?: {+ action: ActionType+ }+ ) => {+ allActions: ActionType[]+ payload?: {+ action: ActionType+ }+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface actionsLogicMeta {+ __keaTypeGenInternalSelectorTypes: {+ sortedActions: (allActions: ActionType[], searchTerm: string) => ActionType[]+ actionCount: (allActions: ActionType[]) => number+ }+}++export type actionsLogicType = MakeLogicType<+ actionsLogicValues,+ actionsLogicActions,+ Record<string, any>,+ actionsLogicMeta+>export const actionsLogic = kea<actionsLogicType>([path(['toolbar', 'actions', 'actionsLogic']),@@ -51,7 +137,7 @@ export const actionsLogic = kea<actionsLogicType>([selectors({sortedActions: [(s) => [s.allActions, s.searchTerm],- (allActions, searchTerm) => {+ (allActions: ActionType[], searchTerm: string) => {const filteredActions = searchTerm? createFuse(allActions, {keys: ['name'],@@ -62,7 +148,7 @@ export const actionsLogic = kea<actionsLogicType>([return [...filteredActions].sort((a, b) => (a.name ?? 'Untitled').localeCompare(b.name ?? 'Untitled'))},],- actionCount: [(s) => [s.allActions], (allActions) => allActions.length],+ actionCount: [(s) => [s.allActions], (allActions: ActionType[]) => allActions.length],}),permanentlyMount(),])diff --git a/frontend/src/toolbar/actions/actionsTabLogic.tsx b/frontend/src/toolbar/actions/actionsTabLogic.tsxindex 2d7770088381..5f921ae18dd5 100644--- a/frontend/src/toolbar/actions/actionsTabLogic.tsx+++ b/frontend/src/toolbar/actions/actionsTabLogic.tsx@@ -1,5 +1,6 @@-import { actions, connect, kea, listeners, path, reducers, selectors } from 'kea'+import { MakeLogicType, actions, connect, kea, listeners, path, reducers, selectors } from 'kea'import { forms } from 'kea-forms'+import type { DeepPartial, DeepPartialMap, FieldName, ValidationErrorType } from 'kea-forms'import { subscriptions } from 'kea-subscriptions'import { lemonToast } from 'lib/lemon-ui/LemonToast/LemonToast'@@ -19,7 +20,7 @@ import {} from '~/toolbar/utils'import { AccessControlLevel, ActionType, ElementType } from '~/types'-import type { actionsTabLogicType } from './actionsTabLogicType'+import type { ToolbarUserIntent } from '../../types'import type { ActionStepPropertyKey } from './ActionStep'function newAction(@@ -76,6 +77,173 @@ function toElementsChain(element: HTMLElement): ElementType[] {)}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface actionsTabLogicValues {+ allActions: ActionType[] // actionsLogic+ actionId: number | null // toolbarConfigLogic+ buttonVisible: boolean // toolbarConfigLogic+ dataAttributes: string[] // toolbarConfigLogic+ uiHost: string // toolbarConfigLogic+ userIntent: ToolbarUserIntent | null // toolbarConfigLogic+ actionForm: ActionForm+ actionFormAllErrors: Record<string, any>+ actionFormChanged: boolean+ actionFormElementsChains: Record<number, ElementType[]>+ actionFormErrors: DeepPartialMap<ActionForm, ValidationErrorType>+ actionFormHasErrors: boolean+ actionFormManualErrors: Record<string, any>+ actionFormTouched: boolean+ actionFormTouches: Record<string, boolean>+ actionFormValidationErrors: DeepPartialMap<ActionForm, ValidationErrorType>+ automaticActionCreationEnabled: boolean+ automaticCreationIncludedPropertyKeys: ActionStepPropertyKey[]+ buttonActionsVisible: boolean+ counter: number+ editingSelector: number | null+ editingSelectorValue: string | null+ elementsChainBeingEdited: ElementType[]+ inspectingElement: number | null+ isActionFormSubmitting: boolean+ isActionFormValid: boolean+ isReadyForAutomaticSubmit: boolean+ newActionForElement: HTMLElement | null+ newActionName: string | null+ selectedAction: ActionDraftType | ActionType | null+ selectedActionId: number | 'new' | null+ showActionFormErrors: boolean+ showActionsTooltip: boolean+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface actionsTabLogicActions {+ actionCreatedSuccess: (action: ActionType) => {+ action: ActionType+ }+ addAutomaticCreationIncludedPropertyKey: (key: ActionStepPropertyKey) => {+ key: ActionStepPropertyKey+ }+ editSelectorWithIndex: (index: number | null) => {+ index: number | null+ }+ hideButtonActions: () => {+ value: true+ }+ incrementCounter: () => {+ value: true+ }+ inspectElementSelected: (+ element: HTMLElement,+ index: number | null+ ) => {+ element: HTMLElement+ index: number | null+ }+ inspectForElementWithIndex: (index: number | null) => {+ index: number | null+ }+ newAction: (element?: HTMLElement) => {+ element: HTMLElement | null+ }+ removeAutomaticCreationIncludedPropertyKey: (key: ActionStepPropertyKey) => {+ key: ActionStepPropertyKey+ }+ resetActionForm: (values?: ActionForm) => {+ values?: ActionForm+ }+ saveAction: (formValues: ActionForm) => {+ formValues: ActionForm+ }+ selectAction: (id: number | null) => {+ id: number | null+ }+ setActionFormManualErrors: (errors: Record<string, any>) => {+ errors: Record<string, any>+ }+ setActionFormValue: (+ key: FieldName,+ value: any+ ) => {+ name: FieldName+ value: any+ }+ setActionFormValues: (values: DeepPartial<ActionForm>) => {+ values: DeepPartial<ActionForm>+ }+ setAutomaticActionCreationEnabled: (+ enabled: boolean,+ name?: string+ ) => {+ enabled: boolean+ name: string | undefined+ }+ setElementSelector: (+ selector: string,+ index: number+ ) => {+ index: number+ selector: string+ }+ setShowActionsTooltip: (showActionsTooltip: boolean) => {+ showActionsTooltip: boolean+ }+ setautomaticCreationIncludedPropertyKeys: (keys: ActionStepPropertyKey[]) => {+ keys: ActionStepPropertyKey[]+ }+ showButtonActions: () => {+ value: true+ }+ submitActionForm: () => {+ value: boolean+ }+ submitActionFormFailure: (+ error: Error,+ errors: Record<string, any>+ ) => {+ error: Error+ errors: Record<string, any>+ }+ submitActionFormRequest: (actionForm: ActionForm) => {+ actionForm: ActionForm+ }+ submitActionFormSuccess: (actionForm: ActionForm) => {+ actionForm: ActionForm+ }+ touchActionFormField: (key: string) => {+ key: string+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface actionsTabLogicMeta {+ __keaTypeGenInternalSelectorTypes: {+ editingSelectorValue: (editingSelector: number | null, actionForm: ActionForm) => string | null+ elementsChainBeingEdited: (+ editingSelector: number | null,+ actionFormElementsChains: Record<number, ElementType[]>+ ) => ElementType[]+ selectedAction: (+ selectedActionId: number | 'new' | null,+ newActionForElement: HTMLElement | null,+ allActions: ActionType[],+ dataAttributes: string[],+ newActionName: string | null,+ automaticCreationIncludedPropertyKeys: ActionStepPropertyKey[]+ ) => ActionDraftType | ActionType | null+ isReadyForAutomaticSubmit: (+ automaticActionCreationEnabled: boolean,+ selectedAction: ActionDraftType | ActionType | null,+ actionForm: ActionForm+ ) => boolean+ }+}++export type actionsTabLogicType = MakeLogicType<+ actionsTabLogicValues,+ actionsTabLogicActions,+ Record<string, any>,+ actionsTabLogicMeta+>+export const actionsTabLogic = kea<actionsTabLogicType>([path(['toolbar', 'actions', 'actionsTabLogic']),actions({@@ -268,7 +436,7 @@ export const actionsTabLogic = kea<actionsTabLogicType>([selectors({editingSelectorValue: [(s) => [s.editingSelector, s.actionForm],- (editingSelector, actionForm): string | null => {+ (editingSelector: number | null, actionForm: ActionForm): string | null => {if (editingSelector === null) {return null}@@ -278,7 +446,7 @@ export const actionsTabLogic = kea<actionsTabLogicType>([],elementsChainBeingEdited: [(s) => [s.editingSelector, s.actionFormElementsChains],- (editingSelector, elementChains): ElementType[] => {+ (editingSelector: number | null, elementChains: Record<number, ElementType[]>): ElementType[] => {if (editingSelector === null) {return []}@@ -295,12 +463,12 @@ export const actionsTabLogic = kea<actionsTabLogicType>([s.automaticCreationIncludedPropertyKeys,],(- selectedActionId,- newActionForElement,- allActions,- dataAttributes,- newActionName,- automaticCreationIncludedPropertyKeys+ selectedActionId: number | 'new' | null,+ newActionForElement: HTMLElement | null,+ allActions: ActionType[],+ dataAttributes: string[],+ newActionName: string | null,+ automaticCreationIncludedPropertyKeys: ActionStepPropertyKey[]): ActionType | ActionDraftType | null => {if (selectedActionId === 'new') {return newAction(@@ -315,7 +483,11 @@ export const actionsTabLogic = kea<actionsTabLogicType>([],isReadyForAutomaticSubmit: [(s) => [s.automaticActionCreationEnabled, s.selectedAction, s.actionForm],- (automaticActionCreationEnabled, selectedAction, actionForm): boolean => {+ (+ automaticActionCreationEnabled: boolean,+ selectedAction: ActionDraftType | ActionType | null,+ actionForm: ActionForm+ ): boolean => {return ((automaticActionCreationEnabled &&selectedAction?.name &&diff --git a/frontend/src/toolbar/bar/toolbarLogic.ts b/frontend/src/toolbar/bar/toolbarLogic.tsindex d6f4e400b3f4..cbdd287807c4 100644--- a/frontend/src/toolbar/bar/toolbarLogic.ts+++ b/frontend/src/toolbar/bar/toolbarLogic.ts@@ -1,4 +1,4 @@-import { actions, afterMount, connect, kea, listeners, path, reducers, selectors } from 'kea'+import { MakeLogicType, actions, afterMount, connect, kea, listeners, path, reducers, selectors } from 'kea'import { windowValues } from 'kea-window-values'import { PostHog } from 'posthog-js'@@ -22,8 +22,10 @@ import { toolbarPosthogJS } from '~/toolbar/toolbarPosthogJS'import { TOOLBAR_CONTAINER_CLASS, TOOLBAR_ID, inBounds, makeNavigateWrapper } from '~/toolbar/utils'import { webVitalsToolbarLogic } from '~/toolbar/web-vitals/webVitalsToolbarLogic'+import type { CommonFilters, HeatmapFilters, HeatmapFixedPositionMode } from '../../lib/components/heatmaps/types'+import type { HedgehogModeInterface } from '../../lib/components/HedgehogMode/types'+import type { ActionType } from '../../types'import { generatePiiMaskingCSS } from './piiMaskingStyles'-import type { toolbarLogicType } from './toolbarLogicType'const MARGIN = 2const HEDGEHOG_OFFSET = 80@@ -56,6 +58,298 @@ export type ToolbarPositionType =export const TOOLBAR_FIXED_POSITION_HITBOX = 100+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface toolbarLogicValues {+ allActionsLoading: boolean // actionsLogic+ allExperimentsLoading: boolean // experimentsLogic+ userFlagsLoading: boolean // flagsToolbarLogic+ elementStatsLoading: boolean // heatmapToolbarMenuLogic+ isRefreshing: boolean // heatmapToolbarMenuLogic+ rawHeatmapLoading: boolean // heatmapToolbarMenuLogic+ hedgehogMode: HedgehogModeInterface | null // hedgehogModeLogic+ allSurveysLoading: boolean // surveysToolbarLogic+ posthog: PostHog | null // toolbarConfigLogic+ remoteWebVitalsLoading: boolean // webVitalsToolbarLogic+ cspBlocksNewFunction: boolean+ currentPathname: string+ element: HTMLElement | null+ fixedPosition: ToolbarPositionType+ fixedPositions: Record<+ ToolbarPositionType,+ {+ x: number+ y: number+ }+ >+ getHedgehogActor: () => HedgehogActor | null+ hedgehogModeAvailable: boolean+ hedgehogModeEnabled: boolean+ isBlurred: boolean+ isDragging: boolean+ isEmbeddedInApp: boolean+ isExiting: boolean+ isLoading: boolean+ lastDragPosition: {+ x: number+ y: number+ } | null+ menu: HTMLElement | null+ menuProperties:+ | {+ isBelow: boolean+ maxHeight: number+ transform: string+ }+ | {+ isBelow?: undefined+ maxHeight?: undefined+ transform?: undefined+ }+ minimized: boolean+ piiMaskingColor: string+ piiMaskingEnabled: boolean+ piiWarning: string[] | null+ position: {+ x: number+ y: number+ }+ theme: 'dark' | 'light'+ visibleMenu: MenuState+ windowHeight: number+ windowWidth: number+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface toolbarLogicActions {+ actionCreatedSuccess: (action: ActionType) => {+ action: ActionType+ } // actionsTabLogic+ hideButtonActions: () => {+ value: true+ } // actionsTabLogic+ selectAction: (id: number | null) => {+ id: number | null+ } // actionsTabLogic+ setAutomaticActionCreationEnabled: (+ enabled: boolean,+ name?: string | undefined+ ) => {+ enabled: boolean+ name: string | undefined+ } // actionsTabLogic+ showButtonActions: () => {+ value: true+ } // actionsTabLogic+ createAction: (element: HTMLElement) => {+ element: HTMLElement+ } // elementsLogic+ disableInspect: () => {+ value: true+ } // elementsLogic+ enableInspect: () => {+ value: true+ } // elementsLogic+ showButtonExperiments: () => {+ value: true+ } // experimentsTabLogic+ hideButtonFieldNotes: () => {+ value: true+ } // fieldNotesLogic+ showButtonFieldNotes: () => {+ value: true+ } // fieldNotesLogic+ disableHeatmap: () => {+ value: true+ } // heatmapToolbarMenuLogic+ enableHeatmap: () => {+ value: true+ } // heatmapToolbarMenuLogic+ patchHeatmapFilters: (filters: Partial<HeatmapFilters>) => {+ filters: Partial<HeatmapFilters>+ } // heatmapToolbarMenuLogic+ setCommonFilters: (filters: CommonFilters) => {+ filters: CommonFilters+ } // heatmapToolbarMenuLogic+ setHeatmapColorPalette: (palette: string | null) => {+ palette: string | null+ } // heatmapToolbarMenuLogic+ setHeatmapFixedPositionMode: (mode: HeatmapFixedPositionMode) => {+ mode: HeatmapFixedPositionMode+ } // heatmapToolbarMenuLogic+ toggleClickmapsEnabled: (enabled: boolean) => {+ enabled: boolean+ } // heatmapToolbarMenuLogic+ hideButtonProductTours: () => {+ value: true+ } // productToursLogic+ showButtonProductTours: () => {+ value: true+ } // productToursLogic+ hideButtonSurveys: () => {+ value: true+ } // surveysToolbarLogic+ showButtonSurveys: () => {+ value: true+ } // surveysToolbarLogic+ logout: () => {+ value: true+ } // toolbarConfigLogic+ setOAuthTokens: (+ accessToken: string,+ refreshToken: string,+ clientId: string+ ) => {+ accessToken: string+ clientId: string+ refreshToken: string+ } // toolbarConfigLogic+ completeGracefulExit: () => {+ value: true+ }+ maybeSendNavigationMessage: () => {+ value: true+ }+ onMouseOrTouchDown: (event: MouseEvent | TouchEvent) => {+ event: MouseEvent | TouchEvent+ }+ openHedgehogOptions: () => {+ value: true+ }+ setCspBlocksNewFunction: (blocked: boolean) => {+ blocked: boolean+ }+ setCurrentPathname: (pathname: string) => {+ pathname: string+ }+ setDragPosition: (+ x: number,+ y: number+ ) => {+ x: number+ y: number+ }+ setDragging: (dragging?: any) => {+ dragging: any+ }+ setElement: (element: HTMLElement | null) => {+ element: HTMLElement | null+ }+ setFixedPosition: (position: ToolbarPositionType) => {+ position: ToolbarPositionType+ }+ setHedgehogModeEnabled: (hedgehogModeEnabled: boolean) => {+ hedgehogModeEnabled: boolean+ }+ setIsBlurred: (isBlurred: boolean) => {+ isBlurred: boolean+ }+ setIsEmbeddedInApp: (isEmbedded: boolean) => {+ isEmbedded: boolean+ }+ setMenu: (element: HTMLElement | null) => {+ element: HTMLElement | null+ }+ setPiiMaskingColor: (color: string) => {+ color: string+ }+ setVisibleMenu: (visibleMenu: MenuState) => {+ visibleMenu: MenuState+ }+ startGracefulExit: () => {+ value: true+ }+ syncWithHedgehog: () => {+ value: true+ }+ toggleMinimized: (minimized?: boolean) => {+ minimized: boolean | undefined+ }+ togglePiiMasking: (enabled?: boolean) => {+ enabled: boolean | undefined+ }+ toggleTheme: (theme?: 'dark' | 'light') => {+ theme: 'dark' | 'light' | undefined+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface toolbarLogicMeta {+ __keaTypeGenInternalSelectorTypes: {+ position: (+ element: HTMLElement | null,+ lastDragPosition: {+ x: number+ y: number+ } | null,+ windowWidth: number,+ windowHeight: number,+ fixedPosition: ToolbarPositionType,+ fixedPositions: Record<+ ToolbarPositionType,+ {+ x: number+ y: number+ }+ >,+ minimized: boolean+ ) => {+ x: number+ y: number+ }+ fixedPositions: (+ windowWidth: number,+ windowHeight: number+ ) => Record<+ ToolbarPositionType,+ {+ x: number+ y: number+ }+ >+ menuProperties: (+ element: HTMLElement | null,+ menu: HTMLElement | null,+ position: {+ x: number+ y: number+ },+ windowWidth: number,+ windowHeight: number,+ isBlurred: boolean+ ) =>+ | {+ isBelow: boolean+ maxHeight: number+ transform: string+ }+ | {+ isBelow?: undefined+ maxHeight?: undefined+ transform?: undefined+ }+ getHedgehogActor: (hedgehogMode: HedgehogModeInterface | null) => () => HedgehogActor | null+ piiWarning: (posthog: PostHog | null, piiMaskingEnabled: boolean) => string[] | null+ isLoading: (+ elementStatsLoading: boolean,+ rawHeatmapLoading: boolean,+ isRefreshing: boolean,+ allActionsLoading: boolean,+ userFlagsLoading: boolean,+ allExperimentsLoading: boolean,+ remoteWebVitalsLoading: boolean,+ allSurveysLoading: boolean+ ) => boolean+ hedgehogModeAvailable: (cspBlocksNewFunction: boolean) => boolean+ }+}++export type toolbarLogicType = MakeLogicType<+ toolbarLogicValues,+ toolbarLogicActions,+ Record<string, any>,+ toolbarLogicMeta+>+export const toolbarLogic = kea<toolbarLogicType>([path(['toolbar', 'bar', 'toolbarLogic']),@@ -266,7 +560,24 @@ export const toolbarLogic = kea<toolbarLogicType>([s.fixedPositions,s.minimized,],- (element, lastDragPosition, windowWidth, windowHeight, fixedPosition, fixedPositions, minimized) => {+ (+ element: HTMLElement | null,+ lastDragPosition: {+ x: number+ y: number+ } | null,+ windowWidth: number,+ windowHeight: number,+ fixedPosition: ToolbarPositionType,+ fixedPositions: Record<+ ToolbarPositionType,+ {+ x: number+ y: number+ }+ >,+ minimized: boolean+ ) => {const position = lastDragPosition ?? fixedPositions[fixedPosition]const width = element@@ -291,7 +602,7 @@ export const toolbarLogic = kea<toolbarLogicType>([fixedPositions: [(s) => [s.windowWidth, s.windowHeight],- (windowWidth, windowHeight): Record<ToolbarPositionType, { x: number; y: number }> => {+ (windowWidth: number, windowHeight: number): Record<ToolbarPositionType, { x: number; y: number }> => {return {'top-left': {x: 0,@@ -330,7 +641,17 @@ export const toolbarLogic = kea<toolbarLogicType>([],menuProperties: [(s) => [s.element, s.menu, s.position, s.windowWidth, s.windowHeight, s.isBlurred],- (element, menu, position, windowWidth, windowHeight, isBlurred) => {+ (+ element: HTMLElement | null,+ menu: HTMLElement | null,+ position: {+ x: number+ y: number+ },+ windowWidth: number,+ windowHeight: number,+ isBlurred: boolean+ ) => {if (!element || !menu) {return {}}@@ -367,7 +688,9 @@ export const toolbarLogic = kea<toolbarLogicType>([getHedgehogActor: [(s) => [s.hedgehogMode],- (hedgehogMode): (() => HedgehogActor | null) => {+ (+ hedgehogMode: null | import('lib/components/HedgehogMode/types').HedgehogModeInterface+ ): (() => HedgehogActor | null) => {return () => {const player = hedgehogMode?.stateManager?.getPlayerHedgehogActor()if (!player || !player.rigidBody) {@@ -428,14 +751,14 @@ export const toolbarLogic = kea<toolbarLogicType>([s.allSurveysLoading,],(- elementStatsLoading,- rawHeatmapLoading,- isRefreshing,- allActionsLoading,- userFlagsLoading,- allExperimentsLoading,- remoteWebVitalsLoading,- allSurveysLoading+ elementStatsLoading: boolean,+ rawHeatmapLoading: boolean,+ isRefreshing: boolean,+ allActionsLoading: boolean,+ userFlagsLoading: boolean,+ allExperimentsLoading: boolean,+ remoteWebVitalsLoading: boolean,+ allSurveysLoading: boolean) =>elementStatsLoading ||rawHeatmapLoading ||diff --git a/frontend/src/toolbar/debug/eventDebugMenuLogic.ts b/frontend/src/toolbar/debug/eventDebugMenuLogic.tsindex 2021b9ea40a8..62729a03f54a 100644--- a/frontend/src/toolbar/debug/eventDebugMenuLogic.ts+++ b/frontend/src/toolbar/debug/eventDebugMenuLogic.ts@@ -1,4 +1,5 @@-import { actions, afterMount, connect, kea, path, reducers, selectors } from 'kea'+import { MakeLogicType, actions, afterMount, connect, kea, path, reducers, selectors } from 'kea'+import type { PostHog } from 'posthog-js/dist/module'import { uuid } from 'lib/utils/dom'import { permanentlyMount } from 'lib/utils/kea-logic-builders'@@ -8,8 +9,6 @@ import { CORE_FILTER_DEFINITIONS_BY_GROUP, PROPERTY_KEYS } from '~/taxonomy/taxoimport { toolbarConfigLogic } from '~/toolbar/toolbarConfigLogic'import { EventType } from '~/types'-import type { eventDebugMenuLogicType } from './eventDebugMenuLogicType'-function tryRegexMatch(text: string, pattern: string): boolean {// If the pattern looks like /regex/ or /regex/flags, treat as regexconst regexMatch = pattern.match(/^\/(.+)\/([gimsuy]*)$/)@@ -40,6 +39,104 @@ export function classifyEvent(e: EventType): EventCategory {return 'custom'}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface eventDebugMenuLogicValues {+ posthog: PostHog | null // toolbarConfigLogic+ activeFilteredEvents: EventType[]+ bufferedCount: number+ bufferedEvents: EventType[]+ events: EventType[]+ expandedEvent: string | null | undefined+ expandedProperties: Record<string, any> | never[]+ exportableEvents: object[]+ hidePostHogFlags: boolean+ hidePostHogProperties: boolean+ isCollapsedEventRow: (eventId: string | null | undefined) => boolean+ isPaused: boolean+ pinnedEventIds: Set<string>+ pinnedEvents: EventType[]+ relativeTimestamps: boolean+ searchFilteredEvents: EventType[]+ searchFilteredEventsCount: Record<EventCategory, number>+ searchText: string+ selectedEventTypes: EventCategory[]+ totalEventsCount: number+ unpinnedEvents: EventType[]+ visibleEvents: EventType[]+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface eventDebugMenuLogicActions {+ addEvent: (event: EventType) => {+ event: EventType+ }+ clearEvents: () => {+ value: true+ }+ exportEvents: () => {+ value: true+ }+ markExpanded: (id: string | null | undefined) => {+ id: string | null | undefined+ }+ setHidePostHogFlags: (hide: boolean) => {+ hide: boolean+ }+ setHidePostHogProperties: (hide: boolean) => {+ hide: boolean+ }+ setSearchText: (searchText: string) => {+ searchText: string+ }+ setSelectedEventType: (+ eventType: EventCategory,+ enabled: boolean+ ) => {+ enabled: boolean+ eventType: EventCategory+ }+ togglePaused: () => {+ value: true+ }+ togglePinnedEvent: (eventId: string) => {+ eventId: string+ }+ toggleRelativeTimestamps: () => {+ value: true+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface eventDebugMenuLogicMeta {+ __keaTypeGenInternalSelectorTypes: {+ isCollapsedEventRow: (+ expandedEvent: string | null | undefined+ ) => (eventId: string | null | undefined) => boolean+ visibleEvents: (events: EventType[], bufferedEvents: EventType[], isPaused: boolean) => EventType[]+ searchFilteredEvents: (visibleEvents: EventType[], searchText: string) => EventType[]+ searchFilteredEventsCount: (searchFilteredEvents: EventType[]) => Record<EventCategory, number>+ activeFilteredEvents: (selectedEventTypes: EventCategory[], searchFilteredEvents: EventType[]) => EventType[]+ totalEventsCount: (visibleEvents: EventType[]) => number+ bufferedCount: (bufferedEvents: EventType[]) => number+ pinnedEvents: (activeFilteredEvents: EventType[], pinnedEventIds: Set<string>) => EventType[]+ unpinnedEvents: (activeFilteredEvents: EventType[], pinnedEventIds: Set<string>) => EventType[]+ expandedProperties: (+ expandedEvent: string | null | undefined,+ events: EventType[],+ hidePostHogProperties: boolean,+ hidePostHogFlags: boolean+ ) => Record<string, any> | never[]+ exportableEvents: (activeFilteredEvents: EventType[]) => object[]+ }+}++export type eventDebugMenuLogicType = MakeLogicType<+ eventDebugMenuLogicValues,+ eventDebugMenuLogicActions,+ Record<string, any>,+ eventDebugMenuLogicMeta+>+export const eventDebugMenuLogic = kea<eventDebugMenuLogicType>([path(['toolbar', 'debug', 'eventDebugMenuLogic']),connect(() => ({@@ -151,7 +248,7 @@ export const eventDebugMenuLogic = kea<eventDebugMenuLogicType>([selectors({isCollapsedEventRow: [(s) => [s.expandedEvent],- (expandedEvent) => {+ (expandedEvent: string | null | undefined) => {return (eventId: string | null | undefined): boolean => {return eventId !== expandedEvent}@@ -160,7 +257,7 @@ export const eventDebugMenuLogic = kea<eventDebugMenuLogicType>([// When paused, show a frozen snapshot; when live, show all eventsvisibleEvents: [(s) => [s.events, s.bufferedEvents, s.isPaused],- (events, bufferedEvents, isPaused): EventType[] => {+ (events: EventType[], bufferedEvents: EventType[], isPaused: boolean): EventType[] => {if (isPaused) {// Show events minus anything buffered since pausereturn events.slice(bufferedEvents.length)@@ -170,7 +267,7 @@ export const eventDebugMenuLogic = kea<eventDebugMenuLogicType>([],searchFilteredEvents: [(s) => [s.visibleEvents, s.searchText],- (visibleEvents, searchText) => {+ (visibleEvents: EventType[], searchText: string) => {return visibleEvents.filter((e: EventType) => {if (searchText && !tryRegexMatch(e.event, searchText)) {return false@@ -181,7 +278,7 @@ export const eventDebugMenuLogic = kea<eventDebugMenuLogicType>([],searchFilteredEventsCount: [(s) => [s.searchFilteredEvents],- (searchFilteredEvents): Record<EventCategory, number> => {+ (searchFilteredEvents: EventType[]): Record<EventCategory, number> => {const counts: Record<EventCategory, number> = { posthog: 0, custom: 0, snapshot: 0 }searchFilteredEvents.forEach((e: EventType) => {counts[classifyEvent(e)] += 1@@ -192,20 +289,20 @@ export const eventDebugMenuLogic = kea<eventDebugMenuLogicType>([activeFilteredEvents: [(s) => [s.selectedEventTypes, s.searchFilteredEvents],- (selectedEventTypes, searchFilteredEvents) => {+ (selectedEventTypes: EventCategory[], searchFilteredEvents: EventType[]) => {return searchFilteredEvents.filter((e: EventType) => {return selectedEventTypes.includes(classifyEvent(e))})},],- totalEventsCount: [(s) => [s.visibleEvents], (visibleEvents): number => visibleEvents.length],+ totalEventsCount: [(s) => [s.visibleEvents], (visibleEvents: EventType[]): number => visibleEvents.length],- bufferedCount: [(s) => [s.bufferedEvents], (bufferedEvents): number => bufferedEvents.length],+ bufferedCount: [(s) => [s.bufferedEvents], (bufferedEvents: EventType[]): number => bufferedEvents.length],pinnedEvents: [(s) => [s.activeFilteredEvents, s.pinnedEventIds],- (activeFilteredEvents, pinnedEventIds): EventType[] => {+ (activeFilteredEvents: EventType[], pinnedEventIds: Set<string>): EventType[] => {if (pinnedEventIds.size === 0) {return []}@@ -215,7 +312,7 @@ export const eventDebugMenuLogic = kea<eventDebugMenuLogicType>([unpinnedEvents: [(s) => [s.activeFilteredEvents, s.pinnedEventIds],- (activeFilteredEvents, pinnedEventIds): EventType[] => {+ (activeFilteredEvents: EventType[], pinnedEventIds: Set<string>): EventType[] => {if (pinnedEventIds.size === 0) {return activeFilteredEvents}@@ -225,7 +322,12 @@ export const eventDebugMenuLogic = kea<eventDebugMenuLogicType>([expandedProperties: [(s) => [s.expandedEvent, s.events, s.hidePostHogProperties, s.hidePostHogFlags],- (expandedEvent, events, hidePostHogProperties, hidePostHogFlags) => {+ (+ expandedEvent: string | null | undefined,+ events: EventType[],+ hidePostHogProperties: boolean,+ hidePostHogFlags: boolean+ ) => {if (!expandedEvent) {return []}@@ -264,7 +366,7 @@ export const eventDebugMenuLogic = kea<eventDebugMenuLogicType>([exportableEvents: [(s) => [s.activeFilteredEvents],- (activeFilteredEvents): object[] => {+ (activeFilteredEvents: EventType[]): object[] => {return activeFilteredEvents.map((e: EventType) => ({event: e.event,timestamp: e.timestamp,diff --git a/frontend/src/toolbar/elements/elementsLogic.ts b/frontend/src/toolbar/elements/elementsLogic.tsindex a786fa958b36..bea0997d855d 100644--- a/frontend/src/toolbar/elements/elementsLogic.ts+++ b/frontend/src/toolbar/elements/elementsLogic.ts@@ -1,4 +1,4 @@-import { actions, connect, events, kea, listeners, path, reducers, selectors } from 'kea'+import { MakeLogicType, actions, connect, events, kea, listeners, path, reducers, selectors } from 'kea'import { collectAllElementsDeep } from 'query-selector-shadow-dom'import { EXPERIMENT_TARGET_SELECTOR } from 'lib/utils/actions'@@ -15,7 +15,6 @@ import { ActionType } from '~/types'import { elementToActionStep, getAllClickTargets, getElementForStep, getRectForElement } from '../utils'import { FragileSelectorResult, checkSelectorFragilityCached } from '../utils/selectorQuality'-import type { elementsLogicType } from './elementsLogicType'import { heatmapToolbarMenuLogic } from './heatmapToolbarMenuLogic'export type ActionElementMap = Map<HTMLElement, ActionElementWithMetadata[]>@@ -80,6 +79,217 @@ const getMaxZIndex = (element: Element): number => {return maxZIndex}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface elementsLogicValues {+ actionForm: ActionForm // actionsTabLogic+ href: string // currentPageLogic+ _actionElements: ElementWithMetadata[]+ _actionsForElementMap: ActionElementMap+ actionElements: ElementWithMetadata[]+ actionsForElementMap: ActionElementMap+ actionsListElements: ActionElementWithMetadata[]+ activeMeta:+ | (ElementWithMetadata & {+ selectorQuality: FragileSelectorResult | null+ })+ | null+ activeMetaIsSelected: boolean+ allInspectElements: HTMLElement[]+ displayActionElements: boolean+ elementMap: ElementMap+ elementsToDisplay: ElementWithMetadata[]+ elementsToDisplayRaw: ElementWithMetadata[]+ elementsWithActions: HTMLElement[]+ enabledLast: 'heatmap' | 'inspect' | null+ heatmapElements: ElementWithMetadata[]+ heatmapEnabled: boolean+ highlightElement: HTMLElement | null+ highlightElementMeta:+ | (ElementWithMetadata & {+ selectorQuality: FragileSelectorResult | null+ })+ | null+ hoverElement: HTMLElement | null+ hoverElementMeta:+ | (ElementWithMetadata & {+ selectorQuality: FragileSelectorResult | null+ })+ | null+ inspectElements: ElementWithMetadata[]+ inspectEnabled: boolean+ inspectEnabledRaw: boolean+ labelsToDisplay: ElementWithMetadata[]+ rectUpdateCounter: number+ relativePositionCompensation: number+ selectedElement: HTMLElement | null+ selectedElementMeta:+ | (ElementWithMetadata & {+ selectorQuality: FragileSelectorResult | null+ })+ | null+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface elementsLogicActions {+ newAction: (element?: HTMLElement | undefined) => {+ element: HTMLElement | null+ } // actionsTabLogic+ selectAction: (id: number | null) => {+ id: number | null+ } // actionsTabLogic+ createAction: (element: HTMLElement) => {+ element: HTMLElement+ }+ disableInspect: () => {+ value: true+ }+ enableInspect: () => {+ value: true+ }+ selectElement: (element: HTMLElement | null) => {+ element: HTMLElement | null+ }+ setHighlightElement: (element: HTMLElement | null) => {+ element: HTMLElement | null+ }+ setHoverElement: (element: HTMLElement | null) => {+ element: HTMLElement | null+ }+ setRelativePositionCompensation: (compensation: number) => {+ compensation: number+ }+ setSelectedElement: (element: HTMLElement | null) => {+ element: HTMLElement | null+ }+ updateRects: () => {+ value: true+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface elementsLogicMeta {+ __keaTypeGenInternalSelectorTypes: {+ activeMetaIsSelected: (+ selectedElementMeta:+ | (ElementWithMetadata & {+ selectorQuality: FragileSelectorResult | null+ })+ | null,+ activeMeta:+ | (ElementWithMetadata & {+ selectorQuality: FragileSelectorResult | null+ })+ | null+ ) => boolean+ inspectEnabled: (+ inspectEnabledRaw: boolean,+ inspectingElement: number | null,+ buttonActionsVisible: boolean,+ inspectingElement2: number | null+ ) => boolean+ heatmapEnabled: (heatmapEnabled: boolean) => boolean+ heatmapElements: (+ countedElements: import('~/toolbar/types').CountedHTMLElement[],+ rectUpdateCounter: number,+ buttonVisible: boolean+ ) => ElementWithMetadata[]+ allInspectElements: (inspectEnabled: boolean, href: string) => HTMLElement[]+ inspectElements: (+ allInspectElements: HTMLElement[],+ rectUpdateCounter: number,+ buttonVisible: boolean+ ) => ElementWithMetadata[]+ displayActionElements: (buttonActionsVisible: boolean) => boolean+ _actionElements: (displayActionElements: boolean, actionForm: ActionForm) => ElementWithMetadata[]+ actionElements: (+ _actionElements: ElementWithMetadata[],+ rectUpdateCounter: number,+ buttonVisible: boolean+ ) => ElementWithMetadata[]+ elementMap: (+ heatmapElements: ElementWithMetadata[],+ inspectElements: ElementWithMetadata[],+ actionElements: ElementWithMetadata[],+ actionsListElements: ActionElementWithMetadata[]+ ) => ElementMap+ _actionsForElementMap: (sortedActions: ActionType[]) => ActionElementMap+ actionsForElementMap: (+ _actionsForElementMap: ActionElementMap,+ rectUpdateCounter: number,+ buttonVisible: boolean+ ) => ActionElementMap+ elementsWithActions: (actionsForElementMap: ActionElementMap) => HTMLElement[]+ actionsListElements: (actionsForElementMap: ActionElementMap) => ActionElementWithMetadata[]+ elementsToDisplayRaw: (+ displayActionElements: boolean,+ actionElements: ElementWithMetadata[],+ inspectElements: ElementWithMetadata[],+ actionsListElements: ActionElementWithMetadata[],+ selectedAction: ActionType | null | import('~/toolbar/types').ActionDraftType+ ) => ElementWithMetadata[]+ elementsToDisplay: (elementsToDisplayRaw: ElementWithMetadata[]) => ElementWithMetadata[]+ labelsToDisplay: (+ displayActionElements: boolean,+ actionElements: ElementWithMetadata[],+ actionsListElements: ActionElementWithMetadata[],+ selectedAction: ActionType | null | import('~/toolbar/types').ActionDraftType+ ) => ElementWithMetadata[]+ selectedElementMeta: (+ selectedElement: HTMLElement | null,+ elementMap: ElementMap,+ actionsForElementMap: ActionElementMap,+ dataAttributes: string[]+ ) =>+ | (ElementWithMetadata & {+ selectorQuality: FragileSelectorResult | null+ })+ | null+ hoverElementMeta: (+ hoverElement: HTMLElement | null,+ elementMap: ElementMap,+ actionsForElementMap: ActionElementMap,+ dataAttributes: string[]+ ) =>+ | (ElementWithMetadata & {+ selectorQuality: FragileSelectorResult | null+ })+ | null+ highlightElementMeta: (+ highlightElement: HTMLElement | null,+ elementMap: ElementMap,+ actionsForElementMap: ActionElementMap,+ dataAttributes: string[]+ ) =>+ | (ElementWithMetadata & {+ selectorQuality: FragileSelectorResult | null+ })+ | null+ activeMeta: (+ selectedElementMeta:+ | (ElementWithMetadata & {+ selectorQuality: FragileSelectorResult | null+ })+ | null,+ hoverElementMeta:+ | (ElementWithMetadata & {+ selectorQuality: FragileSelectorResult | null+ })+ | null+ ) =>+ | (ElementWithMetadata & {+ selectorQuality: FragileSelectorResult | null+ })+ | null+ }+}++export type elementsLogicType = MakeLogicType<+ elementsLogicValues,+ elementsLogicActions,+ Record<string, any>,+ elementsLogicMeta+>+export const elementsLogic = kea<elementsLogicType>([path(['toolbar', 'elements', 'elementsLogic']),@@ -166,7 +376,18 @@ export const elementsLogic = kea<elementsLogicType>([selectors({activeMetaIsSelected: [(s) => [s.selectedElementMeta, s.activeMeta],- (selectedElementMeta, activeMeta) => {+ (+ selectedElementMeta:+ | (ElementWithMetadata & {+ selectorQuality: FragileSelectorResult | null+ })+ | null,+ activeMeta:+ | (ElementWithMetadata & {+ selectorQuality: FragileSelectorResult | null+ })+ | null+ ) => {return !!selectedElementMeta && !!activeMeta && selectedElementMeta.element === activeMeta.element},],@@ -178,10 +399,10 @@ export const elementsLogic = kea<elementsLogicType>([experimentsTabLogic.selectors.inspectingElement,],(- inspectEnabledRaw,- actionsInspectingElement,- actionsButtonActionsVisible,- experimentsInspectingElement+ inspectEnabledRaw: boolean,+ actionsInspectingElement: number | null,+ actionsButtonActionsVisible: boolean,+ experimentsInspectingElement: number | null) => {return (inspectEnabledRaw ||@@ -191,7 +412,10 @@ export const elementsLogic = kea<elementsLogicType>([},],- heatmapEnabled: [() => [heatmapToolbarMenuLogic.selectors.heatmapEnabled], (heatmapEnabled) => heatmapEnabled],+ heatmapEnabled: [+ () => [heatmapToolbarMenuLogic.selectors.heatmapEnabled],+ (heatmapEnabled: boolean) => heatmapEnabled,+ ],heatmapElements: [(s) => [@@ -199,7 +423,7 @@ export const elementsLogic = kea<elementsLogicType>([s.rectUpdateCounter,toolbarConfigLogic.selectors.buttonVisible,],- (countedElements) => {+ (countedElements: import('~/toolbar/types').CountedHTMLElement[]) => {const windowHeight = window.innerHeightconst result: ElementWithMetadata[] = []@@ -223,7 +447,7 @@ export const elementsLogic = kea<elementsLogicType>([allInspectElements: [(s) => [s.inspectEnabled, s.href],- (inspectEnabled) => {+ (inspectEnabled: boolean) => {if (!inspectEnabled) {return []}@@ -239,7 +463,7 @@ export const elementsLogic = kea<elementsLogicType>([inspectElements: [(s) => [s.allInspectElements, s.rectUpdateCounter, toolbarConfigLogic.selectors.buttonVisible],- (allInspectElements) =>+ (allInspectElements: HTMLElement[]) =>allInspectElements.map((element) =>@@ -253,7 +477,7 @@ export const elementsLogic = kea<elementsLogicType>([displayActionElements: [() => [actionsTabLogic.selectors.buttonActionsVisible],- (buttonActionsVisible) => {+ (buttonActionsVisible: boolean) => {return buttonActionsVisible},],@@ -281,7 +505,7 @@ export const elementsLogic = kea<elementsLogicType>([actionElements: [(s) => [s._actionElements, s.rectUpdateCounter, toolbarConfigLogic.selectors.buttonVisible],- (actionElements) =>+ (actionElements: ElementWithMetadata[]) =>actionElements.map((element) =>element.element ? { ...element, rect: getRectForElement(element.element) } : element),@@ -289,7 +513,12 @@ export const elementsLogic = kea<elementsLogicType>([elementMap: [(s) => [s.heatmapElements, s.inspectElements, s.actionElements, s.actionsListElements],- (heatmapElements, inspectElements, actionElements, actionsListElements): ElementMap => {+ (+ heatmapElements: ElementWithMetadata[],+ inspectElements: ElementWithMetadata[],+ actionElements: ElementWithMetadata[],+ actionsListElements: ActionElementWithMetadata[]+ ): ElementMap => {const elementMap = new Map<HTMLElement, ElementWithMetadata>()const addElements = (e: ElementWithMetadata): void => {@@ -337,7 +566,7 @@ export const elementsLogic = kea<elementsLogicType>([actionsForElementMap: [(s) => [s._actionsForElementMap, s.rectUpdateCounter, toolbarConfigLogic.selectors.buttonVisible],- (actionsForElementMap): ActionElementMap => {+ (actionsForElementMap: ActionElementMap): ActionElementMap => {// We recalculate the rects here to avoid calling the expensive getElementForStepactionsForElementMap.forEach((actions, element) => {actions.forEach((action) => {@@ -351,12 +580,12 @@ export const elementsLogic = kea<elementsLogicType>([elementsWithActions: [(s) => [s.actionsForElementMap],- (actionsForElementMap) => [...(actionsForElementMap.keys() as unknown as HTMLElement[])],+ (actionsForElementMap: ActionElementMap) => [...(actionsForElementMap.keys() as unknown as HTMLElement[])],],actionsListElements: [(s) => [s.actionsForElementMap],- (actionsForElementMap) =>+ (actionsForElementMap: ActionElementMap) =>[...(actionsForElementMap.values() as unknown as ActionElementWithMetadata[][])].map((a) => a[0]),],@@ -368,7 +597,13 @@ export const elementsLogic = kea<elementsLogicType>([s.actionsListElements,actionsTabLogic.selectors.selectedAction,],- (displayActionElements, actionElements, inspectElements, actionsListElements, selectedAction) => {+ (+ displayActionElements: boolean,+ actionElements: ElementWithMetadata[],+ inspectElements: ElementWithMetadata[],+ actionsListElements: ActionElementWithMetadata[],+ selectedAction: ActionType | null | import('~/toolbar/types').ActionDraftType+ ) => {if (inspectElements.length > 0) {return inspectElements}@@ -384,7 +619,7 @@ export const elementsLogic = kea<elementsLogicType>([elementsToDisplay: [(s) => [s.elementsToDisplayRaw],- (elementsToDisplayRaw) => {+ (elementsToDisplayRaw: ElementWithMetadata[]) => {const result: ElementWithMetadata[] = []elementsToDisplayRaw.forEach((element) => {const { rect, visible } = element@@ -410,7 +645,12 @@ export const elementsLogic = kea<elementsLogicType>([s.actionsListElements,actionsTabLogic.selectors.selectedAction,],- (displayActionElements, actionElements, actionsListElements, selectedAction) => {+ (+ displayActionElements: boolean,+ actionElements: ElementWithMetadata[],+ actionsListElements: ActionElementWithMetadata[],+ selectedAction: ActionType | null | import('~/toolbar/types').ActionDraftType+ ) => {if (displayActionElements && selectedAction && actionElements.length > 0) {return actionElements}@@ -428,14 +668,22 @@ export const elementsLogic = kea<elementsLogicType>([s.actionsForElementMap,toolbarConfigLogic.selectors.dataAttributes,],- (selectedElement, elementMap, actionsForElementMap, dataAttributes) =>- getElementMetaWithSelectorQuality(selectedElement, elementMap, actionsForElementMap, dataAttributes),+ (+ selectedElement: HTMLElement | null,+ elementMap: ElementMap,+ actionsForElementMap: ActionElementMap,+ dataAttributes: string[]+ ) => getElementMetaWithSelectorQuality(selectedElement, elementMap, actionsForElementMap, dataAttributes),],hoverElementMeta: [(s) => [s.hoverElement, s.elementMap, s.actionsForElementMap, toolbarConfigLogic.selectors.dataAttributes],- (hoverElement, elementMap, actionsForElementMap, dataAttributes) =>- getElementMetaWithSelectorQuality(hoverElement, elementMap, actionsForElementMap, dataAttributes),+ (+ hoverElement: HTMLElement | null,+ elementMap: ElementMap,+ actionsForElementMap: ActionElementMap,+ dataAttributes: string[]+ ) => getElementMetaWithSelectorQuality(hoverElement, elementMap, actionsForElementMap, dataAttributes),],highlightElementMeta: [@@ -445,12 +693,27 @@ export const elementsLogic = kea<elementsLogicType>([s.actionsForElementMap,toolbarConfigLogic.selectors.dataAttributes,],- (highlightElement, elementMap, actionsForElementMap, dataAttributes) =>- getElementMetaWithSelectorQuality(highlightElement, elementMap, actionsForElementMap, dataAttributes),+ (+ highlightElement: HTMLElement | null,+ elementMap: ElementMap,+ actionsForElementMap: ActionElementMap,+ dataAttributes: string[]+ ) => getElementMetaWithSelectorQuality(highlightElement, elementMap, actionsForElementMap, dataAttributes),],activeMeta: [(s) => [s.selectedElementMeta, s.hoverElementMeta],- (selectedElementMeta, hoverElementMeta) => {+ (+ selectedElementMeta:+ | (ElementWithMetadata & {+ selectorQuality: FragileSelectorResult | null+ })+ | null,+ hoverElementMeta:+ | (ElementWithMetadata & {+ selectorQuality: FragileSelectorResult | null+ })+ | null+ ) => {return selectedElementMeta || hoverElementMeta},],diff --git a/frontend/src/toolbar/elements/heatmapToolbarMenuLogic.ts b/frontend/src/toolbar/elements/heatmapToolbarMenuLogic.tsindex 8c16b51d8292..939fb6c808a0 100644--- a/frontend/src/toolbar/elements/heatmapToolbarMenuLogic.ts+++ b/frontend/src/toolbar/elements/heatmapToolbarMenuLogic.ts@@ -1,4 +1,15 @@-import { actions, afterMount, beforeUnmount, connect, kea, listeners, path, reducers, selectors } from 'kea'+import {+ MakeLogicType,+ actions,+ afterMount,+ beforeUnmount,+ connect,+ kea,+ listeners,+ path,+ reducers,+ selectors,+} from 'kea'import { loaders } from 'kea-loaders'import { subscriptions } from 'kea-subscriptions'import { windowValues } from 'kea-window-values'@@ -34,7 +45,9 @@ import {} from '~/toolbar/utils'import { AnyPropertyFilter, PropertyFilterType, PropertyOperator } from '~/types'-import type { heatmapToolbarMenuLogicType } from './heatmapToolbarMenuLogicType'+import type { HrefMatchType } from '../../lib/components/heatmaps/heatmapDataLogic'+import type { CommonFilters, HeatmapFilters, HeatmapFixedPositionMode } from '../../lib/components/heatmaps/types'+import type { HeatmapElement, HeatmapResponseType } from '../types'export const doesVersionSupportScrollDepth = createVersionChecker('1.99')@@ -323,6 +336,320 @@ const emptyElementsStatsPages: PaginatedResponse<ElementsEventType> = {results: [],}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface heatmapToolbarMenuLogicValues {+ href: string // currentPageLogic+ wildcardHref: string // currentPageLogic+ commonFilters: CommonFilters // heatmapDataLogic+ dateRange: string | null // heatmapDataLogic+ heatmapColorPalette: string | null // heatmapDataLogic+ heatmapElements: HeatmapElement[] // heatmapDataLogic+ heatmapFilters: HeatmapFilters // heatmapDataLogic+ heatmapFixedPositionMode: HeatmapFixedPositionMode // heatmapDataLogic+ heatmapTooltipLabel: string // heatmapDataLogic+ rawHeatmapLoading: boolean // heatmapDataLogic+ viewportRange: {+ max: number+ min: number+ } // heatmapDataLogic+ posthog: PostHog | null // toolbarConfigLogic+ areaCandidates: HTMLElement[]+ areaHoverAnchor: HTMLElement | null+ areaHoverElement: HTMLElement | null+ areaHoverStepped: boolean+ areaSelectionActive: boolean+ canLoadMoreElementStats: boolean+ clickCount: number+ clickmapsEnabled: boolean+ countedElements: CountedHTMLElement[]+ elementCount: number+ elementMetrics: Map<+ HTMLElement,+ {+ visible: boolean+ }+ >+ elementStats: PaginatedResponse<ElementsEventType> | null+ elementStatsLoading: boolean+ elementsLoading: boolean+ heatmapAreaFilter: {+ element: HTMLElement+ selector: string | null+ } | null+ heatmapEnabled: boolean+ highestClickCount: number+ isRefreshing: boolean+ lastElementStatsRequest: {+ limit: number+ url: string | null+ } | null+ loadedElementStatsCount: number+ matchLinksByHref: boolean+ processedElements: CountedHTMLElement[]+ processingInputs: {+ clickmapsEnabled: boolean+ dataAttributes: string[]+ elementStats: PaginatedResponse<ElementsEventType> | null+ heatmapAreaFilter: {+ element: HTMLElement+ selector: string | null+ } | null+ href: string+ matchLinksByHref: boolean+ }+ processingProgress: {+ processed: number+ total: number+ } | null+ samplingFactor: number+ scrollDepthPosthogJsError: 'disabled' | 'version' | null+ wantedDataAttributes: string[]+ windowHeight: number+ windowWidth: number+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface heatmapToolbarMenuLogicActions {+ setHref: (href: string) => {+ href: string+ } // currentPageLogic+ setWildcardHref: (href: string) => {+ href: string+ } // currentPageLogic+ loadHeatmap: () => {+ value: true+ } // heatmapDataLogic+ loadHeatmapFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ } // heatmapDataLogic+ loadHeatmapSuccess: (+ rawHeatmap: HeatmapResponseType | null,+ payload?:+ | {+ value: true+ }+ | undefined+ ) => {+ payload?: {+ value: true+ }+ rawHeatmap: HeatmapResponseType | null+ } // heatmapDataLogic+ patchHeatmapFilters: (filters: Partial<HeatmapFilters>) => {+ filters: Partial<HeatmapFilters>+ } // heatmapDataLogic+ resetHeatmapData: () => any // heatmapDataLogic+ setCommonFilters: (filters: CommonFilters) => {+ filters: CommonFilters+ } // heatmapDataLogic+ setDataHref: (href: string) => {+ href: string+ } // heatmapDataLogic+ setHeatmapBoundsFilter: (boundsFilter: HeatmapBoundsFilter | null) => {+ boundsFilter: HeatmapBoundsFilter | null+ } // heatmapDataLogic+ setHeatmapColorPalette: (palette: string | null) => {+ palette: string | null+ } // heatmapDataLogic+ setHeatmapFixedPositionMode: (mode: HeatmapFixedPositionMode) => {+ mode: HeatmapFixedPositionMode+ } // heatmapDataLogic+ setHrefMatchType: (matchType: HrefMatchType) => {+ matchType: HrefMatchType+ } // heatmapDataLogic+ cancelAreaSelection: () => {+ value: true+ }+ disableHeatmap: () => {+ value: true+ }+ enableHeatmap: () => {+ value: true+ }+ getElementStats: (+ url?: string | null,+ limit?: number+ ) => {+ limit: number | undefined+ url: string | null | undefined+ }+ getElementStatsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ getElementStatsSuccess: (+ elementStats: PaginatedResponse<ElementsEventType>,+ payload?: {+ limit: number | undefined+ url: string | null | undefined+ }+ ) => {+ elementStats: PaginatedResponse<ElementsEventType>+ payload?: {+ limit: number | undefined+ url: string | null | undefined+ }+ }+ loadAllEnabled: () => {+ value: true+ }+ loadMoreElementStats: () => {+ value: true+ }+ maybeLoadClickmap: () => {+ value: true+ }+ maybeLoadHeatmap: () => {+ value: true+ }+ processElements: (trigger: ClickmapProcessingTrigger) => {+ trigger: ClickmapProcessingTrigger+ }+ rebindAreaElement: (element: HTMLElement) => {+ element: HTMLElement+ }+ refreshClickmap: () => {+ value: true+ }+ resetElementStats: () => any+ resetElementStatsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ resetElementStatsSuccess: (+ elementStats: PaginatedResponse<ElementsEventType>,+ payload?: any+ ) => {+ elementStats: PaginatedResponse<ElementsEventType>+ payload?: any+ }+ selectHeatmapAreaFilter: (element: HTMLElement | null) => {+ element: HTMLElement | null+ }+ setAreaCandidates: (candidates: HTMLElement[]) => {+ candidates: HTMLElement[]+ }+ setAreaHover: (+ anchor: HTMLElement,+ candidate: HTMLElement+ ) => {+ anchor: HTMLElement+ candidate: HTMLElement+ }+ setAreaHoverCandidate: (candidate: HTMLElement) => {+ candidate: HTMLElement+ }+ setElementsLoading: (loading: boolean) => {+ loading: boolean+ }+ setHeatmapAreaFilter: (+ element: HTMLElement | null,+ selector: string | null+ ) => {+ element: HTMLElement | null+ selector: string | null+ }+ setIsRefreshing: (isRefreshing: boolean) => {+ isRefreshing: boolean+ }+ setMatchLinksByHref: (matchLinksByHref: boolean) => {+ matchLinksByHref: boolean+ }+ setProcessedElements: (elements: CountedHTMLElement[]) => {+ elements: CountedHTMLElement[]+ }+ setProcessingProgress: (+ processed: number,+ total: number+ ) => {+ processed: number+ total: number+ }+ setSamplingFactor: (samplingFactor: number) => {+ samplingFactor: number+ }+ startAreaSelection: () => {+ value: true+ }+ startElementObservation: () => {+ value: true+ }+ stepAreaHover: (direction: 'down' | 'up') => {+ direction: 'down' | 'up'+ }+ stopElementObservation: () => {+ value: true+ }+ toggleClickmapsEnabled: (enabled: boolean) => {+ enabled: boolean+ }+ updateAreaBounds: () => {+ value: true+ }+ updateElementMetrics: (observedElements: [HTMLElement, boolean][]) => {+ observedElements: [HTMLElement, boolean][]+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface heatmapToolbarMenuLogicMeta {+ __keaTypeGenInternalSelectorTypes: {+ countedElements: (+ processedElements: CountedHTMLElement[],+ elementMetrics: Map<+ HTMLElement,+ {+ visible: boolean+ }+ >+ ) => CountedHTMLElement[]+ elementCount: (countedElements: CountedHTMLElement[]) => number+ loadedElementStatsCount: (elementStats: PaginatedResponse<ElementsEventType> | null) => number+ wantedDataAttributes: (dataAttributes: string[]) => string[]+ clickCount: (countedElements: CountedHTMLElement[]) => number+ highestClickCount: (countedElements: CountedHTMLElement[]) => number+ scrollDepthPosthogJsError: (posthog: PostHog | null) => 'disabled' | 'version' | null+ processingInputs: (+ elementStats: PaginatedResponse<ElementsEventType> | null,+ dataAttributes: string[],+ href: string,+ matchLinksByHref: boolean,+ clickmapsEnabled: boolean,+ heatmapAreaFilter: {+ element: HTMLElement+ selector: string | null+ } | null+ ) => {+ clickmapsEnabled: boolean+ dataAttributes: string[]+ elementStats: PaginatedResponse<ElementsEventType> | null+ heatmapAreaFilter: {+ element: HTMLElement+ selector: string | null+ } | null+ href: string+ matchLinksByHref: boolean+ }+ }+}++export type heatmapToolbarMenuLogicType = MakeLogicType<+ heatmapToolbarMenuLogicValues,+ heatmapToolbarMenuLogicActions,+ Record<string, any>,+ heatmapToolbarMenuLogicMeta+>+export const heatmapToolbarMenuLogic = kea<heatmapToolbarMenuLogicType>([path(['toolbar', 'elements', 'heatmapToolbarMenuLogic']),connect(() => ({@@ -625,15 +952,26 @@ export const heatmapToolbarMenuLogic = kea<heatmapToolbarMenuLogicType>([selectors(() => ({countedElements: [(s) => [s.processedElements, s.elementMetrics],- (processedElements, elementMetrics) => {+ (+ processedElements: CountedHTMLElement[],+ elementMetrics: Map<+ HTMLElement,+ {+ visible: boolean+ }+ >+ ) => {return processedElements.map((el: CountedHTMLElement) => {const metrics = elementMetrics.get(el.element)return metrics ? { ...el, visible: metrics.visible } : el})},],- elementCount: [(s) => [s.countedElements], (countedElements) => countedElements.length],- loadedElementStatsCount: [(s) => [s.elementStats], (elementStats) => elementStats?.results?.length ?? 0],+ elementCount: [(s) => [s.countedElements], (countedElements: CountedHTMLElement[]) => countedElements.length],+ loadedElementStatsCount: [+ (s) => [s.elementStats],+ (elementStats: PaginatedResponse<ElementsEventType> | null) => elementStats?.results?.length ?? 0,+ ],// isTooSimple always reads attr__data-attr, so request it alongside the configured data// attributes — first, so it survives the server's entry cap however many are configuredwantedDataAttributes: [@@ -642,11 +980,12 @@ export const heatmapToolbarMenuLogic = kea<heatmapToolbarMenuLogicType>([],clickCount: [(s) => [s.countedElements],- (countedElements) => (countedElements ? countedElements.map((e) => e.count).reduce((a, b) => a + b, 0) : 0),+ (countedElements: CountedHTMLElement[]) =>+ countedElements ? countedElements.map((e) => e.count).reduce((a, b) => a + b, 0) : 0,],highestClickCount: [(s) => [s.countedElements],- (countedElements) =>+ (countedElements: CountedHTMLElement[]) =>countedElements ? countedElements.map((e) => e.count).reduce((a, b) => (b > a ? b : a), 0) : 0,],@@ -681,7 +1020,17 @@ export const heatmapToolbarMenuLogic = kea<heatmapToolbarMenuLogicType>([s.clickmapsEnabled,s.heatmapAreaFilter,],- (elementStats, dataAttributes, href, matchLinksByHref, clickmapsEnabled, heatmapAreaFilter) => ({+ (+ elementStats: PaginatedResponse<ElementsEventType> | null,+ dataAttributes: string[],+ href: string,+ matchLinksByHref: boolean,+ clickmapsEnabled: boolean,+ heatmapAreaFilter: {+ element: HTMLElement+ selector: string | null+ } | null+ ) => ({elementStats,dataAttributes,href,diff --git a/frontend/src/toolbar/experiments/experimentsLogic.ts b/frontend/src/toolbar/experiments/experimentsLogic.tsindex 0e831447578f..69286a1a1daf 100644--- a/frontend/src/toolbar/experiments/experimentsLogic.ts+++ b/frontend/src/toolbar/experiments/experimentsLogic.ts@@ -1,4 +1,4 @@-import { actions, kea, path, reducers, selectors } from 'kea'+import { MakeLogicType, actions, kea, path, reducers, selectors } from 'kea'import { loaders } from 'kea-loaders'import { createFuse } from 'lib/utils/fuseSearch'@@ -7,7 +7,93 @@ import { permanentlyMount } from 'lib/utils/kea-logic-builders'import { toolbarApi } from '~/toolbar/toolbarApi'import { WebExperiment } from '~/toolbar/types'-import type { experimentsLogicType } from './experimentsLogicType'+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface experimentsLogicValues {+ allExperiments: WebExperiment[]+ allExperimentsLoading: boolean+ experimentCount: number+ searchTerm: string+ sortedExperiments: WebExperiment[]+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface experimentsLogicActions {+ deleteExperiment: ({ id }: { id: number }) => {+ id: number+ }+ deleteExperimentFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ deleteExperimentSuccess: (+ allExperiments: WebExperiment[],+ payload?: {+ id: number+ }+ ) => {+ allExperiments: WebExperiment[]+ payload?: {+ id: number+ }+ }+ getExperiments: (_?: any) => any+ getExperimentsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ getExperimentsSuccess: (+ allExperiments: WebExperiment[],+ payload?: any+ ) => {+ allExperiments: WebExperiment[]+ payload?: any+ }+ setSearchTerm: (searchTerm: string) => {+ searchTerm: string+ }+ updateExperiment: ({ experiment }: { experiment: WebExperiment }) => {+ experiment: WebExperiment+ }+ updateExperimentFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ updateExperimentSuccess: (+ allExperiments: WebExperiment[],+ payload?: {+ experiment: WebExperiment+ }+ ) => {+ allExperiments: WebExperiment[]+ payload?: {+ experiment: WebExperiment+ }+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface experimentsLogicMeta {+ __keaTypeGenInternalSelectorTypes: {+ sortedExperiments: (allExperiments: WebExperiment[], searchTerm: string) => WebExperiment[]+ experimentCount: (allExperiments: WebExperiment[]) => number+ }+}++export type experimentsLogicType = MakeLogicType<+ experimentsLogicValues,+ experimentsLogicActions,+ Record<string, any>,+ experimentsLogicMeta+>export const experimentsLogic = kea<experimentsLogicType>([path(['toolbar', 'experiments', 'experimentsLogic']),@@ -53,7 +139,7 @@ export const experimentsLogic = kea<experimentsLogicType>([selectors({sortedExperiments: [(s) => [s.allExperiments, s.searchTerm],- (allExperiments, searchTerm) => {+ (allExperiments: WebExperiment[], searchTerm: string) => {const filteredExperiments = searchTerm? createFuse(allExperiments, {keys: ['name'],@@ -64,7 +150,7 @@ export const experimentsLogic = kea<experimentsLogicType>([return [...filteredExperiments]},],- experimentCount: [(s) => [s.allExperiments], (allExperiments) => allExperiments.length],+ experimentCount: [(s) => [s.allExperiments], (allExperiments: WebExperiment[]) => allExperiments.length],}),permanentlyMount(),])diff --git a/frontend/src/toolbar/experiments/experimentsTabLogic.tsx b/frontend/src/toolbar/experiments/experimentsTabLogic.tsxindex 799babf0bf57..778e6725d815 100644--- a/frontend/src/toolbar/experiments/experimentsTabLogic.tsx+++ b/frontend/src/toolbar/experiments/experimentsTabLogic.tsx@@ -1,5 +1,6 @@-import { actions, connect, events, kea, listeners, path, reducers, selectors } from 'kea'+import { MakeLogicType, actions, connect, events, kea, listeners, path, reducers, selectors } from 'kea'import { forms } from 'kea-forms'+import type { DeepPartial, DeepPartialMap, FieldName, ValidationErrorType } from 'kea-forms'import { subscriptions } from 'kea-subscriptions'import { lemonToast } from 'lib/lemon-ui/LemonToast/LemonToast'@@ -21,7 +22,7 @@ import { urls } from '~/toolbar/urls'import { elementToQuery, isLaunched, joinWithUiHost, percentageDistribution } from '~/toolbar/utils'import { Experiment, ExperimentIdType } from '~/types'-import type { experimentsTabLogicType } from './experimentsTabLogicType'+import type { ToolbarUserIntent } from '../../types'function newExperiment(): WebExperimentForm {return {@@ -60,6 +61,174 @@ export const ElementSelectorButtonTypes = {images: 'Images',}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface experimentsTabLogicValues {+ allExperiments: WebExperiment[] // experimentsLogic+ buttonVisible: boolean // toolbarConfigLogic+ dataAttributes: string[] // toolbarConfigLogic+ experimentId: ExperimentIdType | null // toolbarConfigLogic+ uiHost: string // toolbarConfigLogic+ userIntent: ToolbarUserIntent | null // toolbarConfigLogic+ addVariantAvailable: boolean | undefined+ buttonExperimentsVisible: boolean+ elementSelector: string+ experimentForm: WebExperimentForm+ experimentFormAllErrors: Record<string, any>+ experimentFormChanged: boolean+ experimentFormErrors: DeepPartialMap<WebExperimentForm, ValidationErrorType>+ experimentFormHasErrors: boolean+ experimentFormManualErrors: Record<string, any>+ experimentFormTouched: boolean+ experimentFormTouches: Record<string, boolean>+ experimentFormValidationErrors: DeepPartialMap<WebExperimentForm, ValidationErrorType>+ inspectingElement: number | null+ isExperimentFormSubmitting: boolean+ isExperimentFormValid: boolean+ newExperimentForElement: HTMLElement | null+ removeVariantAvailable: boolean | undefined+ selectedElementType: string+ selectedExperiment: Experiment | WebExperimentDraftType | null+ selectedExperimentId: number | 'new' | 'web' | null+ selectedVariant: string+ showExperimentFormErrors: boolean+ showExperimentsTooltip: boolean+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface experimentsTabLogicActions {+ getExperiments: (_?: any) => any // experimentsLogic+ addNewTransformation: (variant: string) => {+ variant: string+ }+ addNewVariant: () => {}+ applyVariant: (newVariantKey: string) => {+ newVariantKey: string+ }+ editSelectorWithIndex: (+ variant: string,+ index: number | null+ ) => {+ index: number | null+ variant: string+ }+ hideButtonExperiments: () => {+ value: true+ }+ inspectElementSelected: (+ element: HTMLElement,+ variant: string,+ index: number | null,+ selector?: string | null+ ) => {+ element: HTMLElement+ index: number | null+ selector: string | null | undefined+ variant: string+ }+ inspectForElementWithIndex: (+ variant: string,+ type: ElementSelectorType,+ index: number | null+ ) => {+ index: number | null+ type: ElementSelectorType+ variant: string+ }+ newExperiment: (element?: HTMLElement) => {+ element: HTMLElement | null+ }+ rebalanceRolloutPercentage: () => {}+ removeElement: (+ variant: string,+ index: number+ ) => {+ index: number+ variant: string+ }+ removeVariant: (variant: string) => {+ variant: string+ }+ resetExperimentForm: (values?: WebExperimentForm) => {+ values?: WebExperimentForm+ }+ saveExperiment: (formValues: WebExperimentForm) => {+ formValues: WebExperimentForm+ }+ selectElementType: (elementType: ElementSelectorType) => {+ elementType: ElementSelectorType+ }+ selectExperiment: (id: ExperimentIdType | null) => {+ id: ExperimentIdType | null+ }+ selectVariant: (variant: string) => {+ variant: string+ }+ setElementSelector: (+ selector: string,+ index: number+ ) => {+ index: number+ selector: string+ }+ setExperimentFormManualErrors: (errors: Record<string, any>) => {+ errors: Record<string, any>+ }+ setExperimentFormValue: (+ key: FieldName,+ value: any+ ) => {+ name: FieldName+ value: any+ }+ setExperimentFormValues: (values: DeepPartial<WebExperimentForm>) => {+ values: DeepPartial<WebExperimentForm>+ }+ setShowExperimentsTooltip: (showExperimentsTooltip: boolean) => {+ showExperimentsTooltip: boolean+ }+ showButtonExperiments: () => {+ value: true+ }+ submitExperimentForm: () => {+ value: boolean+ }+ submitExperimentFormFailure: (+ error: Error,+ errors: Record<string, any>+ ) => {+ error: Error+ errors: Record<string, any>+ }+ submitExperimentFormRequest: (experimentForm: WebExperimentForm) => {+ experimentForm: WebExperimentForm+ }+ submitExperimentFormSuccess: (experimentForm: WebExperimentForm) => {+ experimentForm: WebExperimentForm+ }+ touchExperimentFormField: (key: string) => {+ key: string+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface experimentsTabLogicMeta {+ __keaTypeGenInternalSelectorTypes: {+ removeVariantAvailable: (experimentForm: WebExperimentForm) => boolean | undefined+ addVariantAvailable: (experimentForm: WebExperimentForm) => boolean | undefined+ selectedExperiment: (+ selectedExperimentId: number | 'new' | 'web' | null,+ allExperiments: WebExperiment[]+ ) => Experiment | WebExperimentDraftType | null+ }+}++export type experimentsTabLogicType = MakeLogicType<+ experimentsTabLogicValues,+ experimentsTabLogicActions,+ Record<string, any>,+ experimentsTabLogicMeta+>+export const experimentsTabLogic = kea<experimentsTabLogicType>([path(['toolbar', 'experiments', 'experimentsTabLogic']),actions({@@ -250,7 +419,10 @@ export const experimentsTabLogic = kea<experimentsTabLogicType>([],selectedExperiment: [(s) => [s.selectedExperimentId, s.allExperiments],- (selectedExperimentId, allExperiments: WebExperiment[]): Experiment | WebExperimentDraftType | null => {+ (+ selectedExperimentId: number | 'new' | 'web' | null,+ allExperiments: WebExperiment[]+ ): Experiment | WebExperimentDraftType | null => {if (selectedExperimentId === 'new') {return newExperiment()}diff --git a/frontend/src/toolbar/field-notes/fieldNotesLogic.ts b/frontend/src/toolbar/field-notes/fieldNotesLogic.tsindex 23188d657642..2414a5077e65 100644--- a/frontend/src/toolbar/field-notes/fieldNotesLogic.ts+++ b/frontend/src/toolbar/field-notes/fieldNotesLogic.ts@@ -1,4 +1,4 @@-import { actions, connect, events, kea, listeners, path, reducers, selectors } from 'kea'+import { MakeLogicType, actions, connect, events, kea, listeners, path, reducers, selectors } from 'kea'import { loaders } from 'kea-loaders'import { lemonToast } from 'lib/lemon-ui/LemonToast'@@ -13,8 +13,6 @@ import { ElementRect } from '~/toolbar/types'import { TOOLBAR_ID, elementToActionStep, getRectForElement, joinWithUiHost } from '~/toolbar/utils'import { captureAndUploadElementScreenshot } from '~/toolbar/utils/screenshot'-import type { fieldNotesLogicType } from './fieldNotesLogicType'-export interface PageContext {url: stringhost: string@@ -52,6 +50,111 @@ function isToolbarElement(element: HTMLElement): boolean {return toolbar?.contains(element) ?? false}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface fieldNotesLogicValues {+ dataAttributes: string[] // toolbarConfigLogic+ uiHost: string // toolbarConfigLogic+ buttonFieldNotesVisible: boolean+ comment: string+ deletingId: string | null+ fieldNotes: FieldNote[]+ fieldNotesLoading: boolean+ hasOpenedFieldNotes: boolean+ hoverElement: HTMLElement | null+ hoverElementRect: ElementRect | null+ isFieldNoting: boolean+ pageContext: PageContext | null+ rectUpdateCounter: number+ screenshotUrl: string | null+ selectedElement: HTMLElement | null+ selectedElementRect: ElementRect | null+ submitResult: FieldNote | null+ submitResultLoading: boolean+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface fieldNotesLogicActions {+ clearSelection: () => {+ value: true+ }+ deleteFieldNote: (id: string) => {+ id: string+ }+ hideButtonFieldNotes: () => {+ value: true+ }+ loadFieldNotes: () => any+ loadFieldNotesFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadFieldNotesSuccess: (+ fieldNotes: FieldNote[],+ payload?: any+ ) => {+ fieldNotes: FieldNote[]+ payload?: any+ }+ selectElement: (element: HTMLElement) => {+ element: HTMLElement+ page: PageContext+ }+ setComment: (comment: string) => {+ comment: string+ }+ setHoverElement: (element: HTMLElement | null) => {+ element: HTMLElement | null+ }+ setScreenshotUrl: (url: string | null) => {+ url: string | null+ }+ showButtonFieldNotes: () => {+ value: true+ }+ startFieldNote: () => {+ value: true+ }+ stopFieldNote: () => {+ value: true+ }+ submitFieldNote: () => any+ submitFieldNoteFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ submitFieldNoteSuccess: (+ submitResult: FieldNote | null,+ payload?: any+ ) => {+ submitResult: FieldNote | null+ payload?: any+ }+ updateRects: () => {+ value: true+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface fieldNotesLogicMeta {+ __keaTypeGenInternalSelectorTypes: {+ hoverElementRect: (hoverElement: HTMLElement | null, rectUpdateCounter: number) => ElementRect | null+ selectedElementRect: (selectedElement: HTMLElement | null, rectUpdateCounter: number) => ElementRect | null+ }+}++export type fieldNotesLogicType = MakeLogicType<+ fieldNotesLogicValues,+ fieldNotesLogicActions,+ Record<string, any>,+ fieldNotesLogicMeta+>+export const fieldNotesLogic = kea<fieldNotesLogicType>([path(['toolbar', 'field-notes', 'fieldNotesLogic']),@@ -180,11 +283,13 @@ export const fieldNotesLogic = kea<fieldNotesLogicType>([selectors({hoverElementRect: [(s) => [s.hoverElement, s.rectUpdateCounter],- (hoverElement): ElementRect | null => (hoverElement ? getRectForElement(hoverElement) : null),+ (hoverElement: HTMLElement | null): ElementRect | null =>+ hoverElement ? getRectForElement(hoverElement) : null,],selectedElementRect: [(s) => [s.selectedElement, s.rectUpdateCounter],- (selectedElement): ElementRect | null => (selectedElement ? getRectForElement(selectedElement) : null),+ (selectedElement: HTMLElement | null): ElementRect | null =>+ selectedElement ? getRectForElement(selectedElement) : null,],}),diff --git a/frontend/src/toolbar/flags/flagsToolbarLogic.ts b/frontend/src/toolbar/flags/flagsToolbarLogic.tsindex 826e265faee5..45b426a20059 100644--- a/frontend/src/toolbar/flags/flagsToolbarLogic.ts+++ b/frontend/src/toolbar/flags/flagsToolbarLogic.ts@@ -1,4 +1,4 @@-import { actions, connect, kea, listeners, path, reducers, selectors } from 'kea'+import { MakeLogicType, actions, connect, kea, listeners, path, reducers, selectors } from 'kea'import { loaders } from 'kea-loaders'import type { PostHog } from 'posthog-js'@@ -11,7 +11,7 @@ import { toolbarLogger } from '~/toolbar/toolbarLogger'import { captureToolbarException, toolbarPosthogJS } from '~/toolbar/toolbarPosthogJS'import { CombinedFeatureFlagAndValueType } from '~/types'-import type { flagsToolbarLogicType } from './flagsToolbarLogicType'+import type { FeatureFlagType } from '../../types'export type PayloadOverrides = Record<string, any>@@ -20,6 +20,195 @@ type EvaluationReasonsResponse = Record<{ value: boolean | string; evaluation: { reason: string; condition_index: number | null } }>+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface flagsToolbarLogicValues {+ posthog: PostHog | null // toolbarConfigLogic+ countFlagsOverridden: number+ draftDistinctId: string+ draftPayloads: Record<string, string>+ filteredFlags: {+ currentValue: boolean | string+ feature_flag: FeatureFlagType+ hasOverride: boolean+ hasVariants: boolean+ payloadOverride: any+ value: boolean | string+ }[]+ impersonatedDistinctId: string | null+ impersonatedFlagValues: Record<string, boolean | string> | null+ impersonationOpen: boolean+ localOverrides: Record<string, boolean | string>+ openPayloadEditors: Record<string, boolean>+ payloadErrors: Record<string, string | null>+ payloadOverrides: PayloadOverrides+ posthogClientFlagValues: Record<string, boolean | string>+ searchTerm: string+ userFlags: CombinedFeatureFlagAndValueType[]+ userFlagsLoading: boolean+ userFlagsWithOverrideInfo: {+ currentValue: boolean | string+ feature_flag: FeatureFlagType+ hasOverride: boolean+ hasVariants: boolean+ payloadOverride: any+ value: boolean | string+ }[]+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface flagsToolbarLogicActions {+ logout: () => {+ value: true+ } // toolbarConfigLogic+ tokenExpired: () => {+ value: true+ } // toolbarConfigLogic+ checkLocalOverrides: () => {+ value: true+ }+ clearAllOverrides: () => {+ value: true+ }+ clearImpersonation: () => {+ value: true+ }+ deleteOverriddenUserFlag: (flagKey: string) => {+ flagKey: string+ }+ getUserFlags: () => {+ value: true+ }+ getUserFlagsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ getUserFlagsSuccess: (+ userFlags: CombinedFeatureFlagAndValueType[],+ payload?: {+ value: true+ }+ ) => {+ userFlags: CombinedFeatureFlagAndValueType[]+ payload?: {+ value: true+ }+ }+ loadFlagsForDistinctId: (distinctId: string) => {+ distinctId: string+ }+ savePayloadOverride: (flagKey: string) => {+ flagKey: string+ }+ setDraftDistinctId: (draftDistinctId: string) => {+ draftDistinctId: string+ }+ setDraftPayload: (+ flagKey: string,+ draftPayload: string+ ) => {+ draftPayload: string+ flagKey: string+ }+ setFeatureFlagValueFromPostHogClient: (+ flags: string[],+ variants: Record<string, boolean | string>+ ) => {+ flags: string[]+ variants: Record<string, boolean | string>+ }+ setImpersonatedFlagValues: (flagValues: Record<string, boolean | string>) => {+ flagValues: Record<string, boolean | string>+ }+ setImpersonationOpen: (isOpen: boolean) => {+ isOpen: boolean+ }+ setOverriddenUserFlag: (+ flagKey: string,+ overrideValue: boolean | string,+ payloadOverride?: PayloadOverrides+ ) => {+ flagKey: string+ overrideValue: boolean | string+ payloadOverride: PayloadOverrides | undefined+ }+ setPayloadEditorOpen: (+ flagKey: string,+ isOpen: boolean+ ) => {+ flagKey: string+ isOpen: boolean+ }+ setPayloadError: (+ flagKey: string,+ error: string | null+ ) => {+ error: string | null+ flagKey: string+ }+ setPayloadOverride: (+ flagKey: string,+ payload: any+ ) => {+ flagKey: string+ payload: any+ }+ setSearchTerm: (searchTerm: string) => {+ searchTerm: string+ }+ storeLocalOverrides: (localOverrides: Record<string, boolean | string>) => {+ localOverrides: Record<string, boolean | string>+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface flagsToolbarLogicMeta {+ __keaTypeGenInternalSelectorTypes: {+ userFlagsWithOverrideInfo: (+ userFlags: CombinedFeatureFlagAndValueType[],+ localOverrides: Record<string, boolean | string>,+ posthogClientFlagValues: Record<string, boolean | string>,+ payloadOverrides: PayloadOverrides,+ impersonatedFlagValues: Record<string, boolean | string> | null+ ) => {+ currentValue: boolean | string+ feature_flag: FeatureFlagType+ hasOverride: boolean+ hasVariants: boolean+ payloadOverride: any+ value: boolean | string+ }[]+ filteredFlags: (+ searchTerm: string,+ userFlagsWithOverrideInfo: {+ currentValue: boolean | string+ feature_flag: FeatureFlagType+ hasOverride: boolean+ hasVariants: boolean+ payloadOverride: any+ value: boolean | string+ }[]+ ) => {+ currentValue: boolean | string+ feature_flag: FeatureFlagType+ hasOverride: boolean+ hasVariants: boolean+ payloadOverride: any+ value: boolean | string+ }[]+ countFlagsOverridden: (localOverrides: Record<string, boolean | string>) => number+ }+}++export type flagsToolbarLogicType = MakeLogicType<+ flagsToolbarLogicValues,+ flagsToolbarLogicActions,+ Record<string, any>,+ flagsToolbarLogicMeta+>+export const flagsToolbarLogic = kea<flagsToolbarLogicType>([path(['toolbar', 'flags', 'flagsToolbarLogic']),connect(() => ({@@ -193,7 +382,13 @@ export const flagsToolbarLogic = kea<flagsToolbarLogicType>([s.payloadOverrides,s.impersonatedFlagValues,],- (userFlags, localOverrides, posthogClientFlagValues, payloadOverrides, impersonatedFlagValues) => {+ (+ userFlags: CombinedFeatureFlagAndValueType[],+ localOverrides: Record<string, boolean | string>,+ posthogClientFlagValues: Record<string, boolean | string>,+ payloadOverrides: PayloadOverrides,+ impersonatedFlagValues: Record<string, boolean | string> | null+ ) => {return userFlags.map((flag) => {const hasVariants = (flag.feature_flag.filters?.multivariate?.variants?.length || 0) > 0@@ -216,7 +411,17 @@ export const flagsToolbarLogic = kea<flagsToolbarLogicType>([],filteredFlags: [(s) => [s.searchTerm, s.userFlagsWithOverrideInfo],- (searchTerm, userFlagsWithOverrideInfo) => {+ (+ searchTerm: string,+ userFlagsWithOverrideInfo: {+ currentValue: boolean | string+ feature_flag: import('~/types').FeatureFlagType+ hasOverride: boolean+ hasVariants: boolean+ payloadOverride: any+ value: boolean | string+ }[]+ ) => {return searchTerm? createFuse(userFlagsWithOverrideInfo, {keys: ['feature_flag.key', 'feature_flag.name'],@@ -226,7 +431,10 @@ export const flagsToolbarLogic = kea<flagsToolbarLogicType>([: userFlagsWithOverrideInfo},],- countFlagsOverridden: [(s) => [s.localOverrides], (localOverrides) => Object.keys(localOverrides).length],+ countFlagsOverridden: [+ (s) => [s.localOverrides],+ (localOverrides: Record<string, boolean | string>) => Object.keys(localOverrides).length,+ ],}),listeners(({ actions, values }) => {const clearFeatureFlagOverrides = (): void => {diff --git a/frontend/src/toolbar/product-tours/productToursLogic.ts b/frontend/src/toolbar/product-tours/productToursLogic.tsindex bbf1ba1a072d..8cb1f1f3dad6 100644--- a/frontend/src/toolbar/product-tours/productToursLogic.ts+++ b/frontend/src/toolbar/product-tours/productToursLogic.ts@@ -1,9 +1,11 @@import { deepEqual as equal } from 'fast-equals'-import { actions, connect, events, kea, listeners, path, reducers, selectors } from 'kea'+import { MakeLogicType, actions, connect, events, kea, listeners, path, reducers, selectors } from 'kea'import { forms } from 'kea-forms'+import type { DeepPartial, DeepPartialMap, FieldName, ValidationErrorType } from 'kea-forms'import { loaders } from 'kea-loaders'import { subscriptions } from 'kea-subscriptions'import { findElement } from 'posthog-js/dist/element-inference'+import type { PostHog } from 'posthog-js/dist/module'import { lemonToast } from 'lib/lemon-ui/LemonToast'import { uuid } from 'lib/utils/dom'@@ -30,8 +32,8 @@ import { TOOLBAR_ID, elementToActionStep, getRectForElement, joinWithUiHost } frimport { captureAndUploadElementScreenshot } from '~/toolbar/utils/screenshot'import { ProductTour, ProductTourStep, ProductTourStepType } from '~/types'+import type { ToolbarUserIntent } from '../../types'import { inferSelector } from './elementInference'-import type { productToursLogicType } from './productToursLogicType'import { PRODUCT_TOURS_SIDEBAR_TRANSITION_MS } from './utils'/**@@ -147,6 +149,204 @@ async function buildDraftPayload(form: TourForm, tours: ProductTour[]): Promise<}}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface productToursLogicValues {+ dataAttributes: string[] // toolbarConfigLogic+ posthog: PostHog | null // toolbarConfigLogic+ productTourId: string | null // toolbarConfigLogic+ uiHost: string // toolbarConfigLogic+ userIntent: ToolbarUserIntent | null // toolbarConfigLogic+ buttonProductToursVisible: boolean+ draftSaveStatus: 'saved' | 'saving' | 'unsaved' | null+ editorState: EditorState+ expandedStepIndex: number | null+ expandedStepRect: ElementRect | null+ hoverElement: HTMLElement | null+ hoverElementRect: ElementRect | null+ isPreviewing: boolean+ isSelecting: boolean+ isTourFormSubmitting: boolean+ isTourFormValid: boolean+ launchedFromMainApp: boolean+ rectUpdateCounter: number+ selectedElement: HTMLElement | null+ selectedElementRect: ElementRect | null+ selectedTour: TourForm | null+ selectedTourId: string | 'new' | null+ selectingStepIndex: number | null+ sessionRecordingConsent: boolean | null+ showTourFormErrors: boolean+ sidebarPosition: 'left' | 'right'+ sidebarTransitioning: boolean+ stepCount: number+ tourForm: TourForm+ tourFormAllErrors: Record<string, any>+ tourFormChanged: boolean+ tourFormErrors: DeepPartialMap<TourForm, ValidationErrorType>+ tourFormHasErrors: boolean+ tourFormManualErrors: Record<string, any>+ tourFormTouched: boolean+ tourFormTouches: Record<string, boolean>+ tourFormValidationErrors: DeepPartialMap<TourForm, ValidationErrorType>+ tours: ProductTour[]+ toursLoading: boolean+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface productToursLogicActions {+ addStep: (stepType: ProductTourStepType) => {+ stepType: ProductTourStepType+ }+ cancelEditing: () => {+ value: true+ }+ clearSelectedElement: () => {+ value: true+ }+ deleteTour: (id: string) => {+ id: string+ }+ draftAutoSave: () => {+ value: true+ }+ hideButtonProductTours: () => {+ value: true+ }+ loadTours: () => any+ loadToursFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadToursSuccess: (+ tours: ProductTour[],+ payload?: any+ ) => {+ tours: ProductTour[]+ payload?: any+ }+ newTour: () => {+ value: true+ }+ previewTour: () => {+ value: true+ }+ removeStep: (index: number) => {+ index: number+ }+ resetTourForm: (values?: TourForm) => {+ values?: TourForm+ }+ saveTour: () => {+ value: true+ }+ selectElement: (element: HTMLElement) => {+ element: HTMLElement+ }+ selectTour: (id: string | null) => {+ id: string | null+ }+ setEditorState: (state: EditorState) => {+ state: EditorState+ }+ setExpandedStepIndex: (index: number | null) => {+ index: number | null+ }+ setHoverElement: (element: HTMLElement | null) => {+ element: HTMLElement | null+ }+ setLaunchedFromMainApp: (value: boolean) => {+ value: boolean+ }+ setSessionRecordingConsent: (consent: boolean) => {+ consent: boolean+ }+ setSidebarTransitioning: (transitioning: boolean) => {+ transitioning: boolean+ }+ setTourFormManualErrors: (errors: Record<string, any>) => {+ errors: Record<string, any>+ }+ setTourFormValue: (+ key: FieldName,+ value: any+ ) => {+ name: FieldName+ value: any+ }+ setTourFormValues: (values: DeepPartial<TourForm>) => {+ values: DeepPartial<TourForm>+ }+ showButtonProductTours: () => {+ value: true+ }+ startPreviewMode: () => {+ value: true+ }+ stopPreview: () => {+ value: true+ }+ submitTourForm: () => {+ value: boolean+ }+ submitTourFormFailure: (+ error: Error,+ errors: Record<string, any>+ ) => {+ error: Error+ errors: Record<string, any>+ }+ submitTourFormRequest: (tourForm: TourForm) => {+ tourForm: TourForm+ }+ submitTourFormSuccess: (tourForm: TourForm) => {+ tourForm: TourForm+ }+ toggleSidebarPosition: () => {+ value: true+ }+ touchTourFormField: (key: string) => {+ key: string+ }+ updateRects: () => {+ value: true+ }+ updateStep: (+ index: number,+ patch: Partial<TourStep>+ ) => {+ index: number+ patch: Partial<TourStep>+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface productToursLogicMeta {+ __keaTypeGenInternalSelectorTypes: {+ selectedTour: (selectedTourId: string | null, tours: ProductTour[]) => TourForm | null+ isSelecting: (editorState: EditorState) => boolean+ selectingStepIndex: (editorState: EditorState) => number | null+ hoverElementRect: (hoverElement: HTMLElement | null, rectUpdateCounter: number) => ElementRect | null+ selectedElementRect: (selectedElement: HTMLElement | null, rectUpdateCounter: number) => ElementRect | null+ stepCount: (tourForm: TourForm) => number+ expandedStepRect: (+ expandedStepIndex: number | null,+ tourForm: TourForm,+ rectUpdateCounter: number,+ editorState: EditorState+ ) => ElementRect | null+ }+}++export type productToursLogicType = MakeLogicType<+ productToursLogicValues,+ productToursLogicActions,+ Record<string, any>,+ productToursLogicMeta+>+export const productToursLogic = kea<productToursLogicType>([path(['toolbar', 'product-tours', 'productToursLogic']),@@ -368,7 +568,7 @@ export const productToursLogic = kea<productToursLogicType>([selectors({selectedTour: [(s) => [s.selectedTourId, s.tours],- (selectedTourId, tours): TourForm | null => {+ (selectedTourId: string | 'new' | null, tours: ProductTour[]): TourForm | null => {if (selectedTourId === 'new') {return newTour()}@@ -381,14 +581,15 @@ export const productToursLogic = kea<productToursLogicType>([return null},],- isSelecting: [(s) => [s.editorState], (editorState) => editorState.mode === 'selecting'],+ isSelecting: [(s) => [s.editorState], (editorState: EditorState) => editorState.mode === 'selecting'],selectingStepIndex: [(s) => [s.editorState],- (editorState): number | null => (editorState.mode === 'selecting' ? editorState.stepIndex : null),+ (editorState: EditorState): number | null =>+ editorState.mode === 'selecting' ? editorState.stepIndex : null,],hoverElementRect: [(s) => [s.hoverElement, s.rectUpdateCounter],- (hoverElement): ElementRect | null => {+ (hoverElement: HTMLElement | null): ElementRect | null => {if (!hoverElement) {return null}@@ -397,17 +598,22 @@ export const productToursLogic = kea<productToursLogicType>([],selectedElementRect: [(s) => [s.selectedElement, s.rectUpdateCounter],- (selectedElement): ElementRect | null => {+ (selectedElement: HTMLElement | null): ElementRect | null => {if (!selectedElement) {return null}return getRectForElement(selectedElement)},],- stepCount: [(s) => [s.tourForm], (tourForm) => tourForm?.steps?.length ?? 0],+ stepCount: [(s) => [s.tourForm], (tourForm: TourForm) => tourForm?.steps?.length ?? 0],expandedStepRect: [(s) => [s.expandedStepIndex, s.tourForm, s.rectUpdateCounter, s.editorState],- (expandedStepIndex, tourForm, _, editorState): ElementRect | null => {+ (+ expandedStepIndex: number | null,+ tourForm: TourForm,+ _: number,+ editorState: EditorState+ ): ElementRect | null => {if (editorState.mode === 'selecting') {return null}diff --git a/frontend/src/toolbar/screenshot-upload/screenshotUploadLogic.ts b/frontend/src/toolbar/screenshot-upload/screenshotUploadLogic.tsindex 874fdae70565..b7e8c195a9fb 100644--- a/frontend/src/toolbar/screenshot-upload/screenshotUploadLogic.ts+++ b/frontend/src/toolbar/screenshot-upload/screenshotUploadLogic.ts@@ -1,4 +1,4 @@-import { actions, kea, listeners, path, props, reducers } from 'kea'+import { MakeLogicType, actions, kea, listeners, path, props, reducers } from 'kea'import { loaders } from 'kea-loaders'import { lemonToast } from 'lib/lemon-ui/LemonToast'@@ -10,12 +10,94 @@ import { safeFetch } from '~/toolbar/utils'import { captureElementScreenshot, uploadScreenshot } from '~/toolbar/utils/screenshot'import { EventDefinition } from '~/types'-import type { screenshotUploadLogicType } from './screenshotUploadLogicType'-export interface ScreenshotUploadLogicProps {onSuccess?: () => void}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface screenshotUploadLogicValues {+ eventDefinitions: EventDefinition[]+ eventDefinitionsLoading: boolean+ eventName: string+ isModalOpen: boolean+ isTakingScreenshot: boolean+ previewUrl: string | null+ selectedDefinition: EventDefinition | null+ showSuggestions: boolean+ uploadResult: {+ success: boolean+ } | null+ uploadResultLoading: boolean+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface screenshotUploadLogicActions {+ closeModal: () => {+ value: true+ }+ openModal: (previewUrl: string) => {+ previewUrl: string+ }+ searchEvents: ({ query }: { query: string }) => {+ query: string+ }+ searchEventsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ searchEventsSuccess: (+ eventDefinitions: EventDefinition[],+ payload?: {+ query: string+ }+ ) => {+ eventDefinitions: EventDefinition[]+ payload?: {+ query: string+ }+ }+ selectEvent: (definition: EventDefinition) => {+ definition: EventDefinition+ }+ setEventName: (name: string) => {+ name: string+ }+ setShowSuggestions: (show: boolean) => {+ show: boolean+ }+ submitUpload: (_: any) => any+ submitUploadFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ submitUploadSuccess: (+ uploadResult: {+ success: true+ } | null,+ payload?: any+ ) => {+ uploadResult: {+ success: true+ } | null+ payload?: any+ }+ takeScreenshot: () => {+ value: true+ }+}++export type screenshotUploadLogicType = MakeLogicType<+ screenshotUploadLogicValues,+ screenshotUploadLogicActions,+ ScreenshotUploadLogicProps+>+export const screenshotUploadLogic = kea<screenshotUploadLogicType>([path(['toolbar', 'screenshot-upload', 'screenshotUploadLogic']),props({} as ScreenshotUploadLogicProps),diff --git a/frontend/src/toolbar/shims/featureFlagLogic.ts b/frontend/src/toolbar/shims/featureFlagLogic.tsindex a9148f50638a..ddab85839607 100644--- a/frontend/src/toolbar/shims/featureFlagLogic.ts+++ b/frontend/src/toolbar/shims/featureFlagLogic.ts@@ -1,6 +1,4 @@-import { kea, path, reducers } from 'kea'--import type { featureFlagLogicType } from './featureFlagLogicType'+import { MakeLogicType, kea, path, reducers } from 'kea'// Toolbar shim — no feature flags available in toolbar context// eslint-disable-next-line @typescript-eslint/no-unused-vars@@ -8,6 +6,13 @@ export function getFeatureFlagPayload(_flag: string): undefined {return undefined}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface featureFlagLogicValues {+ featureFlags: Record<string, boolean | string>+}++export type featureFlagLogicType = MakeLogicType<featureFlagLogicValues, {}>+export const featureFlagLogic = kea<featureFlagLogicType>([path(['toolbar', 'shims', 'featureFlagLogic']),reducers({diff --git a/frontend/src/toolbar/shims/membersLogic.ts b/frontend/src/toolbar/shims/membersLogic.tsindex 547dd93cadd1..b04d7b28a0a3 100644--- a/frontend/src/toolbar/shims/membersLogic.ts+++ b/frontend/src/toolbar/shims/membersLogic.ts@@ -1,6 +1,18 @@-import { actions, kea, path, reducers } from 'kea'+import { MakeLogicType, actions, kea, path, reducers } from 'kea'-import type { membersLogicType } from './membersLogicType'+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface membersLogicValues {+ members: unknown[]+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface membersLogicActions {+ ensureAllMembersLoaded: () => {+ value: true+ }+}++export type membersLogicType = MakeLogicType<membersLogicValues, membersLogicActions>// Toolbar shim — prevents the real membersLogic from auto-mounting and making API requests to the wrong hostexport const membersLogic = kea<membersLogicType>([diff --git a/frontend/src/toolbar/shims/sceneLogic.ts b/frontend/src/toolbar/shims/sceneLogic.tsindex d191844324ca..8d97abecf5a8 100644--- a/frontend/src/toolbar/shims/sceneLogic.ts+++ b/frontend/src/toolbar/shims/sceneLogic.ts@@ -1,6 +1,11 @@-import { kea, path, reducers } from 'kea'+import { MakeLogicType, kea, path, reducers } from 'kea'-import type { sceneLogicType } from './sceneLogicType'+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface sceneLogicValues {+ sceneConfig: Record<string, unknown> | null+}++export type sceneLogicType = MakeLogicType<sceneLogicValues, {}>// Toolbar shim — prevents the real sceneLogic from hijacking routing.// null sceneConfig makes themeLogic fall through to system dark mode preference.diff --git a/frontend/src/toolbar/shims/surveyQuestionLabelsLogic.ts b/frontend/src/toolbar/shims/surveyQuestionLabelsLogic.tsindex 10fc8ec2ce8b..6883dfd0dff7 100644--- a/frontend/src/toolbar/shims/surveyQuestionLabelsLogic.ts+++ b/frontend/src/toolbar/shims/surveyQuestionLabelsLogic.ts@@ -1,6 +1,4 @@-import { kea, path, reducers } from 'kea'--import type { surveyQuestionLabelsLogicType } from './surveyQuestionLabelsLogicType'+import { MakeLogicType, kea, path, reducers } from 'kea'// Toolbar shim — survey question labels come from an authenticated endpoint the toolbar can't// reach on customer pages (lib/api is denied), so the labels are always empty here. Consumers@@ -12,6 +10,13 @@ export interface SurveyQuestionLabel {questionIndex: number}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface surveyQuestionLabelsLogicValues {+ surveyQuestionLabels: Record<string, SurveyQuestionLabel>+}++export type surveyQuestionLabelsLogicType = MakeLogicType<surveyQuestionLabelsLogicValues, {}>+export const surveyQuestionLabelsLogic = kea<surveyQuestionLabelsLogicType>([path(['toolbar', 'shims', 'surveyQuestionLabelsLogic']),reducers({diff --git a/frontend/src/toolbar/shims/teamLogic.ts b/frontend/src/toolbar/shims/teamLogic.tsindex b2ad1778a2a2..14584813d090 100644--- a/frontend/src/toolbar/shims/teamLogic.ts+++ b/frontend/src/toolbar/shims/teamLogic.ts@@ -1,12 +1,27 @@-import { kea, path, reducers, selectors } from 'kea'--import type { teamLogicType } from './teamLogicType'+import { MakeLogicType, kea, path, reducers, selectors } from 'kea'// Toolbar shim — prevents the real teamLogic from auto-mounting and making API requests to the wrong hostexport function isAuthenticatedTeam(team: unknown): boolean {return !!team && typeof team === 'object' && 'api_token' in team}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface teamLogicValues {+ currentTeam: Record<string, unknown> | null+ timezone: string+ weekStartDay: number+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface teamLogicMeta {+ __keaTypeGenInternalSelectorTypes: {+ timezone: (currentTeam: Record<string, unknown> | null) => string+ weekStartDay: (currentTeam: Record<string, unknown> | null) => number+ }+}++export type teamLogicType = MakeLogicType<teamLogicValues, {}, Record<string, any>, teamLogicMeta>+export const teamLogic = kea<teamLogicType>([path(['toolbar', 'shims', 'teamLogic']),reducers({diff --git a/frontend/src/toolbar/shims/userLogic.ts b/frontend/src/toolbar/shims/userLogic.tsindex 9504354be748..c38fc79a82e6 100644--- a/frontend/src/toolbar/shims/userLogic.ts+++ b/frontend/src/toolbar/shims/userLogic.ts@@ -1,6 +1,22 @@-import { actions, kea, path, reducers } from 'kea'+import { MakeLogicType, actions, kea, path, reducers } from 'kea'-import type { userLogicType } from './userLogicType'+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface userLogicValues {+ themeMode: string+ user: Record<string, unknown> | null+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface userLogicActions {+ loadUserSuccess: (user: unknown) => {+ user: unknown+ }+ updateUser: (payload: unknown) => {+ payload: unknown+ }+}++export type userLogicType = MakeLogicType<userLogicValues, userLogicActions>// Toolbar shim — prevents the real userLogic from auto-mounting and making API requests to the wrong hostexport const userLogic = kea<userLogicType>([diff --git a/frontend/src/toolbar/stats/currentPageLogic.ts b/frontend/src/toolbar/stats/currentPageLogic.tsindex ed0593c2b62b..bc9599b05fcc 100644--- a/frontend/src/toolbar/stats/currentPageLogic.ts+++ b/frontend/src/toolbar/stats/currentPageLogic.ts@@ -1,9 +1,7 @@-import { actions, afterMount, kea, listeners, path, reducers } from 'kea'+import { MakeLogicType, actions, afterMount, kea, listeners, path, reducers } from 'kea'import { makeNavigateWrapper } from '~/toolbar/utils'-import type { currentPageLogicType } from './currentPageLogicType'-const replaceWithWildcard = (part: string): string => {// replace uuidsif (part.match(/^([a-f]|[0-9]){8}-([a-f]|[0-9]){4}-([a-f]|[0-9]){4}-([a-f]|[0-9]){4}-([a-f]|[0-9]){12}$/)) {@@ -67,6 +65,31 @@ export function withoutPostHogInit(href: string): string {}}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface currentPageLogicValues {+ autoWildcardEnabled: boolean+ href: string+ wildcardHref: string+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface currentPageLogicActions {+ autoWildcardHref: () => {+ value: true+ }+ setAutoWildcardEnabled: (enabled: boolean) => {+ enabled: boolean+ }+ setHref: (href: string) => {+ href: string+ }+ setWildcardHref: (href: string) => {+ href: string+ }+}++export type currentPageLogicType = MakeLogicType<currentPageLogicValues, currentPageLogicActions>+export const currentPageLogic = kea<currentPageLogicType>([path(['toolbar', 'stats', 'currentPageLogic']),diff --git a/frontend/src/toolbar/surveys/surveysToolbarLogic.ts b/frontend/src/toolbar/surveys/surveysToolbarLogic.tsindex 2bc05daaeab7..18c2527b0c76 100644--- a/frontend/src/toolbar/surveys/surveysToolbarLogic.ts+++ b/frontend/src/toolbar/surveys/surveysToolbarLogic.ts@@ -1,4 +1,4 @@-import { actions, kea, listeners, path, reducers, selectors } from 'kea'+import { MakeLogicType, actions, kea, listeners, path, reducers, selectors } from 'kea'import { loaders } from 'kea-loaders'import { lemonToast } from 'lib/lemon-ui/LemonToast/LemonToast'@@ -19,8 +19,6 @@ import {SurveyType,} from '~/types'-import type { surveysToolbarLogicType } from './surveysToolbarLogicType'-export type SurveyStatus = 'draft' | 'active' | 'complete'export type QuickSurveyQuestionType = 'open' | 'rating' | 'single_choice'@@ -341,6 +339,125 @@ async function patchAndRefreshSurvey(return true}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface surveysToolbarLogicValues {+ allSurveys: Survey[]+ allSurveysLoading: boolean+ canProceed: boolean+ canProceedReason: string | null+ editingSurvey: Survey | null+ editingSurveyId: string | null+ hasMoreSurveys: boolean+ isCreating: boolean+ isLifecyclePending: boolean+ isSubmitting: boolean+ previewSurvey: Survey | null+ quickForm: QuickSurveyForm+ searchTerm: string+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface surveysToolbarLogicActions {+ archiveSurvey: (survey: Survey) => {+ survey: Survey+ }+ cancelQuickCreate: () => {+ value: true+ }+ hideButtonSurveys: () => {+ value: true+ }+ launchSurvey: (survey: Survey) => {+ survey: Survey+ }+ loadMoreSurveys: () => any+ loadMoreSurveysFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadMoreSurveysSuccess: (+ allSurveys: Survey[],+ payload?: any+ ) => {+ allSurveys: Survey[]+ payload?: any+ }+ loadSurveys: () => any+ loadSurveysFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadSurveysSuccess: (+ allSurveys: Survey[],+ payload?: any+ ) => {+ allSurveys: Survey[]+ payload?: any+ }+ resumeSurvey: (survey: Survey) => {+ survey: Survey+ }+ setFormField: (+ field: keyof QuickSurveyForm,+ value: unknown+ ) => {+ field: keyof QuickSurveyForm+ value: unknown+ }+ setHasMoreSurveys: (hasMore: boolean) => {+ hasMore: boolean+ }+ setLifecyclePending: (pending: boolean) => {+ pending: boolean+ }+ setSearchTerm: (searchTerm: string) => {+ searchTerm: string+ }+ showButtonSurveys: () => {+ value: true+ }+ startQuickCreate: () => {+ value: true+ }+ startQuickEdit: (survey: Survey) => {+ survey: Survey+ }+ stopSurvey: (survey: Survey) => {+ survey: Survey+ }+ submitQuickCreate: (launch?: boolean) => {+ launch: boolean+ }+ submitQuickCreateFailure: () => {+ value: true+ }+ submitQuickCreateSuccess: () => {+ value: true+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface surveysToolbarLogicMeta {+ __keaTypeGenInternalSelectorTypes: {+ previewSurvey: (quickForm: QuickSurveyForm, isCreating: boolean, editingSurvey: Survey | null) => Survey | null+ canProceed: (quickForm: QuickSurveyForm) => boolean+ canProceedReason: (quickForm: QuickSurveyForm) => string | null+ }+}++export type surveysToolbarLogicType = MakeLogicType<+ surveysToolbarLogicValues,+ surveysToolbarLogicActions,+ Record<string, any>,+ surveysToolbarLogicMeta+>+export const surveysToolbarLogic = kea<surveysToolbarLogicType>([path(['toolbar', 'surveys', 'surveysToolbarLogic']),@@ -494,7 +611,7 @@ export const surveysToolbarLogic = kea<surveysToolbarLogicType>([selectors({previewSurvey: [(s) => [s.quickForm, s.isCreating, s.editingSurvey],- (form, isCreating, editingSurvey): Survey | null => {+ (form: QuickSurveyForm, isCreating: boolean, editingSurvey: Survey | null): Survey | null => {if (!isCreating) {return null}@@ -528,7 +645,7 @@ export const surveysToolbarLogic = kea<surveysToolbarLogicType>([],canProceed: [(s) => [s.quickForm],- (form): boolean => {+ (form: QuickSurveyForm): boolean => {return (!!form.name.trim() &&!!form.questionText.trim() &&@@ -542,7 +659,7 @@ export const surveysToolbarLogic = kea<surveysToolbarLogicType>([// "needs at least two single-choice options".canProceedReason: [(s) => [s.quickForm],- (form): string | null => {+ (form: QuickSurveyForm): string | null => {if (!form.name.trim()) {return 'Add a survey name'}diff --git a/frontend/src/toolbar/toolbarConfigLogic.ts b/frontend/src/toolbar/toolbarConfigLogic.tsindex fef4f25fd979..8c2e1a44a45e 100644--- a/frontend/src/toolbar/toolbarConfigLogic.ts+++ b/frontend/src/toolbar/toolbarConfigLogic.ts@@ -1,4 +1,16 @@-import { actions, afterMount, beforeUnmount, kea, listeners, path, props, reducers, selectors } from 'kea'+import {+ MakeLogicType,+ actions,+ afterMount,+ beforeUnmount,+ kea,+ listeners,+ path,+ props,+ reducers,+ selectors,+} from 'kea'+import type { PostHog } from 'posthog-js/dist/module'import { lemonToast } from 'lib/lemon-ui/LemonToast/LemonToast'@@ -6,7 +18,7 @@ import { toolbarLogger } from '~/toolbar/toolbarLogger'import { captureToolbarException, toolbarPosthogJS } from '~/toolbar/toolbarPosthogJS'import { TOOLBAR_USER_INTENTS, ToolbarProps, ToolbarUserIntent } from '~/types'-import type { toolbarConfigLogicType } from './toolbarConfigLogicType'+import type { ExperimentIdType } from '../types'import {asNonEmptyString,cleanToolbarAuthHash,@@ -27,6 +39,109 @@ const asUserIntent = (v: unknown): ToolbarUserIntent | null => {return s && VALID_USER_INTENTS.has(s as ToolbarUserIntent) ? (s as ToolbarUserIntent) : null}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface toolbarConfigLogicValues {+ accessToken: string | null+ actionId: number | null+ apiHost: string+ apiHostResolution: {+ host: string+ source: ApiHostSource+ }+ authConfirmModalVisible: boolean+ authStatus: 'authenticating' | 'checking' | 'error' | 'idle'+ buttonVisible: boolean+ clientId: string | null+ dataAttributes: string[]+ experimentId: ExperimentIdType | null+ isAuthenticated: boolean+ isTrustedUiHost: boolean+ posthog: PostHog | null+ productTourId: string | null+ props: ToolbarProps+ refreshToken: string | null+ toolbarFlagsKey: string | undefined+ uiHost: string+ uiHostConfigModalVisible: boolean+ userIntent: ToolbarUserIntent | null+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface toolbarConfigLogicActions {+ authenticate: () => {+ value: true+ }+ clearUserIntent: () => {+ value: true+ }+ closeAuthConfirmModal: () => {+ value: true+ }+ closeUiHostConfigModal: () => {+ value: true+ }+ confirmAuthenticate: () => {+ value: true+ }+ hideButton: () => {+ value: true+ }+ logout: () => {+ value: true+ }+ openAuthConfirmModal: () => {+ value: true+ }+ openUiHostConfigModal: () => {+ value: true+ }+ persistConfig: () => {+ value: true+ }+ setAuthStatus: (status: 'authenticating' | 'checking' | 'error' | 'idle') => {+ status: 'authenticating' | 'checking' | 'error' | 'idle'+ }+ setOAuthTokens: (+ accessToken: string,+ refreshToken: string,+ clientId: string+ ) => {+ accessToken: string+ clientId: string+ refreshToken: string+ }+ showButton: () => {+ value: true+ }+ tokenExpired: () => {+ value: true+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface toolbarConfigLogicMeta {+ __keaTypeGenInternalSelectorTypes: {+ posthog: (props: ToolbarProps) => PostHog | null+ uiHost: (props: ToolbarProps) => string+ apiHostResolution: (props: ToolbarProps) => {+ host: string+ source: ApiHostSource+ }+ apiHost: (apiHostResolution: { host: string; source: ApiHostSource }) => string+ dataAttributes: (props: ToolbarProps) => string[]+ isAuthenticated: (accessToken: string | null) => boolean+ toolbarFlagsKey: (props: ToolbarProps) => string | undefined+ isTrustedUiHost: (uiHost: string) => boolean+ }+}++export type toolbarConfigLogicType = MakeLogicType<+ toolbarConfigLogicValues,+ toolbarConfigLogicActions,+ ToolbarProps,+ toolbarConfigLogicMeta+>+export const toolbarConfigLogic = kea<toolbarConfigLogicType>([path(['toolbar', 'toolbarConfigLogic']),props({} as ToolbarProps),@@ -97,7 +212,7 @@ export const toolbarConfigLogic = kea<toolbarConfigLogicType>([})),selectors({- posthog: [(s) => [s.props], (props) => props.posthog ?? null],+ posthog: [(s) => [s.props], (props: ToolbarProps) => props.posthog ?? null],// PostHog app URL used for OAuth and navigation links.//// Every candidate (props.uiHost, requestRouter, config.ui_host, apiURL) is@@ -184,9 +299,9 @@ export const toolbarConfigLogic = kea<toolbarConfigLogicType>([(s) => [s.apiHostResolution],(resolution: { host: string; source: ApiHostSource }): string => resolution.host,],- dataAttributes: [(s) => [s.props], (props): string[] => props.dataAttributes ?? []],- isAuthenticated: [(s) => [s.accessToken], (accessToken) => !!accessToken],- toolbarFlagsKey: [(s) => [s.props], (props): string | undefined => props.toolbarFlagsKey],+ dataAttributes: [(s) => [s.props], (props: ToolbarProps): string[] => props.dataAttributes ?? []],+ isAuthenticated: [(s) => [s.accessToken], (accessToken: string | null) => !!accessToken],+ toolbarFlagsKey: [(s) => [s.props], (props: ToolbarProps): string | undefined => props.toolbarFlagsKey],// True when uiHost is a PostHog Cloud host (us/eu) — safe to skip the// "are you sure you want to authenticate here?" confirmation.isTrustedUiHost: [(s) => [s.uiHost], (uiHost: string): boolean => isPostHogCloudHost(uiHost)],diff --git a/frontend/src/toolbar/web-vitals/webVitalsToolbarLogic.ts b/frontend/src/toolbar/web-vitals/webVitalsToolbarLogic.tsindex b6ab6766cde1..e6056691f939 100644--- a/frontend/src/toolbar/web-vitals/webVitalsToolbarLogic.ts+++ b/frontend/src/toolbar/web-vitals/webVitalsToolbarLogic.ts@@ -1,6 +1,7 @@-import { actions, afterMount, connect, kea, path, reducers } from 'kea'+import { MakeLogicType, actions, afterMount, connect, kea, path, reducers } from 'kea'import { loaders } from 'kea-loaders'import { router, urlToAction } from 'kea-router'+import type { PostHog } from 'posthog-js/dist/module'import { inStorybook, inStorybookTestRunner } from 'lib/utils/dom'import { permanentlyMount } from 'lib/utils/kea-logic-builders'@@ -9,8 +10,6 @@ import { WebVitalsMetric } from '~/queries/schema/schema-general'import { toolbarApi } from '~/toolbar/toolbarApi'import { toolbarConfigLogic } from '~/toolbar/toolbarConfigLogic'-import type { webVitalsToolbarLogicType } from './webVitalsToolbarLogicType'-// We're giving different meaning for `undefined` and `null` here.// `undefined` means we don't have a value yet, while `null` means we didn't get a value from the server.export type WebVitalsMetrics = Record<WebVitalsMetric, number | null | undefined>@@ -23,6 +22,54 @@ export type WebVitalsMetricsResponse = {}[]}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface webVitalsToolbarLogicValues {+ posthog: PostHog | null // toolbarConfigLogic+ localWebVitals: WebVitalsMetrics+ remoteWebVitals: WebVitalsMetrics+ remoteWebVitalsLoading: boolean+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface webVitalsToolbarLogicActions {+ getWebVitals: () => {+ value: true+ }+ getWebVitalsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ getWebVitalsSuccess: (+ remoteWebVitals: WebVitalsMetrics,+ payload?: {+ value: true+ }+ ) => {+ remoteWebVitals: WebVitalsMetrics+ payload?: {+ value: true+ }+ }+ nullifyLocalWebVitals: () => {+ value: true+ }+ resetLocalWebVitals: () => {+ value: true+ }+ setLocalWebVital: (+ webVitalMetric: WebVitalsMetric,+ value: number | null+ ) => {+ value: number | null+ webVitalMetric: WebVitalsMetric+ }+}++export type webVitalsToolbarLogicType = MakeLogicType<webVitalsToolbarLogicValues, webVitalsToolbarLogicActions>+export const webVitalsToolbarLogic = kea<webVitalsToolbarLogicType>([path(['toolbar', 'web-vitals', 'webVitalsToolbarLogic']),connect(() => ({diff --git a/products/customer_analytics/frontend/components/AccountNotes/accountNotesLogic.ts b/products/customer_analytics/frontend/components/AccountNotes/accountNotesLogic.tsindex 427ba4bd2c17..0e7b975d8747 100644--- a/products/customer_analytics/frontend/components/AccountNotes/accountNotesLogic.ts+++ b/products/customer_analytics/frontend/components/AccountNotes/accountNotesLogic.ts@@ -56,9 +56,11 @@ export interface accountNotesLogicActions {} // customerAnalyticsSceneLogicloadUserSuccess: (user: UserType | null,- payload?: {- resetOnFailure: boolean | undefined- }+ payload?:+ | {+ resetOnFailure: boolean | undefined+ }+ | undefined) => {payload?: {resetOnFailure: boolean | undefineddiff --git a/products/customer_analytics/frontend/components/Accounts/accountsLogic.ts b/products/customer_analytics/frontend/components/Accounts/accountsLogic.tsindex ea97e53b1129..3c65048ac042 100644--- a/products/customer_analytics/frontend/components/Accounts/accountsLogic.ts+++ b/products/customer_analytics/frontend/components/Accounts/accountsLogic.ts@@ -211,9 +211,11 @@ export interface accountsLogicActions {} // membersLogicloadUserSuccess: (user: UserType | null,- payload?: {- resetOnFailure: boolean | undefined- }+ payload?:+ | {+ resetOnFailure: boolean | undefined+ }+ | undefined) => {payload?: {resetOnFailure: boolean | undefineddiff --git a/products/customer_analytics/frontend/customerProfileLogic.ts b/products/customer_analytics/frontend/customerProfileLogic.tsindex 96686f5e5a38..653528742bd7 100644--- a/products/customer_analytics/frontend/customerProfileLogic.ts+++ b/products/customer_analytics/frontend/customerProfileLogic.ts@@ -189,9 +189,11 @@ export interface customerProfileLogicActions {previous: nullresults: never[]},- payload?: {- value: true- }+ payload?:+ | {+ value: true+ }+ | undefined) => {dataWarehouseSources:| PaginatedResponse<ExternalDataSource>diff --git a/products/data_warehouse/frontend/scenes/NewSourceScene/NewSourceScene.tsx b/products/data_warehouse/frontend/scenes/NewSourceScene/NewSourceScene.tsxindex 63f2fd59092e..6ea0f4be4eec 100644--- a/products/data_warehouse/frontend/scenes/NewSourceScene/NewSourceScene.tsx+++ b/products/data_warehouse/frontend/scenes/NewSourceScene/NewSourceScene.tsx@@ -1,4 +1,4 @@-import { BindLogic, connect, kea, path, selectors, useActions, useValues } from 'kea'+import { MakeLogicType, BindLogic, connect, kea, path, selectors, useActions, useValues } from 'kea'import { useCallback, useEffect, useMemo, useState } from 'react'import { IconCopy, IconQuestion } from '@posthog/icons'@@ -37,7 +37,6 @@ import { SourceIcon } from '../../shared/components/SourceIcon'import { availableSourcesLogic } from './availableSourcesLogic'import { BillingLimitNotice } from './components/BillingLimitNotice'import { SelfManagedSourceForm } from './components/SelfManagedSourceForm'-import type { newSourceSceneLogicType } from './NewSourceSceneType'import { selfManagedSourceLogic } from './selfManagedSourceLogic'import { SourceCatalog } from './SourceCatalog'import { type SourceWizardLogicProps, sourceWizardLogic } from './sourceWizardLogic'@@ -53,6 +52,15 @@ export const getEffectiveAccessMethod = (return persistedAccessMethod}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface newSourceSceneLogicValues {+ availableSources: Record<string, SourceConfig> | null // availableSourcesLogic+ availableSourcesLoading: boolean // availableSourcesLogic+ breadcrumbs: Breadcrumb[]+}++export type newSourceSceneLogicType = MakeLogicType<newSourceSceneLogicValues, {}>+export const newSourceSceneLogic = kea<newSourceSceneLogicType>([path(['products', 'dataWarehouse', 'newSourceSceneLogic']),connect(() => ({diff --git a/products/data_warehouse/frontend/scenes/NewSourceScene/availableSourcesLogic.ts b/products/data_warehouse/frontend/scenes/NewSourceScene/availableSourcesLogic.tsindex 765ee4b74a6f..5151e3a98299 100644--- a/products/data_warehouse/frontend/scenes/NewSourceScene/availableSourcesLogic.ts+++ b/products/data_warehouse/frontend/scenes/NewSourceScene/availableSourcesLogic.ts@@ -1,11 +1,36 @@-import { afterMount, kea, path } from 'kea'+import { MakeLogicType, afterMount, kea, path } from 'kea'import { loaders } from 'kea-loaders'import api from 'lib/api'import { SourceConfig } from '~/queries/schema/schema-general'-import type { availableSourcesLogicType } from './availableSourcesLogicType'+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface availableSourcesLogicValues {+ availableSources: Record<string, SourceConfig> | null+ availableSourcesLoading: boolean+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface availableSourcesLogicActions {+ load: () => any+ loadFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadSuccess: (+ availableSources: Record<string, SourceConfig> | null,+ payload?: any+ ) => {+ availableSources: Record<string, SourceConfig> | null+ payload?: any+ }+}++export type availableSourcesLogicType = MakeLogicType<availableSourcesLogicValues, availableSourcesLogicActions>export const availableSourcesLogic = kea<availableSourcesLogicType>([path(['products', 'dataWarehouse', 'availableSourcesLogic']),diff --git a/products/data_warehouse/frontend/scenes/NewSourceScene/selfManagedSourceLogic.tsx b/products/data_warehouse/frontend/scenes/NewSourceScene/selfManagedSourceLogic.tsxindex f06cc8e342dc..75733f571081 100644--- a/products/data_warehouse/frontend/scenes/NewSourceScene/selfManagedSourceLogic.tsx+++ b/products/data_warehouse/frontend/scenes/NewSourceScene/selfManagedSourceLogic.tsx@@ -1,5 +1,6 @@-import { actions, connect, events, kea, listeners, path, props, reducers } from 'kea'+import { MakeLogicType, actions, connect, events, kea, listeners, path, props, reducers } from 'kea'import { forms } from 'kea-forms'+import type { DeepPartial, DeepPartialMap, FieldName, ValidationErrorType } from 'kea-forms'import { loaders } from 'kea-loaders'import { router } from 'kea-router'@@ -13,7 +14,6 @@ import { DataTableNode } from '~/queries/schema/schema-general'import { AnyPropertyFilter, DataWarehouseTable } from '~/types'import { sourceSceneLogic } from '../SourceScene/SourceScene'-import type { selfManagedSourceLogicType } from './selfManagedSourceLogicType'export interface TableLogicProps {/** A UUID or 'new'. */@@ -74,6 +74,146 @@ export function selfManagedTableFormErrors({}}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface selfManagedSourceLogicValues {+ dataTableQuery: DataTableNode | null+ isEditingTable: boolean+ isTableSubmitting: boolean+ isTableValid: boolean+ showTableErrors: boolean+ table: DataWarehouseTable+ tableAllErrors: Record<string, any>+ tableChanged: boolean+ tableErrors: DeepPartialMap<DataWarehouseTable, ValidationErrorType>+ tableHasErrors: boolean+ tableLoading: boolean+ tableManualErrors: Record<string, any>+ tableTouched: boolean+ tableTouches: Record<string, boolean>+ tableValidationErrors: DeepPartialMap<DataWarehouseTable, ValidationErrorType>+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface selfManagedSourceLogicActions {+ loadDatabase: ({ force }?: { force?: boolean }) => {+ force?: boolean+ } // databaseTableListLogic+ addConditionSet: () => {+ value: true+ }+ archiveTable: () => {+ value: true+ }+ createTable: (tablePayload: any) => any+ createTableFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ createTableSuccess: (+ table: DataWarehouseTable,+ payload?: any+ ) => {+ table: DataWarehouseTable+ payload?: any+ }+ editingTable: (editing: boolean) => {+ editing: boolean+ }+ launchTable: () => {+ value: true+ }+ loadTable: () => any+ loadTableFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadTableSuccess: (+ table: DataWarehouseTable,+ payload?: any+ ) => {+ table: DataWarehouseTable+ payload?: any+ }+ removeConditionSet: (index: number) => {+ index: number+ }+ resetTable: (values?: DataWarehouseTable) => {+ values?: DataWarehouseTable+ }+ setDataTableQuery: (query: DataTableNode) => {+ query: DataTableNode+ }+ setTableManualErrors: (errors: Record<string, any>) => {+ errors: Record<string, any>+ }+ setTableValue: (+ key: FieldName,+ value: any+ ) => {+ name: FieldName+ value: any+ }+ setTableValues: (values: DeepPartial<DataWarehouseTable>) => {+ values: DeepPartial<DataWarehouseTable>+ }+ stopTable: () => {+ value: true+ }+ submitTable: () => {+ value: boolean+ }+ submitTableFailure: (+ error: Error,+ errors: Record<string, any>+ ) => {+ error: Error+ errors: Record<string, any>+ }+ submitTableRequest: (table: DataWarehouseTable) => {+ table: DataWarehouseTable+ }+ submitTableSuccess: (table: DataWarehouseTable) => {+ table: DataWarehouseTable+ }+ touchTableField: (key: string) => {+ key: string+ }+ updateTable: (tablePayload: any) => any+ updateTableFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ updateTableSuccess: (+ table: DataWarehouseTable,+ payload?: any+ ) => {+ table: DataWarehouseTable+ payload?: any+ }+ updateTargetingFlagFilters: (+ index: number,+ properties: AnyPropertyFilter[]+ ) => {+ index: number+ properties: AnyPropertyFilter[]+ }+}++export type selfManagedSourceLogicType = MakeLogicType<+ selfManagedSourceLogicValues,+ selfManagedSourceLogicActions,+ TableLogicProps+>+export const selfManagedSourceLogic = kea<selfManagedSourceLogicType>([path(['products', 'dataWarehouse', 'selfManagedSourceLogic']),props({} as TableLogicProps),diff --git a/products/data_warehouse/frontend/scenes/NewSourceScene/sourceCatalogLogic.ts b/products/data_warehouse/frontend/scenes/NewSourceScene/sourceCatalogLogic.tsindex eae3779c4bf7..6860804ebfac 100644--- a/products/data_warehouse/frontend/scenes/NewSourceScene/sourceCatalogLogic.ts+++ b/products/data_warehouse/frontend/scenes/NewSourceScene/sourceCatalogLogic.ts@@ -1,5 +1,5 @@import FuseClass from 'fuse.js'-import { actions, connect, kea, listeners, path, props, reducers, selectors } from 'kea'+import { MakeLogicType, actions, connect, kea, listeners, path, props, reducers, selectors } from 'kea'import posthog from 'posthog-js'import { lemonToast } from '@posthog/lemon-ui'@@ -20,8 +20,9 @@ import {} from '~/queries/schema/schema-general'import { HogFunctionTemplateStatus } from '~/types'+import type { FeatureFlagsSet } from '../../../../../frontend/src/lib/logic/featureFlagLogic'+import type { ManualLinkSourceType, UserType } from '../../../../../frontend/src/types'import { availableSourcesLogic } from './availableSourcesLogic'-import type { sourceCatalogLogicType } from './sourceCatalogLogicType'import { sourceWizardLogic } from './sourceWizardLogic'// Helps kea-typegen reference the Fuse type without a bad `import { Fuse } from 'fuse.js'`.@@ -77,6 +78,943 @@ export interface CatalogCategory {count: number}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface sourceCatalogLogicValues {+ availableSources: Record<string, SourceConfig> | null // availableSourcesLogic+ featureFlags: FeatureFlagsSet // featureFlagLogic+ manualConnectors: {+ name: string+ type: ManualLinkSourceType+ }[] // sourceWizardLogic+ user: UserType | null // userLogic+ catalogFuse: Fuse+ catalogItems: CatalogItem[]+ categoriesWithCounts: CatalogCategory[]+ filteredItems: CatalogItem[]+ search: string+ selectedCategory: SourceCategoryFilter+ sourceRequestModalOpen: boolean+ sourceRequestText: string+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface sourceCatalogLogicActions {+ hideSourceRequest: () => {+ value: true+ }+ registerInterest: (item: CatalogItem) => {+ item: CatalogItem+ }+ selectSourceType: (item: CatalogItem) => {+ item: CatalogItem+ }+ setSearch: (search: string) => {+ search: string+ }+ setSelectedCategory: (category: SourceCategoryFilter) => {+ category: SourceCategoryFilter+ }+ setSourceRequestText: (text: string) => {+ text: string+ }+ showSourceRequest: () => {+ value: true+ }+ submitSourceRequest: () => {+ value: true+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface sourceCatalogLogicMeta {+ __keaTypeGenInternalSelectorTypes: {+ catalogItems: (+ availableSources: Record<string, SourceConfig> | null,+ manualConnectors: {+ name: string+ type: ManualLinkSourceType+ }[],+ featureFlags: FeatureFlagsSet,+ arg:+ | (+ | 'ActiveCampaign'+ | 'AcuityScheduling'+ | 'Adapty'+ | 'Adjust'+ | 'AdobeAnalytics'+ | 'AdobeCommerce'+ | 'AdpWorkforceNow'+ | 'AdRoll'+ | 'Adyen'+ | 'AgileCRM'+ | 'Aha'+ | 'Ahrefs'+ | 'AikidoSecurity'+ | 'Airbrake'+ | 'Airbyte'+ | 'Aircall'+ | 'AirOps'+ | 'Airtable'+ | 'Aiven'+ | 'Akeneo'+ | 'Algolia'+ | 'Alguna'+ | 'AlpacaBrokerAPI'+ | 'AlphaVantage'+ | 'AmazonAds'+ | 'AmazonCloudWatch'+ | 'AmazonEventBridge'+ | 'AmazonKinesis'+ | 'AmazonS3'+ | 'AmazonSellingPartner'+ | 'AmazonSNS'+ | 'AmazonSQS'+ | 'Amplitude'+ | 'Anthropic'+ | 'ApifyDataset'+ | 'Apollo'+ | 'Appcues'+ | 'Appdynamics'+ | 'Appfigures'+ | 'Appfollow'+ | 'AppleSearchAds'+ | 'AppLovin'+ | 'AppsFlyer'+ | 'Appsignal'+ | 'Appstack'+ | 'Apptivo'+ | 'Appwrite'+ | 'Argocd'+ | 'Asana'+ | 'Ashby'+ | 'Asknicely'+ | 'AssemblyAI'+ | 'Attentive'+ | 'Attio'+ | 'Auth0'+ | 'Automox'+ | 'Autumn'+ | 'Aviationstack'+ | 'Aviator'+ | 'Awin'+ | 'AwsCloudTrail'+ | 'AzureBlob'+ | 'AzureDevOps'+ | 'AzureTableStorage'+ | 'Babelforce'+ | 'Backblaze'+ | 'BambooHR'+ | 'Basecamp'+ | 'Baserow'+ | 'Baseten'+ | 'Beamer'+ | 'Bettermode'+ | 'BetterStack'+ | 'BigCommerce'+ | 'BigMailer'+ | 'BigQuery'+ | 'BingAds'+ | 'Bitbucket'+ | 'Bitly'+ | 'Bitrise'+ | 'BlandAI'+ | 'Blogger'+ | 'Bluetally'+ | 'BoldSign'+ | 'Box'+ | 'Braintree'+ | 'Braintrust'+ | 'Branch'+ | 'Braze'+ | 'Breezometer'+ | 'BreezyHR'+ | 'Brevo'+ | 'Brex'+ | 'BrowseAI'+ | 'Browserbase'+ | 'BrowserUse'+ | 'Bugsnag'+ | 'BuildBetter'+ | 'Buildkite'+ | 'Bunny'+ | 'Buzzsprout'+ | 'CalCom'+ | 'Calendly'+ | 'CallRail'+ | 'CampaignManager360'+ | 'CampaignMonitor'+ | 'Campayn'+ | 'Campfire'+ | 'Canny'+ | 'CapsuleCRM'+ | 'CaptainData'+ | 'CareQualityCommission'+ | 'CartCom'+ | 'CastorEDC'+ | 'Chameleon'+ | 'Chargebee'+ | 'Chargedesk'+ | 'Chargify'+ | 'ChartHop'+ | 'ChartMogul'+ | 'Chatwoot'+ | 'Checkmarx'+ | 'CheckoutCom'+ | 'Chift'+ | 'Chorus'+ | 'Churnkey'+ | 'Cimis'+ | 'Cin7'+ | 'CircleCI'+ | 'CircleciInsights'+ | 'CiscoDuo'+ | 'CiscoMeraki'+ | 'Clari'+ | 'Clarifai'+ | 'Clazar'+ | 'Clerk'+ | 'ClickHouse'+ | 'ClickhouseCloud'+ | 'ClickUp'+ | 'Clockify'+ | 'Clockodo'+ | 'Close'+ | 'Cloudbeds'+ | 'Cloudflare'+ | 'Coassemble'+ | 'CockroachDB'+ | 'Coda'+ | 'Codacy'+ | 'Codecov'+ | 'Codefresh'+ | 'Cody'+ | 'Cohere'+ | 'CoinApi'+ | 'CoinGecko'+ | 'CoinMarketCap'+ | 'Commercetools'+ | 'Concord'+ | 'ConfigCat'+ | 'Confluence'+ | 'ConfluentCloud'+ | 'ConstantContact'+ | 'ConvertKit'+ | 'Convex'+ | 'Copper'+ | 'Coralogix'+ | 'CosmosDB'+ | 'Couchbase'+ | 'Coupa'+ | 'Coveralls'+ | 'CratesIO'+ | 'Criteo'+ | 'Cronitor'+ | 'Crunchbase'+ | 'CultureAmp'+ | 'Cursor'+ | 'Curve'+ | 'Custom'+ | 'CustomerIO'+ | 'Customerly'+ | 'DagsterCloud'+ | 'Databricks'+ | 'Datadog'+ | 'Datahub'+ | 'Datascope'+ | 'Datorama'+ | 'Db2'+ | 'Dbt'+ | 'Decagon'+ | 'Deel'+ | 'Deepgram'+ | 'Deepsource'+ | 'Delighted'+ | 'DenoDeploy'+ | 'Deputy'+ | 'DevinAI'+ | 'DigitalOcean'+ | 'DingConnect'+ | 'DisplayVideo360'+ | 'Dixa'+ | 'Dockerhub'+ | 'Docuseal'+ | 'Docusign'+ | 'DodoPayments'+ | 'DoIt'+ | 'Dolibarr'+ | 'Doppler'+ | 'Drata'+ | 'Dremio'+ | 'Drip'+ | 'Dropbox'+ | 'DropboxSign'+ | 'Dub'+ | 'Dubsado'+ | 'Dwolla'+ | 'Dynamics365'+ | 'DynamoDB'+ | 'Dynatrace'+ | 'E2B'+ | 'Easypost'+ | 'Easypromos'+ | 'Ebay'+ | 'EConomic'+ | 'Elasticemail'+ | 'Elasticsearch'+ | 'ElevenLabs'+ | 'Eloqua'+ | 'EmailOctopus'+ | 'EmploymentHero'+ | 'Encharge'+ | 'Env0'+ | 'Eventbrite'+ | 'Eventee'+ | 'Eventzilla'+ | 'Everhour'+ | 'ExchangeRatesApi'+ | 'Expensify'+ | 'EZOfficeInventory'+ | 'FacebookPages'+ | 'Factorial'+ | 'Fastbill'+ | 'Fastly'+ | 'Fauna'+ | 'Featurebase'+ | 'Feishu'+ | 'Fillout'+ | 'Finage'+ | 'FinancialModelling'+ | 'Finnhub'+ | 'Finnworlds'+ | 'Fintoc'+ | 'Firebase'+ | 'Firebolt'+ | 'Firecrawl'+ | 'FireHydrant'+ | 'FireworksAI'+ | 'Flagsmith'+ | 'Fleetio'+ | 'Flexmail'+ | 'Flexport'+ | 'FloatApp'+ | 'Flowlu'+ | 'FlyIo'+ | 'Formbricks'+ | 'FreeAgent'+ | 'Freightview'+ | 'FreshBooks'+ | 'Freshcaller'+ | 'Freshchat'+ | 'Freshdesk'+ | 'Freshsales'+ | 'Freshservice'+ | 'Frill'+ | 'Front'+ | 'Fulcrum'+ | 'FullStory'+ | 'GainsightPx'+ | 'Gerrit'+ | 'GetStream'+ | 'Giphy'+ | 'GitBook'+ | 'Gitea'+ | 'Gitguardian'+ | 'Github'+ | 'GitLab'+ | 'Gladly'+ | 'Glassfrog'+ | 'Gmail'+ | 'GNews'+ | 'GoCardless'+ | 'Gojiberry'+ | 'Goldcast'+ | 'GoLogin'+ | 'Gong'+ | 'GoogleAdManager'+ | 'GoogleAds'+ | 'GoogleAnalytics'+ | 'GoogleCalendar'+ | 'GoogleChat'+ | 'GoogleClassroom'+ | 'GoogleCloudStorage'+ | 'GoogleDirectory'+ | 'GoogleDrive'+ | 'GoogleForms'+ | 'GooglePageSpeedInsights'+ | 'GoogleSearchConsole'+ | 'GoogleSheets'+ | 'GoogleTasks'+ | 'GoogleWebfonts'+ | 'GoogleWorkspaceAdminReports'+ | 'Gorgias'+ | 'Grafana'+ | 'Granola'+ | 'Greenhouse'+ | 'GreytHr'+ | 'Gridly'+ | 'Groq'+ | 'GrowthBook'+ | 'Guardian'+ | 'Gumloop'+ | 'Guru'+ | 'Gusto'+ | 'Harness'+ | 'Harvey'+ | 'Hatchet'+ | 'Healthchecks'+ | 'Heap'+ | 'Height'+ | 'Helicone'+ | 'Hellobaton'+ | 'HelpScout'+ | 'Heroku'+ | 'Hetzner'+ | 'Hex'+ | 'HeyGen'+ | 'HiBob'+ | 'HighLevel'+ | 'Hightouch'+ | 'Honeybadger'+ | 'Honeycomb'+ | 'HoorayHR'+ | 'Hubplanner'+ | 'Hubspot'+ | 'HuggingFace'+ | 'Humanitix'+ | 'Huntr'+ | 'Hyperspell'+ | 'Ikas'+ | 'IlluminaBasespace'+ | 'Imagga'+ | 'Impact'+ | 'IncidentIo'+ | 'Infisical'+ | 'Inflowinventory'+ | 'InforNexus'+ | 'Inngest'+ | 'Insightful'+ | 'Insightly'+ | 'Instagram'+ | 'Instana'+ | 'Instantly'+ | 'Instatus'+ | 'Intercom'+ | 'Interzoid'+ | 'Intruder'+ | 'Invoiced'+ | 'Invoiceninja'+ | 'IP2Whois'+ | 'Iterable'+ | 'JamfPro'+ | 'Jellyfish'+ | 'Jenkins'+ | 'JfrogArtifactory'+ | 'Jira'+ | 'Jobber'+ | 'JobNimbus'+ | 'Jotform'+ | 'JudgeMeReviews'+ | 'Jumpcloud'+ | 'JustCall'+ | 'JustSift'+ | 'K6Cloud'+ | 'Kafka'+ | 'Kajabi'+ | 'Kandji'+ | 'KapaAI'+ | 'Katana'+ | 'Keka'+ | 'Kernel'+ | 'Kickscale'+ | 'Kisi'+ | 'Kissmetrics'+ | 'Klarna'+ | 'Klaus'+ | 'Klaviyo'+ | 'Knock'+ | 'KongKonnect'+ | 'Koyeb'+ | 'Kubecost'+ | 'Kustomer'+ | 'KYVE'+ | 'Lacework'+ | 'Lago'+ | 'LambdaLabs'+ | 'Langfuse'+ | 'LangSmith'+ | 'Lattice'+ | 'LaunchDarkly'+ | 'Leadfeeder'+ | 'Leexi'+ | 'Lemlist'+ | 'LemonSqueezy'+ | 'LessAnnoyingCRM'+ | 'Lever'+ | 'Liana'+ | 'Lightfield'+ | 'LightspeedRetail'+ | 'Linear'+ | 'Linearb'+ | 'LingoDev'+ | 'LinkedinAds'+ | 'LinkedinPages'+ | 'Linkrunner'+ | 'Linnworks'+ | 'Linode'+ | 'LlamaCloud'+ | 'Lob'+ | 'LogzIO'+ | 'Lokalise'+ | 'Looker'+ | 'Loops'+ | 'Luma'+ | 'M3ter'+ | 'Mailchimp'+ | 'MailerLite'+ | 'MailerSend'+ | 'Mailgun'+ | 'Mailjet'+ | 'Mailosaur'+ | 'Mailtrap'+ | 'Mantle'+ | 'Marketo'+ | 'Marketstack'+ | 'Matomo'+ | 'Maxio'+ | 'Mem0'+ | 'Mendeley'+ | 'Mention'+ | 'MercadoAds'+ | 'Mercury'+ | 'Merge'+ | 'MetaAds'+ | 'Metabase'+ | 'Metaplane'+ | 'Metorial'+ | 'Metricool'+ | 'Metriport'+ | 'Metronome'+ | 'MicrosoftDataverse'+ | 'MicrosoftEntraId'+ | 'MicrosoftLists'+ | 'MicrosoftTeams'+ | 'Mintlify'+ | 'Miro'+ | 'Missive'+ | 'MistralAI'+ | 'MixMax'+ | 'Mixpanel'+ | 'Mode'+ | 'Mollie'+ | 'Monday'+ | 'MongoDB'+ | 'Mono'+ | 'MonteCarlo'+ | 'MSSQL'+ | 'Mux'+ | 'MyHours'+ | 'MySQL'+ | 'N8n'+ | 'Nasa'+ | 'Navan'+ | 'NebiusAI'+ | 'Neon'+ | 'Netlify'+ | 'NetSuite'+ | 'NewRelic'+ | 'NewsApi'+ | 'NewsData'+ | 'NewYorkTimes'+ | 'Nexiopay'+ | 'NextdoorAds'+ | 'NinjaOneRMM'+ | 'NoCRM'+ | 'Northflank'+ | 'NorthpassLMS'+ | 'Notion'+ | 'Nuget'+ | 'Nutshell'+ | 'Nylas'+ | 'Octolens'+ | 'OctopusDeploy'+ | 'Okta'+ | 'Omnisend'+ | 'Oncehub'+ | 'OneDrive'+ | 'OneHundredMs'+ | 'Onepagecrm'+ | 'OnePassword'+ | 'OneSignal'+ | 'Onfleet'+ | 'OpenAI'+ | 'OpenAIAds'+ | 'OpenAQ'+ | 'OpenDataDc'+ | 'OpenExchangeRates'+ | 'OpenFDA'+ | 'OpenRouter'+ | 'OpenWeather'+ | 'OpinionStage'+ | 'Opsgenie'+ | 'Optimizely'+ | 'OPUSWatch'+ | 'Oracle'+ | 'OracleEbs'+ | 'OracleFusion'+ | 'Orb'+ | 'Orbit'+ | 'OrcaSecurity'+ | 'Ortto'+ | 'Oura'+ | 'Outbrain'+ | 'Outlook'+ | 'Outreach'+ | 'Oveit'+ | 'PabblySubscriptionsBilling'+ | 'Packagist'+ | 'Paddle'+ | 'PagerDuty'+ | 'PandaDoc'+ | 'Paperform'+ | 'Papersign'+ | 'Pardot'+ | 'Partnerize'+ | 'PartnerStack'+ | 'PayFit'+ | 'Paylocity'+ | 'PayPal'+ | 'Paystack'+ | 'PeecAI'+ | 'Pendo'+ | 'Pennylane'+ | 'Perigon'+ | 'Perk'+ | 'PersistIq'+ | 'Persona'+ | 'Personio'+ | 'Pexels'+ | 'PgAnalyze'+ | 'Phyllo'+ | 'Picqer'+ | 'Pinecone'+ | 'Pingdom'+ | 'PinterestAds'+ | 'Pipedrive'+ | 'Pipeliner'+ | 'PivotalTracker'+ | 'Piwik'+ | 'Plaid'+ | 'Plain'+ | 'PlanetScale'+ | 'Planhat'+ | 'PlatformSh'+ | 'Plausible'+ | 'Plunk'+ | 'Pocket'+ | 'Podium'+ | 'Polar'+ | 'Polygon'+ | 'Poplar'+ | 'Postgres'+ | 'Postmark'+ | 'PrefectCloud'+ | 'PrestaShop'+ | 'Pretix'+ | 'Primetric'+ | 'Printify'+ | 'Productboard'+ | 'Productive'+ | 'PromptingCompany'+ | 'PulumiCloud'+ | 'Pylon'+ | 'PyPI'+ | 'Qdrant'+ | 'Qonto'+ | 'Qualaroo'+ | 'Qualtrics'+ | 'QualysVmdr'+ | 'QuickBooks'+ | 'Railway'+ | 'Railz'+ | 'Ramp'+ | 'Rapid7Insightvm'+ | 'Raygun'+ | 'Razorpay'+ | 'RB2B'+ | 'RDStationMarketing'+ | 'Recharge'+ | 'Recreation'+ | 'Recruitee'+ | 'Recurly'+ | 'Reddit'+ | 'RedditAds'+ | 'Redis'+ | 'Redshift'+ | 'ReferralHero'+ | 'Render'+ | 'RentCast'+ | 'Repairshopr'+ | 'Replicate'+ | 'ReplyIo'+ | 'Resend'+ | 'RetailExpress'+ | 'RetellAI'+ | 'Retently'+ | 'RevenueCat'+ | 'RevolutMerchant'+ | 'RingCentral'+ | 'Rippling'+ | 'RKICovid'+ | 'Roark'+ | 'RocketChat'+ | 'Rocketlane'+ | 'Rollbar'+ | 'Rootly'+ | 'Rss'+ | 'RudderStack'+ | 'Ruddr'+ | 'RunPod'+ | 'SafetyCulture'+ | 'SageHR'+ | 'SageIntacct'+ | 'Sailthru'+ | 'Salesflare'+ | 'Salesforce'+ | 'SalesforceMarketingCloud'+ | 'SalesLoft'+ | 'Salestrics'+ | 'Sanity'+ | 'SapConcur'+ | 'SapErp'+ | 'SAPFieldglass'+ | 'SapHana'+ | 'SapSuccessFactors'+ | 'SavvyCal'+ | 'ScaleAI'+ | 'Scaleway'+ | 'SearchAds360'+ | 'Secoda'+ | 'Secureframe'+ | 'Segment'+ | 'Semaphore'+ | 'Semgrep'+ | 'SendGrid'+ | 'Sendowl'+ | 'SendPulse'+ | 'Senseforce'+ | 'Sentinelone'+ | 'Sentry'+ | 'Serpstat'+ | 'ServiceNow'+ | 'SevenShifts'+ | 'SFTP'+ | 'SharePoint'+ | 'Sharetribe'+ | 'Shippo'+ | 'ShipStation'+ | 'Shopify'+ | 'Shopware'+ | 'ShopWired'+ | 'Shortcut'+ | 'Shortio'+ | 'Shutterstock'+ | 'SigmaComputing'+ | 'SignNow'+ | 'SigNoz'+ | 'Sim'+ | 'SimFin'+ | 'SimpleCast'+ | 'Simplesat'+ | 'Singular'+ | 'Skyvern'+ | 'Slack'+ | 'Slash'+ | 'Smaily'+ | 'SmartEngage'+ | 'Smartreach'+ | 'Smartsheet'+ | 'Smartwaiver'+ | 'SnapchatAds'+ | 'Snowflake'+ | 'Snowplow'+ | 'Snyk'+ | 'SolarwindsServiceDesk'+ | 'SonarCloud'+ | 'Sonarqube'+ | 'SonatypeNexus'+ | 'Sourcegraph'+ | 'Spacelift'+ | 'SparkPost'+ | 'SplitIo'+ | 'SplunkObservabilityCloud'+ | 'SpotifyAds'+ | 'SpotlerCRM'+ | 'Squadcast'+ | 'Square'+ | 'Squarespace'+ | 'Statsig'+ | 'Statuscake'+ | 'Statuspage'+ | 'Stigg'+ | 'StockData'+ | 'Strava'+ | 'StreamElements'+ | 'Streamlabs'+ | 'Stripe'+ | 'Stytch'+ | 'SumoLogic'+ | 'Sumsub'+ | 'Supabase'+ | 'Superwall'+ | 'SurveyMonkey'+ | 'SurveySparrow'+ | 'Survicate'+ | 'Svix'+ | 'Swarmia'+ | 'Swonkie'+ | 'Synthesia'+ | 'Systeme'+ | 'Taboola'+ | 'Tailscale'+ | 'Talkwalker'+ | 'Tavus'+ | 'TawkTo'+ | 'Teachable'+ | 'Teamcity'+ | 'Teamtailor'+ | 'Teamwork'+ | 'Telli'+ | 'Tempo'+ | 'TemporalIO'+ | 'TenableVulnerabilityManagement'+ | 'TerraApi'+ | 'TerraformCloud'+ | 'Testrail'+ | 'Thinkific'+ | 'ThinkificCourses'+ | 'ThriveLearning'+ | 'Ticketmaster'+ | 'TicketTailor'+ | 'TickTick'+ | 'TikTokAds'+ | 'Tile38'+ | 'Timely'+ | 'Tinyemail'+ | 'TMDb'+ | 'Todoist'+ | 'TogetherAI'+ | 'Toggl'+ | 'TrackPMS'+ | 'TravisCI'+ | 'Trello'+ | 'Tremendous'+ | 'TriggerDev'+ | 'TrustPilot'+ | 'Turso'+ | 'TVMaze'+ | 'TwelveData'+ | 'TwelveLabs'+ | 'Twenty'+ | 'Twilio'+ | 'Twitter'+ | 'TwitterAds'+ | 'TyntecSMS'+ | 'Typeform'+ | 'Ubidots'+ | 'Unleash'+ | 'Unstructured'+ | 'UpPromote'+ | 'Upstash'+ | 'Uptick'+ | 'Uptimerobot'+ | 'USCensus'+ | 'Usersnap'+ | 'Uservoice'+ | 'Vantage'+ | 'Vapi'+ | 'Veeqo'+ | 'Vellum'+ | 'Veracode'+ | 'Vercel'+ | 'Vespa'+ | 'VismaEconomic'+ | 'Vitally'+ | 'Vultr'+ | 'VWO'+ | 'Waiteraid'+ | 'Wasabi'+ | 'Watchmode'+ | 'Webflow'+ | 'WeightsAndBiases'+ | 'WhenIWork'+ | 'WikipediaPageviews'+ | 'Windmill'+ | 'WooCommerce'+ | 'Wordpress'+ | 'Workable'+ | 'Workday'+ | 'Workflowmax'+ | 'WorkOS'+ | 'Workramp'+ | 'Wrike'+ | 'Writesonic'+ | 'Wufoo'+ | 'Xero'+ | 'Xmatters'+ | 'Xsolla'+ | 'YahooFinance'+ | 'YandexMetrica'+ | 'Ynab'+ | 'Yotpo'+ | 'Younium'+ | 'YouSign'+ | 'YouTubeAnalytics'+ | 'YoutubeData'+ | 'ZapierSupportedStorage'+ | 'ZapSign'+ | 'Zellify'+ | 'Zendesk'+ | 'ZendeskSell'+ | 'ZendeskSunshine'+ | 'Zenduty'+ | 'Zenefits'+ | 'Zenloop'+ | 'Zep'+ | 'ZohoAnalytics'+ | 'ZohoBigin'+ | 'ZohoBilling'+ | 'ZohoBooks'+ | 'ZohoCampaign'+ | 'ZohoCRM'+ | 'ZohoDesk'+ | 'ZohoExpense'+ | 'ZohoInventory'+ | 'ZohoInvoice'+ | 'ZonkaFeedback'+ | 'Zoom'+ | 'ZoomInfo'+ | 'Zuora'+ )[]+ | undefined+ ) => CatalogItem[]+ categoriesWithCounts: (catalogItems: CatalogItem[]) => CatalogCategory[]+ catalogFuse: (catalogItems: CatalogItem[]) => Fuse+ filteredItems: (+ catalogItems: CatalogItem[],+ catalogFuse: Fuse,+ search: string,+ selectedCategory: SourceCategoryFilter+ ) => CatalogItem[]+ }+}++export type sourceCatalogLogicType = MakeLogicType<+ sourceCatalogLogicValues,+ sourceCatalogLogicActions,+ SourceCatalogLogicProps,+ sourceCatalogLogicMeta+>+export const sourceCatalogLogic = kea<sourceCatalogLogicType>([path(['products', 'dataWarehouse', 'sourceCatalogLogic']),props({} as SourceCatalogLogicProps),@@ -138,7 +1076,875 @@ export const sourceCatalogLogic = kea<sourceCatalogLogicType>([s.featureFlags,(_, p: SourceCatalogLogicProps) => p.allowedSources,],- (availableSources, manualConnectors, featureFlags, allowedSources): CatalogItem[] => {+ (+ availableSources: Record<string, SourceConfig> | null,+ manualConnectors: {+ name: string+ type: import('~/types').ManualLinkSourceType+ }[],+ featureFlags: import('lib/logic/featureFlagLogic').FeatureFlagsSet,+ allowedSources:+ | (+ | 'ActiveCampaign'+ | 'AcuityScheduling'+ | 'Adapty'+ | 'Adjust'+ | 'AdobeAnalytics'+ | 'AdobeCommerce'+ | 'AdpWorkforceNow'+ | 'AdRoll'+ | 'Adyen'+ | 'AgileCRM'+ | 'Aha'+ | 'Ahrefs'+ | 'AikidoSecurity'+ | 'Airbrake'+ | 'Airbyte'+ | 'Aircall'+ | 'AirOps'+ | 'Airtable'+ | 'Aiven'+ | 'Akeneo'+ | 'Algolia'+ | 'Alguna'+ | 'AlpacaBrokerAPI'+ | 'AlphaVantage'+ | 'AmazonAds'+ | 'AmazonCloudWatch'+ | 'AmazonEventBridge'+ | 'AmazonKinesis'+ | 'AmazonS3'+ | 'AmazonSellingPartner'+ | 'AmazonSNS'+ | 'AmazonSQS'+ | 'Amplitude'+ | 'Anthropic'+ | 'ApifyDataset'+ | 'Apollo'+ | 'Appcues'+ | 'Appdynamics'+ | 'Appfigures'+ | 'Appfollow'+ | 'AppleSearchAds'+ | 'AppLovin'+ | 'AppsFlyer'+ | 'Appsignal'+ | 'Appstack'+ | 'Apptivo'+ | 'Appwrite'+ | 'Argocd'+ | 'Asana'+ | 'Ashby'+ | 'Asknicely'+ | 'AssemblyAI'+ | 'Attentive'+ | 'Attio'+ | 'Auth0'+ | 'Automox'+ | 'Autumn'+ | 'Aviationstack'+ | 'Aviator'+ | 'Awin'+ | 'AwsCloudTrail'+ | 'AzureBlob'+ | 'AzureDevOps'+ | 'AzureTableStorage'+ | 'Babelforce'+ | 'Backblaze'+ | 'BambooHR'+ | 'Basecamp'+ | 'Baserow'+ | 'Baseten'+ | 'Beamer'+ | 'Bettermode'+ | 'BetterStack'+ | 'BigCommerce'+ | 'BigMailer'+ | 'BigQuery'+ | 'BingAds'+ | 'Bitbucket'+ | 'Bitly'+ | 'Bitrise'+ | 'BlandAI'+ | 'Blogger'+ | 'Bluetally'+ | 'BoldSign'+ | 'Box'+ | 'Braintree'+ | 'Braintrust'+ | 'Branch'+ | 'Braze'+ | 'Breezometer'+ | 'BreezyHR'+ | 'Brevo'+ | 'Brex'+ | 'BrowseAI'+ | 'Browserbase'+ | 'BrowserUse'+ | 'Bugsnag'+ | 'BuildBetter'+ | 'Buildkite'+ | 'Bunny'+ | 'Buzzsprout'+ | 'CalCom'+ | 'Calendly'+ | 'CallRail'+ | 'CampaignManager360'+ | 'CampaignMonitor'+ | 'Campayn'+ | 'Campfire'+ | 'Canny'+ | 'CapsuleCRM'+ | 'CaptainData'+ | 'CareQualityCommission'+ | 'CartCom'+ | 'CastorEDC'+ | 'Chameleon'+ | 'Chargebee'+ | 'Chargedesk'+ | 'Chargify'+ | 'ChartHop'+ | 'ChartMogul'+ | 'Chatwoot'+ | 'Checkmarx'+ | 'CheckoutCom'+ | 'Chift'+ | 'Chorus'+ | 'Churnkey'+ | 'Cimis'+ | 'Cin7'+ | 'CircleCI'+ | 'CircleciInsights'+ | 'CiscoDuo'+ | 'CiscoMeraki'+ | 'Clari'+ | 'Clarifai'+ | 'Clazar'+ | 'Clerk'+ | 'ClickHouse'+ | 'ClickhouseCloud'+ | 'ClickUp'+ | 'Clockify'+ | 'Clockodo'+ | 'Close'+ | 'Cloudbeds'+ | 'Cloudflare'+ | 'Coassemble'+ | 'CockroachDB'+ | 'Coda'+ | 'Codacy'+ | 'Codecov'+ | 'Codefresh'+ | 'Cody'+ | 'Cohere'+ | 'CoinApi'+ | 'CoinGecko'+ | 'CoinMarketCap'+ | 'Commercetools'+ | 'Concord'+ | 'ConfigCat'+ | 'Confluence'+ | 'ConfluentCloud'+ | 'ConstantContact'+ | 'ConvertKit'+ | 'Convex'+ | 'Copper'+ | 'Coralogix'+ | 'CosmosDB'+ | 'Couchbase'+ | 'Coupa'+ | 'Coveralls'+ | 'CratesIO'+ | 'Criteo'+ | 'Cronitor'+ | 'Crunchbase'+ | 'CultureAmp'+ | 'Cursor'+ | 'Curve'+ | 'Custom'+ | 'CustomerIO'+ | 'Customerly'+ | 'DagsterCloud'+ | 'Databricks'+ | 'Datadog'+ | 'Datahub'+ | 'Datascope'+ | 'Datorama'+ | 'Db2'+ | 'Dbt'+ | 'Decagon'+ | 'Deel'+ | 'Deepgram'+ | 'Deepsource'+ | 'Delighted'+ | 'DenoDeploy'+ | 'Deputy'+ | 'DevinAI'+ | 'DigitalOcean'+ | 'DingConnect'+ | 'DisplayVideo360'+ | 'Dixa'+ | 'Dockerhub'+ | 'Docuseal'+ | 'Docusign'+ | 'DodoPayments'+ | 'DoIt'+ | 'Dolibarr'+ | 'Doppler'+ | 'Drata'+ | 'Dremio'+ | 'Drip'+ | 'Dropbox'+ | 'DropboxSign'+ | 'Dub'+ | 'Dubsado'+ | 'Dwolla'+ | 'Dynamics365'+ | 'DynamoDB'+ | 'Dynatrace'+ | 'E2B'+ | 'Easypost'+ | 'Easypromos'+ | 'Ebay'+ | 'EConomic'+ | 'Elasticemail'+ | 'Elasticsearch'+ | 'ElevenLabs'+ | 'Eloqua'+ | 'EmailOctopus'+ | 'EmploymentHero'+ | 'Encharge'+ | 'Env0'+ | 'Eventbrite'+ | 'Eventee'+ | 'Eventzilla'+ | 'Everhour'+ | 'ExchangeRatesApi'+ | 'Expensify'+ | 'EZOfficeInventory'+ | 'FacebookPages'+ | 'Factorial'+ | 'Fastbill'+ | 'Fastly'+ | 'Fauna'+ | 'Featurebase'+ | 'Feishu'+ | 'Fillout'+ | 'Finage'+ | 'FinancialModelling'+ | 'Finnhub'+ | 'Finnworlds'+ | 'Fintoc'+ | 'Firebase'+ | 'Firebolt'+ | 'Firecrawl'+ | 'FireHydrant'+ | 'FireworksAI'+ | 'Flagsmith'+ | 'Fleetio'+ | 'Flexmail'+ | 'Flexport'+ | 'FloatApp'+ | 'Flowlu'+ | 'FlyIo'+ | 'Formbricks'+ | 'FreeAgent'+ | 'Freightview'+ | 'FreshBooks'+ | 'Freshcaller'+ | 'Freshchat'+ | 'Freshdesk'+ | 'Freshsales'+ | 'Freshservice'+ | 'Frill'+ | 'Front'+ | 'Fulcrum'+ | 'FullStory'+ | 'GainsightPx'+ | 'Gerrit'+ | 'GetStream'+ | 'Giphy'+ | 'GitBook'+ | 'Gitea'+ | 'Gitguardian'+ | 'Github'+ | 'GitLab'+ | 'Gladly'+ | 'Glassfrog'+ | 'Gmail'+ | 'GNews'+ | 'GoCardless'+ | 'Gojiberry'+ | 'Goldcast'+ | 'GoLogin'+ | 'Gong'+ | 'GoogleAdManager'+ | 'GoogleAds'+ | 'GoogleAnalytics'+ | 'GoogleCalendar'+ | 'GoogleChat'+ | 'GoogleClassroom'+ | 'GoogleCloudStorage'+ | 'GoogleDirectory'+ | 'GoogleDrive'+ | 'GoogleForms'+ | 'GooglePageSpeedInsights'+ | 'GoogleSearchConsole'+ | 'GoogleSheets'+ | 'GoogleTasks'+ | 'GoogleWebfonts'+ | 'GoogleWorkspaceAdminReports'+ | 'Gorgias'+ | 'Grafana'+ | 'Granola'+ | 'Greenhouse'+ | 'GreytHr'+ | 'Gridly'+ | 'Groq'+ | 'GrowthBook'+ | 'Guardian'+ | 'Gumloop'+ | 'Guru'+ | 'Gusto'+ | 'Harness'+ | 'Harvey'+ | 'Hatchet'+ | 'Healthchecks'+ | 'Heap'+ | 'Height'+ | 'Helicone'+ | 'Hellobaton'+ | 'HelpScout'+ | 'Heroku'+ | 'Hetzner'+ | 'Hex'+ | 'HeyGen'+ | 'HiBob'+ | 'HighLevel'+ | 'Hightouch'+ | 'Honeybadger'+ | 'Honeycomb'+ | 'HoorayHR'+ | 'Hubplanner'+ | 'Hubspot'+ | 'HuggingFace'+ | 'Humanitix'+ | 'Huntr'+ | 'Hyperspell'+ | 'Ikas'+ | 'IlluminaBasespace'+ | 'Imagga'+ | 'Impact'+ | 'IncidentIo'+ | 'Infisical'+ | 'Inflowinventory'+ | 'InforNexus'+ | 'Inngest'+ | 'Insightful'+ | 'Insightly'+ | 'Instagram'+ | 'Instana'+ | 'Instantly'+ | 'Instatus'+ | 'Intercom'+ | 'Interzoid'+ | 'Intruder'+ | 'Invoiced'+ | 'Invoiceninja'+ | 'IP2Whois'+ | 'Iterable'+ | 'JamfPro'+ | 'Jellyfish'+ | 'Jenkins'+ | 'JfrogArtifactory'+ | 'Jira'+ | 'Jobber'+ | 'JobNimbus'+ | 'Jotform'+ | 'JudgeMeReviews'+ | 'Jumpcloud'+ | 'JustCall'+ | 'JustSift'+ | 'K6Cloud'+ | 'Kafka'+ | 'Kajabi'+ | 'Kandji'+ | 'KapaAI'+ | 'Katana'+ | 'Keka'+ | 'Kernel'+ | 'Kickscale'+ | 'Kisi'+ | 'Kissmetrics'+ | 'Klarna'+ | 'Klaus'+ | 'Klaviyo'+ | 'Knock'+ | 'KongKonnect'+ | 'Koyeb'+ | 'Kubecost'+ | 'Kustomer'+ | 'KYVE'+ | 'Lacework'+ | 'Lago'+ | 'LambdaLabs'+ | 'Langfuse'+ | 'LangSmith'+ | 'Lattice'+ | 'LaunchDarkly'+ | 'Leadfeeder'+ | 'Leexi'+ | 'Lemlist'+ | 'LemonSqueezy'+ | 'LessAnnoyingCRM'+ | 'Lever'+ | 'Liana'+ | 'Lightfield'+ | 'LightspeedRetail'+ | 'Linear'+ | 'Linearb'+ | 'LingoDev'+ | 'LinkedinAds'+ | 'LinkedinPages'+ | 'Linkrunner'+ | 'Linnworks'+ | 'Linode'+ | 'LlamaCloud'+ | 'Lob'+ | 'LogzIO'+ | 'Lokalise'+ | 'Looker'+ | 'Loops'+ | 'Luma'+ | 'M3ter'+ | 'Mailchimp'+ | 'MailerLite'+ | 'MailerSend'+ | 'Mailgun'+ | 'Mailjet'+ | 'Mailosaur'+ | 'Mailtrap'+ | 'Mantle'+ | 'Marketo'+ | 'Marketstack'+ | 'Matomo'+ | 'Maxio'+ | 'Mem0'+ | 'Mendeley'+ | 'Mention'+ | 'MercadoAds'+ | 'Mercury'+ | 'Merge'+ | 'MetaAds'+ | 'Metabase'+ | 'Metaplane'+ | 'Metorial'+ | 'Metricool'+ | 'Metriport'+ | 'Metronome'+ | 'MicrosoftDataverse'+ | 'MicrosoftEntraId'+ | 'MicrosoftLists'+ | 'MicrosoftTeams'+ | 'Mintlify'+ | 'Miro'+ | 'Missive'+ | 'MistralAI'+ | 'MixMax'+ | 'Mixpanel'+ | 'Mode'+ | 'Mollie'+ | 'Monday'+ | 'MongoDB'+ | 'Mono'+ | 'MonteCarlo'+ | 'MSSQL'+ | 'Mux'+ | 'MyHours'+ | 'MySQL'+ | 'N8n'+ | 'Nasa'+ | 'Navan'+ | 'NebiusAI'+ | 'Neon'+ | 'Netlify'+ | 'NetSuite'+ | 'NewRelic'+ | 'NewsApi'+ | 'NewsData'+ | 'NewYorkTimes'+ | 'Nexiopay'+ | 'NextdoorAds'+ | 'NinjaOneRMM'+ | 'NoCRM'+ | 'Northflank'+ | 'NorthpassLMS'+ | 'Notion'+ | 'Nuget'+ | 'Nutshell'+ | 'Nylas'+ | 'Octolens'+ | 'OctopusDeploy'+ | 'Okta'+ | 'Omnisend'+ | 'Oncehub'+ | 'OneDrive'+ | 'OneHundredMs'+ | 'Onepagecrm'+ | 'OnePassword'+ | 'OneSignal'+ | 'Onfleet'+ | 'OpenAI'+ | 'OpenAIAds'+ | 'OpenAQ'+ | 'OpenDataDc'+ | 'OpenExchangeRates'+ | 'OpenFDA'+ | 'OpenRouter'+ | 'OpenWeather'+ | 'OpinionStage'+ | 'Opsgenie'+ | 'Optimizely'+ | 'OPUSWatch'+ | 'Oracle'+ | 'OracleEbs'+ | 'OracleFusion'+ | 'Orb'+ | 'Orbit'+ | 'OrcaSecurity'+ | 'Ortto'+ | 'Oura'+ | 'Outbrain'+ | 'Outlook'+ | 'Outreach'+ | 'Oveit'+ | 'PabblySubscriptionsBilling'+ | 'Packagist'+ | 'Paddle'+ | 'PagerDuty'+ | 'PandaDoc'+ | 'Paperform'+ | 'Papersign'+ | 'Pardot'+ | 'Partnerize'+ | 'PartnerStack'+ | 'PayFit'+ | 'Paylocity'+ | 'PayPal'+ | 'Paystack'+ | 'PeecAI'+ | 'Pendo'+ | 'Pennylane'+ | 'Perigon'+ | 'Perk'+ | 'PersistIq'+ | 'Persona'+ | 'Personio'+ | 'Pexels'+ | 'PgAnalyze'+ | 'Phyllo'+ | 'Picqer'+ | 'Pinecone'+ | 'Pingdom'+ | 'PinterestAds'+ | 'Pipedrive'+ | 'Pipeliner'+ | 'PivotalTracker'+ | 'Piwik'+ | 'Plaid'+ | 'Plain'+ | 'PlanetScale'+ | 'Planhat'+ | 'PlatformSh'+ | 'Plausible'+ | 'Plunk'+ | 'Pocket'+ | 'Podium'+ | 'Polar'+ | 'Polygon'+ | 'Poplar'+ | 'Postgres'+ | 'Postmark'+ | 'PrefectCloud'+ | 'PrestaShop'+ | 'Pretix'+ | 'Primetric'+ | 'Printify'+ | 'Productboard'+ | 'Productive'+ | 'PromptingCompany'+ | 'PulumiCloud'+ | 'Pylon'+ | 'PyPI'+ | 'Qdrant'+ | 'Qonto'+ | 'Qualaroo'+ | 'Qualtrics'+ | 'QualysVmdr'+ | 'QuickBooks'+ | 'Railway'+ | 'Railz'+ | 'Ramp'+ | 'Rapid7Insightvm'+ | 'Raygun'+ | 'Razorpay'+ | 'RB2B'+ | 'RDStationMarketing'+ | 'Recharge'+ | 'Recreation'+ | 'Recruitee'+ | 'Recurly'+ | 'Reddit'+ | 'RedditAds'+ | 'Redis'+ | 'Redshift'+ | 'ReferralHero'+ | 'Render'+ | 'RentCast'+ | 'Repairshopr'+ | 'Replicate'+ | 'ReplyIo'+ | 'Resend'+ | 'RetailExpress'+ | 'RetellAI'+ | 'Retently'+ | 'RevenueCat'+ | 'RevolutMerchant'+ | 'RingCentral'+ | 'Rippling'+ | 'RKICovid'+ | 'Roark'+ | 'RocketChat'+ | 'Rocketlane'+ | 'Rollbar'+ | 'Rootly'+ | 'Rss'+ | 'RudderStack'+ | 'Ruddr'+ | 'RunPod'+ | 'SafetyCulture'+ | 'SageHR'+ | 'SageIntacct'+ | 'Sailthru'+ | 'Salesflare'+ | 'Salesforce'+ | 'SalesforceMarketingCloud'+ | 'SalesLoft'+ | 'Salestrics'+ | 'Sanity'+ | 'SapConcur'+ | 'SapErp'+ | 'SAPFieldglass'+ | 'SapHana'+ | 'SapSuccessFactors'+ | 'SavvyCal'+ | 'ScaleAI'+ | 'Scaleway'+ | 'SearchAds360'+ | 'Secoda'+ | 'Secureframe'+ | 'Segment'+ | 'Semaphore'+ | 'Semgrep'+ | 'SendGrid'+ | 'Sendowl'+ | 'SendPulse'+ | 'Senseforce'+ | 'Sentinelone'+ | 'Sentry'+ | 'Serpstat'+ | 'ServiceNow'+ | 'SevenShifts'+ | 'SFTP'+ | 'SharePoint'+ | 'Sharetribe'+ | 'Shippo'+ | 'ShipStation'+ | 'Shopify'+ | 'Shopware'+ | 'ShopWired'+ | 'Shortcut'+ | 'Shortio'+ | 'Shutterstock'+ | 'SigmaComputing'+ | 'SignNow'+ | 'SigNoz'+ | 'Sim'+ | 'SimFin'+ | 'SimpleCast'+ | 'Simplesat'+ | 'Singular'+ | 'Skyvern'+ | 'Slack'+ | 'Slash'+ | 'Smaily'+ | 'SmartEngage'+ | 'Smartreach'+ | 'Smartsheet'+ | 'Smartwaiver'+ | 'SnapchatAds'+ | 'Snowflake'+ | 'Snowplow'+ | 'Snyk'+ | 'SolarwindsServiceDesk'+ | 'SonarCloud'+ | 'Sonarqube'+ | 'SonatypeNexus'+ | 'Sourcegraph'+ | 'Spacelift'+ | 'SparkPost'+ | 'SplitIo'+ | 'SplunkObservabilityCloud'+ | 'SpotifyAds'+ | 'SpotlerCRM'+ | 'Squadcast'+ | 'Square'+ | 'Squarespace'+ | 'Statsig'+ | 'Statuscake'+ | 'Statuspage'+ | 'Stigg'+ | 'StockData'+ | 'Strava'+ | 'StreamElements'+ | 'Streamlabs'+ | 'Stripe'+ | 'Stytch'+ | 'SumoLogic'+ | 'Sumsub'+ | 'Supabase'+ | 'Superwall'+ | 'SurveyMonkey'+ | 'SurveySparrow'+ | 'Survicate'+ | 'Svix'+ | 'Swarmia'+ | 'Swonkie'+ | 'Synthesia'+ | 'Systeme'+ | 'Taboola'+ | 'Tailscale'+ | 'Talkwalker'+ | 'Tavus'+ | 'TawkTo'+ | 'Teachable'+ | 'Teamcity'+ | 'Teamtailor'+ | 'Teamwork'+ | 'Telli'+ | 'Tempo'+ | 'TemporalIO'+ | 'TenableVulnerabilityManagement'+ | 'TerraApi'+ | 'TerraformCloud'+ | 'Testrail'+ | 'Thinkific'+ | 'ThinkificCourses'+ | 'ThriveLearning'+ | 'Ticketmaster'+ | 'TicketTailor'+ | 'TickTick'+ | 'TikTokAds'+ | 'Tile38'+ | 'Timely'+ | 'Tinyemail'+ | 'TMDb'+ | 'Todoist'+ | 'TogetherAI'+ | 'Toggl'+ | 'TrackPMS'+ | 'TravisCI'+ | 'Trello'+ | 'Tremendous'+ | 'TriggerDev'+ | 'TrustPilot'+ | 'Turso'+ | 'TVMaze'+ | 'TwelveData'+ | 'TwelveLabs'+ | 'Twenty'+ | 'Twilio'+ | 'Twitter'+ | 'TwitterAds'+ | 'TyntecSMS'+ | 'Typeform'+ | 'Ubidots'+ | 'Unleash'+ | 'Unstructured'+ | 'UpPromote'+ | 'Upstash'+ | 'Uptick'+ | 'Uptimerobot'+ | 'USCensus'+ | 'Usersnap'+ | 'Uservoice'+ | 'Vantage'+ | 'Vapi'+ | 'Veeqo'+ | 'Vellum'+ | 'Veracode'+ | 'Vercel'+ | 'Vespa'+ | 'VismaEconomic'+ | 'Vitally'+ | 'Vultr'+ | 'VWO'+ | 'Waiteraid'+ | 'Wasabi'+ | 'Watchmode'+ | 'Webflow'+ | 'WeightsAndBiases'+ | 'WhenIWork'+ | 'WikipediaPageviews'+ | 'Windmill'+ | 'WooCommerce'+ | 'Wordpress'+ | 'Workable'+ | 'Workday'+ | 'Workflowmax'+ | 'WorkOS'+ | 'Workramp'+ | 'Wrike'+ | 'Writesonic'+ | 'Wufoo'+ | 'Xero'+ | 'Xmatters'+ | 'Xsolla'+ | 'YahooFinance'+ | 'YandexMetrica'+ | 'Ynab'+ | 'Yotpo'+ | 'Younium'+ | 'YouSign'+ | 'YouTubeAnalytics'+ | 'YoutubeData'+ | 'ZapierSupportedStorage'+ | 'ZapSign'+ | 'Zellify'+ | 'Zendesk'+ | 'ZendeskSell'+ | 'ZendeskSunshine'+ | 'Zenduty'+ | 'Zenefits'+ | 'Zenloop'+ | 'Zep'+ | 'ZohoAnalytics'+ | 'ZohoBigin'+ | 'ZohoBilling'+ | 'ZohoBooks'+ | 'ZohoCampaign'+ | 'ZohoCRM'+ | 'ZohoDesk'+ | 'ZohoExpense'+ | 'ZohoInventory'+ | 'ZohoInvoice'+ | 'ZonkaFeedback'+ | 'Zoom'+ | 'ZoomInfo'+ | 'Zuora'+ )[]+ | undefined+ ): CatalogItem[] => {const managed = Object.values(availableSources ?? {}).filter((c) => !allowedSources || allowedSources.includes(c.name)).map((connector: SourceConfig): CatalogItem => {@@ -193,7 +1999,7 @@ export const sourceCatalogLogic = kea<sourceCatalogLogicType>([categoriesWithCounts: [(s) => [s.catalogItems],- (catalogItems): CatalogCategory[] => {+ (catalogItems: CatalogItem[]): CatalogCategory[] => {const counts = new Map<DataWarehouseSourceCategory, number>()for (const item of catalogItems) {counts.set(item.category, (counts.get(item.category) ?? 0) + 1)@@ -218,7 +2024,7 @@ export const sourceCatalogLogic = kea<sourceCatalogLogicType>([catalogFuse: [(s) => [s.catalogItems],- (catalogItems): Fuse =>+ (catalogItems: CatalogItem[]): Fuse =>createFuse(catalogItems, {keys: ['label', 'name', 'keywords', 'category'],}),@@ -226,7 +2032,12 @@ export const sourceCatalogLogic = kea<sourceCatalogLogicType>([filteredItems: [(s) => [s.catalogItems, s.catalogFuse, s.search, s.selectedCategory],- (catalogItems, catalogFuse, search, selectedCategory): CatalogItem[] => {+ (+ catalogItems: CatalogItem[],+ catalogFuse: Fuse,+ search: string,+ selectedCategory: SourceCategoryFilter+ ): CatalogItem[] => {const trimmed = search.trim()const base = trimmed ? catalogFuse.search(trimmed).map((r) => r.item) : catalogItemsconst filtered =diff --git a/products/data_warehouse/frontend/scenes/NewSourceScene/sourceWizardLogic.tsx b/products/data_warehouse/frontend/scenes/NewSourceScene/sourceWizardLogic.tsxindex 253f78a00db7..409ef7eedb09 100644--- a/products/data_warehouse/frontend/scenes/NewSourceScene/sourceWizardLogic.tsx+++ b/products/data_warehouse/frontend/scenes/NewSourceScene/sourceWizardLogic.tsx@@ -1,5 +1,6 @@-import { actions, connect, kea, listeners, path, props, reducers, selectors } from 'kea'+import { MakeLogicType, actions, connect, kea, listeners, path, props, reducers, selectors } from 'kea'import { forms } from 'kea-forms'+import type { DeepPartial, DeepPartialMap, FieldName, ValidationErrorType } from 'kea-forms'import { loaders } from 'kea-loaders'import { router, urlToAction } from 'kea-router'import posthog from 'posthog-js'@@ -40,6 +41,11 @@ import {RowFilter,} from '~/types'+import type { AvailableSetupTaskIdsEnumApi } from '../../../../../frontend/src/generated/core/api.schemas'+import type { PaginatedResponse } from '../../../../../frontend/src/lib/api'+import type { FeatureFlagsSet } from '../../../../../frontend/src/lib/logic/featureFlagLogic'+import type { ProductIntentProperties } from '../../../../../frontend/src/lib/utils/product-intents'+import type { DataWarehouseTable, ExternalDataSource, PreflightStatus } from '../../../../../frontend/src/types'import {getDefaultExpandedSchemaKeys,groupTablesBySchema,@@ -49,7 +55,6 @@ import {import type { WebhookCreateResult } from '../../shared/components/forms/WebhookSetupForm'import { sourceManagementLogic } from '../../shared/logics/sourceManagementLogic'import { selfManagedSourceLogic } from './selfManagedSourceLogic'-import type { sourceWizardLogicType } from './sourceWizardLogicType'import { restoreSourceFormState, saveSourceFormState } from './wizardFormStorage'export const SSH_FIELD: SourceFieldSwitchGroupConfig = {@@ -319,6 +324,1421 @@ export interface SourceWizardLogicProps {autoConfigureTables?: boolean}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface sourceWizardLogicValues {+ featureFlags: FeatureFlagsSet // featureFlagLogic+ preflight: PreflightStatus | null // preflightLogic+ tableLoading: boolean // selfManagedSourceLogic+ dataWarehouseSources: PaginatedResponse<ExternalDataSource> | null // sourceManagementLogic+ currentTeamId: number | null // teamLogic+ availableSources: any+ breadcrumbs: Breadcrumb[]+ canGoBack: boolean+ canGoNext: boolean+ cdcPrereqsCheckResult: {+ errors: string[]+ valid: boolean+ } | null+ cdcPrereqsCheckResultLoading: boolean+ cdcSelfManagedSetupDialogOpen: boolean+ cdcSelfManagedVerifyResult: {+ errors: string[]+ valid: boolean+ } | null+ cdcSelfManagedVerifyResultLoading: boolean+ configuredSchemaName: string | null+ connectors: SourceConfig[]+ currentStep: number+ currentSyncMethodModalSchema: ExternalDataSourceSyncSchema | null+ databaseSchema: ExternalDataSourceSyncSchema[]+ defaultSourceConnectionDetails: Record<string, unknown>+ expandedSchemaGroupKeys: string[]+ filteredDatabaseSchema: ExternalDataSourceSyncSchema[]+ groupedDatabaseSchema: {+ schemaName: string+ tables: ExternalDataSourceSyncSchema[]+ }[]+ hasWebhookSchemas: boolean+ isDirectQueryMode: boolean+ isLoading: boolean+ isManualLinkFormVisible: boolean+ isManualLinkingSelected: boolean+ isSelfManagedSource: boolean+ isSourceConnectionDetailsSubmitting: boolean+ isSourceConnectionDetailsValid: boolean+ isWebhookFieldInputsSubmitting: boolean+ isWebhookFieldInputsValid: boolean+ isWrapped: boolean+ manualConnectors: {+ name: string+ type: ManualLinkSourceType+ }[]+ manualLinkingProvider: ManualLinkSourceType | null+ modalTitle:+ | ''+ | 'Importing your data...'+ | 'Link your data source'+ | 'Select tables to import'+ | 'Select tables to query'+ | 'Set up webhook'+ | 'Tables ready to query'+ nextButtonText: string+ requiredTables: any+ returnConfig: {+ returnLabel: string+ returnUrl: string+ } | null+ schemaGroupKeys: string[]+ schemaGroupKeysFingerprint: string+ schemaNameFilter: string+ selectedConnector: SourceConfig | null+ showFooter: boolean | SourceConfig+ showSkipButton: boolean+ showSourceConnectionDetailsErrors: boolean+ showWebhookFieldInputsErrors: boolean+ source: {+ access_method: 'direct' | 'warehouse'+ description: string+ direct_query_enabled?: boolean+ payload: Record<string, any>+ prefix: string+ }+ sourceConnectionDetails: Record<string, any>+ sourceConnectionDetailsAllErrors: Record<string, any>+ sourceConnectionDetailsChanged: boolean+ sourceConnectionDetailsErrors: DeepPartialMap<Record<string, any>, ValidationErrorType>+ sourceConnectionDetailsHasErrors: boolean+ sourceConnectionDetailsManualErrors: Record<string, any>+ sourceConnectionDetailsTouched: boolean+ sourceConnectionDetailsTouches: Record<string, boolean>+ sourceConnectionDetailsValidationErrors: DeepPartialMap<Record<string, any>, ValidationErrorType>+ sourceId: string | null+ suggestedTablesMap: Record<string, string | null>+ syncMethodModalOpen: boolean+ tablesAllToggledOn: boolean | 'indeterminate'+ webhookCreating: boolean+ webhookFieldInputs: Record<string, any>+ webhookFieldInputsAllErrors: Record<string, any>+ webhookFieldInputsChanged: boolean+ webhookFieldInputsErrors: DeepPartialMap<Record<string, any>, ValidationErrorType>+ webhookFieldInputsHasErrors: boolean+ webhookFieldInputsManualErrors: Record<string, any>+ webhookFieldInputsTouched: boolean+ webhookFieldInputsTouches: Record<string, boolean>+ webhookFieldInputsValidationErrors: DeepPartialMap<Record<string, any>, ValidationErrorType>+ webhookResult: WebhookCreateResult | null+ webhookStepComplete: boolean+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface sourceWizardLogicActions {+ markTaskAsCompleted: (taskIdOrIds: SetupTaskId | SetupTaskId[]) => {+ taskIdOrIds: AvailableSetupTaskIdsEnumApi | AvailableSetupTaskIdsEnumApi[]+ } // globalSetupLogic+ createTableSuccess: (+ table: DataWarehouseTable,+ payload?: any+ ) => {+ payload?: any+ table: DataWarehouseTable+ } // selfManagedSourceLogic+ resetTable: (values?: DataWarehouseTable | undefined) => {+ values?: DataWarehouseTable+ } // selfManagedSourceLogic+ loadSources: () => {+ value: true+ } // sourceManagementLogic+ addProductIntent: (properties: ProductIntentProperties) => ProductIntentProperties // teamLogic+ cancelSyncMethodModal: () => {+ value: true+ }+ cancelWizard: () => {+ value: true+ }+ checkCdcPrereqs: () => any+ checkCdcPrereqsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ checkCdcPrereqsSuccess: (+ cdcPrereqsCheckResult: {+ errors: string[]+ valid: boolean+ } | null,+ payload?: any+ ) => {+ cdcPrereqsCheckResult: {+ errors: string[]+ valid: boolean+ } | null+ payload?: any+ }+ clearCdcPrereqsCheckResult: () => {+ value: true+ }+ clearCdcPrereqsCheckResultFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ clearCdcPrereqsCheckResultSuccess: (+ cdcPrereqsCheckResult: null,+ payload?: {+ value: true+ }+ ) => {+ cdcPrereqsCheckResult: null+ payload?: {+ value: true+ }+ }+ clearCdcSelfManagedVerifyResult: () => {+ value: true+ }+ clearCdcSelfManagedVerifyResultFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ clearCdcSelfManagedVerifyResultSuccess: (+ cdcSelfManagedVerifyResult: null,+ payload?: {+ value: true+ }+ ) => {+ cdcSelfManagedVerifyResult: null+ payload?: {+ value: true+ }+ }+ clearReturnConfig: () => {+ value: true+ }+ clearSource: () => {+ value: true+ }+ closeCdcSelfManagedSetupDialog: () => {+ value: true+ }+ closeWizard: () => {+ value: true+ }+ createSource: () => {+ value: true+ }+ createWebhook: () => {+ value: true+ }+ getDatabaseSchemas: () => {+ value: true+ }+ handleRedirect: (+ source: ExternalDataSourceType,+ searchParams?: any+ ) => {+ searchParams: any+ source:+ | 'ActiveCampaign'+ | 'AcuityScheduling'+ | 'Adapty'+ | 'Adjust'+ | 'AdobeAnalytics'+ | 'AdobeCommerce'+ | 'AdpWorkforceNow'+ | 'AdRoll'+ | 'Adyen'+ | 'AgileCRM'+ | 'Aha'+ | 'Ahrefs'+ | 'AikidoSecurity'+ | 'Airbrake'+ | 'Airbyte'+ | 'Aircall'+ | 'AirOps'+ | 'Airtable'+ | 'Aiven'+ | 'Akeneo'+ | 'Algolia'+ | 'Alguna'+ | 'AlpacaBrokerAPI'+ | 'AlphaVantage'+ | 'AmazonAds'+ | 'AmazonCloudWatch'+ | 'AmazonEventBridge'+ | 'AmazonKinesis'+ | 'AmazonS3'+ | 'AmazonSellingPartner'+ | 'AmazonSNS'+ | 'AmazonSQS'+ | 'Amplitude'+ | 'Anthropic'+ | 'ApifyDataset'+ | 'Apollo'+ | 'Appcues'+ | 'Appdynamics'+ | 'Appfigures'+ | 'Appfollow'+ | 'AppleSearchAds'+ | 'AppLovin'+ | 'AppsFlyer'+ | 'Appsignal'+ | 'Appstack'+ | 'Apptivo'+ | 'Appwrite'+ | 'Argocd'+ | 'Asana'+ | 'Ashby'+ | 'Asknicely'+ | 'AssemblyAI'+ | 'Attentive'+ | 'Attio'+ | 'Auth0'+ | 'Automox'+ | 'Autumn'+ | 'Aviationstack'+ | 'Aviator'+ | 'Awin'+ | 'AwsCloudTrail'+ | 'AzureBlob'+ | 'AzureDevOps'+ | 'AzureTableStorage'+ | 'Babelforce'+ | 'Backblaze'+ | 'BambooHR'+ | 'Basecamp'+ | 'Baserow'+ | 'Baseten'+ | 'Beamer'+ | 'Bettermode'+ | 'BetterStack'+ | 'BigCommerce'+ | 'BigMailer'+ | 'BigQuery'+ | 'BingAds'+ | 'Bitbucket'+ | 'Bitly'+ | 'Bitrise'+ | 'BlandAI'+ | 'Blogger'+ | 'Bluetally'+ | 'BoldSign'+ | 'Box'+ | 'Braintree'+ | 'Braintrust'+ | 'Branch'+ | 'Braze'+ | 'Breezometer'+ | 'BreezyHR'+ | 'Brevo'+ | 'Brex'+ | 'BrowseAI'+ | 'Browserbase'+ | 'BrowserUse'+ | 'Bugsnag'+ | 'BuildBetter'+ | 'Buildkite'+ | 'Bunny'+ | 'Buzzsprout'+ | 'CalCom'+ | 'Calendly'+ | 'CallRail'+ | 'CampaignManager360'+ | 'CampaignMonitor'+ | 'Campayn'+ | 'Campfire'+ | 'Canny'+ | 'CapsuleCRM'+ | 'CaptainData'+ | 'CareQualityCommission'+ | 'CartCom'+ | 'CastorEDC'+ | 'Chameleon'+ | 'Chargebee'+ | 'Chargedesk'+ | 'Chargify'+ | 'ChartHop'+ | 'ChartMogul'+ | 'Chatwoot'+ | 'Checkmarx'+ | 'CheckoutCom'+ | 'Chift'+ | 'Chorus'+ | 'Churnkey'+ | 'Cimis'+ | 'Cin7'+ | 'CircleCI'+ | 'CircleciInsights'+ | 'CiscoDuo'+ | 'CiscoMeraki'+ | 'Clari'+ | 'Clarifai'+ | 'Clazar'+ | 'Clerk'+ | 'ClickHouse'+ | 'ClickhouseCloud'+ | 'ClickUp'+ | 'Clockify'+ | 'Clockodo'+ | 'Close'+ | 'Cloudbeds'+ | 'Cloudflare'+ | 'Coassemble'+ | 'CockroachDB'+ | 'Coda'+ | 'Codacy'+ | 'Codecov'+ | 'Codefresh'+ | 'Cody'+ | 'Cohere'+ | 'CoinApi'+ | 'CoinGecko'+ | 'CoinMarketCap'+ | 'Commercetools'+ | 'Concord'+ | 'ConfigCat'+ | 'Confluence'+ | 'ConfluentCloud'+ | 'ConstantContact'+ | 'ConvertKit'+ | 'Convex'+ | 'Copper'+ | 'Coralogix'+ | 'CosmosDB'+ | 'Couchbase'+ | 'Coupa'+ | 'Coveralls'+ | 'CratesIO'+ | 'Criteo'+ | 'Cronitor'+ | 'Crunchbase'+ | 'CultureAmp'+ | 'Cursor'+ | 'Curve'+ | 'Custom'+ | 'CustomerIO'+ | 'Customerly'+ | 'DagsterCloud'+ | 'Databricks'+ | 'Datadog'+ | 'Datahub'+ | 'Datascope'+ | 'Datorama'+ | 'Db2'+ | 'Dbt'+ | 'Decagon'+ | 'Deel'+ | 'Deepgram'+ | 'Deepsource'+ | 'Delighted'+ | 'DenoDeploy'+ | 'Deputy'+ | 'DevinAI'+ | 'DigitalOcean'+ | 'DingConnect'+ | 'DisplayVideo360'+ | 'Dixa'+ | 'Dockerhub'+ | 'Docuseal'+ | 'Docusign'+ | 'DodoPayments'+ | 'DoIt'+ | 'Dolibarr'+ | 'Doppler'+ | 'Drata'+ | 'Dremio'+ | 'Drip'+ | 'Dropbox'+ | 'DropboxSign'+ | 'Dub'+ | 'Dubsado'+ | 'Dwolla'+ | 'Dynamics365'+ | 'DynamoDB'+ | 'Dynatrace'+ | 'E2B'+ | 'Easypost'+ | 'Easypromos'+ | 'Ebay'+ | 'EConomic'+ | 'Elasticemail'+ | 'Elasticsearch'+ | 'ElevenLabs'+ | 'Eloqua'+ | 'EmailOctopus'+ | 'EmploymentHero'+ | 'Encharge'+ | 'Env0'+ | 'Eventbrite'+ | 'Eventee'+ | 'Eventzilla'+ | 'Everhour'+ | 'ExchangeRatesApi'+ | 'Expensify'+ | 'EZOfficeInventory'+ | 'FacebookPages'+ | 'Factorial'+ | 'Fastbill'+ | 'Fastly'+ | 'Fauna'+ | 'Featurebase'+ | 'Feishu'+ | 'Fillout'+ | 'Finage'+ | 'FinancialModelling'+ | 'Finnhub'+ | 'Finnworlds'+ | 'Fintoc'+ | 'Firebase'+ | 'Firebolt'+ | 'Firecrawl'+ | 'FireHydrant'+ | 'FireworksAI'+ | 'Flagsmith'+ | 'Fleetio'+ | 'Flexmail'+ | 'Flexport'+ | 'FloatApp'+ | 'Flowlu'+ | 'FlyIo'+ | 'Formbricks'+ | 'FreeAgent'+ | 'Freightview'+ | 'FreshBooks'+ | 'Freshcaller'+ | 'Freshchat'+ | 'Freshdesk'+ | 'Freshsales'+ | 'Freshservice'+ | 'Frill'+ | 'Front'+ | 'Fulcrum'+ | 'FullStory'+ | 'GainsightPx'+ | 'Gerrit'+ | 'GetStream'+ | 'Giphy'+ | 'GitBook'+ | 'Gitea'+ | 'Gitguardian'+ | 'Github'+ | 'GitLab'+ | 'Gladly'+ | 'Glassfrog'+ | 'Gmail'+ | 'GNews'+ | 'GoCardless'+ | 'Gojiberry'+ | 'Goldcast'+ | 'GoLogin'+ | 'Gong'+ | 'GoogleAdManager'+ | 'GoogleAds'+ | 'GoogleAnalytics'+ | 'GoogleCalendar'+ | 'GoogleChat'+ | 'GoogleClassroom'+ | 'GoogleCloudStorage'+ | 'GoogleDirectory'+ | 'GoogleDrive'+ | 'GoogleForms'+ | 'GooglePageSpeedInsights'+ | 'GoogleSearchConsole'+ | 'GoogleSheets'+ | 'GoogleTasks'+ | 'GoogleWebfonts'+ | 'GoogleWorkspaceAdminReports'+ | 'Gorgias'+ | 'Grafana'+ | 'Granola'+ | 'Greenhouse'+ | 'GreytHr'+ | 'Gridly'+ | 'Groq'+ | 'GrowthBook'+ | 'Guardian'+ | 'Gumloop'+ | 'Guru'+ | 'Gusto'+ | 'Harness'+ | 'Harvey'+ | 'Hatchet'+ | 'Healthchecks'+ | 'Heap'+ | 'Height'+ | 'Helicone'+ | 'Hellobaton'+ | 'HelpScout'+ | 'Heroku'+ | 'Hetzner'+ | 'Hex'+ | 'HeyGen'+ | 'HiBob'+ | 'HighLevel'+ | 'Hightouch'+ | 'Honeybadger'+ | 'Honeycomb'+ | 'HoorayHR'+ | 'Hubplanner'+ | 'Hubspot'+ | 'HuggingFace'+ | 'Humanitix'+ | 'Huntr'+ | 'Hyperspell'+ | 'Ikas'+ | 'IlluminaBasespace'+ | 'Imagga'+ | 'Impact'+ | 'IncidentIo'+ | 'Infisical'+ | 'Inflowinventory'+ | 'InforNexus'+ | 'Inngest'+ | 'Insightful'+ | 'Insightly'+ | 'Instagram'+ | 'Instana'+ | 'Instantly'+ | 'Instatus'+ | 'Intercom'+ | 'Interzoid'+ | 'Intruder'+ | 'Invoiced'+ | 'Invoiceninja'+ | 'IP2Whois'+ | 'Iterable'+ | 'JamfPro'+ | 'Jellyfish'+ | 'Jenkins'+ | 'JfrogArtifactory'+ | 'Jira'+ | 'Jobber'+ | 'JobNimbus'+ | 'Jotform'+ | 'JudgeMeReviews'+ | 'Jumpcloud'+ | 'JustCall'+ | 'JustSift'+ | 'K6Cloud'+ | 'Kafka'+ | 'Kajabi'+ | 'Kandji'+ | 'KapaAI'+ | 'Katana'+ | 'Keka'+ | 'Kernel'+ | 'Kickscale'+ | 'Kisi'+ | 'Kissmetrics'+ | 'Klarna'+ | 'Klaus'+ | 'Klaviyo'+ | 'Knock'+ | 'KongKonnect'+ | 'Koyeb'+ | 'Kubecost'+ | 'Kustomer'+ | 'KYVE'+ | 'Lacework'+ | 'Lago'+ | 'LambdaLabs'+ | 'Langfuse'+ | 'LangSmith'+ | 'Lattice'+ | 'LaunchDarkly'+ | 'Leadfeeder'+ | 'Leexi'+ | 'Lemlist'+ | 'LemonSqueezy'+ | 'LessAnnoyingCRM'+ | 'Lever'+ | 'Liana'+ | 'Lightfield'+ | 'LightspeedRetail'+ | 'Linear'+ | 'Linearb'+ | 'LingoDev'+ | 'LinkedinAds'+ | 'LinkedinPages'+ | 'Linkrunner'+ | 'Linnworks'+ | 'Linode'+ | 'LlamaCloud'+ | 'Lob'+ | 'LogzIO'+ | 'Lokalise'+ | 'Looker'+ | 'Loops'+ | 'Luma'+ | 'M3ter'+ | 'Mailchimp'+ | 'MailerLite'+ | 'MailerSend'+ | 'Mailgun'+ | 'Mailjet'+ | 'Mailosaur'+ | 'Mailtrap'+ | 'Mantle'+ | 'Marketo'+ | 'Marketstack'+ | 'Matomo'+ | 'Maxio'+ | 'Mem0'+ | 'Mendeley'+ | 'Mention'+ | 'MercadoAds'+ | 'Mercury'+ | 'Merge'+ | 'MetaAds'+ | 'Metabase'+ | 'Metaplane'+ | 'Metorial'+ | 'Metricool'+ | 'Metriport'+ | 'Metronome'+ | 'MicrosoftDataverse'+ | 'MicrosoftEntraId'+ | 'MicrosoftLists'+ | 'MicrosoftTeams'+ | 'Mintlify'+ | 'Miro'+ | 'Missive'+ | 'MistralAI'+ | 'MixMax'+ | 'Mixpanel'+ | 'Mode'+ | 'Mollie'+ | 'Monday'+ | 'MongoDB'+ | 'Mono'+ | 'MonteCarlo'+ | 'MSSQL'+ | 'Mux'+ | 'MyHours'+ | 'MySQL'+ | 'N8n'+ | 'Nasa'+ | 'Navan'+ | 'NebiusAI'+ | 'Neon'+ | 'Netlify'+ | 'NetSuite'+ | 'NewRelic'+ | 'NewsApi'+ | 'NewsData'+ | 'NewYorkTimes'+ | 'Nexiopay'+ | 'NextdoorAds'+ | 'NinjaOneRMM'+ | 'NoCRM'+ | 'Northflank'+ | 'NorthpassLMS'+ | 'Notion'+ | 'Nuget'+ | 'Nutshell'+ | 'Nylas'+ | 'Octolens'+ | 'OctopusDeploy'+ | 'Okta'+ | 'Omnisend'+ | 'Oncehub'+ | 'OneDrive'+ | 'OneHundredMs'+ | 'Onepagecrm'+ | 'OnePassword'+ | 'OneSignal'+ | 'Onfleet'+ | 'OpenAI'+ | 'OpenAIAds'+ | 'OpenAQ'+ | 'OpenDataDc'+ | 'OpenExchangeRates'+ | 'OpenFDA'+ | 'OpenRouter'+ | 'OpenWeather'+ | 'OpinionStage'+ | 'Opsgenie'+ | 'Optimizely'+ | 'OPUSWatch'+ | 'Oracle'+ | 'OracleEbs'+ | 'OracleFusion'+ | 'Orb'+ | 'Orbit'+ | 'OrcaSecurity'+ | 'Ortto'+ | 'Oura'+ | 'Outbrain'+ | 'Outlook'+ | 'Outreach'+ | 'Oveit'+ | 'PabblySubscriptionsBilling'+ | 'Packagist'+ | 'Paddle'+ | 'PagerDuty'+ | 'PandaDoc'+ | 'Paperform'+ | 'Papersign'+ | 'Pardot'+ | 'Partnerize'+ | 'PartnerStack'+ | 'PayFit'+ | 'Paylocity'+ | 'PayPal'+ | 'Paystack'+ | 'PeecAI'+ | 'Pendo'+ | 'Pennylane'+ | 'Perigon'+ | 'Perk'+ | 'PersistIq'+ | 'Persona'+ | 'Personio'+ | 'Pexels'+ | 'PgAnalyze'+ | 'Phyllo'+ | 'Picqer'+ | 'Pinecone'+ | 'Pingdom'+ | 'PinterestAds'+ | 'Pipedrive'+ | 'Pipeliner'+ | 'PivotalTracker'+ | 'Piwik'+ | 'Plaid'+ | 'Plain'+ | 'PlanetScale'+ | 'Planhat'+ | 'PlatformSh'+ | 'Plausible'+ | 'Plunk'+ | 'Pocket'+ | 'Podium'+ | 'Polar'+ | 'Polygon'+ | 'Poplar'+ | 'Postgres'+ | 'Postmark'+ | 'PrefectCloud'+ | 'PrestaShop'+ | 'Pretix'+ | 'Primetric'+ | 'Printify'+ | 'Productboard'+ | 'Productive'+ | 'PromptingCompany'+ | 'PulumiCloud'+ | 'Pylon'+ | 'PyPI'+ | 'Qdrant'+ | 'Qonto'+ | 'Qualaroo'+ | 'Qualtrics'+ | 'QualysVmdr'+ | 'QuickBooks'+ | 'Railway'+ | 'Railz'+ | 'Ramp'+ | 'Rapid7Insightvm'+ | 'Raygun'+ | 'Razorpay'+ | 'RB2B'+ | 'RDStationMarketing'+ | 'Recharge'+ | 'Recreation'+ | 'Recruitee'+ | 'Recurly'+ | 'Reddit'+ | 'RedditAds'+ | 'Redis'+ | 'Redshift'+ | 'ReferralHero'+ | 'Render'+ | 'RentCast'+ | 'Repairshopr'+ | 'Replicate'+ | 'ReplyIo'+ | 'Resend'+ | 'RetailExpress'+ | 'RetellAI'+ | 'Retently'+ | 'RevenueCat'+ | 'RevolutMerchant'+ | 'RingCentral'+ | 'Rippling'+ | 'RKICovid'+ | 'Roark'+ | 'RocketChat'+ | 'Rocketlane'+ | 'Rollbar'+ | 'Rootly'+ | 'Rss'+ | 'RudderStack'+ | 'Ruddr'+ | 'RunPod'+ | 'SafetyCulture'+ | 'SageHR'+ | 'SageIntacct'+ | 'Sailthru'+ | 'Salesflare'+ | 'Salesforce'+ | 'SalesforceMarketingCloud'+ | 'SalesLoft'+ | 'Salestrics'+ | 'Sanity'+ | 'SapConcur'+ | 'SapErp'+ | 'SAPFieldglass'+ | 'SapHana'+ | 'SapSuccessFactors'+ | 'SavvyCal'+ | 'ScaleAI'+ | 'Scaleway'+ | 'SearchAds360'+ | 'Secoda'+ | 'Secureframe'+ | 'Segment'+ | 'Semaphore'+ | 'Semgrep'+ | 'SendGrid'+ | 'Sendowl'+ | 'SendPulse'+ | 'Senseforce'+ | 'Sentinelone'+ | 'Sentry'+ | 'Serpstat'+ | 'ServiceNow'+ | 'SevenShifts'+ | 'SFTP'+ | 'SharePoint'+ | 'Sharetribe'+ | 'Shippo'+ | 'ShipStation'+ | 'Shopify'+ | 'Shopware'+ | 'ShopWired'+ | 'Shortcut'+ | 'Shortio'+ | 'Shutterstock'+ | 'SigmaComputing'+ | 'SignNow'+ | 'SigNoz'+ | 'Sim'+ | 'SimFin'+ | 'SimpleCast'+ | 'Simplesat'+ | 'Singular'+ | 'Skyvern'+ | 'Slack'+ | 'Slash'+ | 'Smaily'+ | 'SmartEngage'+ | 'Smartreach'+ | 'Smartsheet'+ | 'Smartwaiver'+ | 'SnapchatAds'+ | 'Snowflake'+ | 'Snowplow'+ | 'Snyk'+ | 'SolarwindsServiceDesk'+ | 'SonarCloud'+ | 'Sonarqube'+ | 'SonatypeNexus'+ | 'Sourcegraph'+ | 'Spacelift'+ | 'SparkPost'+ | 'SplitIo'+ | 'SplunkObservabilityCloud'+ | 'SpotifyAds'+ | 'SpotlerCRM'+ | 'Squadcast'+ | 'Square'+ | 'Squarespace'+ | 'Statsig'+ | 'Statuscake'+ | 'Statuspage'+ | 'Stigg'+ | 'StockData'+ | 'Strava'+ | 'StreamElements'+ | 'Streamlabs'+ | 'Stripe'+ | 'Stytch'+ | 'SumoLogic'+ | 'Sumsub'+ | 'Supabase'+ | 'Superwall'+ | 'SurveyMonkey'+ | 'SurveySparrow'+ | 'Survicate'+ | 'Svix'+ | 'Swarmia'+ | 'Swonkie'+ | 'Synthesia'+ | 'Systeme'+ | 'Taboola'+ | 'Tailscale'+ | 'Talkwalker'+ | 'Tavus'+ | 'TawkTo'+ | 'Teachable'+ | 'Teamcity'+ | 'Teamtailor'+ | 'Teamwork'+ | 'Telli'+ | 'Tempo'+ | 'TemporalIO'+ | 'TenableVulnerabilityManagement'+ | 'TerraApi'+ | 'TerraformCloud'+ | 'Testrail'+ | 'Thinkific'+ | 'ThinkificCourses'+ | 'ThriveLearning'+ | 'Ticketmaster'+ | 'TicketTailor'+ | 'TickTick'+ | 'TikTokAds'+ | 'Tile38'+ | 'Timely'+ | 'Tinyemail'+ | 'TMDb'+ | 'Todoist'+ | 'TogetherAI'+ | 'Toggl'+ | 'TrackPMS'+ | 'TravisCI'+ | 'Trello'+ | 'Tremendous'+ | 'TriggerDev'+ | 'TrustPilot'+ | 'Turso'+ | 'TVMaze'+ | 'TwelveData'+ | 'TwelveLabs'+ | 'Twenty'+ | 'Twilio'+ | 'Twitter'+ | 'TwitterAds'+ | 'TyntecSMS'+ | 'Typeform'+ | 'Ubidots'+ | 'Unleash'+ | 'Unstructured'+ | 'UpPromote'+ | 'Upstash'+ | 'Uptick'+ | 'Uptimerobot'+ | 'USCensus'+ | 'Usersnap'+ | 'Uservoice'+ | 'Vantage'+ | 'Vapi'+ | 'Veeqo'+ | 'Vellum'+ | 'Veracode'+ | 'Vercel'+ | 'Vespa'+ | 'VismaEconomic'+ | 'Vitally'+ | 'Vultr'+ | 'VWO'+ | 'Waiteraid'+ | 'Wasabi'+ | 'Watchmode'+ | 'Webflow'+ | 'WeightsAndBiases'+ | 'WhenIWork'+ | 'WikipediaPageviews'+ | 'Windmill'+ | 'WooCommerce'+ | 'Wordpress'+ | 'Workable'+ | 'Workday'+ | 'Workflowmax'+ | 'WorkOS'+ | 'Workramp'+ | 'Wrike'+ | 'Writesonic'+ | 'Wufoo'+ | 'Xero'+ | 'Xmatters'+ | 'Xsolla'+ | 'YahooFinance'+ | 'YandexMetrica'+ | 'Ynab'+ | 'Yotpo'+ | 'Younium'+ | 'YouSign'+ | 'YouTubeAnalytics'+ | 'YoutubeData'+ | 'ZapierSupportedStorage'+ | 'ZapSign'+ | 'Zellify'+ | 'Zendesk'+ | 'ZendeskSell'+ | 'ZendeskSunshine'+ | 'Zenduty'+ | 'Zenefits'+ | 'Zenloop'+ | 'Zep'+ | 'ZohoAnalytics'+ | 'ZohoBigin'+ | 'ZohoBilling'+ | 'ZohoBooks'+ | 'ZohoCampaign'+ | 'ZohoCRM'+ | 'ZohoDesk'+ | 'ZohoExpense'+ | 'ZohoInventory'+ | 'ZohoInvoice'+ | 'ZonkaFeedback'+ | 'Zoom'+ | 'ZoomInfo'+ | 'Zuora'+ }+ onBack: () => {+ value: true+ }+ onClear: () => {+ value: true+ }+ onNext: () => {+ value: true+ }+ onSubmit: () => {+ value: true+ }+ openCdcSelfManagedSetupDialog: () => {+ value: true+ }+ openSyncMethodModal: (schema: ExternalDataSourceSyncSchema) => {+ schema: ExternalDataSourceSyncSchema+ }+ resetSourceConnectionDetails: (values?: Record<string, any>) => {+ values?: Record<string, any>+ }+ resetSourceForm: (accessMethod?: 'direct' | 'warehouse') => {+ accessMethod: 'direct' | 'warehouse' | undefined+ }+ resetWebhookFieldInputs: (values?: Record<string, any>) => {+ values?: Record<string, any>+ }+ saveFormStateBeforeRedirect: () => {+ value: true+ }+ selectConnector: (+ connector: SourceConfig | null,+ accessMethod?: 'direct' | 'warehouse'+ ) => {+ accessMethod: 'direct' | 'warehouse' | undefined+ connector: SourceConfig | null+ }+ setDatabaseSchemas: (schemas: ExternalDataSourceSyncSchema[]) => {+ schemas: ExternalDataSourceSyncSchema[]+ }+ setExpandedSchemaGroupKeys: (expandedSchemaKeys: string[]) => {+ expandedSchemaKeys: string[]+ }+ setInitialConnector: (connector: SourceConfig | null) => {+ connector: SourceConfig | null+ }+ setIsLoading: (isLoading: boolean) => {+ isLoading: boolean+ }+ setManualLinkingProvider: (provider: ManualLinkSourceType) => {+ provider: 'aws' | 'azure' | 'cloudflare-r2' | 'google-cloud'+ }+ setReturnConfig: (+ returnUrl: string,+ returnLabel: string+ ) => {+ returnLabel: string+ returnUrl: string+ }+ setSchemaNameFilter: (schemaNameFilter: string) => {+ schemaNameFilter: string+ }+ setSchemaRowFilters: (+ schema: ExternalDataSourceSyncSchema,+ rowFilters: RowFilter[] | null+ ) => {+ rowFilters: RowFilter[] | null+ schema: ExternalDataSourceSyncSchema+ }+ setSchemaSyncedColumns: (+ schema: ExternalDataSourceSyncSchema,+ enabledColumns: string[] | null+ ) => {+ enabledColumns: string[] | null+ schema: ExternalDataSourceSyncSchema+ }+ setSourceConnectionDetailsManualErrors: (errors: Record<string, any>) => {+ errors: Record<string, any>+ }+ setSourceConnectionDetailsValue: (+ key: FieldName,+ value: any+ ) => {+ name: FieldName+ value: any+ }+ setSourceConnectionDetailsValues: (values: DeepPartial<Record<string, any>>) => {+ values: DeepPartial<Record<string, any>>+ }+ setSourceId: (id: string) => {+ sourceId: string+ }+ setStep: (step: number) => {+ step: number+ }+ setWebhookFieldInputsManualErrors: (errors: Record<string, any>) => {+ errors: Record<string, any>+ }+ setWebhookFieldInputsValue: (+ key: FieldName,+ value: any+ ) => {+ name: FieldName+ value: any+ }+ setWebhookFieldInputsValues: (values: DeepPartial<Record<string, any>>) => {+ values: DeepPartial<Record<string, any>>+ }+ setWebhookResult: (result: WebhookCreateResult | null) => {+ result: WebhookCreateResult | null+ }+ submitSourceConnectionDetails: () => {+ value: boolean+ }+ submitSourceConnectionDetailsFailure: (+ error: Error,+ errors: Record<string, any>+ ) => {+ error: Error+ errors: Record<string, any>+ }+ submitSourceConnectionDetailsRequest: (sourceConnectionDetails: Record<string, any>) => {+ sourceConnectionDetails: Record<string, any>+ }+ submitSourceConnectionDetailsSuccess: (sourceConnectionDetails: Record<string, any>) => {+ sourceConnectionDetails: Record<string, any>+ }+ submitWebhookFieldInputs: () => {+ value: boolean+ }+ submitWebhookFieldInputsFailure: (+ error: Error,+ errors: Record<string, any>+ ) => {+ error: Error+ errors: Record<string, any>+ }+ submitWebhookFieldInputsRequest: (webhookFieldInputs: Record<string, any>) => {+ webhookFieldInputs: Record<string, any>+ }+ submitWebhookFieldInputsSuccess: (webhookFieldInputs: Record<string, any>) => {+ webhookFieldInputs: Record<string, any>+ }+ submitWebhookFields: () => {+ value: true+ }+ syncExpandedSchemaGroupKeys: (+ groupedSchemaKeys: string[],+ fingerprint: string+ ) => {+ fingerprint: string+ groupedSchemaKeys: string[]+ }+ toggleAllTables: (+ selectAll: boolean,+ tableNames?: string[]+ ) => {+ selectAll: boolean+ tableNames: string[] | undefined+ }+ toggleManualLinkFormVisible: (visible: boolean) => {+ visible: boolean+ }+ toggleSchemaGroup: (+ schemaName: string,+ shouldSync: boolean+ ) => {+ schemaName: string+ shouldSync: boolean+ }+ toggleSchemaShouldSync: (+ schema: ExternalDataSourceSyncSchema,+ shouldSync: boolean+ ) => {+ schema: ExternalDataSourceSyncSchema+ shouldSync: boolean+ }+ touchAllSourceConnectionDetailsFields: () => {+ value: true+ }+ touchSourceConnectionDetailsField: (key: string) => {+ key: string+ }+ touchWebhookFieldInputsField: (key: string) => {+ key: string+ }+ updateSchemaSyncType: (+ schema: ExternalDataSourceSyncSchema,+ syncType: ExternalDataSourceSyncSchema['sync_type'],+ incrementalField: string | null,+ incrementalFieldType: string | null,+ primaryKeyColumns: string[] | null,+ cdcTableMode?: 'both' | 'cdc_only' | 'consolidated',+ incrementalFieldLookbackSeconds?: number | null+ ) => {+ cdcTableMode: 'both' | 'cdc_only' | 'consolidated' | undefined+ incrementalField: string | null+ incrementalFieldLookbackSeconds: number | null | undefined+ incrementalFieldType: string | null+ primaryKeyColumns: string[] | null+ schema: ExternalDataSourceSyncSchema+ syncType: 'append' | 'cdc' | 'full_refresh' | 'incremental' | 'webhook' | 'xmin' | null+ }+ updateSource: (source: Partial<ExternalDataSourceCreatePayload>) => {+ source: Partial<ExternalDataSourceCreatePayload>+ }+ verifyCdcSelfManagedSetup: () => any+ verifyCdcSelfManagedSetupFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ verifyCdcSelfManagedSetupSuccess: (+ cdcSelfManagedVerifyResult: {+ errors: string[]+ valid: boolean+ } | null,+ payload?: any+ ) => {+ cdcSelfManagedVerifyResult: {+ errors: string[]+ valid: boolean+ } | null+ payload?: any+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface sourceWizardLogicMeta {+ __keaTypeGenInternalSelectorTypes: {+ availableSources: (arg: any) => any+ requiredTables: (arg: any) => any+ defaultSourceConnectionDetails: (selectedConnector: SourceConfig | null) => Record<string, unknown>+ suggestedTablesMap: (selectedConnector: SourceConfig | null) => Record<string, string | null>+ breadcrumbs: (+ selectedConnector: SourceConfig | null,+ manualLinkingProvider: 'aws' | 'azure' | 'cloudflare-r2' | 'google-cloud' | null,+ manualConnectors: {+ name: string+ type: ManualLinkSourceType+ }[]+ ) => Breadcrumb[]+ hasWebhookSchemas: (databaseSchema: ExternalDataSourceSyncSchema[]) => boolean+ webhookStepComplete: (+ webhookResult: WebhookCreateResult | null,+ selectedConnector: SourceConfig | null+ ) => boolean+ isManualLinkingSelected: (selectedConnector: SourceConfig | null) => boolean+ isDirectQueryMode: (+ source: {+ access_method: 'direct' | 'warehouse'+ description: string+ direct_query_enabled?: boolean+ payload: Record<string, any>+ prefix: string+ },+ selectedConnector: SourceConfig | null+ ) => boolean+ canGoBack: (currentStep: number) => boolean+ canGoNext: (+ currentStep: number,+ isManualLinkingSelected: boolean,+ databaseSchema: ExternalDataSourceSyncSchema[],+ isDirectQueryMode: boolean,+ webhookStepComplete: boolean+ ) => boolean+ showSkipButton: (currentStep: number) => boolean+ nextButtonText: (+ currentStep: number,+ isManualLinkingSelected: boolean,+ isDirectQueryMode: boolean,+ hasWebhookSchemas: boolean,+ arg: any,+ returnConfig: {+ returnLabel: string+ returnUrl: string+ } | null,+ sourceId: string | null+ ) => string+ showFooter: (selectedConnector: SourceConfig | null, isManualLinkFormVisible: boolean) => boolean | SourceConfig+ connectors: (+ dataWarehouseSources: PaginatedResponse<ExternalDataSource> | null,+ availableSources: any+ ) => SourceConfig[]+ isSelfManagedSource: (+ manualLinkingProvider: 'aws' | 'azure' | 'cloudflare-r2' | 'google-cloud' | null+ ) => boolean+ filteredDatabaseSchema: (+ databaseSchema: ExternalDataSourceSyncSchema[],+ schemaNameFilter: string+ ) => ExternalDataSourceSyncSchema[]+ tablesAllToggledOn: (filteredDatabaseSchema: ExternalDataSourceSyncSchema[]) => boolean | 'indeterminate'+ configuredSchemaName: (source: {+ access_method: 'direct' | 'warehouse'+ description: string+ direct_query_enabled?: boolean+ payload: Record<string, any>+ prefix: string+ }) => string | null+ groupedDatabaseSchema: (+ filteredDatabaseSchema: ExternalDataSourceSyncSchema[],+ configuredSchemaName: string | null+ ) => {+ schemaName: string+ tables: ExternalDataSourceSyncSchema[]+ }[]+ schemaGroupKeys: (+ groupedDatabaseSchema: {+ schemaName: string+ tables: ExternalDataSourceSyncSchema[]+ }[]+ ) => string[]+ modalTitle: (+ currentStep: number,+ isDirectQueryMode: boolean+ ) =>+ | ''+ | 'Importing your data...'+ | 'Link your data source'+ | 'Select tables to import'+ | 'Select tables to query'+ | 'Set up webhook'+ | 'Tables ready to query'+ isWrapped: (arg: any) => boolean+ }+}++export type sourceWizardLogicType = MakeLogicType<+ sourceWizardLogicValues,+ sourceWizardLogicActions,+ SourceWizardLogicProps,+ sourceWizardLogicMeta+>+export const sourceWizardLogic = kea<sourceWizardLogicType>([path(['products', 'dataWarehouse', 'sourceWizardLogic']),props({} as SourceWizardLogicProps),@@ -775,7 +2195,14 @@ export const sourceWizardLogic = kea<sourceWizardLogicType>([],breadcrumbs: [(s) => [s.selectedConnector, s.manualLinkingProvider, s.manualConnectors],- (selectedConnector, manualLinkingProvider, manualConnectors): Breadcrumb[] => {+ (+ selectedConnector: SourceConfig | null,+ manualLinkingProvider: ManualLinkSourceType | null,+ manualConnectors: {+ name: string+ type: ManualLinkSourceType+ }[]+ ): Breadcrumb[] => {return [{key: Scene.Sources,@@ -816,15 +2243,25 @@ export const sourceWizardLogic = kea<sourceWizardLogicType>([return requiredFields.length === 0},],- isManualLinkingSelected: [(s) => [s.selectedConnector], (selectedConnector): boolean => !selectedConnector],+ isManualLinkingSelected: [+ (s) => [s.selectedConnector],+ (selectedConnector: SourceConfig | null): boolean => !selectedConnector,+ ],isDirectQueryMode: [(s) => [s.source, s.selectedConnector],- (source, selectedConnector): boolean =>- source.access_method === 'direct' && supportsDirectQuery(selectedConnector?.name),+ (+ source: {+ access_method: 'direct' | 'warehouse'+ description: string+ payload: Record<string, any>+ prefix: string+ },+ selectedConnector: SourceConfig | null+ ): boolean => source.access_method === 'direct' && supportsDirectQuery(selectedConnector?.name),],canGoBack: [(s) => [s.currentStep],- (currentStep): boolean => {+ (currentStep: number): boolean => {return currentStep !== 4 && currentStep !== 5},],@@ -836,7 +2273,13 @@ export const sourceWizardLogic = kea<sourceWizardLogicType>([s.isDirectQueryMode,s.webhookStepComplete,],- (currentStep, isManualLinkingSelected, databaseSchema, isDirectQueryMode, webhookStepComplete): boolean => {+ (+ currentStep: number,+ isManualLinkingSelected: boolean,+ databaseSchema: ExternalDataSourceSyncSchema[],+ isDirectQueryMode: boolean,+ webhookStepComplete: boolean+ ): boolean => {if (isManualLinkingSelected && currentStep === 1) {return false}@@ -862,7 +2305,7 @@ export const sourceWizardLogic = kea<sourceWizardLogicType>([],showSkipButton: [(s) => [s.currentStep],- (currentStep): boolean => {+ (currentStep: number): boolean => {return currentStep === 5},],@@ -877,13 +2320,16 @@ export const sourceWizardLogic = kea<sourceWizardLogicType>([s.sourceId,],(- currentStep,- isManualLinkingSelected,- isDirectQueryMode,- hasWebhookSchemas,+ currentStep: number,+ isManualLinkingSelected: boolean,+ isDirectQueryMode: boolean,+ hasWebhookSchemas: boolean,onComplete,- returnConfig,- sourceId+ returnConfig: {+ returnLabel: string+ returnUrl: string+ } | null,+ sourceId: string | null): string => {if (currentStep === 3 && isManualLinkingSelected) {return 'Link'@@ -923,11 +2369,15 @@ export const sourceWizardLogic = kea<sourceWizardLogicType>([],showFooter: [(s) => [s.selectedConnector, s.isManualLinkFormVisible],- (selectedConnector, isManualLinkFormVisible) => selectedConnector || isManualLinkFormVisible,+ (selectedConnector: SourceConfig | null, isManualLinkFormVisible: boolean) =>+ selectedConnector || isManualLinkFormVisible,],connectors: [(s) => [s.dataWarehouseSources, s.availableSources],- (sources, availableSources: Record<string, SourceConfig>): SourceConfig[] => {+ (+ sources: null | import('lib/api').PaginatedResponse<import('~/types').ExternalDataSource>,+ availableSources: Record<string, SourceConfig>+ ): SourceConfig[] => {if (!availableSources) {return []}@@ -982,20 +2432,30 @@ export const sourceWizardLogic = kea<sourceWizardLogicType>([],configuredSchemaName: [(s) => [s.source],- (source): string | null => (typeof source.payload.schema === 'string' ? source.payload.schema : null),+ (source: {+ access_method: 'direct' | 'warehouse'+ description: string+ payload: Record<string, any>+ prefix: string+ }): string | null => (typeof source.payload.schema === 'string' ? source.payload.schema : null),],groupedDatabaseSchema: [(s) => [s.filteredDatabaseSchema, s.configuredSchemaName],- (filteredDatabaseSchema, configuredSchemaName) =>+ (filteredDatabaseSchema: ExternalDataSourceSyncSchema[], configuredSchemaName: string | null) =>groupTablesBySchema(filteredDatabaseSchema, (schema) => schema.table, configuredSchemaName),],schemaGroupKeys: [(s) => [s.groupedDatabaseSchema],- (groupedDatabaseSchema) => getDefaultExpandedSchemaKeys(groupedDatabaseSchema),+ (+ groupedDatabaseSchema: {+ schemaName: string+ tables: ExternalDataSourceSyncSchema[]+ }[]+ ) => getDefaultExpandedSchemaKeys(groupedDatabaseSchema),],modalTitle: [(s) => [s.currentStep, s.isDirectQueryMode],- (currentStep, isDirectQueryMode) => {+ (currentStep: number, isDirectQueryMode: boolean) => {if (currentStep === 1) {return ''}diff --git a/products/data_warehouse/frontend/scenes/SchemaScene/columnAnnotationsLogic.ts b/products/data_warehouse/frontend/scenes/SchemaScene/columnAnnotationsLogic.tsindex fa4f4e003f26..c07845ddbe8d 100644--- a/products/data_warehouse/frontend/scenes/SchemaScene/columnAnnotationsLogic.ts+++ b/products/data_warehouse/frontend/scenes/SchemaScene/columnAnnotationsLogic.ts@@ -1,4 +1,4 @@-import { actions, afterMount, kea, key, listeners, path, props, reducers, selectors } from 'kea'+import { MakeLogicType, actions, afterMount, kea, key, listeners, path, props, reducers, selectors } from 'kea'import { loaders } from 'kea-loaders'import { lemonToast } from '@posthog/lemon-ui'@@ -12,12 +12,64 @@ import {} from 'products/data_warehouse/frontend/generated/api'import { WarehouseColumnAnnotationApi } from 'products/data_warehouse/frontend/generated/api.schemas'-import type { columnAnnotationsLogicType } from './columnAnnotationsLogicType'-export interface ColumnAnnotationsLogicProps {tableId: string}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface columnAnnotationsLogicValues {+ annotationByColumn: Record<string, WarehouseColumnAnnotationApi>+ annotations: WarehouseColumnAnnotationApi[]+ annotationsLoading: boolean+ savingColumn: string | null+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface columnAnnotationsLogicActions {+ loadAnnotations: () => any+ loadAnnotationsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadAnnotationsSuccess: (+ annotations: WarehouseColumnAnnotationApi[],+ payload?: any+ ) => {+ annotations: WarehouseColumnAnnotationApi[]+ payload?: any+ }+ saveDescription: (+ columnName: string,+ description: string+ ) => {+ columnName: string+ description: string+ }+ setSavingColumn: (columnName: string | null) => {+ columnName: string | null+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface columnAnnotationsLogicMeta {+ key: string+ __keaTypeGenInternalSelectorTypes: {+ annotationByColumn: (+ annotations: WarehouseColumnAnnotationApi[]+ ) => Record<string, WarehouseColumnAnnotationApi>+ }+}++export type columnAnnotationsLogicType = MakeLogicType<+ columnAnnotationsLogicValues,+ columnAnnotationsLogicActions,+ ColumnAnnotationsLogicProps,+ columnAnnotationsLogicMeta+>+export const columnAnnotationsLogic = kea<columnAnnotationsLogicType>([props({} as ColumnAnnotationsLogicProps),key(({ tableId }) => tableId),@@ -54,7 +106,7 @@ export const columnAnnotationsLogic = kea<columnAnnotationsLogicType>([selectors({annotationByColumn: [(s) => [s.annotations],- (annotations): Record<string, WarehouseColumnAnnotationApi> =>+ (annotations: WarehouseColumnAnnotationApi[]): Record<string, WarehouseColumnAnnotationApi> =>Object.fromEntries(annotations.map((annotation) => [annotation.column_name, annotation])),],}),diff --git a/products/data_warehouse/frontend/scenes/SchemaScene/schemaSceneLogic.ts b/products/data_warehouse/frontend/scenes/SchemaScene/schemaSceneLogic.tsindex 186ae826fa02..fc7eff629b50 100644--- a/products/data_warehouse/frontend/scenes/SchemaScene/schemaSceneLogic.ts+++ b/products/data_warehouse/frontend/scenes/SchemaScene/schemaSceneLogic.ts@@ -1,4 +1,4 @@-import { actions, afterMount, kea, key, listeners, path, props, reducers, selectors } from 'kea'+import { MakeLogicType, actions, afterMount, kea, key, listeners, path, props, reducers, selectors } from 'kea'import { loaders } from 'kea-loaders'import { actionToUrl, urlToAction } from 'kea-router'import posthog from 'posthog-js'@@ -23,8 +23,6 @@ import {import { cleanSourceId } from 'products/data_warehouse/frontend/utils'-import type { schemaSceneLogicType } from './schemaSceneLogicType'-export const SCHEMA_SCENE_TABS = ['configuration', 'metrics', 'history'] as constexport type SchemaSceneTab = (typeof SCHEMA_SCENE_TABS)[number]@@ -61,6 +59,120 @@ function buildSchemaUpdatePayload(schema: ExternalDataSourceSchema): Partial<Ext}}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface schemaSceneLogicValues {+ breadcrumbs: Breadcrumb[]+ currentSection: SchemaConfigurationSection+ currentTab: SchemaSceneTab+ isProjectTime: boolean+ refreshingSchemas: boolean+ resyncingSchema: boolean+ schema: ExternalDataSourceSchema | null+ schemaData: ExternalDataSchemaWithSource | null+ schemaDataLoading: boolean+ schemaIncrementalFields: SchemaIncrementalFieldsResponse | null+ schemaIncrementalFieldsLoading: boolean+ sidePanelContext: SidePanelSceneContext | null+ source: (ExternalDataSource & Partial<ExternalDataSchemaSourceSummary>) | null+ supportsColumnSelection: boolean+ supportsRowFilters: boolean+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface schemaSceneLogicActions {+ _setCurrentSection: (section: SchemaConfigurationSection) => {+ section: 'columns' | 'danger-zone' | 'descriptions' | 'details' | 'schedule' | 'sync-method'+ }+ _setCurrentTab: (tab: SchemaSceneTab) => {+ tab: 'configuration' | 'history' | 'metrics'+ }+ cancelSchema: (schema: ExternalDataSourceSchema) => {+ schema: ExternalDataSourceSchema+ }+ deleteTable: (schema: ExternalDataSourceSchema) => {+ schema: ExternalDataSourceSchema+ }+ loadSchema: () => any+ loadSchemaFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadSchemaIncrementalFields: (schemaId: string) => string+ loadSchemaIncrementalFieldsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadSchemaIncrementalFieldsSuccess: (+ schemaIncrementalFields: SchemaIncrementalFieldsResponse,+ payload?: string+ ) => {+ schemaIncrementalFields: SchemaIncrementalFieldsResponse+ payload?: string+ }+ loadSchemaSuccess: (+ schemaData: ExternalDataSchemaWithSource | null,+ payload?: any+ ) => {+ schemaData: ExternalDataSchemaWithSource | null+ payload?: any+ }+ refreshSchemas: () => {+ value: true+ }+ reloadSchema: (schema: ExternalDataSourceSchema) => {+ schema: ExternalDataSourceSchema+ }+ resyncSchema: (schema: ExternalDataSourceSchema) => {+ schema: ExternalDataSourceSchema+ }+ setCurrentSection: (section: SchemaConfigurationSection) => {+ section: 'columns' | 'danger-zone' | 'descriptions' | 'details' | 'schedule' | 'sync-method'+ }+ setCurrentTab: (tab: SchemaSceneTab) => {+ tab: 'configuration' | 'history' | 'metrics'+ }+ setIsProjectTime: (isProjectTime: boolean) => {+ isProjectTime: boolean+ }+ setRefreshingSchemas: (refreshing: boolean) => {+ refreshing: boolean+ }+ setResyncingSchema: (resyncing: boolean) => {+ resyncing: boolean+ }+ updateSchema: (schema: ExternalDataSourceSchema) => {+ schema: ExternalDataSourceSchema+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface schemaSceneLogicMeta {+ key: string+ __keaTypeGenInternalSelectorTypes: {+ schema: (schemaData: ExternalDataSchemaWithSource | null) => ExternalDataSourceSchema | null+ source: (+ schemaData: ExternalDataSchemaWithSource | null+ ) => (ExternalDataSource & Partial<ExternalDataSchemaSourceSummary>) | null+ supportsColumnSelection: (schemaData: ExternalDataSchemaWithSource | null) => boolean+ supportsRowFilters: (schemaData: ExternalDataSchemaWithSource | null) => boolean+ breadcrumbs: (schemaData: ExternalDataSchemaWithSource | null, arg: any) => Breadcrumb[]+ sidePanelContext: (arg: any, schema: ExternalDataSourceSchema | null) => SidePanelSceneContext | null+ }+}++export type schemaSceneLogicType = MakeLogicType<+ schemaSceneLogicValues,+ schemaSceneLogicActions,+ SchemaSceneProps,+ schemaSceneLogicMeta+>+export const schemaSceneLogic = kea<schemaSceneLogicType>([props({} as SchemaSceneProps),// Schema ids are globally unique, so keying on schemaId alone lets the scene and ConfigurationTab@@ -152,28 +264,34 @@ export const schemaSceneLogic = kea<schemaSceneLogicType>([],})),selectors({- schema: [(s) => [s.schemaData], (schemaData): ExternalDataSourceSchema | null => schemaData],+ schema: [+ (s) => [s.schemaData],+ (schemaData: ExternalDataSchemaWithSource | null): ExternalDataSourceSchema | null => schemaData,+ ],source: [(s) => [s.schemaData],// The summary carries exactly the fields the page reads (source_type, user_access_level,// supports_column_selection, api version info); intersect with the full type so existing// prop signatures are unchanged while the summary-only fields stay typed.- (schemaData): (ExternalDataSource & Partial<ExternalDataSchemaSourceSummary>) | null =>+ (+ schemaData: ExternalDataSchemaWithSource | null+ ): (ExternalDataSource & Partial<ExternalDataSchemaSourceSummary>) | null =>(schemaData?.source ?? null) as unknown as| (ExternalDataSource & Partial<ExternalDataSchemaSourceSummary>)| null,],supportsColumnSelection: [(s) => [s.schemaData],- (schemaData): boolean => !!schemaData?.source?.supports_column_selection,+ (schemaData: ExternalDataSchemaWithSource | null): boolean =>+ !!schemaData?.source?.supports_column_selection,],supportsRowFilters: [(s) => [s.schemaData],- (schemaData): boolean => !!schemaData?.source?.supports_row_filters,+ (schemaData: ExternalDataSchemaWithSource | null): boolean => !!schemaData?.source?.supports_row_filters,],breadcrumbs: [(s) => [s.schemaData, (_, props) => props.sourceId],- (schemaData, sourceId): Breadcrumb[] => {+ (schemaData: ExternalDataSchemaWithSource | null, sourceId): Breadcrumb[] => {return [{key: Scene.Sources,@@ -197,7 +315,7 @@ export const schemaSceneLogic = kea<schemaSceneLogicType>([],[SIDE_PANEL_CONTEXT_KEY]: [(s) => [(_, props) => props, s.schema],- (props, schema): SidePanelSceneContext | null => {+ (props, schema: ExternalDataSourceSchema | null): SidePanelSceneContext | null => {const id = cleanSourceId(props.sourceId)if (!id || !schema) {return nulldiff --git a/products/data_warehouse/frontend/scenes/SourceConnectScene/sourceConnectSceneLogic.tsx b/products/data_warehouse/frontend/scenes/SourceConnectScene/sourceConnectSceneLogic.tsxindex d43610406555..a983b5648d0b 100644--- a/products/data_warehouse/frontend/scenes/SourceConnectScene/sourceConnectSceneLogic.tsx+++ b/products/data_warehouse/frontend/scenes/SourceConnectScene/sourceConnectSceneLogic.tsx@@ -1,5 +1,6 @@-import { actions, connect, kea, path, reducers, selectors } from 'kea'+import { MakeLogicType, actions, connect, kea, path, reducers, selectors } from 'kea'import { forms } from 'kea-forms'+import type { DeepPartial, DeepPartialMap, FieldName, ValidationErrorType } from 'kea-forms'import { urlToAction } from 'kea-router'import posthog from 'posthog-js'@@ -16,7 +17,6 @@ import type { SourceCredentialApi } from 'products/warehouse_sources/frontend/geimport { availableSourcesLogic } from '../NewSourceScene/availableSourcesLogic'import { getErrorsForFields } from '../NewSourceScene/sourceWizardLogic'-import type { sourceConnectSceneLogicType } from './sourceConnectSceneLogicType'// Carries the field whose file failed to read/parse so the submit handler can name it in the toast.class FileUploadParseError extends Error {@@ -58,6 +58,91 @@ const buildCredentialsPayload = async (return payload}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface sourceConnectSceneLogicValues {+ availableSources: Record<string, SourceConfig> | null // availableSourcesLogic+ availableSourcesLoading: boolean // availableSourcesLogic+ breadcrumbs: Breadcrumb[]+ credentialsForm: Record<string, any>+ credentialsFormAllErrors: Record<string, any>+ credentialsFormChanged: boolean+ credentialsFormErrors: DeepPartialMap<Record<string, any>, ValidationErrorType>+ credentialsFormHasErrors: boolean+ credentialsFormManualErrors: Record<string, any>+ credentialsFormTouched: boolean+ credentialsFormTouches: Record<string, boolean>+ credentialsFormValidationErrors: DeepPartialMap<Record<string, any>, ValidationErrorType>+ isCredentialsFormSubmitting: boolean+ isCredentialsFormValid: boolean+ kind: string | null+ showCredentialsFormErrors: boolean+ sourceConfig: SourceConfig | null+ storedCredential: SourceCredentialApi | null+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface sourceConnectSceneLogicActions {+ resetCredentialsForm: (values?: Record<string, any>) => {+ values?: Record<string, any>+ }+ setCredentialsFormManualErrors: (errors: Record<string, any>) => {+ errors: Record<string, any>+ }+ setCredentialsFormValue: (+ key: FieldName,+ value: any+ ) => {+ name: FieldName+ value: any+ }+ setCredentialsFormValues: (values: DeepPartial<Record<string, any>>) => {+ values: DeepPartial<Record<string, any>>+ }+ setKind: (kind: string | null) => {+ kind: string | null+ }+ setStoredCredential: (credential: SourceCredentialApi) => {+ credential: SourceCredentialApi+ }+ submitCredentialsForm: () => {+ value: boolean+ }+ submitCredentialsFormFailure: (+ error: Error,+ errors: Record<string, any>+ ) => {+ error: Error+ errors: Record<string, any>+ }+ submitCredentialsFormRequest: (credentialsForm: Record<string, any>) => {+ credentialsForm: Record<string, any>+ }+ submitCredentialsFormSuccess: (credentialsForm: Record<string, any>) => {+ credentialsForm: Record<string, any>+ }+ touchCredentialsFormField: (key: string) => {+ key: string+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface sourceConnectSceneLogicMeta {+ __keaTypeGenInternalSelectorTypes: {+ sourceConfig: (+ availableSources: Record<string, SourceConfig> | null,+ kind: string | null+ ) => SourceConfig | null+ breadcrumbs: (sourceConfig: SourceConfig | null) => Breadcrumb[]+ }+}++export type sourceConnectSceneLogicType = MakeLogicType<+ sourceConnectSceneLogicValues,+ sourceConnectSceneLogicActions,+ Record<string, any>,+ sourceConnectSceneLogicMeta+>+export const sourceConnectSceneLogic = kea<sourceConnectSceneLogicType>([path(['products', 'dataWarehouse', 'sourceConnectSceneLogic']),connect(() => ({@@ -84,7 +169,7 @@ export const sourceConnectSceneLogic = kea<sourceConnectSceneLogicType>([selectors({sourceConfig: [(s) => [s.availableSources, s.kind],- (availableSources, kind): SourceConfig | null => {+ (availableSources: Record<string, SourceConfig> | null, kind: string | null): SourceConfig | null => {if (!availableSources || !kind) {return null}@@ -97,7 +182,7 @@ export const sourceConnectSceneLogic = kea<sourceConnectSceneLogicType>([],breadcrumbs: [(s) => [s.sourceConfig],- (sourceConfig): Breadcrumb[] => [+ (sourceConfig: SourceConfig | null): Breadcrumb[] => [{key: Scene.Sources,name: 'Sources',diff --git a/products/data_warehouse/frontend/scenes/SourceScene/SourceScene.tsx b/products/data_warehouse/frontend/scenes/SourceScene/SourceScene.tsxindex 765cabe9a8ad..3d49f68ec72b 100644--- a/products/data_warehouse/frontend/scenes/SourceScene/SourceScene.tsx+++ b/products/data_warehouse/frontend/scenes/SourceScene/SourceScene.tsx@@ -1,4 +1,5 @@import {+ MakeLogicType,actions,BuiltLogic,kea,@@ -35,7 +36,6 @@ import { ActivityScope, Breadcrumb, ExternalDataSource, ExternalDataSourceApiVerimport { cleanSourceId, isSelfManagedSourceId } from 'products/data_warehouse/frontend/utils'-import type { sourceSceneLogicType } from './SourceSceneType'import { ConfigurationTab } from './tabs/ConfigurationTab'import { MetricsTab } from './tabs/MetricsTab'import { SchemasTab } from './tabs/SchemasTab'@@ -64,6 +64,45 @@ export function shouldShowManagedSourceSyncsTab(return !!source && source.access_method !== 'direct'}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface sourceSceneLogicValues {+ breadcrumbName: string+ breadcrumbs: Breadcrumb[]+ currentTab: SourceSceneTab+ logicProps: any+ sidePanelContext: SidePanelSceneContext | null+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface sourceSceneLogicActions {+ _setCurrentTab: (tab: SourceSceneTab) => {+ tab: 'configuration' | 'history' | 'metrics' | 'schemas' | 'syncs' | 'webhook'+ }+ setBreadcrumbName: (name: string) => {+ name: string+ }+ setCurrentTab: (tab: SourceSceneTab) => {+ tab: 'configuration' | 'history' | 'metrics' | 'schemas' | 'syncs' | 'webhook'+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface sourceSceneLogicMeta {+ key: string+ __keaTypeGenInternalSelectorTypes: {+ logicProps: (arg: any) => any+ breadcrumbs: (breadcrumbName: string) => Breadcrumb[]+ sidePanelContext: (arg: any) => SidePanelSceneContext | null+ }+}++export type sourceSceneLogicType = MakeLogicType<+ sourceSceneLogicValues,+ sourceSceneLogicActions,+ SourceSceneProps,+ sourceSceneLogicMeta+>+export const sourceSceneLogic = kea<sourceSceneLogicType>([props({} as SourceSceneProps),key(({ id }: SourceSceneProps) => id),@@ -93,7 +132,7 @@ export const sourceSceneLogic = kea<sourceSceneLogicType>([logicProps: [() => [(_, props) => props], (props) => props],breadcrumbs: [(s) => [s.breadcrumbName],- (breadcrumbName): Breadcrumb[] => {+ (breadcrumbName: string): Breadcrumb[] => {return [{key: Scene.Sources,diff --git a/products/data_warehouse/frontend/scenes/SourceScene/syncMethodModalLogic.ts b/products/data_warehouse/frontend/scenes/SourceScene/syncMethodModalLogic.tsindex f6e8a58a48df..fc10c3261485 100644--- a/products/data_warehouse/frontend/scenes/SourceScene/syncMethodModalLogic.ts+++ b/products/data_warehouse/frontend/scenes/SourceScene/syncMethodModalLogic.ts@@ -1,4 +1,4 @@-import { actions, connect, kea, key, listeners, path, props, reducers } from 'kea'+import { MakeLogicType, actions, connect, kea, key, listeners, path, props, reducers } from 'kea'import { loaders } from 'kea-loaders'import { lemonToast } from '@posthog/lemon-ui'@@ -8,12 +8,90 @@ import api from 'lib/api'import { ExternalDataSourceSchema, SchemaIncrementalFieldsResponse } from '~/types'import { sourceManagementLogic } from '../../shared/logics/sourceManagementLogic'-import type { syncMethodModalLogicType } from './syncMethodModalLogicType'export interface SyncMethodModalLogicProps {schema: ExternalDataSourceSchema}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface syncMethodModalLogicValues {+ currentSyncMethodModalSchema: ExternalDataSourceSchema | null+ saveButtonIsLoading: boolean+ schemaIncrementalFields: SchemaIncrementalFieldsResponse | null+ schemaIncrementalFieldsLoading: boolean+ syncMethodModalIsOpen: boolean+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface syncMethodModalLogicActions {+ loadSources: () => {+ value: true+ } // sourceManagementLogic+ updateSchema: (schema: ExternalDataSourceSchema) => ExternalDataSourceSchema // sourceManagementLogic+ updateSchemaFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ } // sourceManagementLogic+ updateSchemaSuccess: (+ schemas: null,+ payload?: ExternalDataSourceSchema | undefined+ ) => {+ payload?: ExternalDataSourceSchema+ schemas: null+ } // sourceManagementLogic+ closeSyncMethodModal: () => {+ value: true+ }+ loadSchemaIncrementalFields: (schemaId: string) => string+ loadSchemaIncrementalFieldsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadSchemaIncrementalFieldsSuccess: (+ schemaIncrementalFields: SchemaIncrementalFieldsResponse,+ payload?: string+ ) => {+ schemaIncrementalFields: SchemaIncrementalFieldsResponse+ payload?: string+ }+ openSyncMethodModal: (schema: ExternalDataSourceSchema) => {+ schema: ExternalDataSourceSchema+ }+ resetSchemaIncrementalFields: () => any+ resetSchemaIncrementalFieldsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ resetSchemaIncrementalFieldsSuccess: (+ schemaIncrementalFields: null,+ payload?: any+ ) => {+ schemaIncrementalFields: null+ payload?: any+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface syncMethodModalLogicMeta {+ key: string+}++export type syncMethodModalLogicType = MakeLogicType<+ syncMethodModalLogicValues,+ syncMethodModalLogicActions,+ SyncMethodModalLogicProps,+ syncMethodModalLogicMeta+>+export const syncMethodModalLogic = kea<syncMethodModalLogicType>([path(['products', 'dataWarehouse', 'syncMethodModalLogic']),props({ schema: {} } as SyncMethodModalLogicProps),diff --git a/products/data_warehouse/frontend/scenes/SourceScene/tabs/sourceSettingsLogic.ts b/products/data_warehouse/frontend/scenes/SourceScene/tabs/sourceSettingsLogic.tsindex ad6f52d3d1f8..979784f83192 100644--- a/products/data_warehouse/frontend/scenes/SourceScene/tabs/sourceSettingsLogic.ts+++ b/products/data_warehouse/frontend/scenes/SourceScene/tabs/sourceSettingsLogic.ts@@ -1,5 +1,19 @@-import { actions, afterMount, beforeUnmount, connect, kea, key, listeners, path, props, reducers, selectors } from 'kea'+import {+ MakeLogicType,+ actions,+ afterMount,+ beforeUnmount,+ connect,+ kea,+ key,+ listeners,+ path,+ props,+ reducers,+ selectors,+} from 'kea'import { forms } from 'kea-forms'+import type { DeepPartial, DeepPartialMap, FieldName, ValidationErrorType } from 'kea-forms'import { loaders } from 'kea-loaders'import { router } from 'kea-router'import posthog from 'posthog-js'@@ -29,7 +43,6 @@ import { sourcesDataLogic } from '../../../shared/logics/sourcesDataLogic'import { availableSourcesLogic } from '../../NewSourceScene/availableSourcesLogic'import { SSH_FIELD, getErrorsForFields } from '../../NewSourceScene/sourceWizardLogic'import { sourceSceneLogic } from '../SourceScene'-import type { sourceSettingsLogicType } from './sourceSettingsLogicType'export interface SourceSettingsLogicProps {id: string@@ -336,6 +349,307 @@ function reportBulkResult(verb: string, total: number, failed: number, skipped:}}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface sourceSettingsLogicValues {+ availableSources: Record<string, SourceConfig> | null // availableSourcesLogic+ canLoadMoreJobs: boolean+ cdcStatus: CdcStatus | null+ cdcStatusError: string | null+ cdcStatusLoading: boolean+ filteredSchemas: ExternalDataSourceSchema[]+ frequencyFilter: DataWarehouseSyncInterval | null+ groupedFilteredSchemas: {+ schemaName: string+ tables: ExternalDataSourceSchema[]+ }[]+ inProgressRowsBySchema: Record<string, number>+ isProjectTime: boolean+ isSourceConfigSubmitting: boolean+ isSourceConfigValid: boolean+ jobs: ExternalDataJob[]+ jobsLoading: boolean+ pollPauseCount: number+ refreshingSchemas: boolean+ schemaFilterOptions: {+ frequencies: DataWarehouseSyncInterval[]+ statuses: string[]+ syncMethods: (Exclude<ExternalDataSourceSchema['sync_type'], null> | 'none')[]+ }+ schemaNameFilter: string+ selectedSchemas: string[]+ showEnabledSchemasOnly: boolean+ showSourceConfigErrors: boolean+ source: ExternalDataSource | null+ sourceConfig: Record<string, any>+ sourceConfigAllErrors: Record<string, any>+ sourceConfigChanged: boolean+ sourceConfigErrors: DeepPartialMap<Record<string, any>, ValidationErrorType>+ sourceConfigHasErrors: boolean+ sourceConfigLoading: boolean+ sourceConfigManualErrors: Record<string, any>+ sourceConfigTouched: boolean+ sourceConfigTouches: Record<string, boolean>+ sourceConfigValidationErrors: DeepPartialMap<Record<string, any>, ValidationErrorType>+ sourceFieldConfig: SourceConfig | null+ sourceId: string+ sourceLoading: boolean+ statusFilter: string | null+ syncMethodFilter: string | null+ syncingNow: boolean+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface sourceSettingsLogicActions {+ updateSource: (source: ExternalDataSource) => ExternalDataSource // sourcesDataLogic+ bulkDeleteData: (schemas: ExternalDataSourceSchema[]) => {+ schemas: ExternalDataSourceSchema[]+ }+ bulkDisable: (schemas: ExternalDataSourceSchema[]) => {+ schemas: ExternalDataSourceSchema[]+ }+ bulkResync: (schemas: ExternalDataSourceSchema[]) => {+ schemas: ExternalDataSourceSchema[]+ }+ bulkSetFrequency: (+ schemas: ExternalDataSourceSchema[],+ frequency: DataWarehouseSyncInterval+ ) => {+ frequency: DataWarehouseSyncInterval+ schemas: ExternalDataSourceSchema[]+ }+ bulkSyncNow: (schemas: ExternalDataSourceSchema[]) => {+ schemas: ExternalDataSourceSchema[]+ }+ cancelSchema: (schema: ExternalDataSourceSchema) => {+ schema: ExternalDataSourceSchema+ }+ deleteTable: (schema: ExternalDataSourceSchema) => {+ schema: ExternalDataSourceSchema+ }+ loadCdcStatus: () => any+ loadCdcStatusFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadCdcStatusSuccess: (+ cdcStatus: {+ enabled: boolean+ lag_bytes?: number | null | undefined+ lag_critical_threshold_mb?: number | undefined+ lag_warning_threshold_mb?: number | undefined+ management_mode?: 'posthog' | 'self_managed' | undefined+ publication_exists?: boolean | undefined+ publication_name?: string | undefined+ published_tables?: string[] | undefined+ slot_exists?: boolean | undefined+ slot_name?: string | undefined+ },+ payload?: any+ ) => {+ cdcStatus: {+ enabled: boolean+ lag_bytes?: number | null | undefined+ lag_critical_threshold_mb?: number | undefined+ lag_warning_threshold_mb?: number | undefined+ management_mode?: 'posthog' | 'self_managed' | undefined+ publication_exists?: boolean | undefined+ publication_name?: string | undefined+ published_tables?: string[] | undefined+ slot_exists?: boolean | undefined+ slot_name?: string | undefined+ }+ payload?: any+ }+ loadJobs: () => any+ loadJobsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadJobsSuccess: (+ jobs: ExternalDataJob[],+ payload?: any+ ) => {+ jobs: ExternalDataJob[]+ payload?: any+ }+ loadMoreJobs: () => any+ loadMoreJobsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadMoreJobsSuccess: (+ jobs: ExternalDataJob[],+ payload?: any+ ) => {+ jobs: ExternalDataJob[]+ payload?: any+ }+ loadSource: () => any+ loadSourceFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadSourceSuccess: (+ source: ExternalDataSource | null,+ payload?: any+ ) => {+ source: ExternalDataSource | null+ payload?: any+ }+ pausePolling: () => {+ value: true+ }+ refreshSchemas: () => {+ value: true+ }+ reloadSchema: (schema: ExternalDataSourceSchema) => {+ schema: ExternalDataSourceSchema+ }+ resetSourceConfig: (values?: Record<string, any>) => {+ values?: Record<string, any>+ }+ resumePolling: () => {+ value: true+ }+ resyncSchema: (schema: ExternalDataSourceSchema) => {+ schema: ExternalDataSourceSchema+ }+ setCanLoadMoreJobs: (canLoadMoreJobs: boolean) => {+ canLoadMoreJobs: boolean+ }+ setFrequencyFilter: (frequency: DataWarehouseSyncInterval | null) => {+ frequency: DataWarehouseSyncInterval | null+ }+ setIsProjectTime: (isProjectTime: boolean) => {+ isProjectTime: boolean+ }+ setRefreshingSchemas: (refreshing: boolean) => {+ refreshing: boolean+ }+ setSchemaNameFilter: (schemaNameFilter: string) => {+ schemaNameFilter: string+ }+ setSelectedSchemas: (schemaNames: string[]) => {+ schemaNames: string[]+ }+ setShowEnabledSchemasOnly: (showEnabledSchemasOnly: boolean) => {+ showEnabledSchemasOnly: boolean+ }+ setSourceConfigManualErrors: (errors: Record<string, any>) => {+ errors: Record<string, any>+ }+ setSourceConfigValue: (+ key: FieldName,+ value: any+ ) => {+ name: FieldName+ value: any+ }+ setSourceConfigValues: (values: DeepPartial<Record<string, any>>) => {+ values: DeepPartial<Record<string, any>>+ }+ setSourceId: (id: string) => {+ id: string+ }+ setStatusFilter: (status: string | null) => {+ status: string | null+ }+ setSyncMethodFilter: (syncMethod: string | null) => {+ syncMethod: string | null+ }+ setSyncingNow: (syncing: boolean) => {+ syncing: boolean+ }+ submitSourceConfig: () => {+ value: boolean+ }+ submitSourceConfigFailure: (+ error: Error,+ errors: Record<string, any>+ ) => {+ error: Error+ errors: Record<string, any>+ }+ submitSourceConfigRequest: (sourceConfig: Record<string, any>) => {+ sourceConfig: Record<string, any>+ }+ submitSourceConfigSuccess: (sourceConfig: Record<string, any>) => {+ sourceConfig: Record<string, any>+ }+ syncNow: () => {+ value: true+ }+ touchSourceConfigField: (key: string) => {+ key: string+ }+ updateSchema: (schema: ExternalDataSourceSchema) => ExternalDataSourceSchema+ updateSchemaFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject: any+ }+ updateSchemaSuccess: (+ source: ExternalDataSource | null,+ payload?: ExternalDataSourceSchema+ ) => {+ payload: ExternalDataSourceSchema | undefined+ source: ExternalDataSource | null+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface sourceSettingsLogicMeta {+ key: string+ __keaTypeGenInternalSelectorTypes: {+ sourceFieldConfig: (+ source: ExternalDataSource | null,+ availableSources: Record<string, SourceConfig> | null+ ) => SourceConfig | null+ inProgressRowsBySchema: (jobs: ExternalDataJob[]) => Record<string, number>+ filteredSchemas: (+ source: ExternalDataSource | null,+ showEnabledSchemasOnly: boolean,+ schemaNameFilter: string,+ statusFilter: string | null,+ syncMethodFilter: string | null,+ frequencyFilter: DataWarehouseSyncInterval | null+ ) => ExternalDataSourceSchema[]+ groupedFilteredSchemas: (+ filteredSchemas: ExternalDataSourceSchema[],+ source: ExternalDataSource | null+ ) => {+ schemaName: string+ tables: ExternalDataSourceSchema[]+ }[]+ schemaFilterOptions: (source: ExternalDataSource | null) => {+ frequencies: DataWarehouseSyncInterval[]+ statuses: string[]+ syncMethods: (Exclude<ExternalDataSourceSchema['sync_type'], null> | 'none')[]+ }+ }+}++export type sourceSettingsLogicType = MakeLogicType<+ sourceSettingsLogicValues,+ sourceSettingsLogicActions,+ SourceSettingsLogicProps,+ sourceSettingsLogicMeta+>+export const sourceSettingsLogic = kea<sourceSettingsLogicType>([path(['products', 'dataWarehouse', 'sourceSettingsLogic']),props({} as SourceSettingsLogicProps),@@ -572,7 +886,7 @@ export const sourceSettingsLogic = kea<sourceSettingsLogicType>([selectors({sourceFieldConfig: [(s) => [s.source, s.availableSources],- (source, availableSources) => {+ (source: ExternalDataSource | null, availableSources: Record<string, SourceConfig> | null) => {if (!source || !availableSources) {return null}@@ -585,7 +899,7 @@ export const sourceSettingsLogic = kea<sourceSettingsLogicType>([// the table column has nothing to render, so we fall back to the running job's rows_synced.inProgressRowsBySchema: [(s) => [s.jobs],- (jobs): Record<string, number> => {+ (jobs: ExternalDataJob[]): Record<string, number> => {const map: Record<string, number> = {}// jobs arrive newest-first; keep the first (latest) running job per schema.for (const job of jobs) {@@ -606,12 +920,12 @@ export const sourceSettingsLogic = kea<sourceSettingsLogicType>([s.frequencyFilter,],(- source,- showEnabledSchemasOnly,- schemaNameFilter,- statusFilter,- syncMethodFilter,- frequencyFilter+ source: ExternalDataSource | null,+ showEnabledSchemasOnly: boolean,+ schemaNameFilter: string,+ statusFilter: string | null,+ syncMethodFilter: string | null,+ frequencyFilter: DataWarehouseSyncInterval | null): ExternalDataSourceSchema[] => {if (!source?.schemas) {return []@@ -643,7 +957,10 @@ export const sourceSettingsLogic = kea<sourceSettingsLogicType>([// produce one group and render as a flat table.groupedFilteredSchemas: [(s) => [s.filteredSchemas, s.source],- (filteredSchemas, source): { schemaName: string; tables: ExternalDataSourceSchema[] }[] =>+ (+ filteredSchemas: ExternalDataSourceSchema[],+ source: ExternalDataSource | null+ ): { schemaName: string; tables: ExternalDataSourceSchema[] }[] =>groupTablesBySchema(filteredSchemas,(schema) => schema.name,@@ -654,7 +971,7 @@ export const sourceSettingsLogic = kea<sourceSettingsLogicType>([schemaFilterOptions: [(s) => [s.source],(- source+ source: ExternalDataSource | null): {statuses: string[]syncMethods: (Exclude<ExternalDataSourceSchema['sync_type'], null> | 'none')[]diff --git a/products/data_warehouse/frontend/scenes/SourceScene/tabs/webhookTabLogic.ts b/products/data_warehouse/frontend/scenes/SourceScene/tabs/webhookTabLogic.tsindex f286c6b44dc2..819365372962 100644--- a/products/data_warehouse/frontend/scenes/SourceScene/tabs/webhookTabLogic.ts+++ b/products/data_warehouse/frontend/scenes/SourceScene/tabs/webhookTabLogic.ts@@ -1,5 +1,6 @@-import { actions, afterMount, kea, key, listeners, path, props, reducers, selectors } from 'kea'+import { MakeLogicType, actions, afterMount, kea, key, listeners, path, props, reducers, selectors } from 'kea'import { forms } from 'kea-forms'+import type { DeepPartial, DeepPartialMap, FieldName, ValidationErrorType } from 'kea-forms'import { loaders } from 'kea-loaders'import { actionToUrl, router, urlToAction } from 'kea-router'@@ -13,7 +14,6 @@ import { ExternalDataSource, WebhookInfo } from '~/types'import type { WebhookCreateResult } from '../../../shared/components/forms/WebhookSetupForm'import { getErrorsForFields } from '../../NewSourceScene/sourceWizardLogic'import { sourceSettingsLogic } from './sourceSettingsLogic'-import type { webhookTabLogicType } from './webhookTabLogicType'export interface WebhookTabLogicProps {id: string@@ -23,6 +23,155 @@ export const WEBHOOK_SECTIONS = ['overview', 'configuration', 'activity'] as conexport type WebhookSection = (typeof WEBHOOK_SECTIONS)[number]export const DEFAULT_WEBHOOK_SECTION: WebhookSection = 'overview'+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface webhookTabLogicValues {+ canDeleteWebhook: boolean+ createWebhookResult: WebhookCreateResult | null+ currentSection: WebhookSection+ externalStateLabel: {+ label: string+ tagType: 'danger' | 'default' | 'success' | 'warning'+ }+ hasWebhookSchemas: boolean+ internalStateLabel: {+ label: string+ tagType: 'danger' | 'default' | 'success' | 'warning'+ }+ isWebhookFieldInputsSubmitting: boolean+ isWebhookFieldInputsValid: boolean+ mappedTables: {+ objectType: string+ tableName: string+ }[]+ showWebhookFieldInputsErrors: boolean+ source: ExternalDataSource | null+ sourceConfig: SourceConfig | null+ webhookCreating: boolean+ webhookDeleting: boolean+ webhookFieldInputs: Record<string, any>+ webhookFieldInputsAllErrors: Record<string, any>+ webhookFieldInputsChanged: boolean+ webhookFieldInputsErrors: DeepPartialMap<Record<string, any>, ValidationErrorType>+ webhookFieldInputsHasErrors: boolean+ webhookFieldInputsManualErrors: Record<string, any>+ webhookFieldInputsTouched: boolean+ webhookFieldInputsTouches: Record<string, boolean>+ webhookFieldInputsValidationErrors: DeepPartialMap<Record<string, any>, ValidationErrorType>+ webhookInfo: WebhookInfo | null+ webhookInfoLoading: boolean+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface webhookTabLogicActions {+ _setCurrentSection: (section: WebhookSection) => {+ section: 'activity' | 'configuration' | 'overview'+ }+ createWebhook: () => {+ value: true+ }+ deleteWebhook: () => {+ value: true+ }+ loadWebhookInfo: () => any+ loadWebhookInfoFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadWebhookInfoSuccess: (+ webhookInfo: WebhookInfo,+ payload?: any+ ) => {+ webhookInfo: WebhookInfo+ payload?: any+ }+ resetWebhookFieldInputs: (values?: Record<string, any>) => {+ values?: Record<string, any>+ }+ setCreateWebhookResult: (result: WebhookCreateResult | null) => {+ result: WebhookCreateResult | null+ }+ setCurrentSection: (section: WebhookSection) => {+ section: 'activity' | 'configuration' | 'overview'+ }+ setWebhookCreating: (creating: boolean) => {+ creating: boolean+ }+ setWebhookDeleting: (deleting: boolean) => {+ deleting: boolean+ }+ setWebhookFieldInputsManualErrors: (errors: Record<string, any>) => {+ errors: Record<string, any>+ }+ setWebhookFieldInputsValue: (+ key: FieldName,+ value: any+ ) => {+ name: FieldName+ value: any+ }+ setWebhookFieldInputsValues: (values: DeepPartial<Record<string, any>>) => {+ values: DeepPartial<Record<string, any>>+ }+ submitWebhookFieldInputs: () => {+ value: boolean+ }+ submitWebhookFieldInputsFailure: (+ error: Error,+ errors: Record<string, any>+ ) => {+ error: Error+ errors: Record<string, any>+ }+ submitWebhookFieldInputsRequest: (webhookFieldInputs: Record<string, any>) => {+ webhookFieldInputs: Record<string, any>+ }+ submitWebhookFieldInputsSuccess: (webhookFieldInputs: Record<string, any>) => {+ webhookFieldInputs: Record<string, any>+ }+ submitWebhookFields: () => {+ value: true+ }+ touchWebhookFieldInputsField: (key: string) => {+ key: string+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface webhookTabLogicMeta {+ key: string+ __keaTypeGenInternalSelectorTypes: {+ source: (arg: ExternalDataSource | null) => ExternalDataSource | null+ sourceConfig: (arg: SourceConfig | null) => SourceConfig | null+ internalStateLabel: (webhookInfo: WebhookInfo | null) => {+ label: string+ tagType: 'danger' | 'default' | 'success' | 'warning'+ }+ externalStateLabel: (webhookInfo: WebhookInfo | null) => {+ label: string+ tagType: 'danger' | 'default' | 'success' | 'warning'+ }+ hasWebhookSchemas: (source: ExternalDataSource | null) => boolean+ canDeleteWebhook: (webhookInfo: WebhookInfo | null, hasWebhookSchemas: boolean) => boolean+ mappedTables: (+ webhookInfo: WebhookInfo | null,+ source: ExternalDataSource | null+ ) => {+ objectType: string+ tableName: string+ }[]+ }+}++export type webhookTabLogicType = MakeLogicType<+ webhookTabLogicValues,+ webhookTabLogicActions,+ WebhookTabLogicProps,+ webhookTabLogicMeta+>+export const webhookTabLogic = kea<webhookTabLogicType>([props({} as WebhookTabLogicProps),key(({ id }: WebhookTabLogicProps) => id),diff --git a/products/data_warehouse/frontend/scenes/SourcesScene/sourcesSceneLogic.ts b/products/data_warehouse/frontend/scenes/SourcesScene/sourcesSceneLogic.tsindex 221897ba159b..733a1a183459 100644--- a/products/data_warehouse/frontend/scenes/SourcesScene/sourcesSceneLogic.ts+++ b/products/data_warehouse/frontend/scenes/SourcesScene/sourcesSceneLogic.ts@@ -1,8 +1,9 @@-import { kea, path } from 'kea'+import { MakeLogicType, kea, path } from 'kea'import { Breadcrumb } from '~/types'-import type { sourcesSceneLogicType } from './sourcesSceneLogicType'+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export type sourcesSceneLogicType = MakeLogicType<{}, {}>export const sourcesSceneLogic = kea<sourcesSceneLogicType>([path(['products', 'dataWarehouse', 'sourcesSceneLogic']),diff --git a/products/data_warehouse/frontend/shared/components/forms/customSourceManifestBuilderLogic.ts b/products/data_warehouse/frontend/shared/components/forms/customSourceManifestBuilderLogic.tsindex b385087b4b85..96d5e8374fc0 100644--- a/products/data_warehouse/frontend/shared/components/forms/customSourceManifestBuilderLogic.ts+++ b/products/data_warehouse/frontend/shared/components/forms/customSourceManifestBuilderLogic.ts@@ -1,4 +1,5 @@import {+ MakeLogicType,actions,afterMount,kea,@@ -10,6 +11,7 @@ import {selectors,sharedListeners,} from 'kea'+import type { BreakPointFunction } from 'kea'import type { FieldName } from 'kea-forms'import { loaders } from 'kea-loaders'@@ -33,7 +35,7 @@ import {type TableForm,updateTableInList,} from './customSourceManifest'-import type { customSourceManifestBuilderLogicType } from './customSourceManifestBuilderLogicType'+import type { AuthSecrets } from './customSourceManifest'export interface CustomSourceManifestBuilderLogicProps {/** Saved manifest JSON, supplied on the configuration page; undefined in the wizard. */@@ -47,6 +49,120 @@ export interface CustomSourceManifestBuilderLogicProps {setValue: (path: FieldName, value: unknown) => void}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface customSourceManifestBuilderLogicValues {+ authSecrets: AuthSecrets+ docsUrl: string+ draftResult: DraftCustomManifestResponseApi | null+ draftResultLoading: boolean+ hasContent: boolean+ manifestJson: string+ manifestPreviewOpen: boolean+ manifestState: ManifestState+ showBuilder: boolean+ sourceName: string+ userHasEdited: boolean+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface customSourceManifestBuilderLogicActions {+ addHeader: () => {+ value: true+ }+ addTable: () => {+ value: true+ }+ generateFromDocs: () => any+ generateFromDocsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ generateFromDocsSuccess: (+ draftResult: DraftCustomManifestResponseApi | null,+ payload?: any+ ) => {+ draftResult: DraftCustomManifestResponseApi | null+ payload?: any+ }+ removeHeader: (index: number) => {+ index: number+ }+ removeTable: (index: number) => {+ index: number+ }+ setDocsUrl: (docsUrl: string) => {+ docsUrl: string+ }+ setManifestPreviewOpen: (open: boolean) => {+ open: boolean+ }+ setManifestState: (state: ManifestState) => {+ state: ManifestState+ }+ setShowBuilder: (showBuilder: boolean) => {+ showBuilder: boolean+ }+ setSourceName: (sourceName: string) => {+ sourceName: string+ }+ syncToOuterForm: () => {+ value: true+ }+ updateHeader: (+ index: number,+ patch: Partial<HeaderEntry>+ ) => {+ index: number+ patch: Partial<HeaderEntry>+ }+ updatePaginator: (+ index: number,+ paginator: Paginator+ ) => {+ index: number+ paginator: Paginator+ }+ updateState: (patch: Partial<ManifestState>) => {+ patch: Partial<ManifestState>+ }+ updateTable: (+ index: number,+ patch: Partial<TableForm>+ ) => {+ index: number+ patch: Partial<TableForm>+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface customSourceManifestBuilderLogicMeta {+ sharedListeners: {+ pushManifestToOuterForm: (+ payload: any,+ breakpoint: BreakPointFunction,+ action: {+ type: string+ payload: any+ },+ previousState: any+ ) => void | Promise<void>+ }+ __keaTypeGenInternalSelectorTypes: {+ manifestJson: (manifestState: ManifestState) => string+ authSecrets: (manifestState: ManifestState) => AuthSecrets+ }+}++export type customSourceManifestBuilderLogicType = MakeLogicType<+ customSourceManifestBuilderLogicValues,+ customSourceManifestBuilderLogicActions,+ CustomSourceManifestBuilderLogicProps,+ customSourceManifestBuilderLogicMeta+>+/*** Owns the Custom REST source's manifest-builder form state (base URL, auth,* headers, tables) and mirrors it into the outer source form as@@ -204,8 +320,11 @@ export const customSourceManifestBuilderLogic = kea<customSourceManifestBuilderL],})),selectors({- manifestJson: [(s) => [s.manifestState], (state): string => JSON.stringify(buildManifest(state), null, 2)],- authSecrets: [(s) => [s.manifestState], (state) => extractAuthSecrets(state)],+ manifestJson: [+ (s) => [s.manifestState],+ (state: ManifestState): string => JSON.stringify(buildManifest(state), null, 2),+ ],+ authSecrets: [(s) => [s.manifestState], (state: ManifestState) => extractAuthSecrets(state)],}),sharedListeners(({ values, props }) => ({pushManifestToOuterForm: () => {diff --git a/products/data_warehouse/frontend/shared/logics/joinsLogic.ts b/products/data_warehouse/frontend/shared/logics/joinsLogic.tsindex c0c97f7b4542..711183d1f5d7 100644--- a/products/data_warehouse/frontend/shared/logics/joinsLogic.ts+++ b/products/data_warehouse/frontend/shared/logics/joinsLogic.ts@@ -1,4 +1,4 @@-import { afterMount, connect, kea, path, selectors } from 'kea'+import { MakeLogicType, afterMount, connect, kea, path, selectors } from 'kea'import { loaders } from 'kea-loaders'import api from 'lib/api'@@ -7,7 +7,7 @@ import { databaseTableListLogic } from 'scenes/data-management/database/databaseimport { DatabaseSerializedFieldType } from '~/queries/schema/schema-general'import { DataWarehouseViewLink, PropertyDefinition, PropertyType } from '~/types'-import type { joinsLogicType } from './joinsLogicType'+import type { DatabaseSchemaTable } from '../../../../../frontend/src/queries/schema/schema-general'const TYPE_MAPPING: Partial<Record<DatabaseSerializedFieldType, PropertyType>> = {datetime: PropertyType.DateTime,@@ -19,6 +19,60 @@ const TYPE_MAPPING: Partial<Record<DatabaseSerializedFieldType, PropertyType>> =array: PropertyType.StringArray,}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface joinsLogicValues {+ allTablesMap: Record<string, DatabaseSchemaTable> // databaseTableListLogic+ columnsJoinedToPersons: PropertyDefinition[]+ joins: DataWarehouseViewLink[]+ joinsLoading: boolean+ personTableJoins: DataWarehouseViewLink[]+ tablesJoinedToPersons: {+ join: DataWarehouseViewLink+ table: DatabaseSchemaTable+ }[]+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface joinsLogicActions {+ loadJoins: () => any+ loadJoinsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadJoinsSuccess: (+ joins: DataWarehouseViewLink[],+ payload?: any+ ) => {+ joins: DataWarehouseViewLink[]+ payload?: any+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface joinsLogicMeta {+ __keaTypeGenInternalSelectorTypes: {+ personTableJoins: (joins: DataWarehouseViewLink[]) => DataWarehouseViewLink[]+ tablesJoinedToPersons: (+ allTablesMap: Record<string, DatabaseSchemaTable>,+ personTableJoins: DataWarehouseViewLink[]+ ) => {+ join: DataWarehouseViewLink+ table: DatabaseSchemaTable+ }[]+ columnsJoinedToPersons: (+ tablesJoinedToPersons: {+ join: DataWarehouseViewLink+ table: DatabaseSchemaTable+ }[]+ ) => PropertyDefinition[]+ }+}++export type joinsLogicType = MakeLogicType<joinsLogicValues, joinsLogicActions, Record<string, any>, joinsLogicMeta>+export const joinsLogic = kea<joinsLogicType>([path(['products', 'dataWarehouse', 'joinsLogic']),loaders({@@ -36,10 +90,16 @@ export const joinsLogic = kea<joinsLogicType>([values: [databaseTableListLogic, ['allTablesMap']],})),selectors({- personTableJoins: [(s) => [s.joins], (joins) => joins.filter((join) => join.source_table_name === 'persons')],+ personTableJoins: [+ (s) => [s.joins],+ (joins: DataWarehouseViewLink[]) => joins.filter((join) => join.source_table_name === 'persons'),+ ],tablesJoinedToPersons: [(s) => [s.allTablesMap, s.personTableJoins],- (allTablesMap, personTableJoins) => {+ (+ allTablesMap: Record<string, import('~/queries/schema').DatabaseSchemaTable>,+ personTableJoins: DataWarehouseViewLink[]+ ) => {return personTableJoins.map((join: DataWarehouseViewLink) => {// valid join should have a joining table nameconst table = allTablesMap[join.joining_table_name as string]@@ -53,7 +113,12 @@ export const joinsLogic = kea<joinsLogicType>([],columnsJoinedToPersons: [(s) => [s.tablesJoinedToPersons],- (tablesJoinedToPersons) => {+ (+ tablesJoinedToPersons: {+ join: DataWarehouseViewLink+ table: import('~/queries/schema').DatabaseSchemaTable+ }[]+ ) => {return tablesJoinedToPersons.reduce((acc, { table, join }) => {if (table) {acc.push(diff --git a/products/data_warehouse/frontend/shared/logics/sourceManagementLogic.ts b/products/data_warehouse/frontend/shared/logics/sourceManagementLogic.tsindex 3e041fa4856a..9c6e6f8cd179 100644--- a/products/data_warehouse/frontend/shared/logics/sourceManagementLogic.ts+++ b/products/data_warehouse/frontend/shared/logics/sourceManagementLogic.ts@@ -1,4 +1,15 @@-import { actions, afterMount, beforeUnmount, connect, kea, listeners, path, reducers, selectors } from 'kea'+import {+ MakeLogicType,+ actions,+ afterMount,+ beforeUnmount,+ connect,+ kea,+ listeners,+ path,+ reducers,+ selectors,+} from 'kea'import { loaders } from 'kea-loaders'import { router, urlToAction } from 'kea-router'import posthog from 'posthog-js'@@ -18,13 +29,165 @@ import {ExternalDataSourceSchema,} from '~/types'+import type { PaginatedResponse } from '../../../../../frontend/src/lib/api'+import type {+ DatabaseSchemaQueryResponse,+ SourceConfig,+} from '../../../../../frontend/src/queries/schema/schema-general'+import type { ExternalDataSourceRevenueAnalyticsConfig } from '../../../../../frontend/src/types'import { availableSourcesLogic } from '../../scenes/NewSourceScene/availableSourcesLogic'import { joinsLogic } from './joinsLogic'-import type { sourceManagementLogicType } from './sourceManagementLogicType'import { sourcesDataLogic } from './sourcesDataLogic'const REFRESH_INTERVAL = 10000+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface sourceManagementLogicValues {+ availableSources: Record<string, SourceConfig> | null // availableSourcesLogic+ dataWarehouseTables: DatabaseSchemaDataWarehouseTable[] // databaseTableListLogic+ database: Required<DatabaseSchemaQueryResponse> | null // databaseTableListLogic+ dataWarehouseSources: PaginatedResponse<ExternalDataSource> | null // sourcesDataLogic+ dataWarehouseSourcesLoading: boolean // sourcesDataLogic+ filteredManagedSources: ExternalDataSource[]+ filteredSelfManagedTables: DatabaseSchemaDataWarehouseTable[]+ hasZendeskSource: boolean+ managedSearchTerm: string+ managedSources: ExternalDataSource[]+ managedSourcesFuse: Fuse<ExternalDataSource>+ schemaReloadingById: Record<string, boolean>+ schemas: null+ schemasLoading: boolean+ searchTerm: string+ selfManagedTables: DatabaseSchemaDataWarehouseTable[]+ sourceReloadingById: Record<string, boolean>+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface sourceManagementLogicActions {+ loadDatabase: ({ force }?: { force?: boolean }) => {+ force?: boolean+ } // databaseTableListLogic+ loadJoins: () => any // joinsLogic+ loadSources: () => {+ value: true+ } // sourcesDataLogic+ loadSourcesFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ } // sourcesDataLogic+ loadSourcesSuccess: (+ dataWarehouseSources:+ | PaginatedResponse<ExternalDataSource>+ | {+ count: number+ next: null+ previous: null+ results: never[]+ },+ payload?:+ | {+ value: true+ }+ | undefined+ ) => {+ dataWarehouseSources:+ | PaginatedResponse<ExternalDataSource>+ | {+ count: number+ next: null+ previous: null+ results: never[]+ }+ payload?: {+ value: true+ }+ } // sourcesDataLogic+ updateSource: (source: ExternalDataSource) => ExternalDataSource // sourcesDataLogic+ updateSourceRevenueAnalyticsConfig: (args_0: {+ config: Partial<ExternalDataSourceRevenueAnalyticsConfig>+ source: ExternalDataSource+ }) => {+ config: Partial<ExternalDataSourceRevenueAnalyticsConfig>+ source: ExternalDataSource+ } // sourcesDataLogic+ deleteJoin: (join: DataWarehouseViewLink) => {+ join: DataWarehouseViewLink+ }+ deleteSelfManagedTable: (tableId: string) => {+ tableId: string+ }+ deleteSource: (source: ExternalDataSource) => {+ source: ExternalDataSource+ }+ refreshSelfManagedTableSchema: (tableId: string) => {+ tableId: string+ }+ reloadSource: (source: ExternalDataSource) => {+ source: ExternalDataSource+ }+ schemaLoadingFinished: (schema: ExternalDataSourceSchema) => {+ schema: ExternalDataSourceSchema+ }+ setManagedSearchTerm: (managedSearchTerm: string) => {+ managedSearchTerm: string+ }+ setSearchTerm: (searchTerm: string) => {+ searchTerm: string+ }+ sourceLoadingFinished: (source: ExternalDataSource) => {+ source: ExternalDataSource+ }+ updateSchema: (schema: ExternalDataSourceSchema) => ExternalDataSourceSchema+ updateSchemaFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ updateSchemaSuccess: (+ schemas: null,+ payload?: ExternalDataSourceSchema+ ) => {+ schemas: null+ payload?: ExternalDataSourceSchema+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface sourceManagementLogicMeta {+ __keaTypeGenInternalSelectorTypes: {+ selfManagedTables: (+ dataWarehouseTables: DatabaseSchemaDataWarehouseTable[]+ ) => DatabaseSchemaDataWarehouseTable[]+ filteredSelfManagedTables: (+ selfManagedTables: DatabaseSchemaDataWarehouseTable[],+ searchTerm: string+ ) => DatabaseSchemaDataWarehouseTable[]+ managedSources: (dataWarehouseSources: PaginatedResponse<ExternalDataSource> | null) => ExternalDataSource[]+ managedSourcesFuse: (+ managedSources: ExternalDataSource[],+ availableSources: Record<string, SourceConfig> | null+ ) => Fuse<ExternalDataSource>+ filteredManagedSources: (+ managedSources: ExternalDataSource[],+ managedSourcesFuse: Fuse<ExternalDataSource>,+ managedSearchTerm: string+ ) => ExternalDataSource[]+ hasZendeskSource: (dataWarehouseSources: PaginatedResponse<ExternalDataSource> | null) => boolean+ }+}++export type sourceManagementLogicType = MakeLogicType<+ sourceManagementLogicValues,+ sourceManagementLogicActions,+ Record<string, any>,+ sourceManagementLogicMeta+>+export const sourceManagementLogic = kea<sourceManagementLogicType>([path(['products', 'dataWarehouse', 'sourceManagementLogic']),connect(() => ({@@ -133,7 +296,7 @@ export const sourceManagementLogic = kea<sourceManagementLogicType>([selectors({selfManagedTables: [(s) => [s.dataWarehouseTables],- (dataWarehouseTables): DatabaseSchemaDataWarehouseTable[] => {+ (dataWarehouseTables: DatabaseSchemaDataWarehouseTable[]): DatabaseSchemaDataWarehouseTable[] => {return dataWarehouseTables.filter((table) => !table.source)},],@@ -152,7 +315,9 @@ export const sourceManagementLogic = kea<sourceManagementLogicType>([],managedSources: [(s) => [s.dataWarehouseSources],- (dataWarehouseSources): ExternalDataSource[] =>+ (+ dataWarehouseSources: null | import('lib/api').PaginatedResponse<ExternalDataSource>+ ): ExternalDataSource[] =>(dataWarehouseSources?.results ?? []).filter((source) => source.access_method?.toLowerCase() !== 'direct'),@@ -160,7 +325,10 @@ export const sourceManagementLogic = kea<sourceManagementLogicType>([// Search the display label as well as the internal source_type. Fuzzy, like the source catalog.managedSourcesFuse: [(s) => [s.managedSources, s.availableSources],- (managedSources, availableSources): Fuse<ExternalDataSource> =>+ (+ managedSources: ExternalDataSource[],+ availableSources: Record<string, import('~/queries/schema').SourceConfig> | null+ ): Fuse<ExternalDataSource> =>createFuse(managedSources, {keys: [{@@ -175,7 +343,11 @@ export const sourceManagementLogic = kea<sourceManagementLogicType>([],filteredManagedSources: [(s) => [s.managedSources, s.managedSourcesFuse, s.managedSearchTerm],- (managedSources, managedSourcesFuse, managedSearchTerm): ExternalDataSource[] => {+ (+ managedSources: ExternalDataSource[],+ managedSourcesFuse: Fuse<ExternalDataSource>,+ managedSearchTerm: string+ ): ExternalDataSource[] => {const trimmed = managedSearchTerm?.trim()if (!trimmed) {return managedSources@@ -185,7 +357,7 @@ export const sourceManagementLogic = kea<sourceManagementLogicType>([],hasZendeskSource: [(s) => [s.dataWarehouseSources],- (dataWarehouseSources): boolean => {+ (dataWarehouseSources: null | import('lib/api').PaginatedResponse<ExternalDataSource>): boolean => {const sources = dataWarehouseSources?.resultsif (!sources) {return falsediff --git a/products/data_warehouse/frontend/shared/logics/sourcesDataLogic.ts b/products/data_warehouse/frontend/shared/logics/sourcesDataLogic.tsindex 8af51e03df7f..6d12977b9872 100644--- a/products/data_warehouse/frontend/shared/logics/sourcesDataLogic.ts+++ b/products/data_warehouse/frontend/shared/logics/sourcesDataLogic.ts@@ -1,11 +1,120 @@-import { actions, kea, listeners, path, reducers } from 'kea'+import { MakeLogicType, actions, kea, listeners, path, reducers } from 'kea'import { loaders } from 'kea-loaders'import api, { ApiError, ApiMethodOptions, PaginatedResponse } from 'lib/api'import { ExternalDataSource, ExternalDataSourceRevenueAnalyticsConfig } from '~/types'-import type { sourcesDataLogicType } from './sourcesDataLogicType'+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface sourcesDataLogicValues {+ dataWarehouseSources: PaginatedResponse<ExternalDataSource> | null+ dataWarehouseSourcesLoading: boolean+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface sourcesDataLogicActions {+ abortAnyRunningQuery: () => {+ value: true+ }+ loadSources: () => {+ value: true+ }+ loadSourcesFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadSourcesSuccess: (+ dataWarehouseSources:+ | PaginatedResponse<ExternalDataSource>+ | {+ count: number+ next: null+ previous: null+ results: never[]+ },+ payload?: {+ value: true+ }+ ) => {+ dataWarehouseSources:+ | PaginatedResponse<ExternalDataSource>+ | {+ count: number+ next: null+ previous: null+ results: never[]+ }+ payload?: {+ value: true+ }+ }+ updateSource: (source: ExternalDataSource) => ExternalDataSource+ updateSourceFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ updateSourceRevenueAnalyticsConfig: ({+ source,+ config,+ }: {+ config: Partial<ExternalDataSourceRevenueAnalyticsConfig>+ source: ExternalDataSource+ }) => {+ source: ExternalDataSource+ config: Partial<ExternalDataSourceRevenueAnalyticsConfig>+ }+ updateSourceRevenueAnalyticsConfigFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ updateSourceRevenueAnalyticsConfigSuccess: (+ dataWarehouseSources: {+ next?: string | null | undefined+ previous?: string | null | undefined+ results: ExternalDataSource[]+ },+ payload?: {+ source: ExternalDataSource+ config: Partial<ExternalDataSourceRevenueAnalyticsConfig>+ }+ ) => {+ dataWarehouseSources: {+ next?: string | null | undefined+ previous?: string | null | undefined+ results: ExternalDataSource[]+ }+ payload?: {+ source: ExternalDataSource+ config: Partial<ExternalDataSourceRevenueAnalyticsConfig>+ }+ }+ updateSourceSuccess: (+ dataWarehouseSources: {+ next?: string | null | undefined+ previous?: string | null | undefined+ results: ExternalDataSource[]+ },+ payload?: ExternalDataSource+ ) => {+ dataWarehouseSources: {+ next?: string | null | undefined+ previous?: string | null | undefined+ results: ExternalDataSource[]+ }+ payload?: ExternalDataSource+ }+}++export type sourcesDataLogicType = MakeLogicType<sourcesDataLogicValues, sourcesDataLogicActions>export const sourcesDataLogic = kea<sourcesDataLogicType>([path(['products', 'dataWarehouse', 'sourcesDataLogic']),diff --git a/products/engineering_analytics/frontend/scenes/authorLogic.ts b/products/engineering_analytics/frontend/scenes/authorLogic.tsindex f68372acf38b..69d1973630f7 100644--- a/products/engineering_analytics/frontend/scenes/authorLogic.ts+++ b/products/engineering_analytics/frontend/scenes/authorLogic.ts@@ -1,4 +1,4 @@-import { afterMount, connect, kea, key, listeners, path, props, selectors } from 'kea'+import { MakeLogicType, afterMount, connect, kea, key, listeners, path, props, selectors } from 'kea'import { loaders } from 'kea-loaders'import { ApiConfig } from 'lib/api'@@ -10,7 +10,6 @@ import { Breadcrumb } from '~/types'import { engineeringAnalyticsAuthorWorkflowCosts, engineeringAnalyticsPullRequests } from '../generated/api'import type { WorkflowCostApi } from '../generated/api.schemas'-import type { authorLogicType } from './authorLogicType'import { engineeringAnalyticsFiltersLogic } from './engineeringAnalyticsFiltersLogic'import { PullRequestRow, toPullRequestRow } from './engineeringAnalyticsLogic'@@ -28,6 +27,75 @@ export interface AuthorLogicProps {sourceId: string | null}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface authorLogicValues {+ dateFrom: string | null // engineeringAnalyticsFiltersLogic+ dateTo: string | null // engineeringAnalyticsFiltersLogic+ breadcrumbs: Breadcrumb[]+ handle: string+ openPrCount: number+ prs: PullRequestRow[]+ prsLoading: boolean+ sourceId: string | null+ totalBillableMinutes: number | null+ totalCostUsd: number | null+ totalLoops: number+ windowedRows: PullRequestRow[]+ workflowCosts: WorkflowCostApi[]+ workflowCostsLoading: boolean+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface authorLogicActions {+ loadPrs: () => any+ loadPrsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadPrsSuccess: (+ prs: PullRequestRow[],+ payload?: any+ ) => {+ prs: PullRequestRow[]+ payload?: any+ }+ loadWorkflowCosts: () => any+ loadWorkflowCostsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadWorkflowCostsSuccess: (+ workflowCosts: WorkflowCostApi[],+ payload?: any+ ) => {+ workflowCosts: WorkflowCostApi[]+ payload?: any+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface authorLogicMeta {+ key: string+ __keaTypeGenInternalSelectorTypes: {+ sourceId: (arg: string | null) => string | null+ handle: (arg: string) => string+ windowedRows: (prs: PullRequestRow[], dateFrom: string | null, dateTo: string | null) => PullRequestRow[]+ totalCostUsd: (windowedRows: PullRequestRow[]) => number | null+ totalBillableMinutes: (windowedRows: PullRequestRow[]) => number | null+ totalLoops: (windowedRows: PullRequestRow[]) => number+ openPrCount: (prs: PullRequestRow[]) => number+ breadcrumbs: (handle: string) => Breadcrumb[]+ }+}++export type authorLogicType = MakeLogicType<authorLogicValues, authorLogicActions, AuthorLogicProps, authorLogicMeta>+export const authorLogic = kea<authorLogicType>([path(['products', 'engineering_analytics', 'frontend', 'scenes', 'authorLogic']),props({} as AuthorLogicProps),@@ -79,8 +147,11 @@ export const authorLogic = kea<authorLogicType>([})),selectors({- sourceId: [() => [(_, p: AuthorLogicProps) => p.sourceId], (sourceId): string | null => sourceId],- handle: [() => [(_, p: AuthorLogicProps) => p.handle], (handle): string => handle],+ sourceId: [+ () => [(_, p: AuthorLogicProps) => p.sourceId],+ (sourceId: string | null): string | null => sourceId,+ ],+ handle: [() => [(_, p: AuthorLogicProps) => p.handle], (handle: string): string => handle],// The cost-tile scope: PRs opened within the selected window. The list shows every loaded PR; only// the cost KPIs narrow to this subset, so the date picker reads as "CI cost of PRs opened in window".windowedRows: [@@ -121,7 +192,7 @@ export const authorLogic = kea<authorLogicType>([],breadcrumbs: [(_, p) => [p.handle],- (handle): Breadcrumb[] => [+ (handle: string): Breadcrumb[] => [{key: 'EngineeringAnalytics',name: 'Engineering analytics',diff --git a/products/engineering_analytics/frontend/scenes/engineeringAnalyticsFiltersLogic.ts b/products/engineering_analytics/frontend/scenes/engineeringAnalyticsFiltersLogic.tsindex d48269b7454a..144216b94eb4 100644--- a/products/engineering_analytics/frontend/scenes/engineeringAnalyticsFiltersLogic.ts+++ b/products/engineering_analytics/frontend/scenes/engineeringAnalyticsFiltersLogic.ts@@ -1,8 +1,7 @@-import { actions, kea, listeners, path, reducers, selectors } from 'kea'+import { MakeLogicType, actions, kea, listeners, path, reducers, selectors } from 'kea'import { actionToUrl, router, urlToAction } from 'kea-router'import { EngineeringAnalyticsWorkflowHealthRunScope } from '../generated/api.schemas'-import type { engineeringAnalyticsFiltersLogicType } from './engineeringAnalyticsFiltersLogicType'// One window shared by every time-scoped CI-analytics surface, so a window picked on one page carries// to the others. 7 days: long enough to read a week of spend, short enough that health reads as recent.@@ -19,6 +18,53 @@ export interface BranchHealthParams {run_scope?: typeof PR_SCOPE}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface engineeringAnalyticsFiltersLogicValues {+ appliedBranch: string+ branchHealthParams: BranchHealthParams+ branchInput: string+ dateFrom: string | null+ dateTo: string | null+ pullRequestScope: boolean+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface engineeringAnalyticsFiltersLogicActions {+ applyBranchFilter: () => {+ value: true+ }+ scopeToPullRequests: () => {+ value: true+ }+ setAppliedBranch: (branch: string) => {+ branch: string+ }+ setBranchFilter: (branch: string) => {+ branch: string+ }+ setDateRange: (+ dateFrom: string | null,+ dateTo: string | null+ ) => {+ dateFrom: string | null+ dateTo: string | null+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface engineeringAnalyticsFiltersLogicMeta {+ __keaTypeGenInternalSelectorTypes: {+ branchHealthParams: (appliedBranch: string, pullRequestScope: boolean) => BranchHealthParams+ }+}++export type engineeringAnalyticsFiltersLogicType = MakeLogicType<+ engineeringAnalyticsFiltersLogicValues,+ engineeringAnalyticsFiltersLogicActions,+ Record<string, any>,+ engineeringAnalyticsFiltersLogicMeta+>+// The branch scope is shared like the window. An exact branch is a server-side head_branch filter; the PR// lens is a run_scope. The two are mutually exclusive — the reducers keep an invalid "branch + lens" state// from ever existing — so a page only ever sees one of them.@@ -66,7 +112,7 @@ export const engineeringAnalyticsFiltersLogic = kea<engineeringAnalyticsFiltersLselectors({branchHealthParams: [(s) => [s.appliedBranch, s.pullRequestScope],- (appliedBranch, pullRequestScope): BranchHealthParams =>+ (appliedBranch: string, pullRequestScope: boolean): BranchHealthParams =>pullRequestScope ? { run_scope: PR_SCOPE } : appliedBranch ? { branch: appliedBranch } : {},],}),diff --git a/products/engineering_analytics/frontend/scenes/engineeringAnalyticsLogic.ts b/products/engineering_analytics/frontend/scenes/engineeringAnalyticsLogic.tsindex 6e4d7ef39233..ed8cdcf1439c 100644--- a/products/engineering_analytics/frontend/scenes/engineeringAnalyticsLogic.ts+++ b/products/engineering_analytics/frontend/scenes/engineeringAnalyticsLogic.ts@@ -1,4 +1,15 @@-import { LogicWrapper, actions, afterMount, connect, kea, listeners, path, reducers, selectors } from 'kea'+import {+ MakeLogicType,+ LogicWrapper,+ actions,+ afterMount,+ connect,+ kea,+ listeners,+ path,+ reducers,+ selectors,+} from 'kea'import { loaders } from 'kea-loaders'import { actionToUrl, router, urlToAction } from 'kea-router'@@ -33,7 +44,7 @@ import type {import { CIStatus, ciStatusOf } from '../lib/ci'import { type FleetSummary, computeFleetSummary } from '../lib/runHealth'import { engineeringAnalyticsFiltersLogic } from './engineeringAnalyticsFiltersLogic'-import type { engineeringAnalyticsLogicType } from './engineeringAnalyticsLogicType'+import type { BranchHealthParams } from './engineeringAnalyticsFiltersLogic'// Mirrors the endpoint's server-side limit.export const PR_TABLE_LIMIT = 1000@@ -603,6 +614,400 @@ export function loaderStatusFromError(errorObject: unknown): LoaderStatus {return errorObject instanceof ApiError && errorObject.status === 400 ? 'notConnected' : 'error'}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface engineeringAnalyticsLogicValues {+ branchHealthParams: BranchHealthParams // engineeringAnalyticsFiltersLogic+ dateFrom: string | null // engineeringAnalyticsFiltersLogic+ dateTo: string | null // engineeringAnalyticsFiltersLogic+ activeCard: CardFilter | null+ activeQuarantineCard: QuarantineCard | null+ activeSource: GitHubSourceApi | null+ anyLoading: boolean+ author: string | null+ breakingMasterJobs: string[]+ brokenTests: BrokenTestRow[]+ brokenTestsData: BrokenTestsData | null+ brokenTestsDataLoading: boolean+ brokenTestsError: string | null+ brokenTestsWindowDays: number+ cards: CardsData | null+ cardsLoading: boolean+ cardsStatus: LoaderStatus+ ciStatusFilter: CIStatusFilter+ filteredPullRequests: PullRequestRow[]+ filteredQuarantineEntries: QuarantineEntryRow[]+ filteredWorkflowHealth: WorkflowHealthRow[]+ filters: PullRequestFilters+ flakyTestWindow: FlakyTestWindow+ flakyTests: FlakyTestsData | null+ flakyTestsLoading: boolean+ flakyTestsStatus: LoaderStatus+ fleetSummary: FleetSummary+ fleetTruncated: boolean+ githubSources: GitHubSourceApi[]+ githubSourcesLoading: boolean+ hasActiveFilters: boolean+ hasActiveQuarantineFilters: boolean+ hasActiveWorkflowFilters: boolean+ hasMultipleSources: boolean+ hiddenBrokenTestCount: number+ notConnected: boolean+ pullRequests: PullRequestRow[]+ pullRequestsLoadError: boolean+ pullRequestsLoading: boolean+ pullRequestsStatus: LoaderStatus+ quarantine: QuarantineData | null+ quarantineCounts: QuarantineCounts+ quarantineFilters: QuarantineFilters+ quarantineLifecycleFilter: QuarantineLifecycleFilter+ quarantineLoadFailed: boolean+ quarantineLoading: boolean+ quarantineModal: QuarantineModalState | null+ quarantineModeFilter: QuarantineModeFilter+ quarantineOwner: string | null+ quarantineOwnerOptions: string[]+ quarantineSearch: string+ quarantineSubmit: QuarantineRequestResultApi | null+ quarantineSubmitLoading: boolean+ readyCount: number+ readyOnly: boolean+ repo: string | null+ runFailureLogsByRun: Record<number, RunFailureLogsApi>+ runFailureLogsByRunLoading: boolean+ search: string+ showPrOnlyBrokenTests: boolean+ sourceId: string | null+ sourceOptions: {+ label: string+ value: string+ }[]+ stateFilter: PRStateFilter+ stuckOnly: boolean+ tableTruncated: boolean+ thrashCount: number+ thrashOnly: boolean+ visibleBrokenTests: BrokenTestRow[]+ workflowCostAvailable: boolean+ workflowFilters: WorkflowFilters+ workflowHealth: WorkflowHealthRow[]+ workflowHealthLoadError: boolean+ workflowHealthLoading: boolean+ workflowHealthStatus: LoaderStatus+ workflowSearch: string+ workflowStatusFilter: WorkflowStatusFilter+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface engineeringAnalyticsLogicActions {+ applyCardFilter: (card: CardFilter) => {+ card: CardFilter+ }+ applyQuarantineCard: (card: QuarantineCard) => {+ card: QuarantineCard+ }+ closeQuarantineModal: () => {+ value: true+ }+ loadBrokenTests: () => any+ loadBrokenTestsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadBrokenTestsSuccess: (+ brokenTestsData: BrokenTestsData,+ payload?: any+ ) => {+ brokenTestsData: BrokenTestsData+ payload?: any+ }+ loadCards: () => any+ loadCardsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadCardsSuccess: (+ cards: CardsData,+ payload?: any+ ) => {+ cards: CardsData+ payload?: any+ }+ loadFlakyTests: () => any+ loadFlakyTestsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadFlakyTestsSuccess: (+ flakyTests: FlakyTestsData,+ payload?: any+ ) => {+ flakyTests: FlakyTestsData+ payload?: any+ }+ loadGithubSources: () => any+ loadGithubSourcesFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadGithubSourcesSuccess: (+ githubSources: GitHubSourceApi[],+ payload?: any+ ) => {+ githubSources: GitHubSourceApi[]+ payload?: any+ }+ loadPullRequests: () => any+ loadPullRequestsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadPullRequestsSuccess: (+ pullRequests: PullRequestRow[],+ payload?: any+ ) => {+ pullRequests: PullRequestRow[]+ payload?: any+ }+ loadQuarantine: () => any+ loadQuarantineFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadQuarantineSuccess: (+ quarantine: QuarantineData,+ payload?: any+ ) => {+ quarantine: QuarantineData+ payload?: any+ }+ loadRunFailureLogs: ({ runId }: { runId: number }) => {+ runId: number+ }+ loadRunFailureLogsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadRunFailureLogsSuccess: (+ runFailureLogsByRun: Record<number, RunFailureLogsApi>,+ payload?: {+ runId: number+ }+ ) => {+ runFailureLogsByRun: Record<number, RunFailureLogsApi>+ payload?: {+ runId: number+ }+ }+ loadWorkflowHealth: () => any+ loadWorkflowHealthFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadWorkflowHealthSuccess: (+ workflowHealth: WorkflowHealthRow[],+ payload?: any+ ) => {+ workflowHealth: WorkflowHealthRow[]+ payload?: any+ }+ openQuarantineModal: (state: QuarantineModalState) => {+ state: QuarantineModalState+ }+ refresh: () => {+ value: true+ }+ resetFilters: () => {+ value: true+ }+ resetQuarantineFilters: () => {+ value: true+ }+ resetWorkflowFilters: () => {+ value: true+ }+ setAuthor: (author: string | null) => {+ author: string | null+ }+ setCiStatusFilter: (ciStatus: CIStatusFilter) => {+ ciStatus: CIStatusFilter+ }+ setFlakyTestWindow: (window: FlakyTestWindow) => {+ window: FlakyTestWindow+ }+ setQuarantineLifecycleFilter: (lifecycle: QuarantineLifecycleFilter) => {+ lifecycle: QuarantineLifecycleFilter+ }+ setQuarantineModeFilter: (mode: QuarantineModeFilter) => {+ mode: QuarantineModeFilter+ }+ setQuarantineOwner: (owner: string | null) => {+ owner: string | null+ }+ setQuarantineSearch: (search: string) => {+ search: string+ }+ setReadyOnly: (ready: boolean) => {+ ready: boolean+ }+ setRepo: (repo: string | null) => {+ repo: string | null+ }+ setSearch: (search: string) => {+ search: string+ }+ setShowPrOnlyBrokenTests: (show: boolean) => {+ show: boolean+ }+ setSourceId: (sourceId: string | null) => {+ sourceId: string | null+ }+ setStateFilter: (state: PRStateFilter) => {+ state: PRStateFilter+ }+ setStuckOnly: (stuckOnly: boolean) => {+ stuckOnly: boolean+ }+ setThrashOnly: (thrash: boolean) => {+ thrash: boolean+ }+ setWorkflowSearch: (search: string) => {+ search: string+ }+ setWorkflowStatusFilter: (status: WorkflowStatusFilter) => {+ status: WorkflowStatusFilter+ }+ submitQuarantine: ({ input }: { input: QuarantineSubmitInput }) => {+ input: QuarantineSubmitInput+ }+ submitQuarantineFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ submitQuarantineSuccess: (+ quarantineSubmit: QuarantineRequestResultApi,+ payload?: {+ input: QuarantineSubmitInput+ }+ ) => {+ quarantineSubmit: QuarantineRequestResultApi+ payload?: {+ input: QuarantineSubmitInput+ }+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface engineeringAnalyticsLogicMeta {+ __keaTypeGenInternalSelectorTypes: {+ fleetSummary: (workflowHealth: WorkflowHealthRow[]) => FleetSummary+ fleetTruncated: (workflowHealth: WorkflowHealthRow[]) => boolean+ workflowFilters: (workflowSearch: string, workflowStatusFilter: WorkflowStatusFilter) => WorkflowFilters+ filteredWorkflowHealth: (+ workflowHealth: WorkflowHealthRow[],+ workflowFilters: WorkflowFilters+ ) => WorkflowHealthRow[]+ hasActiveWorkflowFilters: (workflowFilters: WorkflowFilters) => boolean+ workflowCostAvailable: (workflowHealth: WorkflowHealthRow[]) => boolean+ filters: (+ stateFilter: PRStateFilter,+ author: string | null,+ repo: string | null,+ ciStatusFilter: CIStatusFilter,+ search: string,+ stuckOnly: boolean,+ readyOnly: boolean,+ thrashOnly: boolean+ ) => PullRequestFilters+ activeCard: (+ stateFilter: PRStateFilter,+ ciStatusFilter: CIStatusFilter,+ stuckOnly: boolean,+ readyOnly: boolean,+ thrashOnly: boolean+ ) => CardFilter | null+ filteredPullRequests: (pullRequests: PullRequestRow[], filters: PullRequestFilters) => PullRequestRow[]+ hasActiveFilters: (filters: PullRequestFilters) => boolean+ readyCount: (pullRequests: PullRequestRow[]) => number+ thrashCount: (pullRequests: PullRequestRow[]) => number+ anyLoading: (+ cardsLoading: boolean,+ pullRequestsLoading: boolean,+ workflowHealthLoading: boolean,+ quarantineLoading: boolean+ ) => boolean+ notConnected: (+ cardsStatus: LoaderStatus,+ pullRequestsStatus: LoaderStatus,+ workflowHealthStatus: LoaderStatus+ ) => boolean+ pullRequestsLoadError: (cardsStatus: LoaderStatus, pullRequestsStatus: LoaderStatus) => boolean+ workflowHealthLoadError: (workflowHealthStatus: LoaderStatus) => boolean+ tableTruncated: (pullRequests: PullRequestRow[]) => boolean+ quarantineFilters: (+ quarantineSearch: string,+ quarantineLifecycleFilter: QuarantineLifecycleFilter,+ quarantineModeFilter: QuarantineModeFilter,+ quarantineOwner: string | null+ ) => QuarantineFilters+ filteredQuarantineEntries: (+ quarantine: QuarantineData | null,+ quarantineFilters: QuarantineFilters+ ) => QuarantineEntryRow[]+ quarantineCounts: (quarantine: QuarantineData | null) => QuarantineCounts+ quarantineOwnerOptions: (quarantine: QuarantineData | null) => string[]+ activeQuarantineCard: (+ quarantineLifecycleFilter: QuarantineLifecycleFilter,+ quarantineModeFilter: QuarantineModeFilter+ ) => QuarantineCard | null+ hasActiveQuarantineFilters: (quarantineFilters: QuarantineFilters) => boolean+ brokenTests: (brokenTestsData: BrokenTestsData | null) => BrokenTestRow[]+ breakingMasterJobs: (brokenTestsData: BrokenTestsData | null) => string[]+ brokenTestsWindowDays: (brokenTestsData: BrokenTestsData | null) => number+ hiddenBrokenTestCount: (brokenTests: BrokenTestRow[]) => number+ visibleBrokenTests: (brokenTests: BrokenTestRow[], showPrOnlyBrokenTests: boolean) => BrokenTestRow[]+ hasMultipleSources: (githubSources: GitHubSourceApi[]) => boolean+ activeSource: (githubSources: GitHubSourceApi[], sourceId: string | null) => GitHubSourceApi | null+ sourceOptions: (githubSources: GitHubSourceApi[]) => {+ label: string+ value: string+ }[]+ }+}++export type engineeringAnalyticsLogicType = MakeLogicType<+ engineeringAnalyticsLogicValues,+ engineeringAnalyticsLogicActions,+ Record<string, any>,+ engineeringAnalyticsLogicMeta+>+export const engineeringAnalyticsLogic: LogicWrapper<engineeringAnalyticsLogicType> =kea<engineeringAnalyticsLogicType>([path(['products', 'engineering_analytics', 'frontend', 'scenes', 'engineeringAnalyticsLogic']),@@ -990,24 +1395,24 @@ export const engineeringAnalyticsLogic: LogicWrapper<engineeringAnalyticsLogicTyselectors({fleetSummary: [(s) => [s.workflowHealth],- (workflowHealth): FleetSummary => computeFleetSummary(workflowHealth),+ (workflowHealth: WorkflowHealthRow[]): FleetSummary => computeFleetSummary(workflowHealth),],fleetTruncated: [(s) => [s.workflowHealth],- (workflowHealth): boolean => workflowHealth.length >= WORKFLOW_HEALTH_LIMIT,+ (workflowHealth: WorkflowHealthRow[]): boolean => workflowHealth.length >= WORKFLOW_HEALTH_LIMIT,],workflowFilters: [(s) => [s.workflowSearch, s.workflowStatusFilter],- (search, status): WorkflowFilters => ({ search, status }),+ (search: string, status: WorkflowStatusFilter): WorkflowFilters => ({ search, status }),],filteredWorkflowHealth: [(s) => [s.workflowHealth, s.workflowFilters],- (workflowHealth, workflowFilters): WorkflowHealthRow[] =>+ (workflowHealth: WorkflowHealthRow[], workflowFilters: WorkflowFilters): WorkflowHealthRow[] =>filterWorkflowHealth(workflowHealth, workflowFilters),],hasActiveWorkflowFilters: [(s) => [s.workflowFilters],- (workflowFilters): boolean =>+ (workflowFilters: WorkflowFilters): boolean =>!objectsEqual({ ...workflowFilters, search: workflowFilters.search.trim() },DEFAULT_WORKFLOW_FILTERS@@ -1016,7 +1421,7 @@ export const engineeringAnalyticsLogic: LogicWrapper<engineeringAnalyticsLogicTy// Until the job-level source syncs every cost field is null — scenes hide the column instead.workflowCostAvailable: [(s) => [s.workflowHealth],- (workflowHealth): boolean =>+ (workflowHealth: WorkflowHealthRow[]): boolean =>workflowHealth.some((row) => row.billableMinutes != null || row.estimatedCostUsd != null),],filters: [@@ -1031,14 +1436,14 @@ export const engineeringAnalyticsLogic: LogicWrapper<engineeringAnalyticsLogicTys.thrashOnly,],(- stateFilter,- author,- repo,- ciStatus,- search,- stuckOnly,- readyOnly,- thrashOnly+ stateFilter: PRStateFilter,+ author: string | null,+ repo: string | null,+ ciStatus: CIStatusFilter,+ search: string,+ stuckOnly: boolean,+ readyOnly: boolean,+ thrashOnly: boolean): PullRequestFilters => ({state: stateFilter,author,@@ -1052,7 +1457,13 @@ export const engineeringAnalyticsLogic: LogicWrapper<engineeringAnalyticsLogicTy],activeCard: [(s) => [s.stateFilter, s.ciStatusFilter, s.stuckOnly, s.readyOnly, s.thrashOnly],- (stateFilter, ciStatus, stuckOnly, readyOnly, thrashOnly): CardFilter | null => {+ (+ stateFilter: PRStateFilter,+ ciStatus: CIStatusFilter,+ stuckOnly: boolean,+ readyOnly: boolean,+ thrashOnly: boolean+ ): CardFilter | null => {if (stateFilter !== 'open') {return null}@@ -1073,57 +1484,81 @@ export const engineeringAnalyticsLogic: LogicWrapper<engineeringAnalyticsLogicTy],filteredPullRequests: [(s) => [s.pullRequests, s.filters],- (pullRequests, filters): PullRequestRow[] => filterPullRequests(pullRequests, filters),+ (pullRequests: PullRequestRow[], filters: PullRequestFilters): PullRequestRow[] =>+ filterPullRequests(pullRequests, filters),],hasActiveFilters: [(s) => [s.filters],- (filters): boolean => !objectsEqual({ ...filters, search: filters.search.trim() }, DEFAULT_FILTERS),+ (filters: PullRequestFilters): boolean =>+ !objectsEqual({ ...filters, search: filters.search.trim() }, DEFAULT_FILTERS),],// Counted over the loaded list (the "most recent 1000" cap applies), not a separate backend// aggregate like the ci_cards counts — fine while a repo's open backlog fits in that window.- readyCount: [(s) => [s.pullRequests], (pullRequests): number => pullRequests.filter(isReady).length],- thrashCount: [(s) => [s.pullRequests], (pullRequests): number => pullRequests.filter(isThrashing).length],+ readyCount: [+ (s) => [s.pullRequests],+ (pullRequests: PullRequestRow[]): number => pullRequests.filter(isReady).length,+ ],+ thrashCount: [+ (s) => [s.pullRequests],+ (pullRequests: PullRequestRow[]): number => pullRequests.filter(isThrashing).length,+ ],anyLoading: [(s) => [s.cardsLoading, s.pullRequestsLoading, s.workflowHealthLoading, s.quarantineLoading],- (cardsLoading, pullRequestsLoading, workflowHealthLoading, quarantineLoading): boolean =>- cardsLoading || pullRequestsLoading || workflowHealthLoading || quarantineLoading,+ (+ cardsLoading: boolean,+ pullRequestsLoading: boolean,+ workflowHealthLoading: boolean,+ quarantineLoading: boolean+ ): boolean => cardsLoading || pullRequestsLoading || workflowHealthLoading || quarantineLoading,],notConnected: [(s) => [s.cardsStatus, s.pullRequestsStatus, s.workflowHealthStatus],- (cardsStatus, pullRequestsStatus, workflowHealthStatus): boolean =>- [cardsStatus, pullRequestsStatus, workflowHealthStatus].includes('notConnected'),+ (+ cardsStatus: LoaderStatus,+ pullRequestsStatus: LoaderStatus,+ workflowHealthStatus: LoaderStatus+ ): boolean => [cardsStatus, pullRequestsStatus, workflowHealthStatus].includes('notConnected'),],// Each scene's error state reacts only to the loaders it renders (see LoaderStatus).pullRequestsLoadError: [(s) => [s.cardsStatus, s.pullRequestsStatus],- (cardsStatus, pullRequestsStatus): boolean => cardsStatus === 'error' || pullRequestsStatus === 'error',+ (cardsStatus: LoaderStatus, pullRequestsStatus: LoaderStatus): boolean =>+ cardsStatus === 'error' || pullRequestsStatus === 'error',],workflowHealthLoadError: [(s) => [s.workflowHealthStatus],- (workflowHealthStatus): boolean => workflowHealthStatus === 'error',+ (workflowHealthStatus: LoaderStatus): boolean => workflowHealthStatus === 'error',+ ],+ tableTruncated: [+ (s) => [s.pullRequests],+ (pullRequests: PullRequestRow[]): boolean => pullRequests.length >= PR_TABLE_LIMIT,],- tableTruncated: [(s) => [s.pullRequests], (pullRequests): boolean => pullRequests.length >= PR_TABLE_LIMIT],quarantineFilters: [(s) => [s.quarantineSearch, s.quarantineLifecycleFilter, s.quarantineModeFilter, s.quarantineOwner],- (search, lifecycle, mode, owner): QuarantineFilters => ({ search, lifecycle, mode, owner }),+ (+ search: string,+ lifecycle: QuarantineLifecycleFilter,+ mode: QuarantineModeFilter,+ owner: string | null+ ): QuarantineFilters => ({ search, lifecycle, mode, owner }),],filteredQuarantineEntries: [(s) => [s.quarantine, s.quarantineFilters],- (quarantine, filters): QuarantineEntryRow[] =>+ (quarantine: QuarantineData | null, filters: QuarantineFilters): QuarantineEntryRow[] =>quarantine ? filterQuarantineEntries(quarantine.entries, filters) : [],],quarantineCounts: [(s) => [s.quarantine],- (quarantine): QuarantineCounts => quarantineCountsOf(quarantine?.entries ?? []),+ (quarantine: QuarantineData | null): QuarantineCounts => quarantineCountsOf(quarantine?.entries ?? []),],quarantineOwnerOptions: [(s) => [s.quarantine],- (quarantine): string[] =>+ (quarantine: QuarantineData | null): string[] =>Array.from(new Set((quarantine?.entries ?? []).map((entry) => entry.owner).filter(Boolean))).sort(),],activeQuarantineCard: [(s) => [s.quarantineLifecycleFilter, s.quarantineModeFilter],- (lifecycle, mode): QuarantineCard | null => {+ (lifecycle: QuarantineLifecycleFilter, mode: QuarantineModeFilter): QuarantineCard | null => {if (mode === 'skip' && lifecycle === 'all') {return 'skipped'}@@ -1138,21 +1573,21 @@ export const engineeringAnalyticsLogic: LogicWrapper<engineeringAnalyticsLogicTy],hasActiveQuarantineFilters: [(s) => [s.quarantineFilters],- (filters): boolean =>+ (filters: QuarantineFilters): boolean =>!objectsEqual({ ...filters, search: filters.search.trim() }, DEFAULT_QUARANTINE_FILTERS),],// Classified rows come pre-ranked from the endpoint (severity, then last_seen desc).brokenTests: [(s) => [s.brokenTestsData],- (brokenTestsData): BrokenTestRow[] => brokenTestsData?.rows ?? [],+ (brokenTestsData: BrokenTestsData | null): BrokenTestRow[] => brokenTestsData?.rows ?? [],],breakingMasterJobs: [(s) => [s.brokenTestsData],- (brokenTestsData): string[] => brokenTestsData?.breakingMasterJobs ?? [],+ (brokenTestsData: BrokenTestsData | null): string[] => brokenTestsData?.breakingMasterJobs ?? [],],brokenTestsWindowDays: [(s) => [s.brokenTestsData],- (brokenTestsData): number => brokenTestsData?.windowDays ?? 2,+ (brokenTestsData: BrokenTestsData | null): number => brokenTestsData?.windowDays ?? 2,],hiddenBrokenTestCount: [(s) => [s.brokenTests],@@ -1160,19 +1595,22 @@ export const engineeringAnalyticsLogic: LogicWrapper<engineeringAnalyticsLogicTy],visibleBrokenTests: [(s) => [s.brokenTests, s.showPrOnlyBrokenTests],- (brokenTests: BrokenTestRow[], showPrOnly): BrokenTestRow[] =>+ (brokenTests: BrokenTestRow[], showPrOnly: boolean): BrokenTestRow[] =>showPrOnly ? brokenTests : brokenTests.filter((row) => row.state !== 'pr_only'),],- hasMultipleSources: [(s) => [s.githubSources], (githubSources): boolean => githubSources.length > 1],+ hasMultipleSources: [+ (s) => [s.githubSources],+ (githubSources: GitHubSourceApi[]): boolean => githubSources.length > 1,+ ],// The source reads resolve to: the picked one, else the backend default (oldest connected = first).activeSource: [(s) => [s.githubSources, s.sourceId],- (githubSources, sourceId): GitHubSourceApi | null =>+ (githubSources: GitHubSourceApi[], sourceId: string | null): GitHubSourceApi | null =>(sourceId ? githubSources.find((source) => source.id === sourceId) : githubSources[0]) ?? null,],sourceOptions: [(s) => [s.githubSources],- (githubSources): { value: string; label: string }[] =>+ (githubSources: GitHubSourceApi[]): { value: string; label: string }[] =>githubSources.map((source) => ({value: source.id,label: source.repo || source.prefix || `source ${source.id.slice(0, 8)}`,diff --git a/products/engineering_analytics/frontend/scenes/engineeringAnalyticsSceneLogic.ts b/products/engineering_analytics/frontend/scenes/engineeringAnalyticsSceneLogic.tsindex f9842c2acc6c..d818ad01f987 100644--- a/products/engineering_analytics/frontend/scenes/engineeringAnalyticsSceneLogic.ts+++ b/products/engineering_analytics/frontend/scenes/engineeringAnalyticsSceneLogic.ts@@ -1,9 +1,7 @@-import { connect, kea, path, selectors } from 'kea'+import { MakeLogicType, connect, kea, path, selectors } from 'kea'import { sceneLogic } from '~/scenes/sceneLogic'-import type { engineeringAnalyticsSceneLogicType } from './engineeringAnalyticsSceneLogicType'-/** The root scene's views: the repo hub landing, the PR list page, the workflow list page, test health, and teams. */export type EngineeringAnalyticsView = 'hub' | 'pull-requests' | 'workflows' | 'test-health' | 'teams'@@ -23,6 +21,26 @@ const SCENE_KEY_TO_VIEW: Record<string, EngineeringAnalyticsView> = {engineeringAnalyticsTeams: 'teams',}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface engineeringAnalyticsSceneLogicValues {+ sceneKey: string | null // sceneLogic+ activeView: EngineeringAnalyticsView+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface engineeringAnalyticsSceneLogicMeta {+ __keaTypeGenInternalSelectorTypes: {+ activeView: (sceneKey: string | null) => EngineeringAnalyticsView+ }+}++export type engineeringAnalyticsSceneLogicType = MakeLogicType<+ engineeringAnalyticsSceneLogicValues,+ {},+ Record<string, any>,+ engineeringAnalyticsSceneLogicMeta+>+export const engineeringAnalyticsSceneLogic = kea<engineeringAnalyticsSceneLogicType>([path(['products', 'engineering_analytics', 'frontend', 'scenes', 'engineeringAnalyticsSceneLogic']),connect(() => ({diff --git a/products/engineering_analytics/frontend/scenes/pullRequestDetailLogic.ts b/products/engineering_analytics/frontend/scenes/pullRequestDetailLogic.tsindex e0818aec6f35..f90c82dee844 100644--- a/products/engineering_analytics/frontend/scenes/pullRequestDetailLogic.ts+++ b/products/engineering_analytics/frontend/scenes/pullRequestDetailLogic.ts@@ -1,4 +1,4 @@-import { actions, afterMount, kea, key, listeners, path, props, reducers, selectors } from 'kea'+import { MakeLogicType, actions, afterMount, kea, key, listeners, path, props, reducers, selectors } from 'kea'import { loaders } from 'kea-loaders'import { ApiConfig } from 'lib/api'@@ -29,7 +29,6 @@ import {isPassingConclusion,summarizeLifecycle,} from '../lib/lifecycle'-import type { pullRequestDetailLogicType } from './pullRequestDetailLogicType'const projectId = (): string => String(ApiConfig.getCurrentProjectId())@@ -163,6 +162,187 @@ export function groupRunsByCommit(prRuns: WorkflowRunDetailApi[]): PrCommitRuns[return groups}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface pullRequestDetailLogicValues {+ breadcrumbs: Breadcrumb[]+ commitGroups: PrCommitRuns[]+ expandedRunKeys: string[]+ failingJobLabelByWorkflow: Record<string, string>+ failureLogs: CIFailureLogsApi | 'unavailable' | null+ failureLogsLoading: boolean+ filteredCommitGroups: PrCommitRuns[]+ filteredPrWorkflowRows: PrWorkflowRow[]+ filteredRuns: PrRunRow[]+ latestPushStats: LatestPushStats | null+ lifecycle: PRLifecycleApi | null+ lifecycleLoading: boolean+ loadFailed: boolean+ prCost: PRCostSummaryApi | null+ prCostLoading: boolean+ prRuns: WorkflowRunDetailApi[]+ prRunsFailed: boolean+ prRunsLoading: boolean+ prWorkflowRows: PrWorkflowRow[]+ pushes: number+ repoName: string+ repoOwner: string+ rerunCycles: number+ runCostByKey: Record<+ string,+ {+ cost: number | null+ minutes: number | null+ }+ >+ runJobs: Record<string, WorkflowJobApi[]>+ runJobsLoading: boolean+ runs: WorkflowRun[]+ sourceId: string | null+ summary: LifecycleSummary | null+ workflowFilter: string+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface pullRequestDetailLogicActions {+ loadFailureLogs: () => any+ loadFailureLogsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadFailureLogsSuccess: (+ failureLogs: CIFailureLogsApi | 'unavailable',+ payload?: any+ ) => {+ failureLogs: CIFailureLogsApi | 'unavailable'+ payload?: any+ }+ loadJobs: ({ runId, runAttempt }: { runAttempt: number | null; runId: number }) => {+ runId: number+ runAttempt: number | null+ }+ loadJobsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadJobsSuccess: (+ runJobs: Record<string, WorkflowJobApi[]>,+ payload?: {+ runId: number+ runAttempt: number | null+ }+ ) => {+ runJobs: Record<string, WorkflowJobApi[]>+ payload?: {+ runId: number+ runAttempt: number | null+ }+ }+ loadLifecycle: () => any+ loadLifecycleFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadLifecycleSuccess: (+ lifecycle: PRLifecycleApi | null,+ payload?: any+ ) => {+ lifecycle: PRLifecycleApi | null+ payload?: any+ }+ loadPrCost: () => any+ loadPrCostFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadPrCostSuccess: (+ prCost: PRCostSummaryApi | null,+ payload?: any+ ) => {+ prCost: PRCostSummaryApi | null+ payload?: any+ }+ loadPrRuns: () => any+ loadPrRunsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadPrRunsSuccess: (+ prRuns: WorkflowRunDetailApi[],+ payload?: any+ ) => {+ prRuns: WorkflowRunDetailApi[]+ payload?: any+ }+ setRunExpanded: (+ rowKey: string,+ expanded: boolean,+ runId: number | null,+ runAttempt: number | null+ ) => {+ expanded: boolean+ rowKey: string+ runAttempt: number | null+ runId: number | null+ }+ setWorkflowFilter: (filter: string) => {+ filter: string+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface pullRequestDetailLogicMeta {+ key: string+ __keaTypeGenInternalSelectorTypes: {+ sourceId: (arg: string | null) => string | null+ repoOwner: (arg: string) => string+ repoName: (arg: string) => string+ summary: (lifecycle: PRLifecycleApi | null) => LifecycleSummary | null+ runs: (prRuns: WorkflowRunDetailApi[]) => WorkflowRun[]+ commitGroups: (prRuns: WorkflowRunDetailApi[]) => PrCommitRuns[]+ filteredCommitGroups: (commitGroups: PrCommitRuns[], workflowFilter: string) => PrCommitRuns[]+ filteredRuns: (filteredCommitGroups: PrCommitRuns[]) => PrRunRow[]+ prWorkflowRows: (commitGroups: PrCommitRuns[], prCost: PRCostSummaryApi | null) => PrWorkflowRow[]+ runCostByKey: (prCost: PRCostSummaryApi | null) => Record<+ string,+ {+ cost: number | null+ minutes: number | null+ }+ >+ filteredPrWorkflowRows: (prWorkflowRows: PrWorkflowRow[], workflowFilter: string) => PrWorkflowRow[]+ latestPushStats: (commitGroups: PrCommitRuns[]) => LatestPushStats | null+ failingJobLabelByWorkflow: (+ filteredRuns: PrRunRow[],+ runJobs: Record<string, WorkflowJobApi[]>+ ) => Record<string, string>+ pushes: (prRuns: WorkflowRunDetailApi[]) => number+ rerunCycles: (prRuns: WorkflowRunDetailApi[]) => number+ breadcrumbs: (repoOwner: string, repoName: string, number: number) => Breadcrumb[]+ }+}++export type pullRequestDetailLogicType = MakeLogicType<+ pullRequestDetailLogicValues,+ pullRequestDetailLogicActions,+ PullRequestDetailLogicProps,+ pullRequestDetailLogicMeta+>+export const pullRequestDetailLogic = kea<pullRequestDetailLogicType>([path(['products', 'engineering_analytics', 'frontend', 'scenes', 'pullRequestDetailLogic']),props({} as PullRequestDetailLogicProps),@@ -306,19 +486,29 @@ export const pullRequestDetailLogic = kea<pullRequestDetailLogicType>([})),selectors({- sourceId: [() => [(_, p: PullRequestDetailLogicProps) => p.sourceId], (sourceId): string | null => sourceId],- repoOwner: [() => [(_, p: PullRequestDetailLogicProps) => p.repoOwner], (repoOwner): string => repoOwner],- repoName: [() => [(_, p: PullRequestDetailLogicProps) => p.repoName], (repoName): string => repoName],+ sourceId: [+ () => [(_, p: PullRequestDetailLogicProps) => p.sourceId],+ (sourceId: string | null): string | null => sourceId,+ ],+ repoOwner: [+ () => [(_, p: PullRequestDetailLogicProps) => p.repoOwner],+ (repoOwner: string): string => repoOwner,+ ],+ repoName: [() => [(_, p: PullRequestDetailLogicProps) => p.repoName], (repoName: string): string => repoName],summary: [(s) => [s.lifecycle],- (lifecycle): LifecycleSummary | null => (lifecycle ? summarizeLifecycle(lifecycle.events) : null),+ (lifecycle: PRLifecycleApi | null): LifecycleSummary | null =>+ lifecycle ? summarizeLifecycle(lifecycle.events) : null,+ ],+ runs: [(s) => [s.prRuns], (prRuns: WorkflowRunDetailApi[]): WorkflowRun[] => prRuns.map(toWorkflowRun)],+ commitGroups: [+ (s) => [s.prRuns],+ (prRuns: WorkflowRunDetailApi[]): PrCommitRuns[] => groupRunsByCommit(prRuns),],- runs: [(s) => [s.prRuns], (prRuns): WorkflowRun[] => prRuns.map(toWorkflowRun)],- commitGroups: [(s) => [s.prRuns], (prRuns): PrCommitRuns[] => groupRunsByCommit(prRuns)],// Groups with their runs narrowed to the workflow filter; groups with no match drop out.filteredCommitGroups: [(s) => [s.commitGroups, s.workflowFilter],- (commitGroups, workflowFilter): PrCommitRuns[] => {+ (commitGroups: PrCommitRuns[], workflowFilter: string): PrCommitRuns[] => {const query = workflowFilter.trim().toLowerCase()if (!query) {return commitGroups@@ -334,7 +524,7 @@ export const pullRequestDetailLogic = kea<pullRequestDetailLogicType>([// Flat run list (newest push first), each run tagged with its commit.filteredRuns: [(s) => [s.filteredCommitGroups],- (groups): PrRunRow[] =>+ (groups: PrCommitRuns[]): PrRunRow[] =>groups.flatMap((group) =>group.runs.map((run) => ({ ...run, headSha: group.headSha, headBranch: group.headBranch }))),@@ -343,7 +533,7 @@ export const pullRequestDetailLogic = kea<pullRequestDetailLogicType>([// the verdict column derives from latestRunPerWorkflow separately.prWorkflowRows: [(s) => [s.commitGroups, s.prCost],- (commitGroups, prCost): PrWorkflowRow[] => {+ (commitGroups: PrCommitRuns[], prCost: PRCostSummaryApi | null): PrWorkflowRow[] => {const costByWorkflow = new Map((prCost?.by_workflow ?? []).map((cost) => [cost.workflow_name, cost]))const workflowNames: string[] = []const seen = new Set<string>()@@ -375,7 +565,7 @@ export const pullRequestDetailLogic = kea<pullRequestDetailLogicType>([// Per-run cost keyed by jobCacheKey(run_id, run_attempt); empty when the job source isn't synced.runCostByKey: [(s) => [s.prCost],- (prCost): Record<string, { minutes: number | null; cost: number | null }> => {+ (prCost: PRCostSummaryApi | null): Record<string, { minutes: number | null; cost: number | null }> => {const map: Record<string, { minutes: number | null; cost: number | null }> = {}for (const rc of prCost?.by_run ?? []) {map[jobCacheKey(rc.run_id, rc.run_attempt)] = {@@ -395,12 +585,12 @@ export const pullRequestDetailLogic = kea<pullRequestDetailLogicType>([],latestPushStats: [(s) => [s.commitGroups],- (commitGroups): LatestPushStats | null => computeLatestPushStats(commitGroups[0]),+ (commitGroups: PrCommitRuns[]): LatestPushStats | null => computeLatestPushStats(commitGroups[0]),],// workflow → "what failed" label (de-sharded failing job names); missing = jobs not loaded yet.failingJobLabelByWorkflow: [(s) => [s.filteredRuns, s.runJobs],- (filteredRuns, runJobs): Record<string, string> => {+ (filteredRuns: PrRunRow[], runJobs: Record<string, WorkflowJobApi[]>): Record<string, string> => {const labels: Record<string, string> = {}for (const [workflow, run] of latestRunPerWorkflow(filteredRuns)) {if (run.conclusion == null || isPassingConclusion(run.conclusion) || run.runId == null) {@@ -423,11 +613,17 @@ export const pullRequestDetailLogic = kea<pullRequestDetailLogicType>([},],// Both match the backend definitions (`pushes`, `rerun_cycles`).- pushes: [(s) => [s.prRuns], (prRuns): number => new Set(prRuns.map((run) => run.head_sha)).size],- rerunCycles: [(s) => [s.prRuns], (prRuns): number => prRuns.filter((run) => (run.run_attempt ?? 1) > 1).length],+ pushes: [+ (s) => [s.prRuns],+ (prRuns: WorkflowRunDetailApi[]): number => new Set(prRuns.map((run) => run.head_sha)).size,+ ],+ rerunCycles: [+ (s) => [s.prRuns],+ (prRuns: WorkflowRunDetailApi[]): number => prRuns.filter((run) => (run.run_attempt ?? 1) > 1).length,+ ],breadcrumbs: [(_, p) => [p.repoOwner, p.repoName, p.number],- (repoOwner, repoName, number): Breadcrumb[] => [+ (repoOwner: string, repoName: string, number: number): Breadcrumb[] => [{key: 'EngineeringAnalytics',name: 'Engineering analytics',diff --git a/products/engineering_analytics/frontend/scenes/repoOverviewLogic.ts b/products/engineering_analytics/frontend/scenes/repoOverviewLogic.tsindex 3d1a0accc228..7f86a6f4447e 100644--- a/products/engineering_analytics/frontend/scenes/repoOverviewLogic.ts+++ b/products/engineering_analytics/frontend/scenes/repoOverviewLogic.ts@@ -1,4 +1,4 @@-import { actions, afterMount, connect, kea, listeners, path, reducers, selectors } from 'kea'+import { MakeLogicType, actions, afterMount, connect, kea, listeners, path, reducers, selectors } from 'kea'import { loaders } from 'kea-loaders'import { ApiConfig } from 'lib/api'@@ -23,7 +23,7 @@ import { ciStatusOf } from '../lib/ci'import { HUB_PREVIEW_MAX, HUB_PREVIEW_ROWS, HUB_PREVIEW_STEP } from '../lib/preview'import { engineeringAnalyticsFiltersLogic } from './engineeringAnalyticsFiltersLogic'import { PullRequestRow, STUCK_AFTER_DAYS, engineeringAnalyticsLogic, isStuck } from './engineeringAnalyticsLogic'-import type { repoOverviewLogicType } from './repoOverviewLogicType'+import type { CardsData, WorkflowHealthRow } from './engineeringAnalyticsLogic'const projectId = (): string => String(ApiConfig.getCurrentProjectId())@@ -44,6 +44,198 @@ export interface CurrentHealthSummary {failingWorkflowNames: string[]}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface repoOverviewLogicValues {+ dateFrom: string | null // engineeringAnalyticsFiltersLogic+ dateTo: string | null // engineeringAnalyticsFiltersLogic+ cards: CardsData | null // engineeringAnalyticsLogic+ notConnected: boolean // engineeringAnalyticsLogic+ pullRequests: PullRequestRow[] // engineeringAnalyticsLogic+ pullRequestsLoading: boolean // engineeringAnalyticsLogic+ sourceId: string | null // engineeringAnalyticsLogic+ workflowHealth: WorkflowHealthRow[] // engineeringAnalyticsLogic+ workflowHealthLoading: boolean // engineeringAnalyticsLogic+ activityRuns: ActivityRun[]+ activityTruncated: boolean+ attentionPrs: PullRequestRow[]+ costByWorkflow: CostShareRow[]+ costPerMergeSeries: {+ interval: 'day' | 'hour' | 'week'+ labels: string[]+ values: number[]+ } | null+ currentBranchHealth: CurrentBranchHealthApi | null+ currentBranchHealthFailed: boolean+ currentBranchHealthLoading: boolean+ currentDefaultBranch: string+ currentHealthSummary: CurrentHealthSummary+ draftCount: number+ failureLogs: Record<number, RunFailureLogsApi | 'unavailable'>+ failureLogsLoading: boolean+ jobsAvailable: boolean+ masterFailures: MasterFailureGroupApi[]+ masterFailuresLoading: boolean+ openToMergeSeries: {+ labels: string[]+ values: number[]+ } | null+ otherCostWorkflowCount: number+ overview: RepoOverviewApi | null+ overviewDefaultBranch: string+ overviewFailed: boolean+ overviewLoading: boolean+ passRateSeries: {+ labels: string[]+ values: number[]+ } | null+ prPreviewCount: number+ repoActivity: WorkflowRunActivityApi+ repoActivityFailed: boolean+ repoActivityLoading: boolean+ timeToGreenSeries: {+ labels: string[]+ values: number[]+ } | null+ workflowPreviewCount: number+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface repoOverviewLogicActions {+ loadCurrentBranchHealth: (_: void) => void+ loadCurrentBranchHealthFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadCurrentBranchHealthSuccess: (+ currentBranchHealth: CurrentBranchHealthApi,+ payload?: void+ ) => {+ currentBranchHealth: CurrentBranchHealthApi+ payload?: void+ }+ loadFailureLogs: ({ runId }: { runId: number }) => {+ runId: number+ }+ loadFailureLogsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadFailureLogsSuccess: (+ failureLogs: Record<number, RunFailureLogsApi | 'unavailable'>,+ payload?: {+ runId: number+ }+ ) => {+ failureLogs: Record<number, RunFailureLogsApi | 'unavailable'>+ payload?: {+ runId: number+ }+ }+ loadLogsForRun: (runId: number) => {+ runId: number+ }+ loadMasterFailures: () => any+ loadMasterFailuresFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadMasterFailuresSuccess: (+ masterFailures: MasterFailureGroupApi[],+ payload?: any+ ) => {+ masterFailures: MasterFailureGroupApi[]+ payload?: any+ }+ loadOverview: () => any+ loadOverviewFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadOverviewSuccess: (+ overview: RepoOverviewApi,+ payload?: any+ ) => {+ overview: RepoOverviewApi+ payload?: any+ }+ loadRepoActivity: () => any+ loadRepoActivityFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadRepoActivitySuccess: (+ repoActivity: WorkflowRunActivityApi,+ payload?: any+ ) => {+ repoActivity: WorkflowRunActivityApi+ payload?: any+ }+ showMorePrs: () => {+ value: true+ }+ showMoreWorkflows: () => {+ value: true+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface repoOverviewLogicMeta {+ __keaTypeGenInternalSelectorTypes: {+ jobsAvailable: (overview: RepoOverviewApi | null) => boolean+ overviewDefaultBranch: (overview: RepoOverviewApi | null) => string+ currentDefaultBranch: (+ currentBranchHealth: CurrentBranchHealthApi | null,+ overviewDefaultBranch: string+ ) => string+ currentHealthSummary: (currentBranchHealth: CurrentBranchHealthApi | null) => CurrentHealthSummary+ activityRuns: (repoActivity: WorkflowRunActivityApi) => ActivityRun[]+ activityTruncated: (repoActivity: WorkflowRunActivityApi) => boolean+ attentionPrs: (pullRequests: PullRequestRow[]) => PullRequestRow[]+ draftCount: (pullRequests: PullRequestRow[]) => number+ costByWorkflow: (workflowHealth: WorkflowHealthRow[]) => CostShareRow[]+ otherCostWorkflowCount: (workflowHealth: WorkflowHealthRow[]) => number+ costPerMergeSeries: (overview: RepoOverviewApi | null) => {+ interval: 'day' | 'hour' | 'week'+ labels: string[]+ values: number[]+ } | null+ timeToGreenSeries: (overview: RepoOverviewApi | null) => {+ labels: string[]+ values: number[]+ } | null+ passRateSeries: (overview: RepoOverviewApi | null) => {+ labels: string[]+ values: number[]+ } | null+ openToMergeSeries: (overview: RepoOverviewApi | null) => {+ labels: string[]+ values: number[]+ } | null+ }+}++export type repoOverviewLogicType = MakeLogicType<+ repoOverviewLogicValues,+ repoOverviewLogicActions,+ Record<string, any>,+ repoOverviewLogicMeta+>+export const repoOverviewLogic = kea<repoOverviewLogicType>([path(['products', 'engineering_analytics', 'frontend', 'scenes', 'repoOverviewLogic']),@@ -183,16 +375,22 @@ export const repoOverviewLogic = kea<repoOverviewLogicType>([}),selectors({- jobsAvailable: [(s) => [s.overview], (overview): boolean => overview?.jobs_available ?? false],- overviewDefaultBranch: [(s) => [s.overview], (overview): string => overview?.default_branch ?? 'master'],+ jobsAvailable: [+ (s) => [s.overview],+ (overview: RepoOverviewApi | null): boolean => overview?.jobs_available ?? false,+ ],+ overviewDefaultBranch: [+ (s) => [s.overview],+ (overview: RepoOverviewApi | null): string => overview?.default_branch ?? 'master',+ ],currentDefaultBranch: [(s) => [s.currentBranchHealth, s.overviewDefaultBranch],- (currentBranchHealth, overviewDefaultBranch): string =>+ (currentBranchHealth: CurrentBranchHealthApi | null, overviewDefaultBranch: string): string =>currentBranchHealth?.default_branch ?? overviewDefaultBranch,],currentHealthSummary: [(s) => [s.currentBranchHealth],- (currentBranchHealth): CurrentHealthSummary => ({+ (currentBranchHealth: CurrentBranchHealthApi | null): CurrentHealthSummary => ({settledWorkflows: currentBranchHealth?.settled_workflows ?? 0,failingNow: currentBranchHealth?.failing_workflows ?? 0,failingWorkflowNames: currentBranchHealth?.failing_workflow_names ?? [],@@ -202,7 +400,7 @@ export const repoOverviewLogic = kea<repoOverviewLogicType>([// commit: start time, wall-clock CI duration, overall verdict).activityRuns: [(s) => [s.repoActivity],- (repoActivity): ActivityRun[] =>+ (repoActivity: WorkflowRunActivityApi): ActivityRun[] =>repoActivity.points.map((point) => ({runId: point.run_id,conclusion: point.conclusion,@@ -213,11 +411,14 @@ export const repoOverviewLogic = kea<repoOverviewLogicType>([headSha: point.head_sha,})),],- activityTruncated: [(s) => [s.repoActivity], (repoActivity): boolean => repoActivity.truncated],+ activityTruncated: [+ (s) => [s.repoActivity],+ (repoActivity: WorkflowRunActivityApi): boolean => repoActivity.truncated,+ ],// Open PRs with failing CI or stuck (open >7d, non-draft, non-bot) — not the full open list.attentionPrs: [(s) => [s.pullRequests],- (pullRequests): PullRequestRow[] => {+ (pullRequests: PullRequestRow[]): PullRequestRow[] => {const stuckCutoffMs = dayjs().subtract(STUCK_AFTER_DAYS, 'day').valueOf()return pullRequests.filter(@@ -228,11 +429,12 @@ export const repoOverviewLogic = kea<repoOverviewLogicType>([],draftCount: [(s) => [s.pullRequests],- (pullRequests): number => pullRequests.filter((row) => row.state === 'open' && row.isDraft).length,+ (pullRequests: PullRequestRow[]): number =>+ pullRequests.filter((row) => row.state === 'open' && row.isDraft).length,],costByWorkflow: [(s) => [s.workflowHealth],- (workflowHealth): CostShareRow[] => {+ (workflowHealth: import('./engineeringAnalyticsLogic').WorkflowHealthRow[]): CostShareRow[] => {const costed = workflowHealth.filter((row) => (row.estimatedCostUsd ?? 0) > 0)if (!costed.length) {return []@@ -255,7 +457,7 @@ export const repoOverviewLogic = kea<repoOverviewLogicType>([],otherCostWorkflowCount: [(s) => [s.workflowHealth],- (workflowHealth): number =>+ (workflowHealth: import('./engineeringAnalyticsLogic').WorkflowHealthRow[]): number =>Math.max(0,workflowHealth.filter((row) => (row.estimatedCostUsd ?? 0) > 0).length - TOP_COST_WORKFLOWS@@ -268,7 +470,9 @@ export const repoOverviewLogic = kea<repoOverviewLogicType>([// Labels stay ISO — the quill time-series chart owns tick/tooltip date formatting.costPerMergeSeries: [(s) => [s.overview],- (overview): { values: number[]; labels: string[]; interval: 'hour' | 'day' | 'week' } | null => {+ (+ overview: RepoOverviewApi | null+ ): { values: number[]; labels: string[]; interval: 'hour' | 'day' | 'week' } | null => {const series = overview?.cost_series ?? []const firstData = series.findIndex((bucket) => bucket.cost_per_merge_usd != null)if (firstData === -1) {@@ -288,7 +492,7 @@ export const repoOverviewLogic = kea<repoOverviewLogicType>([// Null when no bucket has a successful PR run, so the card shows its own empty state.timeToGreenSeries: [(s) => [s.overview],- (overview): { values: number[]; labels: string[] } | null => {+ (overview: RepoOverviewApi | null): { values: number[]; labels: string[] } | null => {const series = overview?.time_to_green_series ?? []const firstData = series.findIndex((bucket) => bucket.p50_seconds != null)if (firstData === -1) {@@ -311,7 +515,7 @@ export const repoOverviewLogic = kea<repoOverviewLogicType>([// bucket has a completed run, so the card shows its own empty state.passRateSeries: [(s) => [s.overview],- (overview): { values: number[]; labels: string[] } | null => {+ (overview: RepoOverviewApi | null): { values: number[]; labels: string[] } | null => {const series = overview?.success_rate_series ?? []const firstData = series.findIndex((bucket) => bucket.success_rate != null)if (firstData === -1) {@@ -334,7 +538,7 @@ export const repoOverviewLogic = kea<repoOverviewLogicType>([// draw a false dip. Null when no bucket had a qualifying merge.openToMergeSeries: [(s) => [s.overview],- (overview): { values: number[]; labels: string[] } | null => {+ (overview: RepoOverviewApi | null): { values: number[]; labels: string[] } | null => {const series = overview?.open_to_merge_series ?? []const firstData = series.findIndex((bucket) => bucket.p50_seconds != null)if (firstData === -1) {diff --git a/products/engineering_analytics/frontend/scenes/teamDetailLogic.ts b/products/engineering_analytics/frontend/scenes/teamDetailLogic.tsindex 9df793da5001..7b92cd46ca7c 100644--- a/products/engineering_analytics/frontend/scenes/teamDetailLogic.ts+++ b/products/engineering_analytics/frontend/scenes/teamDetailLogic.ts@@ -1,11 +1,10 @@-import { actions, afterMount, kea, key, listeners, path, props, reducers, selectors } from 'kea'+import { MakeLogicType, actions, afterMount, kea, key, listeners, path, props, reducers, selectors } from 'kea'import { loaders } from 'kea-loaders'import { ApiConfig } from 'lib/api'import { Dayjs, dayjs } from 'lib/dayjs'import { engineeringAnalyticsTeamCiActivity, engineeringAnalyticsTeamMergeTrend } from '../generated/api'-import type { teamDetailLogicType } from './teamDetailLogicType'import { DEFAULT_TEAMS_WINDOW, TeamsWindow, UNOWNED_TEAM } from './teamsLogic'const projectId = (): string => String(ApiConfig.getCurrentProjectId())@@ -40,6 +39,78 @@ export interface TeamMergeTrendData {points: TeamMergePoint[]}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface teamDetailLogicValues {+ activity: TeamActivityData | null+ activityLoading: boolean+ mergeTrend: TeamMergeTrendData | null+ mergeTrendLoading: boolean+ mergeTrendSeries: {+ average: number[]+ labels: string[]+ median: number[]+ } | null+ ownerTeam: string+ window: TeamsWindow+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface teamDetailLogicActions {+ loadActivity: () => any+ loadActivityFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadActivitySuccess: (+ activity: TeamActivityData,+ payload?: any+ ) => {+ activity: TeamActivityData+ payload?: any+ }+ loadMergeTrend: () => any+ loadMergeTrendFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadMergeTrendSuccess: (+ mergeTrend: TeamMergeTrendData | null,+ payload?: any+ ) => {+ mergeTrend: TeamMergeTrendData | null+ payload?: any+ }+ setWindow: (window: TeamsWindow) => {+ window: TeamsWindow+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface teamDetailLogicMeta {+ key: string+ __keaTypeGenInternalSelectorTypes: {+ ownerTeam: (ownerTeam: string) => string+ mergeTrendSeries: (mergeTrend: TeamMergeTrendData | null) => {+ average: number[]+ labels: string[]+ median: number[]+ } | null+ }+}++export type teamDetailLogicType = MakeLogicType<+ teamDetailLogicValues,+ teamDetailLogicActions,+ TeamDetailLogicProps,+ teamDetailLogicMeta+>+export const teamDetailLogic = kea<teamDetailLogicType>([path(['products', 'engineering_analytics', 'frontend', 'scenes', 'teamDetailLogic']),props({} as TeamDetailLogicProps),diff --git a/products/engineering_analytics/frontend/scenes/teamsLogic.ts b/products/engineering_analytics/frontend/scenes/teamsLogic.tsindex aeb32a97af48..a4bba8474ce6 100644--- a/products/engineering_analytics/frontend/scenes/teamsLogic.ts+++ b/products/engineering_analytics/frontend/scenes/teamsLogic.ts@@ -1,4 +1,4 @@-import { actions, afterMount, connect, kea, listeners, path, reducers } from 'kea'+import { MakeLogicType, actions, afterMount, connect, kea, listeners, path, reducers } from 'kea'import { loaders } from 'kea-loaders'import { ApiConfig } from 'lib/api'@@ -6,7 +6,6 @@ import { dateMapping } from 'lib/utils/dateFilters'import { engineeringAnalyticsTeamCiHealth } from '../generated/api'import { engineeringAnalyticsLogic } from './engineeringAnalyticsLogic'-import type { teamsLogicType } from './teamsLogicType'const projectId = (): string => String(ApiConfig.getCurrentProjectId())@@ -46,6 +45,41 @@ export interface TeamsData {limit: number}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface teamsLogicValues {+ sourceId: string | null // engineeringAnalyticsLogic+ teams: TeamsData | null+ teamsLoading: boolean+ teamsWindow: TeamsWindow+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface teamsLogicActions {+ setSourceId: (sourceId: string | null) => {+ sourceId: string | null+ } // engineeringAnalyticsLogic+ loadTeams: () => any+ loadTeamsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadTeamsSuccess: (+ teams: TeamsData,+ payload?: any+ ) => {+ teams: TeamsData+ payload?: any+ }+ setTeamsWindow: (window: TeamsWindow) => {+ window: TeamsWindow+ }+}++export type teamsLogicType = MakeLogicType<teamsLogicValues, teamsLogicActions>+export const teamsLogic = kea<teamsLogicType>([path(['products', 'engineering_analytics', 'frontend', 'scenes', 'teamsLogic']),connect(() => ({diff --git a/products/engineering_analytics/frontend/scenes/workflowRunDetailLogic.ts b/products/engineering_analytics/frontend/scenes/workflowRunDetailLogic.tsindex 681578985dc0..73dff77c2a49 100644--- a/products/engineering_analytics/frontend/scenes/workflowRunDetailLogic.ts+++ b/products/engineering_analytics/frontend/scenes/workflowRunDetailLogic.ts@@ -1,4 +1,4 @@-import { afterMount, kea, key, listeners, path, props, reducers, selectors } from 'kea'+import { MakeLogicType, afterMount, kea, key, listeners, path, props, reducers, selectors } from 'kea'import { loaders } from 'kea-loaders'import { ApiConfig } from 'lib/api'@@ -14,7 +14,6 @@ import {import type { RunFailureLogsApi, WorkflowJobApi, WorkflowRunDetailApi } from '../generated/api.schemas'import { isDecisiveFailure } from '../lib/lifecycle'import { RunCostSummary, summarizeRunCost } from '../lib/runHealth'-import type { workflowRunDetailLogicType } from './workflowRunDetailLogicType'const projectId = (): string => String(ApiConfig.getCurrentProjectId())@@ -26,6 +25,88 @@ export interface WorkflowRunDetailLogicProps {sourceId: string | null}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface workflowRunDetailLogicValues {+ breadcrumbs: Breadcrumb[]+ failureLogs: RunFailureLogsApi | 'unavailable' | null+ failureLogsLoading: boolean+ isValidRunId: boolean+ jobs: WorkflowJobApi[] | null+ jobsLoading: boolean+ loadFailed: boolean+ run: WorkflowRunDetailApi | null+ runCost: RunCostSummary | null+ runLoading: boolean+ sourceId: string | null+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface workflowRunDetailLogicActions {+ loadFailureLogs: () => any+ loadFailureLogsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadFailureLogsSuccess: (+ failureLogs: RunFailureLogsApi | 'unavailable',+ payload?: any+ ) => {+ failureLogs: RunFailureLogsApi | 'unavailable'+ payload?: any+ }+ loadJobs: () => any+ loadJobsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadJobsSuccess: (+ jobs: WorkflowJobApi[],+ payload?: any+ ) => {+ jobs: WorkflowJobApi[]+ payload?: any+ }+ loadRun: () => any+ loadRunFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadRunSuccess: (+ run: WorkflowRunDetailApi | null,+ payload?: any+ ) => {+ run: WorkflowRunDetailApi | null+ payload?: any+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface workflowRunDetailLogicMeta {+ key: string+ __keaTypeGenInternalSelectorTypes: {+ sourceId: (arg: string | null) => string | null+ runCost: (jobs: WorkflowJobApi[] | null) => RunCostSummary | null+ isValidRunId: (arg: number) => boolean+ breadcrumbs: (repoOwner: string, repoName: string, runId: number) => Breadcrumb[]+ }+}++export type workflowRunDetailLogicType = MakeLogicType<+ workflowRunDetailLogicValues,+ workflowRunDetailLogicActions,+ WorkflowRunDetailLogicProps,+ workflowRunDetailLogicMeta+>+export const workflowRunDetailLogic = kea<workflowRunDetailLogicType>([path(['products', 'engineering_analytics', 'frontend', 'scenes', 'workflowRunDetailLogic']),props({} as WorkflowRunDetailLogicProps),@@ -86,17 +167,23 @@ export const workflowRunDetailLogic = kea<workflowRunDetailLogicType>([}),selectors({- sourceId: [() => [(_, p: WorkflowRunDetailLogicProps) => p.sourceId], (sourceId): string | null => sourceId],+ sourceId: [+ () => [(_, p: WorkflowRunDetailLogicProps) => p.sourceId],+ (sourceId: string | null): string | null => sourceId,+ ],// Summed from the already-loaded jobs — no extra query.- runCost: [(s) => [s.jobs], (jobs): RunCostSummary | null => (jobs ? summarizeRunCost(jobs) : null)],+ runCost: [+ (s) => [s.jobs],+ (jobs: WorkflowJobApi[] | null): RunCostSummary | null => (jobs ? summarizeRunCost(jobs) : null),+ ],// A non-numeric path segment yields NaN — the scene shows a clean "not found" instead of a load error.isValidRunId: [() => [(_, p: WorkflowRunDetailLogicProps) => p.runId],- (runId): boolean => Number.isFinite(runId),+ (runId: number): boolean => Number.isFinite(runId),],breadcrumbs: [(_, p) => [p.repoOwner, p.repoName, p.runId],- (repoOwner, repoName, runId): Breadcrumb[] => [+ (repoOwner: string, repoName: string, runId: number): Breadcrumb[] => [{key: 'EngineeringAnalytics',name: 'Engineering analytics',diff --git a/products/engineering_analytics/frontend/scenes/workflowRunsLogic.ts b/products/engineering_analytics/frontend/scenes/workflowRunsLogic.tsindex 48d04c71206a..629ad8255d27 100644--- a/products/engineering_analytics/frontend/scenes/workflowRunsLogic.ts+++ b/products/engineering_analytics/frontend/scenes/workflowRunsLogic.ts@@ -1,4 +1,4 @@-import { actions, afterMount, connect, kea, key, listeners, path, props, reducers, selectors } from 'kea'+import { MakeLogicType, actions, afterMount, connect, kea, key, listeners, path, props, reducers, selectors } from 'kea'import { loaders } from 'kea-loaders'import { ApiConfig } from 'lib/api'@@ -24,7 +24,6 @@ import type {import { jobCacheKey } from '../lib/jobs'import { type CostSummary, type HealthSummary, computeHealthSummary } from '../lib/runHealth'import { engineeringAnalyticsFiltersLogic } from './engineeringAnalyticsFiltersLogic'-import type { workflowRunsLogicType } from './workflowRunsLogicType'const projectId = (): string => String(ApiConfig.getCurrentProjectId())@@ -54,6 +53,164 @@ export interface WorkflowRunsLogicProps {sourceId: string | null}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface workflowRunsLogicValues {+ appliedBranch: string // engineeringAnalyticsFiltersLogic+ dateFrom: string | null // engineeringAnalyticsFiltersLogic+ dateTo: string | null // engineeringAnalyticsFiltersLogic+ activityRuns: ActivityRun[]+ activityTruncated: boolean+ breadcrumbs: Breadcrumb[]+ costSummary: CostSummary | null+ expandedRunKeys: string[]+ healthSummary: HealthSummary+ jobAggregates: WorkflowJobAggregateApi[]+ jobAggregatesLoading: boolean+ loadFailed: boolean+ masterConclusion: string | null+ queueP50Seconds: number | null+ repoName: string+ repoOwner: string+ runActivity: WorkflowRunActivityApi+ runActivityLoading: boolean+ runJobs: Record<string, WorkflowJobApi[]>+ runJobsLoading: boolean+ runRows: WorkflowRunRow[]+ runnerCosts: WorkflowRunnerCostApi[]+ runnerCostsLoading: boolean+ runs: WorkflowRunDetailApi[]+ runsLoading: boolean+ runsTruncated: boolean+ sourceId: string | null+ workflowName: string+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface workflowRunsLogicActions {+ loadJobAggregates: () => any+ loadJobAggregatesFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadJobAggregatesSuccess: (+ jobAggregates: WorkflowJobAggregateApi[],+ payload?: any+ ) => {+ jobAggregates: WorkflowJobAggregateApi[]+ payload?: any+ }+ loadJobs: ({ runId, runAttempt }: { runAttempt: number | null; runId: number }) => {+ runId: number+ runAttempt: number | null+ }+ loadJobsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadJobsSuccess: (+ runJobs: Record<string, WorkflowJobApi[]>,+ payload?: {+ runId: number+ runAttempt: number | null+ }+ ) => {+ runJobs: Record<string, WorkflowJobApi[]>+ payload?: {+ runId: number+ runAttempt: number | null+ }+ }+ loadRunActivity: () => any+ loadRunActivityFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadRunActivitySuccess: (+ runActivity: WorkflowRunActivityApi,+ payload?: any+ ) => {+ runActivity: WorkflowRunActivityApi+ payload?: any+ }+ loadRunnerCosts: () => any+ loadRunnerCostsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadRunnerCostsSuccess: (+ runnerCosts: WorkflowRunnerCostApi[],+ payload?: any+ ) => {+ runnerCosts: WorkflowRunnerCostApi[]+ payload?: any+ }+ loadRuns: () => any+ loadRunsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadRunsSuccess: (+ runs: WorkflowRunDetailApi[],+ payload?: any+ ) => {+ runs: WorkflowRunDetailApi[]+ payload?: any+ }+ setRunExpanded: (+ rowKey: string,+ expanded: boolean,+ runId: number | null,+ runAttempt: number | null+ ) => {+ expanded: boolean+ rowKey: string+ runAttempt: number | null+ runId: number | null+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface workflowRunsLogicMeta {+ key: string+ __keaTypeGenInternalSelectorTypes: {+ sourceId: (arg: string | null) => string | null+ repoOwner: (arg: string) => string+ repoName: (arg: string) => string+ workflowName: (arg: string) => string+ runRows: (runs: WorkflowRunDetailApi[]) => WorkflowRunRow[]+ activityRuns: (runActivity: WorkflowRunActivityApi) => ActivityRun[]+ activityTruncated: (runActivity: WorkflowRunActivityApi) => boolean+ healthSummary: (runRows: WorkflowRunRow[]) => HealthSummary+ masterConclusion: (runRows: WorkflowRunRow[]) => string | null+ queueP50Seconds: (jobAggregates: WorkflowJobAggregateApi[]) => number | null+ runsTruncated: (runRows: WorkflowRunRow[]) => boolean+ costSummary: (runnerCosts: WorkflowRunnerCostApi[]) => CostSummary | null+ breadcrumbs: (repoOwner: string, repoName: string, workflowName: string) => Breadcrumb[]+ }+}++export type workflowRunsLogicType = MakeLogicType<+ workflowRunsLogicValues,+ workflowRunsLogicActions,+ WorkflowRunsLogicProps,+ workflowRunsLogicMeta+>+export const workflowRunsLogic = kea<workflowRunsLogicType>([path(['products', 'engineering_analytics', 'frontend', 'scenes', 'workflowRunsLogic']),props({} as WorkflowRunsLogicProps),@@ -176,12 +333,15 @@ export const workflowRunsLogic = kea<workflowRunsLogicType>([}),selectors({- sourceId: [() => [(_, p: WorkflowRunsLogicProps) => p.sourceId], (sourceId): string | null => sourceId],- repoOwner: [() => [(_, p: WorkflowRunsLogicProps) => p.repoOwner], (repoOwner): string => repoOwner],- repoName: [() => [(_, p: WorkflowRunsLogicProps) => p.repoName], (repoName): string => repoName],+ sourceId: [+ () => [(_, p: WorkflowRunsLogicProps) => p.sourceId],+ (sourceId: string | null): string | null => sourceId,+ ],+ repoOwner: [() => [(_, p: WorkflowRunsLogicProps) => p.repoOwner], (repoOwner: string): string => repoOwner],+ repoName: [() => [(_, p: WorkflowRunsLogicProps) => p.repoName], (repoName: string): string => repoName],workflowName: [() => [(_, p: WorkflowRunsLogicProps) => p.workflowName],- (workflowName): string => workflowName,+ (workflowName: string): string => workflowName,],runRows: [(s) => [s.runs],@@ -218,11 +378,14 @@ export const workflowRunsLogic = kea<workflowRunsLogicType>([(s) => [s.runActivity],(runActivity: WorkflowRunActivityApi): boolean => runActivity.truncated,],- healthSummary: [(s) => [s.runRows], (runRows): HealthSummary => computeHealthSummary(runRows)],+ healthSummary: [+ (s) => [s.runRows],+ (runRows: WorkflowRunRow[]): HealthSummary => computeHealthSummary(runRows),+ ],// Latest completed master/main run's conclusion; null when the window has none (PR-only workflow).masterConclusion: [(s) => [s.runRows],- (runRows): string | null => {+ (runRows: WorkflowRunRow[]): string | null => {const masterRuns = runRows.filter((run) =>@@ -237,7 +400,7 @@ export const workflowRunsLogic = kea<workflowRunsLogicType>([// Median queue wait across jobs, weighted by how often each job runs. Null until jobs are synced.queueP50Seconds: [(s) => [s.jobAggregates],- (jobAggregates): number | null => {+ (jobAggregates: WorkflowJobAggregateApi[]): number | null => {const weighted: { value: number; weight: number }[] = jobAggregates.filter((row) => row.queue_p50_seconds != null).map((row) => ({ value: row.queue_p50_seconds as number, weight: row.job_count }))@@ -256,10 +419,10 @@ export const workflowRunsLogic = kea<workflowRunsLogicType>([return weighted[weighted.length - 1].value},],- runsTruncated: [(s) => [s.runRows], (runRows): boolean => runRows.length >= RUN_LIST_LIMIT],+ runsTruncated: [(s) => [s.runRows], (runRows: WorkflowRunRow[]): boolean => runRows.length >= RUN_LIST_LIMIT],costSummary: [(s) => [s.runnerCosts],- (runnerCosts): CostSummary | null => {+ (runnerCosts: WorkflowRunnerCostApi[]): CostSummary | null => {if (runnerCosts.length === 0) {return null}@@ -278,7 +441,7 @@ export const workflowRunsLogic = kea<workflowRunsLogicType>([],breadcrumbs: [(_, p) => [p.repoOwner, p.repoName, p.workflowName],- (repoOwner, repoName, workflowName): Breadcrumb[] => [+ (repoOwner: string, repoName: string, workflowName: string): Breadcrumb[] => [{key: 'EngineeringAnalytics',name: 'Engineering analytics',diff --git a/products/engineering_analytics/frontend/scenes/workflowSwitcherLogic.ts b/products/engineering_analytics/frontend/scenes/workflowSwitcherLogic.tsindex a93147cb4231..14fa756852fc 100644--- a/products/engineering_analytics/frontend/scenes/workflowSwitcherLogic.ts+++ b/products/engineering_analytics/frontend/scenes/workflowSwitcherLogic.ts@@ -1,14 +1,13 @@// Backs the workflow chip's switcher dropdown: the repo's workflow names, loaded lazily on first open// so detail pages don't pay for the list until the user reaches for it.-import { actions, connect, kea, key, listeners, path, props } from 'kea'+import { MakeLogicType, actions, connect, kea, key, listeners, path, props } from 'kea'import { loaders } from 'kea-loaders'import { ApiConfig } from 'lib/api'import { engineeringAnalyticsWorkflowHealth } from '../generated/api'import { engineeringAnalyticsFiltersLogic } from './engineeringAnalyticsFiltersLogic'-import type { workflowSwitcherLogicType } from './workflowSwitcherLogicType'export interface WorkflowSwitcherLogicProps {repoOwner: string@@ -16,6 +15,49 @@ export interface WorkflowSwitcherLogicProps {sourceId: string | null}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface workflowSwitcherLogicValues {+ appliedBranch: string // engineeringAnalyticsFiltersLogic+ dateFrom: string | null // engineeringAnalyticsFiltersLogic+ dateTo: string | null // engineeringAnalyticsFiltersLogic+ workflowNames: string[] | null+ workflowNamesLoading: boolean+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface workflowSwitcherLogicActions {+ ensureWorkflowsLoaded: () => {+ value: true+ }+ loadWorkflowNames: () => any+ loadWorkflowNamesFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadWorkflowNamesSuccess: (+ workflowNames: string[],+ payload?: any+ ) => {+ workflowNames: string[]+ payload?: any+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface workflowSwitcherLogicMeta {+ key: string+}++export type workflowSwitcherLogicType = MakeLogicType<+ workflowSwitcherLogicValues,+ workflowSwitcherLogicActions,+ WorkflowSwitcherLogicProps,+ workflowSwitcherLogicMeta+>+export const workflowSwitcherLogic = kea<workflowSwitcherLogicType>([path(['products', 'engineering_analytics', 'frontend', 'scenes', 'workflowSwitcherLogic']),props({} as WorkflowSwitcherLogicProps),diff --git a/products/feature_flags/frontend/featureFlagTemplatesSceneLogic.ts b/products/feature_flags/frontend/featureFlagTemplatesSceneLogic.tsindex ae0dcb46b5bd..e724cf1cb940 100644--- a/products/feature_flags/frontend/featureFlagTemplatesSceneLogic.ts+++ b/products/feature_flags/frontend/featureFlagTemplatesSceneLogic.ts@@ -1,4 +1,4 @@-import { actions, connect, kea, listeners, path, reducers, selectors } from 'kea'+import { MakeLogicType, actions, connect, kea, listeners, path, reducers, selectors } from 'kea'import { combineUrl, router } from 'kea-router'import posthog from 'posthog-js'@@ -7,8 +7,8 @@ import { featureFlagLogic as enabledFeaturesLogic } from 'lib/logic/featureFlagLimport { FlagIntent } from 'scenes/feature-flags/featureFlagIntentWarningLogic'import { urls } from 'scenes/urls'+import type { FeatureFlagsSet } from '../../../frontend/src/lib/logic/featureFlagLogic'import { TemplateKey } from './featureFlagTemplateConstants'-import type { featureFlagTemplatesSceneLogicType } from './featureFlagTemplatesSceneLogicType'export type SelectedTemplate = TemplateKey | 'blank'@@ -30,6 +30,37 @@ export function navigateToNewFlag(router.actions.push(combineUrl(urls.featureFlag('new'), params).url)}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface featureFlagTemplatesSceneLogicValues {+ featureFlags: FeatureFlagsSet // enabledFeaturesLogic+ intentsEnabled: boolean+ selectedTemplate: SelectedTemplate | null+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface featureFlagTemplatesSceneLogicActions {+ selectTemplate: (template: SelectedTemplate) => {+ template: SelectedTemplate+ }+ setSelectedTemplate: (template: SelectedTemplate | null) => {+ template: SelectedTemplate | null+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface featureFlagTemplatesSceneLogicMeta {+ __keaTypeGenInternalSelectorTypes: {+ intentsEnabled: (featureFlags: FeatureFlagsSet) => boolean+ }+}++export type featureFlagTemplatesSceneLogicType = MakeLogicType<+ featureFlagTemplatesSceneLogicValues,+ featureFlagTemplatesSceneLogicActions,+ Record<string, any>,+ featureFlagTemplatesSceneLogicMeta+>+export const featureFlagTemplatesSceneLogic = kea<featureFlagTemplatesSceneLogicType>([path(['products', 'feature_flags', 'frontend', 'featureFlagTemplatesSceneLogic']),connect({@@ -50,7 +81,8 @@ export const featureFlagTemplatesSceneLogic = kea<featureFlagTemplatesSceneLogicselectors({intentsEnabled: [(s) => [s.featureFlags],- (featureFlags) => !!featureFlags[FEATURE_FLAGS.FEATURE_FLAG_CREATION_INTENTS],+ (featureFlags: import('lib/logic/featureFlagLogic').FeatureFlagsSet) =>+ !!featureFlags[FEATURE_FLAGS.FEATURE_FLAG_CREATION_INTENTS],],}),listeners(({ actions, values }) => ({diff --git a/products/feature_flags/frontend/staff/featureFlagsStaffToolsLogic.ts b/products/feature_flags/frontend/staff/featureFlagsStaffToolsLogic.tsindex be756831aed2..11959a183d11 100644--- a/products/feature_flags/frontend/staff/featureFlagsStaffToolsLogic.ts+++ b/products/feature_flags/frontend/staff/featureFlagsStaffToolsLogic.ts@@ -1,4 +1,4 @@-import { actions, afterMount, kea, listeners, path, reducers, selectors } from 'kea'+import { MakeLogicType, actions, afterMount, kea, listeners, path, reducers, selectors } from 'kea'import { loaders } from 'kea-loaders'import { urlToAction } from 'kea-router'@@ -26,7 +26,6 @@ import type {StaffWarmRunApi,StaffWarmRunCancelResponseApi,} from '../generated/api.schemas'-import type { featureFlagsStaffToolsLogicType } from './featureFlagsStaffToolsLogicType'// What rebuild/clear can act on. Mirrors the backend's CACHE_CHOICES.export type StaffCacheKind = StaffCacheKindEnumApi@@ -55,6 +54,226 @@ export type StaffCacheEntry = StaffCacheEntryResponseApiexport type StaffTeamConfig = StaffTeamConfigApiexport type StaffWarmRun = StaffWarmRunApi+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface featureFlagsStaffToolsLogicValues {+ cacheEntry: StaffCacheEntry | null+ cacheEntryLoading: boolean+ cacheStatus: StaffCacheTeamStatus[]+ cacheStatusByTeamId: Record<number, StaffCacheTeamStatus>+ cacheStatusLoading: boolean+ clearResult: StaffCacheMutationResponse | null+ clearResultLoading: boolean+ hasSeededFromDeepLink: boolean+ knownTeams: Record<number, StaffTeamResult>+ pendingTeamConfigTeamIds: number[]+ rebuildResult: StaffCacheMutationResponse | null+ rebuildResultLoading: boolean+ selectedTeamIds: number[]+ selectedTeams: StaffTeamResult[]+ teamConfig: StaffTeamConfig[]+ teamConfigByTeamId: Record<number, StaffTeamConfig>+ teamConfigLoading: boolean+ teamSearchResults: StaffTeamResult[]+ teamSearchResultsLoading: boolean+ viewingCacheEntry: {+ cache: StaffReadableCacheKind+ teamId: number+ } | null+ warmRun: StaffWarmRun | null+ warmRunCancelResult: StaffWarmRunCancelResponseApi | null+ warmRunCancelResultLoading: boolean+ warmRunLoading: boolean+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface featureFlagsStaffToolsLogicActions {+ cancelWarmRun: () => any+ cancelWarmRunFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ cancelWarmRunSuccess: (+ warmRunCancelResult: StaffWarmRunCancelResponseApi,+ payload?: any+ ) => {+ warmRunCancelResult: StaffWarmRunCancelResponseApi+ payload?: any+ }+ clearCache: ({ caches }: { caches: StaffCacheKind[] }) => {+ caches: StaffCacheKind[]+ }+ clearCacheFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ clearCacheSuccess: (+ clearResult: StaffCacheMutationResponseApi,+ payload?: {+ caches: StaffCacheKind[]+ }+ ) => {+ clearResult: StaffCacheMutationResponseApi+ payload?: {+ caches: StaffCacheKind[]+ }+ }+ closeCacheEntryModal: () => {+ value: true+ }+ loadCacheStatus: (_: void) => void+ loadCacheStatusFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadCacheStatusSuccess: (+ cacheStatus: StaffCacheTeamStatusApi[],+ payload?: void+ ) => {+ cacheStatus: StaffCacheTeamStatusApi[]+ payload?: void+ }+ loadTeamConfig: (_: void) => void+ loadTeamConfigFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadTeamConfigSuccess: (+ teamConfig: StaffTeamConfigApi[],+ payload?: void+ ) => {+ teamConfig: StaffTeamConfigApi[]+ payload?: void+ }+ loadWarmRun: () => any+ loadWarmRunFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadWarmRunSuccess: (+ warmRun: StaffWarmRunApi | null,+ payload?: any+ ) => {+ warmRun: StaffWarmRunApi | null+ payload?: any+ }+ rebuildCache: ({ caches }: { caches: StaffCacheKind[] }) => {+ caches: StaffCacheKind[]+ }+ rebuildCacheFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ rebuildCacheSuccess: (+ rebuildResult: StaffCacheMutationResponseApi,+ payload?: {+ caches: StaffCacheKind[]+ }+ ) => {+ rebuildResult: StaffCacheMutationResponseApi+ payload?: {+ caches: StaffCacheKind[]+ }+ }+ searchTeams: ({ query }: { query: string }) => {+ query: string+ }+ searchTeamsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ searchTeamsSuccess: (+ teamSearchResults: StaffTeamResultApi[],+ payload?: {+ query: string+ }+ ) => {+ teamSearchResults: StaffTeamResultApi[]+ payload?: {+ query: string+ }+ }+ seedTeamFromDeepLink: (teamId: number) => {+ teamId: number+ }+ setMinimalFlagCalledEvents: (+ teamId: number,+ minimalFlagCalledEvents: boolean+ ) => {+ minimalFlagCalledEvents: boolean+ teamId: number+ }+ setSelectedTeamIds: (teamIds: number[]) => {+ teamIds: number[]+ }+ teamConfigMutationSettled: (teamId: number) => {+ teamId: number+ }+ teamConfigMutationSucceeded: (teamConfig: StaffTeamConfig) => {+ teamConfig: StaffTeamConfigApi+ }+ viewCacheEntry: ({ teamId, cache }: { cache: StaffReadableCacheKind; teamId: number }) => {+ teamId: number+ cache: StaffReadableCacheKind+ }+ viewCacheEntryFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ viewCacheEntrySuccess: (+ cacheEntry: StaffCacheEntryResponseApi,+ payload?: {+ teamId: number+ cache: StaffReadableCacheKind+ }+ ) => {+ cacheEntry: StaffCacheEntryResponseApi+ payload?: {+ teamId: number+ cache: StaffReadableCacheKind+ }+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface featureFlagsStaffToolsLogicMeta {+ __keaTypeGenInternalSelectorTypes: {+ selectedTeams: (selectedTeamIds: number[], knownTeams: Record<number, StaffTeamResultApi>) => StaffTeamResult[]+ cacheStatusByTeamId: (cacheStatus: StaffCacheTeamStatusApi[]) => Record<number, StaffCacheTeamStatus>+ teamConfigByTeamId: (teamConfig: StaffTeamConfigApi[]) => Record<number, StaffTeamConfig>+ }+}++export type featureFlagsStaffToolsLogicType = MakeLogicType<+ featureFlagsStaffToolsLogicValues,+ featureFlagsStaffToolsLogicActions,+ Record<string, any>,+ featureFlagsStaffToolsLogicMeta+>+export const featureFlagsStaffToolsLogic = kea<featureFlagsStaffToolsLogicType>([path(['products', 'feature_flags', 'frontend', 'staff', 'featureFlagsStaffToolsLogic']),actions({diff --git a/products/mcp_store/frontend/mcpStoreLogic.ts b/products/mcp_store/frontend/mcpStoreLogic.tsindex 3ff0b4ba3cff..0734382a51a1 100644--- a/products/mcp_store/frontend/mcpStoreLogic.ts+++ b/products/mcp_store/frontend/mcpStoreLogic.ts@@ -1,5 +1,6 @@-import { actions, afterMount, kea, listeners, path, reducers, selectors } from 'kea'+import { MakeLogicType, actions, afterMount, kea, listeners, path, reducers, selectors } from 'kea'import { forms } from 'kea-forms'+import type { DeepPartial, DeepPartialMap, FieldName, ValidationErrorType } from 'kea-forms'import { loaders } from 'kea-loaders'import { actionToUrl, router, urlToAction } from 'kea-router'@@ -12,7 +13,6 @@ import type {MCPServerInstallationToolApi,MCPServerTemplateApi,} from './generated/api.schemas'-import type { mcpStoreLogicType } from './mcpStoreLogicType'export type ToolApprovalState = 'approved' | 'needs_approval' | 'do_not_use'@@ -46,6 +46,332 @@ const CUSTOM_SERVER_FORM_DEFAULTS: CustomServerFormValues = {template_id: '',}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface mcpStoreLogicValues {+ addCustomServerModalVisible: boolean+ categoryFilter: string+ customServerForm: CustomServerFormValues+ customServerFormAllErrors: Record<string, any>+ customServerFormChanged: boolean+ customServerFormErrors: DeepPartialMap<CustomServerFormValues, ValidationErrorType>+ customServerFormHasErrors: boolean+ customServerFormManualErrors: Record<string, any>+ customServerFormPrefilled: boolean+ customServerFormTouched: boolean+ customServerFormTouches: Record<string, boolean>+ customServerFormValidationErrors: DeepPartialMap<CustomServerFormValues, ValidationErrorType>+ filteredInstallations: MCPServerInstallationApi[]+ filteredServers: MCPServerTemplateApi[]+ installationTools: Record<string, MCPServerInstallationToolApi[]>+ installationToolsLoading: boolean+ installations: MCPServerInstallationApi[]+ installationsLoading: boolean+ installedServerUrls: Set<string>+ installedTemplateIds: Set<string>+ isCustomServerFormSubmitting: boolean+ isCustomServerFormValid: boolean+ recommendedServers: MCPServerTemplateApi[]+ sceneView: McpSceneView+ searchQuery: string+ selectedInstallation: MCPServerInstallationApi | null+ selectedServerId: string | null+ selectedTemplate: MCPServerTemplateApi | null+ servers: MCPServerTemplateApi[]+ serversLoading: boolean+ showCustomServerFormErrors: boolean+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface mcpStoreLogicActions {+ clearFilters: () => {+ value: true+ }+ closeAddCustomServerModal: () => {+ value: true+ }+ installTemplate: ({ templateId }: { templateId: string }) => {+ templateId: string+ }+ loadInstallationTools: ({ installationId }: { installationId: string }) => {+ installationId: string+ }+ loadInstallationToolsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadInstallationToolsSuccess: (+ installationTools: {+ [x: string]: MCPServerInstallationToolApi[]+ },+ payload?: {+ installationId: string+ }+ ) => {+ installationTools: {+ [x: string]: MCPServerInstallationToolApi[]+ }+ payload?: {+ installationId: string+ }+ }+ loadInstallations: () => any+ loadInstallationsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadInstallationsSuccess: (+ installations: MCPServerInstallationApi[],+ payload?: any+ ) => {+ installations: MCPServerInstallationApi[]+ payload?: any+ }+ loadServers: () => any+ loadServersFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadServersSuccess: (+ servers: MCPServerTemplateApi[],+ payload?: any+ ) => {+ servers: MCPServerTemplateApi[]+ payload?: any+ }+ openAddCustomServerModal: () => {+ value: true+ }+ openAddCustomServerModalWithDefaults: (defaults: Partial<CustomServerFormValues>) => {+ defaults: Partial<CustomServerFormValues>+ }+ refreshInstallationTools: ({ installationId }: { installationId: string }) => {+ installationId: string+ }+ refreshInstallationToolsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ refreshInstallationToolsSuccess: (+ installationTools: {+ [x: string]: MCPServerInstallationToolApi[]+ },+ payload?: {+ installationId: string+ }+ ) => {+ installationTools: {+ [x: string]: MCPServerInstallationToolApi[]+ }+ payload?: {+ installationId: string+ }+ }+ resetCustomServerForm: (values?: CustomServerFormValues) => {+ values?: CustomServerFormValues+ }+ selectServer: (serverId: string | null) => {+ serverId: string | null+ }+ setBulkApprovalState: ({+ installationId,+ approvalState,+ }: {+ approvalState: ToolApprovalState+ installationId: string+ }) => {+ approvalState: ToolApprovalState+ installationId: string+ }+ setCategoryFilter: (category: string) => {+ category: string+ }+ setCustomServerFormManualErrors: (errors: Record<string, any>) => {+ errors: Record<string, any>+ }+ setCustomServerFormValue: (+ key: FieldName,+ value: any+ ) => {+ name: FieldName+ value: any+ }+ setCustomServerFormValues: (values: DeepPartial<CustomServerFormValues>) => {+ values: DeepPartial<CustomServerFormValues>+ }+ setInstallations: (installations: MCPServerInstallationApi[]) => {+ installations: MCPServerInstallationApi[]+ }+ setSceneView: (view: McpSceneView) => {+ view: McpSceneView+ }+ setSearchQuery: (query: string) => {+ query: string+ }+ setToolApprovalState: ({+ installationId,+ toolName,+ approvalState,+ }: {+ approvalState: ToolApprovalState+ installationId: string+ toolName: string+ }) => {+ approvalState: ToolApprovalState+ installationId: string+ toolName: string+ }+ shareInstallation: ({ id }: { id: string }) => {+ id: string+ }+ shareInstallationFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ shareInstallationSuccess: (+ installations: MCPServerInstallationApi[],+ payload?: {+ id: string+ }+ ) => {+ installations: MCPServerInstallationApi[]+ payload?: {+ id: string+ }+ }+ submitCustomServerForm: () => {+ value: boolean+ }+ submitCustomServerFormFailure: (+ error: Error,+ errors: Record<string, any>+ ) => {+ error: Error+ errors: Record<string, any>+ }+ submitCustomServerFormRequest: (customServerForm: CustomServerFormValues) => {+ customServerForm: CustomServerFormValues+ }+ submitCustomServerFormSuccess: (customServerForm: CustomServerFormValues) => {+ customServerForm: CustomServerFormValues+ }+ toggleServerEnabled: ({ id, enabled }: { enabled: boolean; id: string }) => {+ enabled: boolean+ id: string+ }+ touchCustomServerFormField: (key: string) => {+ key: string+ }+ uninstallServer: (installationId: string) => string+ uninstallServerFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ uninstallServerSuccess: (+ installations: MCPServerInstallationApi[],+ payload?: string+ ) => {+ installations: MCPServerInstallationApi[]+ payload?: string+ }+ unshareInstallation: ({ id }: { id: string }) => {+ id: string+ }+ unshareInstallationFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ unshareInstallationSuccess: (+ installations: MCPServerInstallationApi[],+ payload?: {+ id: string+ }+ ) => {+ installations: MCPServerInstallationApi[]+ payload?: {+ id: string+ }+ }+ updateInstallation: ({ id, data }: { data: Record<string, any>; id: string }) => {+ id: string+ data: Record<string, any>+ }+ updateInstallationFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ updateInstallationSuccess: (+ installations: MCPServerInstallationApi[],+ payload?: {+ id: string+ data: Record<string, any>+ }+ ) => {+ installations: MCPServerInstallationApi[]+ payload?: {+ id: string+ data: Record<string, any>+ }+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface mcpStoreLogicMeta {+ __keaTypeGenInternalSelectorTypes: {+ installedTemplateIds: (installations: MCPServerInstallationApi[]) => Set<string>+ installedServerUrls: (installations: MCPServerInstallationApi[]) => Set<string>+ recommendedServers: (servers: MCPServerTemplateApi[]) => MCPServerTemplateApi[]+ filteredServers: (+ servers: MCPServerTemplateApi[],+ searchQuery: string,+ categoryFilter: string+ ) => MCPServerTemplateApi[]+ filteredInstallations: (+ installations: MCPServerInstallationApi[],+ searchQuery: string+ ) => MCPServerInstallationApi[]+ selectedInstallation: (+ installations: MCPServerInstallationApi[],+ selectedServerId: string | null+ ) => MCPServerInstallationApi | null+ selectedTemplate: (+ servers: MCPServerTemplateApi[],+ selectedServerId: string | null,+ selectedInstallation: MCPServerInstallationApi | null+ ) => MCPServerTemplateApi | null+ }+}++export type mcpStoreLogicType = MakeLogicType<+ mcpStoreLogicValues,+ mcpStoreLogicActions,+ Record<string, any>,+ mcpStoreLogicMeta+>+export const mcpStoreLogic = kea<mcpStoreLogicType>([path(['products', 'mcp_store', 'frontend', 'mcpStoreLogic']),diff --git a/products/workflows/frontend/Channels/APNSSetup/apnsSetupModalLogic.ts b/products/workflows/frontend/Channels/APNSSetup/apnsSetupModalLogic.tsindex 3c0e42ed3f9e..fd1ff2b45077 100644--- a/products/workflows/frontend/Channels/APNSSetup/apnsSetupModalLogic.ts+++ b/products/workflows/frontend/Channels/APNSSetup/apnsSetupModalLogic.ts@@ -1,5 +1,6 @@-import { connect, kea, path, props } from 'kea'+import { MakeLogicType, connect, kea, path, props } from 'kea'import { forms } from 'kea-forms'+import type { DeepPartial, DeepPartialMap, FieldName, ValidationErrorType } from 'kea-forms'import api from 'lib/api'import { integrationsLogic } from 'lib/integrations/integrationsLogic'@@ -7,8 +8,6 @@ import { lemonToast } from 'lib/lemon-ui/LemonToast'import { IntegrationType } from '~/types'-import type { apnsSetupModalLogicType } from './apnsSetupModalLogicType'-export interface APNSSetupModalLogicProps {integration?: IntegrationType | nullonComplete: (integrationId?: number) => void@@ -23,6 +22,142 @@ export interface APNSFormType {environment: 'production' | 'sandbox'}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface apnsSetupModalLogicValues {+ apnsIntegration: {+ bundleId: string+ environment: 'production'+ keyId: string+ signingKey: string+ teamId: string+ }+ apnsIntegrationAllErrors: Record<string, any>+ apnsIntegrationChanged: boolean+ apnsIntegrationErrors: DeepPartialMap<+ {+ bundleId: string+ environment: 'production'+ keyId: string+ signingKey: string+ teamId: string+ },+ ValidationErrorType+ >+ apnsIntegrationHasErrors: boolean+ apnsIntegrationManualErrors: Record<string, any>+ apnsIntegrationTouched: boolean+ apnsIntegrationTouches: Record<string, boolean>+ apnsIntegrationValidationErrors: DeepPartialMap<+ {+ bundleId: string+ environment: 'production'+ keyId: string+ signingKey: string+ teamId: string+ },+ ValidationErrorType+ >+ isApnsIntegrationSubmitting: boolean+ isApnsIntegrationValid: boolean+ showApnsIntegrationErrors: boolean+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface apnsSetupModalLogicActions {+ loadIntegrations: () => any // integrationsLogic+ resetApnsIntegration: (values?: {+ bundleId: string+ environment: 'production'+ keyId: string+ signingKey: string+ teamId: string+ }) => {+ values?: {+ bundleId: string+ environment: 'production'+ keyId: string+ signingKey: string+ teamId: string+ }+ }+ setApnsIntegrationManualErrors: (errors: Record<string, any>) => {+ errors: Record<string, any>+ }+ setApnsIntegrationValue: (+ key: FieldName,+ value: any+ ) => {+ name: FieldName+ value: any+ }+ setApnsIntegrationValues: (+ values: DeepPartial<{+ bundleId: string+ environment: 'production'+ keyId: string+ signingKey: string+ teamId: string+ }>+ ) => {+ values: DeepPartial<{+ bundleId: string+ environment: 'production'+ keyId: string+ signingKey: string+ teamId: string+ }>+ }+ submitApnsIntegration: () => {+ value: boolean+ }+ submitApnsIntegrationFailure: (+ error: Error,+ errors: Record<string, any>+ ) => {+ error: Error+ errors: Record<string, any>+ }+ submitApnsIntegrationRequest: (apnsIntegration: {+ bundleId: string+ environment: 'production'+ keyId: string+ signingKey: string+ teamId: string+ }) => {+ apnsIntegration: {+ bundleId: string+ environment: 'production'+ keyId: string+ signingKey: string+ teamId: string+ }+ }+ submitApnsIntegrationSuccess: (apnsIntegration: {+ bundleId: string+ environment: 'production'+ keyId: string+ signingKey: string+ teamId: string+ }) => {+ apnsIntegration: {+ bundleId: string+ environment: 'production'+ keyId: string+ signingKey: string+ teamId: string+ }+ }+ touchApnsIntegrationField: (key: string) => {+ key: string+ }+}++export type apnsSetupModalLogicType = MakeLogicType<+ apnsSetupModalLogicValues,+ apnsSetupModalLogicActions,+ APNSSetupModalLogicProps+>+export const apnsSetupModalLogic = kea<apnsSetupModalLogicType>([path(['products', 'workflows', 'frontend', 'APNSSetup', 'apnsSetupModalLogic']),props({} as APNSSetupModalLogicProps),diff --git a/products/workflows/frontend/Channels/EmailSetup/emailSetupModalLogic.ts b/products/workflows/frontend/Channels/EmailSetup/emailSetupModalLogic.tsindex 709588c4c9e8..d0e3a4f85324 100644--- a/products/workflows/frontend/Channels/EmailSetup/emailSetupModalLogic.ts+++ b/products/workflows/frontend/Channels/EmailSetup/emailSetupModalLogic.ts@@ -1,5 +1,6 @@-import { actions, afterMount, connect, kea, key, listeners, path, props, reducers, selectors } from 'kea'+import { MakeLogicType, actions, afterMount, connect, kea, key, listeners, path, props, reducers, selectors } from 'kea'import { forms } from 'kea-forms'+import type { DeepPartial, DeepPartialMap, FieldName, ValidationErrorType } from 'kea-forms'import { loaders } from 'kea-loaders'import api, { ApiError } from 'lib/api'@@ -8,7 +9,7 @@ import { lemonToast } from 'lib/lemon-ui/LemonToast'import { IntegrationType } from '~/types'-import type { emailSetupModalLogicType } from './emailSetupModalLogicType'+import type { EmailSenderDomainStatus } from '../../../../../frontend/src/types'export interface EmailSetupModalLogicProps {integration?: IntegrationType | null@@ -61,6 +62,111 @@ const getEmailSenderFromIntegration = (integration: IntegrationType): EmailSende}}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface emailSetupModalLogicValues {+ integrations: IntegrationType[] | null // integrationsLogic+ integrationsLoading: boolean // integrationsLogic+ dnsRecords: DnsRecord[]+ domain: string+ emailSender: EmailSenderFormType+ emailSenderAllErrors: Record<string, any>+ emailSenderChanged: boolean+ emailSenderErrors: DeepPartialMap<EmailSenderFormType, ValidationErrorType>+ emailSenderHasErrors: boolean+ emailSenderManualErrors: Record<string, any>+ emailSenderTouched: boolean+ emailSenderTouches: Record<string, boolean>+ emailSenderValidationErrors: DeepPartialMap<EmailSenderFormType, ValidationErrorType>+ isDomainVerified: boolean+ isEmailSenderSubmitting: boolean+ isEmailSenderValid: boolean+ savedIntegration: IntegrationType | null+ showEmailSenderErrors: boolean+ verification: any+ verificationLoading: boolean+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface emailSetupModalLogicActions {+ loadIntegrations: () => any // integrationsLogic+ resetEmailSender: (values?: EmailSenderFormType) => {+ values?: EmailSenderFormType+ }+ setEmailSenderManualErrors: (errors: Record<string, any>) => {+ errors: Record<string, any>+ }+ setEmailSenderValue: (+ key: FieldName,+ value: any+ ) => {+ name: FieldName+ value: any+ }+ setEmailSenderValues: (values: DeepPartial<EmailSenderFormType>) => {+ values: DeepPartial<EmailSenderFormType>+ }+ setSavedIntegration: (integration: IntegrationType | null) => {+ integration: IntegrationType | null+ }+ submitEmailSender: () => {+ value: boolean+ }+ submitEmailSenderFailure: (+ error: Error,+ errors: Record<string, any>+ ) => {+ error: Error+ errors: Record<string, any>+ }+ submitEmailSenderRequest: (emailSender: EmailSenderFormType) => {+ emailSender: EmailSenderFormType+ }+ submitEmailSenderSuccess: (emailSender: EmailSenderFormType) => {+ emailSender: EmailSenderFormType+ }+ touchEmailSenderField: (key: string) => {+ key: string+ }+ verifyDomain: () => {+ value: true+ }+ verifyDomainFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ verifyDomainSuccess: (+ verification: EmailSenderDomainStatus | undefined,+ payload?: {+ value: true+ }+ ) => {+ verification: EmailSenderDomainStatus | undefined+ payload?: {+ value: true+ }+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface emailSetupModalLogicMeta {+ key: string+ __keaTypeGenInternalSelectorTypes: {+ dnsRecords: (verification: any, savedIntegration: IntegrationType | null) => DnsRecord[]+ domain: (emailSender: EmailSenderFormType) => string+ isDomainVerified: (verification: any) => boolean+ }+}++export type emailSetupModalLogicType = MakeLogicType<+ emailSetupModalLogicValues,+ emailSetupModalLogicActions,+ EmailSetupModalLogicProps,+ emailSetupModalLogicMeta+>+export const emailSetupModalLogic = kea<emailSetupModalLogicType>([path(['products', 'workflows', 'frontend', 'EmailSetup', 'emailSetupModalLogic']),props({} as EmailSetupModalLogicProps),diff --git a/products/workflows/frontend/Channels/FCMSetup/fcmSetupModalLogic.ts b/products/workflows/frontend/Channels/FCMSetup/fcmSetupModalLogic.tsindex 44041cdd8e0f..711f46d6ad1a 100644--- a/products/workflows/frontend/Channels/FCMSetup/fcmSetupModalLogic.ts+++ b/products/workflows/frontend/Channels/FCMSetup/fcmSetupModalLogic.ts@@ -1,5 +1,6 @@-import { connect, kea, path, props } from 'kea'+import { MakeLogicType, connect, kea, path, props } from 'kea'import { forms } from 'kea-forms'+import type { DeepPartial, DeepPartialMap, FieldName, ValidationErrorType } from 'kea-forms'import api from 'lib/api'import { integrationsLogic } from 'lib/integrations/integrationsLogic'@@ -7,8 +8,6 @@ import { lemonToast } from 'lib/lemon-ui/LemonToast'import { IntegrationType } from '~/types'-import type { fcmSetupModalLogicType } from './fcmSetupModalLogicType'-export interface FCMSetupModalLogicProps {integration?: IntegrationType | nullonComplete: (integrationId?: number) => void@@ -19,6 +18,92 @@ export interface FCMFormType {serviceAccountKey: string}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface fcmSetupModalLogicValues {+ fcmIntegration: {+ serviceAccountKey: string+ }+ fcmIntegrationAllErrors: Record<string, any>+ fcmIntegrationChanged: boolean+ fcmIntegrationErrors: DeepPartialMap<+ {+ serviceAccountKey: string+ },+ ValidationErrorType+ >+ fcmIntegrationHasErrors: boolean+ fcmIntegrationManualErrors: Record<string, any>+ fcmIntegrationTouched: boolean+ fcmIntegrationTouches: Record<string, boolean>+ fcmIntegrationValidationErrors: DeepPartialMap<+ {+ serviceAccountKey: string+ },+ ValidationErrorType+ >+ isFcmIntegrationSubmitting: boolean+ isFcmIntegrationValid: boolean+ showFcmIntegrationErrors: boolean+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface fcmSetupModalLogicActions {+ loadIntegrations: () => any // integrationsLogic+ resetFcmIntegration: (values?: { serviceAccountKey: string }) => {+ values?: {+ serviceAccountKey: string+ }+ }+ setFcmIntegrationManualErrors: (errors: Record<string, any>) => {+ errors: Record<string, any>+ }+ setFcmIntegrationValue: (+ key: FieldName,+ value: any+ ) => {+ name: FieldName+ value: any+ }+ setFcmIntegrationValues: (+ values: DeepPartial<{+ serviceAccountKey: string+ }>+ ) => {+ values: DeepPartial<{+ serviceAccountKey: string+ }>+ }+ submitFcmIntegration: () => {+ value: boolean+ }+ submitFcmIntegrationFailure: (+ error: Error,+ errors: Record<string, any>+ ) => {+ error: Error+ errors: Record<string, any>+ }+ submitFcmIntegrationRequest: (fcmIntegration: { serviceAccountKey: string }) => {+ fcmIntegration: {+ serviceAccountKey: string+ }+ }+ submitFcmIntegrationSuccess: (fcmIntegration: { serviceAccountKey: string }) => {+ fcmIntegration: {+ serviceAccountKey: string+ }+ }+ touchFcmIntegrationField: (key: string) => {+ key: string+ }+}++export type fcmSetupModalLogicType = MakeLogicType<+ fcmSetupModalLogicValues,+ fcmSetupModalLogicActions,+ FCMSetupModalLogicProps+>+export const fcmSetupModalLogic = kea<fcmSetupModalLogicType>([path(['products', 'workflows', 'frontend', 'FCMSetup', 'fcmSetupModalLogic']),props({} as FCMSetupModalLogicProps),diff --git a/products/workflows/frontend/Channels/SlackSetup/slackSetupModalLogic.ts b/products/workflows/frontend/Channels/SlackSetup/slackSetupModalLogic.tsindex 318828dbee80..635b5c4263cd 100644--- a/products/workflows/frontend/Channels/SlackSetup/slackSetupModalLogic.ts+++ b/products/workflows/frontend/Channels/SlackSetup/slackSetupModalLogic.ts@@ -1,5 +1,6 @@-import { connect, kea, path, props } from 'kea'+import { MakeLogicType, connect, kea, path, props } from 'kea'import { forms } from 'kea-forms'+import type { DeepPartial, DeepPartialMap, FieldName, ValidationErrorType } from 'kea-forms'import api from 'lib/api'import { integrationsLogic } from 'lib/integrations/integrationsLogic'@@ -8,7 +9,7 @@ import { userLogic } from 'scenes/userLogic'import { IntegrationType } from '~/types'-import type { slackSetupModalLogicType } from './slackSetupModalLogicType'+import type { UserType } from '../../../../../frontend/src/types'export interface SlackSetupModalLogicProps {integration?: IntegrationType | null@@ -21,6 +22,104 @@ export interface SlackFormType {channelId: string}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface slackSetupModalLogicValues {+ integrations: IntegrationType[] | null // integrationsLogic+ integrationsLoading: boolean // integrationsLogic+ slackAvailable: boolean | undefined // integrationsLogic+ user: UserType | null // userLogic+ isSlackIntegrationSubmitting: boolean+ isSlackIntegrationValid: boolean+ showSlackIntegrationErrors: boolean+ slackIntegration: {+ botToken: string+ channelId: string+ }+ slackIntegrationAllErrors: Record<string, any>+ slackIntegrationChanged: boolean+ slackIntegrationErrors: DeepPartialMap<+ {+ botToken: string+ channelId: string+ },+ ValidationErrorType+ >+ slackIntegrationHasErrors: boolean+ slackIntegrationManualErrors: Record<string, any>+ slackIntegrationTouched: boolean+ slackIntegrationTouches: Record<string, boolean>+ slackIntegrationValidationErrors: DeepPartialMap<+ {+ botToken: string+ channelId: string+ },+ ValidationErrorType+ >+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface slackSetupModalLogicActions {+ loadIntegrations: () => any // integrationsLogic+ resetSlackIntegration: (values?: { botToken: string; channelId: string }) => {+ values?: {+ botToken: string+ channelId: string+ }+ }+ setSlackIntegrationManualErrors: (errors: Record<string, any>) => {+ errors: Record<string, any>+ }+ setSlackIntegrationValue: (+ key: FieldName,+ value: any+ ) => {+ name: FieldName+ value: any+ }+ setSlackIntegrationValues: (+ values: DeepPartial<{+ botToken: string+ channelId: string+ }>+ ) => {+ values: DeepPartial<{+ botToken: string+ channelId: string+ }>+ }+ submitSlackIntegration: () => {+ value: boolean+ }+ submitSlackIntegrationFailure: (+ error: Error,+ errors: Record<string, any>+ ) => {+ error: Error+ errors: Record<string, any>+ }+ submitSlackIntegrationRequest: (slackIntegration: { botToken: string; channelId: string }) => {+ slackIntegration: {+ botToken: string+ channelId: string+ }+ }+ submitSlackIntegrationSuccess: (slackIntegration: { botToken: string; channelId: string }) => {+ slackIntegration: {+ botToken: string+ channelId: string+ }+ }+ touchSlackIntegrationField: (key: string) => {+ key: string+ }+}++export type slackSetupModalLogicType = MakeLogicType<+ slackSetupModalLogicValues,+ slackSetupModalLogicActions,+ SlackSetupModalLogicProps+>+export const slackSetupModalLogic = kea<slackSetupModalLogicType>([path(['products', 'workflows', 'frontend', 'SlackSetup', 'slackSetupModalLogic']),props({} as SlackSetupModalLogicProps),diff --git a/products/workflows/frontend/Channels/TwilioSetup/twilioSetupModalLogic.ts b/products/workflows/frontend/Channels/TwilioSetup/twilioSetupModalLogic.tsindex 714cec813cf7..ba65b0a76cdc 100644--- a/products/workflows/frontend/Channels/TwilioSetup/twilioSetupModalLogic.ts+++ b/products/workflows/frontend/Channels/TwilioSetup/twilioSetupModalLogic.ts@@ -1,5 +1,6 @@-import { connect, kea, path, props } from 'kea'+import { MakeLogicType, connect, kea, path, props } from 'kea'import { forms } from 'kea-forms'+import type { DeepPartial, DeepPartialMap, FieldName, ValidationErrorType } from 'kea-forms'import api from 'lib/api'import { integrationsLogic } from 'lib/integrations/integrationsLogic'@@ -7,8 +8,6 @@ import { lemonToast } from 'lib/lemon-ui/LemonToast'import { IntegrationType } from '~/types'-import type { twilioSetupModalLogicType } from './twilioSetupModalLogicType'-export interface TwilioSetupModalLogicProps {integration?: IntegrationType | nullonComplete: (integrationId?: number) => void@@ -20,6 +19,100 @@ export interface TwilioFormType {authToken: string}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface twilioSetupModalLogicValues {+ isTwilioIntegrationSubmitting: boolean+ isTwilioIntegrationValid: boolean+ showTwilioIntegrationErrors: boolean+ twilioIntegration: {+ accountSid: string+ authToken: string+ }+ twilioIntegrationAllErrors: Record<string, any>+ twilioIntegrationChanged: boolean+ twilioIntegrationErrors: DeepPartialMap<+ {+ accountSid: string+ authToken: string+ },+ ValidationErrorType+ >+ twilioIntegrationHasErrors: boolean+ twilioIntegrationManualErrors: Record<string, any>+ twilioIntegrationTouched: boolean+ twilioIntegrationTouches: Record<string, boolean>+ twilioIntegrationValidationErrors: DeepPartialMap<+ {+ accountSid: string+ authToken: string+ },+ ValidationErrorType+ >+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface twilioSetupModalLogicActions {+ loadIntegrations: () => any // integrationsLogic+ resetTwilioIntegration: (values?: { accountSid: string; authToken: string }) => {+ values?: {+ accountSid: string+ authToken: string+ }+ }+ setTwilioIntegrationManualErrors: (errors: Record<string, any>) => {+ errors: Record<string, any>+ }+ setTwilioIntegrationValue: (+ key: FieldName,+ value: any+ ) => {+ name: FieldName+ value: any+ }+ setTwilioIntegrationValues: (+ values: DeepPartial<{+ accountSid: string+ authToken: string+ }>+ ) => {+ values: DeepPartial<{+ accountSid: string+ authToken: string+ }>+ }+ submitTwilioIntegration: () => {+ value: boolean+ }+ submitTwilioIntegrationFailure: (+ error: Error,+ errors: Record<string, any>+ ) => {+ error: Error+ errors: Record<string, any>+ }+ submitTwilioIntegrationRequest: (twilioIntegration: { accountSid: string; authToken: string }) => {+ twilioIntegration: {+ accountSid: string+ authToken: string+ }+ }+ submitTwilioIntegrationSuccess: (twilioIntegration: { accountSid: string; authToken: string }) => {+ twilioIntegration: {+ accountSid: string+ authToken: string+ }+ }+ touchTwilioIntegrationField: (key: string) => {+ key: string+ }+}++export type twilioSetupModalLogicType = MakeLogicType<+ twilioSetupModalLogicValues,+ twilioSetupModalLogicActions,+ TwilioSetupModalLogicProps+>+export const twilioSetupModalLogic = kea<twilioSetupModalLogicType>([path(['products', 'workflows', 'frontend', 'TwilioSetup', 'twilioSetupModalLogic']),props({} as TwilioSetupModalLogicProps),diff --git a/products/workflows/frontend/Channels/messageChannelLogic.ts b/products/workflows/frontend/Channels/messageChannelLogic.tsindex 63f4895dcb10..dbced003b2e4 100644--- a/products/workflows/frontend/Channels/messageChannelLogic.ts+++ b/products/workflows/frontend/Channels/messageChannelLogic.ts@@ -1,13 +1,35 @@-import { kea, key, path, props, selectors } from 'kea'+import { MakeLogicType, kea, key, path, props, selectors } from 'kea'import { IntegrationType } from '~/types'-import type { messageChannelLogicType } from './messageChannelLogicType'-export interface MessageChannelLogicProps {integration?: IntegrationType}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface messageChannelLogicValues {+ displayName: string+ isVerificationRequired: boolean+ isVerified: boolean+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface messageChannelLogicMeta {+ key: string+ __keaTypeGenInternalSelectorTypes: {+ displayName: (arg: any) => string+ isVerificationRequired: (arg: any) => boolean+ isVerified: (arg: any) => boolean+ }+}++export type messageChannelLogicType = MakeLogicType<+ messageChannelLogicValues,+ {},+ MessageChannelLogicProps,+ messageChannelLogicMeta+>+export const messageChannelLogic = kea<messageChannelLogicType>([path(['products', 'workflows', 'frontend', 'messageChannelLogic']),props({} as MessageChannelLogicProps),diff --git a/products/workflows/frontend/OptOuts/customerIOImportLogic.ts b/products/workflows/frontend/OptOuts/customerIOImportLogic.tsindex f9b8d61f9abd..dbb7c6ee5dcb 100644--- a/products/workflows/frontend/OptOuts/customerIOImportLogic.ts+++ b/products/workflows/frontend/OptOuts/customerIOImportLogic.ts@@ -1,5 +1,6 @@-import { actions, connect, kea, listeners, path, reducers, selectors } from 'kea'+import { MakeLogicType, actions, connect, kea, listeners, path, reducers, selectors } from 'kea'import { forms } from 'kea-forms'+import type { DeepPartial, DeepPartialMap, FieldName, ValidationErrorType } from 'kea-forms'import { loaders } from 'kea-loaders'import { ApiRequest, getCookie } from 'lib/api'@@ -7,7 +8,7 @@ import { lemonToast } from 'lib/lemon-ui/LemonToast'import { preflightLogic } from 'scenes/PreflightCheck/preflightLogic'import { teamLogic } from 'scenes/teamLogic'-import type { customerIOImportLogicType } from './customerIOImportLogicType'+import type { PreflightStatus } from '../../../../frontend/src/types'import { optOutCategoriesLogic } from './optOutCategoriesLogic'export interface ImportFormValues {@@ -68,6 +69,213 @@ export interface OptOutSyncConfigResponse {has_track_credentials: boolean}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface customerIOImportLogicValues {+ preflight: PreflightStatus | null // preflightLogic+ currentTeamIdStrict: number | string // teamLogic+ csvFile: File | null+ csvProgress: CSVImportProgress | null+ hasTrackCredentials: boolean+ importError: string | null+ importForm: ImportFormValues+ importFormAllErrors: Record<string, any>+ importFormChanged: boolean+ importFormErrors: DeepPartialMap<ImportFormValues, ValidationErrorType>+ importFormHasErrors: boolean+ importFormManualErrors: Record<string, any>+ importFormTouched: boolean+ importFormTouches: Record<string, boolean>+ importFormValidationErrors: DeepPartialMap<ImportFormValues, ValidationErrorType>+ importProgress: ImportProgress | null+ isImportComplete: boolean+ isImportFailed: boolean+ isImportFormSubmitting: boolean+ isImportFormValid: boolean+ isImportModalOpen: boolean+ isImporting: boolean+ isRemovingAppConfig: boolean+ isRemovingTrackConfig: boolean+ isRemovingWebhookConfig: boolean+ isSavingTrack: boolean+ isSavingWebhook: boolean+ isUploadingCSV: boolean+ showImportFormErrors: boolean+ stepCompletion: {+ step1: 'completed' | 'failed' | false+ step2: 'completed' | 'failed' | false+ step3: 'completed' | false+ step4: 'completed' | false+ }+ syncConfig: OptOutSyncConfigResponse | null+ syncConfigLoading: boolean+ trackApiKey: string+ trackEnabled: boolean+ trackError: string | null+ trackRegion: string+ trackSiteId: string+ webhookError: string | null+ webhookSigningSecret: string+ webhookUrl: string+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface customerIOImportLogicActions {+ closeImportModal: () => {+ value: true+ }+ loadSyncConfig: () => any+ loadSyncConfigFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadSyncConfigSuccess: (+ syncConfig: OptOutSyncConfigResponse | null,+ payload?: any+ ) => {+ syncConfig: OptOutSyncConfigResponse | null+ payload?: any+ }+ openImportModal: () => {+ value: true+ }+ removeAppConfig: () => {+ value: true+ }+ removeTrackConfig: () => {+ value: true+ }+ removeWebhookConfig: () => {+ value: true+ }+ rerunImport: () => {+ value: true+ }+ resetImport: () => {+ value: true+ }+ resetImportForm: (values?: ImportFormValues) => {+ values?: ImportFormValues+ }+ saveTrackConfig: () => {+ value: true+ }+ saveWebhookConfig: () => {+ value: true+ }+ setCSVFile: (file: File | null) => {+ file: File | null+ }+ setCSVProgress: (csvProgress: CSVImportProgress | null) => {+ csvProgress: CSVImportProgress | null+ }+ setImportError: (error: string | null) => {+ error: string | null+ }+ setImportFormManualErrors: (errors: Record<string, any>) => {+ errors: Record<string, any>+ }+ setImportFormValue: (+ key: FieldName,+ value: any+ ) => {+ name: FieldName+ value: any+ }+ setImportFormValues: (values: DeepPartial<ImportFormValues>) => {+ values: DeepPartial<ImportFormValues>+ }+ setImportProgress: (importProgress: ImportProgress) => {+ importProgress: ImportProgress+ }+ setIsSavingTrack: (isSaving: boolean) => {+ isSaving: boolean+ }+ setIsSavingWebhook: (isSaving: boolean) => {+ isSaving: boolean+ }+ setIsUploadingCSV: (isUploading: boolean) => {+ isUploading: boolean+ }+ setTrackApiKey: (apiKey: string) => {+ apiKey: string+ }+ setTrackError: (error: string | null) => {+ error: string | null+ }+ setTrackRegion: (region: string) => {+ region: string+ }+ setTrackSiteId: (siteId: string) => {+ siteId: string+ }+ setWebhookError: (error: string | null) => {+ error: string | null+ }+ setWebhookSigningSecret: (secret: string) => {+ secret: string+ }+ submitImportForm: () => {+ value: boolean+ }+ submitImportFormFailure: (+ error: Error,+ errors: Record<string, any>+ ) => {+ error: Error+ errors: Record<string, any>+ }+ submitImportFormRequest: (importForm: ImportFormValues) => {+ importForm: ImportFormValues+ }+ submitImportFormSuccess: (importForm: ImportFormValues) => {+ importForm: ImportFormValues+ }+ toggleTrackSync: (enabled: boolean) => {+ enabled: boolean+ }+ toggleWebhook: (enabled: boolean) => {+ enabled: boolean+ }+ touchImportFormField: (key: string) => {+ key: string+ }+ uploadCSV: () => {+ value: true+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface customerIOImportLogicMeta {+ __keaTypeGenInternalSelectorTypes: {+ isImporting: (isImportFormSubmitting: boolean, importProgress: ImportProgress | null) => boolean+ isImportComplete: (importProgress: ImportProgress | null) => boolean+ isImportFailed: (importProgress: ImportProgress | null) => boolean+ webhookUrl: (currentTeamIdStrict: number | string) => string+ stepCompletion: (+ syncConfig: OptOutSyncConfigResponse | null,+ importProgress: ImportProgress | null,+ csvProgress: CSVImportProgress | null+ ) => {+ step1: 'completed' | 'failed' | false+ step2: 'completed' | 'failed' | false+ step3: 'completed' | false+ step4: 'completed' | false+ }+ trackEnabled: (syncConfig: OptOutSyncConfigResponse | null) => boolean+ hasTrackCredentials: (syncConfig: OptOutSyncConfigResponse | null) => boolean+ }+}++export type customerIOImportLogicType = MakeLogicType<+ customerIOImportLogicValues,+ customerIOImportLogicActions,+ Record<string, any>,+ customerIOImportLogicMeta+>+export const customerIOImportLogic = kea<customerIOImportLogicType>([path(['products', 'workflows', 'customerIOImportLogic']),connect(() => ({@@ -265,14 +473,20 @@ export const customerIOImportLogic = kea<customerIOImportLogicType>([selectors({isImporting: [(s) => [s.isImportFormSubmitting, s.importProgress],- (isImportFormSubmitting, importProgress) =>+ (isImportFormSubmitting: boolean, importProgress: ImportProgress | null) =>isImportFormSubmitting || importProgress?.status === 'importing',],- isImportComplete: [(s) => [s.importProgress], (importProgress) => importProgress?.status === 'completed'],- isImportFailed: [(s) => [s.importProgress], (importProgress) => importProgress?.status === 'failed'],+ isImportComplete: [+ (s) => [s.importProgress],+ (importProgress: ImportProgress | null) => importProgress?.status === 'completed',+ ],+ isImportFailed: [+ (s) => [s.importProgress],+ (importProgress: ImportProgress | null) => importProgress?.status === 'failed',+ ],webhookUrl: [(s) => [s.currentTeamIdStrict],- (currentTeamIdStrict): string => {+ (currentTeamIdStrict: number | string): string => {const host = window.location.originreturn `${host}/api/environments/${currentTeamIdStrict}/messaging/customerio/webhook/`},@@ -280,9 +494,9 @@ export const customerIOImportLogic = kea<customerIOImportLogicType>([stepCompletion: [(s) => [s.syncConfig, s.importProgress, s.csvProgress],(- syncConfig,- importProgress,- csvProgress+ syncConfig: OptOutSyncConfigResponse | null,+ importProgress: ImportProgress | null,+ csvProgress: CSVImportProgress | null): {step1: 'completed' | 'failed' | falsestep2: 'completed' | 'failed' | false@@ -308,10 +522,13 @@ export const customerIOImportLogic = kea<customerIOImportLogicType>([}},],- trackEnabled: [(s) => [s.syncConfig], (syncConfig): boolean => syncConfig?.track_enabled ?? false],+ trackEnabled: [+ (s) => [s.syncConfig],+ (syncConfig: OptOutSyncConfigResponse | null): boolean => syncConfig?.track_enabled ?? false,+ ],hasTrackCredentials: [(s) => [s.syncConfig],- (syncConfig): boolean => syncConfig?.has_track_credentials ?? false,+ (syncConfig: OptOutSyncConfigResponse | null): boolean => syncConfig?.has_track_credentials ?? false,],}),listeners(({ actions, values }) => ({diff --git a/products/workflows/frontend/OptOuts/newCategoryLogic.ts b/products/workflows/frontend/OptOuts/newCategoryLogic.tsindex d7e83ce6319d..bf2fccbaca6b 100644--- a/products/workflows/frontend/OptOuts/newCategoryLogic.ts+++ b/products/workflows/frontend/OptOuts/newCategoryLogic.ts@@ -1,10 +1,10 @@-import { actions, kea, key, listeners, path, props } from 'kea'+import { MakeLogicType, actions, kea, key, listeners, path, props } from 'kea'import { forms } from 'kea-forms'+import type { DeepPartial, DeepPartialMap, FieldName, ValidationErrorType } from 'kea-forms'import api from 'lib/api'import { lemonToast } from 'lib/lemon-ui/LemonToast/LemonToast'-import type { newCategoryLogicType } from './newCategoryLogicType'import { MessageCategory, optOutCategoriesLogic } from './optOutCategoriesLogic'export type CategoryForm = {@@ -28,6 +28,79 @@ const NEW_CATEGORY: CategoryForm = {category_type: 'marketing',}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface newCategoryLogicValues {+ categoryForm: CategoryForm+ categoryFormAllErrors: Record<string, any>+ categoryFormChanged: boolean+ categoryFormErrors: DeepPartialMap<CategoryForm, ValidationErrorType>+ categoryFormHasErrors: boolean+ categoryFormManualErrors: Record<string, any>+ categoryFormTouched: boolean+ categoryFormTouches: Record<string, boolean>+ categoryFormValidationErrors: DeepPartialMap<CategoryForm, ValidationErrorType>+ isCategoryFormSubmitting: boolean+ isCategoryFormValid: boolean+ showCategoryFormErrors: boolean+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface newCategoryLogicActions {+ resetCategoryForm: (values?: CategoryForm) => {+ values?: CategoryForm+ }+ resetForm: () => {+ value: true+ }+ setCategoryFormManualErrors: (errors: Record<string, any>) => {+ errors: Record<string, any>+ }+ setCategoryFormValue: (+ key: FieldName,+ value: any+ ) => {+ name: FieldName+ value: any+ }+ setCategoryFormValues: (values: DeepPartial<CategoryForm>) => {+ values: DeepPartial<CategoryForm>+ }+ submitCategoryForm: () => {+ value: boolean+ }+ submitCategoryFormFailure: (+ error: Error,+ errors: Record<string, any>+ ) => {+ error: Error+ errors: Record<string, any>+ }+ submitCategoryFormRequest: (categoryForm: CategoryForm) => {+ categoryForm: CategoryForm+ }+ submitCategoryFormSuccess: (categoryForm: CategoryForm) => {+ categoryForm: CategoryForm+ }+ submitForm: () => {+ value: true+ }+ touchCategoryFormField: (key: string) => {+ key: string+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface newCategoryLogicMeta {+ key: string+}++export type newCategoryLogicType = MakeLogicType<+ newCategoryLogicValues,+ newCategoryLogicActions,+ CategoryLogicProps,+ newCategoryLogicMeta+>+export const newCategoryLogic = kea<newCategoryLogicType>([path(['products', 'workflows', 'frontend', 'OptOuts', 'newCategoryLogic']),props({} as CategoryLogicProps),diff --git a/products/workflows/frontend/OptOuts/optOutCategoriesLogic.ts b/products/workflows/frontend/OptOuts/optOutCategoriesLogic.tsindex db11bdcb6e23..8d6b4eb08748 100644--- a/products/workflows/frontend/OptOuts/optOutCategoriesLogic.ts+++ b/products/workflows/frontend/OptOuts/optOutCategoriesLogic.ts@@ -1,10 +1,8 @@-import { actions, afterMount, kea, listeners, path, reducers } from 'kea'+import { MakeLogicType, actions, afterMount, kea, listeners, path, reducers } from 'kea'import { loaders } from 'kea-loaders'import api from 'lib/api'-import type { optOutCategoriesLogicType } from './optOutCategoriesLogicType'-export type MessageCategory = {id: stringkey: string@@ -14,6 +12,49 @@ export type MessageCategory = {category_type: string}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface optOutCategoriesLogicValues {+ categories: MessageCategory[]+ categoriesLoading: boolean+ isNewCategoryModalOpen: boolean+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface optOutCategoriesLogicActions {+ closeNewCategoryModal: () => {+ value: true+ }+ deleteCategory: (id: string) => {+ id: string+ }+ loadCategories: () => {+ value: true+ }+ loadCategoriesFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadCategoriesSuccess: (+ categories: MessageCategory[],+ payload?: {+ value: true+ }+ ) => {+ categories: MessageCategory[]+ payload?: {+ value: true+ }+ }+ openNewCategoryModal: () => {+ value: true+ }+}++export type optOutCategoriesLogicType = MakeLogicType<optOutCategoriesLogicValues, optOutCategoriesLogicActions>+export const optOutCategoriesLogic = kea<optOutCategoriesLogicType>([path(['products', 'workflows', 'frontend', 'OptOuts', 'optOutCategoriesLogic']),diff --git a/products/workflows/frontend/OptOuts/optOutListLogic.ts b/products/workflows/frontend/OptOuts/optOutListLogic.tsindex ee2e750fd46c..b9f76024a6f1 100644--- a/products/workflows/frontend/OptOuts/optOutListLogic.ts+++ b/products/workflows/frontend/OptOuts/optOutListLogic.ts@@ -1,4 +1,4 @@-import { actions, afterMount, connect, kea, key, path, props, reducers } from 'kea'+import { MakeLogicType, actions, afterMount, connect, kea, key, path, props, reducers } from 'kea'import { loaders } from 'kea-loaders'import { lemonToast } from '@posthog/lemon-ui'@@ -6,7 +6,6 @@ import { lemonToast } from '@posthog/lemon-ui'import api, { CountedPaginatedResponse } from 'lib/api'import { MessageCategory } from './optOutCategoriesLogic'-import type { optOutListLogicType } from './optOutListLogicType'import { optOutSceneLogic } from './optOutSceneLogic'import type { OptOutEntry, OptOutPersonPreference } from './types'@@ -18,6 +17,131 @@ export type OptOutListLogicProps = {category?: MessageCategory}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface optOutListLogicValues {+ preferencesUrlLoading: boolean // optOutSceneLogic+ addOptOut: OptOutEntry | null+ addOptOutLoading: boolean+ currentPage: number+ managePreferencesModalOpen: boolean+ newOptOutIdentifier: string+ optOutPersons: PaginatedOptOuts+ optOutPersonsLoading: boolean+ personsModalOpen: boolean+ selectedIdentifier: string | null+ showAddOptOutModal: boolean+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface optOutListLogicActions {+ openPreferencesPage: (recipient?: string | undefined) => string // optOutSceneLogic+ addOptOut: (identifier: string) => string+ addOptOutFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ addOptOutSuccess: (+ addOptOut: OptOutEntry,+ payload?: string+ ) => {+ addOptOut: OptOutEntry+ payload?: string+ }+ loadNextPage: () => {+ value: true+ }+ loadNextPageFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadNextPageSuccess: (+ optOutPersons: PaginatedOptOuts,+ payload?: {+ value: true+ }+ ) => {+ optOutPersons: PaginatedOptOuts+ payload?: {+ value: true+ }+ }+ loadOptOutPersons: () => any+ loadOptOutPersonsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadOptOutPersonsSuccess: (+ optOutPersons: PaginatedOptOuts,+ payload?: any+ ) => {+ optOutPersons: PaginatedOptOuts+ payload?: any+ }+ loadPreviousPage: () => {+ value: true+ }+ loadPreviousPageFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadPreviousPageSuccess: (+ optOutPersons: PaginatedOptOuts,+ payload?: {+ value: true+ }+ ) => {+ optOutPersons: PaginatedOptOuts+ payload?: {+ value: true+ }+ }+ loadUnsubscribeLink: () => {+ value: true+ }+ setCurrentPage: (page: number) => {+ page: number+ }+ setManagePreferencesModalOpen: (open: boolean) => {+ open: boolean+ }+ setNewOptOutIdentifier: (identifier: string) => {+ identifier: string+ }+ setPersonsModalOpen: (open: boolean) => {+ open: boolean+ }+ setSelectedIdentifier: (identifier: string | null) => {+ identifier: string | null+ }+ setShowAddOptOutModal: (show: boolean) => {+ show: boolean+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface optOutListLogicMeta {+ key: string+}++export type optOutListLogicType = MakeLogicType<+ optOutListLogicValues,+ optOutListLogicActions,+ OptOutListLogicProps,+ optOutListLogicMeta+>+export const optOutListLogic = kea<optOutListLogicType>([key((props) => props.category?.id || '$all'),path(['products', 'workflows', 'frontend', 'OptOuts', 'optOutListLogic']),diff --git a/products/workflows/frontend/OptOuts/optOutSceneLogic.ts b/products/workflows/frontend/OptOuts/optOutSceneLogic.tsindex a538a82ae559..f51f8e75b803 100644--- a/products/workflows/frontend/OptOuts/optOutSceneLogic.ts+++ b/products/workflows/frontend/OptOuts/optOutSceneLogic.ts@@ -1,4 +1,4 @@-import { actions, connect, kea, path } from 'kea'+import { MakeLogicType, actions, connect, kea, path } from 'kea'import { loaders } from 'kea-loaders'import { lemonToast } from '@posthog/lemon-ui'@@ -6,7 +6,38 @@ import { lemonToast } from '@posthog/lemon-ui'import api from 'lib/api'import { userLogic } from 'scenes/userLogic'-import type { optOutSceneLogicType } from './optOutSceneLogicType'+import type { UserType } from '../../../../frontend/src/types'++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface optOutSceneLogicValues {+ user: UserType | null // userLogic+ preferencesUrl: string | null+ preferencesUrlLoading: boolean+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface optOutSceneLogicActions {+ loadUnsubscribeLink: () => {+ value: true+ }+ openPreferencesPage: (recipient?: string) => string+ openPreferencesPageFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ openPreferencesPageSuccess: (+ preferencesUrl: string | null,+ payload?: string+ ) => {+ preferencesUrl: string | null+ payload?: string+ }+}++export type optOutSceneLogicType = MakeLogicType<optOutSceneLogicValues, optOutSceneLogicActions>export const optOutSceneLogic = kea<optOutSceneLogicType>([path(['products', 'workflows', 'frontend', 'OptOuts', 'optOutSceneLogic']),diff --git a/products/workflows/frontend/TemplateLibrary/messageTemplateLogic.ts b/products/workflows/frontend/TemplateLibrary/messageTemplateLogic.tsindex bee180ad30fe..5d8403acf175 100644--- a/products/workflows/frontend/TemplateLibrary/messageTemplateLogic.ts+++ b/products/workflows/frontend/TemplateLibrary/messageTemplateLogic.ts@@ -1,5 +1,6 @@-import { actions, afterMount, connect, kea, key, listeners, path, props, reducers, selectors } from 'kea'+import { MakeLogicType, actions, afterMount, connect, kea, key, listeners, path, props, reducers, selectors } from 'kea'import { forms } from 'kea-forms'+import type { DeepPartial, DeepPartialMap, FieldName, ValidationErrorType } from 'kea-forms'import { loaders } from 'kea-loaders'import { beforeUnload, router } from 'kea-router'@@ -9,8 +10,9 @@ import { deleteWithUndo } from 'lib/utils/deleteWithUndo'import { teamLogic } from 'scenes/teamLogic'import { urls } from 'scenes/urls'+import type { EmailTemplate } from '../../../../frontend/src/scenes/hog-functions/email-templater/types'+import type { HogFunctionType, UserBasicType } from '../../../../frontend/src/types'import { NEW_TEMPLATE } from './constants'-import type { messageTemplateLogicType } from './messageTemplateLogicType'import { MessageTemplate } from './types'export interface MessageTemplateLogicProps {@@ -18,6 +20,257 @@ export interface MessageTemplateLogicProps {messageId?: string | null}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface messageTemplateLogicValues {+ currentTeamIdStrict: number | string // teamLogic+ isTemplateSubmitting: boolean+ isTemplateValid: boolean+ logicProps: MessageTemplateLogicProps+ message: any+ messageLoading: boolean+ originalTemplate: MessageTemplate+ showTemplateErrors: boolean+ template: MessageTemplate+ templateAllErrors: Record<string, any>+ templateChanged: boolean+ templateErrors: DeepPartialMap<+ {+ content: {+ email: EmailTemplate+ templating: 'hog' | 'liquid'+ }+ created_at: string | null+ created_by: UserBasicType | null+ description: string+ id: string+ name: string+ updated_at: string | null+ },+ ValidationErrorType+ >+ templateHasErrors: boolean+ templateLoading: boolean+ templateManualErrors: Record<string, any>+ templateTouched: boolean+ templateTouches: Record<string, boolean>+ templateValidationErrors: DeepPartialMap<+ {+ content: {+ email: EmailTemplate+ templating: 'hog' | 'liquid'+ }+ created_at: string | null+ created_by: UserBasicType | null+ description: string+ id: string+ name: string+ updated_at: string | null+ },+ ValidationErrorType+ >+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface messageTemplateLogicActions {+ deleteTemplate: () => {+ value: true+ }+ duplicateTemplate: () => {+ value: true+ }+ loadMessage: () => any+ loadMessageFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadMessageSuccess: (+ message: HogFunctionType | null,+ payload?: any+ ) => {+ message: HogFunctionType | null+ payload?: any+ }+ loadTemplate: () => any+ loadTemplateFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadTemplateSuccess: (+ template: MessageTemplate,+ payload?: any+ ) => {+ template: MessageTemplate+ payload?: any+ }+ resetTemplate: (values?: {+ content: {+ email: EmailTemplate+ templating: 'hog' | 'liquid'+ }+ created_at: string | null+ created_by: UserBasicType | null+ description: string+ id: string+ name: string+ updated_at: string | null+ }) => {+ values?: {+ content: {+ email: EmailTemplate+ templating: 'hog' | 'liquid'+ }+ created_at: string | null+ created_by: UserBasicType | null+ description: string+ id: string+ name: string+ updated_at: string | null+ }+ }+ saveTemplate: (template: any) => any+ saveTemplateFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ saveTemplateSuccess: (+ template: MessageTemplate,+ payload?: any+ ) => {+ template: MessageTemplate+ payload?: any+ }+ setOriginalTemplate: (template: MessageTemplate) => {+ template: MessageTemplate+ }+ setTemplate: (template: MessageTemplate) => {+ template: MessageTemplate+ }+ setTemplateManualErrors: (errors: Record<string, any>) => {+ errors: Record<string, any>+ }+ setTemplateValue: (+ key: FieldName,+ value: any+ ) => {+ name: FieldName+ value: any+ }+ setTemplateValues: (+ values: DeepPartial<{+ content: {+ email: EmailTemplate+ templating: 'hog' | 'liquid'+ }+ created_at: string | null+ created_by: UserBasicType | null+ description: string+ id: string+ name: string+ updated_at: string | null+ }>+ ) => {+ values: DeepPartial<{+ content: {+ email: EmailTemplate+ templating: 'hog' | 'liquid'+ }+ created_at: string | null+ created_by: UserBasicType | null+ description: string+ id: string+ name: string+ updated_at: string | null+ }>+ }+ submitTemplate: () => {+ value: boolean+ }+ submitTemplateFailure: (+ error: Error,+ errors: Record<string, any>+ ) => {+ error: Error+ errors: Record<string, any>+ }+ submitTemplateRequest: (template: {+ content: {+ email: EmailTemplate+ templating: 'hog' | 'liquid'+ }+ created_at: string | null+ created_by: UserBasicType | null+ description: string+ id: string+ name: string+ updated_at: string | null+ }) => {+ template: {+ content: {+ email: EmailTemplate+ templating: 'hog' | 'liquid'+ }+ created_at: string | null+ created_by: UserBasicType | null+ description: string+ id: string+ name: string+ updated_at: string | null+ }+ }+ submitTemplateSuccess: (template: {+ content: {+ email: EmailTemplate+ templating: 'hog' | 'liquid'+ }+ created_at: string | null+ created_by: UserBasicType | null+ description: string+ id: string+ name: string+ updated_at: string | null+ }) => {+ template: {+ content: {+ email: EmailTemplate+ templating: 'hog' | 'liquid'+ }+ created_at: string | null+ created_by: UserBasicType | null+ description: string+ id: string+ name: string+ updated_at: string | null+ }+ }+ touchTemplateField: (key: string) => {+ key: string+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface messageTemplateLogicMeta {+ key: string+ __keaTypeGenInternalSelectorTypes: {+ logicProps: (arg: MessageTemplateLogicProps) => MessageTemplateLogicProps+ }+}++export type messageTemplateLogicType = MakeLogicType<+ messageTemplateLogicValues,+ messageTemplateLogicActions,+ MessageTemplateLogicProps,+ messageTemplateLogicMeta+>+export const messageTemplateLogic = kea<messageTemplateLogicType>([path(['products', 'workflows', 'frontend', 'messageTemplateLogic']),props({} as MessageTemplateLogicProps),diff --git a/products/workflows/frontend/TemplateLibrary/messageTemplateSceneLogic.ts b/products/workflows/frontend/TemplateLibrary/messageTemplateSceneLogic.tsindex 0a6a84e7b1f0..a2e0279d1322 100644--- a/products/workflows/frontend/TemplateLibrary/messageTemplateSceneLogic.ts+++ b/products/workflows/frontend/TemplateLibrary/messageTemplateSceneLogic.ts@@ -1,4 +1,4 @@-import { kea, path, props, selectors } from 'kea'+import { MakeLogicType, kea, path, props, selectors } from 'kea'import { Scene } from 'scenes/sceneTypes'import { urls } from 'scenes/urls'@@ -6,13 +6,30 @@ import { urls } from 'scenes/urls'import { FileSystemIconType } from '~/queries/schema/schema-general'import { Breadcrumb } from '~/types'-import type { messageTemplateSceneLogicType } from './messageTemplateSceneLogicType'-export interface MessageTemplateSceneLogicProps {id: stringmessageId?: string | null}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface messageTemplateSceneLogicValues {+ breadcrumbs: Breadcrumb[]+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface messageTemplateSceneLogicMeta {+ __keaTypeGenInternalSelectorTypes: {+ breadcrumbs: (id: string) => Breadcrumb[]+ }+}++export type messageTemplateSceneLogicType = MakeLogicType<+ messageTemplateSceneLogicValues,+ {},+ MessageTemplateSceneLogicProps,+ messageTemplateSceneLogicMeta+>+export const messageTemplateSceneLogic = kea<messageTemplateSceneLogicType>([path(['products', 'workflows', 'frontend', 'messageTemplateSceneLogic']),props({} as MessageTemplateSceneLogicProps),diff --git a/products/workflows/frontend/TemplateLibrary/messageTemplatesLogic.ts b/products/workflows/frontend/TemplateLibrary/messageTemplatesLogic.tsindex 4ca3309f9b12..e8332198471e 100644--- a/products/workflows/frontend/TemplateLibrary/messageTemplatesLogic.ts+++ b/products/workflows/frontend/TemplateLibrary/messageTemplatesLogic.ts@@ -1,4 +1,4 @@-import { actions, afterMount, connect, kea, path, reducers, selectors } from 'kea'+import { MakeLogicType, actions, afterMount, connect, kea, path, reducers, selectors } from 'kea'import { loaders } from 'kea-loaders'import api from 'lib/api'@@ -6,11 +6,138 @@ import { lemonToast } from 'lib/lemon-ui/LemonToast'import { deleteWithUndo } from 'lib/utils/deleteWithUndo'import { teamLogic } from 'scenes/teamLogic'-import type { messageTemplatesLogicType } from './messageTemplatesLogicType'import { MessageTemplate } from './types'export type { MessageTemplate }+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface messageTemplatesLogicValues {+ currentTeamIdStrict: number | string // teamLogic+ createdByFilter: number | null+ filteredTemplates: MessageTemplate[]+ search: string+ templates: MessageTemplate[]+ templatesLoading: boolean+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface messageTemplatesLogicActions {+ createTemplate: ({ template }: { template: Partial<MessageTemplate> }) => {+ template: Partial<MessageTemplate>+ }+ createTemplateFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ createTemplateSuccess: (+ templates: MessageTemplate[],+ payload?: {+ template: Partial<MessageTemplate>+ }+ ) => {+ templates: MessageTemplate[]+ payload?: {+ template: Partial<MessageTemplate>+ }+ }+ deleteTemplate: (template: MessageTemplate) => MessageTemplate+ deleteTemplateFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ deleteTemplateSuccess: (+ templates: MessageTemplate[],+ payload?: MessageTemplate+ ) => {+ templates: MessageTemplate[]+ payload?: MessageTemplate+ }+ duplicateTemplate: (template: MessageTemplate) => MessageTemplate+ duplicateTemplateFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ duplicateTemplateSuccess: (+ templates: MessageTemplate[],+ payload?: MessageTemplate+ ) => {+ templates: MessageTemplate[]+ payload?: MessageTemplate+ }+ loadTemplates: () => any+ loadTemplatesFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadTemplatesSuccess: (+ templates: MessageTemplate[],+ payload?: any+ ) => {+ templates: MessageTemplate[]+ payload?: any+ }+ setCreatedByFilter: (createdBy: number | null) => {+ createdBy: number | null+ }+ setSearch: (search: string) => {+ search: string+ }+ updateTemplate: ({ templateId, template }: { template: Partial<MessageTemplate>; templateId: string }) => {+ templateId: string+ template: Partial<MessageTemplate>+ }+ updateTemplateFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ updateTemplateSuccess: (+ templates: MessageTemplate[],+ payload?: {+ templateId: string+ template: Partial<MessageTemplate>+ }+ ) => {+ templates: MessageTemplate[]+ payload?: {+ templateId: string+ template: Partial<MessageTemplate>+ }+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface messageTemplatesLogicMeta {+ __keaTypeGenInternalSelectorTypes: {+ filteredTemplates: (+ templates: MessageTemplate[],+ search: string,+ createdByFilter: number | null+ ) => MessageTemplate[]+ }+}++export type messageTemplatesLogicType = MakeLogicType<+ messageTemplatesLogicValues,+ messageTemplatesLogicActions,+ Record<string, any>,+ messageTemplatesLogicMeta+>+export const messageTemplatesLogic = kea<messageTemplatesLogicType>([path(['products', 'workflows', 'frontend', 'library', 'messageTemplatesLogic']),connect(() => ({diff --git a/products/workflows/frontend/Workflows/batchWorkflowJobsLogic.ts b/products/workflows/frontend/Workflows/batchWorkflowJobsLogic.tsindex dbc36fd8d5c3..6d52f9eac442 100644--- a/products/workflows/frontend/Workflows/batchWorkflowJobsLogic.ts+++ b/products/workflows/frontend/Workflows/batchWorkflowJobsLogic.ts@@ -1,17 +1,57 @@-import { kea, key, path, props, selectors } from 'kea'+import { MakeLogicType, kea, key, path, props, selectors } from 'kea'import { lazyLoaders } from 'kea-loaders'import { urlToAction } from 'kea-router'import api from 'lib/api'import { urls } from 'scenes/urls'-import type { batchWorkflowJobsLogicType } from './batchWorkflowJobsLogicType'import { HogFlowBatchJob } from './hogflows/types'export interface BatchWorkflowJobsLogicProps {id?: string}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface batchWorkflowJobsLogicValues {+ batchWorkflowJobs: HogFlowBatchJob[] | null+ batchWorkflowJobsLoading: boolean+ jobs: HogFlowBatchJob[]+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface batchWorkflowJobsLogicActions {+ loadBatchWorkflowJobs: () => any+ loadBatchWorkflowJobsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadBatchWorkflowJobsSuccess: (+ batchWorkflowJobs: HogFlowBatchJob[] | null,+ payload?: any+ ) => {+ batchWorkflowJobs: HogFlowBatchJob[] | null+ payload?: any+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface batchWorkflowJobsLogicMeta {+ key: string+ __keaTypeGenInternalSelectorTypes: {+ jobs: (batchWorkflowJobs: HogFlowBatchJob[] | null) => HogFlowBatchJob[]+ }+}++export type batchWorkflowJobsLogicType = MakeLogicType<+ batchWorkflowJobsLogicValues,+ batchWorkflowJobsLogicActions,+ BatchWorkflowJobsLogicProps,+ batchWorkflowJobsLogicMeta+>+export const batchWorkflowJobsLogic = kea<batchWorkflowJobsLogicType>([path(['products', 'workflows', 'frontend', 'Workflows', 'batchWorkflowJobsLogic']),props({ id: 'new' } as BatchWorkflowJobsLogicProps),@@ -31,7 +71,7 @@ export const batchWorkflowJobsLogic = kea<batchWorkflowJobsLogicType>([],})),selectors({- jobs: [(s) => [s.batchWorkflowJobs], (batchWorkflowJobs) => batchWorkflowJobs || []],+ jobs: [(s) => [s.batchWorkflowJobs], (batchWorkflowJobs: HogFlowBatchJob[] | null) => batchWorkflowJobs || []],}),urlToAction(({ props, actions }) => ({[urls.workflow(props.id || 'new', 'logs')]: (_, __, ___, currentLocation, previousLocation) => {diff --git a/products/workflows/frontend/Workflows/hogflows/HogFlowManualTriggerButtonLogic.ts b/products/workflows/frontend/Workflows/hogflows/HogFlowManualTriggerButtonLogic.tsindex 85a8a6a3574b..d3b6021a58f5 100644--- a/products/workflows/frontend/Workflows/hogflows/HogFlowManualTriggerButtonLogic.ts+++ b/products/workflows/frontend/Workflows/hogflows/HogFlowManualTriggerButtonLogic.ts@@ -1,12 +1,13 @@-import { actions, connect, kea, key, path, props, reducers, selectors } from 'kea'+import { MakeLogicType, actions, connect, kea, key, path, props, reducers, selectors } from 'kea'import { teamLogic } from 'scenes/teamLogic'import { userLogic } from 'scenes/userLogic'import { CyclotronJobInputSchemaType } from '~/types'+import type { UserType } from '../../../../../frontend/src/types'import { WorkflowLogicProps, workflowLogic } from '../workflowLogic'-import type { hogFlowManualTriggerButtonLogicType } from './HogFlowManualTriggerButtonLogicType'+import type { HogFlow } from './types'const parseValue = (value: string, variableType: string): any => {if (value === '') {@@ -29,6 +30,60 @@ const parseValue = (value: string, variableType: string): any => {}}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface hogFlowManualTriggerButtonLogicValues {+ timezone: string // teamLogic+ user: UserType | null // userLogic+ workflow: HogFlow // workflowLogic+ inputs: Record<string, string>+ popoverVisible: boolean+ variableValues: Record<string, any>+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface hogFlowManualTriggerButtonLogicActions {+ triggerBatchWorkflow: (+ variables: Record<string, any>,+ filters: {+ properties: any[]+ }+ ) => {+ filters: {+ properties: any[]+ }+ variables: Record<string, any>+ } // workflowLogic+ triggerManualWorkflow: (variables: Record<string, any>) => {+ variables: Record<string, any>+ } // workflowLogic+ clearInputs: () => {}+ setInput: (+ key: string,+ value: string+ ) => {+ key: string+ value: string+ }+ setPopoverVisible: (visible: boolean) => {+ visible: boolean+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface hogFlowManualTriggerButtonLogicMeta {+ key: string+ __keaTypeGenInternalSelectorTypes: {+ variableValues: (inputs: Record<string, string>, workflow: HogFlow) => Record<string, any>+ }+}++export type hogFlowManualTriggerButtonLogicType = MakeLogicType<+ hogFlowManualTriggerButtonLogicValues,+ hogFlowManualTriggerButtonLogicActions,+ WorkflowLogicProps,+ hogFlowManualTriggerButtonLogicMeta+>+export const hogFlowManualTriggerButtonLogic = kea<hogFlowManualTriggerButtonLogicType>([path(['products', 'workflows', 'frontend', 'Workflows', 'hogflows', 'hogFlowManualTriggerButtonLogic']),props({} as WorkflowLogicProps),diff --git a/products/workflows/frontend/Workflows/hogflows/hogFlowEditorLogic.tsx b/products/workflows/frontend/Workflows/hogflows/hogFlowEditorLogic.tsxindex b36289ddbdfb..04635917b02f 100644--- a/products/workflows/frontend/Workflows/hogflows/hogFlowEditorLogic.tsx+++ b/products/workflows/frontend/Workflows/hogflows/hogFlowEditorLogic.tsx@@ -10,7 +10,7 @@ import {applyNodeChanges,getOutgoers,} from '@xyflow/react'-import { actions, connect, events, kea, key, listeners, path, props, reducers, selectors } from 'kea'+import { MakeLogicType, actions, connect, events, kea, key, listeners, path, props, reducers, selectors } from 'kea'import { loaders } from 'kea-loaders'import { router, urlToAction } from 'kea-router'import { subscriptions } from 'kea-subscriptions'@@ -25,15 +25,17 @@ import { objectsEqual, reconcileById } from 'lib/utils/objects'import { templateToConfiguration } from 'scenes/hog-functions/configuration/hogFunctionConfigurationLogic'import { urls } from 'scenes/urls'+import type { HogFunctionTemplateType, UserBasicType } from '../../../../../frontend/src/types'import { optOutCategoriesLogic } from '../../OptOuts/optOutCategoriesLogic'+import type { MessageCategory } from '../../OptOuts/optOutCategoriesLogic'import { EXIT_NODE_ID, TRIGGER_NODE_ID, WorkflowLogicProps, workflowLogic } from '../workflowLogic'-import type { hogFlowEditorLogicType } from './hogFlowEditorLogicType'import { getFormattedNodes } from './react_flow_utils/autolayout'import { BOTTOM_HANDLE_POSITION, NODE_HEIGHT, NODE_WIDTH, TOP_HANDLE_POSITION } from './react_flow_utils/constants'import { getSmartStepPath } from './react_flow_utils/SmartEdge'import { getHogFlowStep } from './steps/HogFlowSteps'import { CyclotronInputType, StepViewNodeHandle } from './steps/types'import type { DropzoneNode, HogFlow, HogFlowAction, HogFlowActionEdge, HogFlowActionNode } from './types'+import type { HogFlowEdge } from './types'const getEdgeId = (edge: HogFlow['edges'][number]): string =>`${edge.from}->${edge.to} ${edge.type} ${edge.index ?? ''}`.trim()@@ -155,6 +157,1780 @@ export type CreateActionType = Pick<HogFlowAction, 'type' | 'config' | 'name' |getOutputMappingSuggestions?: () => Promise<OutputMappingSuggestion[]>}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface hogFlowEditorLogicValues {+ categories: MessageCategory[] // optOutCategoriesLogic+ categoriesLoading: boolean // optOutCategoriesLogic+ edgesByActionId: Record<string, HogFlowEdge[]> // workflowLogic+ hogFunctionTemplatesById: Record<string, HogFunctionTemplateType> // workflowLogic+ workflow: HogFlow // workflowLogic+ actionMetricsById: Record<string, HogFlowEditorActionMetrics> | null+ actionMetricsByIdLoading: boolean+ animatingEdgePair: string | null+ dropzoneNodes: DropzoneNode[]+ edges: HogFlowActionEdge[]+ highlightedDropzoneNodeId: string | null+ isCopyingNode: boolean+ isMovingNode: boolean+ mode: HogFlowEditorMode+ movingNodeId: string | null+ nodeToBeAdded: CreateActionType | HogFlowActionNode | null+ nodes: HogFlowActionNode[]+ nodesById: Record<string, HogFlowActionNode>+ reactFlowInstance: ReactFlowInstance<Node, Edge> | null+ reactFlowWrapper: RefObject<HTMLDivElement> | null+ selectedNode: HogFlowActionNode | null+ selectedNodeCanBeCopiedOrMoved: boolean+ selectedNodeCanBeDeleted: boolean+ selectedNodeId: string | null+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface hogFlowEditorLogicActions {+ loadCategories: () => {+ value: true+ } // optOutCategoriesLogic+ loadWorkflowSuccess: (+ originalWorkflow:+ | HogFlow+ | {+ abort_action?: string | undefined+ actions: (+ | {+ config: {+ cohorts: {+ name?: string | undefined+ percentage: number+ }[]+ }+ created_at?: number | undefined+ description: string+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ id: string+ name: string+ on_error?: 'abort' | 'continue' | null | undefined+ output_variable?:+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }[]+ | null+ | undefined+ type: 'random_cohort_branch'+ updated_at?: number | undefined+ }+ | {+ config: {+ delay_duration: string+ }+ created_at?: number | undefined+ description: string+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ id: string+ name: string+ on_error?: 'abort' | 'continue' | null | undefined+ output_variable?:+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }[]+ | null+ | undefined+ type: 'delay'+ updated_at?: number | undefined+ }+ | {+ config: {+ reason?: string | undefined+ }+ created_at?: number | undefined+ description: string+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ id: string+ name: string+ on_error?: 'abort' | 'continue' | null | undefined+ output_variable?:+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }[]+ | null+ | undefined+ type: 'exit'+ updated_at?: number | undefined+ }+ | {+ config: {+ conditions: {+ filters: {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ name?: string | undefined+ }[]+ delay_duration?: string | undefined+ }+ created_at?: number | undefined+ description: string+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ id: string+ name: string+ on_error?: 'abort' | 'continue' | null | undefined+ output_variable?:+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }[]+ | null+ | undefined+ type: 'conditional_branch'+ updated_at?: number | undefined+ }+ | {+ config: {+ condition: {+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ name?: string | undefined+ }+ events?:+ | {+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ name?: string | undefined+ }[]+ | undefined+ max_wait_duration: string+ }+ created_at?: number | undefined+ description: string+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ id: string+ name: string+ on_error?: 'abort' | 'continue' | null | undefined+ output_variable?:+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }[]+ | null+ | undefined+ type: 'wait_until_condition'+ updated_at?: number | undefined+ }+ | {+ config: {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ mappings?:+ | {+ disabled?: boolean | undefined+ filters?: any+ inputs?:+ | Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ | null+ | undefined+ inputs_schema?:+ | {+ choices?:+ | {+ label: string+ value: string+ }[]+ | undefined+ default?: any+ description?: string | undefined+ hidden?: boolean | undefined+ integration?: string | undefined+ integration_field?: string | undefined+ integration_key?: string | undefined+ key: string+ label: string+ required?: boolean | undefined+ requiredScopes?: string | undefined+ requires_field?: string | undefined+ secret?: boolean | undefined+ templating?: boolean | undefined+ type:+ | 'boolean'+ | 'choice'+ | 'customer_analytics_account_properties'+ | 'customer_analytics_account_relationships'+ | 'dictionary'+ | 'email'+ | 'integration'+ | 'integration_field'+ | 'integration_multi'+ | 'json'+ | 'native_email'+ | 'non_failure_status_codes'+ | 'number'+ | 'posthog_assignee'+ | 'posthog_business_hours'+ | 'posthog_ticket_tags'+ | 'string'+ }[]+ | undefined+ name: string+ }[]+ | undefined+ template_id: string+ template_uuid?: string | undefined+ }+ created_at?: number | undefined+ description: string+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ id: string+ name: string+ on_error?: 'abort' | 'continue' | null | undefined+ output_variable?:+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }[]+ | null+ | undefined+ type: 'function'+ updated_at?: number | undefined+ }+ | {+ config: {+ day:+ | (+ | 'friday'+ | 'monday'+ | 'saturday'+ | 'sunday'+ | 'thursday'+ | 'tuesday'+ | 'wednesday'+ )[]+ | 'any'+ | 'weekday'+ | 'weekend'+ fallback_timezone?: string | null | undefined+ time: [string, string] | 'any'+ timezone: string | null+ use_person_timezone?: boolean | undefined+ }+ created_at?: number | undefined+ description: string+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ id: string+ name: string+ on_error?: 'abort' | 'continue' | null | undefined+ output_variable?:+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }[]+ | null+ | undefined+ type: 'wait_until_time_window'+ updated_at?: number | undefined+ }+ | {+ config: {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ message_category_id?: string | undefined+ message_category_type?: 'marketing' | 'transactional' | undefined+ template_id: 'template-email'+ template_uuid?: string | undefined+ }+ created_at?: number | undefined+ description: string+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ id: string+ name: string+ on_error?: 'abort' | 'continue' | null | undefined+ output_variable?:+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }[]+ | null+ | undefined+ type: 'function_email'+ updated_at?: number | undefined+ }+ | {+ config: {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ message_category_id?: string | undefined+ message_category_type?: 'marketing' | 'transactional' | undefined+ template_id: 'template-native-push'+ template_uuid?: string | undefined+ }+ created_at?: number | undefined+ description: string+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ id: string+ name: string+ on_error?: 'abort' | 'continue' | null | undefined+ output_variable?:+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }[]+ | null+ | undefined+ type: 'function_push'+ updated_at?: number | undefined+ }+ | {+ config: {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ message_category_id?: string | undefined+ message_category_type?: 'marketing' | 'transactional' | undefined+ template_id: 'template-twilio'+ template_uuid?: string | undefined+ }+ created_at?: number | undefined+ description: string+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ id: string+ name: string+ on_error?: 'abort' | 'continue' | null | undefined+ output_variable?:+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }[]+ | null+ | undefined+ type: 'function_sms'+ updated_at?: number | undefined+ }+ | {+ config:+ | {+ type: 'schedule'+ }+ | {+ filters: {+ properties: any[]+ }+ type: 'batch'+ }+ | {+ filters: {+ actions?: any[] | undefined+ events?: any[] | undefined+ filter_test_accounts?: boolean | undefined+ properties?: any[] | undefined+ }+ type: 'event'+ }+ | {+ filters: {+ properties?: any[] | undefined+ }+ key_property?: string | undefined+ table_name: string+ type: 'data-warehouse-table'+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ template_id: string+ template_uuid?: string | undefined+ type: 'manual'+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ template_id: string+ template_uuid?: string | undefined+ type: 'tracking_pixel'+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ template_id: string+ template_uuid?: string | undefined+ type: 'webhook'+ }+ created_at?: number | undefined+ description: string+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ id: string+ name: string+ on_error?: 'abort' | 'continue' | null | undefined+ output_variable?:+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }[]+ | null+ | undefined+ type: 'trigger'+ updated_at?: number | undefined+ }+ )[]+ conversion?:+ | {+ bytecode?: (number | string)[] | undefined+ events?:+ | {+ filters?: any+ name?: string | undefined+ }[]+ | undefined+ filters: any+ window_minutes: number | null+ }+ | undefined+ created_at: string+ created_by?: UserBasicType | null | undefined+ description?: string | undefined+ edges: {+ from: string+ index?: number | undefined+ to: string+ type: 'branch' | 'continue'+ }[]+ exit_condition:+ | 'exit_on_conversion'+ | 'exit_on_trigger_not_matched'+ | 'exit_on_trigger_not_matched_or_conversion'+ | 'exit_only_at_end'+ id: string+ image_url?: string | null | undefined+ name: string+ scope?: 'global' | 'organization' | 'team' | null | undefined+ status: 'draft'+ tags: string[]+ team_id: number+ trigger?:+ | {+ type: 'schedule'+ }+ | {+ filters: {+ properties: any[]+ }+ type: 'batch'+ }+ | {+ filters: {+ actions?: any[] | undefined+ events?: any[] | undefined+ filter_test_accounts?: boolean | undefined+ properties?: any[] | undefined+ }+ type: 'event'+ }+ | {+ filters: {+ properties?: any[] | undefined+ }+ key_property?: string | undefined+ table_name: string+ type: 'data-warehouse-table'+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ template_id: string+ template_uuid?: string | undefined+ type: 'manual'+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ template_id: string+ template_uuid?: string | undefined+ type: 'tracking_pixel'+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ template_id: string+ template_uuid?: string | undefined+ type: 'webhook'+ }+ | undefined+ trigger_masking?:+ | {+ bytecode: (number | string)[]+ hash: string+ threshold: number | null+ ttl: number | null+ }+ | null+ | undefined+ updated_at: string+ variables?:+ | {+ choices?:+ | {+ label: string+ value: string+ }[]+ | undefined+ default?: any+ description?: string | undefined+ hidden?: boolean | undefined+ integration?: string | undefined+ integration_field?: string | undefined+ integration_key?: string | undefined+ key: string+ label: string+ required?: boolean | undefined+ requiredScopes?: string | undefined+ requires_field?: string | undefined+ secret?: boolean | undefined+ templating?: boolean | undefined+ type:+ | 'boolean'+ | 'choice'+ | 'customer_analytics_account_properties'+ | 'customer_analytics_account_relationships'+ | 'dictionary'+ | 'email'+ | 'integration'+ | 'integration_field'+ | 'integration_multi'+ | 'json'+ | 'native_email'+ | 'non_failure_status_codes'+ | 'number'+ | 'posthog_assignee'+ | 'posthog_business_hours'+ | 'posthog_ticket_tags'+ | 'string'+ }[]+ | null+ | undefined+ version: number+ },+ payload?: any+ ) => {+ originalWorkflow:+ | HogFlow+ | {+ abort_action?: string | undefined+ actions: (+ | {+ config: {+ cohorts: {+ name?: string | undefined+ percentage: number+ }[]+ }+ created_at?: number | undefined+ description: string+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ id: string+ name: string+ on_error?: 'abort' | 'continue' | null | undefined+ output_variable?:+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }[]+ | null+ | undefined+ type: 'random_cohort_branch'+ updated_at?: number | undefined+ }+ | {+ config: {+ delay_duration: string+ }+ created_at?: number | undefined+ description: string+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ id: string+ name: string+ on_error?: 'abort' | 'continue' | null | undefined+ output_variable?:+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }[]+ | null+ | undefined+ type: 'delay'+ updated_at?: number | undefined+ }+ | {+ config: {+ reason?: string | undefined+ }+ created_at?: number | undefined+ description: string+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ id: string+ name: string+ on_error?: 'abort' | 'continue' | null | undefined+ output_variable?:+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }[]+ | null+ | undefined+ type: 'exit'+ updated_at?: number | undefined+ }+ | {+ config: {+ conditions: {+ filters: {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ name?: string | undefined+ }[]+ delay_duration?: string | undefined+ }+ created_at?: number | undefined+ description: string+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ id: string+ name: string+ on_error?: 'abort' | 'continue' | null | undefined+ output_variable?:+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }[]+ | null+ | undefined+ type: 'conditional_branch'+ updated_at?: number | undefined+ }+ | {+ config: {+ condition: {+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ name?: string | undefined+ }+ events?:+ | {+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ name?: string | undefined+ }[]+ | undefined+ max_wait_duration: string+ }+ created_at?: number | undefined+ description: string+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ id: string+ name: string+ on_error?: 'abort' | 'continue' | null | undefined+ output_variable?:+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }[]+ | null+ | undefined+ type: 'wait_until_condition'+ updated_at?: number | undefined+ }+ | {+ config: {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ mappings?:+ | {+ disabled?: boolean | undefined+ filters?: any+ inputs?:+ | Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ | null+ | undefined+ inputs_schema?:+ | {+ choices?:+ | {+ label: string+ value: string+ }[]+ | undefined+ default?: any+ description?: string | undefined+ hidden?: boolean | undefined+ integration?: string | undefined+ integration_field?: string | undefined+ integration_key?: string | undefined+ key: string+ label: string+ required?: boolean | undefined+ requiredScopes?: string | undefined+ requires_field?: string | undefined+ secret?: boolean | undefined+ templating?: boolean | undefined+ type:+ | 'boolean'+ | 'choice'+ | 'customer_analytics_account_properties'+ | 'customer_analytics_account_relationships'+ | 'dictionary'+ | 'email'+ | 'integration'+ | 'integration_field'+ | 'integration_multi'+ | 'json'+ | 'native_email'+ | 'non_failure_status_codes'+ | 'number'+ | 'posthog_assignee'+ | 'posthog_business_hours'+ | 'posthog_ticket_tags'+ | 'string'+ }[]+ | undefined+ name: string+ }[]+ | undefined+ template_id: string+ template_uuid?: string | undefined+ }+ created_at?: number | undefined+ description: string+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ id: string+ name: string+ on_error?: 'abort' | 'continue' | null | undefined+ output_variable?:+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }[]+ | null+ | undefined+ type: 'function'+ updated_at?: number | undefined+ }+ | {+ config: {+ day:+ | (+ | 'friday'+ | 'monday'+ | 'saturday'+ | 'sunday'+ | 'thursday'+ | 'tuesday'+ | 'wednesday'+ )[]+ | 'any'+ | 'weekday'+ | 'weekend'+ fallback_timezone?: string | null | undefined+ time: [string, string] | 'any'+ timezone: string | null+ use_person_timezone?: boolean | undefined+ }+ created_at?: number | undefined+ description: string+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ id: string+ name: string+ on_error?: 'abort' | 'continue' | null | undefined+ output_variable?:+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }[]+ | null+ | undefined+ type: 'wait_until_time_window'+ updated_at?: number | undefined+ }+ | {+ config: {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ message_category_id?: string | undefined+ message_category_type?: 'marketing' | 'transactional' | undefined+ template_id: 'template-email'+ template_uuid?: string | undefined+ }+ created_at?: number | undefined+ description: string+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ id: string+ name: string+ on_error?: 'abort' | 'continue' | null | undefined+ output_variable?:+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }[]+ | null+ | undefined+ type: 'function_email'+ updated_at?: number | undefined+ }+ | {+ config: {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ message_category_id?: string | undefined+ message_category_type?: 'marketing' | 'transactional' | undefined+ template_id: 'template-native-push'+ template_uuid?: string | undefined+ }+ created_at?: number | undefined+ description: string+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ id: string+ name: string+ on_error?: 'abort' | 'continue' | null | undefined+ output_variable?:+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }[]+ | null+ | undefined+ type: 'function_push'+ updated_at?: number | undefined+ }+ | {+ config: {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ message_category_id?: string | undefined+ message_category_type?: 'marketing' | 'transactional' | undefined+ template_id: 'template-twilio'+ template_uuid?: string | undefined+ }+ created_at?: number | undefined+ description: string+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ id: string+ name: string+ on_error?: 'abort' | 'continue' | null | undefined+ output_variable?:+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }[]+ | null+ | undefined+ type: 'function_sms'+ updated_at?: number | undefined+ }+ | {+ config:+ | {+ type: 'schedule'+ }+ | {+ filters: {+ properties: any[]+ }+ type: 'batch'+ }+ | {+ filters: {+ actions?: any[] | undefined+ events?: any[] | undefined+ filter_test_accounts?: boolean | undefined+ properties?: any[] | undefined+ }+ type: 'event'+ }+ | {+ filters: {+ properties?: any[] | undefined+ }+ key_property?: string | undefined+ table_name: string+ type: 'data-warehouse-table'+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ template_id: string+ template_uuid?: string | undefined+ type: 'manual'+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ template_id: string+ template_uuid?: string | undefined+ type: 'tracking_pixel'+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ template_id: string+ template_uuid?: string | undefined+ type: 'webhook'+ }+ created_at?: number | undefined+ description: string+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ id: string+ name: string+ on_error?: 'abort' | 'continue' | null | undefined+ output_variable?:+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }[]+ | null+ | undefined+ type: 'trigger'+ updated_at?: number | undefined+ }+ )[]+ conversion?:+ | {+ bytecode?: (number | string)[] | undefined+ events?:+ | {+ filters?: any+ name?: string | undefined+ }[]+ | undefined+ filters: any+ window_minutes: number | null+ }+ | undefined+ created_at: string+ created_by?: UserBasicType | null | undefined+ description?: string | undefined+ edges: {+ from: string+ index?: number | undefined+ to: string+ type: 'branch' | 'continue'+ }[]+ exit_condition:+ | 'exit_on_conversion'+ | 'exit_on_trigger_not_matched'+ | 'exit_on_trigger_not_matched_or_conversion'+ | 'exit_only_at_end'+ id: string+ image_url?: string | null | undefined+ name: string+ scope?: 'global' | 'organization' | 'team' | null | undefined+ status: 'draft'+ tags: string[]+ team_id: number+ trigger?:+ | {+ type: 'schedule'+ }+ | {+ filters: {+ properties: any[]+ }+ type: 'batch'+ }+ | {+ filters: {+ actions?: any[] | undefined+ events?: any[] | undefined+ filter_test_accounts?: boolean | undefined+ properties?: any[] | undefined+ }+ type: 'event'+ }+ | {+ filters: {+ properties?: any[] | undefined+ }+ key_property?: string | undefined+ table_name: string+ type: 'data-warehouse-table'+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ template_id: string+ template_uuid?: string | undefined+ type: 'manual'+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ template_id: string+ template_uuid?: string | undefined+ type: 'tracking_pixel'+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ template_id: string+ template_uuid?: string | undefined+ type: 'webhook'+ }+ | undefined+ trigger_masking?:+ | {+ bytecode: (number | string)[]+ hash: string+ threshold: number | null+ ttl: number | null+ }+ | null+ | undefined+ updated_at: string+ variables?:+ | {+ choices?:+ | {+ label: string+ value: string+ }[]+ | undefined+ default?: any+ description?: string | undefined+ hidden?: boolean | undefined+ integration?: string | undefined+ integration_field?: string | undefined+ integration_key?: string | undefined+ key: string+ label: string+ required?: boolean | undefined+ requiredScopes?: string | undefined+ requires_field?: string | undefined+ secret?: boolean | undefined+ templating?: boolean | undefined+ type:+ | 'boolean'+ | 'choice'+ | 'customer_analytics_account_properties'+ | 'customer_analytics_account_relationships'+ | 'dictionary'+ | 'email'+ | 'integration'+ | 'integration_field'+ | 'integration_multi'+ | 'json'+ | 'native_email'+ | 'non_failure_status_codes'+ | 'number'+ | 'posthog_assignee'+ | 'posthog_business_hours'+ | 'posthog_ticket_tags'+ | 'string'+ }[]+ | null+ | undefined+ version: number+ }+ payload?: any+ } // workflowLogic+ setWorkflowAction: (+ actionId: string,+ action: HogFlowAction+ ) => {+ action: HogFlowAction+ actionId: string+ } // workflowLogic+ setWorkflowActionEdges: (+ actionId: string,+ edges: {+ from: string+ index?: number | undefined+ to: string+ type: 'branch' | 'continue'+ }[]+ ) => {+ actionId: string+ edges: {+ from: string+ index?: number | undefined+ to: string+ type: 'branch' | 'continue'+ }[]+ } // workflowLogic+ setWorkflowInfo: (workflow: Partial<HogFlow>) => {+ workflow: Partial<HogFlow>+ } // workflowLogic+ clearAnimatingEdgePair: () => {+ value: true+ }+ copyNodeToHighlightedDropzone: () => {+ value: true+ }+ fitView: (options?: { duration?: number; noZoom?: boolean }) => {+ duration?: number | undefined+ noZoom?: boolean | undefined+ }+ handlePaneClick: () => {+ value: true+ }+ hideDropzones: () => {+ value: true+ }+ loadActionMetricsById: (+ params: Pick<AppMetricsTotalsRequest, 'appSource' | 'appSourceId' | 'dateFrom' | 'dateTo'>,+ timezone: string+ ) => {+ params: Pick<AppMetricsTotalsRequest, 'appSource' | 'appSourceId' | 'dateFrom' | 'dateTo'>+ timezone: string+ }+ loadActionMetricsByIdFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadActionMetricsByIdSuccess: (+ actionMetricsById: Record<string, HogFlowEditorActionMetrics>,+ payload?: {+ params: Pick<AppMetricsTotalsRequest, 'appSource' | 'appSourceId' | 'dateFrom' | 'dateTo'>+ timezone: string+ }+ ) => {+ actionMetricsById: Record<string, HogFlowEditorActionMetrics>+ payload?: {+ params: Pick<AppMetricsTotalsRequest, 'appSource' | 'appSourceId' | 'dateFrom' | 'dateTo'>+ timezone: string+ }+ }+ moveNodeToHighlightedDropzone: () => {+ value: true+ }+ onDragOver: (event: DragEvent) => {+ event: DragEvent<Element>+ }+ onDrop: (event?: DragEvent) => {+ event: DragEvent<Element> | undefined+ }+ onEdgesChange: (edges: EdgeChange<HogFlowActionEdge>[]) => {+ edges: EdgeChange<HogFlowActionEdge>[]+ }+ onNodesChange: (nodes: NodeChange<HogFlowActionNode>[]) => {+ nodes: NodeChange<HogFlowActionNode>[]+ }+ onNodesDelete: (deleted: HogFlowActionNode[]) => {+ deleted: HogFlowActionNode[]+ }+ resetFlowFromHogFlow: (hogFlow: HogFlow) => {+ hogFlow: HogFlow+ }+ setAnimatingEdgePair: (+ from: string,+ to: string+ ) => {+ from: string+ to: string+ }+ setDropzoneNodes: (dropzoneNodes: DropzoneNode[]) => {+ dropzoneNodes: DropzoneNode[]+ }+ setEdges: (edges: HogFlowActionEdge[]) => {+ edges: HogFlowActionEdge[]+ }+ setHighlightedDropzoneNodeId: (highlightedDropzoneNodeId: string | null) => {+ highlightedDropzoneNodeId: string | null+ }+ setMode: (mode: HogFlowEditorMode) => {+ mode: 'build' | 'logs' | 'metrics' | 'test' | 'variables'+ }+ setNodeToBeAdded: (nodeToBeAdded: CreateActionType | HogFlowActionNode | null) => {+ nodeToBeAdded: CreateActionType | HogFlowActionNode | null+ }+ setNodes: (nodes: HogFlowActionNode[]) => {+ nodes: HogFlowActionNode[]+ }+ setNodesRaw: (nodes: HogFlowActionNode[]) => {+ nodes: HogFlowActionNode[]+ }+ setReactFlowInstance: (reactFlowInstance: ReactFlowInstance<Node, Edge>) => {+ reactFlowInstance: ReactFlowInstance<Node, Edge>+ }+ setReactFlowWrapper: (reactFlowWrapper: RefObject<HTMLDivElement>) => {+ reactFlowWrapper: RefObject<HTMLDivElement>+ }+ setSelectedNodeId: (selectedNodeId: string | null) => {+ selectedNodeId: string | null+ }+ showDropzones: () => {+ value: true+ }+ startCopyingNode: (node: HogFlowActionNode) => {+ node: HogFlowActionNode+ }+ startMovingNode: (node: HogFlowActionNode) => {+ node: HogFlowActionNode+ }+ stopCopyingNode: () => {+ value: true+ }+ stopMovingNode: () => {+ value: true+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface hogFlowEditorLogicMeta {+ key: string+ __keaTypeGenInternalSelectorTypes: {+ nodesById: (nodes: HogFlowActionNode[]) => Record<string, HogFlowActionNode>+ selectedNode: (nodes: HogFlowActionNode[], selectedNodeId: string | null) => HogFlowActionNode | null+ selectedNodeCanBeDeleted: (+ selectedNode: HogFlowActionNode | null,+ nodes: HogFlowActionNode[],+ edges: HogFlowActionEdge[]+ ) => boolean+ selectedNodeCanBeCopiedOrMoved: (+ selectedNode: HogFlowActionNode | null,+ selectedNodeCanBeDeleted: boolean+ ) => boolean+ }+}++export type hogFlowEditorLogicType = MakeLogicType<+ hogFlowEditorLogicValues,+ hogFlowEditorLogicActions,+ WorkflowLogicProps,+ hogFlowEditorLogicMeta+>+export const hogFlowEditorLogic = kea<hogFlowEditorLogicType>([props({} as WorkflowLogicProps),path((key) => ['scenes', 'hogflows', 'hogFlowEditorLogic', key]),@@ -302,7 +2078,7 @@ export const hogFlowEditorLogic = kea<hogFlowEditorLogicType>([selectors({nodesById: [(s) => [s.nodes],- (nodes): Record<string, HogFlowActionNode> => {+ (nodes: HogFlowActionNode[]): Record<string, HogFlowActionNode> => {return nodes.reduce((acc, node) => {acc[node.id] = node@@ -314,13 +2090,13 @@ export const hogFlowEditorLogic = kea<hogFlowEditorLogicType>([],selectedNode: [(s) => [s.nodes, s.selectedNodeId],- (nodes, selectedNodeId) => {+ (nodes: HogFlowActionNode[], selectedNodeId: string | null) => {return nodes.find((node) => node.id === selectedNodeId) ?? null},],selectedNodeCanBeDeleted: [(s) => [s.selectedNode, s.nodes, s.edges],- (selectedNode, nodes, edges) => {+ (selectedNode: HogFlowActionNode | null, nodes: HogFlowActionNode[], edges: HogFlowActionEdge[]) => {if (!selectedNode) {return false}@@ -335,7 +2111,7 @@ export const hogFlowEditorLogic = kea<hogFlowEditorLogicType>([],selectedNodeCanBeCopiedOrMoved: [(s) => [s.selectedNode, s.selectedNodeCanBeDeleted],- (selectedNode, selectedNodeCanBeDeleted) => {+ (selectedNode: HogFlowActionNode | null, selectedNodeCanBeDeleted: boolean) => {if (!selectedNodeCanBeDeleted) {return false}diff --git a/products/workflows/frontend/Workflows/hogflows/panel/hogFlowOutputMappingLogic.ts b/products/workflows/frontend/Workflows/hogflows/panel/hogFlowOutputMappingLogic.tsindex d24890b26753..ab10a5932450 100644--- a/products/workflows/frontend/Workflows/hogflows/panel/hogFlowOutputMappingLogic.ts+++ b/products/workflows/frontend/Workflows/hogflows/panel/hogFlowOutputMappingLogic.ts@@ -1,15 +1,16 @@-import { actions, connect, kea, key, listeners, path, props, reducers, selectors } from 'kea'+import { MakeLogicType, actions, connect, kea, key, listeners, path, props, reducers, selectors } from 'kea'import { loaders } from 'kea-loaders'import api from 'lib/api'+import type { CyclotronJobInvocationGlobals, HogFunctionTemplateType } from '../../../../../../frontend/src/types'import { WorkflowLogicProps, sanitizeWorkflow, workflowLogic } from '../../workflowLogic'import { OutputMappingSuggestion } from '../hogFlowEditorLogic'import { hogFlowEditorLogic } from '../hogFlowEditorLogic'import { getRegisteredActionNodeCategories } from '../registry/actions/actionNodeRegistry'import type { HogflowTestResult } from '../steps/types'import type { HogFlowAction } from '../types'-import type { hogFlowOutputMappingLogicType } from './hogFlowOutputMappingLogicType'+import type { HogFlow, HogFlowActionNode } from '../types'import { createExampleEvent, hogFlowEditorTestLogic } from './testing/hogFlowEditorTestLogic'export type OutputMapping = { key: string; result_path: string; spread?: boolean | null }@@ -27,6 +28,120 @@ export function normalizeOutputVariable(raw: HogFlowAction['output_variable']):return []}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface hogFlowOutputMappingLogicValues {+ selectedNode: HogFlowActionNode | null // hogFlowEditorLogic+ accumulatedVariables: Record<string, any> // hogFlowEditorTestLogic+ sampleGlobals: CyclotronJobInvocationGlobals | null // hogFlowEditorTestLogic+ hogFunctionTemplatesById: Record<string, HogFunctionTemplateType> // workflowLogic+ workflow: HogFlow // workflowLogic+ mappings: OutputMapping[]+ pendingPath: string | null+ pendingSuggestions: OutputMappingSuggestion[]+ selectedAction: HogFlowAction | null+ selectedActionId: string | null+ shakePickButton: boolean+ suggestions: OutputMappingSuggestion[]+ suggestionsLoading: boolean+ testError: string | null+ testLoading: boolean+ testResultData: unknown | null+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface hogFlowOutputMappingLogicActions {+ addMapping: () => {+ value: true+ }+ applySuggestion: (suggestion: OutputMappingSuggestion) => {+ suggestion: OutputMappingSuggestion+ }+ assignPendingPathToMapping: (+ index: number,+ path: string+ ) => {+ index: number+ path: string+ }+ cancelPendingPath: () => {+ value: true+ }+ initMappings: (mappings: OutputMapping[]) => {+ mappings: OutputMapping[]+ }+ loadSuggestions: (_: any) => any+ loadSuggestionsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadSuggestionsSuccess: (+ suggestions: OutputMappingSuggestion[],+ payload?: any+ ) => {+ suggestions: OutputMappingSuggestion[]+ payload?: any+ }+ removeMapping: (index: number) => {+ index: number+ }+ runOutputTest: () => {+ value: true+ }+ selectPath: (path: string) => {+ path: string+ }+ setMappings: (mappings: OutputMapping[]) => {+ mappings: OutputMapping[]+ }+ setSelectedActionId: (actionId: string | null) => {+ actionId: string | null+ }+ setShakePickButton: (shake: boolean) => {+ shake: boolean+ }+ setTestError: (error: string | null) => {+ error: string | null+ }+ setTestLoading: (loading: boolean) => {+ loading: boolean+ }+ setTestResultData: (data: unknown | null) => {+ data: unknown+ }+ triggerShake: () => {+ value: true+ }+ updateMappingResultPath: (+ index: number,+ path: string+ ) => {+ index: number+ path: string+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface hogFlowOutputMappingLogicMeta {+ key: string+ __keaTypeGenInternalSelectorTypes: {+ selectedAction: (selectedNode: HogFlowActionNode | null) => HogFlowAction | null+ pendingSuggestions: (+ suggestions: OutputMappingSuggestion[],+ mappings: OutputMapping[]+ ) => OutputMappingSuggestion[]+ }+}++export type hogFlowOutputMappingLogicType = MakeLogicType<+ hogFlowOutputMappingLogicValues,+ hogFlowOutputMappingLogicActions,+ WorkflowLogicProps,+ hogFlowOutputMappingLogicMeta+>+export const hogFlowOutputMappingLogic = kea<hogFlowOutputMappingLogicType>([path((key) => ['products',@@ -161,10 +276,13 @@ export const hogFlowOutputMappingLogic = kea<hogFlowOutputMappingLogicType>([],}),selectors({- selectedAction: [(s) => [s.selectedNode], (selectedNode) => selectedNode?.data ?? null],+ selectedAction: [+ (s) => [s.selectedNode],+ (selectedNode: null | import('../types').HogFlowActionNode) => selectedNode?.data ?? null,+ ],pendingSuggestions: [(s) => [s.suggestions, s.mappings],- (suggestions, mappings): OutputMappingSuggestion[] => {+ (suggestions: OutputMappingSuggestion[], mappings: OutputMapping[]): OutputMappingSuggestion[] => {const usedResultPaths = new Set(mappings.map((m) => m.result_path).filter(Boolean))const usedKeys = new Set(mappings.map((m) => m.key).filter(Boolean))return suggestions.filter((s) => !usedResultPaths.has(s.result_path) && !usedKeys.has(s.key))diff --git a/products/workflows/frontend/Workflows/hogflows/panel/testing/hogFlowEditorNotificationTestLogic.ts b/products/workflows/frontend/Workflows/hogflows/panel/testing/hogFlowEditorNotificationTestLogic.tsindex 713b9d501fb8..4be9699706b6 100644--- a/products/workflows/frontend/Workflows/hogflows/panel/testing/hogFlowEditorNotificationTestLogic.ts+++ b/products/workflows/frontend/Workflows/hogflows/panel/testing/hogFlowEditorNotificationTestLogic.ts@@ -1,5 +1,6 @@-import { actions, afterMount, connect, kea, key, listeners, path, props, reducers } from 'kea'+import { MakeLogicType, actions, afterMount, connect, kea, key, listeners, path, props, reducers } from 'kea'import { forms } from 'kea-forms'+import type { DeepPartial, DeepPartialMap, FieldName, ValidationErrorType } from 'kea-forms'import { loaders } from 'kea-loaders'import { lemonToast } from '@posthog/lemon-ui'@@ -16,13 +17,181 @@ import { CyclotronJobInvocationGlobals, FilterLogicalOperator, PersonType, Propeimport { WorkflowLogicProps, workflowLogic } from '../../../workflowLogic'import { hogFlowEditorLogic } from '../../hogFlowEditorLogic'import { HogflowTestResult } from '../../steps/types'-import type { hogFlowEditorNotificationTestLogicType } from './hogFlowEditorNotificationTestLogicType'+import type { HogFlow } from '../../types'import { createExampleEvent, createGlobalsFromResponse } from './hogFlowEditorTestLogic'import type { HogflowTestInvocation } from './hogFlowEditorTestLogic'// Time range constants for event searchconst STANDARD_SEARCH_RANGE = `-7d`+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface hogFlowEditorNotificationTestLogicValues {+ selectedNodeId: string | null // hogFlowEditorLogic+ workflow: HogFlow // workflowLogic+ workflowSanitized: HogFlow // workflowLogic+ emailAddressOverride: string | null+ isTestInvocationSubmitting: boolean+ isTestInvocationValid: boolean+ nextActionId: string | null+ personSearchResults: PersonType[]+ personSearchResultsLoading: boolean+ personSearchTerm: string+ personSelectorOpen: boolean+ sampleGlobals: CyclotronJobInvocationGlobals | null+ sampleGlobalsError: string | null+ sampleGlobalsLoading: boolean+ samplePersons: PersonType[]+ samplePersonsLoading: boolean+ selectedPersonDistinctId: string | null+ showTestInvocationErrors: boolean+ testInvocation: HogflowTestInvocation+ testInvocationAllErrors: Record<string, any>+ testInvocationChanged: boolean+ testInvocationErrors: DeepPartialMap<HogflowTestInvocation, ValidationErrorType>+ testInvocationHasErrors: boolean+ testInvocationManualErrors: Record<string, any>+ testInvocationTouched: boolean+ testInvocationTouches: Record<string, boolean>+ testInvocationValidationErrors: DeepPartialMap<HogflowTestInvocation, ValidationErrorType>+ testResult: HogflowTestResult | null+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface hogFlowEditorNotificationTestLogicActions {+ setSelectedNodeId: (selectedNodeId: string | null) => {+ selectedNodeId: string | null+ } // hogFlowEditorLogic+ clearPersonSearch: () => {+ value: true+ }+ loadSamplePersonByDistinctId: (payload: { distinctId: string }) => {+ distinctId: string+ }+ loadSamplePersonByDistinctIdFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject: any+ }+ loadSamplePersonByDistinctIdSuccess: (sampleGlobals: CyclotronJobInvocationGlobals | null) => {+ sampleGlobals: CyclotronJobInvocationGlobals | null+ }+ loadSamplePersons: () => {+ value: true+ }+ loadSamplePersonsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadSamplePersonsSuccess: (+ samplePersons: PersonType[],+ payload?: {+ value: true+ }+ ) => {+ samplePersons: PersonType[]+ payload?: {+ value: true+ }+ }+ resetTestInvocation: (values?: HogflowTestInvocation) => {+ values?: HogflowTestInvocation+ }+ searchPersons: (searchTerm: string) => {+ searchTerm: string+ }+ searchPersonsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ searchPersonsSuccess: (+ personSearchResults: PersonType[],+ payload?: {+ searchTerm: string+ }+ ) => {+ personSearchResults: PersonType[]+ payload?: {+ searchTerm: string+ }+ }+ setEmailAddressOverride: (email: string) => {+ email: string+ }+ setNextActionId: (nextActionId: string | null) => {+ nextActionId: string | null+ }+ setPersonSearchTerm: (term: string) => {+ term: string+ }+ setPersonSelectorOpen: (open: boolean) => {+ open: boolean+ }+ setSampleGlobals: (globals?: string | null) => {+ globals: string | null+ }+ setSampleGlobalsError: (error: string | null) => {+ error: string | null+ }+ setSelectedPersonDistinctId: (distinctId: string | null) => {+ distinctId: string | null+ }+ setTestInvocationManualErrors: (errors: Record<string, any>) => {+ errors: Record<string, any>+ }+ setTestInvocationValue: (+ key: FieldName,+ value: any+ ) => {+ name: FieldName+ value: any+ }+ setTestInvocationValues: (values: DeepPartial<HogflowTestInvocation>) => {+ values: DeepPartial<HogflowTestInvocation>+ }+ setTestResult: (testResult: HogflowTestResult | null) => {+ testResult: HogflowTestResult | null+ }+ submitTestInvocation: () => {+ value: boolean+ }+ submitTestInvocationFailure: (+ error: Error,+ errors: Record<string, any>+ ) => {+ error: Error+ errors: Record<string, any>+ }+ submitTestInvocationRequest: (testInvocation: HogflowTestInvocation) => {+ testInvocation: HogflowTestInvocation+ }+ submitTestInvocationSuccess: (testInvocation: HogflowTestInvocation) => {+ testInvocation: HogflowTestInvocation+ }+ touchTestInvocationField: (key: string) => {+ key: string+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface hogFlowEditorNotificationTestLogicMeta {+ key: string+}++export type hogFlowEditorNotificationTestLogicType = MakeLogicType<+ hogFlowEditorNotificationTestLogicValues,+ hogFlowEditorNotificationTestLogicActions,+ WorkflowLogicProps,+ hogFlowEditorNotificationTestLogicMeta+>+export const hogFlowEditorNotificationTestLogic = kea<hogFlowEditorNotificationTestLogicType>([path((key) => ['products',diff --git a/products/workflows/frontend/Workflows/hogflows/panel/testing/hogFlowEditorTestLogic.ts b/products/workflows/frontend/Workflows/hogflows/panel/testing/hogFlowEditorTestLogic.tsindex cdccd737e930..5cf309e567f4 100644--- a/products/workflows/frontend/Workflows/hogflows/panel/testing/hogFlowEditorTestLogic.ts+++ b/products/workflows/frontend/Workflows/hogflows/panel/testing/hogFlowEditorTestLogic.ts@@ -1,6 +1,7 @@import { deepEqual as equal } from 'fast-equals'-import { actions, afterMount, connect, kea, key, listeners, path, props, reducers, selectors } from 'kea'+import { MakeLogicType, actions, afterMount, connect, kea, key, listeners, path, props, reducers, selectors } from 'kea'import { forms } from 'kea-forms'+import type { DeepPartial, DeepPartialMap, FieldName, ValidationErrorType } from 'kea-forms'import { loaders } from 'kea-loaders'import { lemonToast } from '@posthog/lemon-ui'@@ -26,9 +27,10 @@ import {} from '~/types'import { WorkflowLogicProps, workflowLogic } from '../../../workflowLogic'+import type { TriggerAction } from '../../../workflowLogic'import { hogFlowEditorLogic } from '../../hogFlowEditorLogic'import { HogflowTestResult } from '../../steps/types'-import type { hogFlowEditorTestLogicType } from './hogFlowEditorTestLogicType'+import type { HogFlow } from '../../types'// Time range constants for event searchconst STANDARD_SEARCH_DAYS = 7@@ -168,6 +170,416 @@ export const createGlobalsFromResponse = (}}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface hogFlowEditorTestLogicValues {+ groupsEnabled: boolean // groupsAccessLogic+ groupTypes: Map<GroupTypeIndex, GroupType> // groupsModel+ selectedNodeId: string | null // hogFlowEditorLogic+ triggerAction: TriggerAction | null // workflowLogic+ workflow: HogFlow // workflowLogic+ workflowSanitized: HogFlow // workflowLogic+ accumulatedVariables: Record<string, any>+ canTryExtendedSearch: boolean+ eventPanelOpen: string[]+ eventSelectorOpen: boolean+ fetchCancelled: boolean+ groupTypesForTest: Map<GroupTypeIndex, GroupType>+ isTestInvocationSubmitting: boolean+ isTestInvocationValid: boolean+ lastSearchedEventName: string | null+ matchingFilters: PropertyGroupFilter+ nextActionId: string | null+ noMatchingEvents: boolean+ sampleGlobals: CyclotronJobInvocationGlobals | null+ sampleGlobalsError: string | null+ sampleGlobalsLoading: boolean+ shouldLoadSampleGlobals: boolean+ showTestInvocationErrors: boolean+ testInvocation: HogflowTestInvocation+ testInvocationAllErrors: Record<string, any>+ testInvocationChanged: boolean+ testInvocationErrors: DeepPartialMap<HogflowTestInvocation, ValidationErrorType>+ testInvocationHasErrors: boolean+ testInvocationManualErrors: Record<string, any>+ testInvocationTouched: boolean+ testInvocationTouches: Record<string, boolean>+ testInvocationValidationErrors: DeepPartialMap<HogflowTestInvocation, ValidationErrorType>+ testResult: HogflowTestResult | null+ testResultMode: 'diff' | 'raw'+ workflowVariableDefaults: Record<string, any>+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface hogFlowEditorTestLogicActions {+ setAnimatingEdgePair: (+ from: string,+ to: string+ ) => {+ from: string+ to: string+ } // hogFlowEditorLogic+ setSelectedNodeId: (selectedNodeId: string | null) => {+ selectedNodeId: string | null+ } // hogFlowEditorLogic+ cancelSampleGlobalsLoading: () => {+ value: true+ }+ loadSampleEventByName: (payload: { eventName: string; extendedSearch?: boolean }) => {+ eventName: string+ extendedSearch: boolean | undefined+ }+ loadSampleEventByNameFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadSampleEventByNameSuccess: (+ sampleGlobals: CyclotronJobInvocationGlobals | null,+ payload?: {+ eventName: string+ extendedSearch: boolean | undefined+ }+ ) => {+ sampleGlobals: CyclotronJobInvocationGlobals | null+ payload?: {+ eventName: string+ extendedSearch: boolean | undefined+ }+ }+ loadSampleGlobals: (payload?: { eventId?: string; extendedSearch?: boolean }) => {+ eventId: string | undefined+ extendedSearch: boolean | undefined+ }+ loadSampleGlobalsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadSampleGlobalsSuccess: (+ sampleGlobals: CyclotronJobInvocationGlobals | null,+ payload?: {+ eventId: string | undefined+ extendedSearch: boolean | undefined+ }+ ) => {+ sampleGlobals: CyclotronJobInvocationGlobals | null+ payload?: {+ eventId: string | undefined+ extendedSearch: boolean | undefined+ }+ }+ receiveExampleGlobals: (globals: object | null) => {+ globals: object | null+ }+ resetAccumulatedVariables: () => {+ value: true+ }+ resetTestInvocation: (values?: HogflowTestInvocation) => {+ values?: HogflowTestInvocation+ }+ setCanTryExtendedSearch: (canTryExtendedSearch: boolean) => {+ canTryExtendedSearch: boolean+ }+ setEventPanelOpen: (eventPanelOpen: string[]) => {+ eventPanelOpen: string[]+ }+ setEventSelectorOpen: (eventSelectorOpen: boolean) => {+ eventSelectorOpen: boolean+ }+ setLastSearchedEventName: (eventName: string | null) => {+ eventName: string | null+ }+ setNextActionId: (nextActionId: string | null) => {+ nextActionId: string | null+ }+ setNoMatchingEvents: (noMatchingEvents: boolean) => {+ noMatchingEvents: boolean+ }+ setSampleGlobals: (globals?: string | null) => {+ globals: string | null | undefined+ }+ setSampleGlobalsError: (error: string | null) => {+ error: string | null+ }+ setTestInvocationManualErrors: (errors: Record<string, any>) => {+ errors: Record<string, any>+ }+ setTestInvocationValue: (+ key: FieldName,+ value: any+ ) => {+ name: FieldName+ value: any+ }+ setTestInvocationValues: (values: DeepPartial<HogflowTestInvocation>) => {+ values: DeepPartial<HogflowTestInvocation>+ }+ setTestResult: (testResult: HogflowTestResult | null) => {+ testResult: HogflowTestResult | null+ }+ setTestResultMode: (mode: 'diff' | 'raw') => {+ mode: 'diff' | 'raw'+ }+ submitTestInvocation: () => {+ value: boolean+ }+ submitTestInvocationFailure: (+ error: Error,+ errors: Record<string, any>+ ) => {+ error: Error+ errors: Record<string, any>+ }+ submitTestInvocationRequest: (testInvocation: HogflowTestInvocation) => {+ testInvocation: HogflowTestInvocation+ }+ submitTestInvocationSuccess: (testInvocation: HogflowTestInvocation) => {+ testInvocation: HogflowTestInvocation+ }+ touchTestInvocationField: (key: string) => {+ key: string+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface hogFlowEditorTestLogicMeta {+ key: string+ __keaTypeGenInternalSelectorTypes: {+ shouldLoadSampleGlobals: (+ triggerAction:+ | ({+ config:+ | {+ type: 'schedule'+ }+ | {+ filters: {+ properties: any[]+ }+ type: 'batch'+ }+ | {+ filters: {+ actions?: any[] | undefined+ events?: any[] | undefined+ filter_test_accounts?: boolean | undefined+ properties?: any[] | undefined+ }+ type: 'event'+ }+ | {+ filters: {+ properties?: any[] | undefined+ }+ key_property?: string | undefined+ table_name: string+ type: 'data-warehouse-table'+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ template_id: string+ template_uuid?: string | undefined+ type: 'manual'+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ template_id: string+ template_uuid?: string | undefined+ type: 'tracking_pixel'+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ template_id: string+ template_uuid?: string | undefined+ type: 'webhook'+ }+ created_at?: number | undefined+ description: string+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ id: string+ name: string+ on_error?: 'abort' | 'continue' | null | undefined+ output_variable?:+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }[]+ | null+ | undefined+ type: 'trigger'+ updated_at?: number | undefined+ } & Record<string, unknown>)+ | null+ ) => boolean+ groupTypesForTest: (+ groupsEnabled: boolean,+ groupTypes: Map<GroupTypeIndex, GroupType>+ ) => Map<GroupTypeIndex, GroupType>+ matchingFilters: (+ triggerAction:+ | ({+ config:+ | {+ type: 'schedule'+ }+ | {+ filters: {+ properties: any[]+ }+ type: 'batch'+ }+ | {+ filters: {+ actions?: any[] | undefined+ events?: any[] | undefined+ filter_test_accounts?: boolean | undefined+ properties?: any[] | undefined+ }+ type: 'event'+ }+ | {+ filters: {+ properties?: any[] | undefined+ }+ key_property?: string | undefined+ table_name: string+ type: 'data-warehouse-table'+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ template_id: string+ template_uuid?: string | undefined+ type: 'manual'+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ template_id: string+ template_uuid?: string | undefined+ type: 'tracking_pixel'+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ template_id: string+ template_uuid?: string | undefined+ type: 'webhook'+ }+ created_at?: number | undefined+ description: string+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ id: string+ name: string+ on_error?: 'abort' | 'continue' | null | undefined+ output_variable?:+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }[]+ | null+ | undefined+ type: 'trigger'+ updated_at?: number | undefined+ } & Record<string, unknown>)+ | null+ ) => PropertyGroupFilter+ workflowVariableDefaults: (workflow: HogFlow) => Record<string, any>+ }+}++export type hogFlowEditorTestLogicType = MakeLogicType<+ hogFlowEditorTestLogicValues,+ hogFlowEditorTestLogicActions,+ WorkflowLogicProps,+ hogFlowEditorTestLogicMeta+>+export const hogFlowEditorTestLogic = kea<hogFlowEditorTestLogicType>([path((key) => ['products', 'workflows', 'frontend', 'Workflows', 'hogflows', 'actions', 'workflowTestLogic', key]),props({} as WorkflowLogicProps),@@ -464,7 +876,7 @@ export const hogFlowEditorTestLogic = kea<hogFlowEditorTestLogicType>([selectors(() => ({shouldLoadSampleGlobals: [(s) => [s.triggerAction],- (triggerAction): boolean => {+ (triggerAction: null | import('../../../workflowLogic').TriggerAction): boolean => {// Only load samples if the trigger is eventreturn !!(triggerAction && triggerAction.config.type === 'event')},@@ -474,12 +886,13 @@ export const hogFlowEditorTestLogic = kea<hogFlowEditorTestLogicType>([// here but never in production).groupTypesForTest: [(s) => [s.groupsEnabled, s.groupTypes],- (groupsEnabled, groupTypes): Map<GroupTypeIndex, GroupType> => (groupsEnabled ? groupTypes : new Map()),+ (groupsEnabled: boolean, groupTypes: Map<GroupTypeIndex, GroupType>): Map<GroupTypeIndex, GroupType> =>+ groupsEnabled ? groupTypes : new Map(),],// TODO(workflows): DRY up matchingFilters with implementation in hogFunctionConfigurationLogicmatchingFilters: [(s) => [s.triggerAction],- (triggerAction): PropertyGroupFilter => {+ (triggerAction: null | import('../../../workflowLogic').TriggerAction): PropertyGroupFilter => {if (!triggerAction || triggerAction.config.type !== 'event') {return {type: FilterLogicalOperator.And,@@ -548,7 +961,7 @@ export const hogFlowEditorTestLogic = kea<hogFlowEditorTestLogicType>([],workflowVariableDefaults: [(s) => [s.workflow],- (workflow): Record<string, any> =>+ (workflow: import('../../types').HogFlow): Record<string, any> =>workflow.variables?.reduce((acc, variable) => {acc[variable.key] = variable.defaultdiff --git a/products/workflows/frontend/Workflows/hogflows/registry/triggers/surveyTriggerLogic.ts b/products/workflows/frontend/Workflows/hogflows/registry/triggers/surveyTriggerLogic.tsindex a2c3c291503c..dbdb00019b94 100644--- a/products/workflows/frontend/Workflows/hogflows/registry/triggers/surveyTriggerLogic.ts+++ b/products/workflows/frontend/Workflows/hogflows/registry/triggers/surveyTriggerLogic.ts@@ -1,4 +1,4 @@-import { actions, afterMount, kea, listeners, path, reducers, selectors } from 'kea'+import { MakeLogicType, actions, afterMount, kea, listeners, path, reducers, selectors } from 'kea'import { loaders } from 'kea-loaders'import { lemonToast } from '@posthog/lemon-ui'@@ -7,10 +7,92 @@ import api from 'lib/api'import { Survey } from '~/types'-import type { surveyTriggerLogicType } from './surveyTriggerLogicType'-const SURVEYS_PAGE_SIZE = 20+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface surveyTriggerLogicValues {+ allSurveys: Survey[]+ filteredSurveys: Survey[]+ hasMoreSurveys: boolean+ moreSurveys: Survey[]+ moreSurveysLoading: boolean+ responseCounts: Record<string, number>+ responseCountsLoading: boolean+ searchTerm: string+ surveys: Survey[]+ surveysLoading: boolean+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface surveyTriggerLogicActions {+ loadMoreSurveys: () => any+ loadMoreSurveysFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadMoreSurveysSuccess: (+ moreSurveys: Survey[],+ payload?: any+ ) => {+ moreSurveys: Survey[]+ payload?: any+ }+ loadResponseCounts: () => any+ loadResponseCountsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadResponseCountsSuccess: (+ responseCounts: {+ [key: string]: number+ },+ payload?: any+ ) => {+ responseCounts: {+ [key: string]: number+ }+ payload?: any+ }+ loadSurveys: () => any+ loadSurveysFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadSurveysSuccess: (+ surveys: Survey[],+ payload?: any+ ) => {+ surveys: Survey[]+ payload?: any+ }+ setSearchTerm: (searchTerm: string) => {+ searchTerm: string+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface surveyTriggerLogicMeta {+ __keaTypeGenInternalSelectorTypes: {+ filteredSurveys: (allSurveys: Survey[], searchTerm: string) => Survey[]+ }+}++export type surveyTriggerLogicType = MakeLogicType<+ surveyTriggerLogicValues,+ surveyTriggerLogicActions,+ Record<string, any>,+ surveyTriggerLogicMeta+>+export const surveyTriggerLogic = kea<surveyTriggerLogicType>([path(['products', 'workflows', 'frontend', 'Workflows', 'hogflows', 'registry', 'triggers', 'surveyTriggerLogic']),actions({diff --git a/products/workflows/frontend/Workflows/hogflows/steps/batchTriggerLogic.ts b/products/workflows/frontend/Workflows/hogflows/steps/batchTriggerLogic.tsindex 1742bbec70d5..ceebc1a6b7ae 100644--- a/products/workflows/frontend/Workflows/hogflows/steps/batchTriggerLogic.ts+++ b/products/workflows/frontend/Workflows/hogflows/steps/batchTriggerLogic.ts@@ -1,4 +1,4 @@-import { actions, afterMount, kea, key, listeners, path, props, propsChanged, reducers } from 'kea'+import { MakeLogicType, actions, afterMount, kea, key, listeners, path, props, propsChanged, reducers } from 'kea'import { loaders } from 'kea-loaders'import api, { ApiError } from 'lib/api'@@ -7,7 +7,6 @@ import { objectsEqual } from 'lib/utils/objects'import { BlastRadiusApi } from 'products/workflows/frontend/generated/api.schemas'import { HogFlowAction } from '../types'-import type { batchTriggerLogicType } from './batchTriggerLogicType'// Matches the default email template's `to.email` value: `{{ person.properties.email }}`, whitespace-tolerant.// Anything else (custom property, computed Liquid, static address) makes the dedupe key diverge from the@@ -35,6 +34,54 @@ export interface BatchTriggerLogicProps {dedupeKey?: 'email'}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface batchTriggerLogicValues {+ blastRadius: BlastRadiusApi | null+ blastRadiusError: string | null+ blastRadiusLoading: boolean+ filters: any+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface batchTriggerLogicActions {+ loadBlastRadius: () => {+ value: true+ }+ loadBlastRadiusFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadBlastRadiusSuccess: (+ blastRadius: BlastRadiusApi | null,+ payload?: {+ value: true+ }+ ) => {+ blastRadius: BlastRadiusApi | null+ payload?: {+ value: true+ }+ }+ setBlastRadiusError: (error: string | null) => {+ error: string | null+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface batchTriggerLogicMeta {+ key: string+}++export type batchTriggerLogicType = MakeLogicType<+ batchTriggerLogicValues,+ batchTriggerLogicActions,+ BatchTriggerLogicProps,+ batchTriggerLogicMeta+>+export const batchTriggerLogic = kea<batchTriggerLogicType>([path(['products', 'workflows', 'frontend', 'Workflows', 'hogflows', 'steps', 'batchTriggerLogic']),props({} as BatchTriggerLogicProps),diff --git a/products/workflows/frontend/Workflows/hogflows/steps/components/stepViewLogic.ts b/products/workflows/frontend/Workflows/hogflows/steps/components/stepViewLogic.tsindex 976deeb03037..3656b0d6f0a0 100644--- a/products/workflows/frontend/Workflows/hogflows/steps/components/stepViewLogic.ts+++ b/products/workflows/frontend/Workflows/hogflows/steps/components/stepViewLogic.ts@@ -1,14 +1,68 @@-import { actions, connect, kea, key, listeners, path, props, propsChanged, reducers } from 'kea'+import { MakeLogicType, actions, connect, kea, key, listeners, path, props, propsChanged, reducers } from 'kea'import { WorkflowLogicProps, workflowLogic } from '../../../workflowLogic'import { HogFlowAction } from '../../types'-import type { stepViewLogicType } from './stepViewLogicType'export type StepViewLogicProps = {action: HogFlowActionworkflowLogicProps: WorkflowLogicProps}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface stepViewLogicValues {+ editDescriptionValue: string+ editNameValue: string+ isEditingDescription: boolean+ isEditingName: boolean+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface stepViewLogicActions {+ setWorkflowAction: (+ actionId: string,+ action: HogFlowAction+ ) => {+ action: HogFlowAction+ actionId: string+ } // workflowLogic+ cancelEditingDescription: () => {+ value: true+ }+ cancelEditingName: () => {+ value: true+ }+ saveDescription: () => {+ value: true+ }+ saveName: () => {+ value: true+ }+ setEditDescriptionValue: (value: string) => {+ value: string+ }+ setEditNameValue: (value: string) => {+ value: string+ }+ startEditingDescription: () => {+ value: true+ }+ startEditingName: () => {+ value: true+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface stepViewLogicMeta {+ key: string+}++export type stepViewLogicType = MakeLogicType<+ stepViewLogicValues,+ stepViewLogicActions,+ StepViewLogicProps,+ stepViewLogicMeta+>+export const stepViewLogic = kea<stepViewLogicType>([path((key) => ['products',diff --git a/products/workflows/frontend/Workflows/hogflows/steps/hogFunctionStepLogic.tsx b/products/workflows/frontend/Workflows/hogflows/steps/hogFunctionStepLogic.tsxindex bdbb565360e1..805ff91a6bd4 100644--- a/products/workflows/frontend/Workflows/hogflows/steps/hogFunctionStepLogic.tsx+++ b/products/workflows/frontend/Workflows/hogflows/steps/hogFunctionStepLogic.tsx@@ -1,13 +1,13 @@import { Node } from '@xyflow/react'-import { kea, key, path, props, propsChanged } from 'kea'+import { MakeLogicType, kea, key, path, props, propsChanged } from 'kea'import { forms } from 'kea-forms'+import type { DeepPartial, DeepPartialMap, FieldName, ValidationErrorType } from 'kea-forms'import { templateToConfiguration } from 'scenes/hog-functions/configuration/hogFunctionConfigurationLogic'import { HogFunctionTemplateType } from '~/types'import { HogFlowAction } from '../types'-import type { hogFunctionStepLogicType } from './hogFunctionStepLogicType'export type StepFunctionNode = Node<Extract<@@ -21,6 +21,202 @@ export interface HogFunctionStepLogicProps {template?: HogFunctionTemplateType}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface hogFunctionStepLogicValues {+ configuration: {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ }+ configurationAllErrors: Record<string, any>+ configurationChanged: boolean+ configurationErrors: DeepPartialMap<+ {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ },+ ValidationErrorType+ >+ configurationHasErrors: boolean+ configurationManualErrors: Record<string, any>+ configurationTouched: boolean+ configurationTouches: Record<string, boolean>+ configurationValidationErrors: DeepPartialMap<+ {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ },+ ValidationErrorType+ >+ isConfigurationSubmitting: boolean+ isConfigurationValid: boolean+ showConfigurationErrors: boolean+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface hogFunctionStepLogicActions {+ resetConfiguration: (values?: {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ }) => {+ values?: {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ }+ }+ setConfigurationManualErrors: (errors: Record<string, any>) => {+ errors: Record<string, any>+ }+ setConfigurationValue: (+ key: FieldName,+ value: any+ ) => {+ name: FieldName+ value: any+ }+ setConfigurationValues: (+ values: DeepPartial<{+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ }>+ ) => {+ values: DeepPartial<{+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ }>+ }+ submitConfiguration: () => {+ value: boolean+ }+ submitConfigurationFailure: (+ error: Error,+ errors: Record<string, any>+ ) => {+ error: Error+ errors: Record<string, any>+ }+ submitConfigurationRequest: (configuration: {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ }) => {+ configuration: {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ }+ }+ submitConfigurationSuccess: (configuration: {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ }) => {+ configuration: {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ }+ }+ touchConfigurationField: (key: string) => {+ key: string+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface hogFunctionStepLogicMeta {+ key: string+}++export type hogFunctionStepLogicType = MakeLogicType<+ hogFunctionStepLogicValues,+ hogFunctionStepLogicActions,+ HogFunctionStepLogicProps,+ hogFunctionStepLogicMeta+>+export const hogFunctionStepLogic = kea<hogFunctionStepLogicType>([path(['products', 'workflows', 'frontend', 'Workflows', 'hogflows', 'steps']),props({} as HogFunctionStepLogicProps),diff --git a/products/workflows/frontend/Workflows/hogflows/steps/stepDelayLogic.ts b/products/workflows/frontend/Workflows/hogflows/steps/stepDelayLogic.tsindex 167f534f0914..5c79e9592b97 100644--- a/products/workflows/frontend/Workflows/hogflows/steps/stepDelayLogic.ts+++ b/products/workflows/frontend/Workflows/hogflows/steps/stepDelayLogic.ts@@ -1,7 +1,7 @@-import { actions, connect, kea, key, listeners, path, props } from 'kea'+import { MakeLogicType, actions, connect, kea, key, listeners, path, props } from 'kea'import { WorkflowLogicProps, workflowLogic } from '../../workflowLogic'-import type { stepDelayLogicType } from './stepDelayLogicType'+import type { HogFlow, HogFlowAction } from '../types'const DURATION_REGEX = /^(\d*\.?\d*)([dhm])$/const AUTO_DESCRIPTION_REGEX = /^Wait for \d*\.?\d+ (minute|hour|day)s?\.$/@@ -32,6 +32,562 @@ export type StepDelayLogicProps = {workflowLogicProps: WorkflowLogicProps}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface stepDelayLogicValues {+ workflow: HogFlow // workflowLogic+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface stepDelayLogicActions {+ setWorkflowAction: (+ actionId: string,+ action: HogFlowAction+ ) => {+ action: HogFlowAction+ actionId: string+ } // workflowLogic+ setWorkflowActionConfig: (+ actionId: string,+ config:+ | {+ cohorts: {+ name?: string | undefined+ percentage: number+ }[]+ }+ | {+ delay_duration: string+ }+ | {+ reason?: string | undefined+ }+ | {+ type: 'schedule'+ }+ | {+ conditions: {+ filters: {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ name?: string | undefined+ }[]+ delay_duration?: string | undefined+ }+ | {+ filters: {+ properties: any[]+ }+ type: 'batch'+ }+ | {+ filters: {+ actions?: any[] | undefined+ events?: any[] | undefined+ filter_test_accounts?: boolean | undefined+ properties?: any[] | undefined+ }+ type: 'event'+ }+ | {+ condition: {+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ name?: string | undefined+ }+ events?:+ | {+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ name?: string | undefined+ }[]+ | undefined+ max_wait_duration: string+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ mappings?:+ | {+ disabled?: boolean | undefined+ filters?: any+ inputs?:+ | Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ | null+ | undefined+ inputs_schema?:+ | {+ choices?:+ | {+ label: string+ value: string+ }[]+ | undefined+ default?: any+ description?: string | undefined+ hidden?: boolean | undefined+ integration?: string | undefined+ integration_field?: string | undefined+ integration_key?: string | undefined+ key: string+ label: string+ required?: boolean | undefined+ requiredScopes?: string | undefined+ requires_field?: string | undefined+ secret?: boolean | undefined+ templating?: boolean | undefined+ type:+ | 'boolean'+ | 'choice'+ | 'customer_analytics_account_properties'+ | 'customer_analytics_account_relationships'+ | 'dictionary'+ | 'email'+ | 'integration'+ | 'integration_field'+ | 'integration_multi'+ | 'json'+ | 'native_email'+ | 'non_failure_status_codes'+ | 'number'+ | 'posthog_assignee'+ | 'posthog_business_hours'+ | 'posthog_ticket_tags'+ | 'string'+ }[]+ | undefined+ name: string+ }[]+ | undefined+ template_id: string+ template_uuid?: string | undefined+ }+ | {+ filters: {+ properties?: any[] | undefined+ }+ key_property?: string | undefined+ table_name: string+ type: 'data-warehouse-table'+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ template_id: string+ template_uuid?: string | undefined+ type: 'manual'+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ template_id: string+ template_uuid?: string | undefined+ type: 'tracking_pixel'+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ template_id: string+ template_uuid?: string | undefined+ type: 'webhook'+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ message_category_id?: string | undefined+ message_category_type?: 'marketing' | 'transactional' | undefined+ template_id: 'template-email'+ template_uuid?: string | undefined+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ message_category_id?: string | undefined+ message_category_type?: 'marketing' | 'transactional' | undefined+ template_id: 'template-native-push'+ template_uuid?: string | undefined+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ message_category_id?: string | undefined+ message_category_type?: 'marketing' | 'transactional' | undefined+ template_id: 'template-twilio'+ template_uuid?: string | undefined+ }+ | {+ day:+ | ('friday' | 'monday' | 'saturday' | 'sunday' | 'thursday' | 'tuesday' | 'wednesday')[]+ | 'any'+ | 'weekday'+ | 'weekend'+ fallback_timezone?: string | null | undefined+ time: [string, string] | 'any'+ timezone: string | null+ use_person_timezone?: boolean | undefined+ }+ ) => {+ actionId: string+ config:+ | {+ cohorts: {+ name?: string | undefined+ percentage: number+ }[]+ }+ | {+ delay_duration: string+ }+ | {+ reason?: string | undefined+ }+ | {+ type: 'schedule'+ }+ | {+ conditions: {+ filters: {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ name?: string | undefined+ }[]+ delay_duration?: string | undefined+ }+ | {+ filters: {+ properties: any[]+ }+ type: 'batch'+ }+ | {+ filters: {+ actions?: any[] | undefined+ events?: any[] | undefined+ filter_test_accounts?: boolean | undefined+ properties?: any[] | undefined+ }+ type: 'event'+ }+ | {+ condition: {+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ name?: string | undefined+ }+ events?:+ | {+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ name?: string | undefined+ }[]+ | undefined+ max_wait_duration: string+ }+ | {+ filters: {+ properties?: any[] | undefined+ }+ key_property?: string | undefined+ table_name: string+ type: 'data-warehouse-table'+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ mappings?:+ | {+ disabled?: boolean | undefined+ filters?: any+ inputs?:+ | Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ | null+ | undefined+ inputs_schema?:+ | {+ choices?:+ | {+ label: string+ value: string+ }[]+ | undefined+ default?: any+ description?: string | undefined+ hidden?: boolean | undefined+ integration?: string | undefined+ integration_field?: string | undefined+ integration_key?: string | undefined+ key: string+ label: string+ required?: boolean | undefined+ requiredScopes?: string | undefined+ requires_field?: string | undefined+ secret?: boolean | undefined+ templating?: boolean | undefined+ type:+ | 'boolean'+ | 'choice'+ | 'customer_analytics_account_properties'+ | 'customer_analytics_account_relationships'+ | 'dictionary'+ | 'email'+ | 'integration'+ | 'integration_field'+ | 'integration_multi'+ | 'json'+ | 'native_email'+ | 'non_failure_status_codes'+ | 'number'+ | 'posthog_assignee'+ | 'posthog_business_hours'+ | 'posthog_ticket_tags'+ | 'string'+ }[]+ | undefined+ name: string+ }[]+ | undefined+ template_id: string+ template_uuid?: string | undefined+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ template_id: string+ template_uuid?: string | undefined+ type: 'manual'+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ template_id: string+ template_uuid?: string | undefined+ type: 'tracking_pixel'+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ template_id: string+ template_uuid?: string | undefined+ type: 'webhook'+ }+ | {+ day:+ | ('friday' | 'monday' | 'saturday' | 'sunday' | 'thursday' | 'tuesday' | 'wednesday')[]+ | 'any'+ | 'weekday'+ | 'weekend'+ fallback_timezone?: string | null | undefined+ time: [string, string] | 'any'+ timezone: string | null+ use_person_timezone?: boolean | undefined+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ message_category_id?: string | undefined+ message_category_type?: 'marketing' | 'transactional' | undefined+ template_id: 'template-email'+ template_uuid?: string | undefined+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ message_category_id?: string | undefined+ message_category_type?: 'marketing' | 'transactional' | undefined+ template_id: 'template-native-push'+ template_uuid?: string | undefined+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ message_category_id?: string | undefined+ message_category_type?: 'marketing' | 'transactional' | undefined+ template_id: 'template-twilio'+ template_uuid?: string | undefined+ }+ } // workflowLogic+ setDelayWorkflowActionConfig: (+ actionId: string,+ config: {+ delay_duration: string+ }+ ) => {+ actionId: string+ config: {+ delay_duration: string+ }+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface stepDelayLogicMeta {+ key: string+}++export type stepDelayLogicType = MakeLogicType<+ stepDelayLogicValues,+ stepDelayLogicActions,+ StepDelayLogicProps,+ stepDelayLogicMeta+>+export const stepDelayLogic = kea<stepDelayLogicType>([path((key) => ['products', 'workflows', 'frontend', 'Workflows', 'hogflows', 'steps', 'stepDelayLogic', key]),props({} as StepDelayLogicProps),diff --git a/products/workflows/frontend/Workflows/hogflows/steps/stepWaitUntilTimeWindowLogic.ts b/products/workflows/frontend/Workflows/hogflows/steps/stepWaitUntilTimeWindowLogic.tsindex 36221d1a5705..3e30c9ef4db5 100644--- a/products/workflows/frontend/Workflows/hogflows/steps/stepWaitUntilTimeWindowLogic.ts+++ b/products/workflows/frontend/Workflows/hogflows/steps/stepWaitUntilTimeWindowLogic.ts@@ -1,9 +1,9 @@-import { actions, connect, kea, key, listeners, path, props } from 'kea'+import { MakeLogicType, actions, connect, kea, key, listeners, path, props } from 'kea'import { WeekdayType } from '~/types'import { WorkflowLogicProps, workflowLogic } from '../../workflowLogic'-import type { stepWaitUntilTimeWindowLogicType } from './stepWaitUntilTimeWindowLogicType'+import type { HogFlow, HogFlowAction } from '../types'type DayConfig = 'any' | 'weekday' | 'weekend' | WeekdayType[]type TimeConfig = 'any' | [string, string]@@ -87,6 +87,560 @@ export type StepWaitUntilTimeWindowLogicProps = {workflowLogicProps: WorkflowLogicProps}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface stepWaitUntilTimeWindowLogicValues {+ workflow: HogFlow // workflowLogic+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface stepWaitUntilTimeWindowLogicActions {+ partialSetWorkflowActionConfig: (+ actionId: string,+ config: Partial<+ | {+ cohorts: {+ name?: string | undefined+ percentage: number+ }[]+ }+ | {+ delay_duration: string+ }+ | {+ reason?: string | undefined+ }+ | {+ type: 'schedule'+ }+ | {+ conditions: {+ filters: {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ name?: string | undefined+ }[]+ delay_duration?: string | undefined+ }+ | {+ filters: {+ properties: any[]+ }+ type: 'batch'+ }+ | {+ filters: {+ actions?: any[] | undefined+ events?: any[] | undefined+ filter_test_accounts?: boolean | undefined+ properties?: any[] | undefined+ }+ type: 'event'+ }+ | {+ condition: {+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ name?: string | undefined+ }+ events?:+ | {+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ name?: string | undefined+ }[]+ | undefined+ max_wait_duration: string+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ mappings?:+ | {+ disabled?: boolean | undefined+ filters?: any+ inputs?:+ | Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ | null+ | undefined+ inputs_schema?:+ | {+ choices?:+ | {+ label: string+ value: string+ }[]+ | undefined+ default?: any+ description?: string | undefined+ hidden?: boolean | undefined+ integration?: string | undefined+ integration_field?: string | undefined+ integration_key?: string | undefined+ key: string+ label: string+ required?: boolean | undefined+ requiredScopes?: string | undefined+ requires_field?: string | undefined+ secret?: boolean | undefined+ templating?: boolean | undefined+ type:+ | 'boolean'+ | 'choice'+ | 'customer_analytics_account_properties'+ | 'customer_analytics_account_relationships'+ | 'dictionary'+ | 'email'+ | 'integration'+ | 'integration_field'+ | 'integration_multi'+ | 'json'+ | 'native_email'+ | 'non_failure_status_codes'+ | 'number'+ | 'posthog_assignee'+ | 'posthog_business_hours'+ | 'posthog_ticket_tags'+ | 'string'+ }[]+ | undefined+ name: string+ }[]+ | undefined+ template_id: string+ template_uuid?: string | undefined+ }+ | {+ filters: {+ properties?: any[] | undefined+ }+ key_property?: string | undefined+ table_name: string+ type: 'data-warehouse-table'+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ template_id: string+ template_uuid?: string | undefined+ type: 'manual'+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ template_id: string+ template_uuid?: string | undefined+ type: 'tracking_pixel'+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ template_id: string+ template_uuid?: string | undefined+ type: 'webhook'+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ message_category_id?: string | undefined+ message_category_type?: 'marketing' | 'transactional' | undefined+ template_id: 'template-email'+ template_uuid?: string | undefined+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ message_category_id?: string | undefined+ message_category_type?: 'marketing' | 'transactional' | undefined+ template_id: 'template-native-push'+ template_uuid?: string | undefined+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ message_category_id?: string | undefined+ message_category_type?: 'marketing' | 'transactional' | undefined+ template_id: 'template-twilio'+ template_uuid?: string | undefined+ }+ | {+ day:+ | ('friday' | 'monday' | 'saturday' | 'sunday' | 'thursday' | 'tuesday' | 'wednesday')[]+ | 'any'+ | 'weekday'+ | 'weekend'+ fallback_timezone?: string | null | undefined+ time: [string, string] | 'any'+ timezone: string | null+ use_person_timezone?: boolean | undefined+ }+ >+ ) => {+ actionId: string+ config: Partial<+ | {+ cohorts: {+ name?: string | undefined+ percentage: number+ }[]+ }+ | {+ delay_duration: string+ }+ | {+ reason?: string | undefined+ }+ | {+ type: 'schedule'+ }+ | {+ conditions: {+ filters: {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ name?: string | undefined+ }[]+ delay_duration?: string | undefined+ }+ | {+ filters: {+ properties: any[]+ }+ type: 'batch'+ }+ | {+ filters: {+ actions?: any[] | undefined+ events?: any[] | undefined+ filter_test_accounts?: boolean | undefined+ properties?: any[] | undefined+ }+ type: 'event'+ }+ | {+ condition: {+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ name?: string | undefined+ }+ events?:+ | {+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ name?: string | undefined+ }[]+ | undefined+ max_wait_duration: string+ }+ | {+ filters: {+ properties?: any[] | undefined+ }+ key_property?: string | undefined+ table_name: string+ type: 'data-warehouse-table'+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ mappings?:+ | {+ disabled?: boolean | undefined+ filters?: any+ inputs?:+ | Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ | null+ | undefined+ inputs_schema?:+ | {+ choices?:+ | {+ label: string+ value: string+ }[]+ | undefined+ default?: any+ description?: string | undefined+ hidden?: boolean | undefined+ integration?: string | undefined+ integration_field?: string | undefined+ integration_key?: string | undefined+ key: string+ label: string+ required?: boolean | undefined+ requiredScopes?: string | undefined+ requires_field?: string | undefined+ secret?: boolean | undefined+ templating?: boolean | undefined+ type:+ | 'boolean'+ | 'choice'+ | 'customer_analytics_account_properties'+ | 'customer_analytics_account_relationships'+ | 'dictionary'+ | 'email'+ | 'integration'+ | 'integration_field'+ | 'integration_multi'+ | 'json'+ | 'native_email'+ | 'non_failure_status_codes'+ | 'number'+ | 'posthog_assignee'+ | 'posthog_business_hours'+ | 'posthog_ticket_tags'+ | 'string'+ }[]+ | undefined+ name: string+ }[]+ | undefined+ template_id: string+ template_uuid?: string | undefined+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ template_id: string+ template_uuid?: string | undefined+ type: 'manual'+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ template_id: string+ template_uuid?: string | undefined+ type: 'tracking_pixel'+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ template_id: string+ template_uuid?: string | undefined+ type: 'webhook'+ }+ | {+ day:+ | ('friday' | 'monday' | 'saturday' | 'sunday' | 'thursday' | 'tuesday' | 'wednesday')[]+ | 'any'+ | 'weekday'+ | 'weekend'+ fallback_timezone?: string | null | undefined+ time: [string, string] | 'any'+ timezone: string | null+ use_person_timezone?: boolean | undefined+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ message_category_id?: string | undefined+ message_category_type?: 'marketing' | 'transactional' | undefined+ template_id: 'template-email'+ template_uuid?: string | undefined+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ message_category_id?: string | undefined+ message_category_type?: 'marketing' | 'transactional' | undefined+ template_id: 'template-native-push'+ template_uuid?: string | undefined+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ message_category_id?: string | undefined+ message_category_type?: 'marketing' | 'transactional' | undefined+ template_id: 'template-twilio'+ template_uuid?: string | undefined+ }+ >+ } // workflowLogic+ setWorkflowAction: (+ actionId: string,+ action: HogFlowAction+ ) => {+ action: HogFlowAction+ actionId: string+ } // workflowLogic+ partialSetWaitUntilTimeWindowConfig: (+ actionId: string,+ config: WaitUntilTimeWindowConfig+ ) => {+ actionId: string+ config: WaitUntilTimeWindowConfig+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface stepWaitUntilTimeWindowLogicMeta {+ key: string+}++export type stepWaitUntilTimeWindowLogicType = MakeLogicType<+ stepWaitUntilTimeWindowLogicValues,+ stepWaitUntilTimeWindowLogicActions,+ StepWaitUntilTimeWindowLogicProps,+ stepWaitUntilTimeWindowLogicMeta+>+export const stepWaitUntilTimeWindowLogic = kea<stepWaitUntilTimeWindowLogicType>([path((key) => ['products',diff --git a/products/workflows/frontend/Workflows/newWorkflowLogic.ts b/products/workflows/frontend/Workflows/newWorkflowLogic.tsindex 440073a4b736..95306d2fec35 100644--- a/products/workflows/frontend/Workflows/newWorkflowLogic.ts+++ b/products/workflows/frontend/Workflows/newWorkflowLogic.ts@@ -1,10 +1,32 @@-import { actions, kea, listeners, path, reducers } from 'kea'+import { MakeLogicType, actions, kea, listeners, path, reducers } from 'kea'import { actionToUrl, router, urlToAction } from 'kea-router'import { urls } from 'scenes/urls'import type { HogFlowTemplate } from './hogflows/types'-import type { newWorkflowLogicType } from './newWorkflowLogicType'++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface newWorkflowLogicValues {+ newWorkflowModalVisible: boolean+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface newWorkflowLogicActions {+ createEmptyWorkflow: () => {+ value: true+ }+ createWorkflowFromTemplate: (template: HogFlowTemplate) => {+ template: HogFlowTemplate+ }+ hideNewWorkflowModal: () => {+ value: true+ }+ showNewWorkflowModal: () => {+ value: true+ }+}++export type newWorkflowLogicType = MakeLogicType<newWorkflowLogicValues, newWorkflowLogicActions>export const newWorkflowLogic = kea<newWorkflowLogicType>([path(['products', 'workflows', 'frontend', 'newWorkflowLogic']),diff --git a/products/workflows/frontend/Workflows/templates/workflowTemplateLogic.ts b/products/workflows/frontend/Workflows/templates/workflowTemplateLogic.tsindex a4d284be3ff6..027dbba8a4fc 100644--- a/products/workflows/frontend/Workflows/templates/workflowTemplateLogic.ts+++ b/products/workflows/frontend/Workflows/templates/workflowTemplateLogic.ts@@ -1,13 +1,15 @@-import { actions, connect, kea, key, listeners, path, props, reducers, selectors } from 'kea'+import { MakeLogicType, actions, connect, kea, key, listeners, path, props, reducers, selectors } from 'kea'import { forms } from 'kea-forms'+import type { DeepPartial, DeepPartialMap, FieldName, ValidationErrorType } from 'kea-forms'import api from 'lib/api'import { lemonToast } from 'lib/lemon-ui/LemonToast'import { userLogic } from 'scenes/userLogic'+import type { UserType } from '../../../../../frontend/src/types'import type { HogFlowTemplate } from '../hogflows/types'+import type { HogFlow } from '../hogflows/types'import { workflowLogic } from '../workflowLogic'-import type { workflowTemplateLogicType } from './workflowTemplateLogicType'import { workflowTemplatesLogic } from './workflowTemplatesLogic'export interface WorkflowTemplateLogicProps {@@ -16,6 +18,184 @@ export interface WorkflowTemplateLogicProps {editTemplateId?: string}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface workflowTemplateLogicValues {+ user: UserType | null // userLogic+ workflow: HogFlow // workflowLogic+ editTemplateId: string | undefined+ isEditMode: boolean+ isTemplateFormSubmitting: boolean+ isTemplateFormValid: boolean+ saveAsTemplateModalVisible: boolean+ showTemplateFormErrors: boolean+ templateForm: {+ description: string+ image_url: string | null+ name: string+ scope: 'global' | 'organization' | 'team'+ tags: string[]+ }+ templateFormAllErrors: Record<string, any>+ templateFormChanged: boolean+ templateFormErrors: DeepPartialMap<+ {+ description: string+ image_url: string | null+ name: string+ scope: 'global' | 'organization' | 'team'+ tags: string[]+ },+ ValidationErrorType+ >+ templateFormHasErrors: boolean+ templateFormManualErrors: Record<string, any>+ templateFormTouched: boolean+ templateFormTouches: Record<string, boolean>+ templateFormValidationErrors: DeepPartialMap<+ {+ description: string+ image_url: string | null+ name: string+ scope: 'global' | 'organization' | 'team'+ tags: string[]+ },+ ValidationErrorType+ >+ templateJson: string+ templateJsonModalVisible: boolean+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface workflowTemplateLogicActions {+ loadWorkflowTemplates: () => any // workflowTemplatesLogic+ hideSaveAsTemplateModal: () => {+ value: true+ }+ hideTemplateJsonModal: () => {+ value: true+ }+ resetTemplateForm: (values?: {+ description: string+ image_url: string | null+ name: string+ scope: 'global' | 'organization' | 'team'+ tags: string[]+ }) => {+ values?: {+ description: string+ image_url: string | null+ name: string+ scope: 'global' | 'organization' | 'team'+ tags: string[]+ }+ }+ setTemplateFormManualErrors: (errors: Record<string, any>) => {+ errors: Record<string, any>+ }+ setTemplateFormValue: (+ key: FieldName,+ value: any+ ) => {+ name: FieldName+ value: any+ }+ setTemplateFormValues: (+ values: DeepPartial<{+ description: string+ image_url: string | null+ name: string+ scope: 'global' | 'organization' | 'team'+ tags: string[]+ }>+ ) => {+ values: DeepPartial<{+ description: string+ image_url: string | null+ name: string+ scope: 'global' | 'organization' | 'team'+ tags: string[]+ }>+ }+ showSaveAsTemplateModal: () => {+ value: true+ }+ showTemplateJsonModal: () => {+ value: true+ }+ submitTemplateForm: () => {+ value: boolean+ }+ submitTemplateFormFailure: (+ error: Error,+ errors: Record<string, any>+ ) => {+ error: Error+ errors: Record<string, any>+ }+ submitTemplateFormRequest: (templateForm: {+ description: string+ image_url: string | null+ name: string+ scope: 'global' | 'organization' | 'team'+ tags: string[]+ }) => {+ templateForm: {+ description: string+ image_url: string | null+ name: string+ scope: 'global' | 'organization' | 'team'+ tags: string[]+ }+ }+ submitTemplateFormSuccess: (templateForm: {+ description: string+ image_url: string | null+ name: string+ scope: 'global' | 'organization' | 'team'+ tags: string[]+ }) => {+ templateForm: {+ description: string+ image_url: string | null+ name: string+ scope: 'global' | 'organization' | 'team'+ tags: string[]+ }+ }+ touchTemplateFormField: (key: string) => {+ key: string+ }+ updateTemplate: (workflowTemplate: HogFlowTemplate) => {+ workflowTemplate: HogFlowTemplate+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface workflowTemplateLogicMeta {+ key: string+ __keaTypeGenInternalSelectorTypes: {+ isEditMode: (arg: WorkflowTemplateLogicProps) => boolean+ editTemplateId: (arg: WorkflowTemplateLogicProps) => string | undefined+ templateJson: (+ workflow: HogFlow,+ templateForm: {+ description: string+ image_url: string | null+ name: string+ scope: 'global' | 'organization' | 'team'+ tags: string[]+ }+ ) => string+ }+}++export type workflowTemplateLogicType = MakeLogicType<+ workflowTemplateLogicValues,+ workflowTemplateLogicActions,+ WorkflowTemplateLogicProps,+ workflowTemplateLogicMeta+>+export const workflowTemplateLogic = kea<workflowTemplateLogicType>([path(['products', 'workflows', 'frontend', 'Workflows', 'workflowTemplateLogic']),props({ id: 'new' } as WorkflowTemplateLogicProps),@@ -131,7 +311,16 @@ export const workflowTemplateLogic = kea<workflowTemplateLogicType>([],templateJson: [(s) => [s.workflow, s.templateForm],- (workflow, templateForm): string => {+ (+ workflow: import('../hogflows/types').HogFlow,+ templateForm: {+ description: string+ image_url: string | null+ name: string+ scope: 'global' | 'organization' | 'team'+ tags: string[]+ }+ ): string => {if (!workflow) {return ''}diff --git a/products/workflows/frontend/Workflows/templates/workflowTemplatesLogic.ts b/products/workflows/frontend/Workflows/templates/workflowTemplatesLogic.tsindex f124af681820..e60725bd13e5 100644--- a/products/workflows/frontend/Workflows/templates/workflowTemplatesLogic.ts+++ b/products/workflows/frontend/Workflows/templates/workflowTemplatesLogic.ts@@ -1,4 +1,4 @@-import { actions, afterMount, kea, path, reducers, selectors } from 'kea'+import { MakeLogicType, actions, afterMount, kea, path, reducers, selectors } from 'kea'import { loaders } from 'kea-loaders'import { actionToUrl, router, urlToAction } from 'kea-router'@@ -6,7 +6,84 @@ import api from 'lib/api'import { createFuse, Fuse } from 'lib/utils/fuseSearch'import type { HogFlowTemplate } from '../hogflows/types'-import type { workflowTemplatesLogicType } from './workflowTemplatesLogicType'++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface workflowTemplatesLogicValues {+ availableTags: string[]+ filteredTemplates: HogFlowTemplate[]+ tagFilter: string | null+ templateFilter: string+ workflowTemplateFuse: Fuse<HogFlowTemplate>+ workflowTemplates: HogFlowTemplate[]+ workflowTemplatesLoading: boolean+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface workflowTemplatesLogicActions {+ deleteHogflowTemplate: (template: HogFlowTemplate) => {+ template: HogFlowTemplate+ }+ deleteHogflowTemplateFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ deleteHogflowTemplateSuccess: (+ workflowTemplates: HogFlowTemplate[],+ payload?: {+ template: HogFlowTemplate+ }+ ) => {+ workflowTemplates: HogFlowTemplate[]+ payload?: {+ template: HogFlowTemplate+ }+ }+ loadWorkflowTemplates: () => any+ loadWorkflowTemplatesFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadWorkflowTemplatesSuccess: (+ workflowTemplates: HogFlowTemplate[],+ payload?: any+ ) => {+ workflowTemplates: HogFlowTemplate[]+ payload?: any+ }+ setTagFilter: (tag: string | null) => {+ tag: string | null+ }+ setTemplateFilter: (search: string) => {+ search: string+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface workflowTemplatesLogicMeta {+ __keaTypeGenInternalSelectorTypes: {+ workflowTemplateFuse: (workflowTemplates: HogFlowTemplate[]) => Fuse<HogFlowTemplate>+ filteredTemplates: (+ workflowTemplates: HogFlowTemplate[],+ templateFilter: string,+ tagFilter: string | null,+ workflowTemplateFuse: Fuse<HogFlowTemplate>+ ) => HogFlowTemplate[]+ availableTags: (workflowTemplates: HogFlowTemplate[]) => string[]+ }+}++export type workflowTemplatesLogicType = MakeLogicType<+ workflowTemplatesLogicValues,+ workflowTemplatesLogicActions,+ Record<string, any>,+ workflowTemplatesLogicMeta+>export const workflowTemplatesLogic = kea<workflowTemplatesLogicType>([path(['products', 'workflows', 'frontend', 'Workflows', 'workflowTemplatesLogic']),diff --git a/products/workflows/frontend/Workflows/workflowAssetsLogic.ts b/products/workflows/frontend/Workflows/workflowAssetsLogic.tsindex 9adf2c99e0e0..3b5ce41487a3 100644--- a/products/workflows/frontend/Workflows/workflowAssetsLogic.ts+++ b/products/workflows/frontend/Workflows/workflowAssetsLogic.ts@@ -1,8 +1,7 @@-import { actions, kea, key, listeners, path, props, reducers, selectors } from 'kea'+import { MakeLogicType, actions, kea, key, listeners, path, props, reducers, selectors } from 'kea'import { lazyLoaders } from 'kea-loaders'import { getMessageAssetContentUrl, getMessageAssets, MessageAsset } from './messageAssetsApi'-import type { workflowAssetsLogicType } from './workflowAssetsLogicType'export interface WorkflowAssetsLogicProps {id: string@@ -14,6 +13,58 @@ export interface WorkflowAssetsLogicProps {invocationId?: string}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface workflowAssetsLogicValues {+ assets: MessageAsset[]+ assetsLoading: boolean+ contentUrl: (asset: MessageAsset) => string+ search: string+ selectedAsset: MessageAsset | null+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface workflowAssetsLogicActions {+ closeAsset: () => {+ value: true+ }+ loadAssets: () => any+ loadAssetsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadAssetsSuccess: (+ assets: MessageAsset[],+ payload?: any+ ) => {+ assets: MessageAsset[]+ payload?: any+ }+ openAsset: (asset: MessageAsset) => {+ asset: MessageAsset+ }+ setSearch: (search: string) => {+ search: string+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface workflowAssetsLogicMeta {+ key: string+ __keaTypeGenInternalSelectorTypes: {+ contentUrl: (arg: string) => (asset: MessageAsset) => string+ }+}++export type workflowAssetsLogicType = MakeLogicType<+ workflowAssetsLogicValues,+ workflowAssetsLogicActions,+ WorkflowAssetsLogicProps,+ workflowAssetsLogicMeta+>+export const workflowAssetsLogic = kea<workflowAssetsLogicType>([path(['products', 'workflows', 'frontend', 'Workflows', 'workflowAssetsLogic']),props({ id: 'new' } as WorkflowAssetsLogicProps),@@ -57,7 +108,7 @@ export const workflowAssetsLogic = kea<workflowAssetsLogicType>([selectors({contentUrl: [() => [(_, props) => props.id as string],- (id): ((asset: MessageAsset) => string) => {+ (id: string): ((asset: MessageAsset) => string) => {return (asset: MessageAsset) => getMessageAssetContentUrl(id, asset.invocation_id, asset.action_id)},],diff --git a/products/workflows/frontend/Workflows/workflowLogic.ts b/products/workflows/frontend/Workflows/workflowLogic.tsindex 722abd609cf7..6136f687e407 100644--- a/products/workflows/frontend/Workflows/workflowLogic.ts+++ b/products/workflows/frontend/Workflows/workflowLogic.ts@@ -1,5 +1,6 @@-import { actions, afterMount, connect, kea, key, listeners, path, props, reducers, selectors } from 'kea'+import { MakeLogicType, actions, afterMount, connect, kea, key, listeners, path, props, reducers, selectors } from 'kea'import { DeepPartialMap, ValidationErrorType, forms } from 'kea-forms'+import type { DeepPartial, FieldName } from 'kea-forms'import { lazyLoaders, loaders } from 'kea-loaders'import { beforeUnload, router } from 'kea-router'import posthog from 'posthog-js'@@ -24,6 +25,7 @@ import { AccessControlLevel, HogFunctionTemplateType } from '~/types'import { resourceEditedLogic } from 'products/notifications/frontend/resourceEditedLogic'+import type { ResourceEditedEvent, UserBasicType, UserType } from '../../../../frontend/src/types'import { getRegisteredTriggerTypes } from './hogflows/registry/triggers/triggerTypeRegistry'import {DEFAULT_STATE,@@ -46,7 +48,6 @@ import {type HogFlowEdge,type HogFlowSchedule,} from './hogflows/types'-import type { workflowLogicType } from './workflowLogicType'import { workflowSceneLogic } from './workflowSceneLogic'import { workflowsLogic } from './workflowsLogic'@@ -139,6 +140,2507 @@ export function sanitizeWorkflow(return workflow}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface workflowLogicValues {+ currentProjectId: number | null // projectLogic+ user: UserType | null // userLogic+ actionValidationErrorsById: Record<string, HogFlowActionValidationResult | null>+ autoSaveEnabled: boolean+ currentSchedule: HogFlowSchedule | null+ edgesByActionId: Record<string, HogFlowEdge[]>+ externallyEdited: boolean+ hasUnsavedChanges: boolean+ hogFunctionTemplatesById: Record<string, HogFunctionTemplateType>+ hogFunctionTemplatesByIdLoading: boolean+ isAutoSave: boolean+ isAutoSavePending: boolean+ isRowScopedTrigger: boolean+ isScheduleRepeating: boolean+ isSyncingExternalEdit: boolean+ isWorkflowSubmitting: boolean+ isWorkflowValid: boolean+ lastSavedAt: string | null+ logicProps: WorkflowLogicProps+ originalWorkflow: HogFlow | null+ originalWorkflowLoading: boolean+ pendingSchedule:+ | {+ rrule: string+ starts_at: string+ timezone?: string+ }+ | false+ | null+ saveBaseUpdatedAt: string | null+ scheduleConfigSources: {+ natural_language: boolean+ picker: boolean+ }+ scheduleStartsAt: string | null+ scheduleState: ScheduleState+ scheduleTimezone: string+ schedules: HogFlowSchedule[]+ showWorkflowErrors: boolean+ triggerAction: TriggerAction | null+ workflow: HogFlow+ workflowAllErrors: Record<string, any>+ workflowChanged: boolean+ workflowErrors: DeepPartialMap<HogFlow, ValidationErrorType>+ workflowHasActionErrors: boolean+ workflowHasErrors: boolean+ workflowLoading: boolean+ workflowManualErrors: Record<string, any>+ workflowSanitized: HogFlow+ workflowTouched: boolean+ workflowTouches: Record<string, boolean>+ workflowUserAccessLevel: AccessControlLevel | null+ workflowValidationErrors: DeepPartialMap<HogFlow, ValidationErrorType>+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface workflowLogicActions {+ resourceEdited: (event: ResourceEditedEvent) => {+ event: ResourceEditedEvent+ } // resourceEditedLogic+ archiveWorkflow: (workflow: HogFlow) => {+ workflow: HogFlow+ } // workflowsLogic+ autoSaveWorkflow: () => {+ value: true+ }+ clearAutoSavePending: () => {+ value: true+ }+ discardChanges: () => {+ value: true+ }+ duplicate: () => {+ value: true+ }+ keepMyWorkflowVersion: () => {+ value: true+ }+ loadHogFunctionTemplatesById: () => any+ loadHogFunctionTemplatesByIdFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadHogFunctionTemplatesByIdSuccess: (+ hogFunctionTemplatesById: Record<string, HogFunctionTemplateType>,+ payload?: any+ ) => {+ hogFunctionTemplatesById: Record<string, HogFunctionTemplateType>+ payload?: any+ }+ loadWorkflow: () => any+ loadWorkflowFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadWorkflowSuccess: (+ originalWorkflow:+ | HogFlow+ | {+ abort_action?: string | undefined+ actions: (+ | {+ config: {+ conditions: {+ filters: {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ name?: string | undefined+ }[]+ delay_duration?: string | undefined+ }+ created_at?: number | undefined+ description: string+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ id: string+ name: string+ on_error?: 'abort' | 'continue' | null | undefined+ output_variable?:+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }[]+ | null+ | undefined+ type: 'conditional_branch'+ updated_at?: number | undefined+ }+ | {+ config: {+ delay_duration: string+ }+ created_at?: number | undefined+ description: string+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ id: string+ name: string+ on_error?: 'abort' | 'continue' | null | undefined+ output_variable?:+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }[]+ | null+ | undefined+ type: 'delay'+ updated_at?: number | undefined+ }+ | {+ config: {+ reason?: string | undefined+ }+ created_at?: number | undefined+ description: string+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ id: string+ name: string+ on_error?: 'abort' | 'continue' | null | undefined+ output_variable?:+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }[]+ | null+ | undefined+ type: 'exit'+ updated_at?: number | undefined+ }+ | {+ config: {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ mappings?:+ | {+ disabled?: boolean | undefined+ filters?: any+ inputs?:+ | Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ | null+ | undefined+ inputs_schema?:+ | {+ choices?:+ | {+ label: string+ value: string+ }[]+ | undefined+ default?: any+ description?: string | undefined+ hidden?: boolean | undefined+ integration?: string | undefined+ integration_field?: string | undefined+ integration_key?: string | undefined+ key: string+ label: string+ required?: boolean | undefined+ requiredScopes?: string | undefined+ requires_field?: string | undefined+ secret?: boolean | undefined+ templating?: boolean | undefined+ type:+ | 'boolean'+ | 'choice'+ | 'customer_analytics_account_properties'+ | 'customer_analytics_account_relationships'+ | 'dictionary'+ | 'email'+ | 'integration'+ | 'integration_field'+ | 'integration_multi'+ | 'json'+ | 'native_email'+ | 'non_failure_status_codes'+ | 'number'+ | 'posthog_assignee'+ | 'posthog_business_hours'+ | 'posthog_ticket_tags'+ | 'string'+ }[]+ | undefined+ name: string+ }[]+ | undefined+ template_id: string+ template_uuid?: string | undefined+ }+ created_at?: number | undefined+ description: string+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ id: string+ name: string+ on_error?: 'abort' | 'continue' | null | undefined+ output_variable?:+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }[]+ | null+ | undefined+ type: 'function'+ updated_at?: number | undefined+ }+ | {+ config: {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ message_category_id?: string | undefined+ message_category_type?: 'marketing' | 'transactional' | undefined+ template_id: 'template-email'+ template_uuid?: string | undefined+ }+ created_at?: number | undefined+ description: string+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ id: string+ name: string+ on_error?: 'abort' | 'continue' | null | undefined+ output_variable?:+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }[]+ | null+ | undefined+ type: 'function_email'+ updated_at?: number | undefined+ }+ | {+ config: {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ message_category_id?: string | undefined+ message_category_type?: 'marketing' | 'transactional' | undefined+ template_id: 'template-native-push'+ template_uuid?: string | undefined+ }+ created_at?: number | undefined+ description: string+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ id: string+ name: string+ on_error?: 'abort' | 'continue' | null | undefined+ output_variable?:+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }[]+ | null+ | undefined+ type: 'function_push'+ updated_at?: number | undefined+ }+ | {+ config: {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ message_category_id?: string | undefined+ message_category_type?: 'marketing' | 'transactional' | undefined+ template_id: 'template-twilio'+ template_uuid?: string | undefined+ }+ created_at?: number | undefined+ description: string+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ id: string+ name: string+ on_error?: 'abort' | 'continue' | null | undefined+ output_variable?:+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }[]+ | null+ | undefined+ type: 'function_sms'+ updated_at?: number | undefined+ }+ | {+ config: {+ cohorts: {+ name?: string | undefined+ percentage: number+ }[]+ }+ created_at?: number | undefined+ description: string+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ id: string+ name: string+ on_error?: 'abort' | 'continue' | null | undefined+ output_variable?:+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }[]+ | null+ | undefined+ type: 'random_cohort_branch'+ updated_at?: number | undefined+ }+ | {+ config:+ | {+ type: 'schedule'+ }+ | {+ filters: {+ properties: any[]+ }+ type: 'batch'+ }+ | {+ filters: {+ actions?: any[] | undefined+ events?: any[] | undefined+ filter_test_accounts?: boolean | undefined+ properties?: any[] | undefined+ }+ type: 'event'+ }+ | {+ filters: {+ properties?: any[] | undefined+ }+ key_property?: string | undefined+ table_name: string+ type: 'data-warehouse-table'+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ template_id: string+ template_uuid?: string | undefined+ type: 'manual'+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ template_id: string+ template_uuid?: string | undefined+ type: 'tracking_pixel'+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ template_id: string+ template_uuid?: string | undefined+ type: 'webhook'+ }+ created_at?: number | undefined+ description: string+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ id: string+ name: string+ on_error?: 'abort' | 'continue' | null | undefined+ output_variable?:+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }[]+ | null+ | undefined+ type: 'trigger'+ updated_at?: number | undefined+ }+ | {+ config: {+ condition: {+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ name?: string | undefined+ }+ events?:+ | {+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ name?: string | undefined+ }[]+ | undefined+ max_wait_duration: string+ }+ created_at?: number | undefined+ description: string+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ id: string+ name: string+ on_error?: 'abort' | 'continue' | null | undefined+ output_variable?:+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }[]+ | null+ | undefined+ type: 'wait_until_condition'+ updated_at?: number | undefined+ }+ | {+ config: {+ day:+ | (+ | 'friday'+ | 'monday'+ | 'saturday'+ | 'sunday'+ | 'thursday'+ | 'tuesday'+ | 'wednesday'+ )[]+ | 'any'+ | 'weekday'+ | 'weekend'+ fallback_timezone?: string | null | undefined+ time: [string, string] | 'any'+ timezone: string | null+ use_person_timezone?: boolean | undefined+ }+ created_at?: number | undefined+ description: string+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ id: string+ name: string+ on_error?: 'abort' | 'continue' | null | undefined+ output_variable?:+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }[]+ | null+ | undefined+ type: 'wait_until_time_window'+ updated_at?: number | undefined+ }+ )[]+ conversion?:+ | {+ bytecode?: (number | string)[] | undefined+ events?:+ | {+ filters?: any+ name?: string | undefined+ }[]+ | undefined+ filters: any+ window_minutes: number | null+ }+ | undefined+ created_at: string+ created_by?: UserBasicType | null | undefined+ description?: string | undefined+ edges: {+ from: string+ index?: number | undefined+ to: string+ type: 'branch' | 'continue'+ }[]+ exit_condition:+ | 'exit_on_conversion'+ | 'exit_on_trigger_not_matched'+ | 'exit_on_trigger_not_matched_or_conversion'+ | 'exit_only_at_end'+ id: string+ image_url?: string | null | undefined+ name: string+ scope?: 'global' | 'organization' | 'team' | null | undefined+ status: 'draft'+ tags: string[]+ team_id: number+ trigger?:+ | {+ type: 'schedule'+ }+ | {+ filters: {+ properties: any[]+ }+ type: 'batch'+ }+ | {+ filters: {+ actions?: any[] | undefined+ events?: any[] | undefined+ filter_test_accounts?: boolean | undefined+ properties?: any[] | undefined+ }+ type: 'event'+ }+ | {+ filters: {+ properties?: any[] | undefined+ }+ key_property?: string | undefined+ table_name: string+ type: 'data-warehouse-table'+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ template_id: string+ template_uuid?: string | undefined+ type: 'manual'+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ template_id: string+ template_uuid?: string | undefined+ type: 'tracking_pixel'+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ template_id: string+ template_uuid?: string | undefined+ type: 'webhook'+ }+ | undefined+ trigger_masking?:+ | {+ bytecode: (number | string)[]+ hash: string+ threshold: number | null+ ttl: number | null+ }+ | null+ | undefined+ updated_at: string+ variables?:+ | {+ choices?:+ | {+ label: string+ value: string+ }[]+ | undefined+ default?: any+ description?: string | undefined+ hidden?: boolean | undefined+ integration?: string | undefined+ integration_field?: string | undefined+ integration_key?: string | undefined+ key: string+ label: string+ required?: boolean | undefined+ requiredScopes?: string | undefined+ requires_field?: string | undefined+ secret?: boolean | undefined+ templating?: boolean | undefined+ type:+ | 'boolean'+ | 'choice'+ | 'customer_analytics_account_properties'+ | 'customer_analytics_account_relationships'+ | 'dictionary'+ | 'email'+ | 'integration'+ | 'integration_field'+ | 'integration_multi'+ | 'json'+ | 'native_email'+ | 'non_failure_status_codes'+ | 'number'+ | 'posthog_assignee'+ | 'posthog_business_hours'+ | 'posthog_ticket_tags'+ | 'string'+ }[]+ | null+ | undefined+ version: number+ },+ payload?: any+ ) => {+ originalWorkflow:+ | HogFlow+ | {+ abort_action?: string | undefined+ actions: (+ | {+ config: {+ conditions: {+ filters: {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ name?: string | undefined+ }[]+ delay_duration?: string | undefined+ }+ created_at?: number | undefined+ description: string+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ id: string+ name: string+ on_error?: 'abort' | 'continue' | null | undefined+ output_variable?:+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }[]+ | null+ | undefined+ type: 'conditional_branch'+ updated_at?: number | undefined+ }+ | {+ config: {+ delay_duration: string+ }+ created_at?: number | undefined+ description: string+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ id: string+ name: string+ on_error?: 'abort' | 'continue' | null | undefined+ output_variable?:+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }[]+ | null+ | undefined+ type: 'delay'+ updated_at?: number | undefined+ }+ | {+ config: {+ reason?: string | undefined+ }+ created_at?: number | undefined+ description: string+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ id: string+ name: string+ on_error?: 'abort' | 'continue' | null | undefined+ output_variable?:+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }[]+ | null+ | undefined+ type: 'exit'+ updated_at?: number | undefined+ }+ | {+ config: {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ mappings?:+ | {+ disabled?: boolean | undefined+ filters?: any+ inputs?:+ | Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ | null+ | undefined+ inputs_schema?:+ | {+ choices?:+ | {+ label: string+ value: string+ }[]+ | undefined+ default?: any+ description?: string | undefined+ hidden?: boolean | undefined+ integration?: string | undefined+ integration_field?: string | undefined+ integration_key?: string | undefined+ key: string+ label: string+ required?: boolean | undefined+ requiredScopes?: string | undefined+ requires_field?: string | undefined+ secret?: boolean | undefined+ templating?: boolean | undefined+ type:+ | 'boolean'+ | 'choice'+ | 'customer_analytics_account_properties'+ | 'customer_analytics_account_relationships'+ | 'dictionary'+ | 'email'+ | 'integration'+ | 'integration_field'+ | 'integration_multi'+ | 'json'+ | 'native_email'+ | 'non_failure_status_codes'+ | 'number'+ | 'posthog_assignee'+ | 'posthog_business_hours'+ | 'posthog_ticket_tags'+ | 'string'+ }[]+ | undefined+ name: string+ }[]+ | undefined+ template_id: string+ template_uuid?: string | undefined+ }+ created_at?: number | undefined+ description: string+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ id: string+ name: string+ on_error?: 'abort' | 'continue' | null | undefined+ output_variable?:+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }[]+ | null+ | undefined+ type: 'function'+ updated_at?: number | undefined+ }+ | {+ config: {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ message_category_id?: string | undefined+ message_category_type?: 'marketing' | 'transactional' | undefined+ template_id: 'template-email'+ template_uuid?: string | undefined+ }+ created_at?: number | undefined+ description: string+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ id: string+ name: string+ on_error?: 'abort' | 'continue' | null | undefined+ output_variable?:+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }[]+ | null+ | undefined+ type: 'function_email'+ updated_at?: number | undefined+ }+ | {+ config: {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ message_category_id?: string | undefined+ message_category_type?: 'marketing' | 'transactional' | undefined+ template_id: 'template-native-push'+ template_uuid?: string | undefined+ }+ created_at?: number | undefined+ description: string+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ id: string+ name: string+ on_error?: 'abort' | 'continue' | null | undefined+ output_variable?:+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }[]+ | null+ | undefined+ type: 'function_push'+ updated_at?: number | undefined+ }+ | {+ config: {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ message_category_id?: string | undefined+ message_category_type?: 'marketing' | 'transactional' | undefined+ template_id: 'template-twilio'+ template_uuid?: string | undefined+ }+ created_at?: number | undefined+ description: string+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ id: string+ name: string+ on_error?: 'abort' | 'continue' | null | undefined+ output_variable?:+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }[]+ | null+ | undefined+ type: 'function_sms'+ updated_at?: number | undefined+ }+ | {+ config: {+ cohorts: {+ name?: string | undefined+ percentage: number+ }[]+ }+ created_at?: number | undefined+ description: string+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ id: string+ name: string+ on_error?: 'abort' | 'continue' | null | undefined+ output_variable?:+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }[]+ | null+ | undefined+ type: 'random_cohort_branch'+ updated_at?: number | undefined+ }+ | {+ config:+ | {+ type: 'schedule'+ }+ | {+ filters: {+ properties: any[]+ }+ type: 'batch'+ }+ | {+ filters: {+ actions?: any[] | undefined+ events?: any[] | undefined+ filter_test_accounts?: boolean | undefined+ properties?: any[] | undefined+ }+ type: 'event'+ }+ | {+ filters: {+ properties?: any[] | undefined+ }+ key_property?: string | undefined+ table_name: string+ type: 'data-warehouse-table'+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ template_id: string+ template_uuid?: string | undefined+ type: 'manual'+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ template_id: string+ template_uuid?: string | undefined+ type: 'tracking_pixel'+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ template_id: string+ template_uuid?: string | undefined+ type: 'webhook'+ }+ created_at?: number | undefined+ description: string+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ id: string+ name: string+ on_error?: 'abort' | 'continue' | null | undefined+ output_variable?:+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }[]+ | null+ | undefined+ type: 'trigger'+ updated_at?: number | undefined+ }+ | {+ config: {+ condition: {+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ name?: string | undefined+ }+ events?:+ | {+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ name?: string | undefined+ }[]+ | undefined+ max_wait_duration: string+ }+ created_at?: number | undefined+ description: string+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ id: string+ name: string+ on_error?: 'abort' | 'continue' | null | undefined+ output_variable?:+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }[]+ | null+ | undefined+ type: 'wait_until_condition'+ updated_at?: number | undefined+ }+ | {+ config: {+ day:+ | (+ | 'friday'+ | 'monday'+ | 'saturday'+ | 'sunday'+ | 'thursday'+ | 'tuesday'+ | 'wednesday'+ )[]+ | 'any'+ | 'weekday'+ | 'weekend'+ fallback_timezone?: string | null | undefined+ time: [string, string] | 'any'+ timezone: string | null+ use_person_timezone?: boolean | undefined+ }+ created_at?: number | undefined+ description: string+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ id: string+ name: string+ on_error?: 'abort' | 'continue' | null | undefined+ output_variable?:+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }[]+ | null+ | undefined+ type: 'wait_until_time_window'+ updated_at?: number | undefined+ }+ )[]+ conversion?:+ | {+ bytecode?: (number | string)[] | undefined+ events?:+ | {+ filters?: any+ name?: string | undefined+ }[]+ | undefined+ filters: any+ window_minutes: number | null+ }+ | undefined+ created_at: string+ created_by?: UserBasicType | null | undefined+ description?: string | undefined+ edges: {+ from: string+ index?: number | undefined+ to: string+ type: 'branch' | 'continue'+ }[]+ exit_condition:+ | 'exit_on_conversion'+ | 'exit_on_trigger_not_matched'+ | 'exit_on_trigger_not_matched_or_conversion'+ | 'exit_only_at_end'+ id: string+ image_url?: string | null | undefined+ name: string+ scope?: 'global' | 'organization' | 'team' | null | undefined+ status: 'draft'+ tags: string[]+ team_id: number+ trigger?:+ | {+ type: 'schedule'+ }+ | {+ filters: {+ properties: any[]+ }+ type: 'batch'+ }+ | {+ filters: {+ actions?: any[] | undefined+ events?: any[] | undefined+ filter_test_accounts?: boolean | undefined+ properties?: any[] | undefined+ }+ type: 'event'+ }+ | {+ filters: {+ properties?: any[] | undefined+ }+ key_property?: string | undefined+ table_name: string+ type: 'data-warehouse-table'+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ template_id: string+ template_uuid?: string | undefined+ type: 'manual'+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ template_id: string+ template_uuid?: string | undefined+ type: 'tracking_pixel'+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ template_id: string+ template_uuid?: string | undefined+ type: 'webhook'+ }+ | undefined+ trigger_masking?:+ | {+ bytecode: (number | string)[]+ hash: string+ threshold: number | null+ ttl: number | null+ }+ | null+ | undefined+ updated_at: string+ variables?:+ | {+ choices?:+ | {+ label: string+ value: string+ }[]+ | undefined+ default?: any+ description?: string | undefined+ hidden?: boolean | undefined+ integration?: string | undefined+ integration_field?: string | undefined+ integration_key?: string | undefined+ key: string+ label: string+ required?: boolean | undefined+ requiredScopes?: string | undefined+ requires_field?: string | undefined+ secret?: boolean | undefined+ templating?: boolean | undefined+ type:+ | 'boolean'+ | 'choice'+ | 'customer_analytics_account_properties'+ | 'customer_analytics_account_relationships'+ | 'dictionary'+ | 'email'+ | 'integration'+ | 'integration_field'+ | 'integration_multi'+ | 'json'+ | 'native_email'+ | 'non_failure_status_codes'+ | 'number'+ | 'posthog_assignee'+ | 'posthog_business_hours'+ | 'posthog_ticket_tags'+ | 'string'+ }[]+ | null+ | undefined+ version: number+ }+ payload?: any+ }+ markAutoSave: (isAutoSave: boolean) => {+ isAutoSave: boolean+ }+ partialSetWorkflowActionConfig: (+ actionId: string,+ config: Partial<HogFlowAction['config']>+ ) => {+ actionId: string+ config: Partial<+ | {+ cohorts: {+ name?: string | undefined+ percentage: number+ }[]+ }+ | {+ delay_duration: string+ }+ | {+ reason?: string | undefined+ }+ | {+ type: 'schedule'+ }+ | {+ conditions: {+ filters: {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ name?: string | undefined+ }[]+ delay_duration?: string | undefined+ }+ | {+ filters: {+ properties: any[]+ }+ type: 'batch'+ }+ | {+ filters: {+ actions?: any[] | undefined+ events?: any[] | undefined+ filter_test_accounts?: boolean | undefined+ properties?: any[] | undefined+ }+ type: 'event'+ }+ | {+ condition: {+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ name?: string | undefined+ }+ events?:+ | {+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ name?: string | undefined+ }[]+ | undefined+ max_wait_duration: string+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ mappings?:+ | {+ disabled?: boolean | undefined+ filters?: any+ inputs?:+ | Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ | null+ | undefined+ inputs_schema?:+ | {+ choices?:+ | {+ label: string+ value: string+ }[]+ | undefined+ default?: any+ description?: string | undefined+ hidden?: boolean | undefined+ integration?: string | undefined+ integration_field?: string | undefined+ integration_key?: string | undefined+ key: string+ label: string+ required?: boolean | undefined+ requiredScopes?: string | undefined+ requires_field?: string | undefined+ secret?: boolean | undefined+ templating?: boolean | undefined+ type:+ | 'boolean'+ | 'choice'+ | 'customer_analytics_account_properties'+ | 'customer_analytics_account_relationships'+ | 'dictionary'+ | 'email'+ | 'integration'+ | 'integration_field'+ | 'integration_multi'+ | 'json'+ | 'native_email'+ | 'non_failure_status_codes'+ | 'number'+ | 'posthog_assignee'+ | 'posthog_business_hours'+ | 'posthog_ticket_tags'+ | 'string'+ }[]+ | undefined+ name: string+ }[]+ | undefined+ template_id: string+ template_uuid?: string | undefined+ }+ | {+ filters: {+ properties?: any[] | undefined+ }+ key_property?: string | undefined+ table_name: string+ type: 'data-warehouse-table'+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ template_id: string+ template_uuid?: string | undefined+ type: 'manual'+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ template_id: string+ template_uuid?: string | undefined+ type: 'tracking_pixel'+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ template_id: string+ template_uuid?: string | undefined+ type: 'webhook'+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ message_category_id?: string | undefined+ message_category_type?: 'marketing' | 'transactional' | undefined+ template_id: 'template-email'+ template_uuid?: string | undefined+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ message_category_id?: string | undefined+ message_category_type?: 'marketing' | 'transactional' | undefined+ template_id: 'template-native-push'+ template_uuid?: string | undefined+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ message_category_id?: string | undefined+ message_category_type?: 'marketing' | 'transactional' | undefined+ template_id: 'template-twilio'+ template_uuid?: string | undefined+ }+ | {+ day:+ | ('friday' | 'monday' | 'saturday' | 'sunday' | 'thursday' | 'tuesday' | 'wednesday')[]+ | 'any'+ | 'weekday'+ | 'weekend'+ fallback_timezone?: string | null | undefined+ time: [string, string] | 'any'+ timezone: string | null+ use_person_timezone?: boolean | undefined+ }+ >+ }+ resetWorkflow: (values?: HogFlow) => {+ values?: HogFlow+ }+ saveWorkflow: (updates: HogFlow) => HogFlow+ saveWorkflowFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ saveWorkflowPartial: (workflow: Partial<HogFlow>) => {+ workflow: Partial<HogFlow>+ }+ saveWorkflowSuccess: (+ originalWorkflow: HogFlow,+ payload?: HogFlow+ ) => {+ originalWorkflow: HogFlow+ payload?: HogFlow+ }+ setAutoSaveEnabled: (enabled: boolean) => {+ enabled: boolean+ }+ setExternallyEdited: (externallyEdited: boolean) => {+ externallyEdited: boolean+ }+ setSaveBaseUpdatedAt: (updatedAt: string | null) => {+ updatedAt: string | null+ }+ setScheduleRepeating: (repeating: boolean) => {+ repeating: boolean+ }+ setScheduleStartsAt: (startsAt: string | null) => {+ startsAt: string | null+ }+ setScheduleStartsAtFromPicker: (pickerDate: string | null) => {+ pickerDate: string | null+ }+ setScheduleState: (+ scheduleState: ScheduleState,+ source?: 'natural_language' | 'picker'+ ) => {+ scheduleState: ScheduleState+ source: 'natural_language' | 'picker'+ }+ setScheduleTimezone: (+ timezone: string,+ previousTimezone?: string+ ) => {+ previousTimezone: string | undefined+ timezone: string+ }+ setSchedules: (schedules: HogFlowSchedule[]) => {+ schedules: HogFlowSchedule[]+ }+ setSyncingExternalEdit: (syncing: boolean) => {+ syncing: boolean+ }+ setWorkflowAction: (+ actionId: string,+ action: HogFlowAction+ ) => {+ action: HogFlowAction+ actionId: string+ }+ setWorkflowActionConfig: (+ actionId: string,+ config: HogFlowAction['config']+ ) => {+ actionId: string+ config:+ | {+ cohorts: {+ name?: string | undefined+ percentage: number+ }[]+ }+ | {+ delay_duration: string+ }+ | {+ reason?: string | undefined+ }+ | {+ type: 'schedule'+ }+ | {+ conditions: {+ filters: {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ name?: string | undefined+ }[]+ delay_duration?: string | undefined+ }+ | {+ filters: {+ properties: any[]+ }+ type: 'batch'+ }+ | {+ filters: {+ actions?: any[] | undefined+ events?: any[] | undefined+ filter_test_accounts?: boolean | undefined+ properties?: any[] | undefined+ }+ type: 'event'+ }+ | {+ condition: {+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ name?: string | undefined+ }+ events?:+ | {+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ name?: string | undefined+ }[]+ | undefined+ max_wait_duration: string+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ mappings?:+ | {+ disabled?: boolean | undefined+ filters?: any+ inputs?:+ | Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ | null+ | undefined+ inputs_schema?:+ | {+ choices?:+ | {+ label: string+ value: string+ }[]+ | undefined+ default?: any+ description?: string | undefined+ hidden?: boolean | undefined+ integration?: string | undefined+ integration_field?: string | undefined+ integration_key?: string | undefined+ key: string+ label: string+ required?: boolean | undefined+ requiredScopes?: string | undefined+ requires_field?: string | undefined+ secret?: boolean | undefined+ templating?: boolean | undefined+ type:+ | 'boolean'+ | 'choice'+ | 'customer_analytics_account_properties'+ | 'customer_analytics_account_relationships'+ | 'dictionary'+ | 'email'+ | 'integration'+ | 'integration_field'+ | 'integration_multi'+ | 'json'+ | 'native_email'+ | 'non_failure_status_codes'+ | 'number'+ | 'posthog_assignee'+ | 'posthog_business_hours'+ | 'posthog_ticket_tags'+ | 'string'+ }[]+ | undefined+ name: string+ }[]+ | undefined+ template_id: string+ template_uuid?: string | undefined+ }+ | {+ filters: {+ properties?: any[] | undefined+ }+ key_property?: string | undefined+ table_name: string+ type: 'data-warehouse-table'+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ template_id: string+ template_uuid?: string | undefined+ type: 'manual'+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ template_id: string+ template_uuid?: string | undefined+ type: 'tracking_pixel'+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ template_id: string+ template_uuid?: string | undefined+ type: 'webhook'+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ message_category_id?: string | undefined+ message_category_type?: 'marketing' | 'transactional' | undefined+ template_id: 'template-email'+ template_uuid?: string | undefined+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ message_category_id?: string | undefined+ message_category_type?: 'marketing' | 'transactional' | undefined+ template_id: 'template-native-push'+ template_uuid?: string | undefined+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ message_category_id?: string | undefined+ message_category_type?: 'marketing' | 'transactional' | undefined+ template_id: 'template-twilio'+ template_uuid?: string | undefined+ }+ | {+ day:+ | ('friday' | 'monday' | 'saturday' | 'sunday' | 'thursday' | 'tuesday' | 'wednesday')[]+ | 'any'+ | 'weekday'+ | 'weekend'+ fallback_timezone?: string | null | undefined+ time: [string, string] | 'any'+ timezone: string | null+ use_person_timezone?: boolean | undefined+ }+ }+ setWorkflowActionEdges: (+ actionId: string,+ edges: HogFlow['edges']+ ) => {+ actionId: string+ edges: {+ from: string+ index?: number | undefined+ to: string+ type: 'branch' | 'continue'+ }[]+ }+ setWorkflowInfo: (workflow: Partial<HogFlow>) => {+ workflow: Partial<HogFlow>+ }+ setWorkflowManualErrors: (errors: Record<string, any>) => {+ errors: Record<string, any>+ }+ setWorkflowValue: (+ key: FieldName,+ value: any+ ) => {+ name: FieldName+ value: any+ }+ setWorkflowValues: (values: DeepPartial<HogFlow>) => {+ values: DeepPartial<HogFlow>+ }+ submitWorkflow: () => {+ value: boolean+ }+ submitWorkflowFailure: (+ error: Error,+ errors: Record<string, any>+ ) => {+ error: Error+ errors: Record<string, any>+ }+ submitWorkflowRequest: (workflow: HogFlow) => {+ workflow: HogFlow+ }+ submitWorkflowSuccess: (workflow: HogFlow) => {+ workflow: HogFlow+ }+ touchWorkflowField: (key: string) => {+ key: string+ }+ triggerBatchWorkflow: (+ variables: Record<string, any>,+ filters: Extract<+ HogFlowAction['config'],+ {+ type: 'batch'+ }+ >['filters']+ ) => {+ filters: {+ properties: any[]+ }+ variables: Record<string, any>+ }+ triggerManualWorkflow: (variables: Record<string, any>) => {+ variables: Record<string, any>+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface workflowLogicMeta {+ key: string+ __keaTypeGenInternalSelectorTypes: {+ logicProps: (arg: WorkflowLogicProps) => WorkflowLogicProps+ workflowUserAccessLevel: (originalWorkflow: HogFlow | null) => AccessControlLevel | null+ currentSchedule: (schedules: HogFlowSchedule[]) => HogFlowSchedule | null+ pendingSchedule: (+ currentSchedule: HogFlowSchedule | null,+ scheduleState: ScheduleState,+ scheduleStartsAt: string | null,+ scheduleTimezone: string,+ isScheduleRepeating: boolean+ ) =>+ | {+ rrule: string+ starts_at: string+ timezone?: string+ }+ | false+ | null+ hasUnsavedChanges: (+ workflowChanged: boolean,+ pendingSchedule:+ | {+ rrule: string+ starts_at: string+ timezone?: string+ }+ | false+ | null+ ) => boolean+ workflowLoading: (originalWorkflowLoading: boolean) => boolean+ edgesByActionId: (workflow: HogFlow) => Record<string, HogFlowEdge[]>+ actionValidationErrorsById: (+ workflow: HogFlow,+ hogFunctionTemplatesById: Record<string, HogFunctionTemplateType>,+ hogFunctionTemplatesByIdLoading: boolean,+ scheduleStartsAt: string | null+ ) => Record<string, HogFlowActionValidationResult | null>+ workflowHasActionErrors: (+ workflow: HogFlow,+ actionValidationErrorsById: Record<string, HogFlowActionValidationResult | null>+ ) => boolean+ triggerAction: (workflow: HogFlow) => TriggerAction | null+ isRowScopedTrigger: (+ triggerAction:+ | ({+ config:+ | {+ type: 'schedule'+ }+ | {+ filters: {+ properties: any[]+ }+ type: 'batch'+ }+ | {+ filters: {+ actions?: any[] | undefined+ events?: any[] | undefined+ filter_test_accounts?: boolean | undefined+ properties?: any[] | undefined+ }+ type: 'event'+ }+ | {+ filters: {+ properties?: any[] | undefined+ }+ key_property?: string | undefined+ table_name: string+ type: 'data-warehouse-table'+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ template_id: string+ template_uuid?: string | undefined+ type: 'manual'+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ template_id: string+ template_uuid?: string | undefined+ type: 'tracking_pixel'+ }+ | {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ template_id: string+ template_uuid?: string | undefined+ type: 'webhook'+ }+ created_at?: number | undefined+ description: string+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ id: string+ name: string+ on_error?: 'abort' | 'continue' | null | undefined+ output_variable?:+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }[]+ | null+ | undefined+ type: 'trigger'+ updated_at?: number | undefined+ } & Record<string, unknown>)+ | null+ ) => boolean+ workflowSanitized: (+ workflow: HogFlow,+ hogFunctionTemplatesById: Record<string, HogFunctionTemplateType>+ ) => HogFlow+ }+}++export type workflowLogicType = MakeLogicType<+ workflowLogicValues,+ workflowLogicActions,+ WorkflowLogicProps,+ workflowLogicMeta+>+export const workflowLogic = kea<workflowLogicType>([path((key) => ['products', 'workflows', 'frontend', 'Workflows', 'workflowLogic', key]),props({ id: 'new' } as WorkflowLogicProps),@@ -426,20 +2928,27 @@ export const workflowLogic = kea<workflowLogicType>([],}),selectors({- logicProps: [() => [(_, props: WorkflowLogicProps) => props], (props): WorkflowLogicProps => props],+ logicProps: [+ () => [(_, props: WorkflowLogicProps) => props],+ (props: WorkflowLogicProps): WorkflowLogicProps => props,+ ],workflowUserAccessLevel: [(s) => [s.originalWorkflow],- (originalWorkflow): AccessControlLevel | null => originalWorkflow?.user_access_level ?? null,+ (originalWorkflow: HogFlow | null): AccessControlLevel | null =>+ originalWorkflow?.user_access_level ?? null,+ ],+ currentSchedule: [+ (s) => [s.schedules],+ (schedules: HogFlowSchedule[]): HogFlowSchedule | null => schedules[0] ?? null,],- currentSchedule: [(s) => [s.schedules], (schedules): HogFlowSchedule | null => schedules[0] ?? null],pendingSchedule: [(s) => [s.currentSchedule, s.scheduleState, s.scheduleStartsAt, s.scheduleTimezone, s.isScheduleRepeating],(- currentSchedule,- scheduleState,- scheduleStartsAt,- scheduleTimezone,- isScheduleRepeating+ currentSchedule: HogFlowSchedule | null,+ scheduleState: ScheduleState,+ scheduleStartsAt: string | null,+ scheduleTimezone: string,+ isScheduleRepeating: boolean): { rrule: string; starts_at: string; timezone?: string } | null | false => {// Build what the schedule would look like from current reducer stateif (!scheduleStartsAt) {@@ -469,12 +2978,25 @@ export const workflowLogic = kea<workflowLogicType>([],hasUnsavedChanges: [(s) => [s.workflowChanged, s.pendingSchedule],- (formChanged, pendingSchedule): boolean => formChanged || pendingSchedule !== false,+ (+ formChanged: boolean,+ pendingSchedule:+ | {+ rrule: string+ starts_at: string+ timezone?: string+ }+ | false+ | null+ ): boolean => formChanged || pendingSchedule !== false,+ ],+ workflowLoading: [+ (s) => [s.originalWorkflowLoading],+ (originalWorkflowLoading: boolean) => originalWorkflowLoading,],- workflowLoading: [(s) => [s.originalWorkflowLoading], (originalWorkflowLoading) => originalWorkflowLoading],edgesByActionId: [(s) => [s.workflow],- (workflow): Record<string, HogFlowEdge[]> => {+ (workflow: HogFlow): Record<string, HogFlowEdge[]> => {return workflow.edges.reduce((acc, edge) => {if (!acc[edge.from]) {@@ -497,10 +3019,10 @@ export const workflowLogic = kea<workflowLogicType>([actionValidationErrorsById: [(s) => [s.workflow, s.hogFunctionTemplatesById, s.hogFunctionTemplatesByIdLoading, s.scheduleStartsAt],(- workflow,- hogFunctionTemplatesById,- hogFunctionTemplatesByIdLoading,- scheduleStartsAt+ workflow: HogFlow,+ hogFunctionTemplatesById: Record<string, HogFunctionTemplateType>,+ hogFunctionTemplatesByIdLoading: boolean,+ scheduleStartsAt: string | null): Record<string, HogFlowActionValidationResult | null> => {// Warehouse-triggered workflows are person-less ("row-scoped"). Person-dependent// step types make no sense without a person, so we block them at save time.@@ -661,7 +3183,7 @@ export const workflowLogic = kea<workflowLogicType>([triggerAction: [(s) => [s.workflow],- (workflow): TriggerAction | null => {+ (workflow: HogFlow): TriggerAction | null => {return (workflow.actions.find((action) => action.type === 'trigger') as TriggerAction) ?? null},],@@ -676,7 +3198,7 @@ export const workflowLogic = kea<workflowLogicType>([workflowSanitized: [(s) => [s.workflow, s.hogFunctionTemplatesById],- (workflow, hogFunctionTemplatesById): HogFlow => {+ (workflow: HogFlow, hogFunctionTemplatesById: Record<string, HogFunctionTemplateType>): HogFlow => {return sanitizeWorkflow(workflow, hogFunctionTemplatesById)},],diff --git a/products/workflows/frontend/Workflows/workflowMetricsSummaryLogic.ts b/products/workflows/frontend/Workflows/workflowMetricsSummaryLogic.tsindex cf184062f24f..38946cb4132a 100644--- a/products/workflows/frontend/Workflows/workflowMetricsSummaryLogic.ts+++ b/products/workflows/frontend/Workflows/workflowMetricsSummaryLogic.ts@@ -1,4 +1,4 @@-import { afterMount, connect, kea, key, listeners, path, props, selectors } from 'kea'+import { MakeLogicType, afterMount, connect, kea, key, listeners, path, props, selectors } from 'kea'import { loaders } from 'kea-loaders'import { combineUrl } from 'kea-router'@@ -18,9 +18,12 @@ import { defaultDataTableColumns } from '~/queries/nodes/DataTable/utils'import { DataTableNode, EventsQuery, NodeKind } from '~/queries/schema/schema-general'import { ActivityTab, LogEntryLevel, PropertyFilterType, PropertyOperator } from '~/types'+import type { AppMetricsCommonParams } from '../../../../frontend/src/lib/components/AppMetrics/appMetricsLogic'+import type { Dayjs } from '../../../../frontend/src/lib/dayjs'+import type { TeamPublicType, TeamType } from '../../../../frontend/src/types'import { isEmailAction, isPushAction } from './hogflows/steps/types'+import type { HogFlow } from './hogflows/types'import { workflowLogic } from './workflowLogic'-import type { workflowMetricsSummaryLogicType } from './workflowMetricsSummaryLogicType'// Each conversion is emitted as a `$workflows_conversion` PostHog event carrying `$workflow_id`, so// "View converted users" deep-links to the events explorer scoped to this workflow and date range.@@ -262,6 +265,461 @@ export interface WorkflowMetricsSummaryLogicProps {appSourceId?: string}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface workflowMetricsSummaryLogicValues {+ appMetricsTrends: AppMetricsTimeSeriesResponse | null // appMetricsLogic+ appMetricsTrendsLoading: boolean // appMetricsLogic+ completedLoading: boolean // appMetricsLogic+ completedTrends: AppMetricsTimeSeriesResponse | null // appMetricsLogic+ currentTeam: TeamPublicType | TeamType | null // appMetricsLogic+ getCompletedSingleTrendSeries: (name: string, previousPeriod?: boolean) => AppMetricsTimeSeriesResponse | null // appMetricsLogic+ getDateRangeAbsolute: () => {+ dateFrom: Dayjs+ dateTo: Dayjs+ diffMs: number+ } // appMetricsLogic+ getSingleTrendSeries: (name: string, previousPeriod?: boolean) => AppMetricsTimeSeriesResponse | null // appMetricsLogic+ params: Partial<AppMetricsCommonParams> // appMetricsLogic+ workflow: HogFlow // workflowLogic+ conversionRate: number+ conversionStats: {+ conversions: number+ started: number+ }+ conversionStatsLoading: boolean+ convertedUsersUrl: string+ emailActions: ({+ config: {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ message_category_id?: string | undefined+ message_category_type?: 'marketing' | 'transactional' | undefined+ template_id: 'template-email'+ template_uuid?: string | undefined+ }+ created_at?: number | undefined+ description: string+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ id: string+ name: string+ on_error?: 'abort' | 'continue' | null | undefined+ output_variable?:+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }[]+ | null+ | undefined+ type: 'function_email'+ updated_at?: number | undefined+ } & Record<string, unknown>)[]+ emailMetricsRows: EmailMetricRow[]+ emailTotalsByActionId: Record<string, Partial<Record<EmailMetric, number>>>+ emailTotalsByActionIdLoading: boolean+ hasConversionGoal: boolean+ inProgressTotal: number+ inProgressTotalLoading: boolean+ loading: boolean+ metricNameBySummaryMetric: Record<WorkflowSummaryMetric, string>+ pushActions: ({+ config: {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ message_category_id?: string | undefined+ message_category_type?: 'marketing' | 'transactional' | undefined+ template_id: 'template-native-push'+ template_uuid?: string | undefined+ }+ created_at?: number | undefined+ description: string+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ id: string+ name: string+ on_error?: 'abort' | 'continue' | null | undefined+ output_variable?:+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }[]+ | null+ | undefined+ type: 'function_push'+ updated_at?: number | undefined+ } & Record<string, unknown>)[]+ pushMetricsRows: PushMetricRow[]+ pushTotalsByActionId: Record<string, Partial<Record<PushMetric, number>>>+ pushTotalsByActionIdLoading: boolean+ summaryMetricKeys: WorkflowSummaryMetric[]+ workflowSummaryTrends: AppMetricsTimeSeriesResponse | null+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface workflowMetricsSummaryLogicActions {+ loadAppMetricsTrendsSuccess: (+ appMetricsTrends: AppMetricsTimeSeriesResponse,+ payload?:+ | {+ value: true+ }+ | undefined+ ) => {+ appMetricsTrends: AppMetricsTimeSeriesResponse+ payload?: {+ value: true+ }+ } // appMetricsLogic+ setParams: (params: Partial<AppMetricsCommonParams>) => {+ params: Partial<AppMetricsCommonParams>+ } // appMetricsLogic+ loadConversionStats: (_: any) => any+ loadConversionStatsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadConversionStatsSuccess: (+ conversionStats: {+ conversions: number+ started: number+ },+ payload?: any+ ) => {+ conversionStats: {+ conversions: number+ started: number+ }+ payload?: any+ }+ loadEmailTotals: (_: any) => any+ loadEmailTotalsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadEmailTotalsSuccess: (+ emailTotalsByActionId: Record<string, Partial<Record<EmailMetric, number>>>,+ payload?: any+ ) => {+ emailTotalsByActionId: Record<string, Partial<Record<EmailMetric, number>>>+ payload?: any+ }+ loadInProgressTotal: (_: any) => any+ loadInProgressTotalFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadInProgressTotalSuccess: (+ inProgressTotal: number,+ payload?: any+ ) => {+ inProgressTotal: number+ payload?: any+ }+ loadPushTotals: (_: any) => any+ loadPushTotalsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadPushTotalsSuccess: (+ pushTotalsByActionId: Record<string, Partial<Record<PushMetric, number>>>,+ payload?: any+ ) => {+ pushTotalsByActionId: Record<string, Partial<Record<PushMetric, number>>>+ payload?: any+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface workflowMetricsSummaryLogicMeta {+ key: string+ __keaTypeGenInternalSelectorTypes: {+ loading: (appMetricsTrendsLoading: boolean, completedLoading: boolean) => boolean+ emailActions: (workflow: HogFlow) => ({+ config: {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ message_category_id?: string | undefined+ message_category_type?: 'marketing' | 'transactional' | undefined+ template_id: 'template-email'+ template_uuid?: string | undefined+ }+ created_at?: number | undefined+ description: string+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ id: string+ name: string+ on_error?: 'abort' | 'continue' | null | undefined+ output_variable?:+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }[]+ | null+ | undefined+ type: 'function_email'+ updated_at?: number | undefined+ } & Record<string, unknown>)[]+ pushActions: (workflow: HogFlow) => ({+ config: {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ message_category_id?: string | undefined+ message_category_type?: 'marketing' | 'transactional' | undefined+ template_id: 'template-native-push'+ template_uuid?: string | undefined+ }+ created_at?: number | undefined+ description: string+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ id: string+ name: string+ on_error?: 'abort' | 'continue' | null | undefined+ output_variable?:+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }[]+ | null+ | undefined+ type: 'function_push'+ updated_at?: number | undefined+ } & Record<string, unknown>)[]+ metricNameBySummaryMetric: (+ appMetricsTrends: AppMetricsTimeSeriesResponse | null+ ) => Record<WorkflowSummaryMetric, string>+ conversionRate: (conversionStats: { conversions: number; started: number }) => number+ hasConversionGoal: (workflow: HogFlow) => boolean+ convertedUsersUrl: (+ getDateRangeAbsolute: () => {+ dateFrom: Dayjs+ dateTo: Dayjs+ diffMs: number+ },+ arg: string+ ) => string+ workflowSummaryTrends: (+ appMetricsTrends: AppMetricsTimeSeriesResponse | null,+ completedTrends: AppMetricsTimeSeriesResponse | null,+ metricNameBySummaryMetric: Record<WorkflowSummaryMetric, string>,+ getCompletedSingleTrendSeries: (+ name: string,+ previousPeriod?: boolean+ ) => AppMetricsTimeSeriesResponse | null+ ) => AppMetricsTimeSeriesResponse | null+ emailMetricsRows: (+ emailActions: ({+ config: {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ message_category_id?: string | undefined+ message_category_type?: 'marketing' | 'transactional' | undefined+ template_id: 'template-email'+ template_uuid?: string | undefined+ }+ created_at?: number | undefined+ description: string+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ id: string+ name: string+ on_error?: 'abort' | 'continue' | null | undefined+ output_variable?:+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }[]+ | null+ | undefined+ type: 'function_email'+ updated_at?: number | undefined+ } & Record<string, unknown>)[],+ emailTotalsByActionId: Record<string, Partial<Record<EmailMetric, number>>>+ ) => EmailMetricRow[]+ pushMetricsRows: (+ pushActions: ({+ config: {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ message_category_id?: string | undefined+ message_category_type?: 'marketing' | 'transactional' | undefined+ template_id: 'template-native-push'+ template_uuid?: string | undefined+ }+ created_at?: number | undefined+ description: string+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ id: string+ name: string+ on_error?: 'abort' | 'continue' | null | undefined+ output_variable?:+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }[]+ | null+ | undefined+ type: 'function_push'+ updated_at?: number | undefined+ } & Record<string, unknown>)[],+ pushTotalsByActionId: Record<string, Partial<Record<PushMetric, number>>>+ ) => PushMetricRow[]+ }+}++export type workflowMetricsSummaryLogicType = MakeLogicType<+ workflowMetricsSummaryLogicValues,+ workflowMetricsSummaryLogicActions,+ WorkflowMetricsSummaryLogicProps,+ workflowMetricsSummaryLogicMeta+>+export const workflowMetricsSummaryLogic = kea<workflowMetricsSummaryLogicType>([path(['products', 'workflows', 'frontend', 'Workflows', 'workflowMetricsSummaryLogic']),props({} as WorkflowMetricsSummaryLogicProps),@@ -415,13 +873,19 @@ export const workflowMetricsSummaryLogic = kea<workflowMetricsSummaryLogicType>(appMetricsTrendsLoading || completedLoading,],- emailActions: [(s) => [s.workflow], (workflow) => workflow.actions.filter(isEmailAction)],+ emailActions: [+ (s) => [s.workflow],+ (workflow: import('./hogflows/types').HogFlow) => workflow.actions.filter(isEmailAction),+ ],- pushActions: [(s) => [s.workflow], (workflow) => workflow.actions.filter(isPushAction)],+ pushActions: [+ (s) => [s.workflow],+ (workflow: import('./hogflows/types').HogFlow) => workflow.actions.filter(isPushAction),+ ],metricNameBySummaryMetric: [(s) => [s.appMetricsTrends],- (appMetricsTrends): Record<WorkflowSummaryMetric, string> =>+ (appMetricsTrends: AppMetricsTimeSeriesResponse | null): Record<WorkflowSummaryMetric, string> =>SUMMARY_METRIC_KEYS.reduce((acc, metricKey) => {const metric = WORKFLOW_SUMMARY_METRICS[metricKey]@@ -446,7 +910,7 @@ export const workflowMetricsSummaryLogic = kea<workflowMetricsSummaryLogicType>(// backend never emits conversion metrics/events, so the tiles would always read empty.hasConversionGoal: [(s) => [s.workflow],- (workflow): boolean => {+ (workflow: import('./hogflows/types').HogFlow): boolean => {const filters = workflow.conversion?.filtersconst hasPropertyGoal = Array.isArray(filters) && filters.length > 0const hasEventGoal = (workflow.conversion?.events?.length ?? 0) > 0@@ -456,7 +920,14 @@ export const workflowMetricsSummaryLogic = kea<workflowMetricsSummaryLogicType>(convertedUsersUrl: [(s) => [s.getDateRangeAbsolute, (_, p: WorkflowMetricsSummaryLogicProps) => p.id],- (getDateRangeAbsolute, id): string => {+ (+ getDateRangeAbsolute: () => {+ dateFrom: import('lib/dayjs').Dayjs+ dateTo: import('lib/dayjs').Dayjs+ diffMs: number+ },+ id: string+ ): string => {const { dateFrom, dateTo } = getDateRangeAbsolute()const source: EventsQuery = {kind: NodeKind.EventsQuery,@@ -497,10 +968,13 @@ export const workflowMetricsSummaryLogic = kea<workflowMetricsSummaryLogicType>(s.getCompletedSingleTrendSeries,],(- appMetricsTrends,- completedTrends,- metricNameBySummaryMetric,- getCompletedSingleTrendSeries+ appMetricsTrends: AppMetricsTimeSeriesResponse | null,+ completedTrends: AppMetricsTimeSeriesResponse | null,+ metricNameBySummaryMetric: Record<WorkflowSummaryMetric, string>,+ getCompletedSingleTrendSeries: (+ name: string,+ previousPeriod?: boolean+ ) => AppMetricsTimeSeriesResponse | null): AppMetricsTimeSeriesResponse | null => {if (!appMetricsTrends && !completedTrends) {return null@@ -537,7 +1011,57 @@ export const workflowMetricsSummaryLogic = kea<workflowMetricsSummaryLogicType>(emailMetricsRows: [(s) => [s.emailActions, s.emailTotalsByActionId],- (emailActions, emailTotalsByActionId): EmailMetricRow[] =>+ (+ emailActions: ({+ config: {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ message_category_id?: string | undefined+ message_category_type?: 'marketing' | 'transactional' | undefined+ template_id: 'template-email'+ template_uuid?: string | undefined+ }+ created_at?: number | undefined+ description: string+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ id: string+ name: string+ on_error?: 'abort' | 'continue' | null | undefined+ output_variable?:+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }[]+ | null+ | undefined+ type: 'function_email'+ updated_at?: number | undefined+ } & Record<string, unknown>)[],+ emailTotalsByActionId: Record<string, Partial<Record<EmailMetric, number>>>+ ): EmailMetricRow[] =>emailActions.map((action: { id: string; name: string }) => {const totals = emailTotalsByActionId[action.id] || {}const sent = totals.email_sent ?? 0@@ -560,7 +1084,57 @@ export const workflowMetricsSummaryLogic = kea<workflowMetricsSummaryLogicType>(pushMetricsRows: [(s) => [s.pushActions, s.pushTotalsByActionId],- (pushActions, pushTotalsByActionId): PushMetricRow[] =>+ (+ pushActions: ({+ config: {+ inputs: Record<+ string,+ {+ bytecode?: any+ order?: number | undefined+ secret?: boolean | undefined+ templating?: 'hog' | 'liquid' | undefined+ value: any+ }+ >+ message_category_id?: string | undefined+ message_category_type?: 'marketing' | 'transactional' | undefined+ template_id: 'template-native-push'+ template_uuid?: string | undefined+ }+ created_at?: number | undefined+ description: string+ filters?:+ | {+ actions?: any[] | undefined+ events?: any[] | undefined+ properties?: any[] | undefined+ }+ | null+ | undefined+ id: string+ name: string+ on_error?: 'abort' | 'continue' | null | undefined+ output_variable?:+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }+ | {+ key: string+ label?: string | null | undefined+ result_path?: string | null | undefined+ spread?: boolean | null | undefined+ }[]+ | null+ | undefined+ type: 'function_push'+ updated_at?: number | undefined+ } & Record<string, unknown>)[],+ pushTotalsByActionId: Record<string, Partial<Record<PushMetric, number>>>+ ): PushMetricRow[] =>pushActions.map((action: { id: string; name: string }) => {const totals = pushTotalsByActionId[action.id] || {}return {diff --git a/products/workflows/frontend/Workflows/workflowSceneLogic.ts b/products/workflows/frontend/Workflows/workflowSceneLogic.tsindex 117be2173611..2f33502f6f16 100644--- a/products/workflows/frontend/Workflows/workflowSceneLogic.ts+++ b/products/workflows/frontend/Workflows/workflowSceneLogic.ts@@ -1,4 +1,4 @@-import { actions, kea, key, path, props, reducers, selectors } from 'kea'+import { MakeLogicType, actions, kea, key, path, props, reducers, selectors } from 'kea'import { urlToAction } from 'kea-router'import { Scene } from 'scenes/sceneTypes'@@ -7,8 +7,6 @@ import { urls } from 'scenes/urls'import { SIDE_PANEL_CONTEXT_KEY, SidePanelSceneContext } from '~/layout/navigation-3000/sidepanel/types'import { ActivityScope, Breadcrumb } from '~/types'-import type { workflowSceneLogicType } from './workflowSceneLogicType'-export const WorkflowTabs = ['workflow', 'logs', 'invocations', 'metrics', 'assets', 'history'] as constexport type WorkflowTab = (typeof WorkflowTabs)[number]@@ -17,6 +15,36 @@ export interface WorkflowSceneLogicProps {tab?: WorkflowTab}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface workflowSceneLogicValues {+ breadcrumbs: Breadcrumb[]+ currentTab: WorkflowTab+ sidePanelContext: SidePanelSceneContext | null+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface workflowSceneLogicActions {+ setCurrentTab: (tab: WorkflowTab) => {+ tab: 'assets' | 'history' | 'invocations' | 'logs' | 'metrics' | 'workflow'+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface workflowSceneLogicMeta {+ key: string+ __keaTypeGenInternalSelectorTypes: {+ breadcrumbs: (arg: WorkflowSceneLogicProps['id']) => Breadcrumb[]+ sidePanelContext: (arg: WorkflowSceneLogicProps['id']) => SidePanelSceneContext | null+ }+}++export type workflowSceneLogicType = MakeLogicType<+ workflowSceneLogicValues,+ workflowSceneLogicActions,+ WorkflowSceneLogicProps,+ workflowSceneLogicMeta+>+export const workflowSceneLogic = kea<workflowSceneLogicType>([path(['products', 'workflows', 'frontend', 'workflowSceneLogic']),props({ id: 'new' } as WorkflowSceneLogicProps),@@ -35,7 +63,7 @@ export const workflowSceneLogic = kea<workflowSceneLogicType>([selectors({breadcrumbs: [() => [(_, props) => props.id as WorkflowSceneLogicProps['id']],- (id): Breadcrumb[] => {+ (id: WorkflowSceneLogicProps['id']): Breadcrumb[] => {return [{key: [Scene.Workflows, 'workflows'],@@ -56,7 +84,7 @@ export const workflowSceneLogic = kea<workflowSceneLogicType>([// scene's registered logic, not workflowLogic.[SIDE_PANEL_CONTEXT_KEY]: [() => [(_, props) => props.id as WorkflowSceneLogicProps['id']],- (id): SidePanelSceneContext | null =>+ (id: WorkflowSceneLogicProps['id']): SidePanelSceneContext | null =>id && id !== 'new'? {activity_scope: ActivityScope.HOG_FLOW,diff --git a/products/workflows/frontend/Workflows/workflowsLogic.ts b/products/workflows/frontend/Workflows/workflowsLogic.tsindex 671a3068db96..907c152f2beb 100644--- a/products/workflows/frontend/Workflows/workflowsLogic.ts+++ b/products/workflows/frontend/Workflows/workflowsLogic.ts@@ -1,4 +1,4 @@-import { actions, kea, key, listeners, path, reducers, selectors } from 'kea'+import { MakeLogicType, actions, kea, key, listeners, path, reducers, selectors } from 'kea'import { loaders } from 'kea-loaders'import { router } from 'kea-router'@@ -11,7 +11,6 @@ import { urls } from 'scenes/urls'import { deleteFromTree } from '~/layout/panel-layout/ProjectTree/projectTreeLogic'import type { HogFlow } from './hogflows/types'-import type { workflowsLogicType } from './workflowsLogicType'export type WorkflowStatusFilter = 'all' | 'active' | 'draft' | 'archived'@@ -21,6 +20,197 @@ export interface WorkflowsFilters {status: WorkflowStatusFilter}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface workflowsLogicValues {+ allArchivedSelected: boolean+ creators: {+ email: string+ id: number+ name: string+ uuid: string+ }[]+ filteredWorkflows: HogFlow[]+ filters: WorkflowsFilters+ hasLoadedWorkflows: boolean+ selectedArchivedCount: number+ selectedArchivedWorkflowIds: Set<string>+ workflows: HogFlow[]+ workflowsFuse: Fuse<HogFlow>+ workflowsLoading: boolean+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface workflowsLogicActions {+ archiveWorkflow: (workflow: HogFlow) => {+ workflow: HogFlow+ }+ archiveWorkflowFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ archiveWorkflowSuccess: (+ workflows: HogFlow[],+ payload?: {+ workflow: HogFlow+ }+ ) => {+ workflows: HogFlow[]+ payload?: {+ workflow: HogFlow+ }+ }+ clearArchivedWorkflowSelection: () => {+ value: true+ }+ deleteSelectedWorkflows: () => {+ value: true+ }+ deleteWorkflow: (workflow: HogFlow) => {+ workflow: HogFlow+ }+ deleteWorkflowFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ deleteWorkflowSuccess: (+ workflows: HogFlow[],+ payload?: {+ workflow: HogFlow+ }+ ) => {+ workflows: HogFlow[]+ payload?: {+ workflow: HogFlow+ }+ }+ duplicateWorkflow: (workflow: HogFlow) => {+ workflow: HogFlow+ }+ duplicateWorkflowFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ duplicateWorkflowSuccess: (+ workflows: HogFlow[],+ payload?: {+ workflow: HogFlow+ }+ ) => {+ workflows: HogFlow[]+ payload?: {+ workflow: HogFlow+ }+ }+ loadWorkflows: () => {}+ loadWorkflowsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadWorkflowsSuccess: (+ workflows: HogFlow[],+ payload?: {}+ ) => {+ workflows: HogFlow[]+ payload?: {}+ }+ restoreWorkflow: (workflow: HogFlow) => {+ workflow: HogFlow+ }+ restoreWorkflowFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ restoreWorkflowSuccess: (+ workflows: HogFlow[],+ payload?: {+ workflow: HogFlow+ }+ ) => {+ workflows: HogFlow[]+ payload?: {+ workflow: HogFlow+ }+ }+ selectAllArchivedWorkflows: (ids: string[]) => {+ ids: string[]+ }+ setCreatedBy: (createdBy: string | null) => {+ createdBy: string | null+ }+ setFilters: (filters: Partial<WorkflowsFilters>) => {+ filters: Partial<WorkflowsFilters>+ }+ setSearchTerm: (search: string) => {+ search: string+ }+ setStatusFilter: (status: WorkflowStatusFilter) => {+ status: WorkflowStatusFilter+ }+ toggleArchivedWorkflowSelection: (id: string) => {+ id: string+ }+ toggleWorkflowStatus: (workflow: HogFlow) => {+ workflow: HogFlow+ }+ toggleWorkflowStatusFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ toggleWorkflowStatusSuccess: (+ workflows: HogFlow[],+ payload?: {+ workflow: HogFlow+ }+ ) => {+ workflows: HogFlow[]+ payload?: {+ workflow: HogFlow+ }+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface workflowsLogicMeta {+ key: string+ __keaTypeGenInternalSelectorTypes: {+ workflowsFuse: (workflows: HogFlow[]) => Fuse<HogFlow>+ filteredWorkflows: (workflows: HogFlow[], filters: WorkflowsFilters, workflowsFuse: Fuse<HogFlow>) => HogFlow[]+ allArchivedSelected: (filteredWorkflows: HogFlow[], selectedArchivedWorkflowIds: Set<string>) => boolean+ selectedArchivedCount: (selectedArchivedWorkflowIds: Set<string>) => number+ creators: (workflows: HogFlow[]) => {+ email: string+ id: number+ name: string+ uuid: string+ }[]+ }+}++export type workflowsLogicType = MakeLogicType<+ workflowsLogicValues,+ workflowsLogicActions,+ Record<string, any>,+ workflowsLogicMeta+>+export const workflowsLogic = kea<workflowsLogicType>([key(() => 'workflowsLogic'),path(['products', 'workflows', 'frontend', 'workflowsLogic']),@@ -181,7 +371,7 @@ export const workflowsLogic = kea<workflowsLogicType>([selectors({workflowsFuse: [(s) => [s.workflows],- (workflows): Fuse<HogFlow> => {+ (workflows: HogFlow[]): Fuse<HogFlow> => {return createFuse(workflows || [], {keys: [{ name: 'name', weight: 2 }, 'description'],threshold: 0.3,@@ -192,7 +382,7 @@ export const workflowsLogic = kea<workflowsLogicType>([],filteredWorkflows: [(s) => [s.workflows, s.filters, s.workflowsFuse],- (workflows, filters, workflowsFuse): HogFlow[] => {+ (workflows: HogFlow[], filters: WorkflowsFilters, workflowsFuse: Fuse<HogFlow>): HogFlow[] => {let filtered = workflowsif (filters.search) {@@ -214,14 +404,17 @@ export const workflowsLogic = kea<workflowsLogicType>([],allArchivedSelected: [(s) => [s.filteredWorkflows, s.selectedArchivedWorkflowIds],- (filteredWorkflows, selectedIds): boolean => {+ (filteredWorkflows: HogFlow[], selectedIds: Set<string>): boolean => {return filteredWorkflows.length > 0 && filteredWorkflows.every((w) => selectedIds.has(w.id))},],- selectedArchivedCount: [(s) => [s.selectedArchivedWorkflowIds], (selectedIds): number => selectedIds.size],+ selectedArchivedCount: [+ (s) => [s.selectedArchivedWorkflowIds],+ (selectedIds: Set<string>): number => selectedIds.size,+ ],creators: [(s) => [s.workflows],- (workflows) => {+ (workflows: HogFlow[]) => {const uniqueCreators = new Map<number, { id: number; uuid: string; name: string; email: string }>()workflows.forEach((workflow) => {if (workflow.created_by) {diff --git a/products/workflows/frontend/WorkflowsScene.tsx b/products/workflows/frontend/WorkflowsScene.tsxindex 03a72faeeee5..719b307313ff 100644--- a/products/workflows/frontend/WorkflowsScene.tsx+++ b/products/workflows/frontend/WorkflowsScene.tsx@@ -1,4 +1,4 @@-import { actions, kea, path, props, reducers, selectors, useActions, useValues } from 'kea'+import { MakeLogicType, actions, kea, path, props, reducers, selectors, useActions, useValues } from 'kea'import { urlToAction } from 'kea-router'import { IconApple, IconAndroid, IconLetter, IconPlusSmall } from '@posthog/icons'@@ -31,7 +31,6 @@ import { MessageTemplatesTable } from './TemplateLibrary/MessageTemplatesTable'import { newWorkflowLogic } from './Workflows/newWorkflowLogic'import { NewWorkflowModal } from './Workflows/NewWorkflowModal'import { WorkflowsTable } from './Workflows/WorkflowsTable'-import type { workflowsSceneLogicType } from './WorkflowsSceneType'const WORKFLOW_SCENE_TABS = ['workflows', 'library', 'channels', 'opt-outs'] as constexport type WorkflowsSceneTab = (typeof WORKFLOW_SCENE_TABS)[number]@@ -40,6 +39,35 @@ export type WorkflowsSceneProps = {tab?: WorkflowsSceneTab}+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface workflowsSceneLogicValues {+ breadcrumbs: Breadcrumb[]+ currentTab: WorkflowsSceneTab+ logicProps: any+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface workflowsSceneLogicActions {+ setCurrentTab: (tab: WorkflowsSceneTab) => {+ tab: 'channels' | 'library' | 'opt-outs' | 'workflows'+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface workflowsSceneLogicMeta {+ __keaTypeGenInternalSelectorTypes: {+ logicProps: (arg: any) => any+ breadcrumbs: (currentTab: 'channels' | 'library' | 'opt-outs' | 'workflows') => Breadcrumb[]+ }+}++export type workflowsSceneLogicType = MakeLogicType<+ workflowsSceneLogicValues,+ workflowsSceneLogicActions,+ WorkflowsSceneProps,+ workflowsSceneLogicMeta+>+export const workflowsSceneLogic = kea<workflowsSceneLogicType>([props({} as WorkflowsSceneProps),path(() => ['scenes', 'workflows', 'workflowsSceneLogic']),@@ -58,7 +86,7 @@ export const workflowsSceneLogic = kea<workflowsSceneLogicType>([logicProps: [() => [(_, props) => props], (props) => props],breadcrumbs: [(s) => [s.currentTab],- (currentTab): Breadcrumb[] => {+ (currentTab: WorkflowsSceneTab): Breadcrumb[] => {return [{key: [Scene.Workflows, currentTab],