@namiml/web-sdk 3.3.9 → 3.4.0-dev.202603250027

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,7 @@ 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;
10
11
  flow?: NamiFlowDTO | null;
11
12
  segment: string;
12
13
  split: number;
@@ -34,6 +35,8 @@ export interface NamiCampaign {
34
35
  name: string;
35
36
  segment: string;
36
37
  paywall?: string | null;
38
+ paywall_url?: string | null;
39
+ page_urls?: Record<string, string> | null;
37
40
  type: string | NamiCampaignRuleType;
38
41
  value?: string | null;
39
42
  form_factors: FormFactor[];
@@ -142,6 +142,7 @@ export type TInitialState = {
142
142
  currentPage: string;
143
143
  fullScreenPresentation?: boolean;
144
144
  isLoggedIn?: boolean;
145
+ presentationStyle?: NamiPresentationStyle;
145
146
  presentation_style?: NamiPresentationStyle;
146
147
  [key: string]: any;
147
148
  groups: InitiateStateGroup[];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@namiml/web-sdk",
3
3
  "type": "module",
4
- "version": "3.3.9",
4
+ "version": "3.4.0-dev.202603250027",
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": {