@namiml/web-sdk 3.4.0-dev.202604010118 → 3.4.0-dev.202604170506
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/dist/adapters/index.d.ts +1 -0
- package/dist/adapters/web-device.adapter.d.ts +14 -0
- package/dist/adapters/web-storage.adapter.d.ts +8 -0
- package/dist/adapters/web-ui.adapter.d.ts +9 -0
- package/dist/components/ContextConsumer.d.ts +1 -1
- package/dist/components/ContextProvider.d.ts +32 -87
- package/dist/components/NamiElement.d.ts +1 -1
- package/dist/components/Paywall.d.ts +1 -5
- package/dist/components/PaywallScreen.d.ts +2 -4
- package/dist/components/TemplateComponent.d.ts +2 -2
- package/dist/components/containers/BackgroundContainer.d.ts +1 -2
- package/dist/components/containers/CarouselContainer.d.ts +3 -3
- package/dist/components/containers/CollapseContainer.d.ts +3 -3
- package/dist/components/containers/Container.d.ts +3 -3
- package/dist/components/containers/Content.d.ts +1 -2
- package/dist/components/containers/Footer.d.ts +2 -2
- package/dist/components/containers/Header.d.ts +2 -2
- package/dist/components/containers/ProductContainer.d.ts +2 -2
- package/dist/components/containers/RepeatingGrid.d.ts +1 -2
- package/dist/components/containers/ResponsiveGrid.d.ts +2 -2
- package/dist/components/elements/Button.d.ts +3 -3
- package/dist/components/elements/CountdownTimerText.d.ts +2 -3
- package/dist/components/elements/Image.d.ts +1 -1
- package/dist/components/elements/PlayPauseButton.d.ts +2 -2
- package/dist/components/elements/ProgressBar.d.ts +2 -2
- package/dist/components/elements/ProgressIndicator.d.ts +2 -2
- package/dist/components/elements/QRCode.d.ts +2 -2
- package/dist/components/elements/RadioButton.d.ts +2 -2
- package/dist/components/elements/SegmentPicker.d.ts +3 -3
- package/dist/components/elements/SegmentPickerItem.d.ts +2 -2
- package/dist/components/elements/Spacer.d.ts +2 -2
- package/dist/components/elements/Stack.d.ts +2 -2
- package/dist/components/elements/Text.d.ts +2 -2
- package/dist/components/elements/ToggleButton.d.ts +2 -2
- package/dist/components/elements/ToggleSwitch.d.ts +2 -2
- package/dist/components/elements/Video.d.ts +1 -1
- package/dist/components/elements/VolumeButton.d.ts +2 -2
- package/dist/components/productDetails.d.ts +1 -1
- package/dist/components/utils/actionTap.d.ts +1 -1
- package/dist/components/utils/helpers.d.ts +5 -5
- package/dist/components/utils/impression.d.ts +2 -2
- package/dist/components/utils/products.d.ts +1 -2
- package/dist/components/utils/state.d.ts +4 -4
- package/dist/components/utils/styles.d.ts +12 -4
- package/dist/legacy-support.cjs +213 -25528
- package/dist/legacy-support.d.ts +48 -1
- package/dist/legacy-support.mjs +213 -25528
- package/dist/nami-web.cjs +26 -26
- package/dist/nami-web.d.ts +606 -10
- package/dist/nami-web.mjs +26 -26
- package/dist/nami-web.umd.js +91 -91
- package/dist/polyfills.cjs +50 -25519
- package/dist/polyfills.js +50 -25519
- package/dist/translations/translate.d.ts +1 -6
- package/dist/types/externals/campaign.d.ts +2 -62
- package/dist/types/externals/config.d.ts +1 -41
- package/dist/types/externals/customer.d.ts +1 -18
- package/dist/types/externals/entitlement.d.ts +1 -38
- package/dist/types/externals/errors.d.ts +1 -12
- package/dist/types/externals/flow.d.ts +2 -51
- package/dist/types/externals/languages.d.ts +1 -197
- package/dist/types/externals/loglevel.d.ts +2 -10
- package/dist/types/externals/paywall.d.ts +2 -109
- package/dist/types/externals/product.d.ts +1 -32
- package/dist/types/externals/purchase.d.ts +1 -42
- package/dist/types/externals/sku.d.ts +1 -31
- package/dist/utils/animations.d.ts +1 -1
- package/dist/utils/fonts.d.ts +1 -1
- package/package.json +35 -51
- package/dist/core/errors.d.ts +0 -55
- package/dist/core/withRetry.d.ts +0 -2
- package/dist/decorators/index.d.ts +0 -2
- package/dist/nami/api.d.ts +0 -20
- package/dist/nami/campaign.d.ts +0 -87
- package/dist/nami/customer.d.ts +0 -136
- package/dist/nami/emitter.d.ts +0 -13
- package/dist/nami/entitlement.d.ts +0 -46
- package/dist/nami/flow/NamiFlow.d.ts +0 -77
- package/dist/nami/flow/NamiFlowManager.d.ts +0 -77
- package/dist/nami/index.d.ts +0 -19
- package/dist/nami/namiRefs.d.ts +0 -17
- package/dist/nami/paywalls.d.ts +0 -77
- package/dist/nami/profile.d.ts +0 -12
- package/dist/nami/purchase.d.ts +0 -9
- package/dist/nami/utils/campaign.d.ts +0 -29
- package/dist/nami/utils/entitlement.d.ts +0 -55
- package/dist/nami/utils/index.d.ts +0 -1
- package/dist/nami/utils/paywall.d.ts +0 -21
- package/dist/nami/utils/purchase.d.ts +0 -4
- package/dist/nami/utils/resolvers/BaseNamespaceResolver.d.ts +0 -7
- package/dist/nami/utils/resolvers/ConditionalEvaluator.d.ts +0 -19
- package/dist/nami/utils/resolvers/DeviceResolver.d.ts +0 -10
- package/dist/nami/utils/resolvers/FlowLiquidResolver.d.ts +0 -19
- package/dist/nami/utils/resolvers/FormStateResolver.d.ts +0 -7
- package/dist/nami/utils/resolvers/LaunchContextResolver.d.ts +0 -8
- package/dist/nami/utils/resolvers/PlacementLabelResolver.d.ts +0 -8
- package/dist/nami/utils/resolvers/URLParamsResolver.d.ts +0 -7
- package/dist/repositories/campaignRule.repository.d.ts +0 -21
- package/dist/repositories/config.repository.d.ts +0 -5
- package/dist/repositories/customerJourney.repository.d.ts +0 -5
- package/dist/repositories/device.repository.d.ts +0 -16
- package/dist/repositories/entitlement.repository.d.ts +0 -11
- package/dist/repositories/paywall.repository.d.ts +0 -10
- package/dist/repositories/products.repository.d.ts +0 -6
- package/dist/services/logger.service.d.ts +0 -13
- package/dist/services/session.service.d.ts +0 -4
- package/dist/services/storage.service.d.ts +0 -90
- package/dist/types/api.d.ts +0 -30
- package/dist/types/campaign.d.ts +0 -16
- package/dist/types/components/animation.d.ts +0 -40
- package/dist/types/components/containers.d.ts +0 -182
- package/dist/types/components/elements.d.ts +0 -188
- package/dist/types/components/index.d.ts +0 -137
- package/dist/types/conditions.d.ts +0 -26
- package/dist/types/config.d.ts +0 -38
- package/dist/types/customer.d.ts +0 -2
- package/dist/types/device.d.ts +0 -36
- package/dist/types/entitlements.d.ts +0 -21
- package/dist/types/flow.d.ts +0 -108
- package/dist/types/paywall.d.ts +0 -201
- package/dist/types/products.d.ts +0 -6
- package/dist/types/profile.d.ts +0 -21
- package/dist/types/purchase.d.ts +0 -32
- package/dist/types/sku.d.ts +0 -26
- package/dist/types/utils.d.ts +0 -1
- package/dist/utils/anonymousMode.d.ts +0 -25
- package/dist/utils/config.d.ts +0 -10
- package/dist/utils/const.d.ts +0 -1
- package/dist/utils/device.d.ts +0 -10
- package/dist/utils/events.d.ts +0 -30
- package/dist/utils/feature-flags.d.ts +0 -1
- package/dist/utils/helpers.d.ts +0 -1
- package/dist/utils/parsers.d.ts +0 -26
- package/dist/utils/simple-event-target.d.ts +0 -7
- package/dist/utils/url-params.d.ts +0 -11
package/dist/types/device.d.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
export interface Device {
|
|
2
|
-
id: string;
|
|
3
|
-
advertising_id: string;
|
|
4
|
-
app_env: string;
|
|
5
|
-
app_version: string;
|
|
6
|
-
country: string;
|
|
7
|
-
customer_data_platform_id: string;
|
|
8
|
-
device_model: string;
|
|
9
|
-
extended_framework_version: string;
|
|
10
|
-
extended_platform_version: string;
|
|
11
|
-
extended_platform: string;
|
|
12
|
-
form_factor: TDevice;
|
|
13
|
-
language: string;
|
|
14
|
-
marketplace_country: string;
|
|
15
|
-
os_name: string;
|
|
16
|
-
os_version: string;
|
|
17
|
-
sdk_client: string;
|
|
18
|
-
sdk_version: string;
|
|
19
|
-
vendor_id: string;
|
|
20
|
-
}
|
|
21
|
-
export interface DevicePayload {
|
|
22
|
-
id?: string;
|
|
23
|
-
os_version: string;
|
|
24
|
-
os_name: string;
|
|
25
|
-
browser_name: string;
|
|
26
|
-
browser_version: string | undefined;
|
|
27
|
-
sdk_client: string;
|
|
28
|
-
device_model?: string;
|
|
29
|
-
form_factor?: string;
|
|
30
|
-
sdk_version: string;
|
|
31
|
-
language: string;
|
|
32
|
-
extended_platform_version?: string;
|
|
33
|
-
extended_platform?: string;
|
|
34
|
-
}
|
|
35
|
-
export type TDevice = 'phone' | 'tablet' | 'television' | 'desktop';
|
|
36
|
-
export type TDeviceOrientation = 'landscape' | 'portrait';
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { NamiPurchase } from "./externals/purchase";
|
|
2
|
-
import { NamiSKU } from "./externals/sku";
|
|
3
|
-
export type IEntitlements = {
|
|
4
|
-
id: string;
|
|
5
|
-
entitlement_ref_id: string;
|
|
6
|
-
name: string;
|
|
7
|
-
description: string | null;
|
|
8
|
-
type: string;
|
|
9
|
-
expires?: string;
|
|
10
|
-
};
|
|
11
|
-
export type NamiEntitlement = {
|
|
12
|
-
activePurchases: NamiPurchase[];
|
|
13
|
-
desc: string;
|
|
14
|
-
name: string;
|
|
15
|
-
namiId: string;
|
|
16
|
-
purchasedSkus: NamiSKU[];
|
|
17
|
-
referenceId: string;
|
|
18
|
-
relatedSkus: NamiSKU[];
|
|
19
|
-
expires?: number;
|
|
20
|
-
};
|
|
21
|
-
export type NamiActiveEntitlementsHandler = (entitlement: NamiEntitlement[]) => void;
|
package/dist/types/flow.d.ts
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import type { NamiConditions } from "./conditions";
|
|
2
|
-
import { FormFactor } from "./campaign";
|
|
3
|
-
export declare const NamiFlowStepType: {
|
|
4
|
-
readonly ENTRY: "entry";
|
|
5
|
-
readonly SCREEN: "screen";
|
|
6
|
-
readonly BRANCH: "branch";
|
|
7
|
-
readonly EXIT: "exit";
|
|
8
|
-
readonly UNKNOWN: "unknown";
|
|
9
|
-
};
|
|
10
|
-
export type NamiFlowStepType = (typeof NamiFlowStepType)[keyof typeof NamiFlowStepType];
|
|
11
|
-
export declare enum NamiFlowActionFunction {
|
|
12
|
-
NAVIGATE = "flowNav",
|
|
13
|
-
BACK = "flowPrev",
|
|
14
|
-
NEXT = "flowNext",
|
|
15
|
-
FINISHED = "flowDone",
|
|
16
|
-
DISMISS = "flowDismiss",
|
|
17
|
-
EXIT = "flowExit",
|
|
18
|
-
HANDOFF = "flowHandoff",
|
|
19
|
-
TRACK = "trackEvent",
|
|
20
|
-
LOG = "logEvent",
|
|
21
|
-
SET_VIDEO = "setVideo",
|
|
22
|
-
FLOW_EVENT = "flowEvent",
|
|
23
|
-
BLOCK_BACK = "blockBackToStep",
|
|
24
|
-
FLOW_ENABLED = "flowInteractionEnabled",
|
|
25
|
-
FLOW_DISABLED = "flowInteractionDisabled",
|
|
26
|
-
SET_TAGS = "setTags",
|
|
27
|
-
PAUSE = "flowPause",
|
|
28
|
-
RESUME = "flowResume"
|
|
29
|
-
}
|
|
30
|
-
export declare const HandoffTag: {
|
|
31
|
-
readonly SEQUENCE: "__handoff_sequence__";
|
|
32
|
-
};
|
|
33
|
-
export type NamiFlowHandoffStepHandler = (handoffTag: string, handoffData?: Record<string, any>) => void;
|
|
34
|
-
export type NamiFlowEventHandler = (eventHandler: Record<string, any>) => void;
|
|
35
|
-
export interface NamiFlowDTO {
|
|
36
|
-
flow_id?: string;
|
|
37
|
-
object_id?: string;
|
|
38
|
-
url?: string;
|
|
39
|
-
page_urls?: Record<string, string> | null;
|
|
40
|
-
object?: NamiFlowObjectDTO;
|
|
41
|
-
}
|
|
42
|
-
export type NamiFlowWithObject = Omit<NamiFlowDTO, 'object'> & {
|
|
43
|
-
object: NamiFlowObjectDTO;
|
|
44
|
-
};
|
|
45
|
-
export interface NamiFlowObjectDTO {
|
|
46
|
-
id?: string;
|
|
47
|
-
name?: string;
|
|
48
|
-
resume_from_bookmark?: boolean;
|
|
49
|
-
screens?: string[];
|
|
50
|
-
form_factors?: FormFactor[];
|
|
51
|
-
version?: string;
|
|
52
|
-
steps?: NamiFlowStep[];
|
|
53
|
-
transition?: NamiFlowTransition;
|
|
54
|
-
}
|
|
55
|
-
type SetVideoAction = {
|
|
56
|
-
name?: string;
|
|
57
|
-
url?: string;
|
|
58
|
-
};
|
|
59
|
-
export interface NamiFlowAction {
|
|
60
|
-
id?: string;
|
|
61
|
-
function: `${NamiFlowActionFunction}`;
|
|
62
|
-
parameters?: {
|
|
63
|
-
handoffTag?: string;
|
|
64
|
-
handoffData?: Record<string, any>;
|
|
65
|
-
handoffFormId?: string;
|
|
66
|
-
step?: string;
|
|
67
|
-
eventName?: string;
|
|
68
|
-
delay?: string | number;
|
|
69
|
-
[key: string]: any;
|
|
70
|
-
} & SetVideoAction;
|
|
71
|
-
conditions?: NamiConditions[];
|
|
72
|
-
}
|
|
73
|
-
export interface NamiFlowOn {
|
|
74
|
-
before?: NamiFlowAction[];
|
|
75
|
-
action?: NamiFlowAction[];
|
|
76
|
-
after?: NamiFlowAction[];
|
|
77
|
-
}
|
|
78
|
-
export interface NamiFlowStep {
|
|
79
|
-
id: string;
|
|
80
|
-
name?: string;
|
|
81
|
-
type: NamiFlowStepType;
|
|
82
|
-
screen?: string;
|
|
83
|
-
branch_tags?: string[];
|
|
84
|
-
actions: Partial<Record<string, NamiFlowOn[]>>;
|
|
85
|
-
allow_back_to?: boolean;
|
|
86
|
-
}
|
|
87
|
-
export type NamiFlowTransition = 'none' | 'slide' | 'verticalSlide' | 'fade';
|
|
88
|
-
export type NamiFlowTransitionDirection = 'forward' | 'backward';
|
|
89
|
-
export interface NamiFlowAnimation {
|
|
90
|
-
transition: NamiFlowTransition;
|
|
91
|
-
direction: NamiFlowTransitionDirection;
|
|
92
|
-
}
|
|
93
|
-
export declare const NamiReservedActions: {
|
|
94
|
-
readonly BUY_SKU: "__buy_sku__";
|
|
95
|
-
readonly DEFAULT: "__default__";
|
|
96
|
-
readonly APPEAR: "__appear__";
|
|
97
|
-
readonly DISAPPEAR: "__disappear__";
|
|
98
|
-
readonly LOGIN_SUCCESS: "__login_success__";
|
|
99
|
-
readonly LOGIN_FAILURE: "__login_failure__";
|
|
100
|
-
readonly LOGOUT_SUCCESS: "__logout_success__";
|
|
101
|
-
readonly LOGOUT_FAILURE: "__logout_failure__";
|
|
102
|
-
readonly PURCHASE_SUCCESS: "__purchase_success__";
|
|
103
|
-
readonly PURCHASE_FAILURE: "__purchase_failure__";
|
|
104
|
-
readonly RESUME: "__resume__";
|
|
105
|
-
readonly REMOTE_BACK: "__remoteback__";
|
|
106
|
-
readonly TAG_UPDATE: "__tag_update__";
|
|
107
|
-
};
|
|
108
|
-
export {};
|
package/dist/types/paywall.d.ts
DELETED
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
import { NamiCampaign } from "./externals/campaign";
|
|
2
|
-
import { TComponent, TContainer } from "./components";
|
|
3
|
-
import { TCarouselSlidesState, THeaderFooter } from "./components/containers";
|
|
4
|
-
import { TDeviceOrientation } from "./device";
|
|
5
|
-
import { PaywallSKU } from "./sku";
|
|
6
|
-
import { NamiPurchase } from "./externals/purchase";
|
|
7
|
-
import { Optional } from "./utils";
|
|
8
|
-
import { LaunchCampaignError } from "./externals/errors";
|
|
9
|
-
import { NamiPaywallAction, NamiPaywallComponentChange, NamiPaywallEventVideoMetadata, NamiPaywallLaunchContext } from "./externals/paywall";
|
|
10
|
-
import { NamiSKU } from "./externals/sku";
|
|
11
|
-
export type NamiPresentationStyle = 'fullscreen' | 'sheet' | 'compact_sheet' | 'modal';
|
|
12
|
-
export declare function getEffectiveWebStyle(style: NamiPresentationStyle | undefined | null): NamiPresentationStyle;
|
|
13
|
-
export type TPaywallContext = TInitialState & {
|
|
14
|
-
paywallId: string;
|
|
15
|
-
livePaywalls: IPaywall[];
|
|
16
|
-
selectedPaywall?: IPaywall;
|
|
17
|
-
selectedCampaign?: NamiCampaign;
|
|
18
|
-
campaignRules: NamiCampaign[];
|
|
19
|
-
anySkuHasTrialOffer: boolean;
|
|
20
|
-
anySkuHasIntroOffer: boolean;
|
|
21
|
-
anySkuHasPromoOffer: boolean;
|
|
22
|
-
safeAreaTop: number;
|
|
23
|
-
slides?: TCarouselSlidesState;
|
|
24
|
-
currentPage: string;
|
|
25
|
-
fullScreenPresentation?: boolean;
|
|
26
|
-
isLoggedIn?: boolean;
|
|
27
|
-
darkMode?: boolean;
|
|
28
|
-
orientation: TDeviceOrientation;
|
|
29
|
-
focusedState: boolean;
|
|
30
|
-
platformId: string;
|
|
31
|
-
mediaList: {
|
|
32
|
-
[key: string]: any;
|
|
33
|
-
};
|
|
34
|
-
customer: {
|
|
35
|
-
[key: string]: any;
|
|
36
|
-
};
|
|
37
|
-
hasNotch: boolean;
|
|
38
|
-
skuItems: PaywallSKU[];
|
|
39
|
-
groups: {
|
|
40
|
-
id: string;
|
|
41
|
-
displayName: string;
|
|
42
|
-
ref: string;
|
|
43
|
-
}[];
|
|
44
|
-
currentGroupId: string;
|
|
45
|
-
formStates: {
|
|
46
|
-
[formId: string]: boolean | string;
|
|
47
|
-
};
|
|
48
|
-
timerStates: {
|
|
49
|
-
[timerId: string]: TimerState;
|
|
50
|
-
};
|
|
51
|
-
selectedProducts: {
|
|
52
|
-
[currentGroupId: string]: string | null;
|
|
53
|
-
};
|
|
54
|
-
launch: TPaywallLaunchContext;
|
|
55
|
-
sku: {
|
|
56
|
-
[key: string]: any;
|
|
57
|
-
};
|
|
58
|
-
purchaseInProgress: boolean;
|
|
59
|
-
productBeingPurchased?: NamiSKU;
|
|
60
|
-
timeSpentOnPaywall?: number;
|
|
61
|
-
userInteractionEnabled?: boolean;
|
|
62
|
-
};
|
|
63
|
-
export type TimerState = {
|
|
64
|
-
remainingSeconds: number;
|
|
65
|
-
savedAt: number;
|
|
66
|
-
hasEmittedCompletion: boolean;
|
|
67
|
-
};
|
|
68
|
-
export type TPaywallLaunchContext = Required<NamiPaywallLaunchContext>;
|
|
69
|
-
export type ProductGroup = {
|
|
70
|
-
id: string;
|
|
71
|
-
products: PaywallSKU[];
|
|
72
|
-
ref: string;
|
|
73
|
-
};
|
|
74
|
-
export interface IPaywall {
|
|
75
|
-
id: string;
|
|
76
|
-
name: string;
|
|
77
|
-
paywall_type: string;
|
|
78
|
-
sku_menus: ISkuMenu[];
|
|
79
|
-
template: TPaywallTemplate;
|
|
80
|
-
fonts: FontCollection;
|
|
81
|
-
}
|
|
82
|
-
export interface ISkuMenu {
|
|
83
|
-
id: string;
|
|
84
|
-
name: string;
|
|
85
|
-
display_name: string;
|
|
86
|
-
ref: string;
|
|
87
|
-
products: PaywallSKU[];
|
|
88
|
-
}
|
|
89
|
-
export interface IEntitlements {
|
|
90
|
-
id: string;
|
|
91
|
-
entitlement_ref_id: string;
|
|
92
|
-
name: string;
|
|
93
|
-
description: string | null;
|
|
94
|
-
type: string;
|
|
95
|
-
}
|
|
96
|
-
export interface IProductsWithComponents extends PaywallSKU {
|
|
97
|
-
components: TComponent;
|
|
98
|
-
}
|
|
99
|
-
export type FontCollection = {
|
|
100
|
-
[fontName: string]: FontDetails;
|
|
101
|
-
};
|
|
102
|
-
export type FontDetails = {
|
|
103
|
-
id: string;
|
|
104
|
-
family: string;
|
|
105
|
-
style: string;
|
|
106
|
-
file: string;
|
|
107
|
-
};
|
|
108
|
-
export type TPaywallTemplate = {
|
|
109
|
-
id: string;
|
|
110
|
-
orgs?: string | null;
|
|
111
|
-
org_id?: string | null;
|
|
112
|
-
changelog?: string;
|
|
113
|
-
userHasAccess?: boolean;
|
|
114
|
-
media?: {
|
|
115
|
-
[key: string]: string;
|
|
116
|
-
};
|
|
117
|
-
pages: TPages[];
|
|
118
|
-
ready?: boolean;
|
|
119
|
-
version: string | number;
|
|
120
|
-
codename: string;
|
|
121
|
-
doc_link: string;
|
|
122
|
-
thumbnail?: string;
|
|
123
|
-
skuContexts?: {
|
|
124
|
-
[skuId: string]: {
|
|
125
|
-
[key: string]: any;
|
|
126
|
-
};
|
|
127
|
-
};
|
|
128
|
-
initialState: TInitialState;
|
|
129
|
-
min_sdk_version: string;
|
|
130
|
-
capabilities?: string[];
|
|
131
|
-
displaySingleGroup?: boolean;
|
|
132
|
-
};
|
|
133
|
-
export type TPages = {
|
|
134
|
-
name: string;
|
|
135
|
-
header: THeaderFooter;
|
|
136
|
-
contentContainer: TContainer | null;
|
|
137
|
-
footer: THeaderFooter;
|
|
138
|
-
backgroundContainer: TContainer | null;
|
|
139
|
-
};
|
|
140
|
-
export type TInitialState = {
|
|
141
|
-
slides?: TCarouselSlidesState;
|
|
142
|
-
currentPage: string;
|
|
143
|
-
fullScreenPresentation?: boolean;
|
|
144
|
-
isLoggedIn?: boolean;
|
|
145
|
-
presentationStyle?: NamiPresentationStyle;
|
|
146
|
-
presentation_style?: NamiPresentationStyle;
|
|
147
|
-
[key: string]: any;
|
|
148
|
-
groups: InitiateStateGroup[];
|
|
149
|
-
currentGroupId: string;
|
|
150
|
-
selectedProducts: {
|
|
151
|
-
[currentGroupId: string]: string | null;
|
|
152
|
-
};
|
|
153
|
-
};
|
|
154
|
-
export type InitiateStateGroup = {
|
|
155
|
-
id: string;
|
|
156
|
-
displayName: string;
|
|
157
|
-
ref: string;
|
|
158
|
-
};
|
|
159
|
-
export type TPaywallMedia = {
|
|
160
|
-
id: string;
|
|
161
|
-
content: string | null;
|
|
162
|
-
paywall: string;
|
|
163
|
-
name: string;
|
|
164
|
-
};
|
|
165
|
-
export type TProductGroup = {
|
|
166
|
-
id: string;
|
|
167
|
-
display_name: string;
|
|
168
|
-
display_order: number;
|
|
169
|
-
default: boolean;
|
|
170
|
-
paywall: string;
|
|
171
|
-
ref: string;
|
|
172
|
-
};
|
|
173
|
-
export type TMediaTypes = {
|
|
174
|
-
[name: string]: Optional<TPaywallMedia, 'id'>;
|
|
175
|
-
};
|
|
176
|
-
export type TOffer = {
|
|
177
|
-
freeTrialEligible: boolean;
|
|
178
|
-
introEligible: boolean;
|
|
179
|
-
promoEligible: boolean;
|
|
180
|
-
};
|
|
181
|
-
export declare enum PaywallManagerEvents {
|
|
182
|
-
BuySku = "RegisterBuySKU",
|
|
183
|
-
Close = "PaywallCloseRequested",
|
|
184
|
-
SignIn = "PaywallSignInRequested",
|
|
185
|
-
Restore = "PaywallRestoreRequested",
|
|
186
|
-
DeeplinkAction = "PaywallDeeplinkAction"
|
|
187
|
-
}
|
|
188
|
-
export type PaywallActionEvent = {
|
|
189
|
-
action: NamiPaywallAction;
|
|
190
|
-
sku?: NamiSKU;
|
|
191
|
-
videoMetaData: NamiPaywallEventVideoMetadata;
|
|
192
|
-
timeSpentOnPaywall?: number;
|
|
193
|
-
componentChange?: NamiPaywallComponentChange;
|
|
194
|
-
purchaseError?: string;
|
|
195
|
-
purchases?: NamiPurchase[];
|
|
196
|
-
};
|
|
197
|
-
export type PaywallResultHandler = (success: boolean, error?: LaunchCampaignError) => void;
|
|
198
|
-
export type NamiAppSuppliedVideoDetails = {
|
|
199
|
-
url: string;
|
|
200
|
-
name?: string;
|
|
201
|
-
};
|
package/dist/types/products.d.ts
DELETED
package/dist/types/profile.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export type NamiProfile = {
|
|
2
|
-
externalId: string;
|
|
3
|
-
};
|
|
4
|
-
/**
|
|
5
|
-
* Represents the possible account actions states that can be returned by callback registered from
|
|
6
|
-
* [NamiCustomerManager.registerAccountStateHandler]
|
|
7
|
-
*/
|
|
8
|
-
export declare enum AccountStateAction {
|
|
9
|
-
LOGIN = "login",
|
|
10
|
-
LOGOUT = "logout",
|
|
11
|
-
ADVERTISING_ID_SET = "advertising_id_set",
|
|
12
|
-
ADVERTISING_ID_CLEARED = "advertising_id_cleared",
|
|
13
|
-
VENDOR_ID_SET = "vendor_id_set",
|
|
14
|
-
VENDOR_ID_CLEARED = "vendor_id_cleared",
|
|
15
|
-
CUSTOMER_DATA_PLATFORM_ID_SET = "customer_data_platform_id_set",
|
|
16
|
-
CUSTOMER_DATA_PLATFORM_ID_CLEARED = "customer_data_platform_id_cleared",
|
|
17
|
-
ANONYMOUS_MODE_ON = "anonymous_mode_on",
|
|
18
|
-
ANONYMOUS_MODE_OFF = "anonymous_mode_off",
|
|
19
|
-
NAMI_DEVICE_ID_SET = "nami_device_id_set",
|
|
20
|
-
NAMI_DEVICE_ID_CLEARED = "nami_device_id_cleared"
|
|
21
|
-
}
|
package/dist/types/purchase.d.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { NamiPurchase } from "./externals";
|
|
2
|
-
export type NamiPurchaseSource = 'CAMPAIGN' | 'MARKETPLACE' | 'UNKNOWN';
|
|
3
|
-
export type NamiPurchaseState = "purchased" | "failed" | "cancelled" | "pending" | "unknown";
|
|
4
|
-
export type TransactionRequest = {
|
|
5
|
-
quantity?: string;
|
|
6
|
-
currency?: string;
|
|
7
|
-
purchase_env: string;
|
|
8
|
-
amount?: number;
|
|
9
|
-
impression: string;
|
|
10
|
-
session?: string;
|
|
11
|
-
original_transaction_id?: string;
|
|
12
|
-
transaction_id: string;
|
|
13
|
-
source?: string;
|
|
14
|
-
sku: string;
|
|
15
|
-
localized_description?: string;
|
|
16
|
-
subscription_interval?: string;
|
|
17
|
-
subscription_interval_count?: number;
|
|
18
|
-
purchase_date?: string;
|
|
19
|
-
original_purchase_date?: string;
|
|
20
|
-
app_env: string;
|
|
21
|
-
};
|
|
22
|
-
export type PurchaseValidationRequest = {
|
|
23
|
-
app_env: string;
|
|
24
|
-
payload: string;
|
|
25
|
-
sku: string;
|
|
26
|
-
};
|
|
27
|
-
export type NamiPurchaseCompleteResult = {
|
|
28
|
-
success: boolean;
|
|
29
|
-
billingResponseCode?: number;
|
|
30
|
-
message?: string;
|
|
31
|
-
purchase?: NamiPurchase;
|
|
32
|
-
};
|
package/dist/types/sku.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { NamiProductDetails } from "./externals/product";
|
|
2
|
-
import { IEntitlements } from "./paywall";
|
|
3
|
-
import { NamiSKUType } from "./externals/sku";
|
|
4
|
-
export interface SKU {
|
|
5
|
-
id: string;
|
|
6
|
-
name: string;
|
|
7
|
-
sku_ref_id: string;
|
|
8
|
-
entitlements: IEntitlements[];
|
|
9
|
-
sku_type?: NamiSKUType;
|
|
10
|
-
}
|
|
11
|
-
export interface PaywallSKU extends SKU {
|
|
12
|
-
display_text?: string;
|
|
13
|
-
sub_display_text?: string;
|
|
14
|
-
featured?: boolean;
|
|
15
|
-
variables?: {
|
|
16
|
-
[key: string]: any;
|
|
17
|
-
};
|
|
18
|
-
product_details?: NamiProductDetails | null;
|
|
19
|
-
offer_id?: string | null;
|
|
20
|
-
offer_type?: string | null;
|
|
21
|
-
offer_ref_id?: string | null;
|
|
22
|
-
computed_signature?: string | null;
|
|
23
|
-
}
|
|
24
|
-
export type AppleProduct = unknown;
|
|
25
|
-
export type GoogleProduct = unknown;
|
|
26
|
-
export type AmazonProduct = unknown;
|
package/dist/types/utils.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Interface for NamiRefs instance to maintain type safety
|
|
3
|
-
* Only includes methods needed by utilities that depend on NamiRefs
|
|
4
|
-
*/
|
|
5
|
-
export interface INamiRefsInstance {
|
|
6
|
-
isInMemoryAnonymousMode(): boolean;
|
|
7
|
-
setInMemoryAnonymousMode(enabled: boolean): void;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Set the NamiRefs instance to avoid circular dependency issues
|
|
11
|
-
* Called from namiRefs.ts during initialization
|
|
12
|
-
*/
|
|
13
|
-
export declare function setNamiRefsInstance(instance: INamiRefsInstance): void;
|
|
14
|
-
/**
|
|
15
|
-
* Clears the in-memory anonymous mode flag.
|
|
16
|
-
* Called when setAnonymousMode(false) is invoked to ensure both
|
|
17
|
-
* persistent and session flags are cleared.
|
|
18
|
-
*/
|
|
19
|
-
export declare function clearInMemoryAnonymousMode(): void;
|
|
20
|
-
/**
|
|
21
|
-
* Utility function to check anonymous mode status
|
|
22
|
-
* Checks both persistent (storage) and in-memory flags
|
|
23
|
-
* @returns true if device is in anonymous mode (either persistent or temporary)
|
|
24
|
-
*/
|
|
25
|
-
export declare function isAnonymousMode(): boolean;
|
package/dist/utils/config.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ExtendedPlatformInfo, InitialConfig, InitialConfigCompressed } from "../types/config";
|
|
2
|
-
export declare const getBaseUrl: (namiCommands?: string[]) => string;
|
|
3
|
-
export declare const getExtendedClientInfo: (namiCommands: string[]) => ExtendedPlatformInfo;
|
|
4
|
-
export declare const hasCapability: (capability: string) => boolean;
|
|
5
|
-
export declare const getCampaignCacheTtl: () => number | null;
|
|
6
|
-
export declare const evaluateCampaignCacheTtl: () => void;
|
|
7
|
-
export declare const hasPurchaseManagement: (messagePrefix?: string) => boolean;
|
|
8
|
-
export declare const shouldValidateProductGroups: () => boolean;
|
|
9
|
-
export declare function tryParseJson(str: string): InitialConfig | InitialConfigCompressed | undefined;
|
|
10
|
-
export declare function tryParseB64Gzip(str: string): InitialConfig | undefined;
|
package/dist/utils/const.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const NAMI_SDK_VERSION: string, NAMI_SDK_PACKAGE_VERSION: string, PRODUCTION: string, DEVELOPMENT: string, PLATFORM_ID_REQUIRED: string, DEVICE_ID_REQUIRED: string, EXTERNAL_ID_REQUIRED: string, SDK_NOT_INITIALIZED: string, CAMPAIGN_NOT_AVAILABLE: string, FLOW_SCREENS_NOT_AVAILABLE: string, UNABLE_TO_UPDATE_CDP_ID: string, ANONYMOUS_MODE_ALREADY_ON: string, ANONYMOUS_MODE_ALREADY_OFF: string, ANONYMOUS_MODE_LOGIN_NOT_ALLOWED: string, SESSION_REQUIRED: string, DEVICE_ID_NOT_SET: string, AUTH_DEVICE: string, NAMI_CONFIGURATION: string, NAMI_PROFILE: string, API_CONFIG: string, API_CAMPAIGN_RULES: string, API_PAYWALLS: string, API_CAMPAIGN_SESSION_TIMESTAMP: string, API_PRODUCTS: string, API_ACTIVE_ENTITLEMENTS: string, SERVER_NAMI_ENTITLEMENTS: string, INITIAL_APP_CONFIG: string, INITIAL_CAMPAIGN_RULES: string, INITIAL_PAYWALLS: string, INITIAL_PRODUCTS: string, LOCAL_NAMI_ENTITLEMENTS: string, CUSTOMER_ATTRIBUTES_KEY_PREFIX: string, NAMI_CUSTOMER_JOURNEY_STATE: string, ANONYMOUS_MODE: string, ANONYMOUS_UUID: string, KEY_SESSION_COUNTER: string, INITIAL_SESSION_COUNTER_VALUE: number, NAMI_LAST_IMPRESSION_ID: string, NAMI_PURCHASE_IMPRESSION_ID: string, NAMI_LAUNCH_ID: string, NAMI_SESSION_ID: string, NAMI_LANGUAGE_CODE: string, NAMI_PURCHASE_CHANNEL: string, API_VERSION: any, BASE_URL_PATH: string, BASE_URL: string, BASE_STAGING_URL: string, CUSTOM_HOST_PREFIX: string, USE_STAGING_API: string, EXTENDED_CLIENT_INFO_PREFIX: string, EXTENDED_CLIENT_INFO_DELIMITER: string, VALIDATE_PRODUCT_GROUPS: string, EXTENDED_PLATFORM: string, EXTENDED_PLATFORM_VERSION: string, API_MAX_CALLS_LIMIT: number, API_RETRY_DELAY_SEC: number, API_TIMEOUT_LIMIT: number, DEVICE_API_TIMEOUT_LIMIT: number, STATUS_SUCCESS: number, STATUS_BAD_REQUEST: number, STATUS_NOT_FOUND: number, STATUS_CONFLICT: number, STATUS_INTERNAL_SERVER_ERROR: number, INITIAL_SUCCESS: string, RECONFIG_SUCCESS: string, ALREADY_CONFIGURED: string, AVAILABLE_CAMPAIGNS_CHANGED: string, PAYWALL_ACTION_EVENT: string, AVAILABLE_ACTIVE_ENTITLEMENTS_CHANGED: string, CUSTOMER_JOURNEY_STATE_CHANGED: string, SKU_TEXT_REGEX: RegExp, VAR_REGEX: RegExp, HTML_REGEX: RegExp, SMART_TEXT_PATTERN: string, LIQUID_VARIABLE_REGEX: RegExp;
|
package/dist/utils/device.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { DevicePayload, TDevice } from "../types/device";
|
|
2
|
-
export declare const getDeviceData: (namiCommands?: string[]) => DevicePayload;
|
|
3
|
-
export declare const getDeviceFormFactor: () => TDevice;
|
|
4
|
-
export declare function getDeviceScaleFactor(formFactor?: string): number;
|
|
5
|
-
export declare function generateUUID(): string;
|
|
6
|
-
export declare function audienceSplitPosition(uuid: string): number;
|
|
7
|
-
export declare function bigintToUuid(v: bigint): string;
|
|
8
|
-
export declare function randomBigInt(n: bigint): bigint;
|
|
9
|
-
export declare function generateUuidForSplitPosition(targetPercent: number, tolerancePercent?: number): string;
|
|
10
|
-
export declare function uuidFromSplitPosition(namiCommands?: string[]): string | undefined;
|
package/dist/utils/events.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export function once(emitter: any, name: any): Promise<any>;
|
|
2
|
-
export default EventEmitter;
|
|
3
|
-
declare function EventEmitter(): void;
|
|
4
|
-
declare class EventEmitter {
|
|
5
|
-
_events: any;
|
|
6
|
-
_eventsCount: number | undefined;
|
|
7
|
-
_maxListeners: number | undefined;
|
|
8
|
-
setMaxListeners(n: any): this;
|
|
9
|
-
getMaxListeners(): any;
|
|
10
|
-
emit(type: any, ...args: any[]): boolean;
|
|
11
|
-
addListener(type: any, listener: any): any;
|
|
12
|
-
on: any;
|
|
13
|
-
prependListener(type: any, listener: any): any;
|
|
14
|
-
once(type: any, listener: any): this;
|
|
15
|
-
prependOnceListener(type: any, listener: any): this;
|
|
16
|
-
removeListener(type: any, listener: any): this;
|
|
17
|
-
off: any;
|
|
18
|
-
removeAllListeners(type: any, ...args: any[]): this;
|
|
19
|
-
listeners(type: any): any[];
|
|
20
|
-
rawListeners(type: any): any[];
|
|
21
|
-
listenerCount: typeof listenerCount;
|
|
22
|
-
eventNames(): any;
|
|
23
|
-
}
|
|
24
|
-
declare namespace EventEmitter {
|
|
25
|
-
export { EventEmitter };
|
|
26
|
-
export let defaultMaxListeners: number;
|
|
27
|
-
export function init(): void;
|
|
28
|
-
export function listenerCount(emitter: any, type: any): any;
|
|
29
|
-
}
|
|
30
|
-
declare function listenerCount(type: any): any;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const SHOULD_SHOW_LOADING_INDICATOR: boolean;
|
package/dist/utils/helpers.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function empty<T>(object: T): boolean;
|
package/dist/utils/parsers.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export type TSemverObj = {
|
|
2
|
-
semver: string | undefined;
|
|
3
|
-
major: number;
|
|
4
|
-
minor: number;
|
|
5
|
-
patch: number;
|
|
6
|
-
prerelease: string;
|
|
7
|
-
buildmetadata: string;
|
|
8
|
-
};
|
|
9
|
-
export declare function parseToSemver(versionString: string): TSemverObj;
|
|
10
|
-
/**
|
|
11
|
-
* Compares two semantic versions
|
|
12
|
-
* @returns 1 if current > minimum, 0 if equal, -1 if current < minimum
|
|
13
|
-
*/
|
|
14
|
-
export declare function compareSemver(current: TSemverObj, minimum: TSemverObj): number;
|
|
15
|
-
/**
|
|
16
|
-
* Checks if current SDK version meets minimum requirement
|
|
17
|
-
* @returns true if current version >= minimum version
|
|
18
|
-
*/
|
|
19
|
-
export declare function isVersionSupported(current: TSemverObj, minimum: TSemverObj): boolean;
|
|
20
|
-
/**
|
|
21
|
-
* Validates if the current SDK version meets the minimum required version for a component
|
|
22
|
-
* Logs a warning if the SDK version is insufficient
|
|
23
|
-
* @param minSDKVersion - The minimum SDK version required for the component
|
|
24
|
-
* @param componentName - The name of the component
|
|
25
|
-
*/
|
|
26
|
-
export declare function validateMinSDKVersion(minSDKVersion: TSemverObj | undefined, componentName: string): void;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare class SimpleEventTarget implements EventTarget {
|
|
2
|
-
private listeners;
|
|
3
|
-
addEventListener(type: string, listener: EventListenerOrEventListenerObject | null, options?: boolean | AddEventListenerOptions): void;
|
|
4
|
-
removeEventListener(type: string, listener: EventListenerOrEventListenerObject | null): void;
|
|
5
|
-
dispatchEvent(event: Event): boolean;
|
|
6
|
-
}
|
|
7
|
-
export default SimpleEventTarget;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare class URLParams {
|
|
2
|
-
private static _instance;
|
|
3
|
-
params: Record<string, string>;
|
|
4
|
-
constructor();
|
|
5
|
-
static get instance(): URLParams;
|
|
6
|
-
static refresh(): void;
|
|
7
|
-
private setSearchParams;
|
|
8
|
-
private safeValue;
|
|
9
|
-
private extractSafeParams;
|
|
10
|
-
}
|
|
11
|
-
export declare const getUrlParams: () => Record<string, string>;
|