Skip to content

Commit

Permalink
chore: add NamiPaywallEvent type
Browse files Browse the repository at this point in the history
  • Loading branch information
joshvermaire committed Jun 19, 2024
1 parent db826d9 commit 1af6c2f
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 1 deletion.
21 changes: 21 additions & 0 deletions src/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,3 +151,24 @@ export type NamiPurchase = {
purchaseSource?: 'CAMPAIGN' | 'MARKETPLACE' | 'UNKNOWN';
};
export type NamiPurchasesState = 'pending' | 'purchased' | 'consumed' | 'resubscribed' | 'unsubscribed' | 'deferred' | 'failed' | 'cancelled' | 'unknown';
export type NamiPaywallEvent = {
action: NamiPaywallAction;
campaignId?: string;
campaignName?: string;
campaignType?: string;
campaignLabel?: string;
campaignUrl?: string;
paywallId?: string;
paywallName?: string;
componentChange?: NamiPaywallComponentChange;
segmentId?: string;
externalSegmentId?: string;
deeplinkUrl?: string;
sku?: NamiSKU;
purchaseError?: string;
purchases?: NamiPurchase[];
};
export type NamiPaywallComponentChange = {
id?: string;
name?: string;
};
25 changes: 24 additions & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export type GoogleProduct = {};

export type AmazonProduct = {};

// NameCampaignManager
// NamiCampaignManager
export type NamiCampaign = {
id: string;
rule: string;
Expand Down Expand Up @@ -297,3 +297,26 @@ export type NamiPurchasesState =
| 'failed'
| 'cancelled'
| 'unknown';

export type NamiPaywallEvent = {
action: NamiPaywallAction;
campaignId?: string;
campaignName?: string;
campaignType?: string;
campaignLabel?: string;
campaignUrl?: string;
paywallId?: string;
paywallName?: string;
componentChange?: NamiPaywallComponentChange;
segmentId?: string;
externalSegmentId?: string;
deeplinkUrl?: string;
sku?: NamiSKU;
purchaseError?: string;
purchases?: NamiPurchase[];
};

export type NamiPaywallComponentChange = {
id?: string;
name?: string;
};

0 comments on commit 1af6c2f

Please sign in to comment.