/** Return value of {@link useOrgOAuthApp}. */
export interface UseOrgOAuthAppReturn {
    /** Whether an org-level BYOA override exists for this resource + org. */
    readonly hasOverride: boolean;
    /** System-generated ID of the override's OAuthApp, or `null` when absent. */
    readonly oauthAppId: string | null;
    /**
     * Client ID from the override's OAuthApp (non-secret, safe to display).
     * `null` when no override exists. Useful for admin verification of
     * which app registration is active.
     */
    readonly clientId: string | null;
    /** `true` while the override status is being fetched. */
    readonly isLoading: boolean;
    /** `true` while a background refetch is in flight. */
    readonly isRefetching: boolean;
    /** Error from the last failed fetch, or `null` when healthy. */
    readonly error: Error | null;
    /** Discard cached data and re-fetch the override status. */
    readonly refetch: () => void;
    /**
     * Create or update the org's BYOA OAuth app override.
     *
     * The backend clones endpoint URLs from the platform's OAuthApp template,
     * creates an OAuthApp with the org's credentials, and binds it as the
     * override for this resource. On success, call {@link refetch} to
     * reflect the new state.
     *
     * @returns The system-generated ID of the created/updated OAuthApp.
     */
    readonly setOrgOAuthApp: (clientId: string, clientSecret: string) => Promise<string>;
    /** `true` while a set operation is in flight. */
    readonly isSetting: boolean;
    /** Error from the last failed set, or `null`. */
    readonly setError: Error | null;
    /**
     * Remove the org's BYOA override for this resource.
     *
     * Deletes both the override binding and the OAuthApp resource created
     * for it. After deletion, the resolution chain falls back to the
     * platform default. Existing user grants that were issued with the
     * org's OAuthApp will fail on next refresh.
     *
     * @returns `true` when the override was removed.
     */
    readonly deleteOrgOAuthApp: () => Promise<boolean>;
    /** `true` while a delete operation is in flight. */
    readonly isDeleting: boolean;
    /** Error from the last failed delete, or `null`. */
    readonly deleteError: Error | null;
    /** Reset all mutation error states. */
    readonly clearErrors: () => void;
}
/**
 * Hybrid data + behavior hook for managing org-level BYOA OAuth app overrides.
 *
 * **Data side**: Auto-fetches `getOrgOAuthApp` when both parameters are
 * non-null. Returns override existence, OAuthApp ID, and client ID for
 * display. Follows the same fetch-on-mount pattern as
 * {@link useOAuthGrantStatus}.
 *
 * **Behavior side**: Exposes `setOrgOAuthApp` and `deleteOrgOAuthApp`
 * mutations bound to the hook's resource + org context, eliminating
 * parameter repetition at call sites.
 *
 * Pass `null` for either parameter to skip fetching (stable no-op).
 *
 * @example
 * ```tsx
 * const orgApp = useOrgOAuthApp(mcpServer?.metadata?.id ?? null, org);
 *
 * if (orgApp.hasOverride) {
 *   return <span>Using your OAuth app (client: {orgApp.clientId})</span>;
 * }
 *
 * const handleSubmit = async (clientId: string, clientSecret: string) => {
 *   await orgApp.setOrgOAuthApp(clientId, clientSecret);
 *   orgApp.refetch();
 *   credentials.refetch();
 * };
 * ```
 */
export declare function useOrgOAuthApp(resourceId: string | null, org: string | null): UseOrgOAuthAppReturn;
//# sourceMappingURL=useOrgOAuthApp.d.ts.map