UNPKG

@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

154 lines (151 loc) 5.39 kB
import * as lit from 'lit'; import { LitElement, PropertyValues } from 'lit'; import * as lit_html from 'lit-html'; import { L as LANGUAGES } from '../chunks/types-aju0qrRe.esm.js'; import './redeem-transaction.js'; import './impact-overview.js'; import { T as TCart } from '../chunks/cart-contents-CMm57qu0.esm.js'; import 'lodash'; import '../chunks/progress-bar-0VS_AmEf.esm.js'; import '../chunks/promo-pill-label-3bA1z-la.esm.js'; import './beam-partner-logos.js'; import '../chunks/types-zbTZ8-KP.esm.js'; import '../chunks/openapi-spec-hjdK2L9Q.esm.js'; import '../chunks/share-button-hDn8fnBI.esm.js'; declare class BeamPostPurchase extends LitElement { static tagName: string; baseUrl: string; apiKey: string; storeId?: number; postalCode?: string; countryCode?: string; orderId: string; /** * Either email or partnerUserId is required */ email?: string; /** * Either email or partnerUserId is required */ partnerUserId?: string; cartTotal: number; currencyCode: string; lang: LANGUAGES; cart?: TCart; discountCodes?: string[]; domain?: string; debug: boolean; private activeWidget; private nonprofitId; private selectionId; private cartId; private beamCartId; private userId; private transactionId; draftConfig: boolean; private localStorage; firstUpdated(_changedProperties: PropertyValues): void; updated(previousPropertyValues: PropertyValues): Promise<void>; enforceConfig(): void; handlePostTransaction: () => Promise<{ transactionId: string; transactionCreated?: boolean | undefined; beamUserId: string; chainId: number; nonprofitId: number | null; impact?: { personal?: { imageUrl: string | null; nonprofit: { id: number; name: string; cause: string | null; causeIconUrl: string | null; causeIconSelectedUrl: string | null; causeColor: string | null; extensibility?: { causeIconUrl?: string | null | undefined; causeIconSelectedUrl?: string | null | undefined; causeIconAndBackgroundUrl?: string | null | undefined; } | undefined; website: string | null; websiteLinkText: string; badge?: string | undefined; includeInPersonalImpact?: boolean | undefined; }; impact: { description: string | null; goalCompletionText: string; goalProgressText: string; goalProgressPercentage: number; }; share: { imageUrl: string | null; }; filters?: string[] | undefined; }[] | undefined; community?: { imageUrl: string | null; nonprofit: { id: number; name: string; cause: string | null; causeIconUrl: string | null; causeIconSelectedUrl: string | null; causeColor: string | null; extensibility?: { causeIconUrl?: string | null | undefined; causeIconSelectedUrl?: string | null | undefined; causeIconAndBackgroundUrl?: string | null | undefined; } | undefined; website: string | null; websiteLinkText: string; badge?: string | undefined; includeInPersonalImpact?: boolean | undefined; }; impact: { description: string | null; goalCompletionText: string; goalProgressText: string; goalProgressPercentage: number; }; share: { imageUrl: string | null; }; filters?: string[] | undefined; }[] | undefined; } | undefined; config?: { mobile?: { title?: unknown; description?: string | undefined; theme?: { [key: string]: unknown; } | null | undefined; } | undefined; mobileWeb?: { title?: unknown; description?: string | undefined; theme?: { [key: string]: unknown; } | null | undefined; } | undefined; web?: { title?: string | undefined; description?: string | undefined; theme?: { [key: string]: unknown; } | null | undefined; } | undefined; } | undefined; }>; private transactionDataController; render(): "" | lit_html.TemplateResult<1>; static styles: lit.CSSResult[]; } declare global { interface HTMLElementTagNameMap { "beam-post-purchase": BeamPostPurchase; } } export { BeamPostPurchase };