import React$1 from 'react'; import * as _tanstack_react_query from '@tanstack/react-query'; import { QueryClient } from '@tanstack/react-query'; import { FetchProductsOptions, TramaProduct, TramaCollection, TramaCart } from 'trama-types'; export { CartItemInput, TramaCart, TramaCollection, TramaImage, TramaPrice, TramaProduct, TramaStock, TramaVariant } from 'trama-types'; interface TramaClientConfig { apiKey: string; projectId: string; baseUrl?: string; } interface RequestOptions { method?: string; body?: unknown; params?: Record; } declare class TramaClient { private readonly config; private readonly baseUrl; constructor(config: TramaClientConfig); request(path: string, options?: RequestOptions): Promise; verifyMember(memberToken: string): Promise<{ platformId: string; platform: 'wix' | 'shopify' | 'webflow'; email: string | null; firstName: string | null; lastName: string | null; tags: string[]; verifiedAt: string; metadata: Record; } | null>; getCmsCollections(): Promise>; } interface TramaProviderProps { apiKey: string; projectId: string; baseUrl?: string; queryClient?: QueryClient; children: React$1.ReactNode; } declare function TramaProvider({ apiKey, projectId, baseUrl, queryClient, children, }: TramaProviderProps): React$1.ReactElement; declare function useTramaClient(): TramaClient; declare function useProducts(options?: FetchProductsOptions): _tanstack_react_query.UseQueryResult; declare function useInfiniteProducts(options?: Omit): _tanstack_react_query.UseInfiniteQueryResult<_tanstack_react_query.InfiniteData, Error>; declare function useProduct(id: string | null): _tanstack_react_query.UseQueryResult; declare function useCollections(): _tanstack_react_query.UseQueryResult; declare function useCart(): { cart: TramaCart | null; isLoading: boolean; error: Error | null; addItem: (productId: string, variantId?: string, quantity?: number) => Promise; removeItem: (lineItemId: string) => Promise; updateQuantity: (lineItemId: string, quantity: number) => Promise; goToCheckout: () => Promise; clearCart: () => void; cartId: string | null; }; interface UseCheckoutReturn { createCheckout: (cartId: string) => Promise; redirectToCheckout: (cartId: string) => Promise; isLoading: boolean; error: Error | null; } declare function useCheckout(): UseCheckoutReturn; declare global { var TramaComponents: Record> | undefined; } interface UseAgencyComponentReturn

> { Component: React.ComponentType

| null; isLoading: boolean; error: Error | null; } declare function useAgencyComponent

>(name: string): UseAgencyComponentReturn

; declare function useCmsItems(collectionId: string | null): _tanstack_react_query.UseQueryResult; export { TramaClient, type TramaClientConfig, TramaProvider, type TramaProviderProps, type UseAgencyComponentReturn, type UseCheckoutReturn, useAgencyComponent, useCart, useCheckout, useCmsItems, useCollections, useInfiniteProducts, useProduct, useProducts, useTramaClient };