@namiml/web-sdk 3.3.11 → 3.3.12-rc.202604162049

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.
@@ -2,6 +2,13 @@ import { NamiAnonymousCampaign, NamiCampaign, NamiCampaignSegment } from "../../
2
2
  import { IPaywall } from "../../types/paywall";
3
3
  import type { TDevice } from '../../types/device';
4
4
  export declare const isValidUrl: (label: string) => boolean;
5
+ /**
6
+ * Find the best-matching URL campaign for an incoming URL using scored matching.
7
+ * Compares base paths (origin + pathname), then scores by query param key=value overlap.
8
+ * Priority: exact match (all campaign params present) > partial match > base-path-only fallback.
9
+ * Among ties, the campaign with more total params (more specific) wins.
10
+ */
11
+ export declare const bestUrlCampaignMatch: (incomingUrl: string, campaigns: NamiCampaign[]) => NamiCampaign | undefined;
5
12
  export declare const selectSegment: (segments: NamiCampaignSegment[], splitPosition: number) => NamiCampaignSegment;
6
13
  export declare const mapAnonymousCampaigns: (campaigns: NamiAnonymousCampaign[], splitPosition: number, formFactor?: TDevice) => NamiCampaign[];
7
14
  /**