import { type SwishI18n } from "@swishapp/i18n"; import { AjaxApiClient } from "./ajax-api/ajax-api-client"; import { createLocationObserver } from "./dom/dom-utils"; import { EventBus } from "./events/event-bus"; import { Intents } from "./intents/intents"; import { SwishOptionsInput } from "./options/swish-options"; import { SwishOptions } from "./options/types"; import { Placements } from "./placements/placements"; import { SwishQuery } from "./query"; import { computed, effect, signal } from "./state"; import { StorefrontApiClient } from "./storefront-api/storefront-api-client"; import { SwishApi } from "./swish-api/swish-api-client"; import { SwishUi } from "./swish-ui/swish-ui"; import { SwishUiElement } from "./swish-ui/swish-ui-element"; import { RequireUiComponentOptions } from "./swish-ui/types"; import { PreviewOptions } from "./types"; import { copyToClipboard } from "./utils/copy-to-clipboard"; export declare const VERSION: string; export declare const swishSdkUrl: string; export declare const createSwish: (optionsInput: SwishOptionsInput) => Promise; declare class SwishApp { private readonly swishApi; private readonly swishApiPublisher; private readonly storefrontApi; private readonly ajaxApi; private readonly ajaxApiPublisher; private readonly swishOptions; private readonly swishUi; private readonly _i18n; private readonly checkoutBridge?; readonly events: EventBus; readonly intents: Intents; readonly placements: Placements; readonly query: SwishQuery; readonly isPreview: boolean; constructor(options: SwishOptions, isPreview: boolean); get options(): SwishOptions; get storefrontContext(): import("./swish").StorefrontContext; get api(): SwishApi; get storefront(): StorefrontApiClient; get ajax(): AjaxApiClient; get i18n(): SwishI18n; get shopUrl(): string; get dom(): { createLocationObserver: typeof createLocationObserver; }; get iconsSignal(): import("@preact/signals-core").Signal>; get uiOptionsSignal(): import("@preact/signals-core").Signal<{ baseUrl: string; css: (string | URL)[]; design: { [x: string]: unknown; }; icons: { [x: string]: string; }; images: { baseTint: boolean; }; productCard: { linkToProductPage?: boolean | undefined; showQuickBuyButton?: boolean | undefined; }; badges: { rules: ({ id: string; enabled: boolean; label: string; backgroundColor: string; textColor: string; type: "sold-out"; } | { id: string; enabled: boolean; label: string; backgroundColor: string; textColor: string; type: "sale"; } | { condition: { type: "tag"; tag: string; } | { type: "metafield"; metafield: string; operator: "exists" | "equals" | "contains"; value: string; }; id: string; enabled: boolean; label: string; backgroundColor: string; textColor: string; type: "custom"; })[]; }; notifyMe: { flush: boolean; tall: boolean; fullHeight: boolean; }; toasts: { autoHideDuration: number; }; wishlist: { experience: "drawer" | "classic-page"; multipleLists: boolean; }; cart: { navigateOnInCart: boolean; drawerTrigger: string; }; defaultView: "home" | "saves" | "lists" | "notifications" | "orders" | "profile"; drawer: { sections: ({ type: "drawer-header"; hidden: boolean; design: { [x: string]: string | number; }; options: { title: string; logo: { url: string; altText: string; }; useCloseButton: boolean; accountButton: boolean; accountButtonUrl: string; notificationButton: boolean; }; } | { type: "drawer-footer"; hidden: boolean; design: { [x: string]: string | number; }; options: { displayType: "floating" | "docked"; showIcons: boolean; showText: boolean; fontScale: number; items: { id: string; enabled: boolean; intent: string; }[]; }; })[]; }; home: { sections: ({ type: "sign-in"; id?: string | undefined; hidden: boolean; design: { [x: string]: string | number; }; options: { message: string; }; } | { type: "lists" | "notifications" | "recently-viewed" | "saved-from-cart" | "saved-items"; id?: string | undefined; hidden: boolean; design: { [x: string]: string | number; }; options: { [x: string]: unknown; }; } | { type: "mini-menu"; id?: string | undefined; hidden: boolean; design: { [x: string]: string | number; }; options: { [x: string]: unknown; }; items: { title: string; url: string; hidden: boolean; }[]; } | { type: "content-block"; id?: string | undefined; hidden: boolean; design: { [x: string]: string | number; }; options: { [x: string]: unknown; }; title?: string | undefined; body?: string | undefined; image?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; link?: { url: string; target?: "_self" | "_blank" | undefined; } | undefined; visibleTo: { audience: "all" | "signed-in" | "signed-out"; customerTags: string[]; }; } | { type: "featured-collection"; id?: string | undefined; hidden: boolean; design: { [x: string]: string | number; }; options: { [x: string]: unknown; }; handle: string; })[]; }; saves: { sections: ({ type: "sign-in"; id?: string | undefined; hidden: boolean; design: { [x: string]: string | number; }; options: { message: string; }; } | { type: "content-block"; id?: string | undefined; hidden: boolean; design: { [x: string]: string | number; }; options: { [x: string]: unknown; }; title?: string | undefined; body?: string | undefined; image?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; link?: { url: string; target?: "_self" | "_blank" | undefined; } | undefined; visibleTo: { audience: "all" | "signed-in" | "signed-out"; customerTags: string[]; }; } | { type: "lists-section"; id?: string | undefined; hidden: boolean; design: { [x: string]: string | number; }; options: { display: "myLists" | "forYouLists"; layout: "list" | "slider"; }; } | { type: "all-items-grid"; id?: string | undefined; hidden: boolean; design: { [x: string]: string | number; }; options: { layout: "gallery" | "card"; showVendor: boolean; showSaveButton: boolean; showQuickBuyButton: boolean; showBuyButton: boolean; showVariantTitle: boolean; enableVariantChange: boolean; showVariantOptionNames: boolean; hideCompareAtPrice: boolean; }; })[]; }; lists: { sections: ({ type: "sign-in"; id?: string | undefined; hidden: boolean; design: { [x: string]: string | number; }; options: { message: string; }; } | { type: "content-block"; id?: string | undefined; hidden: boolean; design: { [x: string]: string | number; }; options: { [x: string]: unknown; }; title?: string | undefined; body?: string | undefined; image?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; link?: { url: string; target?: "_self" | "_blank" | undefined; } | undefined; visibleTo: { audience: "all" | "signed-in" | "signed-out"; customerTags: string[]; }; } | { type: "lists-grid"; id?: string | undefined; hidden: boolean; design: { [x: string]: string | number; }; options: { displayType: "list" | "slider"; }; })[]; }; listDetail: { sections: { type: "list-items-grid"; hidden: boolean; design: { [x: string]: string | number; }; options: { layout: "gallery" | "card"; showVendor: boolean; showBuyButton: boolean; showQuickBuyButton: boolean; showVariantTitle: boolean; showVariantOptionNames: boolean; enableVariantChange: boolean; hideCompareAtPrice: boolean; linkToProductPage: boolean; }; }[]; }; listDetailPage: { sections: { type: "list-items-grid"; hidden: boolean; design: { [x: string]: string | number; }; options: { layout: "gallery" | "card"; showVendor: boolean; desktopColumns: number; showBuyButton: boolean; showQuickBuyButton: boolean; showVariantTitle: boolean; showVariantOptionNames: boolean; enableVariantChange: boolean; hideCompareAtPrice: boolean; linkToProductPage: boolean; }; }[]; }; orders: { sections: { type: "orders-list"; hidden: boolean; design: { [x: string]: string | number; }; options: { [x: string]: unknown; }; }[]; }; orderDetail: { sections: ({ type: "order-info"; hidden: boolean; design: { [x: string]: string | number; }; options: { [x: string]: unknown; }; } | { type: "order-items"; hidden: boolean; design: { [x: string]: string | number; }; options: { [x: string]: unknown; }; } | { type: "order-actions"; hidden: boolean; design: { [x: string]: string | number; }; options: { [x: string]: unknown; }; })[]; }; productDetail: { sections: ({ type: "image-slider"; hidden: boolean; design: { [x: string]: string | number; }; options: { flush: boolean; loop: boolean; }; } | { type: "product-info"; hidden: boolean; design: { [x: string]: string | number; }; options: { variantSelectDisplayType: "pills" | "rows"; hideSingleValueOptions: boolean; descriptionMaxLines: number; }; } | { type: "buy-buttons"; hidden: boolean; design: { [x: string]: string | number; }; options: { notifyWhenSoldOut: boolean; }; } | { type: "complementary-products"; hidden: boolean; design: { [x: string]: string | number; }; options: { showQuickBuyButton: boolean; showSaveButton: boolean; }; } | { type: "related-products"; hidden: boolean; design: { [x: string]: string | number; }; options: { showQuickBuyButton: boolean; showSaveButton: boolean; }; })[]; }; profile: { sections: { type: "profile-form"; hidden: boolean; design: { [x: string]: string | number; }; options: { [x: string]: unknown; }; }[]; }; notifications: { sections: { type: "notifications-list"; hidden: boolean; design: { [x: string]: string | number; }; options: { [x: string]: unknown; }; }[]; }; }>; readonly ui: { createElement: (name: string, options?: RequireUiComponentOptions) => Promise; showDrawer: (options?: Parameters[0]) => Promise>; hideDrawer: () => void; isDrawerOpen: () => boolean; showConfirmDialog: (options: Parameters[0]) => Promise>; applyPreview: (preview: PreviewOptions["ui"]) => void; }; readonly utils: { copyToClipboard: typeof copyToClipboard; createShareUrl: (args: { publicListId: string; }) => URL; }; readonly state: { itemContext: (source: HTMLElement | Location) => import("@preact/signals-core").Signal; itemContextFromIds: (ids: import("./state").ItemContextIds) => import("@preact/signals-core").Signal; itemState: (context: import("@preact/signals-core").Signal, optionsInput?: import("./state").ItemStateOptions) => import("@preact/signals-core").ReadonlySignal<{ error: import("@swishapp/api-client").ApiError | null; status: "saving" | "saved" | "unsaved"; savedItemId: string | null; savedItemIds: string[]; loading: boolean; submitting: boolean; saved: boolean; saving: boolean; unsaving: boolean; }> & { save: () => Promise; unsave: () => Promise; updateLists: () => Promise; updateVariant: () => Promise; update: () => Promise; toggle: () => Promise; setOptions: (next: import("./state").ItemStateOptions) => void; setCallbacks: (next: import("./state").ItemStateOptions) => void; dispose: () => void; }; itemCount: () => import("@preact/signals-core").ReadonlySignal<{ count: number; loading: boolean; refetching: boolean; error: import("@swishapp/api-client").ApiError | null; }> & { dispose: () => void; }; listContext: (source: HTMLElement | Location) => import("./state").ListContextSignal; lists: (options?: import("./state").ListsOptions) => import("./state").ListsSignal; items: (contextInput: import("@preact/signals-core").Signal | import("./state").ListContextInput, options?: import("./state").ItemsOptions) => import("./state").ItemsSignal; product: (ids: import("./state").ProductIds) => import("./state").ProductSignal; swishQuery: | import("@swishapp/api-client").PaginatedApiResponse, TVariables>(fetch: import("./state").FetchFn, options?: { variables?: import("@preact/signals-core").Signal; skip?: import("@preact/signals-core").Signal; refetch?: import("./swish").EventName[]; }) => { data: import("@preact/signals-core").Signal<(TResponse extends { data: infer D; } ? D : never) | null>; pageInfo: import("@preact/signals-core").Signal; error: import("@preact/signals-core").Signal; loading: import("@preact/signals-core").Signal; refetching: import("@preact/signals-core").ReadonlySignal; dispose: () => void; }; effect: typeof effect; signal: typeof signal; computed: typeof computed; }; } export type * from "@swishapp/api-client/2026-07"; export type { SwishI18n } from "@swishapp/i18n"; export type * from "./ajax-api/ajax-api-client"; export type { CustomiserSdkModule } from "./customiser"; export type { EventName } from "./events/event-bus"; export type * from "./intents/types"; export type { BadgeCondition, BadgeRule, BuiltInBadgeType, } from "./options/schemas"; export { DEFAULT_BADGE_RULES } from "./options/schemas"; export type { BadgeRuleInput, SwishOptionsInput, } from "./options/swish-options"; export type * from "./options/types"; export { getSwishQueryStorageKey } from "./query"; export { listExistingSaveButtons, saveButtonProductKey, saveButtonTargetProduct, } from "./dom/existing-save-buttons"; export type { ExistingSaveButton, ExistingSaveButtonSource, SaveButtonTargetProduct, } from "./dom/existing-save-buttons"; export { resolveSaveButtonStyle, SAVE_BUTTON_STYLE_ATTRIBUTE, SAVE_BUTTON_STYLES, } from "./dom/save-button-style"; export type { SaveButtonStyle } from "./dom/save-button-style"; export type { ItemContext, ItemContextIds } from "./state/item-context-signal"; export type { ItemMatch, ItemStateCallbacks, ItemStateOptions, } from "./state/item-state-signal"; export type { ListContext, ListContextInput, ListContextSignal, ListContextType, SmartListId, } from "./state/list-context-signal"; export type { ListsOptions, ListsSignal, ListsState, ListsType, } from "./state/lists-signal"; export type { ItemsOptions, ItemsSignal, ItemsSort, ItemsState, } from "./state/items-signal"; export type { ProductIds, ProductSignal, ProductState, } from "./state/product-signal"; export type * from "./storefront-api/storefront-api-client"; export type { Ref, SwishUiElement } from "./swish-ui/swish-ui-element"; export type { ListSelectOptions, ListSelectSubmitData, NotifyMeOptions, NotifyMeSubmitData, QuickBuyOptions, QuickBuySubmitData, Toast, ToastManager, UnsaveAlertOptions, UnsaveAlertSubmitData, VariantSelectOptions, VariantSelectSubmitData, } from "./swish-ui/types"; export type { PreviewOptions, Product, ProductVariant, SwishUiElementSpec, SwishUiManifest, } from "./types"; export { buildShareListUrl } from "./utils/build-share-list-url"; export { allowsMultipleLists, isClassicWishlistPage, } from "./utils/is-classic-wishlist-page"; export { wishlistPagePath } from "./utils/wishlist-page"; export { copyToClipboard } from "./utils/copy-to-clipboard"; export type { ElementName, ElementSpec, MountAt, MountMode, PlacementLayoutSpec, PlacementSpec, } from "./dom/create-placement"; export { itemToProductRefs } from "./utils/shopify-mapper"; export { resolveDefaultView } from "./utils/default-view"; export { hasAudienceTargeting, matchesAudience, } from "./utils/section-audience"; export type { Audience, AudienceViewer, SectionAudience, } from "./utils/section-audience"; export { settleIntent } from "./utils/settle-intent"; export { SAVED_FROM_CART_TAG } from "./intents/handlers/save-cart-line-handler"; export type { SwishApp }; declare global { interface Window { Shopify?: { analytics?: { publish?: (event: string, data: Record) => void; }; theme?: { id: number; name?: string; role?: string; }; }; _SWISH_UI_VERSION?: string; } var _SWISH_UI_VERSION: string | undefined; }