@encorekit/web-sdk 2.0.7 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/umd/encore.min.js +1 -1
- package/dist/umd/encore.min.js.map +1 -1
- package/package.json +1 -1
- package/types/api/APIClient.d.ts +18 -0
- package/types/api/APIClient.d.ts.map +1 -1
- package/types/api/generated/types.d.ts +177 -2
- package/types/api/generated/types.d.ts.map +1 -1
- package/types/api/models.d.ts +32 -0
- package/types/api/models.d.ts.map +1 -1
- package/types/core/Encore.d.ts.map +1 -1
- package/types/core/giftVariant.d.ts +67 -0
- package/types/core/giftVariant.d.ts.map +1 -0
- package/types/core/version.d.ts +1 -1
- package/types/types.d.ts +31 -3
- package/types/types.d.ts.map +1 -1
- package/types/ui/GiftHero.d.ts +75 -0
- package/types/ui/GiftHero.d.ts.map +1 -0
- package/types/ui/GiftList.d.ts +110 -0
- package/types/ui/GiftList.d.ts.map +1 -0
- package/types/ui/GiftReveal.d.ts +133 -0
- package/types/ui/GiftReveal.d.ts.map +1 -0
- package/types/ui/GiftSheet.d.ts +126 -0
- package/types/ui/GiftSheet.d.ts.map +1 -0
- package/types/ui/GiftUnwrap.d.ts +155 -0
- package/types/ui/GiftUnwrap.d.ts.map +1 -0
- package/types/ui/OfferCarousel.d.ts +10 -3
- package/types/ui/OfferCarousel.d.ts.map +1 -1
- package/types/ui/OfferModal.d.ts +7 -0
- package/types/ui/OfferModal.d.ts.map +1 -1
- package/types/ui/RewardActions.d.ts +88 -4
- package/types/ui/RewardActions.d.ts.map +1 -1
- package/types/ui/RewardCard.d.ts +16 -8
- package/types/ui/RewardCard.d.ts.map +1 -1
- package/types/ui/RewardConfetti.d.ts +23 -1
- package/types/ui/RewardConfetti.d.ts.map +1 -1
- package/types/ui/RewardLayout.d.ts +35 -0
- package/types/ui/RewardLayout.d.ts.map +1 -1
- package/types/ui/advertiserPreconnect.d.ts +90 -0
- package/types/ui/advertiserPreconnect.d.ts.map +1 -0
- package/types/ui/appearance.d.ts +27 -0
- package/types/ui/appearance.d.ts.map +1 -1
- package/types/ui/focusable.d.ts +41 -0
- package/types/ui/focusable.d.ts.map +1 -0
- package/types/ui/giftCategoryGroups.d.ts +21 -0
- package/types/ui/giftCategoryGroups.d.ts.map +1 -0
- package/types/ui/giftCopy.d.ts +215 -0
- package/types/ui/giftCopy.d.ts.map +1 -0
- package/types/ui/giftUnwrapArt.d.ts +55 -0
- package/types/ui/giftUnwrapArt.d.ts.map +1 -0
- package/types/ui/giftUnwrapCopy.d.ts +57 -0
- package/types/ui/giftUnwrapCopy.d.ts.map +1 -0
- package/types/ui/impressionGate.d.ts +63 -0
- package/types/ui/impressionGate.d.ts.map +1 -0
- package/types/ui/offerBadge.d.ts +56 -0
- package/types/ui/offerBadge.d.ts.map +1 -0
- package/types/ui/rewardSurface.d.ts +82 -0
- package/types/ui/rewardSurface.d.ts.map +1 -0
- package/types/ui/safeImageSrc.d.ts +10 -0
- package/types/ui/safeImageSrc.d.ts.map +1 -1
- package/types/ui/styles.d.ts +166 -0
- package/types/ui/styles.d.ts.map +1 -1
- package/types/ui/termsLine.d.ts +33 -0
- package/types/ui/termsLine.d.ts.map +1 -0
package/README.md
CHANGED
|
@@ -62,6 +62,12 @@ Encore.identify('user-123', {
|
|
|
62
62
|
subscriptionTier: 'free'
|
|
63
63
|
});
|
|
64
64
|
|
|
65
|
+
// Already know the user at load time (a login, or the userId on a hosted offer
|
|
66
|
+
// link)? Name them at configure instead, so the SDK's very first request — the
|
|
67
|
+
// /config that assigns experiment arms — runs as that user, not as an anonymous
|
|
68
|
+
// id it then abandons. A stored anonymous id is aliased to it as identify() would.
|
|
69
|
+
// Encore.configure({ apiKey: 'your-api-key-here', environment: 'production', userId: 'user-123' });
|
|
70
|
+
|
|
65
71
|
// Present a placement — defaults to the 'reduceChurn' use case
|
|
66
72
|
const result = await Encore.show();
|
|
67
73
|
if (result.status === 'claimed') {
|