@beamimpact/web-sdk
Version:
The Beam SDK enables brands to connect with their customers over shared values, not transactional discounts, to build stronger loyalty. Our integration achieves this by allowing customers to (a) choose a nonprofit where the brand will donate part of their
109 lines (106 loc) • 4.05 kB
TypeScript
import * as lit from 'lit';
import { LitElement } from 'lit';
import * as lit_html from 'lit-html';
import { p as postProductDetailsPage } from '../chunks/routes-DahRzf8t.esm.js';
import { T as TUrl, L as LANGUAGES } from '../chunks/types-DfRc36jU.esm.js';
import '../chunks/promo-pill-label-BXRqZHET.esm.js';
type RequiredConfig = {
apiKey: string;
storeId: number;
};
type IAPIV3PostProductDetailsPage = Awaited<ReturnType<typeof postProductDetailsPage>>;
declare class BeamProductDetailsPage extends LitElement {
static tagName: string;
baseUrl: TUrl;
apiKey?: RequiredConfig["apiKey"];
storeId?: number;
lang: LANGUAGES;
draftConfig: boolean;
debug: boolean;
remoteProductIdentifier?: string;
promoCodes?: string;
domain?: string;
private localStorage;
private pluginPromoCodes;
get configLang(): LANGUAGES;
get parsedPromoCodes(): string[];
private handlePromoCodesStored;
private getManualPromoCodes;
private handleValidatedPromoCodes;
firstUpdated(): Promise<void>;
disconnectedCallback(): void;
postProductDetailsPageData: () => Promise<{
config: {
web: {
title: string;
description: string;
promoDescriptionPrefix?: string | undefined;
promoDescription?: string | undefined;
confirmButton?: string | undefined;
confirmedButton?: string | undefined;
collapsedButton?: string | undefined;
theme?: {
[key: string]: unknown;
} | null | undefined;
nonprofitSelectedHeader?: string | undefined;
nonprofitUnselectedHeader?: string | undefined;
dynamicStrings?: {
[key: string]: string;
} | null | undefined;
additionalStrings?: {
[key: string]: string;
} | null | undefined;
disableAnimation?: boolean | undefined;
promo?: {
"promo-text-long": string;
"promo-text-short": string;
"promo-cause-alt-text": string;
} | undefined;
};
mobileWeb?: {
title: string;
description: string;
nonprofitSelectedHeader?: string | undefined;
nonprofitUnselectedHeader?: string | undefined;
} | undefined;
mobile: {
title: string;
description: string;
nonprofitSelectedHeader?: string | undefined;
nonprofitUnselectedHeader?: string | undefined;
};
enableNonprofitDeselection?: boolean | undefined;
};
ppgfDisclosure?: {
copy: string;
} | undefined;
ppgfDisclosureHyperlink?: {
url: string;
copy: string;
} | undefined;
promos?: {
validatedPromoCodes?: {
promoCodeId: string | null;
promoCodeGroupId?: string | null | undefined;
promoId?: number | undefined;
validatedAt: string;
apply: boolean;
}[] | undefined;
} | undefined;
}>;
private productDetailsPageDataController;
updated(changedProperties: Map<string, unknown>): Promise<void>;
render(): "" | lit_html.TemplateResult<1>;
renderWidgetIcon(iconDisplay: string): lit_html.TemplateResult<1>;
renderContent(isPromoPillVisible: boolean, shouldDisplayColon: boolean, data: IAPIV3PostProductDetailsPage): lit_html.TemplateResult<1>;
renderCloseTooltipIcon(): lit_html.TemplateResult<1>;
renderDisclosureTooltip(): lit_html.TemplateResult<1>;
get cssVariables(): any;
static styles: lit.CSSResult[];
}
declare global {
interface HTMLElementTagNameMap {
"beam-product-details-page": BeamProductDetailsPage;
}
}
export { BeamProductDetailsPage };