@namiml/web-sdk 3.4.0-dev.202603232321 → 3.4.0-dev.202603251814

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.
@@ -5,10 +5,15 @@ export declare class CampaignRuleRepository {
5
5
  currentFormFactor: TDevice;
6
6
  splitPosition: number;
7
7
  disableCampaignUpdates: boolean;
8
+ useLegacyPaywallFetch: boolean;
8
9
  static instance: CampaignRuleRepository;
9
10
  constructor();
10
11
  configure(formFactor: TDevice, splitPosition: number, namiCommands?: string[]): void;
11
12
  fetchCampaignRules(paywalls: IPaywall[]): Promise<NamiCampaign[]>;
13
+ static extractPaywallUrls(campaigns: NamiCampaign[]): string[];
14
+ static hasPaywallUrls(campaigns: NamiCampaign[]): boolean;
15
+ fetchCampaignRulesRaw(): Promise<NamiCampaign[]>;
16
+ finalizeCampaignRules(campaignRules: NamiCampaign[], paywalls: IPaywall[]): NamiCampaign[];
12
17
  invokeAvailableCampaignsResponseHandler(): void;
13
18
  private getAnonymousCampaigns;
14
19
  private getCampaigns;
@@ -4,5 +4,7 @@ export declare class PaywallRepository {
4
4
  fetchPaywalls(): Promise<IPaywall[]>;
5
5
  private getAnonymousPaywalls;
6
6
  private getPaywalls;
7
+ fetchPaywallByUrl(url: string): Promise<IPaywall>;
8
+ fetchPaywallsByUrls(urls: string[]): Promise<IPaywall[]>;
7
9
  private fallbackData;
8
10
  }
@@ -7,6 +7,8 @@ import { NamiFlowDTO, NamiFlowWithObject } from "../flow";
7
7
  export interface NamiCampaignSegment {
8
8
  form_factors: FormFactor[];
9
9
  paywall?: string | null;
10
+ paywall_url?: string | null;
11
+ page_urls?: Record<string, string> | null;
10
12
  flow?: NamiFlowDTO | null;
11
13
  segment: string;
12
14
  split: number;
@@ -34,6 +36,8 @@ export interface NamiCampaign {
34
36
  name: string;
35
37
  segment: string;
36
38
  paywall?: string | null;
39
+ paywall_url?: string | null;
40
+ page_urls?: Record<string, string> | null;
37
41
  type: string | NamiCampaignRuleType;
38
42
  value?: string | null;
39
43
  form_factors: FormFactor[];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@namiml/web-sdk",
3
3
  "type": "module",
4
- "version": "3.4.0-dev.202603232321",
4
+ "version": "3.4.0-dev.202603251814",
5
5
  "source": "src/nami-web.ts",
6
6
  "description": "Subscription monetization infrastructure — drop-in SDK with no-code paywalls, onboarding flows, A/B testing for web",
7
7
  "scripts": {