@greatapps/greatagents-ui 0.1.0 → 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.
package/dist/index.d.ts CHANGED
@@ -1,5 +1,9 @@
1
1
  import { ClassValue } from 'clsx';
2
2
  import * as _tanstack_react_query from '@tanstack/react-query';
3
+ import * as react_jsx_runtime from 'react/jsx-runtime';
4
+ import { DndContextProps, UniqueIdentifier, DragEndEvent, DragOverlay } from '@dnd-kit/core';
5
+ import { SortableContextProps } from '@dnd-kit/sortable';
6
+ import * as React$1 from 'react';
3
7
 
4
8
  interface ApiResponse<T = unknown> {
5
9
  status: 0 | 1;
@@ -396,4 +400,151 @@ declare function useGagentsContacts(config: GagentsHookConfig, params?: Record<s
396
400
  total: number;
397
401
  }, Error>;
398
402
 
399
- export { type Agent, type AgentTool, type ApiResponse, type AvailabilityConflict, type AvailabilityResult, type CalendarStatus, type ContactUser, type Conversation, type GagentsClient, type GagentsClientConfig, type GagentsContact, type GagentsHookConfig, type Objective, type PromptVersion, type Tool, type ToolCredential, cn, createGagentsClient, useAddAgentTool, useAgent, useAgentConversations, useAgentTools, useAgents, useContactUsers, useConversation, useConversations, useCreateAgent, useCreateObjective, useCreateTool, useCreateToolCredential, useDeleteAgent, useDeleteObjective, useDeleteTool, useDeleteToolCredential, useGagentsClient, useGagentsContacts, useObjectives, usePromptVersions, useRemoveAgentTool, useTool, useToolCredentials, useTools, useUpdateAgent, useUpdateAgentTool, useUpdateObjective, useUpdateTool, useUpdateToolCredential };
403
+ declare function AgentsTable({ config, onNavigateToAgent }: {
404
+ config: GagentsHookConfig;
405
+ onNavigateToAgent?: (agentId: number) => void;
406
+ }): react_jsx_runtime.JSX.Element;
407
+
408
+ interface AgentFormDialogProps {
409
+ config: GagentsHookConfig;
410
+ open: boolean;
411
+ onOpenChange: (open: boolean) => void;
412
+ agent?: Agent;
413
+ }
414
+ declare function AgentFormDialog({ config, open, onOpenChange, agent, }: AgentFormDialogProps): react_jsx_runtime.JSX.Element;
415
+
416
+ interface AgentEditFormProps {
417
+ config: GagentsHookConfig;
418
+ agent: Agent;
419
+ idAccount: string | number | null;
420
+ open?: boolean;
421
+ onOpenChange?: (open: boolean) => void;
422
+ }
423
+ declare function AgentEditForm({ config, agent, idAccount, open, onOpenChange }: AgentEditFormProps): react_jsx_runtime.JSX.Element;
424
+
425
+ interface AgentTabsProps {
426
+ agent: Agent;
427
+ config: GagentsHookConfig;
428
+ renderConversationsTab?: (agent: Agent) => React.ReactNode;
429
+ }
430
+ declare function AgentTabs({ agent, config, renderConversationsTab }: AgentTabsProps): react_jsx_runtime.JSX.Element;
431
+
432
+ interface AgentPromptEditorProps {
433
+ config: GagentsHookConfig;
434
+ agent: Agent;
435
+ }
436
+ declare function AgentPromptEditor({ config, agent }: AgentPromptEditorProps): react_jsx_runtime.JSX.Element;
437
+
438
+ interface AgentObjectivesListProps {
439
+ agent: Agent;
440
+ config: GagentsHookConfig;
441
+ }
442
+ declare function AgentObjectivesList({ agent, config }: AgentObjectivesListProps): react_jsx_runtime.JSX.Element;
443
+
444
+ interface AgentToolsListProps {
445
+ agent: Agent;
446
+ config: GagentsHookConfig;
447
+ }
448
+ declare function AgentToolsList({ agent, config }: AgentToolsListProps): react_jsx_runtime.JSX.Element;
449
+
450
+ interface ToolsTableProps {
451
+ onEdit: (tool: Tool) => void;
452
+ config: GagentsHookConfig;
453
+ }
454
+ declare function ToolsTable({ onEdit, config }: ToolsTableProps): react_jsx_runtime.JSX.Element;
455
+
456
+ interface ToolFormDialogProps {
457
+ open: boolean;
458
+ onOpenChange: (open: boolean) => void;
459
+ tool?: Tool;
460
+ config: GagentsHookConfig;
461
+ }
462
+ declare function ToolFormDialog({ open, onOpenChange, tool, config, }: ToolFormDialogProps): react_jsx_runtime.JSX.Element;
463
+
464
+ interface ToolCredentialsFormProps {
465
+ credentials: ToolCredential[];
466
+ isLoading: boolean;
467
+ config: GagentsHookConfig;
468
+ gagentsApiUrl: string;
469
+ createOpen?: boolean;
470
+ onCreateOpenChange?: (open: boolean) => void;
471
+ }
472
+ declare function ToolCredentialsForm({ credentials, isLoading, config, gagentsApiUrl, createOpen: externalCreateOpen, onCreateOpenChange, }: ToolCredentialsFormProps): react_jsx_runtime.JSX.Element;
473
+
474
+ interface GetItemValue<T> {
475
+ /**
476
+ * Callback that returns a unique identifier for each sortable item. Required for array of objects.
477
+ * @example getItemValue={(item) => item.id}
478
+ */
479
+ getItemValue: (item: T) => UniqueIdentifier;
480
+ }
481
+ type SortableProps<T> = DndContextProps & (T extends object ? GetItemValue<T> : Partial<GetItemValue<T>>) & {
482
+ value: T[];
483
+ onValueChange?: (items: T[]) => void;
484
+ onMove?: (event: DragEndEvent & {
485
+ activeIndex: number;
486
+ overIndex: number;
487
+ }) => void;
488
+ strategy?: SortableContextProps["strategy"];
489
+ orientation?: "vertical" | "horizontal" | "mixed";
490
+ flatCursor?: boolean;
491
+ };
492
+ declare function Sortable<T>(props: SortableProps<T>): react_jsx_runtime.JSX.Element;
493
+ interface SortableContentProps extends React$1.ComponentProps<"div"> {
494
+ strategy?: SortableContextProps["strategy"];
495
+ children: React$1.ReactNode;
496
+ asChild?: boolean;
497
+ withoutSlot?: boolean;
498
+ }
499
+ declare function SortableContent(props: SortableContentProps): react_jsx_runtime.JSX.Element;
500
+ interface SortableItemProps extends React$1.ComponentProps<"div"> {
501
+ value: UniqueIdentifier;
502
+ asHandle?: boolean;
503
+ asChild?: boolean;
504
+ disabled?: boolean;
505
+ }
506
+ declare function SortableItem(props: SortableItemProps): react_jsx_runtime.JSX.Element;
507
+ interface SortableItemHandleProps extends React$1.ComponentProps<"button"> {
508
+ asChild?: boolean;
509
+ }
510
+ declare function SortableItemHandle(props: SortableItemHandleProps): react_jsx_runtime.JSX.Element;
511
+ interface SortableOverlayProps extends Omit<React$1.ComponentProps<typeof DragOverlay>, "children"> {
512
+ container?: Element | DocumentFragment | null;
513
+ children?: ((params: {
514
+ value: UniqueIdentifier;
515
+ }) => React$1.ReactNode) | React$1.ReactNode;
516
+ }
517
+ declare function SortableOverlay(props: SortableOverlayProps): React$1.ReactPortal | null;
518
+
519
+ interface AgentsPageProps {
520
+ config: GagentsHookConfig;
521
+ onNavigateToAgent?: (agentId: number) => void;
522
+ title?: string;
523
+ subtitle?: string;
524
+ }
525
+ declare function AgentsPage({ config, onNavigateToAgent, title, subtitle, }: AgentsPageProps): react_jsx_runtime.JSX.Element;
526
+
527
+ interface AgentDetailPageProps {
528
+ config: GagentsHookConfig;
529
+ agentId: number;
530
+ onBack?: () => void;
531
+ renderConversationsTab?: (agent: Agent) => React.ReactNode;
532
+ }
533
+ declare function AgentDetailPage({ config, agentId, onBack, renderConversationsTab, }: AgentDetailPageProps): react_jsx_runtime.JSX.Element;
534
+
535
+ interface ToolsPageProps {
536
+ config: GagentsHookConfig;
537
+ title?: string;
538
+ subtitle?: string;
539
+ }
540
+ declare function ToolsPage({ config, title, subtitle, }: ToolsPageProps): react_jsx_runtime.JSX.Element;
541
+
542
+ interface CredentialsPageProps {
543
+ config: GagentsHookConfig;
544
+ gagentsApiUrl: string;
545
+ title?: string;
546
+ subtitle?: string;
547
+ }
548
+ declare function CredentialsPage({ config, gagentsApiUrl, title, subtitle, }: CredentialsPageProps): react_jsx_runtime.JSX.Element;
549
+
550
+ export { type Agent, AgentDetailPage, type AgentDetailPageProps, AgentEditForm, AgentFormDialog, AgentObjectivesList, AgentPromptEditor, AgentTabs, type AgentTool, AgentToolsList, AgentsPage, type AgentsPageProps, AgentsTable, type ApiResponse, type AvailabilityConflict, type AvailabilityResult, type CalendarStatus, type ContactUser, type Conversation, CredentialsPage, type CredentialsPageProps, type GagentsClient, type GagentsClientConfig, type GagentsContact, type GagentsHookConfig, type Objective, type PromptVersion, Sortable, SortableContent, SortableItem, SortableItemHandle, SortableOverlay, type Tool, type ToolCredential, ToolCredentialsForm, ToolFormDialog, ToolsPage, type ToolsPageProps, ToolsTable, cn, createGagentsClient, useAddAgentTool, useAgent, useAgentConversations, useAgentTools, useAgents, useContactUsers, useConversation, useConversations, useCreateAgent, useCreateObjective, useCreateTool, useCreateToolCredential, useDeleteAgent, useDeleteObjective, useDeleteTool, useDeleteToolCredential, useGagentsClient, useGagentsContacts, useObjectives, usePromptVersions, useRemoveAgentTool, useTool, useToolCredentials, useTools, useUpdateAgent, useUpdateAgentTool, useUpdateObjective, useUpdateTool, useUpdateToolCredential };