@namiml/web-sdk 1.6.1 → 1.6.3
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 +20 -0
- package/dist/components/elements/QRCode.d.ts +9 -0
- package/dist/components/index.d.ts +3 -1
- package/dist/components/utils/actionTap.d.ts +1 -0
- package/dist/core/errors.d.ts +10 -4
- package/dist/nami/api.d.ts +2 -2
- package/dist/nami/flow/NamiFlow.d.ts +7 -2
- package/dist/nami/flow/NamiFlowManager.d.ts +2 -0
- package/dist/nami/index.d.ts +1 -0
- package/dist/nami/utils/campaign.d.ts +4 -1
- package/dist/nami-web.cjs +18 -18
- package/dist/nami-web.js +13 -13
- package/dist/nami-web.mjs +13 -13
- package/dist/nami-web.umd.js +18 -18
- package/dist/repositories/campaignRule.repository.d.ts +1 -0
- package/dist/repositories/device.repository.d.ts +2 -0
- package/dist/services/storage.service.d.ts +3 -0
- package/dist/types/components/elements.d.ts +11 -0
- package/dist/types/components/index.d.ts +2 -2
- package/dist/types/config.d.ts +6 -2
- package/dist/types/device.d.ts +1 -0
- package/dist/types/externals/campaign.d.ts +25 -0
- package/dist/types/externals/config.d.ts +2 -11
- package/dist/types/externals/flow.d.ts +12 -0
- package/dist/types/sku.d.ts +4 -0
- package/dist/utils/config.d.ts +3 -1
- package/dist/utils/const.d.ts +1 -1
- package/dist/utils/device.d.ts +2 -0
- package/package.json +7 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.6.2 (July 29, 2025)
|
|
4
|
+
|
|
5
|
+
### Enhancements
|
|
6
|
+
- Improved television layout scaling for various viewport sizes
|
|
7
|
+
|
|
8
|
+
## 1.6.2 (July 28, 2025)
|
|
9
|
+
|
|
10
|
+
### New Features
|
|
11
|
+
- **Nami.sdkVersion** - Method to get the internal SDK version
|
|
12
|
+
- Added support for QR Code components
|
|
13
|
+
- On Device Segment Selection for A/B testing
|
|
14
|
+
- Support Base64, Gzipped Initial Configurations
|
|
15
|
+
- Support Fully Uppercase Text Components
|
|
16
|
+
|
|
17
|
+
### Enhancements
|
|
18
|
+
- Paywall actions will now trigger if no flow action for a button is defined
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
- Dynamic widths on Responsive Grid components
|
|
22
|
+
|
|
3
23
|
## 1.6.1 (July 13, 2025)
|
|
4
24
|
|
|
5
25
|
### Improvements
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { NamiElement } from "../NamiElement";
|
|
2
|
+
import { TQRCodeComponent } from "../../types/components/elements";
|
|
3
|
+
export declare class NamiQRCode extends NamiElement {
|
|
4
|
+
component: TQRCodeComponent;
|
|
5
|
+
protected styles(): import("lit").CSSResult;
|
|
6
|
+
private renderQr;
|
|
7
|
+
firstUpdated(): void;
|
|
8
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
9
|
+
}
|
|
@@ -17,6 +17,7 @@ import { NamiCarouselContainer } from "./containers/CarouselContainer";
|
|
|
17
17
|
import { NamiVolumeButton } from "./elements/VolumeButton";
|
|
18
18
|
import { NamiPlayPauseButton } from "./elements/PlayPauseButton";
|
|
19
19
|
import { NamiStack } from "./elements/Stack";
|
|
20
|
+
import { NamiQRCode } from "./elements/QRCode";
|
|
20
21
|
declare global {
|
|
21
22
|
interface HTMLElementTagNameMap {
|
|
22
23
|
"nami-spacer": NamiSpacer;
|
|
@@ -39,6 +40,7 @@ declare global {
|
|
|
39
40
|
"nami-volume-button": NamiVolumeButton;
|
|
40
41
|
"nami-play-pause-button": NamiPlayPauseButton;
|
|
41
42
|
"nami-stack": NamiStack;
|
|
43
|
+
"nami-qr-code": NamiQRCode;
|
|
42
44
|
}
|
|
43
45
|
}
|
|
44
|
-
export { NamiSpacer, NamiButton, NamiHeader, NamiFooter, NamiText, NamiSegmentPicker, NamiSegmentPickerItem, NamiContainer, NamiProductContainer, NamiImage, NamiBackgroundContainer, NamiContentContainer, NamiSymbol, NamiVideo, NamiCollapseContainer, NamiResponsiveGrid, NamiCarouselContainer, NamiPlayPauseButton, NamiVolumeButton, NamiStack };
|
|
46
|
+
export { NamiSpacer, NamiButton, NamiHeader, NamiFooter, NamiText, NamiSegmentPicker, NamiSegmentPickerItem, NamiContainer, NamiProductContainer, NamiImage, NamiBackgroundContainer, NamiContentContainer, NamiSymbol, NamiVideo, NamiCollapseContainer, NamiResponsiveGrid, NamiCarouselContainer, NamiPlayPauseButton, NamiVolumeButton, NamiStack, NamiQRCode, };
|
|
@@ -15,3 +15,4 @@ export declare const setState: () => {
|
|
|
15
15
|
export declare const selectSKU: (sku: NamiSKU) => void;
|
|
16
16
|
export declare const purchaseSelectedSKU: (sku: NamiSKU) => void;
|
|
17
17
|
export declare const reloadProducts: () => void;
|
|
18
|
+
export declare function shouldHoist(onTap?: UserAction): boolean;
|
package/dist/core/errors.d.ts
CHANGED
|
@@ -3,6 +3,12 @@ export declare class RetryLimitExceededError extends Error {
|
|
|
3
3
|
status: number;
|
|
4
4
|
constructor(statusCode: number, message: string);
|
|
5
5
|
}
|
|
6
|
+
export declare class APIError extends Error {
|
|
7
|
+
}
|
|
8
|
+
export declare class ConflictError extends APIError {
|
|
9
|
+
status: number;
|
|
10
|
+
constructor();
|
|
11
|
+
}
|
|
6
12
|
export declare class SDKNotInitializedError extends Error {
|
|
7
13
|
constructor();
|
|
8
14
|
}
|
|
@@ -33,17 +39,17 @@ export declare class AnonymousLoginError extends Error {
|
|
|
33
39
|
export declare class AnonymousCDPError extends Error {
|
|
34
40
|
constructor();
|
|
35
41
|
}
|
|
36
|
-
export declare class BadRequestError extends
|
|
42
|
+
export declare class BadRequestError extends APIError {
|
|
37
43
|
constructor(message: string);
|
|
38
44
|
}
|
|
39
|
-
export declare class NotFoundError extends
|
|
45
|
+
export declare class NotFoundError extends APIError {
|
|
40
46
|
constructor(message: string);
|
|
41
47
|
}
|
|
42
|
-
export declare class ClientError extends
|
|
48
|
+
export declare class ClientError extends APIError {
|
|
43
49
|
statusCode: number;
|
|
44
50
|
constructor(statusCode: number, message: string);
|
|
45
51
|
}
|
|
46
|
-
export declare class InternalServerError extends
|
|
52
|
+
export declare class InternalServerError extends APIError {
|
|
47
53
|
constructor(message: string);
|
|
48
54
|
}
|
|
49
55
|
export declare const handleErrors: (status: number, path: string) => void;
|
package/dist/nami/api.d.ts
CHANGED
|
@@ -15,6 +15,6 @@ export declare class NamiAPI {
|
|
|
15
15
|
postImpression(options: Impression): Promise<void>;
|
|
16
16
|
postConversion(options: TransactionRequest): Promise<void>;
|
|
17
17
|
purchaseValidation(options: PurchaseValidationRequest): Promise<void>;
|
|
18
|
-
fetchAPI<T>(path: string): Promise<T>;
|
|
19
|
-
requestBodyAPI<T, U>(path: string, bodyData: T, method?: string, keepalive?: boolean, timeout?: number): Promise<U>;
|
|
18
|
+
fetchAPI<T>(path: string, timeout?: number, retries?: number): Promise<T>;
|
|
19
|
+
requestBodyAPI<T, U>(path: string, bodyData: T, method?: string, keepalive?: boolean, timeout?: number, retries?: number): Promise<U>;
|
|
20
20
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { NamiFlowObjectDTO, NamiFlowStep } from "../../types/flow";
|
|
1
|
+
import type { NamiFlowObjectDTO, NamiFlowOn, NamiFlowStep } from "../../types/flow";
|
|
2
2
|
import type { NamiCampaign, NamiFlowCampaign } from '../../types/externals/campaign';
|
|
3
3
|
import type { NamiPaywallLaunchContext } from '../../types/externals/paywall';
|
|
4
4
|
import type { PaywallComponent } from "../../components/Paywall";
|
|
@@ -41,7 +41,12 @@ export declare class NamiFlow extends BasicNamiFlow {
|
|
|
41
41
|
private backToPreviousScreenStep;
|
|
42
42
|
forward(stepId: string): void;
|
|
43
43
|
executeLifecycle(step: NamiFlowStep, key: string): void;
|
|
44
|
-
|
|
44
|
+
private lifecycles;
|
|
45
|
+
triggerActions(actionId: string, component?: NamiButton): void;
|
|
46
|
+
executeFullLifecycles(lifecycles: NamiFlowOn[]): void;
|
|
47
|
+
triggerBeforeActions(actionId: string, component?: NamiButton): void;
|
|
48
|
+
triggerAfterActions(actionId: string, component?: NamiButton): void;
|
|
49
|
+
currentStepHasHoistedPrimaryActions(actionId: string): boolean;
|
|
45
50
|
private shouldRun;
|
|
46
51
|
private performAction;
|
|
47
52
|
private nextStep;
|
|
@@ -15,4 +15,6 @@ export declare class NamiFlowManager {
|
|
|
15
15
|
static registerEventHandler(eventHandler: NamiFlowEventHandler): void;
|
|
16
16
|
static resume(): void;
|
|
17
17
|
presentFlow(campaign: NamiFlowCampaign, paywall: PaywallComponent, context?: NamiPaywallLaunchContext): NamiFlow;
|
|
18
|
+
static finish(): void;
|
|
19
|
+
static isFlowOpen(): boolean;
|
|
18
20
|
}
|
package/dist/nami/index.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { NamiCampaign } from "../../types/externals/campaign";
|
|
1
|
+
import { NamiAnonymousCampaign, NamiCampaign, NamiCampaignSegment } from "../../types/externals/campaign";
|
|
2
2
|
import { IPaywall } from "../../types/paywall";
|
|
3
|
+
import type { TDevice } from '../../types/device';
|
|
3
4
|
export declare const isValidUrl: (label: string) => boolean;
|
|
5
|
+
export declare const selectSegment: (segments: NamiCampaignSegment[], splitPosition: number) => NamiCampaignSegment;
|
|
6
|
+
export declare const mapAnonymousCampaigns: (campaigns: NamiAnonymousCampaign[], splitPosition: number, formFactor?: TDevice) => NamiCampaign[];
|
|
4
7
|
export declare const allCampaigns: () => NamiCampaign[];
|
|
5
8
|
export declare const getPaywallDataFromLabel: (value: string, type?: string) => {
|
|
6
9
|
campaign: NamiCampaign | undefined;
|