@namiml/web-sdk 1.5.10 → 1.5.12
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/CHANGELOG.md +14 -0
- package/dist/nami/utils/campaign.d.ts +18 -0
- package/dist/nami/utils/paywall.d.ts +17 -0
- package/dist/nami-web.cjs +13 -13
- package/dist/nami-web.js +13 -13
- package/dist/nami-web.mjs +13 -13
- package/dist/nami-web.umd.js +14 -14
- package/dist/services/storage.service.d.ts +6 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.5.12 (July 30, 2025)
|
|
4
|
+
|
|
5
|
+
## Bugfixes
|
|
6
|
+
- Fix race condition when local storage fails
|
|
7
|
+
|
|
8
|
+
## 1.5.11 (June 18, 2025)
|
|
9
|
+
|
|
10
|
+
## Enhancements
|
|
11
|
+
- Performance improvements for form factor lookups
|
|
12
|
+
|
|
13
|
+
## Bugfixes
|
|
14
|
+
- Fix uninterpolated smart text
|
|
15
|
+
- Fix fallback to in-memory storage on localStorage write failures
|
|
16
|
+
|
|
3
17
|
## 1.5.10 (May 22, 2025)
|
|
4
18
|
|
|
5
19
|
## Enhancements
|
|
@@ -1,7 +1,25 @@
|
|
|
1
1
|
import { NamiCampaign } from "../../types/externals/campaign";
|
|
2
2
|
import { IPaywall } from "../../types/paywall";
|
|
3
3
|
export declare const isValidUrl: (label: string) => boolean;
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
* @returns A combined list of unique campaigns based on both API and Initial, filtered by form factor.
|
|
7
|
+
* This is used to get all campaigns that are applicable to the current device.
|
|
8
|
+
*
|
|
9
|
+
* Note: Since this function returns a unique list of campaigns, and API campaigns take precedence,
|
|
10
|
+
* there may be times when API campaigns are returned that do not yet have paywalls but initial campaigns would.
|
|
11
|
+
*/
|
|
4
12
|
export declare const allCampaigns: () => NamiCampaign[];
|
|
13
|
+
export declare const getInitialCampaigns: () => NamiCampaign[];
|
|
14
|
+
export declare const getApiCampaigns: () => NamiCampaign[];
|
|
15
|
+
/**
|
|
16
|
+
* Get paywall data from label. This function continues to search for both the campaign and paywall
|
|
17
|
+
* based on the provided label and type. It first checks API data, then falls back to initial data.
|
|
18
|
+
*
|
|
19
|
+
* @param value Campaign label to search for
|
|
20
|
+
* @param type Campaign type to filter by
|
|
21
|
+
* @returns An object containing the currently available campaign and paywall data
|
|
22
|
+
*/
|
|
5
23
|
export declare const getPaywallDataFromLabel: (value: string, type?: string) => {
|
|
6
24
|
campaign: NamiCampaign | undefined;
|
|
7
25
|
paywall: IPaywall | undefined;
|
|
@@ -1,2 +1,19 @@
|
|
|
1
1
|
import { IPaywall } from "../../types/paywall";
|
|
2
|
+
/**
|
|
3
|
+
* Get initial paywalls from storage service.
|
|
4
|
+
* @returns An array of initial paywalls from storage service.
|
|
5
|
+
*/
|
|
6
|
+
export declare const getInitialPaywalls: () => IPaywall[];
|
|
7
|
+
/**
|
|
8
|
+
* Get all API paywalls from storage service.
|
|
9
|
+
* @returns An array of API paywalls from storage service.
|
|
10
|
+
*/
|
|
11
|
+
export declare const getApiPaywalls: () => IPaywall[];
|
|
12
|
+
/**
|
|
13
|
+
* Get all paywalls from both API and Initial sources, ensuring uniqueness.
|
|
14
|
+
* This function combines paywalls from both sources and filters out duplicates.
|
|
15
|
+
* API Data takes precedence over Initial Data.
|
|
16
|
+
*
|
|
17
|
+
* @returns A combined list of unique paywalls based on both API and Initial data.
|
|
18
|
+
*/
|
|
2
19
|
export declare const allPaywalls: () => IPaywall[];
|