@greatapps/greatagents-ui 0.3.4 → 0.3.5

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
@@ -505,12 +505,58 @@ interface AgentEditFormProps {
505
505
  }
506
506
  declare function AgentEditForm({ config, agent, idAccount, open, onOpenChange }: AgentEditFormProps): react_jsx_runtime.JSX.Element;
507
507
 
508
+ /**
509
+ * Types for the Integration Wizard flow.
510
+ *
511
+ * The wizard uses the base IntegrationDefinition from the integrations registry
512
+ * and extends it with wizard-specific metadata via WizardIntegrationMeta.
513
+ */
514
+
515
+ interface IntegrationCapability {
516
+ label: string;
517
+ description?: string;
518
+ }
519
+ interface WizardIntegrationMeta {
520
+ /** Icon as React node for the wizard header */
521
+ icon?: React.ReactNode;
522
+ /** Provider label for OAuth button (e.g. "Google") */
523
+ providerLabel?: string;
524
+ /** What this integration can do */
525
+ capabilities: IntegrationCapability[];
526
+ /** Required permissions / prerequisites */
527
+ requirements: string[];
528
+ /** Whether this integration has a config step */
529
+ hasConfigStep: boolean;
530
+ }
531
+ type WizardStep = "info" | "credentials" | "config" | "confirm";
532
+ type OAuthStatus = "idle" | "waiting" | "success" | "error";
533
+ interface OAuthResult {
534
+ success: boolean;
535
+ email?: string;
536
+ error?: string;
537
+ credentialId?: number;
538
+ }
539
+
540
+ interface ConfigOption {
541
+ id: string;
542
+ label: string;
543
+ description?: string;
544
+ }
545
+
508
546
  interface AgentTabsProps {
509
547
  agent: Agent;
510
548
  config: GagentsHookConfig;
511
549
  renderChatLink?: (inboxId: number) => React.ReactNode;
550
+ /** Required for the Capacidades tab — gagents API URL for OAuth flows and advanced features. Falls back to config.baseUrl. */
551
+ gagentsApiUrl?: string;
552
+ /** Resolve wizard metadata for a given integration card. */
553
+ resolveWizardMeta?: (card: IntegrationCardData) => WizardIntegrationMeta;
554
+ /** Callback to load config options after OAuth completes. */
555
+ loadConfigOptions?: (credentialId: number) => Promise<ConfigOption[]>;
556
+ /** Called after wizard completes successfully. */
557
+ onWizardComplete?: () => void;
512
558
  }
513
- declare function AgentTabs({ agent, config, renderChatLink }: AgentTabsProps): react_jsx_runtime.JSX.Element;
559
+ declare function AgentTabs({ agent, config, renderChatLink, gagentsApiUrl, resolveWizardMeta, loadConfigOptions, onWizardComplete, }: AgentTabsProps): react_jsx_runtime.JSX.Element;
514
560
 
515
561
  interface AgentPromptEditorProps {
516
562
  config: GagentsHookConfig;
@@ -653,44 +699,6 @@ interface AdvancedTabProps {
653
699
  }
654
700
  declare function AdvancedTab({ config, agentId, gagentsApiUrl }: AdvancedTabProps): react_jsx_runtime.JSX.Element;
655
701
 
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
702
  interface IntegrationWizardProps {
695
703
  open: boolean;
696
704
  onOpenChange: (open: boolean) => void;