@copilotz/admin 0.9.34 → 0.9.35
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/index.cjs +16 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +70 -2
- package/dist/index.d.ts +70 -2
- package/dist/index.js +8 -0
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { ReactNode, ComponentType } from 'react';
|
|
2
|
+
import React, { ReactNode, ComponentType } from 'react';
|
|
3
|
+
import { LucideIcon } from 'lucide-react';
|
|
3
4
|
|
|
4
5
|
type RequestHeadersProvider = () => Record<string, string> | Promise<Record<string, string>>;
|
|
5
6
|
type AdminDatePreset = "24h" | "7d" | "30d";
|
|
@@ -455,4 +456,71 @@ interface UseCopilotzAdminResult {
|
|
|
455
456
|
/** @deprecated Prefer the module-based CopilotzAdmin shell and createAdminClient. */
|
|
456
457
|
declare function useCopilotzAdmin(options?: UseCopilotzAdminOptions): UseCopilotzAdminResult;
|
|
457
458
|
|
|
458
|
-
|
|
459
|
+
declare function EmptyState({ action, description, icon: Icon, title, }: {
|
|
460
|
+
action?: React.ReactNode;
|
|
461
|
+
description?: React.ReactNode;
|
|
462
|
+
icon?: LucideIcon;
|
|
463
|
+
title: React.ReactNode;
|
|
464
|
+
}): react_jsx_runtime.JSX.Element;
|
|
465
|
+
|
|
466
|
+
declare function FilterBar({ actions, children, onSearchChange, searchPlaceholder, searchValue, }: {
|
|
467
|
+
actions?: React.ReactNode;
|
|
468
|
+
children?: React.ReactNode;
|
|
469
|
+
onSearchChange?: (value: string) => void;
|
|
470
|
+
searchPlaceholder?: string;
|
|
471
|
+
searchValue?: string;
|
|
472
|
+
}): react_jsx_runtime.JSX.Element;
|
|
473
|
+
|
|
474
|
+
declare function InspectorPanel({ children, className, side, }: {
|
|
475
|
+
children: React.ReactNode;
|
|
476
|
+
className?: string;
|
|
477
|
+
side?: React.ReactNode;
|
|
478
|
+
}): react_jsx_runtime.JSX.Element;
|
|
479
|
+
|
|
480
|
+
declare function JsonPanel({ minHeight, onSave, title, value, }: {
|
|
481
|
+
minHeight?: number;
|
|
482
|
+
onSave?: (value: Record<string, unknown>) => Promise<void> | void;
|
|
483
|
+
title?: string;
|
|
484
|
+
value: unknown;
|
|
485
|
+
}): react_jsx_runtime.JSX.Element;
|
|
486
|
+
|
|
487
|
+
interface MetricStripItem {
|
|
488
|
+
label: string;
|
|
489
|
+
value: React.ReactNode;
|
|
490
|
+
detail?: React.ReactNode;
|
|
491
|
+
icon?: LucideIcon;
|
|
492
|
+
}
|
|
493
|
+
declare function MetricStrip({ items }: {
|
|
494
|
+
items: MetricStripItem[];
|
|
495
|
+
}): react_jsx_runtime.JSX.Element;
|
|
496
|
+
|
|
497
|
+
declare function PageHeader({ actions, badges, description, title, }: {
|
|
498
|
+
actions?: React.ReactNode;
|
|
499
|
+
badges?: Array<{
|
|
500
|
+
label: string;
|
|
501
|
+
variant?: "default" | "secondary" | "outline" | "destructive";
|
|
502
|
+
}>;
|
|
503
|
+
description?: React.ReactNode;
|
|
504
|
+
title: React.ReactNode;
|
|
505
|
+
}): react_jsx_runtime.JSX.Element;
|
|
506
|
+
|
|
507
|
+
interface ResourceTableColumn<T> {
|
|
508
|
+
id: string;
|
|
509
|
+
header: React.ReactNode;
|
|
510
|
+
align?: "left" | "right";
|
|
511
|
+
className?: string;
|
|
512
|
+
render: (row: T) => React.ReactNode;
|
|
513
|
+
}
|
|
514
|
+
declare function ResourceTable<T>({ columns, empty, getRowKey, onRowClick, rows, }: {
|
|
515
|
+
columns: Array<ResourceTableColumn<T>>;
|
|
516
|
+
empty?: React.ReactNode;
|
|
517
|
+
getRowKey: (row: T, index: number) => string;
|
|
518
|
+
onRowClick?: (row: T) => void;
|
|
519
|
+
rows: T[];
|
|
520
|
+
}): react_jsx_runtime.JSX.Element;
|
|
521
|
+
|
|
522
|
+
declare function StatusBadge({ status }: {
|
|
523
|
+
status?: string | null;
|
|
524
|
+
}): react_jsx_runtime.JSX.Element;
|
|
525
|
+
|
|
526
|
+
export { ADMIN_GROUP_LABELS, ADMIN_GROUP_ORDER, type AdminActivityInterval, type AdminActivityPoint, type AdminAgentSummary, type AdminBranding, type AdminClientConfig, type AdminClientOptions, type AdminClientPaths, type AdminCollectionItem, type AdminCollectionPage, type AdminDatePreset, type AdminDetailPanel, type AdminMessage, type AdminMessagePage, type AdminMessagePageInfo, type AdminModule, type AdminModuleGroup, type AdminNavItem, type AdminOverview, type AdminParticipantDetail, type AdminParticipantSummary, type AdminPermissions, type AdminQueueEvent, type AdminRouteDefinition, type AdminRouteState, type AdminRuntimeContext, type AdminScope, type AdminThreadDetail, type AdminThreadSummary, type AdminUsageAttribution, type AdminUsageBreakdown, type AdminUsageDimension, type AdminUsageFilters, type AdminUsageGroupBy, type AdminUsageInterval, type AdminUsageMetricKind, type AdminUsagePoint, type AdminUsageResponse, type AdminUsageTotals, type AggregatedUsageRow, type CollectionEditor, type CollectionEditorProps, CopilotzAdmin, type CopilotzAdminClient, type CopilotzAdminProps, EMPTY_USAGE_TOTALS, EmptyState, FilterBar, InspectorPanel, JsonPanel, type LegacyAdminConfig, MetricStrip, type MetricStripItem, PageHeader, type RequestHeadersProvider, ResourceTable, type ResourceTableColumn, StatusBadge, type UsageCalculationOptions, type UsageChartSeries, type UsageChartState, type UseCopilotzAdminOptions, type UseCopilotzAdminResult, addUsageTotals, agentsModule, aggregateUsageRows, buildUsageChartState, canAccessAdminPermission, collectAdminNavItems, collectAdminRoutes, collectCollectionEditors, collectionsModule, createAdminClient, defaultAdminConfig, defaultCopilotzModules, eventsModule, firstAccessibleRoute, formatCompactMetric, formatMetricValue, formatNumber, formatPercent, formatUsageBucket, getUsageDimensionLabel, getUsageGroupLabel, getUsageRange, getUsageTotalValue, mergeAdminConfig, overviewModule, participantsModule, threadsModule, usageModule, useAdmin, useCopilotzAdmin };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { ReactNode, ComponentType } from 'react';
|
|
2
|
+
import React, { ReactNode, ComponentType } from 'react';
|
|
3
|
+
import { LucideIcon } from 'lucide-react';
|
|
3
4
|
|
|
4
5
|
type RequestHeadersProvider = () => Record<string, string> | Promise<Record<string, string>>;
|
|
5
6
|
type AdminDatePreset = "24h" | "7d" | "30d";
|
|
@@ -455,4 +456,71 @@ interface UseCopilotzAdminResult {
|
|
|
455
456
|
/** @deprecated Prefer the module-based CopilotzAdmin shell and createAdminClient. */
|
|
456
457
|
declare function useCopilotzAdmin(options?: UseCopilotzAdminOptions): UseCopilotzAdminResult;
|
|
457
458
|
|
|
458
|
-
|
|
459
|
+
declare function EmptyState({ action, description, icon: Icon, title, }: {
|
|
460
|
+
action?: React.ReactNode;
|
|
461
|
+
description?: React.ReactNode;
|
|
462
|
+
icon?: LucideIcon;
|
|
463
|
+
title: React.ReactNode;
|
|
464
|
+
}): react_jsx_runtime.JSX.Element;
|
|
465
|
+
|
|
466
|
+
declare function FilterBar({ actions, children, onSearchChange, searchPlaceholder, searchValue, }: {
|
|
467
|
+
actions?: React.ReactNode;
|
|
468
|
+
children?: React.ReactNode;
|
|
469
|
+
onSearchChange?: (value: string) => void;
|
|
470
|
+
searchPlaceholder?: string;
|
|
471
|
+
searchValue?: string;
|
|
472
|
+
}): react_jsx_runtime.JSX.Element;
|
|
473
|
+
|
|
474
|
+
declare function InspectorPanel({ children, className, side, }: {
|
|
475
|
+
children: React.ReactNode;
|
|
476
|
+
className?: string;
|
|
477
|
+
side?: React.ReactNode;
|
|
478
|
+
}): react_jsx_runtime.JSX.Element;
|
|
479
|
+
|
|
480
|
+
declare function JsonPanel({ minHeight, onSave, title, value, }: {
|
|
481
|
+
minHeight?: number;
|
|
482
|
+
onSave?: (value: Record<string, unknown>) => Promise<void> | void;
|
|
483
|
+
title?: string;
|
|
484
|
+
value: unknown;
|
|
485
|
+
}): react_jsx_runtime.JSX.Element;
|
|
486
|
+
|
|
487
|
+
interface MetricStripItem {
|
|
488
|
+
label: string;
|
|
489
|
+
value: React.ReactNode;
|
|
490
|
+
detail?: React.ReactNode;
|
|
491
|
+
icon?: LucideIcon;
|
|
492
|
+
}
|
|
493
|
+
declare function MetricStrip({ items }: {
|
|
494
|
+
items: MetricStripItem[];
|
|
495
|
+
}): react_jsx_runtime.JSX.Element;
|
|
496
|
+
|
|
497
|
+
declare function PageHeader({ actions, badges, description, title, }: {
|
|
498
|
+
actions?: React.ReactNode;
|
|
499
|
+
badges?: Array<{
|
|
500
|
+
label: string;
|
|
501
|
+
variant?: "default" | "secondary" | "outline" | "destructive";
|
|
502
|
+
}>;
|
|
503
|
+
description?: React.ReactNode;
|
|
504
|
+
title: React.ReactNode;
|
|
505
|
+
}): react_jsx_runtime.JSX.Element;
|
|
506
|
+
|
|
507
|
+
interface ResourceTableColumn<T> {
|
|
508
|
+
id: string;
|
|
509
|
+
header: React.ReactNode;
|
|
510
|
+
align?: "left" | "right";
|
|
511
|
+
className?: string;
|
|
512
|
+
render: (row: T) => React.ReactNode;
|
|
513
|
+
}
|
|
514
|
+
declare function ResourceTable<T>({ columns, empty, getRowKey, onRowClick, rows, }: {
|
|
515
|
+
columns: Array<ResourceTableColumn<T>>;
|
|
516
|
+
empty?: React.ReactNode;
|
|
517
|
+
getRowKey: (row: T, index: number) => string;
|
|
518
|
+
onRowClick?: (row: T) => void;
|
|
519
|
+
rows: T[];
|
|
520
|
+
}): react_jsx_runtime.JSX.Element;
|
|
521
|
+
|
|
522
|
+
declare function StatusBadge({ status }: {
|
|
523
|
+
status?: string | null;
|
|
524
|
+
}): react_jsx_runtime.JSX.Element;
|
|
525
|
+
|
|
526
|
+
export { ADMIN_GROUP_LABELS, ADMIN_GROUP_ORDER, type AdminActivityInterval, type AdminActivityPoint, type AdminAgentSummary, type AdminBranding, type AdminClientConfig, type AdminClientOptions, type AdminClientPaths, type AdminCollectionItem, type AdminCollectionPage, type AdminDatePreset, type AdminDetailPanel, type AdminMessage, type AdminMessagePage, type AdminMessagePageInfo, type AdminModule, type AdminModuleGroup, type AdminNavItem, type AdminOverview, type AdminParticipantDetail, type AdminParticipantSummary, type AdminPermissions, type AdminQueueEvent, type AdminRouteDefinition, type AdminRouteState, type AdminRuntimeContext, type AdminScope, type AdminThreadDetail, type AdminThreadSummary, type AdminUsageAttribution, type AdminUsageBreakdown, type AdminUsageDimension, type AdminUsageFilters, type AdminUsageGroupBy, type AdminUsageInterval, type AdminUsageMetricKind, type AdminUsagePoint, type AdminUsageResponse, type AdminUsageTotals, type AggregatedUsageRow, type CollectionEditor, type CollectionEditorProps, CopilotzAdmin, type CopilotzAdminClient, type CopilotzAdminProps, EMPTY_USAGE_TOTALS, EmptyState, FilterBar, InspectorPanel, JsonPanel, type LegacyAdminConfig, MetricStrip, type MetricStripItem, PageHeader, type RequestHeadersProvider, ResourceTable, type ResourceTableColumn, StatusBadge, type UsageCalculationOptions, type UsageChartSeries, type UsageChartState, type UseCopilotzAdminOptions, type UseCopilotzAdminResult, addUsageTotals, agentsModule, aggregateUsageRows, buildUsageChartState, canAccessAdminPermission, collectAdminNavItems, collectAdminRoutes, collectCollectionEditors, collectionsModule, createAdminClient, defaultAdminConfig, defaultCopilotzModules, eventsModule, firstAccessibleRoute, formatCompactMetric, formatMetricValue, formatNumber, formatPercent, formatUsageBucket, getUsageDimensionLabel, getUsageGroupLabel, getUsageRange, getUsageTotalValue, mergeAdminConfig, overviewModule, participantsModule, threadsModule, usageModule, useAdmin, useCopilotzAdmin };
|
package/dist/index.js
CHANGED
|
@@ -3898,6 +3898,14 @@ export {
|
|
|
3898
3898
|
ADMIN_GROUP_ORDER,
|
|
3899
3899
|
CopilotzAdmin,
|
|
3900
3900
|
EMPTY_USAGE_TOTALS,
|
|
3901
|
+
EmptyState,
|
|
3902
|
+
FilterBar,
|
|
3903
|
+
InspectorPanel,
|
|
3904
|
+
JsonPanel,
|
|
3905
|
+
MetricStrip,
|
|
3906
|
+
PageHeader,
|
|
3907
|
+
ResourceTable,
|
|
3908
|
+
StatusBadge,
|
|
3901
3909
|
addUsageTotals,
|
|
3902
3910
|
agentsModule,
|
|
3903
3911
|
aggregateUsageRows,
|