Usage
Use thestartCouponAutoApply(codes: string[]) method provided by the web extension SDK to start the coupon application on a tab.
Register for the coupon auto-apply events
Sleek’s web extension SDK automatically handles restarting CAA after page reloads, finding the best coupon for the cart, and more. The result and status of CAA is emitted using the web extension SDK’s event listener. Subscribe to events that you care about to create UX for your users that shows the status of coupons and the savings that users earn. For example, you might want to show UI when coupons start to get entered on a tab and when the CAA process finishes. To do so, you can follow a pattern like:Register for user generated code (UGC) events
Once CAA has been enabled and run on a tab, the user may enter a coupon code into the page. This coupon code is called a user generated code (UGC). UGC events are emitted by the web extension SDK when UGC is detected on a tab. To register for UGC events, you can follow a pattern like:View TypeDoc
Browse the reference TypeDoc for the web extension SDK.

