@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
|
@@ -1,6 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Returns the translated string for the given key in the current SDK language.
|
|
3
|
-
* Uses Nami language code from storage (set via Nami.configure({ namiLanguageCode })).
|
|
4
|
-
* Falls back to English if the key or locale is missing.
|
|
5
|
-
*/
|
|
6
|
-
export declare function getTranslate(key: string): string;
|
|
1
|
+
export { getTranslate } from "@namiml/sdk-core";
|
|
@@ -1,62 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @type NamiCampaignSegment
|
|
5
|
-
* Represents a segment within a campaign.
|
|
6
|
-
*/
|
|
7
|
-
export interface NamiCampaignSegment {
|
|
8
|
-
form_factors: FormFactor[];
|
|
9
|
-
paywall?: string | null;
|
|
10
|
-
paywall_url?: string | null;
|
|
11
|
-
page_urls?: Record<string, string> | null;
|
|
12
|
-
flow?: NamiFlowDTO | null;
|
|
13
|
-
segment: string;
|
|
14
|
-
split: number;
|
|
15
|
-
conversion_event_type?: CampaignRuleConversionEventType | null;
|
|
16
|
-
conversion_event_url?: string | null;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* @type NamiAnonymousCampaign
|
|
20
|
-
* Represents the anonymous campaign in Nami.
|
|
21
|
-
*/
|
|
22
|
-
export interface NamiAnonymousCampaign {
|
|
23
|
-
rule: string;
|
|
24
|
-
name: string;
|
|
25
|
-
type: string | NamiCampaignRuleType;
|
|
26
|
-
value?: string | null;
|
|
27
|
-
external_segment: string | null;
|
|
28
|
-
segments: NamiCampaignSegment[];
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* @type NamiCampaign
|
|
32
|
-
* Represents the campaign in Nami.
|
|
33
|
-
*/
|
|
34
|
-
export interface NamiCampaign {
|
|
35
|
-
rule: string;
|
|
36
|
-
name: string;
|
|
37
|
-
segment: string;
|
|
38
|
-
paywall?: string | null;
|
|
39
|
-
paywall_url?: string | null;
|
|
40
|
-
page_urls?: Record<string, string> | null;
|
|
41
|
-
type: string | NamiCampaignRuleType;
|
|
42
|
-
value?: string | null;
|
|
43
|
-
form_factors: FormFactor[];
|
|
44
|
-
external_segment: string | null;
|
|
45
|
-
conversion_event_type?: CampaignRuleConversionEventType | null;
|
|
46
|
-
conversion_event_url?: string | null;
|
|
47
|
-
flow?: NamiFlowDTO | null;
|
|
48
|
-
}
|
|
49
|
-
export interface NamiFlowCampaign extends NamiCampaign {
|
|
50
|
-
flow: NamiFlowWithObject;
|
|
51
|
-
}
|
|
52
|
-
export declare function isNamiFlowCampaign(campaign?: NamiCampaign): campaign is NamiFlowCampaign;
|
|
53
|
-
/**
|
|
54
|
-
* @enum NamiCampaignRuleType
|
|
55
|
-
* Types of Nami campaigns
|
|
56
|
-
*/
|
|
57
|
-
export declare enum NamiCampaignRuleType {
|
|
58
|
-
DEFAULT = "default",
|
|
59
|
-
LABEL = "label",
|
|
60
|
-
UNKNOWN = "unknown",
|
|
61
|
-
URL = "url"
|
|
62
|
-
}
|
|
1
|
+
export type { NamiCampaignSegment, NamiAnonymousCampaign, NamiCampaign, NamiFlowCampaign, } from '@namiml/sdk-core';
|
|
2
|
+
export { isNamiFlowCampaign, NamiCampaignRuleType } from '@namiml/sdk-core';
|
|
@@ -1,41 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { NamiLanguageCodes } from "./languages";
|
|
3
|
-
import { NamiLogLevel } from "./loglevel";
|
|
4
|
-
/**
|
|
5
|
-
* @type NamiInitialConfig
|
|
6
|
-
*
|
|
7
|
-
* Defines the structure of the initial configuration that can be provided
|
|
8
|
-
* when setting up the Nami SDK.
|
|
9
|
-
*/
|
|
10
|
-
export type NamiInitialConfig = InitialConfig | InitialConfigCompressed;
|
|
11
|
-
/**
|
|
12
|
-
* @type NamiConfiguration
|
|
13
|
-
* This is needed to configure and initialize the SDK via [Nami.configure]
|
|
14
|
-
* method
|
|
15
|
-
*
|
|
16
|
-
* @param appPlatformID A UUID for the app. You can find the Nami App Platform ID in the App
|
|
17
|
-
* Settings screen on the Platforms tab in the Nami Control Center.
|
|
18
|
-
* @param logLevel Optional preferable [NamiLogLevel] to set within SDK to get appropriate
|
|
19
|
-
* logging information. Make sure to either not set this param in release build, or set
|
|
20
|
-
* to [NamiLogLevel.ERROR] if you would like Nami error logs to be shown in your release/production
|
|
21
|
-
* app build. Default is set to [NamiLogLevel.WARN]
|
|
22
|
-
* @param namiCommands provides set of external commands useful for SDK.
|
|
23
|
-
* @param initialConfig contains initial configuration, useful in offline mode.
|
|
24
|
-
* @param namiLanguageCode sets the language to be used for paywalls on the device. Select from
|
|
25
|
-
* [NamiLanguageCode]
|
|
26
|
-
* <p>
|
|
27
|
-
* Default is set to `false`. Note that this should be set to `true` only from `debug` or
|
|
28
|
-
* `non-production` version of the app. Setting this to `true` in a `production` build can
|
|
29
|
-
* potentially have unwanted consequences.
|
|
30
|
-
*/
|
|
31
|
-
export type NamiConfiguration = {
|
|
32
|
-
appPlatformID: string;
|
|
33
|
-
logLevel?: NamiLogLevel;
|
|
34
|
-
namiCommands?: string[];
|
|
35
|
-
namiLanguageCode?: NamiLanguageCodes;
|
|
36
|
-
initialConfig?: string | NamiInitialConfig;
|
|
37
|
-
formFactor?: string;
|
|
38
|
-
purchaseChannel?: string;
|
|
39
|
-
/** Enable verbose flow lifecycle logging. Debug-only; do not ship in production. */
|
|
40
|
-
maxLogging?: boolean;
|
|
41
|
-
};
|
|
1
|
+
export type { NamiConfiguration, NamiInitialConfig } from '@namiml/sdk-core';
|
|
@@ -1,18 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* This data class represents a customer's subscription journey state
|
|
3
|
-
*/
|
|
4
|
-
export type CustomerJourneyState = {
|
|
5
|
-
former_subscriber: boolean;
|
|
6
|
-
in_grace_period: boolean;
|
|
7
|
-
in_trial_period: boolean;
|
|
8
|
-
in_intro_offer_period: boolean;
|
|
9
|
-
is_cancelled: boolean;
|
|
10
|
-
in_pause: boolean;
|
|
11
|
-
in_account_hold: boolean;
|
|
12
|
-
};
|
|
13
|
-
/**
|
|
14
|
-
* This data class represents a device's profile
|
|
15
|
-
*/
|
|
16
|
-
export type DeviceProfile = {
|
|
17
|
-
customer_journey_state: CustomerJourneyState;
|
|
18
|
-
};
|
|
1
|
+
export type { CustomerJourneyState, DeviceProfile } from '@namiml/sdk-core';
|
|
@@ -1,38 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { NamiSKU } from "./sku";
|
|
3
|
-
/**
|
|
4
|
-
* @type NamiEntitlement
|
|
5
|
-
* Represents what features a device has access to in an app.
|
|
6
|
-
*/
|
|
7
|
-
export type NamiEntitlement = {
|
|
8
|
-
/**
|
|
9
|
-
* The last known Purchase that unlocked this entitlement. There must be a corresponding
|
|
10
|
-
* NamiSKU associated to this NamiPurchase. That NamiSKU must reside in purchasedSKUs.
|
|
11
|
-
*/
|
|
12
|
-
activePurchases: NamiPurchase[];
|
|
13
|
-
/**
|
|
14
|
-
* Description of entitlement
|
|
15
|
-
*/
|
|
16
|
-
desc: string;
|
|
17
|
-
/**
|
|
18
|
-
* Friendly name of entitlement
|
|
19
|
-
*/
|
|
20
|
-
name: string;
|
|
21
|
-
/**
|
|
22
|
-
* Internal ID for use by the Nami SDK
|
|
23
|
-
*/
|
|
24
|
-
namiId: string;
|
|
25
|
-
/**
|
|
26
|
-
* NamiSKUs purchased by the user that actually unlock this entitlement
|
|
27
|
-
*/
|
|
28
|
-
purchasedSkus: NamiSKU[];
|
|
29
|
-
/**
|
|
30
|
-
* The unique ID of the entitlement defined in the Nami Control Center, use this to refer
|
|
31
|
-
* to the system when referencing an entitlement.
|
|
32
|
-
*/
|
|
33
|
-
referenceId: string;
|
|
34
|
-
/**
|
|
35
|
-
* The list of possible NamiSKU objects that would unlock this entitlement
|
|
36
|
-
*/
|
|
37
|
-
relatedSkus: NamiSKU[];
|
|
38
|
-
};
|
|
1
|
+
export type { NamiEntitlement } from '@namiml/sdk-core';
|
|
@@ -1,12 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
DEFAULT_CAMPAIGN_NOT_FOUND = "Default campaign not found",
|
|
3
|
-
LABELED_CAMPAIGN_NOT_FOUND = "Labeled campaign not found",
|
|
4
|
-
CAMPAIGN_DATA_NOT_FOUND = "Campaign data not found",
|
|
5
|
-
PAYWALL_ALREADY_DISPLAYED = "Paywall is already being displayed",
|
|
6
|
-
SDK_NOT_INITIALIZED = "SDK has not been initialized",
|
|
7
|
-
PAYWALL_COULD_NOT_DISPLAY = "Failed to display paywall",
|
|
8
|
-
URL_CAMPAIGN_NOT_FOUND = "URL campaign not found",
|
|
9
|
-
PRODUCT_DATA_NOT_FOUND = "Product data not found",
|
|
10
|
-
PRODUCT_GROUPS_NOT_FOUND = "Product groups not found",
|
|
11
|
-
FLOW_SCREEN_DATA_UNAVILABLE = "Flow unavailable due to missing screen data"
|
|
12
|
-
}
|
|
1
|
+
export { LaunchCampaignError } from '@namiml/sdk-core';
|
|
@@ -1,51 +1,2 @@
|
|
|
1
|
-
export type { NamiFlowHandoffStepHandler, NamiFlowEventHandler } from '
|
|
2
|
-
export
|
|
3
|
-
/**
|
|
4
|
-
* Registers a handler to be invoked when a flow step triggers a handoff event.
|
|
5
|
-
*
|
|
6
|
-
* This allows you to intercept a handoff step in a Nami Flow and execute custom logic
|
|
7
|
-
*
|
|
8
|
-
* @param handoffStepHandler - A callback function that will be called when a handoff occurs.
|
|
9
|
-
* It receives the `handoffTag` string (identifying the step) and an optional `handoffData`
|
|
10
|
-
* object with additional context. If `undefined`, the current handler is cleared.
|
|
11
|
-
*
|
|
12
|
-
*/
|
|
13
|
-
registerStepHandoff: any;
|
|
14
|
-
/**
|
|
15
|
-
* Registers a handler to be invoked when events are emitted.
|
|
16
|
-
*
|
|
17
|
-
* This enables you to use your own custom event tracking.
|
|
18
|
-
*
|
|
19
|
-
* @param eventHandler - A callback function that will be called when an event occurs.
|
|
20
|
-
* The argument is a key-value object containing event data.
|
|
21
|
-
* If `undefined`, the current handler is cleared
|
|
22
|
-
*
|
|
23
|
-
*/
|
|
24
|
-
registerEventHandler: any;
|
|
25
|
-
/**
|
|
26
|
-
* Resumes the Nami Flow after a handoff has been completed.
|
|
27
|
-
*
|
|
28
|
-
* This should be called by once any custom logic associated with
|
|
29
|
-
* a handoff has completed.
|
|
30
|
-
* It signals to continue to the next step in the flow sequence.
|
|
31
|
-
*/
|
|
32
|
-
resume: any;
|
|
33
|
-
/**
|
|
34
|
-
* Finishes the current flow programmatically.
|
|
35
|
-
*
|
|
36
|
-
* This can be used to end the flow at any point, typically after a handoff or custom logic.
|
|
37
|
-
*/
|
|
38
|
-
finish: any;
|
|
39
|
-
/**
|
|
40
|
-
* Pauses the current flow.
|
|
41
|
-
*
|
|
42
|
-
* This can be used to temporarily halt the flow, typically in response to user input or other events.
|
|
43
|
-
*/
|
|
44
|
-
pause: any;
|
|
45
|
-
/**
|
|
46
|
-
* Checks if a flow is currently open.
|
|
47
|
-
*
|
|
48
|
-
* @returns {boolean} - True if a flow is open, false otherwise.
|
|
49
|
-
*/
|
|
50
|
-
isFlowOpen: any;
|
|
51
|
-
};
|
|
1
|
+
export type { NamiFlowHandoffStepHandler, NamiFlowEventHandler } from '@namiml/sdk-core';
|
|
2
|
+
export { NamiFlowManager } from '@namiml/sdk-core';
|
|
@@ -1,197 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* @type NamiLanguageCodes
|
|
3
|
-
* Languages supported by Nami paywalls
|
|
4
|
-
*/
|
|
5
|
-
export type NamiLanguageCodes =
|
|
6
|
-
/** Language Afrikaans **/
|
|
7
|
-
"af"
|
|
8
|
-
/** Language Arabic **/
|
|
9
|
-
| "ar"
|
|
10
|
-
/** Language Algerian **/
|
|
11
|
-
| "ar-dz"
|
|
12
|
-
/** Language Asturian **/
|
|
13
|
-
| "ast"
|
|
14
|
-
/** Language Azerbaijani **/
|
|
15
|
-
| "az"
|
|
16
|
-
/** Language Bulgarian **/
|
|
17
|
-
| "bg"
|
|
18
|
-
/** Language Belarusian **/
|
|
19
|
-
| "be"
|
|
20
|
-
/** Language Bengali **/
|
|
21
|
-
| "bn"
|
|
22
|
-
/** Language Breton **/
|
|
23
|
-
| "br"
|
|
24
|
-
/** Language Bosnian **/
|
|
25
|
-
| "bs"
|
|
26
|
-
/** Language Catalan **/
|
|
27
|
-
| "ca"
|
|
28
|
-
/** Language Czech **/
|
|
29
|
-
| "cs"
|
|
30
|
-
/** Language Welsh **/
|
|
31
|
-
| "cy"
|
|
32
|
-
/** Language Danish **/
|
|
33
|
-
| "da"
|
|
34
|
-
/** Language German **/
|
|
35
|
-
| "de"
|
|
36
|
-
/** Language Lower Sorbian **/
|
|
37
|
-
| "dsb"
|
|
38
|
-
/** Language Greek **/
|
|
39
|
-
| "el"
|
|
40
|
-
/** Language English **/
|
|
41
|
-
| "en"
|
|
42
|
-
/** Language Australian English **/
|
|
43
|
-
| "en-au"
|
|
44
|
-
/** Language British English **/
|
|
45
|
-
| "en-gb"
|
|
46
|
-
/** Language Esperanto **/
|
|
47
|
-
| "eo"
|
|
48
|
-
/** Language Spanish **/
|
|
49
|
-
| "es"
|
|
50
|
-
/** Language Argentinian Spanish **/
|
|
51
|
-
| "es-ar"
|
|
52
|
-
/** Language Colombian Spanish **/
|
|
53
|
-
| "es-co"
|
|
54
|
-
/** Language Mexican Spanish **/
|
|
55
|
-
| "es-mx"
|
|
56
|
-
/** Language Nicaraguan Spanish **/
|
|
57
|
-
| "es-ni"
|
|
58
|
-
/** Language Venezuelan Spanish **/
|
|
59
|
-
| "es-ve"
|
|
60
|
-
/** Language Estonian **/
|
|
61
|
-
| "et"
|
|
62
|
-
/** Language Basque **/
|
|
63
|
-
| "eu"
|
|
64
|
-
/** Language Persian **/
|
|
65
|
-
| "fa"
|
|
66
|
-
/** Language Finnish **/
|
|
67
|
-
| "fi"
|
|
68
|
-
/** Language French **/
|
|
69
|
-
| "fr"
|
|
70
|
-
/** Language Frisian **/
|
|
71
|
-
| "fy"
|
|
72
|
-
/** Language Irish **/
|
|
73
|
-
| "ga"
|
|
74
|
-
/** Language Scottish Gaelic **/
|
|
75
|
-
| "gd"
|
|
76
|
-
/** Language Galician **/
|
|
77
|
-
| "gl"
|
|
78
|
-
/** Language Hebrew **/
|
|
79
|
-
| "he"
|
|
80
|
-
/** Language Hindi **/
|
|
81
|
-
| "hi"
|
|
82
|
-
/** Language Croatian **/
|
|
83
|
-
| "hr"
|
|
84
|
-
/** Language Upper Sorbian **/
|
|
85
|
-
| "hsb"
|
|
86
|
-
/** Language Hungarian **/
|
|
87
|
-
| "hu"
|
|
88
|
-
/** Language Armenian **/
|
|
89
|
-
| "hy"
|
|
90
|
-
/** Language Interlingua **/
|
|
91
|
-
| "ia"
|
|
92
|
-
/** Language Indonesian **/
|
|
93
|
-
| "id"
|
|
94
|
-
/** Language Igbo **/
|
|
95
|
-
| "ig"
|
|
96
|
-
/** Language Ido **/
|
|
97
|
-
| "io"
|
|
98
|
-
/** Language Icelandic **/
|
|
99
|
-
| "is"
|
|
100
|
-
/** Language Italian **/
|
|
101
|
-
| "it"
|
|
102
|
-
/** Language Japanese **/
|
|
103
|
-
| "ja"
|
|
104
|
-
/** Language Georgian **/
|
|
105
|
-
| "ka"
|
|
106
|
-
/** Language Kabyle **/
|
|
107
|
-
| "kab"
|
|
108
|
-
/** Language Kazakh **/
|
|
109
|
-
| "kk"
|
|
110
|
-
/** Language Khmer **/
|
|
111
|
-
| "km"
|
|
112
|
-
/** Language Kannada **/
|
|
113
|
-
| "kn"
|
|
114
|
-
/** Language Korean **/
|
|
115
|
-
| "ko"
|
|
116
|
-
/** Language Kyrgyz **/
|
|
117
|
-
| "ky"
|
|
118
|
-
/** Language Luxembourgish **/
|
|
119
|
-
| "lb"
|
|
120
|
-
/** Language Lithuanian **/
|
|
121
|
-
| "lt"
|
|
122
|
-
/** Language Latvian **/
|
|
123
|
-
| "lv"
|
|
124
|
-
/** Language Macedonian **/
|
|
125
|
-
| "mk"
|
|
126
|
-
/** Language Malayalam **/
|
|
127
|
-
| "ml"
|
|
128
|
-
/** Language Mongolian **/
|
|
129
|
-
| "mn"
|
|
130
|
-
/** Language Marathi **/
|
|
131
|
-
| "mr"
|
|
132
|
-
/** Language Burmese **/
|
|
133
|
-
| "my"
|
|
134
|
-
/** Language Norwegian Bokmål **/
|
|
135
|
-
| "nb"
|
|
136
|
-
/** Language Nepali **/
|
|
137
|
-
| "ne"
|
|
138
|
-
/** Language Dutch **/
|
|
139
|
-
| "nl"
|
|
140
|
-
/** Language Norwegian Nynorsk **/
|
|
141
|
-
| "nn"
|
|
142
|
-
/** Language Ossetic **/
|
|
143
|
-
| "os"
|
|
144
|
-
/** Language Punjabi **/
|
|
145
|
-
| "pa"
|
|
146
|
-
/** Language Polish **/
|
|
147
|
-
| "pl"
|
|
148
|
-
/** Language Portuguese **/
|
|
149
|
-
| "pt"
|
|
150
|
-
/** Language Brazilian Portuguese **/
|
|
151
|
-
| "pt-br"
|
|
152
|
-
/** Language Romanian **/
|
|
153
|
-
| "ro"
|
|
154
|
-
/** Language Russian **/
|
|
155
|
-
| "ru"
|
|
156
|
-
/** Language Slovak **/
|
|
157
|
-
| "sk"
|
|
158
|
-
/** Language Slovenian **/
|
|
159
|
-
| "sl"
|
|
160
|
-
/** Language Albanian **/
|
|
161
|
-
| "sq"
|
|
162
|
-
/** Language Serbian **/
|
|
163
|
-
| "sr"
|
|
164
|
-
/** Language Serbian Latin **/
|
|
165
|
-
| "sr-latn"
|
|
166
|
-
/** Language Swedish **/
|
|
167
|
-
| "sv"
|
|
168
|
-
/** Language Swahili **/
|
|
169
|
-
| "sw"
|
|
170
|
-
/** Language Tamil **/
|
|
171
|
-
| "ta"
|
|
172
|
-
/** Language Telugu **/
|
|
173
|
-
| "te"
|
|
174
|
-
/** Language Tajik **/
|
|
175
|
-
| "tg"
|
|
176
|
-
/** Language Thai **/
|
|
177
|
-
| "th"
|
|
178
|
-
/** Language Turkmen **/
|
|
179
|
-
| "tk"
|
|
180
|
-
/** Language Turkish **/
|
|
181
|
-
| "tr"
|
|
182
|
-
/** Language Tatar **/
|
|
183
|
-
| "tt"
|
|
184
|
-
/** Language Udmurt **/
|
|
185
|
-
| "udm"
|
|
186
|
-
/** Language Ukrainian **/
|
|
187
|
-
| "uk"
|
|
188
|
-
/** Language Urdu **/
|
|
189
|
-
| "ur"
|
|
190
|
-
/** Language Uzbek **/
|
|
191
|
-
| "uz"
|
|
192
|
-
/** Language Vietnamese **/
|
|
193
|
-
| "vi"
|
|
194
|
-
/** Language Simplified Chinese **/
|
|
195
|
-
| "zh-hans"
|
|
196
|
-
/** Language Traditional Chinese **/
|
|
197
|
-
| "zh-hant";
|
|
1
|
+
export type { NamiLanguageCodes } from '@namiml/sdk-core';
|
|
@@ -1,10 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*/
|
|
4
|
-
export type NamiLogLevel = "error" | "warn" | "info" | "debug";
|
|
5
|
-
export declare enum LogLevel {
|
|
6
|
-
DEBUG = 1,
|
|
7
|
-
INFO = 2,
|
|
8
|
-
WARN = 3,
|
|
9
|
-
ERROR = 4
|
|
10
|
-
}
|
|
1
|
+
export type { NamiLogLevel } from '@namiml/sdk-core';
|
|
2
|
+
export { LogLevel } from '@namiml/sdk-core';
|
|
@@ -1,109 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export { PaywallManagerEvents as NamiPaywallManagerEvents } from '../paywall';
|
|
4
|
-
/**
|
|
5
|
-
* @enum NamiPaywallAction
|
|
6
|
-
* Types of actions paywall will have
|
|
7
|
-
*/
|
|
8
|
-
export declare enum NamiPaywallAction {
|
|
9
|
-
BUY_SKU = "BUY_SKU",
|
|
10
|
-
SELECT_SKU = "SELECT_SKU",
|
|
11
|
-
RESTORE_PURCHASES = "RESTORE_PURCHASES",
|
|
12
|
-
SIGN_IN = "SIGN_IN",
|
|
13
|
-
CLOSE_PAYWALL = "CLOSE_PAYWALL",
|
|
14
|
-
SHOW_PAYWALL = "SHOW_PAYWALL",
|
|
15
|
-
PURCHASE_SELECTED_SKU = "PURCHASE_SELECTED_SKU",
|
|
16
|
-
PURCHASE_SUCCESS = "PURCHASE_SUCCESS",
|
|
17
|
-
PURCHASE_FAILED = "PURCHASE_FAILED",
|
|
18
|
-
PURCHASE_CANCELLED = "PURCHASE_CANCELLED",
|
|
19
|
-
PURCHASE_PENDING = "PURCHASE_PENDING",
|
|
20
|
-
PURCHASE_UNKNOWN = "PURCHASE_UNKNOWN",
|
|
21
|
-
PURCHASE_DEFERRED = "PURCHASE_DEFERRED",
|
|
22
|
-
DEEPLINK = "DEEPLINK",
|
|
23
|
-
TOGGLE_CHANGE = "TOGGLE_CHANGE",
|
|
24
|
-
PAGE_CHANGE = "PAGE_CHANGE",
|
|
25
|
-
SLIDE_CHANGE = "SLIDE_CHANGE",
|
|
26
|
-
COLLAPSIBLE_DRAWER_OPEN = "COLLAPSIBLE_DRAWER_OPEN",
|
|
27
|
-
COLLAPSIBLE_DRAWER_CLOSE = "COLLAPSIBLE_DRAWER_CLOSE",
|
|
28
|
-
VIDEO_STARTED = "VIDEO_STARTED",
|
|
29
|
-
VIDEO_PAUSED = "VIDEO_PAUSED",
|
|
30
|
-
VIDEO_RESUMED = "VIDEO_RESUMED",
|
|
31
|
-
VIDEO_ENDED = "VIDEO_ENDED",
|
|
32
|
-
VIDEO_CHANGED = "VIDEO_CHANGED",
|
|
33
|
-
VIDEO_MUTED = "VIDEO_MUTED",
|
|
34
|
-
VIDEO_UNMUTED = "VIDEO_UNMUTED",
|
|
35
|
-
COUNTDOWN_TIMER_COMPLETED = "COUNTDOWN_TIMER_COMPLETED",
|
|
36
|
-
UNKNOWN = "UNKNOWN"
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* @type NamiPaywallEvent
|
|
40
|
-
* Represents the events(actions) triggered by rendered paywall
|
|
41
|
-
*/
|
|
42
|
-
export type NamiPaywallEvent = {
|
|
43
|
-
/**
|
|
44
|
-
* Any action from [NamiPaywallAction]
|
|
45
|
-
*/
|
|
46
|
-
action: NamiPaywallAction;
|
|
47
|
-
sku?: NamiSKU;
|
|
48
|
-
campaignId?: string;
|
|
49
|
-
campaignName?: string;
|
|
50
|
-
campaignType?: string;
|
|
51
|
-
campaignLabel?: string;
|
|
52
|
-
campaignUrl?: string;
|
|
53
|
-
paywallId?: string;
|
|
54
|
-
paywallName?: string;
|
|
55
|
-
componentChange?: NamiPaywallComponentChange;
|
|
56
|
-
/**
|
|
57
|
-
* segment from [NamiCampaign]
|
|
58
|
-
*/
|
|
59
|
-
segmentId?: string;
|
|
60
|
-
/**
|
|
61
|
-
* external_segment from [NamiCampaign]
|
|
62
|
-
*/
|
|
63
|
-
externalSegmentId: string | null;
|
|
64
|
-
deeplinkUrl?: string;
|
|
65
|
-
purchaseError?: string;
|
|
66
|
-
purchases?: NamiPurchase[];
|
|
67
|
-
/**
|
|
68
|
-
* Total time user has spent on paywall page,
|
|
69
|
-
* From rendering paywall to clicking on close button of paywall
|
|
70
|
-
*/
|
|
71
|
-
timeSpentOnPaywall?: number;
|
|
72
|
-
videoMetaData?: NamiPaywallEventVideoMetadata;
|
|
73
|
-
purchaseChannel?: string;
|
|
74
|
-
};
|
|
75
|
-
export type NamiPaywallActionHandler = (event: NamiPaywallEvent) => void;
|
|
76
|
-
/**
|
|
77
|
-
* @type NamiPaywallLaunchContext
|
|
78
|
-
* Will be used to pass custom context while launching paywall
|
|
79
|
-
*/
|
|
80
|
-
export type NamiPaywallLaunchContext = {
|
|
81
|
-
productGroups?: string[];
|
|
82
|
-
customAttributes: {
|
|
83
|
-
[key: string]: string;
|
|
84
|
-
};
|
|
85
|
-
customObject?: {
|
|
86
|
-
[key: string]: any;
|
|
87
|
-
};
|
|
88
|
-
currentGroup?: string;
|
|
89
|
-
};
|
|
90
|
-
/**
|
|
91
|
-
* @type NamiPaywallComponentChange
|
|
92
|
-
*/
|
|
93
|
-
export type NamiPaywallComponentChange = {
|
|
94
|
-
id?: string;
|
|
95
|
-
name?: string;
|
|
96
|
-
};
|
|
97
|
-
/**
|
|
98
|
-
* @type NamiPaywallEventVideoMetadata
|
|
99
|
-
*/
|
|
100
|
-
export type NamiPaywallEventVideoMetadata = {
|
|
101
|
-
id?: string;
|
|
102
|
-
name?: string;
|
|
103
|
-
url?: string;
|
|
104
|
-
loopVideo: boolean;
|
|
105
|
-
muteByDefault: boolean;
|
|
106
|
-
autoplayVideo: boolean;
|
|
107
|
-
contentTimecode?: number;
|
|
108
|
-
contentDuration?: number;
|
|
109
|
-
};
|
|
1
|
+
export { NamiPaywallAction, NamiPaywallManagerEvents, } from '@namiml/sdk-core';
|
|
2
|
+
export type { NamiPaywallEvent, NamiPaywallActionHandler, NamiPaywallLaunchContext, NamiPaywallComponentChange, NamiPaywallEventVideoMetadata, } from '@namiml/sdk-core';
|
|
@@ -1,32 +1 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* @type NamiProductDetails
|
|
4
|
-
* minimal required product details formed from actual product details
|
|
5
|
-
*/
|
|
6
|
-
export interface NamiProductDetails {
|
|
7
|
-
name?: string;
|
|
8
|
-
description?: string;
|
|
9
|
-
product_ref_id: string;
|
|
10
|
-
product_type: NamiSKUType;
|
|
11
|
-
subscription_period?: NamiSubscriptionPeriod;
|
|
12
|
-
offers: NamiProductOffer[];
|
|
13
|
-
}
|
|
14
|
-
export type NamiProductOffer = NamiOfferPrice & {
|
|
15
|
-
offer_ref_id?: string;
|
|
16
|
-
offer_type: 'promo' | 'default' | (string & {});
|
|
17
|
-
promo_period?: NamiOfferPeriod;
|
|
18
|
-
promo_price?: NamiOfferPrice;
|
|
19
|
-
};
|
|
20
|
-
type NamiOfferPrice = {
|
|
21
|
-
price: number;
|
|
22
|
-
currency: string;
|
|
23
|
-
};
|
|
24
|
-
type NamiOfferPeriod = NamiSubscriptionPeriod;
|
|
25
|
-
export type NamiSubscriptionInterval = 'day' | 'week' | 'month' | 'year' | 'unknown' | (string & {});
|
|
26
|
-
export type NamiSubscriptionPeriod = {
|
|
27
|
-
type: NamiSubscriptionInterval;
|
|
28
|
-
count: number;
|
|
29
|
-
period_start?: number;
|
|
30
|
-
period_end?: number;
|
|
31
|
-
};
|
|
32
|
-
export {};
|
|
1
|
+
export type { NamiProductDetails, NamiProductOffer, NamiSubscriptionInterval, NamiSubscriptionPeriod, } from '@namiml/sdk-core';
|
|
@@ -1,42 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { NamiSKU } from "./sku";
|
|
3
|
-
/**
|
|
4
|
-
* @type NamiPurchase
|
|
5
|
-
* This object represents a completed purchase in the SDK. A device purchases a NamiSKU and that
|
|
6
|
-
* purchase makes available a set of NamiEntitlements
|
|
7
|
-
*/
|
|
8
|
-
export type NamiPurchase = {
|
|
9
|
-
sku?: NamiSKU;
|
|
10
|
-
/**
|
|
11
|
-
* The store sku reference identifier for this NamiPurchase
|
|
12
|
-
*/
|
|
13
|
-
skuId: string;
|
|
14
|
-
/**
|
|
15
|
-
* The purchase order ID record or receipt ID associated to this purchase
|
|
16
|
-
*/
|
|
17
|
-
transactionIdentifier?: string;
|
|
18
|
-
/**
|
|
19
|
-
* For bypass store purchases only, indicates when this purchase will cease to back
|
|
20
|
-
* an entitlement rendering it as inactive.
|
|
21
|
-
*/
|
|
22
|
-
expires?: Date;
|
|
23
|
-
/**
|
|
24
|
-
* The source a purchase comes from - either on Google Play (marketplace), through a paywall (campaign).
|
|
25
|
-
*/
|
|
26
|
-
purchaseToken?: string;
|
|
27
|
-
/**
|
|
28
|
-
* The date and time when the purchase was initiated
|
|
29
|
-
*/
|
|
30
|
-
purchaseInitiatedTimestamp?: Date;
|
|
31
|
-
/**
|
|
32
|
-
* The source a purchase comes from - either on Google Play (marketplace), through a paywall (campaign).
|
|
33
|
-
*/
|
|
34
|
-
purchaseSource?: NamiPurchaseSource;
|
|
35
|
-
};
|
|
36
|
-
export type NamiPurchasesState = 'pending' | 'purchased' | 'consumed' | 'resubscribed' | 'unsubscribed' | 'deferred' | 'failed' | 'cancelled' | 'unknown';
|
|
37
|
-
export type NamiPurchaseDetails = {
|
|
38
|
-
skuId: string;
|
|
39
|
-
transactionId: string;
|
|
40
|
-
amount?: number;
|
|
41
|
-
currency?: string;
|
|
42
|
-
};
|
|
1
|
+
export type { NamiPurchase, NamiPurchasesState, NamiPurchaseDetails, } from '@namiml/sdk-core';
|
|
@@ -1,31 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { AmazonProduct, AppleProduct, GoogleProduct } from "../sku";
|
|
3
|
-
import { NamiProductDetails } from "./product";
|
|
4
|
-
/**
|
|
5
|
-
* @type NamiSKU
|
|
6
|
-
* This object represents a specific in-app purchase SKU available on a specific platform.
|
|
7
|
-
*
|
|
8
|
-
* It contains some general meta-data about specific SKU and associated [ProductDetails] object from
|
|
9
|
-
* Google Play Billing.
|
|
10
|
-
*
|
|
11
|
-
* Note that in certain cases, depending on cached state of the SDK, [ProductDetails] might not
|
|
12
|
-
* be fully complete object (potentially generated temporarily with minimum required information)
|
|
13
|
-
*/
|
|
14
|
-
export type NamiSKU = {
|
|
15
|
-
id: string;
|
|
16
|
-
name?: string;
|
|
17
|
-
skuId: string;
|
|
18
|
-
appleProduct?: AppleProduct;
|
|
19
|
-
googleProduct?: GoogleProduct;
|
|
20
|
-
amazonProduct?: AmazonProduct;
|
|
21
|
-
type: NamiSKUType;
|
|
22
|
-
promoId?: string | null;
|
|
23
|
-
promoToken?: string | null;
|
|
24
|
-
productDetails?: NamiProductDetails | null;
|
|
25
|
-
entitlements: IEntitlements[];
|
|
26
|
-
};
|
|
27
|
-
/**
|
|
28
|
-
* @type NamiSKUType
|
|
29
|
-
* Types of products from Nami
|
|
30
|
-
*/
|
|
31
|
-
export type NamiSKUType = 'unknown' | 'one_time_purchase' | 'subscription';
|
|
1
|
+
export type { NamiSKU, NamiSKUType } from '@namiml/sdk-core';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { NamiAnimationSpec, NamiAnimation } from "
|
|
1
|
+
import { NamiAnimationSpec, NamiAnimation } from "@namiml/sdk-core";
|
|
2
2
|
export declare function toNamiAnimation(spec: NamiAnimationSpec): NamiAnimation;
|