@elevasis/ui 2.70.0 → 2.71.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/index.d.ts +26 -0
- package/dist/app/index.js +5 -5
- package/dist/auth/index.js +1 -1
- package/dist/charts/index.js +1 -1
- package/dist/{chunk-LWYLZUUV.js → chunk-3BLYJT5L.js} +2 -2
- package/dist/{chunk-QDMIFD6F.js → chunk-AIOV5NM7.js} +1 -1
- package/dist/{chunk-TJMZUL6E.js → chunk-BM2WKRAQ.js} +1 -1
- package/dist/{chunk-DUEGHF7A.js → chunk-CPBT6Z2G.js} +2 -2
- package/dist/{chunk-SMH6SQQE.js → chunk-DCMFNSJ6.js} +1 -1
- package/dist/{chunk-GJQF3S2Q.js → chunk-DH2MO5DX.js} +1 -1
- package/dist/{chunk-5C62IRKS.js → chunk-H3SDGC5F.js} +2 -2
- package/dist/{chunk-XKUEO4HG.js → chunk-JTSNU6KA.js} +2 -2
- package/dist/{chunk-LY3IKYTZ.js → chunk-LL5H7J4N.js} +1 -1
- package/dist/{chunk-AGX2CY2O.js → chunk-TB2PM2OU.js} +1 -1
- package/dist/{chunk-CCZJ4OWY.js → chunk-TCQZ4AJI.js} +1 -1
- package/dist/{chunk-GZADST64.js → chunk-TVFSVTRG.js} +5 -5
- package/dist/{chunk-6TT3FQEZ.js → chunk-UZ7MSORW.js} +101 -4
- package/dist/{chunk-MFCV4JMQ.js → chunk-VHPHWTX7.js} +2 -2
- package/dist/{chunk-JA2XDMAE.js → chunk-VRRIHA3S.js} +1 -1
- package/dist/components/index.d.ts +59 -3
- package/dist/components/index.js +19 -19
- package/dist/components/navigation/index.js +2 -2
- package/dist/features/auth/index.d.ts +26 -0
- package/dist/features/auth/index.js +3 -3
- package/dist/features/clients/index.js +2 -2
- package/dist/features/content/index.d.ts +95 -78
- package/dist/features/content/index.js +61 -19
- package/dist/features/crm/index.d.ts +26 -0
- package/dist/features/crm/index.js +3 -3
- package/dist/features/dashboard/index.js +3 -3
- package/dist/features/delivery/index.d.ts +26 -0
- package/dist/features/delivery/index.js +2 -2
- package/dist/features/knowledge/index.js +1 -1
- package/dist/features/lead-gen/index.js +3 -3
- package/dist/features/monitoring/index.d.ts +33 -3
- package/dist/features/monitoring/index.js +4 -4
- package/dist/features/monitoring/requests/index.js +2 -2
- package/dist/features/operations/index.js +6 -6
- package/dist/features/settings/index.d.ts +26 -0
- package/dist/features/settings/index.js +3 -3
- package/dist/hooks/access/index.js +1 -1
- package/dist/hooks/delivery/index.d.ts +26 -0
- package/dist/hooks/index.d.ts +301 -12
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/published.d.ts +301 -12
- package/dist/hooks/published.js +1 -1
- package/dist/initialization/index.d.ts +26 -0
- package/dist/knowledge/index.js +5 -5
- package/dist/layout/index.js +4 -4
- package/dist/profile/index.d.ts +26 -0
- package/dist/provider/index.d.ts +26 -0
- package/dist/provider/index.js +1 -1
- package/dist/provider/published.d.ts +26 -0
- package/dist/provider/published.js +1 -1
- package/dist/supabase/index.d.ts +50 -0
- package/dist/types/index.d.ts +59 -3
- package/package.json +4 -4
|
@@ -1482,6 +1482,7 @@ type Database = {
|
|
|
1482
1482
|
activities: {
|
|
1483
1483
|
Row: {
|
|
1484
1484
|
activity_type: string;
|
|
1485
|
+
actor_api_key_id: string | null;
|
|
1485
1486
|
actor_id: string | null;
|
|
1486
1487
|
actor_type: string | null;
|
|
1487
1488
|
created_at: string;
|
|
@@ -1498,6 +1499,7 @@ type Database = {
|
|
|
1498
1499
|
};
|
|
1499
1500
|
Insert: {
|
|
1500
1501
|
activity_type: string;
|
|
1502
|
+
actor_api_key_id?: string | null;
|
|
1501
1503
|
actor_id?: string | null;
|
|
1502
1504
|
actor_type?: string | null;
|
|
1503
1505
|
created_at?: string;
|
|
@@ -1514,6 +1516,7 @@ type Database = {
|
|
|
1514
1516
|
};
|
|
1515
1517
|
Update: {
|
|
1516
1518
|
activity_type?: string;
|
|
1519
|
+
actor_api_key_id?: string | null;
|
|
1517
1520
|
actor_id?: string | null;
|
|
1518
1521
|
actor_type?: string | null;
|
|
1519
1522
|
created_at?: string;
|
|
@@ -1529,6 +1532,13 @@ type Database = {
|
|
|
1529
1532
|
title?: string;
|
|
1530
1533
|
};
|
|
1531
1534
|
Relationships: [
|
|
1535
|
+
{
|
|
1536
|
+
foreignKeyName: "activities_actor_api_key_id_fkey";
|
|
1537
|
+
columns: ["actor_api_key_id"];
|
|
1538
|
+
isOneToOne: false;
|
|
1539
|
+
referencedRelation: "api_keys";
|
|
1540
|
+
referencedColumns: ["id"];
|
|
1541
|
+
},
|
|
1532
1542
|
{
|
|
1533
1543
|
foreignKeyName: "activities_actor_id_fkey";
|
|
1534
1544
|
columns: ["actor_id"];
|
|
@@ -1616,6 +1626,7 @@ type Database = {
|
|
|
1616
1626
|
api_keys: {
|
|
1617
1627
|
Row: {
|
|
1618
1628
|
created_at: string | null;
|
|
1629
|
+
created_by: string | null;
|
|
1619
1630
|
id: string;
|
|
1620
1631
|
key_hash: string;
|
|
1621
1632
|
last_used_at: string | null;
|
|
@@ -1624,6 +1635,7 @@ type Database = {
|
|
|
1624
1635
|
};
|
|
1625
1636
|
Insert: {
|
|
1626
1637
|
created_at?: string | null;
|
|
1638
|
+
created_by?: string | null;
|
|
1627
1639
|
id?: string;
|
|
1628
1640
|
key_hash: string;
|
|
1629
1641
|
last_used_at?: string | null;
|
|
@@ -1632,6 +1644,7 @@ type Database = {
|
|
|
1632
1644
|
};
|
|
1633
1645
|
Update: {
|
|
1634
1646
|
created_at?: string | null;
|
|
1647
|
+
created_by?: string | null;
|
|
1635
1648
|
id?: string;
|
|
1636
1649
|
key_hash?: string;
|
|
1637
1650
|
last_used_at?: string | null;
|
|
@@ -1639,6 +1652,13 @@ type Database = {
|
|
|
1639
1652
|
organization_id?: string;
|
|
1640
1653
|
};
|
|
1641
1654
|
Relationships: [
|
|
1655
|
+
{
|
|
1656
|
+
foreignKeyName: "api_keys_created_by_fkey";
|
|
1657
|
+
columns: ["created_by"];
|
|
1658
|
+
isOneToOne: false;
|
|
1659
|
+
referencedRelation: "users";
|
|
1660
|
+
referencedColumns: ["id"];
|
|
1661
|
+
},
|
|
1642
1662
|
{
|
|
1643
1663
|
foreignKeyName: "api_keys_organization_id_fkey";
|
|
1644
1664
|
columns: ["organization_id"];
|
|
@@ -1966,6 +1986,7 @@ type Database = {
|
|
|
1966
1986
|
organization_id: string;
|
|
1967
1987
|
payload: Json;
|
|
1968
1988
|
source_execution_id: string | null;
|
|
1989
|
+
status: string;
|
|
1969
1990
|
step_key: string | null;
|
|
1970
1991
|
};
|
|
1971
1992
|
Insert: {
|
|
@@ -1977,6 +1998,7 @@ type Database = {
|
|
|
1977
1998
|
organization_id: string;
|
|
1978
1999
|
payload?: Json;
|
|
1979
2000
|
source_execution_id?: string | null;
|
|
2001
|
+
status: string;
|
|
1980
2002
|
step_key?: string | null;
|
|
1981
2003
|
};
|
|
1982
2004
|
Update: {
|
|
@@ -1988,6 +2010,7 @@ type Database = {
|
|
|
1988
2010
|
organization_id?: string;
|
|
1989
2011
|
payload?: Json;
|
|
1990
2012
|
source_execution_id?: string | null;
|
|
2013
|
+
status?: string;
|
|
1991
2014
|
step_key?: string | null;
|
|
1992
2015
|
};
|
|
1993
2016
|
Relationships: [
|
|
@@ -2139,6 +2162,7 @@ type Database = {
|
|
|
2139
2162
|
kind: string;
|
|
2140
2163
|
metadata: Json;
|
|
2141
2164
|
organization_id: string;
|
|
2165
|
+
payload: Json;
|
|
2142
2166
|
processing_state: Json;
|
|
2143
2167
|
storage_path: string | null;
|
|
2144
2168
|
title: string;
|
|
@@ -2152,6 +2176,7 @@ type Database = {
|
|
|
2152
2176
|
kind: string;
|
|
2153
2177
|
metadata?: Json;
|
|
2154
2178
|
organization_id: string;
|
|
2179
|
+
payload?: Json;
|
|
2155
2180
|
processing_state?: Json;
|
|
2156
2181
|
storage_path?: string | null;
|
|
2157
2182
|
title: string;
|
|
@@ -2165,6 +2190,7 @@ type Database = {
|
|
|
2165
2190
|
kind?: string;
|
|
2166
2191
|
metadata?: Json;
|
|
2167
2192
|
organization_id?: string;
|
|
2193
|
+
payload?: Json;
|
|
2168
2194
|
processing_state?: Json;
|
|
2169
2195
|
storage_path?: string | null;
|
|
2170
2196
|
title?: string;
|
|
@@ -6112,8 +6138,34 @@ interface APIExecutionDetail extends APIExecutionSummary {
|
|
|
6112
6138
|
*/
|
|
6113
6139
|
type NodeColorType = 'violet' | 'blue' | 'orange' | 'teal' | 'gray' | 'yellow';
|
|
6114
6140
|
|
|
6115
|
-
|
|
6116
|
-
|
|
6141
|
+
/**
|
|
6142
|
+
* Every kind of activity the platform records.
|
|
6143
|
+
*
|
|
6144
|
+
* This array is the single TypeScript-side source for the catalog: `ActivityType` is
|
|
6145
|
+
* derived from it, and `ActivityTypeSchema` in `api-schemas.ts` builds its Zod enum
|
|
6146
|
+
* from it rather than repeating the list. It is also what the database CHECK constraint
|
|
6147
|
+
* `activities_activity_type_check` must match exactly.
|
|
6148
|
+
*
|
|
6149
|
+
* A value here that the constraint does not allow raises `23514` on every write, and
|
|
6150
|
+
* because activity writes are best-effort the rejection is silent. That is not
|
|
6151
|
+
* hypothetical: `credential_read` and `agent_access_grant_change` were both in this list
|
|
6152
|
+
* and absent from the constraint, so neither had ever recorded a single row on either
|
|
6153
|
+
* database. `activity-catalog-sync.integration.test.ts` is the gate that now catches it.
|
|
6154
|
+
*/
|
|
6155
|
+
declare const ACTIVITY_TYPES: readonly ["workflow_execution", "agent_run", "hitl_action", "webhook_received", "webhook_executed", "webhook_failed", "credential_change", "credential_read", "api_key_change", "agent_access_grant_change", "deployment_change", "membership_change"];
|
|
6156
|
+
type ActivityType = (typeof ACTIVITY_TYPES)[number];
|
|
6157
|
+
/** Mirrors the `activities_status_check` constraint; same two-place risk as ACTIVITY_TYPES. */
|
|
6158
|
+
declare const ACTIVITY_STATUSES: readonly ["success", "failure", "pending", "approved", "rejected", "completed"];
|
|
6159
|
+
type ActivityStatus = (typeof ACTIVITY_STATUSES)[number];
|
|
6160
|
+
/**
|
|
6161
|
+
* What kind of actor performed an action.
|
|
6162
|
+
*
|
|
6163
|
+
* `'user'` reads `actorId` (FK to users), `'api_key'` reads `actorApiKeyId` (FK to api_keys),
|
|
6164
|
+
* and `'system'` reads neither. The two id columns are deliberately separate rather than one
|
|
6165
|
+
* polymorphic column, so the database keeps checking both referents.
|
|
6166
|
+
*/
|
|
6167
|
+
declare const ACTOR_TYPES: readonly ["user", "system", "api_key"];
|
|
6168
|
+
type ActorType = (typeof ACTOR_TYPES)[number];
|
|
6117
6169
|
interface Activity {
|
|
6118
6170
|
id: string;
|
|
6119
6171
|
organizationId: string;
|
|
@@ -6125,8 +6177,12 @@ interface Activity {
|
|
|
6125
6177
|
entityId: string;
|
|
6126
6178
|
entityName: string | null;
|
|
6127
6179
|
metadata: Record<string, unknown> | null;
|
|
6180
|
+
/** Set when actorType is 'user'. FK to users(id). */
|
|
6128
6181
|
actorId: string | null;
|
|
6129
|
-
actorType
|
|
6182
|
+
/** Set when actorType is 'api_key'. FK to api_keys(id). */
|
|
6183
|
+
actorApiKeyId: string | null;
|
|
6184
|
+
/** Discriminator saying which of the two id fields above to read. */
|
|
6185
|
+
actorType: ActorType | null;
|
|
6130
6186
|
occurredAt: Date;
|
|
6131
6187
|
createdAt: Date;
|
|
6132
6188
|
}
|
package/dist/components/index.js
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
export { AppErrorBoundary, CrashErrorFallback, ErrorReportCard, buildErrorReport } from '../chunk-
|
|
2
|
-
import { useBreadcrumbs } from '../chunk-
|
|
1
|
+
export { AppErrorBoundary, CrashErrorFallback, ErrorReportCard, buildErrorReport } from '../chunk-TCQZ4AJI.js';
|
|
2
|
+
import { useBreadcrumbs } from '../chunk-TB2PM2OU.js';
|
|
3
3
|
import '../chunk-AH52XQB7.js';
|
|
4
|
-
import { showAuthError } from '../chunk-
|
|
5
|
-
export { CreateCredentialModal, CredentialList, CredentialSettings, MembershipStatusBadge, OAuthConnectModal, OrganizationMembershipsList, ProvisioningStateBadge, WebhookUrlDisplayModal, showAuthError } from '../chunk-
|
|
4
|
+
import { showAuthError } from '../chunk-CPBT6Z2G.js';
|
|
5
|
+
export { CreateCredentialModal, CredentialList, CredentialSettings, MembershipStatusBadge, OAuthConnectModal, OrganizationMembershipsList, ProvisioningStateBadge, WebhookUrlDisplayModal, showAuthError } from '../chunk-CPBT6Z2G.js';
|
|
6
6
|
import '../chunk-ZFISGKYW.js';
|
|
7
|
-
import '../chunk-
|
|
8
|
-
import { setDealReferrer, compareDealsByPriority } from '../chunk-
|
|
9
|
-
export { ActivityFeedWidget, CompanyDetailPage, ContactDetailPage, CrmOverview, CrmSidebar, CrmSidebarTop, DealDetailPage, DealsListPage, MetricsStrip, PIPELINE_FUNNEL_ORDER, PipelineFunnelWidget, useCrmPipelineSummary, useCrmQuickMetrics, useRecentCrmActivity } from '../chunk-
|
|
10
|
-
export { AllTasksPage, HealthStatusCard, MilestoneTimeline, ProjectDetailPage, ProjectsListPage, ProjectsSidebar, ProjectsSidebarMiddle, ProjectsSidebarTop, TaskCard, UpcomingMilestonesPage } from '../chunk-
|
|
11
|
-
export { LEAD_GEN_ROUTE_LINKS, LeadGenCompaniesPage, LeadGenContactsPage, LeadGenListDetailPage, LeadGenListsPage, LeadGenOverviewPage, LeadGenRouteShell, LeadGenSidebar, LeadGenSidebarTop, StepConfigForm, TabSection, getEnrichmentColor, getStatusColor, useDeleteLists } from '../chunk-
|
|
12
|
-
import '../chunk-
|
|
13
|
-
export { ActionModal, AgentDefinitionDisplay, AgentExecutionLogs, BaseExecutionLogs, BaseExecutionLogsHeader, BaseExecutionLogsStates, CommandQueueTaskRow, ConfigCard, ContentSections, ContextUsageBadge, ContractDisplay, ExecutionErrorSection, LogEntry, LogGroup, ResourceDefinitionSection, ResourceErrorState, ResourceFilter, ResourceHeader, ResourceNotFoundState, SessionMemory, ToolsListDisplay, WorkflowDefinitionDisplay, WorkflowExecutionLogs, getExecutionStatusConfig, getIcon, getLogLevelConfig, iconMap } from '../chunk-
|
|
7
|
+
import '../chunk-DH2MO5DX.js';
|
|
8
|
+
import { setDealReferrer, compareDealsByPriority } from '../chunk-VHPHWTX7.js';
|
|
9
|
+
export { ActivityFeedWidget, CompanyDetailPage, ContactDetailPage, CrmOverview, CrmSidebar, CrmSidebarTop, DealDetailPage, DealsListPage, MetricsStrip, PIPELINE_FUNNEL_ORDER, PipelineFunnelWidget, useCrmPipelineSummary, useCrmQuickMetrics, useRecentCrmActivity } from '../chunk-VHPHWTX7.js';
|
|
10
|
+
export { AllTasksPage, HealthStatusCard, MilestoneTimeline, ProjectDetailPage, ProjectsListPage, ProjectsSidebar, ProjectsSidebarMiddle, ProjectsSidebarTop, TaskCard, UpcomingMilestonesPage } from '../chunk-BM2WKRAQ.js';
|
|
11
|
+
export { LEAD_GEN_ROUTE_LINKS, LeadGenCompaniesPage, LeadGenContactsPage, LeadGenListDetailPage, LeadGenListsPage, LeadGenOverviewPage, LeadGenRouteShell, LeadGenSidebar, LeadGenSidebarTop, StepConfigForm, TabSection, getEnrichmentColor, getStatusColor, useDeleteLists } from '../chunk-H3SDGC5F.js';
|
|
12
|
+
import '../chunk-LL5H7J4N.js';
|
|
13
|
+
export { ActionModal, AgentDefinitionDisplay, AgentExecutionLogs, BaseExecutionLogs, BaseExecutionLogsHeader, BaseExecutionLogsStates, CommandQueueTaskRow, ConfigCard, ContentSections, ContextUsageBadge, ContractDisplay, ExecutionErrorSection, LogEntry, LogGroup, ResourceDefinitionSection, ResourceErrorState, ResourceFilter, ResourceHeader, ResourceNotFoundState, SessionMemory, ToolsListDisplay, WorkflowDefinitionDisplay, WorkflowExecutionLogs, getExecutionStatusConfig, getIcon, getLogLevelConfig, iconMap } from '../chunk-TVFSVTRG.js';
|
|
14
14
|
import '../chunk-6ZAP3FOA.js';
|
|
15
|
-
import '../chunk-
|
|
16
|
-
export { AgentExecutionTimeline, AgentExecutionVisualizer, AgentIterationDetailPanel, AgentIterationEdge, AgentIterationNode, BaseEdge, BaseNode, CollapsibleJsonSection, EmptyVisualizer, ExecutionStats, ExecutionStatusBadge, GraphBackground, GraphContainer, GraphFitViewButton, GraphFitViewHandler, GraphLegend, RunResourceButton, TimelineAxis, TimelineBar, TimelineContainer, TimelineRow, UnifiedWorkflowEdge, UnifiedWorkflowGraph, UnifiedWorkflowNode, VisualizerContainer, WorkflowExecutionTimeline, getGraphBackgroundStyles, useGraphBackgroundStyles, useGraphTheme } from '../chunk-
|
|
15
|
+
import '../chunk-AIOV5NM7.js';
|
|
16
|
+
export { AgentExecutionTimeline, AgentExecutionVisualizer, AgentIterationDetailPanel, AgentIterationEdge, AgentIterationNode, BaseEdge, BaseNode, CollapsibleJsonSection, EmptyVisualizer, ExecutionStats, ExecutionStatusBadge, GraphBackground, GraphContainer, GraphFitViewButton, GraphFitViewHandler, GraphLegend, RunResourceButton, TimelineAxis, TimelineBar, TimelineContainer, TimelineRow, UnifiedWorkflowEdge, UnifiedWorkflowGraph, UnifiedWorkflowNode, VisualizerContainer, WorkflowExecutionTimeline, getGraphBackgroundStyles, useGraphBackgroundStyles, useGraphTheme } from '../chunk-JTSNU6KA.js';
|
|
17
17
|
export { ZodFormRenderer } from '../chunk-3MEXPLWT.js';
|
|
18
18
|
import '../chunk-SNZDFCOQ.js';
|
|
19
|
-
import { NotificationList } from '../chunk-
|
|
20
|
-
export { ActivityCard, ActivityFilters as ActivityFiltersBar, ActivityTable, BusinessImpactCard, CostBreakdownCard, CostByModelTable, CostMetricsCard, ErrorAnalysisCard, ErrorBreakdownTable, ExecutionBreakdownTable, ExecutionHealthCard, ExecutionLogsFilters as ExecutionLogsFilterBar, ExecutionLogsTable, NotificationItem, NotificationList } from '../chunk-
|
|
21
|
-
export { ResourceHealthPanel } from '../chunk-
|
|
19
|
+
import { NotificationList } from '../chunk-3BLYJT5L.js';
|
|
20
|
+
export { ActivityCard, ActivityFilters as ActivityFiltersBar, ActivityTable, BusinessImpactCard, CostBreakdownCard, CostByModelTable, CostMetricsCard, ErrorAnalysisCard, ErrorBreakdownTable, ExecutionBreakdownTable, ExecutionHealthCard, ExecutionLogsFilters as ExecutionLogsFilterBar, ExecutionLogsTable, NotificationItem, NotificationList } from '../chunk-3BLYJT5L.js';
|
|
21
|
+
export { ResourceHealthPanel } from '../chunk-VRRIHA3S.js';
|
|
22
22
|
export { ResourceHealthChart, getHealthColor } from '../chunk-LGKLC5MG.js';
|
|
23
23
|
export { Graph_module_css_default as graphStyles } from '../chunk-HENXLGVD.js';
|
|
24
|
-
import { AppShellLoader } from '../chunk-
|
|
24
|
+
import { AppShellLoader } from '../chunk-DCMFNSJ6.js';
|
|
25
25
|
export { calculateProgress, formatStatusLabel, milestoneStatusColors, noteTypeColors, projectStatusColors, taskStatusColors, taskTypeColors } from '../chunk-DLR4SDZW.js';
|
|
26
26
|
import '../chunk-BZZCNLT6.js';
|
|
27
27
|
export { SortableHeader, TableSelectionToolbar } from '../chunk-TUMSNGTX.js';
|
|
28
28
|
import { FilterBar } from '../chunk-PDHTXPSF.js';
|
|
29
29
|
export { FilterBar } from '../chunk-PDHTXPSF.js';
|
|
30
|
-
import { useCreateOrgRole, usePermissionCatalog, CustomModal, useMarkAllAsRead, useNotifications, useUpdateApiKey, useDeleteApiKey, ListSkeleton, EmptyState, useCreateApiKey, useListApiKeys, PageTitleCaption, StatCard, usePaginationState, useActivateDeployment, useDeactivateDeployment, useDeleteDeployment, useListDeployments, useResources, useCreateSchedule, useListSchedules, usePauseSchedule, useResumeSchedule, useCancelSchedule, useDeleteSchedule, CenteredErrorState, useDeals, useTransitionItem, dealKeys, SubshellContentContainer } from '../chunk-
|
|
31
|
-
export { APIErrorAlert, ActivityTimeline, CenteredErrorState, CheckpointGroup, CollapsibleSection, CommandQueueSidebar, CommandQueueSidebarMiddle, CommandQueueSidebarTop, ConfirmationInputModal, ConfirmationModal, ContextViewer, CrmSidebarMiddle, CustomModal, CustomSelector, DetailCardSkeleton, ElevasisLoader, EmptyState, FeatureUnavailableState, GlowDot, JsonViewer, LeadGenSidebarMiddle, ListSkeleton, MyTasksPanel, NavigationButton, OperationsSidebar, OperationsSidebarMiddle, OperationsSidebarTop, OrganizationModelDriftActionIcon, PageNotFound, PageTitleCaption, QuickCreateActions, ResourceCard, SAVED_VIEW_PRESETS, SavedViewsPanel, StatCard, StatCardSkeleton, StatsCardSkeleton, StatusBadge, TabCountBadge, TimeRangeSelector, TrendIndicator, crmManifest, deliveryManifest, leadGenManifest, monitoringManifest, operationsManifest, settingsManifest } from '../chunk-
|
|
30
|
+
import { useCreateOrgRole, usePermissionCatalog, CustomModal, useMarkAllAsRead, useNotifications, useUpdateApiKey, useDeleteApiKey, ListSkeleton, EmptyState, useCreateApiKey, useListApiKeys, PageTitleCaption, StatCard, usePaginationState, useActivateDeployment, useDeactivateDeployment, useDeleteDeployment, useListDeployments, useResources, useCreateSchedule, useListSchedules, usePauseSchedule, useResumeSchedule, useCancelSchedule, useDeleteSchedule, CenteredErrorState, useDeals, useTransitionItem, dealKeys, SubshellContentContainer } from '../chunk-UZ7MSORW.js';
|
|
31
|
+
export { APIErrorAlert, ActivityTimeline, CenteredErrorState, CheckpointGroup, CollapsibleSection, CommandQueueSidebar, CommandQueueSidebarMiddle, CommandQueueSidebarTop, ConfirmationInputModal, ConfirmationModal, ContextViewer, CrmSidebarMiddle, CustomModal, CustomSelector, DetailCardSkeleton, ElevasisLoader, EmptyState, FeatureUnavailableState, GlowDot, JsonViewer, LeadGenSidebarMiddle, ListSkeleton, MyTasksPanel, NavigationButton, OperationsSidebar, OperationsSidebarMiddle, OperationsSidebarTop, OrganizationModelDriftActionIcon, PageNotFound, PageTitleCaption, QuickCreateActions, ResourceCard, SAVED_VIEW_PRESETS, SavedViewsPanel, StatCard, StatCardSkeleton, StatsCardSkeleton, StatusBadge, TabCountBadge, TimeRangeSelector, TrendIndicator, crmManifest, deliveryManifest, leadGenManifest, monitoringManifest, operationsManifest, settingsManifest } from '../chunk-UZ7MSORW.js';
|
|
32
32
|
import '../chunk-R6NMRXNO.js';
|
|
33
33
|
import '../chunk-RBGVNPA6.js';
|
|
34
34
|
import '../chunk-MKH2KOAO.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { useBreadcrumbs } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
1
|
+
export { useBreadcrumbs } from '../../chunk-TB2PM2OU.js';
|
|
2
|
+
import '../../chunk-UZ7MSORW.js';
|
|
3
3
|
import '../../chunk-R6NMRXNO.js';
|
|
4
4
|
import '../../chunk-RBGVNPA6.js';
|
|
5
5
|
import '../../chunk-MKH2KOAO.js';
|
|
@@ -1043,6 +1043,7 @@ type Database = {
|
|
|
1043
1043
|
activities: {
|
|
1044
1044
|
Row: {
|
|
1045
1045
|
activity_type: string;
|
|
1046
|
+
actor_api_key_id: string | null;
|
|
1046
1047
|
actor_id: string | null;
|
|
1047
1048
|
actor_type: string | null;
|
|
1048
1049
|
created_at: string;
|
|
@@ -1059,6 +1060,7 @@ type Database = {
|
|
|
1059
1060
|
};
|
|
1060
1061
|
Insert: {
|
|
1061
1062
|
activity_type: string;
|
|
1063
|
+
actor_api_key_id?: string | null;
|
|
1062
1064
|
actor_id?: string | null;
|
|
1063
1065
|
actor_type?: string | null;
|
|
1064
1066
|
created_at?: string;
|
|
@@ -1075,6 +1077,7 @@ type Database = {
|
|
|
1075
1077
|
};
|
|
1076
1078
|
Update: {
|
|
1077
1079
|
activity_type?: string;
|
|
1080
|
+
actor_api_key_id?: string | null;
|
|
1078
1081
|
actor_id?: string | null;
|
|
1079
1082
|
actor_type?: string | null;
|
|
1080
1083
|
created_at?: string;
|
|
@@ -1090,6 +1093,13 @@ type Database = {
|
|
|
1090
1093
|
title?: string;
|
|
1091
1094
|
};
|
|
1092
1095
|
Relationships: [
|
|
1096
|
+
{
|
|
1097
|
+
foreignKeyName: "activities_actor_api_key_id_fkey";
|
|
1098
|
+
columns: ["actor_api_key_id"];
|
|
1099
|
+
isOneToOne: false;
|
|
1100
|
+
referencedRelation: "api_keys";
|
|
1101
|
+
referencedColumns: ["id"];
|
|
1102
|
+
},
|
|
1093
1103
|
{
|
|
1094
1104
|
foreignKeyName: "activities_actor_id_fkey";
|
|
1095
1105
|
columns: ["actor_id"];
|
|
@@ -1177,6 +1187,7 @@ type Database = {
|
|
|
1177
1187
|
api_keys: {
|
|
1178
1188
|
Row: {
|
|
1179
1189
|
created_at: string | null;
|
|
1190
|
+
created_by: string | null;
|
|
1180
1191
|
id: string;
|
|
1181
1192
|
key_hash: string;
|
|
1182
1193
|
last_used_at: string | null;
|
|
@@ -1185,6 +1196,7 @@ type Database = {
|
|
|
1185
1196
|
};
|
|
1186
1197
|
Insert: {
|
|
1187
1198
|
created_at?: string | null;
|
|
1199
|
+
created_by?: string | null;
|
|
1188
1200
|
id?: string;
|
|
1189
1201
|
key_hash: string;
|
|
1190
1202
|
last_used_at?: string | null;
|
|
@@ -1193,6 +1205,7 @@ type Database = {
|
|
|
1193
1205
|
};
|
|
1194
1206
|
Update: {
|
|
1195
1207
|
created_at?: string | null;
|
|
1208
|
+
created_by?: string | null;
|
|
1196
1209
|
id?: string;
|
|
1197
1210
|
key_hash?: string;
|
|
1198
1211
|
last_used_at?: string | null;
|
|
@@ -1200,6 +1213,13 @@ type Database = {
|
|
|
1200
1213
|
organization_id?: string;
|
|
1201
1214
|
};
|
|
1202
1215
|
Relationships: [
|
|
1216
|
+
{
|
|
1217
|
+
foreignKeyName: "api_keys_created_by_fkey";
|
|
1218
|
+
columns: ["created_by"];
|
|
1219
|
+
isOneToOne: false;
|
|
1220
|
+
referencedRelation: "users";
|
|
1221
|
+
referencedColumns: ["id"];
|
|
1222
|
+
},
|
|
1203
1223
|
{
|
|
1204
1224
|
foreignKeyName: "api_keys_organization_id_fkey";
|
|
1205
1225
|
columns: ["organization_id"];
|
|
@@ -1527,6 +1547,7 @@ type Database = {
|
|
|
1527
1547
|
organization_id: string;
|
|
1528
1548
|
payload: Json;
|
|
1529
1549
|
source_execution_id: string | null;
|
|
1550
|
+
status: string;
|
|
1530
1551
|
step_key: string | null;
|
|
1531
1552
|
};
|
|
1532
1553
|
Insert: {
|
|
@@ -1538,6 +1559,7 @@ type Database = {
|
|
|
1538
1559
|
organization_id: string;
|
|
1539
1560
|
payload?: Json;
|
|
1540
1561
|
source_execution_id?: string | null;
|
|
1562
|
+
status: string;
|
|
1541
1563
|
step_key?: string | null;
|
|
1542
1564
|
};
|
|
1543
1565
|
Update: {
|
|
@@ -1549,6 +1571,7 @@ type Database = {
|
|
|
1549
1571
|
organization_id?: string;
|
|
1550
1572
|
payload?: Json;
|
|
1551
1573
|
source_execution_id?: string | null;
|
|
1574
|
+
status?: string;
|
|
1552
1575
|
step_key?: string | null;
|
|
1553
1576
|
};
|
|
1554
1577
|
Relationships: [
|
|
@@ -1700,6 +1723,7 @@ type Database = {
|
|
|
1700
1723
|
kind: string;
|
|
1701
1724
|
metadata: Json;
|
|
1702
1725
|
organization_id: string;
|
|
1726
|
+
payload: Json;
|
|
1703
1727
|
processing_state: Json;
|
|
1704
1728
|
storage_path: string | null;
|
|
1705
1729
|
title: string;
|
|
@@ -1713,6 +1737,7 @@ type Database = {
|
|
|
1713
1737
|
kind: string;
|
|
1714
1738
|
metadata?: Json;
|
|
1715
1739
|
organization_id: string;
|
|
1740
|
+
payload?: Json;
|
|
1716
1741
|
processing_state?: Json;
|
|
1717
1742
|
storage_path?: string | null;
|
|
1718
1743
|
title: string;
|
|
@@ -1726,6 +1751,7 @@ type Database = {
|
|
|
1726
1751
|
kind?: string;
|
|
1727
1752
|
metadata?: Json;
|
|
1728
1753
|
organization_id?: string;
|
|
1754
|
+
payload?: Json;
|
|
1729
1755
|
processing_state?: Json;
|
|
1730
1756
|
storage_path?: string | null;
|
|
1731
1757
|
title?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AppShellError } from '../../chunk-
|
|
2
|
-
import { computeProtectedRouteGate, DEFAULT_WAIT_FOR_ORGANIZATION, ProtectedRoute, AppearanceContext, useAppearance } from '../../chunk-
|
|
3
|
-
export { AccessGuard } from '../../chunk-
|
|
1
|
+
import { AppShellError } from '../../chunk-DCMFNSJ6.js';
|
|
2
|
+
import { computeProtectedRouteGate, DEFAULT_WAIT_FOR_ORGANIZATION, ProtectedRoute, AppearanceContext, useAppearance } from '../../chunk-UZ7MSORW.js';
|
|
3
|
+
export { AccessGuard } from '../../chunk-UZ7MSORW.js';
|
|
4
4
|
import '../../chunk-R6NMRXNO.js';
|
|
5
5
|
import '../../chunk-RBGVNPA6.js';
|
|
6
6
|
import '../../chunk-MKH2KOAO.js';
|
|
@@ -2,8 +2,8 @@ import '../../chunk-DLR4SDZW.js';
|
|
|
2
2
|
import { PageContainer } from '../../chunk-BZZCNLT6.js';
|
|
3
3
|
import '../../chunk-TUMSNGTX.js';
|
|
4
4
|
import { FilterBar } from '../../chunk-PDHTXPSF.js';
|
|
5
|
-
import { useClientStatus, StatCard, EmptyState, useCreateClient, CustomModal, useUpdateClient, useDeleteClient, usePaginationState, useClients, SubshellContentContainer, PageTitleCaption, CenteredErrorState, useClient } from '../../chunk-
|
|
6
|
-
export { clientsManifest } from '../../chunk-
|
|
5
|
+
import { useClientStatus, StatCard, EmptyState, useCreateClient, CustomModal, useUpdateClient, useDeleteClient, usePaginationState, useClients, SubshellContentContainer, PageTitleCaption, CenteredErrorState, useClient } from '../../chunk-UZ7MSORW.js';
|
|
6
|
+
export { clientsManifest } from '../../chunk-UZ7MSORW.js';
|
|
7
7
|
import '../../chunk-R6NMRXNO.js';
|
|
8
8
|
import '../../chunk-RBGVNPA6.js';
|
|
9
9
|
import '../../chunk-MKH2KOAO.js';
|
|
@@ -1266,9 +1266,13 @@ declare const ContentItemResponseSchema: z.ZodObject<{
|
|
|
1266
1266
|
status: z.ZodEnum<{
|
|
1267
1267
|
error: "error";
|
|
1268
1268
|
success: "success";
|
|
1269
|
+
running: "running";
|
|
1269
1270
|
no_result: "no_result";
|
|
1270
1271
|
skipped: "skipped";
|
|
1271
1272
|
}>;
|
|
1273
|
+
attemptId: z.ZodString;
|
|
1274
|
+
executionId: z.ZodNullable<z.ZodString>;
|
|
1275
|
+
attemptedAt: z.ZodString;
|
|
1272
1276
|
data: z.ZodOptional<z.ZodUnknown>;
|
|
1273
1277
|
}, z.core.$loose>>;
|
|
1274
1278
|
reviewedAt: z.ZodNullable<z.ZodString>;
|
|
@@ -1282,6 +1286,89 @@ declare const ContentItemResponseSchema: z.ZodObject<{
|
|
|
1282
1286
|
}, z.core.$strip>;
|
|
1283
1287
|
type ContentItemResponse = z.infer<typeof ContentItemResponseSchema>;
|
|
1284
1288
|
|
|
1289
|
+
/**
|
|
1290
|
+
* `deriveContentBoard` -- a pure function of `(items, pipeline, now)`. No React, no
|
|
1291
|
+
* hooks, no fetching. `content_items` has NO `step_key` column (only
|
|
1292
|
+
* `content_item_attempts` does), so an item's current step is derived from
|
|
1293
|
+
* `processingState`, whose declared shape is
|
|
1294
|
+
* `Record<stepKey, { status: 'running' | 'success' | 'no_result' | 'skipped' | 'error';
|
|
1295
|
+
* attemptId: string; executionId: string | null; attemptedAt: string; data?: unknown }>`.
|
|
1296
|
+
* `'running'` (added 2026-08-14, the step-state model) is the only in-flight value;
|
|
1297
|
+
* every other member is terminal.
|
|
1298
|
+
*
|
|
1299
|
+
* Placement rule (implemented exactly as follows):
|
|
1300
|
+
*
|
|
1301
|
+
* 1. Sort the pipeline's steps ascending by `order`. Ties break by `key` so the result
|
|
1302
|
+
* is deterministic.
|
|
1303
|
+
* 2. An item's current step is the first step in that order whose `processingState`
|
|
1304
|
+
* entry is missing, or present with a status other than `'success'`. Rationale:
|
|
1305
|
+
* `processingState` records what has run; a step recorded `'success'` is behind the
|
|
1306
|
+
* item -- `'running'` falls out of this rule unchanged: a step mid-flight is not
|
|
1307
|
+
* `'success'`, so it holds the item at that column exactly like `'error'` or
|
|
1308
|
+
* `'skipped'` already do.
|
|
1309
|
+
* 3. If every declared step has a `'success'` entry, `stepKey` is `null` and the card
|
|
1310
|
+
* goes in `done`.
|
|
1311
|
+
* 4. If `processingState` is empty (`{}`), the item sits at the first step -- nothing
|
|
1312
|
+
* has run yet.
|
|
1313
|
+
* 5. A card goes in `unplaced` only when `processingState` is non-empty AND none of its
|
|
1314
|
+
* keys appear in the catalog. This is the honest bucket for an item produced against
|
|
1315
|
+
* a step catalog that has since changed; unplaced items are never silently dropped
|
|
1316
|
+
* into column 1.
|
|
1317
|
+
*/
|
|
1318
|
+
interface ContentBoardCard {
|
|
1319
|
+
item: ContentItemResponse;
|
|
1320
|
+
/** Step key this item currently sits at. `null` when every declared step has succeeded. */
|
|
1321
|
+
stepKey: string | null;
|
|
1322
|
+
/** Milliseconds since `item.updatedAt`, measured against the `now` argument. */
|
|
1323
|
+
ageMs: number;
|
|
1324
|
+
/** True when this card is waiting on a person: its step's reviewMode is not 'none' and `reviewedAt` is null. */
|
|
1325
|
+
awaitingReview: boolean;
|
|
1326
|
+
}
|
|
1327
|
+
interface ContentBoardGate {
|
|
1328
|
+
/** The review mode of the step this gate follows. Never 'none' -- a 'none' step has no gate. */
|
|
1329
|
+
reviewMode: Exclude<ContentPipelineStepReviewMode, 'none'>;
|
|
1330
|
+
/** How many cards in the preceding column are awaiting review. */
|
|
1331
|
+
waitingCount: number;
|
|
1332
|
+
}
|
|
1333
|
+
interface ContentBoardColumn {
|
|
1334
|
+
step: ContentPipelineStepEntry;
|
|
1335
|
+
cards: ContentBoardCard[];
|
|
1336
|
+
/** Present when this step's reviewMode is 'live' or 'queued'. Absent on a 'none' step. */
|
|
1337
|
+
gate?: ContentBoardGate;
|
|
1338
|
+
}
|
|
1339
|
+
interface ContentBoard {
|
|
1340
|
+
columns: ContentBoardColumn[];
|
|
1341
|
+
/** Cards whose every declared step succeeded. */
|
|
1342
|
+
done: ContentBoardCard[];
|
|
1343
|
+
/** Cards whose processingState names only step keys the catalog does not declare. */
|
|
1344
|
+
unplaced: ContentBoardCard[];
|
|
1345
|
+
/** True when the pipeline declares 0 or 1 steps -- the consumer renders pick-then-review, not columns. */
|
|
1346
|
+
isCollapsed: boolean;
|
|
1347
|
+
}
|
|
1348
|
+
declare function deriveContentBoard(items: ContentItemResponse[], pipeline: ContentPipelineTemplate, now: number): ContentBoard;
|
|
1349
|
+
|
|
1350
|
+
/**
|
|
1351
|
+
* `getContentItemIdentity` -- a pure function that names a content item for display when
|
|
1352
|
+
* `title` cannot be trusted to do it. The tenant `nirvana-marketing`'s drafts have no
|
|
1353
|
+
* titles at all, so a title-first surface renders an empty or meaningless column. A
|
|
1354
|
+
* post's identity is its opening line.
|
|
1355
|
+
*
|
|
1356
|
+
* Resolution order, first non-empty wins:
|
|
1357
|
+
* 1. First non-blank line of `item.body`.
|
|
1358
|
+
* 2. The first string-valued field of `item.payload`, taken in `payloadFields`
|
|
1359
|
+
* declaration order when that argument is supplied, otherwise `Object.keys` order.
|
|
1360
|
+
* Only a non-blank string value counts.
|
|
1361
|
+
* 3. `item.title`, when non-blank.
|
|
1362
|
+
* 4. The literal `'Untitled'`.
|
|
1363
|
+
*
|
|
1364
|
+
* The resolved candidate is then normalized: runs of whitespace collapse to one space,
|
|
1365
|
+
* the result is trimmed, and anything longer than `maxLength` is truncated at the last
|
|
1366
|
+
* word boundary at or before `maxLength` with a trailing `'…'` -- never mid-word.
|
|
1367
|
+
* The source complaint this fixes is titles clipped mid-word
|
|
1368
|
+
* (`MOCK Pipeline Walk S…`).
|
|
1369
|
+
*/
|
|
1370
|
+
declare function getContentItemIdentity(item: Pick<ContentItemResponse, 'title' | 'body' | 'payload'>, payloadFields?: ContentPayloadFieldDeclaration[], maxLength?: number): string;
|
|
1371
|
+
|
|
1285
1372
|
type SystemSidebarComponent = ComponentType;
|
|
1286
1373
|
type SystemIconComponent = ComponentType<{
|
|
1287
1374
|
size?: number;
|
|
@@ -1582,6 +1669,14 @@ interface ContentReviewAction {
|
|
|
1582
1669
|
* a one-click irreversible action.
|
|
1583
1670
|
*/
|
|
1584
1671
|
consequence?: 'standard' | 'irreversible';
|
|
1672
|
+
/**
|
|
1673
|
+
* Disables this action's button -- e.g. the item has no open review gate to clear.
|
|
1674
|
+
* Renders inert rather than firing a call that the server rejects. Pair with
|
|
1675
|
+
* `disabledReason` so the reviewer sees why, not just a greyed-out button.
|
|
1676
|
+
*/
|
|
1677
|
+
disabled?: boolean;
|
|
1678
|
+
/** Shown in a Tooltip over the button while `disabled` is true. */
|
|
1679
|
+
disabledReason?: string;
|
|
1585
1680
|
}
|
|
1586
1681
|
interface ReviewActionBarProps {
|
|
1587
1682
|
/**
|
|
@@ -1785,84 +1880,6 @@ interface ContentConfig {
|
|
|
1785
1880
|
*/
|
|
1786
1881
|
declare function useContentConfig(): ContentConfig;
|
|
1787
1882
|
|
|
1788
|
-
/**
|
|
1789
|
-
* `deriveContentBoard` -- a pure function of `(items, pipeline, now)`. No React, no
|
|
1790
|
-
* hooks, no fetching. `content_items` has NO `step_key` column (only
|
|
1791
|
-
* `content_item_attempts` does), so an item's current step is derived from
|
|
1792
|
-
* `processingState`, whose declared shape is
|
|
1793
|
-
* `Record<stepKey, { status: 'success' | 'no_result' | 'skipped' | 'error'; data?: unknown }>`.
|
|
1794
|
-
*
|
|
1795
|
-
* Placement rule (implemented exactly as follows):
|
|
1796
|
-
*
|
|
1797
|
-
* 1. Sort the pipeline's steps ascending by `order`. Ties break by `key` so the result
|
|
1798
|
-
* is deterministic.
|
|
1799
|
-
* 2. An item's current step is the first step in that order whose `processingState`
|
|
1800
|
-
* entry is missing, or present with a status other than `'success'`. Rationale:
|
|
1801
|
-
* `processingState` records what has run; a step recorded `'success'` is behind the
|
|
1802
|
-
* item.
|
|
1803
|
-
* 3. If every declared step has a `'success'` entry, `stepKey` is `null` and the card
|
|
1804
|
-
* goes in `done`.
|
|
1805
|
-
* 4. If `processingState` is empty (`{}`), the item sits at the first step -- nothing
|
|
1806
|
-
* has run yet.
|
|
1807
|
-
* 5. A card goes in `unplaced` only when `processingState` is non-empty AND none of its
|
|
1808
|
-
* keys appear in the catalog. This is the honest bucket for an item produced against
|
|
1809
|
-
* a step catalog that has since changed; unplaced items are never silently dropped
|
|
1810
|
-
* into column 1.
|
|
1811
|
-
*/
|
|
1812
|
-
interface ContentBoardCard {
|
|
1813
|
-
item: ContentItemResponse;
|
|
1814
|
-
/** Step key this item currently sits at. `null` when every declared step has succeeded. */
|
|
1815
|
-
stepKey: string | null;
|
|
1816
|
-
/** Milliseconds since `item.updatedAt`, measured against the `now` argument. */
|
|
1817
|
-
ageMs: number;
|
|
1818
|
-
/** True when this card is waiting on a person: its step's reviewMode is not 'none' and `reviewedAt` is null. */
|
|
1819
|
-
awaitingReview: boolean;
|
|
1820
|
-
}
|
|
1821
|
-
interface ContentBoardGate {
|
|
1822
|
-
/** The review mode of the step this gate follows. Never 'none' -- a 'none' step has no gate. */
|
|
1823
|
-
reviewMode: Exclude<ContentPipelineStepReviewMode, 'none'>;
|
|
1824
|
-
/** How many cards in the preceding column are awaiting review. */
|
|
1825
|
-
waitingCount: number;
|
|
1826
|
-
}
|
|
1827
|
-
interface ContentBoardColumn {
|
|
1828
|
-
step: ContentPipelineStepEntry;
|
|
1829
|
-
cards: ContentBoardCard[];
|
|
1830
|
-
/** Present when this step's reviewMode is 'live' or 'queued'. Absent on a 'none' step. */
|
|
1831
|
-
gate?: ContentBoardGate;
|
|
1832
|
-
}
|
|
1833
|
-
interface ContentBoard {
|
|
1834
|
-
columns: ContentBoardColumn[];
|
|
1835
|
-
/** Cards whose every declared step succeeded. */
|
|
1836
|
-
done: ContentBoardCard[];
|
|
1837
|
-
/** Cards whose processingState names only step keys the catalog does not declare. */
|
|
1838
|
-
unplaced: ContentBoardCard[];
|
|
1839
|
-
/** True when the pipeline declares 0 or 1 steps -- the consumer renders pick-then-review, not columns. */
|
|
1840
|
-
isCollapsed: boolean;
|
|
1841
|
-
}
|
|
1842
|
-
declare function deriveContentBoard(items: ContentItemResponse[], pipeline: ContentPipelineTemplate, now: number): ContentBoard;
|
|
1843
|
-
|
|
1844
|
-
/**
|
|
1845
|
-
* `getContentItemIdentity` -- a pure function that names a content item for display when
|
|
1846
|
-
* `title` cannot be trusted to do it. The tenant `nirvana-marketing`'s drafts have no
|
|
1847
|
-
* titles at all, so a title-first surface renders an empty or meaningless column. A
|
|
1848
|
-
* post's identity is its opening line.
|
|
1849
|
-
*
|
|
1850
|
-
* Resolution order, first non-empty wins:
|
|
1851
|
-
* 1. First non-blank line of `item.body`.
|
|
1852
|
-
* 2. The first string-valued field of `item.payload`, taken in `payloadFields`
|
|
1853
|
-
* declaration order when that argument is supplied, otherwise `Object.keys` order.
|
|
1854
|
-
* Only a non-blank string value counts.
|
|
1855
|
-
* 3. `item.title`, when non-blank.
|
|
1856
|
-
* 4. The literal `'Untitled'`.
|
|
1857
|
-
*
|
|
1858
|
-
* The resolved candidate is then normalized: runs of whitespace collapse to one space,
|
|
1859
|
-
* the result is trimmed, and anything longer than `maxLength` is truncated at the last
|
|
1860
|
-
* word boundary at or before `maxLength` with a trailing `'…'` -- never mid-word.
|
|
1861
|
-
* The source complaint this fixes is titles clipped mid-word
|
|
1862
|
-
* (`MOCK Pipeline Walk S…`).
|
|
1863
|
-
*/
|
|
1864
|
-
declare function getContentItemIdentity(item: Pick<ContentItemResponse, 'title' | 'body' | 'payload'>, payloadFields?: ContentPayloadFieldDeclaration[], maxLength?: number): string;
|
|
1865
|
-
|
|
1866
1883
|
/**
|
|
1867
1884
|
* Shared nav-item shape used by feature sidebar middle components.
|
|
1868
1885
|
*
|