Thankly SDK for JavaScript
    Preparing search index...

    Interface VirtualTryOnState

    Runtime state (full state used by widget internally)

    interface VirtualTryOnState {
        error: VirtualTryOnError | null;
        generatedImageResourceId: string | null;
        isGeneratingVideo: boolean;
        isLoadingProducts: boolean;
        pagination: PaginationInfo | null;
        photoFile: File | null;
        photoKey: string | null;
        photoPreviewUrl: string | null;
        productCache: Record<string, CatalogProduct>;
        products: CatalogProduct[];
        recommendations: RecommendationsState;
        resultImageUrl: string | null;
        resultVideoUrl: string | null;
        screen: VirtualTryOnScreen;
        selectedProductIds: string[];
        wardrobeItems: WardrobeItem[];
    }
    Index
    error: VirtualTryOnError | null

    Human-readable reason for the rejection.

    generatedImageResourceId: string | null

    Resource id of the generated image, used to request a video from it.

    isGeneratingVideo: boolean

    Whether a video is currently rendering.

    isLoadingProducts: boolean

    Use recommendations instead

    pagination: PaginationInfo | null

    No longer used

    photoFile: File | null

    The photo the user selected.

    photoKey: string | null

    Storage key of the uploaded photo.

    photoPreviewUrl: string | null

    Local preview of the selected photo.

    productCache: Record<string, CatalogProduct>

    Products already fetched, keyed by id.

    products: CatalogProduct[]

    Use cart/history/recommendations sections instead

    recommendations: RecommendationsState

    The recommendations themselves.

    resultImageUrl: string | null

    Generated try-on image.

    resultVideoUrl: string | null

    Generated try-on video.

    Screen currently shown.

    selectedProductIds: string[]

    Catalog product IDs to try on (optional if wardrobe items provided)

    wardrobeItems: WardrobeItem[]

    Garments in the customer's wardrobe.