npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@proptexx/widget-sdk

v3.0.0

Published

Proptexx Widget SDK

Readme

Proptexx SDK Documentation

Introduction

The Proptexx SDK provides an interface for interacting with the Proptexx widget services. To begin using the SDK, you need to initialize it using initProptexx and then utilize the methods provided by the object returned from useProptexx. A reference to the types used in this SDK can be found near the bottom of this page.

Installation

To install the Proptexx SDK, run:

npm install @proptexx/widget-sdk

Initialization

Before accessing any methods in the SDK, you must initialize it with your API key. The initialization function also accepts an optional configuration object.

initProptexx

initProptexx(apiKey: string, options?: ProptexxOptions): void
  • apiKey: Your API key for Proptexx services.
  • options: Optional configuration object.
    • localStorageToken: Custom token for local storage.

Example:

import { initProptexx, useProptexx } from 'proptexx-sdk';
initProptexx('your-api-key', {
  localStorageToken: '_ptCache'
});

Usage

After initializing, you'd have to call the useProptexx function to get access to the available SDK functionality.

useProptexx

useProptexx(): { authAsync, batch, lead }

Example:

const { authAsync, batch, lead } = useProptexx();

Methods

Authentication

authAsync

authAsync(): Promise<WidgetAuthResponse | undefined>

Authenticates the user asynchronously. Example:

const authResponse = await authAsync();

Batch Operations

submitImagesAsync

submitImagesAsync(imageUrls: string[], options: SubmitImagesOption): Promise<ICommandResult | undefined>

Submits images for processing.

  • imageUrls: Array of image URLs to be submitted by the current location.
  • options: Configuration options for submitting images.
  • forceReload: Should only be called when you want to reprocess the images of the current location. Example:
const result = await batch.submitImagesAsync(['image1.jpg', 'image2.jpg'], { forceReload: true });

getImagesAsync

getImagesAsync(): Promise<Batch>

Retrieves processed images. Example:

const imagesBatch = await batch.getImagesAsync();

addFurnitureAsync

addFurnitureAsync(imageUrl: string, roomType: string, architectureStyle: string, additionalData?: Record<string, any>): Promise<string | undefined>

Adds furniture to the image - also called room staging.

  • imageUrl: URL of the image.
  • roomType: Type of room.
  • architectureStyle: Style of architecture.
  • additionalData: Optional additional data. Example:
const resultUrl = await batch.addFurnitureAsync('image.jpg', 'living_room', 'modern');

redecorateAsync

redecorateAsync(imageUrl: string, roomType: string, architectureStyle: string, additionalData?: Record<string, any>): Promise<string | undefined>

Redecorates / refurnishes the room in the image. Example:

const resultUrl = await batch.redecorateAsync('image.jpg', 'bedroom', 'contemporary');

indoorStagingOrRefurnishing

indoorStagingOrRefurnishing(imageUrl: string, roomType: string, architectureStyle: string, additionalData?: Record<string, any>): Promise<IndoorStagingOrRefurnishingResponse | undefined>

Stages or refurnishes the interior of the room in the image. This function can be called instead of addFurnitureAsync or redecorateAsync allowing the Proptexx computer vision algoritms to assess if the room is empty or not, before executing the generative workload. This function includes some additional metrics in the output Example:

const stagingResult = await batch.indoorStagingOrRefurnishing('image.jpg', 'office', 'industrial');

submitFeedback

submitFeedback(sourceImgUrl: string, outputImgUrl: string, type: string, value?: string): Promise<boolean>

Submits feedback on the processed image. Example:

const feedbackSuccess = await batch.submitFeedback('source.jpg', 'output.jpg', 'feedback', 'like');

Lead Management

registerAsync

registerAsync(name: string, email: string, phone?: string, password?: string, additionalData?: Record<string, any>)

Registers a new lead. Example:

const registrationResult = await lead.registerAsync('John Doe', '[email protected]', '1234567890', 'securepassword');

existsAsync

existsAsync(email: string)

Checks if an email is already registered. Example:

const emailExists = await lead.existsAsync('[email protected]');

loginAsync

loginAsync(config: LoginConfig)

Enabled a user account to log in Example:

const loginConfig = { authType: 'credentials', email: '[email protected]', password: 'securepassword' };
await lead.loginAsync(loginConfig);

logoutAsync

logoutAsync()

Enables the current user to log out. Example:

await lead.logoutAsync();

changePasswordAsync

changePasswordAsync(password: string, confirmPassword: string)

Changes the password of the current user. Example:

await lead.changePasswordAsync('newpassword', 'newpassword');

Types

WidgetAuthResponse

interface WidgetAuthResponse {
    batch: Batch;
    options: Record<string, any>;
}

ProptexxOptions

interface ProptexxOptions {
    authServerUrl?: string;
    localStorageToken?: string;
}

LoginConfig

interface LoginConfig {
    authType: 'credentials' | 'otp' | 'secret';
    email: string;
    password?: string;
}

WidgetOptions

interface WidgetOptions extends Record<string, any> {}

Batch

interface Batch {
    batchId: string;
    entries: BatchImage[];
    status: number;
}

BatchImage

interface BatchImage {
    isEmptyRoom: boolean;
    url: string;
}

SubmitImagesOption

interface SubmitImagesOption extends Record<string, any> {
    forceReload?: boolean;
}

IndoorStagingOrRefurnishingResponse

interface IndoorStagingOrRefurnishingResponse {
    responseUrl: string;
    inputScenesWithScores: Record<string, number>;
    inputRoomTypesWithScores: Record<string, number>;
}

Conclusion

This SDK provides a set of tools to interact with the Proptexx widget services. Make sure to initialize the SDK properly and utilize the provided methods to handle various operations related to authentication, batch processing, and lead management.

License

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Additional Terms:

This software is intended to be used with a valid API key provided by Proptexx Inc. Any use of this software without a valid API key is strictly prohibited.