@greatapps/greatagents-ui 0.3.4 → 0.3.6

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
@@ -493,8 +493,9 @@ interface AgentFormDialogProps {
493
493
  open: boolean;
494
494
  onOpenChange: (open: boolean) => void;
495
495
  agent?: Agent;
496
+ idAccount?: string | number | null;
496
497
  }
497
- declare function AgentFormDialog({ config, open, onOpenChange, agent, }: AgentFormDialogProps): react_jsx_runtime.JSX.Element;
498
+ declare function AgentFormDialog({ config, open, onOpenChange, agent, idAccount, }: AgentFormDialogProps): react_jsx_runtime.JSX.Element;
498
499
 
499
500
  interface AgentEditFormProps {
500
501
  config: GagentsHookConfig;
@@ -505,12 +506,58 @@ interface AgentEditFormProps {
505
506
  }
506
507
  declare function AgentEditForm({ config, agent, idAccount, open, onOpenChange }: AgentEditFormProps): react_jsx_runtime.JSX.Element;
507
508
 
509
+ /**
510
+ * Types for the Integration Wizard flow.
511
+ *
512
+ * The wizard uses the base IntegrationDefinition from the integrations registry
513
+ * and extends it with wizard-specific metadata via WizardIntegrationMeta.
514
+ */
515
+
516
+ interface IntegrationCapability {
517
+ label: string;
518
+ description?: string;
519
+ }
520
+ interface WizardIntegrationMeta {
521
+ /** Icon as React node for the wizard header */
522
+ icon?: React.ReactNode;
523
+ /** Provider label for OAuth button (e.g. "Google") */
524
+ providerLabel?: string;
525
+ /** What this integration can do */
526
+ capabilities: IntegrationCapability[];
527
+ /** Required permissions / prerequisites */
528
+ requirements: string[];
529
+ /** Whether this integration has a config step */
530
+ hasConfigStep: boolean;
531
+ }
532
+ type WizardStep = "info" | "credentials" | "config" | "confirm";
533
+ type OAuthStatus = "idle" | "waiting" | "success" | "error";
534
+ interface OAuthResult {
535
+ success: boolean;
536
+ email?: string;
537
+ error?: string;
538
+ credentialId?: number;
539
+ }
540
+
541
+ interface ConfigOption {
542
+ id: string;
543
+ label: string;
544
+ description?: string;
545
+ }
546
+
508
547
  interface AgentTabsProps {
509
548
  agent: Agent;
510
549
  config: GagentsHookConfig;
511
550
  renderChatLink?: (inboxId: number) => React.ReactNode;
551
+ /** Required for the Capacidades tab — gagents API URL for OAuth flows and advanced features. Falls back to config.baseUrl. */
552
+ gagentsApiUrl?: string;
553
+ /** Resolve wizard metadata for a given integration card. */
554
+ resolveWizardMeta?: (card: IntegrationCardData) => WizardIntegrationMeta;
555
+ /** Callback to load config options after OAuth completes. */
556
+ loadConfigOptions?: (credentialId: number) => Promise<ConfigOption[]>;
557
+ /** Called after wizard completes successfully. */
558
+ onWizardComplete?: () => void;
512
559
  }
513
- declare function AgentTabs({ agent, config, renderChatLink }: AgentTabsProps): react_jsx_runtime.JSX.Element;
560
+ declare function AgentTabs({ agent, config, renderChatLink, gagentsApiUrl, resolveWizardMeta, loadConfigOptions, onWizardComplete, }: AgentTabsProps): react_jsx_runtime.JSX.Element;
514
561
 
515
562
  interface AgentPromptEditorProps {
516
563
  config: GagentsHookConfig;
@@ -653,44 +700,6 @@ interface AdvancedTabProps {
653
700
  }
654
701
  declare function AdvancedTab({ config, agentId, gagentsApiUrl }: AdvancedTabProps): react_jsx_runtime.JSX.Element;
655
702
 
656
- /**
657
- * Types for the Integration Wizard flow.
658
- *
659
- * The wizard uses the base IntegrationDefinition from the integrations registry
660
- * and extends it with wizard-specific metadata via WizardIntegrationMeta.
661
- */
662
-
663
- interface IntegrationCapability {
664
- label: string;
665
- description?: string;
666
- }
667
- interface WizardIntegrationMeta {
668
- /** Icon as React node for the wizard header */
669
- icon?: React.ReactNode;
670
- /** Provider label for OAuth button (e.g. "Google") */
671
- providerLabel?: string;
672
- /** What this integration can do */
673
- capabilities: IntegrationCapability[];
674
- /** Required permissions / prerequisites */
675
- requirements: string[];
676
- /** Whether this integration has a config step */
677
- hasConfigStep: boolean;
678
- }
679
- type WizardStep = "info" | "credentials" | "config" | "confirm";
680
- type OAuthStatus = "idle" | "waiting" | "success" | "error";
681
- interface OAuthResult {
682
- success: boolean;
683
- email?: string;
684
- error?: string;
685
- credentialId?: number;
686
- }
687
-
688
- interface ConfigOption {
689
- id: string;
690
- label: string;
691
- description?: string;
692
- }
693
-
694
703
  interface IntegrationWizardProps {
695
704
  open: boolean;
696
705
  onOpenChange: (open: boolean) => void;