@mdxui/cockpit 0.2.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.
@@ -0,0 +1,764 @@
1
+ export { useAuth } from '@workos-inc/authkit-react';
2
+ import { Theme } from '@mdxui/themes';
3
+ export { Theme, ThemeMode, ThemePreset, ThemeScript, ThemeState, ThemeStore, applyThemeToElement, getResolvedMode, getThemeCSS, getThemeScriptContent, isThemePreset, themeCSS, themeNames, themePresets, useThemeStore } from '@mdxui/themes';
4
+ import * as react_jsx_runtime from 'react/jsx-runtime';
5
+ import { LucideIcon } from 'lucide-react';
6
+ import { ChartConfig } from '@mdxui/primitives/chart';
7
+ import * as React$1 from 'react';
8
+ import { ReactNode } from 'react';
9
+ import { ColumnDef } from '@tanstack/react-table';
10
+ import { SettingsProps, APIKeysProps, TeamProps, BillingProps } from 'mdxui';
11
+ import * as platform_do from 'platform.do';
12
+ import { $Context } from 'platform.do';
13
+
14
+ interface ActivityItem {
15
+ /** Unique ID */
16
+ id: string;
17
+ /** Activity type */
18
+ type: string;
19
+ /** Activity title/message */
20
+ title: string;
21
+ /** Activity description */
22
+ description?: string;
23
+ /** Activity timestamp */
24
+ timestamp: Date | string;
25
+ /** User who performed the activity */
26
+ user?: {
27
+ name: string;
28
+ avatar?: string;
29
+ };
30
+ /** Icon to display */
31
+ icon?: LucideIcon;
32
+ /** Status badge */
33
+ status?: {
34
+ label: string;
35
+ variant?: 'default' | 'secondary' | 'destructive' | 'outline';
36
+ };
37
+ /** Additional metadata to display */
38
+ metadata?: Record<string, any>;
39
+ }
40
+ interface ActivityFeedProps {
41
+ /** Feed title */
42
+ title?: string;
43
+ /** Feed description */
44
+ description?: string;
45
+ /** Activity items */
46
+ items: ActivityItem[];
47
+ /** Maximum height (enables scrolling) */
48
+ maxHeight?: number | string;
49
+ /** Show avatars */
50
+ showAvatars?: boolean;
51
+ /** Show timestamps */
52
+ showTimestamps?: boolean;
53
+ /** Additional CSS classes */
54
+ className?: string;
55
+ /** Empty state message */
56
+ emptyMessage?: string;
57
+ /** Timestamp formatter */
58
+ formatTimestamp?: (timestamp: Date | string) => string;
59
+ }
60
+ declare function ActivityFeed({ title, description, items, maxHeight, showAvatars, showTimestamps, className, emptyMessage, formatTimestamp, }: ActivityFeedProps): react_jsx_runtime.JSX.Element;
61
+
62
+ interface AreaChartProps {
63
+ /** Chart title */
64
+ title?: string;
65
+ /** Chart description */
66
+ description?: string;
67
+ /** Data points for the chart */
68
+ data: Array<Record<string, any>>;
69
+ /** X-axis data key */
70
+ xAxisKey: string;
71
+ /** Y-axis data keys (one or more lines) */
72
+ yAxisKeys: string[];
73
+ /** Chart configuration for colors and labels */
74
+ config: ChartConfig;
75
+ /** Show grid lines */
76
+ showGrid?: boolean;
77
+ /** Show X axis */
78
+ showXAxis?: boolean;
79
+ /** Show Y axis */
80
+ showYAxis?: boolean;
81
+ /** X-axis label formatter */
82
+ xAxisFormatter?: (value: any) => string;
83
+ /** Y-axis label formatter */
84
+ yAxisFormatter?: (value: any) => string;
85
+ /** Chart height */
86
+ height?: number | string;
87
+ /** Additional CSS classes */
88
+ className?: string;
89
+ /** Fill opacity (0-1) */
90
+ fillOpacity?: number;
91
+ /** Stroke width */
92
+ strokeWidth?: number;
93
+ }
94
+ declare function AreaChart({ title, description, data, xAxisKey, yAxisKeys, config, showGrid, showXAxis, showYAxis, xAxisFormatter, yAxisFormatter, height, className, fillOpacity, strokeWidth, }: AreaChartProps): react_jsx_runtime.JSX.Element;
95
+
96
+ interface BarChartProps {
97
+ /** Chart title */
98
+ title?: string;
99
+ /** Chart description */
100
+ description?: string;
101
+ /** Data points for the chart */
102
+ data: Array<Record<string, any>>;
103
+ /** X-axis data key */
104
+ xAxisKey: string;
105
+ /** Y-axis data keys (one or more bars) */
106
+ yAxisKeys: string[];
107
+ /** Chart configuration for colors and labels */
108
+ config: ChartConfig;
109
+ /** Show grid lines */
110
+ showGrid?: boolean;
111
+ /** Show X axis */
112
+ showXAxis?: boolean;
113
+ /** Show Y axis */
114
+ showYAxis?: boolean;
115
+ /** X-axis label formatter */
116
+ xAxisFormatter?: (value: any) => string;
117
+ /** Y-axis label formatter */
118
+ yAxisFormatter?: (value: any) => string;
119
+ /** Chart height */
120
+ height?: number | string;
121
+ /** Additional CSS classes */
122
+ className?: string;
123
+ /** Bar radius */
124
+ radius?: number | [number, number, number, number];
125
+ /** Show average reference line */
126
+ showAverage?: boolean;
127
+ /** Average label prefix */
128
+ averageLabel?: string;
129
+ /** Layout: horizontal or vertical */
130
+ layout?: 'horizontal' | 'vertical';
131
+ }
132
+ declare function BarChart({ title, description, data, xAxisKey, yAxisKeys, config, showGrid, showXAxis, showYAxis, xAxisFormatter, yAxisFormatter, height, className, radius, showAverage, averageLabel, layout, }: BarChartProps): react_jsx_runtime.JSX.Element;
133
+
134
+ interface CommandItem {
135
+ /** Unique ID */
136
+ id: string;
137
+ /** Display label */
138
+ label: string;
139
+ /** Optional description */
140
+ description?: string;
141
+ /** Icon to display */
142
+ icon?: LucideIcon;
143
+ /** Keyboard shortcut to display */
144
+ shortcut?: string;
145
+ /** Action to perform when selected */
146
+ onSelect: () => void;
147
+ /** Optional keywords for search */
148
+ keywords?: string[];
149
+ }
150
+ interface CommandGroup {
151
+ /** Group heading */
152
+ heading: string;
153
+ /** Items in this group */
154
+ items: CommandItem[];
155
+ }
156
+ interface CommandPaletteProps {
157
+ /** Command groups */
158
+ groups: CommandGroup[];
159
+ /** Placeholder text */
160
+ placeholder?: string;
161
+ /** Empty state message */
162
+ emptyMessage?: string;
163
+ /** Open state (controlled) */
164
+ open?: boolean;
165
+ /** On open change (controlled) */
166
+ onOpenChange?: (open: boolean) => void;
167
+ /** Keyboard shortcut to open (default: Cmd+K / Ctrl+K) */
168
+ shortcut?: string;
169
+ /** Additional CSS classes */
170
+ className?: string;
171
+ }
172
+ declare function CommandPalette({ groups, placeholder, emptyMessage, open: controlledOpen, onOpenChange, shortcut, className, }: CommandPaletteProps): react_jsx_runtime.JSX.Element;
173
+ declare function useCommandPalette(): {
174
+ open: boolean;
175
+ setOpen: React$1.Dispatch<React$1.SetStateAction<boolean>>;
176
+ toggle: () => void;
177
+ };
178
+
179
+ interface DashboardGridProps {
180
+ /** Grid children */
181
+ children: ReactNode;
182
+ /** Number of columns */
183
+ columns?: 1 | 2 | 3 | 4 | 6 | 12;
184
+ /** Gap between items */
185
+ gap?: 2 | 4 | 6 | 8;
186
+ /** Additional CSS classes */
187
+ className?: string;
188
+ }
189
+ declare function DashboardGrid({ children, columns, gap, className }: DashboardGridProps): react_jsx_runtime.JSX.Element;
190
+ interface DashboardGridItemProps {
191
+ /** Item children */
192
+ children: ReactNode;
193
+ /** Column span */
194
+ colSpan?: 1 | 2 | 3 | 4 | 6 | 12 | 'full';
195
+ /** Row span */
196
+ rowSpan?: 1 | 2 | 3 | 4 | 6;
197
+ /** Additional CSS classes */
198
+ className?: string;
199
+ }
200
+ declare function DashboardGridItem({ children, colSpan, rowSpan, className }: DashboardGridItemProps): react_jsx_runtime.JSX.Element;
201
+
202
+ interface DataTableProps<TData, TValue> {
203
+ /** Column definitions */
204
+ columns: ColumnDef<TData, TValue>[];
205
+ /** Table data */
206
+ data: TData[];
207
+ /** Enable search/filtering */
208
+ searchable?: boolean;
209
+ /** Search placeholder text */
210
+ searchPlaceholder?: string;
211
+ /** Column to search on (if searchable) */
212
+ searchColumn?: string;
213
+ /** Enable pagination */
214
+ paginated?: boolean;
215
+ /** Initial page size */
216
+ pageSize?: number;
217
+ /** Page size options */
218
+ pageSizeOptions?: number[];
219
+ /** Additional CSS classes */
220
+ className?: string;
221
+ /** Empty state message */
222
+ emptyMessage?: string;
223
+ }
224
+ declare function DataTable<TData, TValue>({ columns, data, searchable, searchPlaceholder, searchColumn, paginated, pageSize, pageSizeOptions, className, emptyMessage, }: DataTableProps<TData, TValue>): react_jsx_runtime.JSX.Element;
225
+ declare function SortableHeader({ column, children }: {
226
+ column: any;
227
+ children: React.ReactNode;
228
+ }): react_jsx_runtime.JSX.Element;
229
+
230
+ interface KPICardProps {
231
+ /** Card title */
232
+ title: string;
233
+ /** Main metric value */
234
+ value: string | number;
235
+ /** Optional description or subtitle */
236
+ description?: string;
237
+ /** Icon to display */
238
+ icon?: LucideIcon;
239
+ /** Change percentage (e.g. 12.5 for +12.5%) */
240
+ change?: number;
241
+ /** Trend direction - overrides auto-detection from change */
242
+ trend?: 'up' | 'down' | 'neutral';
243
+ /** Sparkline data points */
244
+ sparklineData?: Array<{
245
+ value: number;
246
+ }>;
247
+ /** Sparkline color */
248
+ sparklineColor?: string;
249
+ /** Additional CSS classes */
250
+ className?: string;
251
+ /** Click handler */
252
+ onClick?: () => void;
253
+ }
254
+ declare function KPICard({ title, value, description, icon: Icon, change, trend, sparklineData, sparklineColor, className, onClick, }: KPICardProps): react_jsx_runtime.JSX.Element;
255
+
256
+ interface LineChartProps {
257
+ /** Chart title */
258
+ title?: string;
259
+ /** Chart description */
260
+ description?: string;
261
+ /** Data points for the chart */
262
+ data: Array<Record<string, any>>;
263
+ /** X-axis data key */
264
+ xAxisKey: string;
265
+ /** Y-axis data keys (one or more lines) */
266
+ yAxisKeys: string[];
267
+ /** Chart configuration for colors and labels */
268
+ config: ChartConfig;
269
+ /** Show grid lines */
270
+ showGrid?: boolean;
271
+ /** Show X axis */
272
+ showXAxis?: boolean;
273
+ /** Show Y axis */
274
+ showYAxis?: boolean;
275
+ /** Show legend */
276
+ showLegend?: boolean;
277
+ /** X-axis label formatter */
278
+ xAxisFormatter?: (value: any) => string;
279
+ /** Y-axis label formatter */
280
+ yAxisFormatter?: (value: any) => string;
281
+ /** Chart height */
282
+ height?: number | string;
283
+ /** Additional CSS classes */
284
+ className?: string;
285
+ /** Line type */
286
+ lineType?: 'monotone' | 'linear' | 'step' | 'stepBefore' | 'stepAfter';
287
+ /** Stroke width */
288
+ strokeWidth?: number;
289
+ /** Show dots on data points */
290
+ showDots?: boolean;
291
+ /** Dot radius */
292
+ dotRadius?: number;
293
+ }
294
+ declare function LineChart({ title, description, data, xAxisKey, yAxisKeys, config, showGrid, showXAxis, showYAxis, showLegend, xAxisFormatter, yAxisFormatter, height, className, lineType, strokeWidth, showDots, dotRadius, }: LineChartProps): react_jsx_runtime.JSX.Element;
295
+
296
+ declare function DashboardLayout(): react_jsx_runtime.JSX.Element;
297
+
298
+ declare function LandingPage(): react_jsx_runtime.JSX.Element;
299
+
300
+ interface NavItem {
301
+ title: string;
302
+ url: string;
303
+ icon?: LucideIcon;
304
+ isActive?: boolean;
305
+ items?: NavItem[];
306
+ }
307
+ interface NavMainProps {
308
+ items: NavItem[];
309
+ }
310
+ declare function NavMain({ items }: NavMainProps): react_jsx_runtime.JSX.Element;
311
+
312
+ interface NavUserProps {
313
+ user: NavUser;
314
+ onSignOut: () => void | Promise<void>;
315
+ }
316
+ interface NavUser {
317
+ id: string;
318
+ name: string;
319
+ email: string;
320
+ avatar?: string;
321
+ }
322
+ declare function NavUser({ user, onSignOut }: NavUserProps): react_jsx_runtime.JSX.Element;
323
+
324
+ interface JsonViewerProps {
325
+ data: unknown;
326
+ className?: string;
327
+ }
328
+ declare function JsonViewer({ data, className }: JsonViewerProps): react_jsx_runtime.JSX.Element;
329
+
330
+ interface SidebarAdProps {
331
+ headline: string;
332
+ description?: string;
333
+ ctaText: string;
334
+ ctaHref?: string;
335
+ onCtaClick?: () => void;
336
+ dismissible?: boolean;
337
+ onDismiss?: () => void;
338
+ badge?: string;
339
+ }
340
+ declare function SidebarAd({ headline, description, ctaText, ctaHref, onCtaClick, dismissible, onDismiss, badge }: SidebarAdProps): react_jsx_runtime.JSX.Element | null;
341
+
342
+ type StatusType = 'success' | 'warning' | 'error';
343
+ interface StatusBadgeProps {
344
+ status: number | StatusType;
345
+ className?: string;
346
+ showText?: boolean;
347
+ }
348
+ declare function StatusBadge({ status, className, showText }: StatusBadgeProps): react_jsx_runtime.JSX.Element;
349
+ declare function StatusDot({ status, className }: {
350
+ status: number | StatusType;
351
+ className?: string;
352
+ }): react_jsx_runtime.JSX.Element;
353
+
354
+ interface VaultDeleteDialogProps {
355
+ isOpen: boolean;
356
+ onClose: () => void;
357
+ itemName: string;
358
+ onConfirm: () => void;
359
+ }
360
+ declare function VaultDeleteDialog({ isOpen, onClose, itemName, onConfirm }: VaultDeleteDialogProps): react_jsx_runtime.JSX.Element;
361
+
362
+ interface VaultEmptyStateProps {
363
+ onAddCredential: () => void;
364
+ }
365
+ declare function VaultEmptyState({ onAddCredential }: VaultEmptyStateProps): react_jsx_runtime.JSX.Element;
366
+
367
+ interface VaultItem {
368
+ id: string;
369
+ name: string;
370
+ integrationId: string;
371
+ logoUrl?: string;
372
+ createdAt: Date;
373
+ updatedAt: Date;
374
+ }
375
+ interface VaultField {
376
+ key: string;
377
+ label: string;
378
+ type: 'text' | 'password';
379
+ required: boolean;
380
+ placeholder?: string;
381
+ }
382
+
383
+ interface VaultInputModalProps {
384
+ isOpen: boolean;
385
+ onClose: () => void;
386
+ mode: 'create' | 'rotate';
387
+ integration?: {
388
+ id: string;
389
+ name: string;
390
+ logoUrl?: string;
391
+ fields: VaultField[];
392
+ };
393
+ onSave: (credentials: Record<string, string>) => Promise<void>;
394
+ }
395
+ declare function VaultInputModal({ isOpen, onClose, mode, integration, onSave, }: VaultInputModalProps): react_jsx_runtime.JSX.Element | null;
396
+
397
+ interface VaultItemCardProps {
398
+ id: string;
399
+ name: string;
400
+ logoUrl?: string;
401
+ createdAt: Date;
402
+ updatedAt: Date;
403
+ onRotate: (id: string) => void;
404
+ onDelete: (id: string) => void;
405
+ }
406
+ declare function VaultItemCard({ id, name, logoUrl, createdAt, updatedAt, onRotate, onDelete, }: VaultItemCardProps): react_jsx_runtime.JSX.Element;
407
+
408
+ interface VaultListProps {
409
+ items: VaultItem[];
410
+ onRotate: (id: string, credentials: Record<string, string>) => Promise<void>;
411
+ onDelete: (id: string) => Promise<void>;
412
+ onOpenAddModal: () => void;
413
+ }
414
+ declare function VaultList({ items, onRotate, onDelete, onOpenAddModal }: VaultListProps): react_jsx_runtime.JSX.Element;
415
+
416
+ /**
417
+ * Mock Identity Widgets for development/demo mode
418
+ *
419
+ * These components render placeholder UI when the identity provider is not configured
420
+ * or when running in devMode without valid credentials.
421
+ */
422
+ /**
423
+ * Mock UsersManagement widget
424
+ */
425
+ declare function MockUsersManagement(): react_jsx_runtime.JSX.Element;
426
+ /**
427
+ * Mock UserProfile widget
428
+ */
429
+ declare function MockUserProfile(): react_jsx_runtime.JSX.Element;
430
+ /**
431
+ * Mock AuthenticationFactors widget
432
+ */
433
+ declare function MockAuthenticationFactors(): react_jsx_runtime.JSX.Element;
434
+ /**
435
+ * Mock UserSessions widget
436
+ */
437
+ declare function MockUserSessions(): react_jsx_runtime.JSX.Element;
438
+
439
+ /**
440
+ * TeamSwitcher component that uses WorkOS authentication.
441
+ * Shows the WorkOS OrganizationSwitcher widget when authenticated with an organization,
442
+ * or a "No Organization" placeholder when not.
443
+ */
444
+ declare function TeamSwitcher(): react_jsx_runtime.JSX.Element;
445
+
446
+ /**
447
+ * SettingsPage - Tabbed settings layout component
448
+ *
449
+ * Provides a tabbed interface for various settings sections including
450
+ * profile, security, notifications, billing, team, api, and integrations.
451
+ *
452
+ * @example
453
+ * ```tsx
454
+ * <SettingsPage sections={['profile', 'security', 'team']}>
455
+ * <ProfileSettings />
456
+ * <SecuritySettings />
457
+ * <TeamSettings />
458
+ * </SettingsPage>
459
+ * ```
460
+ */
461
+ declare function SettingsPage({ sections, children }: SettingsProps): react_jsx_runtime.JSX.Element;
462
+
463
+ interface UserProfileProps {
464
+ user?: {
465
+ name?: string;
466
+ email?: string;
467
+ avatar?: string;
468
+ firstName?: string;
469
+ lastName?: string;
470
+ };
471
+ onUpdate?: (data: any) => void;
472
+ readonly?: boolean;
473
+ }
474
+ /**
475
+ * UserProfile - Profile management component
476
+ *
477
+ * Provides a form interface for users to manage their personal information
478
+ * including avatar, name, and email.
479
+ *
480
+ * @example
481
+ * ```tsx
482
+ * <UserProfile
483
+ * user={{ name: 'John Doe', email: 'john@example.com' }}
484
+ * onUpdate={(data) => console.log(data)}
485
+ * />
486
+ * ```
487
+ */
488
+ declare function UserProfile({ user, onUpdate, readonly }: UserProfileProps): react_jsx_runtime.JSX.Element;
489
+
490
+ /**
491
+ * APIKeyManager - API key CRUD interface
492
+ *
493
+ * Provides a complete interface for managing API keys including creation,
494
+ * viewing, copying, and deletion. Auto-wires to the apiKeys collection.
495
+ *
496
+ * @example
497
+ * ```tsx
498
+ * <APIKeyManager
499
+ * project="proj_123"
500
+ * allowCreate={true}
501
+ * allowDelete={true}
502
+ * showLastUsed={true}
503
+ * />
504
+ * ```
505
+ */
506
+ declare function APIKeyManager({ project, allowCreate, allowDelete, showLastUsed, keys: initialKeys, }: APIKeysProps): react_jsx_runtime.JSX.Element;
507
+
508
+ /**
509
+ * TeamManager - Team member management component
510
+ *
511
+ * Provides a complete interface for managing team members including invitations,
512
+ * role changes, and member removal. Auto-wires to the members collection.
513
+ *
514
+ * @example
515
+ * ```tsx
516
+ * <TeamManager
517
+ * workspace="ws_123"
518
+ * allowInvite={true}
519
+ * allowRoleChange={true}
520
+ * allowRemove={true}
521
+ * />
522
+ * ```
523
+ */
524
+ declare function TeamManager({ workspace, allowInvite, allowRoleChange, allowRemove, members: initialMembers, }: TeamProps): react_jsx_runtime.JSX.Element;
525
+
526
+ /**
527
+ * Billing - Subscription and billing management component
528
+ *
529
+ * Provides a complete interface for managing subscriptions, viewing invoices,
530
+ * and managing payment methods. Auto-wires to the subscriptions collection.
531
+ *
532
+ * @example
533
+ * ```tsx
534
+ * <Billing
535
+ * customer="cus_123"
536
+ * showInvoices={true}
537
+ * showPaymentMethods={true}
538
+ * showUsage={true}
539
+ * />
540
+ * ```
541
+ */
542
+ declare function Billing({ customer, showInvoices, showPaymentMethods, showUsage, subscription: initialSubscription, }: BillingProps): react_jsx_runtime.JSX.Element;
543
+
544
+ interface DashboardRoutes {
545
+ overview?: boolean;
546
+ requests?: boolean;
547
+ keys?: boolean;
548
+ team?: boolean;
549
+ billing?: boolean;
550
+ settings?: boolean;
551
+ webhooks?: boolean;
552
+ database?: boolean;
553
+ integrations?: boolean;
554
+ vault?: boolean;
555
+ }
556
+ interface DashboardBranding {
557
+ name?: string;
558
+ logo?: ReactNode;
559
+ }
560
+ interface DashboardTheme {
561
+ /**
562
+ * Theme preset name. Built-in presets include:
563
+ * 'cyan', 'anthropic', 'linear', 'stripe', 'arc', 'airbnb', 'bubblegum',
564
+ * 'mono', 'notation', 'polaris', 'sage', 'x'
565
+ *
566
+ * You can also pass a custom string if you're loading your own theme CSS.
567
+ */
568
+ preset?: Theme;
569
+ mode?: 'light' | 'dark' | 'system';
570
+ /** Custom CSS variable overrides (e.g., { '--primary': 'oklch(0.6 0.2 240)' }) */
571
+ custom?: Record<string, string>;
572
+ }
573
+ /**
574
+ * Identity provider configuration for authentication and user management.
575
+ * Powered by id.org.ai
576
+ */
577
+ interface DashboardIdentity {
578
+ /** Client ID from identity provider dashboard */
579
+ clientId: string;
580
+ /** Custom authentication domain (optional - if not set, use devMode) */
581
+ apiHostname?: string;
582
+ /** Enable dev mode - stores refresh token in localStorage instead of secure cookie */
583
+ devMode?: boolean;
584
+ /** Redirect URI after sign-in (defaults to current origin + basePath) */
585
+ redirectUri?: string;
586
+ /** Redirect URI after sign-out (defaults to current origin) */
587
+ signOutRedirectUri?: string;
588
+ /** Use mock widgets instead of real identity widgets (for demos/development) */
589
+ useMockWidgets?: boolean;
590
+ /** Whether authentication is required to view the dashboard (default: true) */
591
+ required?: boolean;
592
+ /** What to do when user is not authenticated */
593
+ onUnauthenticated?: 'redirect' | 'landing' | 'allow';
594
+ /** URL to redirect to when not authenticated (used with onUnauthenticated: 'redirect') */
595
+ unauthenticatedRedirectUrl?: string;
596
+ /** Custom landing component to show when not authenticated (used with onUnauthenticated: 'landing') */
597
+ landingComponent?: ReactNode;
598
+ }
599
+ interface DashboardConfig {
600
+ basePath?: string;
601
+ branding?: DashboardBranding;
602
+ routes?: DashboardRoutes;
603
+ theme?: DashboardTheme;
604
+ /** Identity provider configuration for authentication and user management */
605
+ identity: DashboardIdentity;
606
+ /**
607
+ * Development token for testing SDK without auth flow.
608
+ * Pass DO_TOKEN from server-side environment variable.
609
+ * Only used in development - auth tokens take priority in production.
610
+ */
611
+ devToken?: string;
612
+ /** Enable SDK debug logging */
613
+ debug?: boolean;
614
+ }
615
+
616
+ interface DashboardContextValue {
617
+ config: Required<Omit<DashboardConfig, 'identity' | 'devToken' | 'debug'>> & {
618
+ identity: DashboardIdentity;
619
+ devToken?: string;
620
+ debug?: boolean;
621
+ };
622
+ routes: Required<DashboardRoutes>;
623
+ basePath: string;
624
+ }
625
+ declare function useDashboard(): DashboardContextValue;
626
+ declare function useRoutes(): Required<DashboardRoutes>;
627
+
628
+ interface DeveloperDashboardProps {
629
+ config: DashboardConfig;
630
+ }
631
+ /**
632
+ * Main dashboard component that wraps everything with necessary providers
633
+ * and renders the dashboard routes.
634
+ *
635
+ * Provider hierarchy (handled by AppProviders):
636
+ * - ThemeProvider (next-themes) - Theme mode (light/dark/system)
637
+ * - DashboardProvider - Dashboard config context
638
+ * - SDKInitializer - Platform SDK setup
639
+ * - IdentityProvider - WorkOS AuthKit + Widgets
640
+ * - QueryProvider - TanStack Query + Auth sync
641
+ */
642
+ declare function DeveloperDashboard({ config }: DeveloperDashboardProps): react_jsx_runtime.JSX.Element;
643
+
644
+ declare function BillingPage(): react_jsx_runtime.JSX.Element;
645
+
646
+ declare function DatabasePage(): react_jsx_runtime.JSX.Element;
647
+
648
+ declare function IntegrationsPage(): react_jsx_runtime.JSX.Element;
649
+
650
+ declare function KeysPage(): react_jsx_runtime.JSX.Element;
651
+
652
+ declare function OverviewPage(): react_jsx_runtime.JSX.Element;
653
+
654
+ declare function RequestsPage(): react_jsx_runtime.JSX.Element;
655
+
656
+ declare function SettingsProfilePage(): react_jsx_runtime.JSX.Element;
657
+
658
+ declare function SettingsSecurityPage(): react_jsx_runtime.JSX.Element;
659
+
660
+ declare function SettingsSessionsPage(): react_jsx_runtime.JSX.Element;
661
+
662
+ declare function TeamPage(): react_jsx_runtime.JSX.Element;
663
+
664
+ declare function VaultPage(): react_jsx_runtime.JSX.Element;
665
+
666
+ declare function WebhooksActivityPage(): react_jsx_runtime.JSX.Element;
667
+
668
+ declare function WebhooksEndpointsPage(): react_jsx_runtime.JSX.Element;
669
+
670
+ declare function WebhooksEventCatalogPage(): react_jsx_runtime.JSX.Element;
671
+
672
+ declare function WebhooksLogsPage(): react_jsx_runtime.JSX.Element;
673
+
674
+ /**
675
+ * SDK instance type - the $ proxy with all platform methods
676
+ */
677
+ type PlatformSDK = $Context;
678
+ /**
679
+ * Enable or disable debug mode for SDK operations.
680
+ * When enabled, logs auth state changes and SDK calls.
681
+ */
682
+ declare function setDebugMode(enabled: boolean): void;
683
+ /**
684
+ * Check if debug mode is enabled.
685
+ */
686
+ declare function isDebugMode(): boolean;
687
+ /**
688
+ * Set a development token for testing SDK without auth flow.
689
+ * This is useful for local development when you have a DO_TOKEN.
690
+ * Call this early in app initialization.
691
+ *
692
+ * @param token - The DO_TOKEN from environment
693
+ */
694
+ declare function setDevToken(token: string | null): void;
695
+ /**
696
+ * Get the effective token (auth token takes priority over dev token)
697
+ */
698
+ declare function getEffectiveToken(): string | null;
699
+ /**
700
+ * Get the current auth token.
701
+ * Returns null if not authenticated.
702
+ */
703
+ declare function getAuthToken(): string | null;
704
+ /**
705
+ * Get the SDK instance.
706
+ * Returns null if not authenticated.
707
+ */
708
+ declare function getSDK(): PlatformSDK | null;
709
+ /**
710
+ * Check if the user is authenticated (has a token).
711
+ */
712
+ declare function isAuthenticated(): boolean;
713
+ /**
714
+ * Get debug status info for troubleshooting.
715
+ * Can be called from browser console: window.__platformDebug.status()
716
+ */
717
+ declare function getDebugStatus(): {
718
+ isAuthenticated: boolean;
719
+ hasDevToken: boolean;
720
+ hasEffectiveToken: boolean;
721
+ hasSDK: boolean;
722
+ tokenSource: string;
723
+ tokenLength: number;
724
+ tokenPreview: string | null;
725
+ debugMode: boolean;
726
+ apiBaseUrl: string;
727
+ };
728
+ /**
729
+ * Test SDK connection by making a simple API call.
730
+ * Can be called from browser console: window.__platformDebug.testConnection()
731
+ */
732
+ declare function testSDKConnection(): Promise<{
733
+ success: boolean;
734
+ result: platform_do.Thing[];
735
+ status: {
736
+ isAuthenticated: boolean;
737
+ hasDevToken: boolean;
738
+ hasEffectiveToken: boolean;
739
+ hasSDK: boolean;
740
+ tokenSource: string;
741
+ tokenLength: number;
742
+ tokenPreview: string | null;
743
+ debugMode: boolean;
744
+ apiBaseUrl: string;
745
+ };
746
+ error?: undefined;
747
+ } | {
748
+ success: boolean;
749
+ error: unknown;
750
+ status: {
751
+ isAuthenticated: boolean;
752
+ hasDevToken: boolean;
753
+ hasEffectiveToken: boolean;
754
+ hasSDK: boolean;
755
+ tokenSource: string;
756
+ tokenLength: number;
757
+ tokenPreview: string | null;
758
+ debugMode: boolean;
759
+ apiBaseUrl: string;
760
+ };
761
+ result?: undefined;
762
+ }>;
763
+
764
+ export { APIKeyManager, ActivityFeed, type ActivityFeedProps, type ActivityItem, AreaChart, type AreaChartProps, BarChart, type BarChartProps, Billing, BillingPage, type CommandGroup, type CommandItem, CommandPalette, type CommandPaletteProps, type DashboardBranding, type DashboardConfig, DashboardGrid, DashboardGridItem, type DashboardGridItemProps, type DashboardGridProps, type DashboardIdentity, DashboardLayout, type DashboardRoutes, type DashboardTheme, DataTable, type DataTableProps, DatabasePage, DeveloperDashboard, IntegrationsPage, JsonViewer, KPICard, type KPICardProps, KeysPage, LandingPage, LineChart, type LineChartProps, MockAuthenticationFactors, MockUserProfile, MockUserSessions, MockUsersManagement, type NavItem, NavMain, NavUser, OverviewPage, RequestsPage, SettingsPage, SettingsProfilePage, SettingsSecurityPage, SettingsSessionsPage, SidebarAd, SortableHeader, StatusBadge, StatusDot, TeamManager, TeamPage, TeamSwitcher, UserProfile, VaultDeleteDialog, VaultEmptyState, VaultInputModal, VaultItemCard, VaultList, VaultPage, WebhooksActivityPage, WebhooksEndpointsPage, WebhooksEventCatalogPage, WebhooksLogsPage, getAuthToken, getDebugStatus, getEffectiveToken, getSDK, isAuthenticated, isDebugMode, setDebugMode, setDevToken, testSDKConnection, useCommandPalette, useDashboard, useRoutes };