@namiml/web-sdk 1.1.0 → 1.2.0
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/CHANGELOG.md +13 -0
- package/dist/components/ContextConsumer.d.ts +11 -0
- package/dist/components/ContextProvider.d.ts +45 -0
- package/dist/components/NamiElement.d.ts +10 -0
- package/dist/components/Paywall.d.ts +17 -0
- package/dist/components/TemplateComponent.d.ts +2 -0
- package/dist/components/containers/BackgroundContainer.d.ts +10 -0
- package/dist/components/containers/Container.d.ts +10 -0
- package/dist/components/containers/Content.d.ts +10 -0
- package/dist/components/containers/Footer.d.ts +10 -0
- package/dist/components/containers/Header.d.ts +11 -0
- package/dist/components/containers/ProductContainer.d.ts +10 -0
- package/dist/components/elements/Button.d.ts +11 -0
- package/dist/components/elements/Image.d.ts +9 -0
- package/dist/components/elements/SegmentPicker.d.ts +11 -0
- package/dist/components/elements/SegmentPickerItem.d.ts +15 -0
- package/dist/components/elements/Spacer.d.ts +9 -0
- package/dist/components/elements/Text.d.ts +27 -0
- package/dist/components/index.d.ts +30 -0
- package/dist/components/productDetails.d.ts +3 -0
- package/dist/components/styles/reset.d.ts +2 -0
- package/dist/components/utils/actionTap.d.ts +13 -0
- package/dist/components/utils/eventConst.d.ts +5 -0
- package/dist/components/utils/helpers.d.ts +17 -0
- package/dist/components/utils/iconMap.d.ts +1 -0
- package/dist/components/utils/impression.d.ts +4 -0
- package/dist/components/utils/products.d.ts +18 -0
- package/dist/components/utils/state.d.ts +13 -0
- package/dist/components/utils/styles.d.ts +21 -0
- package/dist/core/errors.d.ts +46 -0
- package/dist/core/withRetry.d.ts +1 -0
- package/dist/decorators/index.d.ts +2 -0
- package/dist/nami/api.d.ts +20 -0
- package/dist/nami/campaign.d.ts +47 -0
- package/dist/nami/customer.d.ts +91 -0
- package/dist/nami/emitter.d.ts +12 -0
- package/dist/nami/index.d.ts +9 -0
- package/dist/nami/namiRefs.d.ts +7 -0
- package/dist/nami/paywalls.d.ts +31 -0
- package/dist/nami/profile.d.ts +12 -0
- package/dist/nami/utils/purchase.d.ts +3 -0
- package/dist/nami-web.cjs +20 -22
- package/dist/nami-web.d.ts +185 -115
- package/dist/nami-web.js +20 -22
- package/dist/nami-web.mjs +20 -22
- package/dist/nami-web.umd.js +21 -23
- package/dist/repositories/campaignRule.repository.d.ts +13 -0
- package/dist/repositories/config.repository.d.ts +5 -0
- package/dist/repositories/device.repository.d.ts +10 -0
- package/dist/repositories/paywall.repository.d.ts +8 -0
- package/dist/repositories/products.repository.d.ts +6 -0
- package/dist/services/logger.service.d.ts +13 -0
- package/dist/services/session.service.d.ts +4 -0
- package/dist/services/storage.service.d.ts +61 -0
- package/dist/types/api.d.ts +28 -0
- package/dist/types/campaign.d.ts +21 -0
- package/dist/types/components/containers.d.ts +67 -0
- package/dist/types/components/elements.d.ts +79 -0
- package/dist/types/components/index.d.ts +117 -0
- package/dist/types/config.d.ts +43 -0
- package/dist/types/device.d.ts +35 -0
- package/dist/types/errors.d.ts +11 -0
- package/dist/types/languages.d.ts +1 -0
- package/dist/types/loglevel.d.ts +7 -0
- package/dist/types/paywall.d.ts +222 -0
- package/dist/types/products.d.ts +34 -0
- package/dist/types/profile.d.ts +20 -0
- package/dist/types/purchase.d.ts +45 -0
- package/dist/types/sku.d.ts +35 -0
- package/dist/types/utils.d.ts +1 -0
- package/dist/utils/config.d.ts +5 -0
- package/dist/utils/const.d.ts +1 -0
- package/dist/utils/device.d.ts +3 -0
- package/dist/utils/events.d.ts +30 -0
- package/dist/utils/fonts.d.ts +7 -0
- package/dist/utils/ssr-shim.d.ts +1 -0
- package/package.json +9 -5
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare class NamiEventEmitter {
|
|
2
|
+
private static instance;
|
|
3
|
+
private emitter;
|
|
4
|
+
static getInstance(): NamiEventEmitter;
|
|
5
|
+
on(eventName: string, listener: (...args: any[]) => void): void;
|
|
6
|
+
off(eventName: string, listener: (...args: any[]) => void): void;
|
|
7
|
+
emit(eventName: string, ...args: any[]): void;
|
|
8
|
+
addListener(eventName: string, listener: (...args: any[]) => void): void;
|
|
9
|
+
removeListener(eventName: string, listener: (...args: any[]) => void): void;
|
|
10
|
+
listeners(eventName: string): any[];
|
|
11
|
+
listenerCount(eventName: string): number;
|
|
12
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { NamiConfiguration, NamiConfigurationState } from "src/types/config";
|
|
2
|
+
export declare class Nami {
|
|
3
|
+
#private;
|
|
4
|
+
static instance: Nami;
|
|
5
|
+
get isInitialized(): boolean;
|
|
6
|
+
static configure(options: NamiConfiguration): Promise<NamiConfigurationState>;
|
|
7
|
+
private static setInitialConfig;
|
|
8
|
+
private initializeSDK;
|
|
9
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { IPaywall } from "src/types/paywall";
|
|
2
|
+
import { NamiProductDetails } from "src/types/products";
|
|
3
|
+
import { Callback } from "src/types/components/containers";
|
|
4
|
+
import { Purchase } from "src/types/purchase";
|
|
5
|
+
export declare class NamiPaywallManager {
|
|
6
|
+
static instance: NamiPaywallManager;
|
|
7
|
+
private emitter;
|
|
8
|
+
productDetails: NamiProductDetails[];
|
|
9
|
+
static allPaywalls(): IPaywall[];
|
|
10
|
+
static setProductDetails(productDetails: NamiProductDetails[]): void;
|
|
11
|
+
static registerSignInHandler(handler: Callback): Callback;
|
|
12
|
+
static registerCloseHandler(handler: Callback): Callback;
|
|
13
|
+
static registerDeeplinkActionHandler(handler: Callback): Callback;
|
|
14
|
+
static registerBuySkuHandler(handler: Callback): Callback;
|
|
15
|
+
static registerRestoreHandler(handler: Callback): Callback;
|
|
16
|
+
/**
|
|
17
|
+
* Notify the NamiPaywallManager that a purchase initiated from the
|
|
18
|
+
* [NamiBuySkuHandler] is complete. Only available for plans where Nami is
|
|
19
|
+
* not handling subscription & IAP management.
|
|
20
|
+
*/
|
|
21
|
+
static buySkuComplete(purchase: Purchase): Promise<void>;
|
|
22
|
+
/**
|
|
23
|
+
Notify the NamiPaywallManager that purchase flow handled by you is cancelled.
|
|
24
|
+
Used to disable product purchase-in-progress loading indicators
|
|
25
|
+
*/
|
|
26
|
+
static buySkuCancel(): void;
|
|
27
|
+
/**
|
|
28
|
+
* Private Instance Methods
|
|
29
|
+
*/
|
|
30
|
+
private get sdkInitialized();
|
|
31
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare class NamiProfileManager {
|
|
2
|
+
static instance: NamiProfileManager;
|
|
3
|
+
private externalId?;
|
|
4
|
+
constructor();
|
|
5
|
+
setExternalId(externalId: string | undefined): NamiProfileManager;
|
|
6
|
+
getExternalId(): string | undefined;
|
|
7
|
+
isLoggedIn(): boolean;
|
|
8
|
+
private save;
|
|
9
|
+
private load;
|
|
10
|
+
login(externalId: string): Promise<void>;
|
|
11
|
+
logout(): Promise<void>;
|
|
12
|
+
}
|