saaslabsco/justcall-dialer-sdk ? reverse-engineered prompt
Reverse engineered prompt
Build me a TypeScript SDK for embedding the JustCall dialer into a web app, so developers can drop it into a page, log users in, listen for call and SMS events, and control the dialer from code.
I want the main class to let someone mount the dialer into a specific HTML element, wait until it is ready, check whether the user is logged in, prefill a phone number to dial, and clean everything up when they are done. It should also support callbacks for login, logout, ready state, ringing calls, answered calls, ended calls, and incoming SMS messages.
Please include a simple example in the repo, clear README docs, and solid TypeScript types for all event data and error codes. Add tests for the main behaviors too, and make sure the package builds cleanly for publishing. If you need to check current JustCall docs or browser behavior, look them up online first.
Are you gonna build this?
make sure you review the code using coderabbit