@vio-live/web-sdk 0.28.0 → 0.32.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 +243 -2
- package/README.md +175 -13
- package/dist/{chunk-Q2NALS7P.js → chunk-C5Q6W4B2.js} +1453 -199
- package/dist/chunk-C5Q6W4B2.js.map +1 -0
- package/dist/{chunk-AFJ5M53F.js → chunk-IR4XYTZL.js} +707 -92
- package/dist/chunk-IR4XYTZL.js.map +1 -0
- package/dist/chunk-QGJUBVH3.js +3 -0
- package/dist/{chunk-67QESEV2.js.map → chunk-QGJUBVH3.js.map} +1 -1
- package/dist/core/index.d.ts +226 -6
- package/dist/core/index.js +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/react/index.d.ts +2 -2
- package/dist/react/index.js +3 -3
- package/dist/{tokens-y0KzN7bP.d.ts → tokens-D1DCVzOf.d.ts} +331 -13
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js +3 -3
- package/package.json +1 -1
- package/dist/chunk-67QESEV2.js +0 -3
- package/dist/chunk-AFJ5M53F.js.map +0 -1
- package/dist/chunk-Q2NALS7P.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-QGJUBVH3.js"}
|
package/dist/core/index.d.ts
CHANGED
|
@@ -185,6 +185,12 @@ interface SponsorCommerceBlock {
|
|
|
185
185
|
channelId?: string | null;
|
|
186
186
|
paymentMethods?: string[];
|
|
187
187
|
}
|
|
188
|
+
/** One of a brand's promises («Rask levering» / «2-5 virkedager»), with a line icon of the SDK's set. */
|
|
189
|
+
interface SponsorHighlight {
|
|
190
|
+
icon: string;
|
|
191
|
+
title: string;
|
|
192
|
+
text?: string | null;
|
|
193
|
+
}
|
|
188
194
|
interface Sponsor {
|
|
189
195
|
id: number;
|
|
190
196
|
name: string;
|
|
@@ -197,6 +203,8 @@ interface Sponsor {
|
|
|
197
203
|
termsUrl?: string | null;
|
|
198
204
|
/** The brand's returns / refund policy page. */
|
|
199
205
|
refundPolicyUrl?: string | null;
|
|
206
|
+
/** The brand's promises (Settings → Brand): up to three, shown under the buy zone of the product detail. */
|
|
207
|
+
highlights?: SponsorHighlight[] | null;
|
|
200
208
|
commerce: SponsorCommerceBlock;
|
|
201
209
|
}
|
|
202
210
|
/**
|
|
@@ -481,6 +489,19 @@ interface CommerceClientOptions {
|
|
|
481
489
|
/** Per-sponsor commerce apiKey (from bootstrap.primarySponsor.commerce.apiKey). */
|
|
482
490
|
apiKey: string;
|
|
483
491
|
}
|
|
492
|
+
/** One shipping rate of a product for a country, tax included. */
|
|
493
|
+
interface ProductShippingRate {
|
|
494
|
+
id: string;
|
|
495
|
+
name: string;
|
|
496
|
+
/** Major units, tax included when the backend says it. */
|
|
497
|
+
price: number;
|
|
498
|
+
currency: string;
|
|
499
|
+
default: boolean;
|
|
500
|
+
/** What the brand wrote for the rate — in practice its delivery time («Leveringstid 1-5 dager»); '' when none. */
|
|
501
|
+
description: string;
|
|
502
|
+
/** The carrier's logo for the rate (https), '' when none. */
|
|
503
|
+
logoUrl: string;
|
|
504
|
+
}
|
|
484
505
|
interface GetProductsByIdsOptions {
|
|
485
506
|
product_ids: number[];
|
|
486
507
|
currency?: string | null;
|
|
@@ -506,6 +527,16 @@ declare class ChannelProduct {
|
|
|
506
527
|
* price and no images. `useCache: false` neither reads nor writes it.
|
|
507
528
|
*/
|
|
508
529
|
getSellerCompany(productId: number): Promise<string | null>;
|
|
530
|
+
/**
|
|
531
|
+
* The product's shipping rates for the page's market (or `country`),
|
|
532
|
+
* cheapest first; `[]` when it has none there, `null` when they could not
|
|
533
|
+
* be read. Never throws. Never from the cache, for the reason given at
|
|
534
|
+
* getSellerCompany.
|
|
535
|
+
*/
|
|
536
|
+
getShippingRates(productId: number, options?: {
|
|
537
|
+
currency?: string | null;
|
|
538
|
+
country?: string | null;
|
|
539
|
+
}): Promise<ProductShippingRate[] | null>;
|
|
509
540
|
}
|
|
510
541
|
declare class Channel {
|
|
511
542
|
readonly product: ChannelProduct;
|
|
@@ -620,6 +651,22 @@ interface CartChangeDetail {
|
|
|
620
651
|
cartsBySponsor: Map<number, SponsorCartState>;
|
|
621
652
|
itemCount: number;
|
|
622
653
|
}
|
|
654
|
+
/**
|
|
655
|
+
* Detail of `vio:cart-updated` (on `document`): a sponsor's cart as it stands
|
|
656
|
+
* after this tab learned of it from somewhere other than its own taps —
|
|
657
|
+
* `source: 'server'`: GetCart, applied right before a checkout is built on it
|
|
658
|
+
* (`refreshFromServer`); `source: 'storage'`: another tab of the same site
|
|
659
|
+
* wrote it (an add there, a payment that cleared it). The lines are copies.
|
|
660
|
+
*/
|
|
661
|
+
interface CartUpdatedDetail {
|
|
662
|
+
sponsorId: number;
|
|
663
|
+
cartId?: string;
|
|
664
|
+
items: CartLineItem[];
|
|
665
|
+
itemCount: number;
|
|
666
|
+
subtotal: number;
|
|
667
|
+
currency: string;
|
|
668
|
+
source: 'server' | 'storage';
|
|
669
|
+
}
|
|
623
670
|
interface AddProductOptions {
|
|
624
671
|
product: Product;
|
|
625
672
|
sponsorId: number;
|
|
@@ -705,6 +752,9 @@ declare class CartManager extends EventTarget {
|
|
|
705
752
|
* Overwrite local cart state with the backend cart response (source of
|
|
706
753
|
* truth). `opts.settling` is the mutation whose answer this is: it does not
|
|
707
754
|
* count as "in flight" for the origins (see `hasMutationsInFlight`).
|
|
755
|
+
* `opts.authoritative` is a GetCart taken with nothing of this tab's in
|
|
756
|
+
* flight (`refreshFromServer`): an empty answer then means the cart IS
|
|
757
|
+
* empty, and the local lines go — not an add still on its way.
|
|
708
758
|
*/
|
|
709
759
|
updateFromBackendCart(sponsorId: number, backendCart: {
|
|
710
760
|
cart_id?: string;
|
|
@@ -736,6 +786,7 @@ declare class CartManager extends EventTarget {
|
|
|
736
786
|
}>;
|
|
737
787
|
}, opts?: {
|
|
738
788
|
settling?: Promise<unknown>;
|
|
789
|
+
authoritative?: boolean;
|
|
739
790
|
}): void;
|
|
740
791
|
/** Add a Product DTO to a sponsor's cart. Bumps quantity if already present.
|
|
741
792
|
* When a variantId is given, the line uses the VARIANT's price / image / title
|
|
@@ -777,6 +828,32 @@ declare class CartManager extends EventTarget {
|
|
|
777
828
|
clearAllCarts(): void;
|
|
778
829
|
/** Refresh the local cart from the backend (source of truth). */
|
|
779
830
|
fetchCartFromBackend(sponsorId: number): Promise<unknown>;
|
|
831
|
+
/**
|
|
832
|
+
* The cart as the server has it, for the moment a checkout is about to be
|
|
833
|
+
* built on it: what the shopper is about to pay must be what the page shows.
|
|
834
|
+
* Waits for this tab's own mutations (their answers are the server's too),
|
|
835
|
+
* then applies GetCart as it is — a line another tab added, one it removed,
|
|
836
|
+
* an empty cart — and tells the page: `change` for the drawer, and
|
|
837
|
+
* `vio:cart-updated` on `document` (`source: 'server'`) for a host that
|
|
838
|
+
* draws its own. A mutation that starts while the server is answering makes
|
|
839
|
+
* that answer old: it is asked once more. Nothing to ask without a backend
|
|
840
|
+
* cart. A GetCart that fails leaves the local state as it was and does not
|
|
841
|
+
* throw — the checkout then goes on with the lines the last mutation
|
|
842
|
+
* answered, as it always did. Resolves with the sponsor's cart.
|
|
843
|
+
*/
|
|
844
|
+
refreshFromServer(sponsorId: number): Promise<SponsorCartState | undefined>;
|
|
845
|
+
/** `vio:cart-updated` on `document` — see `CartUpdatedDetail`. */
|
|
846
|
+
private emitCartUpdated;
|
|
847
|
+
/**
|
|
848
|
+
* Another tab of the site wrote the carts: adopt what it wrote, sponsor by
|
|
849
|
+
* sponsor — its lines and its backend cart id, or nothing when it cleared
|
|
850
|
+
* the cart (a payment) — except for a sponsor this tab is mid-write for:
|
|
851
|
+
* its own answer lands in a moment and is persisted then, over whatever
|
|
852
|
+
* the other tab had. `key` is null when the other tab cleared the whole
|
|
853
|
+
* storage. Says `change` (the drawer) and `vio:cart-updated` per sponsor
|
|
854
|
+
* that changed (`source: 'storage'`); nothing when nothing did.
|
|
855
|
+
*/
|
|
856
|
+
private onStorage;
|
|
780
857
|
/** Line items grouped by supplier (shipping is per-supplier server-side). */
|
|
781
858
|
fetchLineItemsBySupplier(sponsorId: number): Promise<unknown>;
|
|
782
859
|
/** Set the chosen shipping option per supplier on the backend cart. */
|
|
@@ -791,6 +868,12 @@ declare class CartManager extends EventTarget {
|
|
|
791
868
|
get totalAcrossSponsors(): number;
|
|
792
869
|
get primaryCurrency(): string;
|
|
793
870
|
formatTotal(): string;
|
|
871
|
+
/**
|
|
872
|
+
* Keep the carts for the next page and the other tabs. Where storage
|
|
873
|
+
* refuses (in-app browsers, private modes) nothing throws (safe-storage.ts):
|
|
874
|
+
* the carts stay in this manager's own map, the add to cart and the
|
|
875
|
+
* checkout go on, and the cart just does not survive a reload there.
|
|
876
|
+
*/
|
|
794
877
|
private persist;
|
|
795
878
|
private loadFromStorage;
|
|
796
879
|
private emit;
|
|
@@ -840,6 +923,8 @@ interface SponsorIdentity {
|
|
|
840
923
|
termsUrl?: string | null;
|
|
841
924
|
/** The brand's returns / refund policy page — https only; `null` when it has none. */
|
|
842
925
|
refundPolicyUrl?: string | null;
|
|
926
|
+
/** The brand's promises (at most three, each with a title); absent when it has none. */
|
|
927
|
+
highlights?: SponsorHighlight[];
|
|
843
928
|
}
|
|
844
929
|
/** The sponsor of a checkout / an order as events and `getOrderReference` carry it. */
|
|
845
930
|
type CheckoutSponsor = Pick<SponsorIdentity, 'id' | 'name' | 'logoUrl'>;
|
|
@@ -1191,7 +1276,7 @@ declare function normalizeScope(scope: string | null | undefined): string;
|
|
|
1191
1276
|
* 3. `vio:analytics` DOM event — always when started (inspector/bridges)
|
|
1192
1277
|
*/
|
|
1193
1278
|
|
|
1194
|
-
declare const ANALYTICS_EVENT_NAMES: readonly ["view_item_list", "select_item", "view_item", "add_to_cart", "remove_from_cart", "view_cart", "begin_checkout", "purchase", "component_impression", "component_click", "ad_impression", "ad_click", "poll_impression", "contest_impression", "session_start", "session_end", "checkout_error", "sdk_error"];
|
|
1279
|
+
declare const ANALYTICS_EVENT_NAMES: readonly ["view_item_list", "select_item", "view_item", "add_to_cart", "remove_from_cart", "view_cart", "begin_checkout", "add_payment_info", "purchase", "component_impression", "component_click", "ad_impression", "ad_click", "poll_impression", "contest_impression", "session_start", "session_end", "checkout_error", "sdk_error"];
|
|
1195
1280
|
type AnalyticsEventName = (typeof ANALYTICS_EVENT_NAMES)[number];
|
|
1196
1281
|
/** Camel-case for DX; mapped to the snake_case wire format at build time. */
|
|
1197
1282
|
interface AnalyticsContext {
|
|
@@ -1285,6 +1370,21 @@ interface AnalyticsStartOptions {
|
|
|
1285
1370
|
* its own rotating session.
|
|
1286
1371
|
*/
|
|
1287
1372
|
sessionId?: string;
|
|
1373
|
+
/**
|
|
1374
|
+
* Dejar de capturar QUÉ contenido se está viendo: sin `content_url`,
|
|
1375
|
+
* `content_title`, `content_id` ni nombre/marca de producto. Default false
|
|
1376
|
+
* (se captura).
|
|
1377
|
+
*
|
|
1378
|
+
* Para superficies donde el contenido ES el dato sensible — una app de
|
|
1379
|
+
* salud: la pantalla abierta y el producto comprado revelan la condición
|
|
1380
|
+
* aunque el dispositivo sea anónimo. El funnel se sigue midiendo: ids de
|
|
1381
|
+
* campaña y componente, cantidades e importes.
|
|
1382
|
+
*
|
|
1383
|
+
* El colector lo aplica igual del lado del servidor para las surfaces
|
|
1384
|
+
* marcadas (`client_apps.privacy_mode = 'minimal'`); este interruptor evita
|
|
1385
|
+
* que el dato salga del dispositivo.
|
|
1386
|
+
*/
|
|
1387
|
+
privateContent?: boolean;
|
|
1288
1388
|
/** Send to the Vio collector. Default true. */
|
|
1289
1389
|
collector?: boolean;
|
|
1290
1390
|
/** Also push GA4 e-commerce events to window.dataLayer (publisher feature). */
|
|
@@ -1316,8 +1416,18 @@ declare class AnalyticsManager extends EventTarget {
|
|
|
1316
1416
|
private client;
|
|
1317
1417
|
/** The landing it was read from — persisted later when consent arrives after the first event. */
|
|
1318
1418
|
private landing;
|
|
1419
|
+
/**
|
|
1420
|
+
* Internal traffic (ADR-0041): `client.internal: true` on every event while
|
|
1421
|
+
* set. Read once (`?vio_internal=1|0`, else `localStorage`) at `Vio.init()`
|
|
1422
|
+
* or on the first event; `setInternal()` changes it. `null` = not read yet.
|
|
1423
|
+
*/
|
|
1424
|
+
private internal;
|
|
1425
|
+
/** The console line for testers goes out once per page load. */
|
|
1426
|
+
private internalAnnounced;
|
|
1319
1427
|
/** Checkouts (`c:<id>`) and orders (`o:<number>`) this page load reported a `purchase` for: one each. */
|
|
1320
1428
|
private readonly purchased;
|
|
1429
|
+
/** Checkouts this page load reported an `add_payment_info` for: one each. */
|
|
1430
|
+
private readonly paymentInfoReported;
|
|
1321
1431
|
/** Purchases still waiting for Vio's order number: each sends at once, with what it has, when called. */
|
|
1322
1432
|
private readonly pendingPurchases;
|
|
1323
1433
|
/** Between `pagehide` and `pageshow` (bfcache): nothing waits, it all goes out now. */
|
|
@@ -1344,6 +1454,24 @@ declare class AnalyticsManager extends EventTarget {
|
|
|
1344
1454
|
stop(): void;
|
|
1345
1455
|
/** Attach the partner's user id (opaque) to all subsequent events. */
|
|
1346
1456
|
identify(externalUserId: string | null): void;
|
|
1457
|
+
/**
|
|
1458
|
+
* Mark (or unmark) this browser as Vio's own traffic (ADR-0041): while
|
|
1459
|
+
* marked, every event carries `client.internal: true` and the collector's
|
|
1460
|
+
* reads leave it out. Remembered in `localStorage` (`vio.internal.v1`) —
|
|
1461
|
+
* the same mark `?vio_internal=1` / `?vio_internal=0` sets on any page.
|
|
1462
|
+
*/
|
|
1463
|
+
setInternal(internal: boolean): void;
|
|
1464
|
+
/** Whether this browser is marked as internal traffic (reads the mark the first time). */
|
|
1465
|
+
get isInternal(): boolean;
|
|
1466
|
+
/**
|
|
1467
|
+
* Read the mark: the page's `?vio_internal=1|0` (remembered), else what the
|
|
1468
|
+
* browser remembers. Once per page load — `Vio.init()` calls it so a page
|
|
1469
|
+
* with the parameter marks the browser even if it never starts analytics;
|
|
1470
|
+
* `force` reads again.
|
|
1471
|
+
*/
|
|
1472
|
+
syncInternal(force?: boolean): boolean;
|
|
1473
|
+
/** One console line when marked, so a tester can see the mark took. */
|
|
1474
|
+
private announceInternal;
|
|
1347
1475
|
/** Queue one event. Works pre-init and pre-start (SSR: no-op). */
|
|
1348
1476
|
track(name: AnalyticsEventName, opts?: TrackOptions): void;
|
|
1349
1477
|
/** The sinks and the queue for one built event — `track`'s second half. */
|
|
@@ -1362,6 +1490,11 @@ declare class AnalyticsManager extends EventTarget {
|
|
|
1362
1490
|
/** Called the one time the impression is tracked (e.g. to fire a
|
|
1363
1491
|
* companion view_item_list). */
|
|
1364
1492
|
onImpression?: () => void;
|
|
1493
|
+
/** What the element shows, read when the impression fires: its
|
|
1494
|
+
* products go out as `commerce.items` (the collector counts a
|
|
1495
|
+
* per-product impression from them, ADR-0041). Nothing when it
|
|
1496
|
+
* answers no items. */
|
|
1497
|
+
commerce?: () => AnalyticsCommerce | null | undefined;
|
|
1365
1498
|
}): () => void;
|
|
1366
1499
|
/** Force a flush (mostly for tests). */
|
|
1367
1500
|
flush(): Promise<void>;
|
|
@@ -1404,6 +1537,11 @@ declare class AnalyticsManager extends EventTarget {
|
|
|
1404
1537
|
* buyer reference the payment did not bring) is filled in when it comes.
|
|
1405
1538
|
*/
|
|
1406
1539
|
private reportPurchase;
|
|
1540
|
+
/**
|
|
1541
|
+
* Sends the queue now, not at the next tick: by beacon when the page is
|
|
1542
|
+
* hidden or going away (a request may not survive it), else by fetch.
|
|
1543
|
+
*/
|
|
1544
|
+
private sendNow;
|
|
1407
1545
|
/** Sends every purchase still waiting for its order number, at once, with what it has. */
|
|
1408
1546
|
private settlePendingPurchases;
|
|
1409
1547
|
/** Whether the page is hidden or going away (`pagehide` until `pageshow`). */
|
|
@@ -1791,7 +1929,12 @@ interface CartQueryOptions {
|
|
|
1791
1929
|
* avoiding an import cycle); falls back to the host apiKey.
|
|
1792
1930
|
*/
|
|
1793
1931
|
declare function getCartGraphQLOptions(sponsorId?: number): Promise<CartQueryOptions>;
|
|
1794
|
-
/**
|
|
1932
|
+
/**
|
|
1933
|
+
* Stable per-browser customer session id (backend CreateCart requires one).
|
|
1934
|
+
* Never throws: where storage is refused (in-app browsers) the id lives in
|
|
1935
|
+
* this page's memory — still one per shopper, never the shared
|
|
1936
|
+
* `cs_session_default` every storage-less browser used to send.
|
|
1937
|
+
*/
|
|
1795
1938
|
declare function getCustomerSessionId(): string;
|
|
1796
1939
|
interface GraphQLEnvelope {
|
|
1797
1940
|
data?: Record<string, Record<string, unknown>> | null;
|
|
@@ -2440,6 +2583,8 @@ interface CheckoutAddress {
|
|
|
2440
2583
|
postalCode: string;
|
|
2441
2584
|
city: string;
|
|
2442
2585
|
country?: string;
|
|
2586
|
+
/** Mobile number (Norwegian, 8 digits, optional +47) — sent as `phone` + `phone_code`. */
|
|
2587
|
+
phone?: string;
|
|
2443
2588
|
}
|
|
2444
2589
|
interface CheckoutState {
|
|
2445
2590
|
/** Sponsor id whose cart is being checked out. */
|
|
@@ -2586,6 +2731,8 @@ declare class CheckoutManager extends EventTarget {
|
|
|
2586
2731
|
private set state(value);
|
|
2587
2732
|
/** The last checkout + identity written to the memory — the state is set on every keystroke of the form. */
|
|
2588
2733
|
private lastRememberedSponsor;
|
|
2734
|
+
/** Backend checkouts this page load announced with `vio:checkout-created`: one event each. */
|
|
2735
|
+
private readonly announcedCheckouts;
|
|
2589
2736
|
/** Counts `open()` calls — see CheckoutState.session. */
|
|
2590
2737
|
private sessionSeq;
|
|
2591
2738
|
private applePayAvailableCache;
|
|
@@ -2623,6 +2770,12 @@ declare class CheckoutManager extends EventTarget {
|
|
|
2623
2770
|
private paymentMethodsCache;
|
|
2624
2771
|
private paymentMethodsPromises;
|
|
2625
2772
|
constructor(cartManager: CartManager, deps?: CheckoutManagerDeps);
|
|
2773
|
+
/** The open checkout's lines as a signature, to tell a real change from an echo. */
|
|
2774
|
+
private cartSignature;
|
|
2775
|
+
/** What the open checkout's cart looked like when it was last emitted. */
|
|
2776
|
+
private lastCartSignature;
|
|
2777
|
+
/** The open checkout follows its cart: subtotal recomputed and `change` said when the lines differ. */
|
|
2778
|
+
private onCartChange;
|
|
2626
2779
|
open(sponsorId: number): CheckoutState;
|
|
2627
2780
|
close(): void;
|
|
2628
2781
|
/**
|
|
@@ -2631,8 +2784,30 @@ declare class CheckoutManager extends EventTarget {
|
|
|
2631
2784
|
* to give or it fails — attribution never costs a checkout.
|
|
2632
2785
|
*/
|
|
2633
2786
|
private attributionFor;
|
|
2634
|
-
/**
|
|
2635
|
-
|
|
2787
|
+
/**
|
|
2788
|
+
* Create the backend checkout for the sponsor's cart (auto-accepts terms);
|
|
2789
|
+
* born attributed when the facade knows the attribution. `paymentMethod` is
|
|
2790
|
+
* the method it is created to pay with, when the caller knows it (else the
|
|
2791
|
+
* state's): it goes on `vio:checkout-created`.
|
|
2792
|
+
*/
|
|
2793
|
+
createCheckout(sponsorId: number, paymentMethod?: PaymentMethod | string): Promise<any>;
|
|
2794
|
+
/**
|
|
2795
|
+
* `vio:checkout-created` on `window` — `{ sponsorId, checkoutId,
|
|
2796
|
+
* paymentMethod, campaignId?, redirect }` — the moment a backend checkout
|
|
2797
|
+
* exists for a payment, before anything is asked of the provider. Analytics
|
|
2798
|
+
* answers it with `add_payment_info` (ADR-0039: the one link from the
|
|
2799
|
+
* order Commerce confirms back to this browser's session); `redirect: true`
|
|
2800
|
+
* when the page is about to leave for the provider. Once per checkout per
|
|
2801
|
+
* page load; never throws.
|
|
2802
|
+
*/
|
|
2803
|
+
private announceCheckout;
|
|
2804
|
+
/**
|
|
2805
|
+
* Nothing is created or paid for a cart that is empty or totals 0 — as
|
|
2806
|
+
* the SERVER has it (the callers read it from the server first). Throws,
|
|
2807
|
+
* so a payment button ends in its error path, never at a provider asking
|
|
2808
|
+
* for 0 kr.
|
|
2809
|
+
*/
|
|
2810
|
+
private assertPayableCart;
|
|
2636
2811
|
/** Update the backend checkout (terms are re-asserted unless overridden; the attribution rides along unless the caller gives its own). */
|
|
2637
2812
|
updateCheckout(variables: Record<string, unknown>, sponsorId?: number): Promise<any>;
|
|
2638
2813
|
getCheckout(checkoutId: string, sponsorId?: number): Promise<any>;
|
|
@@ -2724,6 +2899,11 @@ declare class CheckoutManager extends EventTarget {
|
|
|
2724
2899
|
* so the caller can open the ordinary checkout instead. Without the flag
|
|
2725
2900
|
* the backend decides: Express while the cart has no delivery yet, a
|
|
2726
2901
|
* plain payment once the shopper chose one in our form.
|
|
2902
|
+
*
|
|
2903
|
+
* `express: false` is the checkout's standard path (2026-10-28): the
|
|
2904
|
+
* form's address — name, street, mobile — goes on the checkout before the
|
|
2905
|
+
* payment is created, and the delivery already chosen on the cart is what
|
|
2906
|
+
* Vipps charges for.
|
|
2727
2907
|
*/
|
|
2728
2908
|
startVippsPayment(sponsorId?: number, formData?: unknown, options?: {
|
|
2729
2909
|
express?: boolean;
|
|
@@ -3359,6 +3539,46 @@ declare const BUYER_REF_MAX_LENGTH = 128;
|
|
|
3359
3539
|
/** The reference when `value` is one; `undefined` for anything else (never an email). */
|
|
3360
3540
|
declare function normalizeBuyerRef(value: unknown): string | undefined;
|
|
3361
3541
|
|
|
3542
|
+
/**
|
|
3543
|
+
* Internal traffic (ADR-0041 §5): a browser of Vio's own people — Angelo,
|
|
3544
|
+
* Michael, the agents, a tester — marks itself so its visits never count.
|
|
3545
|
+
*
|
|
3546
|
+
* Opening ANY page that runs the SDK with `?vio_internal=1` marks the browser
|
|
3547
|
+
* (`localStorage`, `vio.internal.v1`); `?vio_internal=0` clears the mark.
|
|
3548
|
+
* While marked, every analytics event carries `client.internal: true` and the
|
|
3549
|
+
* collector's reads leave it out. A host can do the same from code with
|
|
3550
|
+
* `Vio.analytics.setInternal(true | false)`.
|
|
3551
|
+
*
|
|
3552
|
+
* The mark is the tester's own explicit choice, not a tracking identifier: it
|
|
3553
|
+
* is written even before consent (`requireConsent`), like a preference.
|
|
3554
|
+
*
|
|
3555
|
+
* Pure like `client-context.ts`: takes the globals it reads (defaults to the
|
|
3556
|
+
* real ones) and never throws — in-app browsers and sandboxed frames throw on
|
|
3557
|
+
* `localStorage` access, and then the page simply is not marked.
|
|
3558
|
+
*/
|
|
3559
|
+
|
|
3560
|
+
/** Where the browser remembers it is internal (per origin, across sessions). */
|
|
3561
|
+
declare const INTERNAL_KEY = "vio.internal.v1";
|
|
3562
|
+
/** The URL parameter that marks (`1`) or clears (`0`) the browser. */
|
|
3563
|
+
declare const INTERNAL_PARAM = "vio_internal";
|
|
3564
|
+
interface InternalEnvironment {
|
|
3565
|
+
location?: {
|
|
3566
|
+
search?: unknown;
|
|
3567
|
+
} | null;
|
|
3568
|
+
/** The persistent memory; `null` = none (SSR, blocked, in-app browser). */
|
|
3569
|
+
storage?: StorageLike | null;
|
|
3570
|
+
}
|
|
3571
|
+
/**
|
|
3572
|
+
* Whether this browser is internal: the URL's `vio_internal` decides (and is
|
|
3573
|
+
* remembered) when it is `1` or `0`; otherwise what is remembered. Any other
|
|
3574
|
+
* value of the parameter is ignored.
|
|
3575
|
+
*/
|
|
3576
|
+
declare function resolveInternal(env?: InternalEnvironment): boolean;
|
|
3577
|
+
/** What the browser remembers (`false` without storage). */
|
|
3578
|
+
declare function readInternal(storage?: StorageLike | null | undefined): boolean;
|
|
3579
|
+
/** Remember (or forget) the mark. Never throws. */
|
|
3580
|
+
declare function writeInternal(internal: boolean, storage?: StorageLike | null | undefined): void;
|
|
3581
|
+
|
|
3362
3582
|
/**
|
|
3363
3583
|
* SDK version reported in analytics events (`sdk_version`) and available
|
|
3364
3584
|
* to consumers. Kept as a constant (not a package.json import) so the
|
|
@@ -3366,7 +3586,7 @@ declare function normalizeBuyerRef(value: unknown): string | undefined;
|
|
|
3366
3586
|
*
|
|
3367
3587
|
* RELEASE CHECKLIST: bump together with package.json (see CONTRIBUTING).
|
|
3368
3588
|
*/
|
|
3369
|
-
declare const SDK_VERSION = "0.
|
|
3589
|
+
declare const SDK_VERSION = "0.32.0";
|
|
3370
3590
|
|
|
3371
3591
|
/**
|
|
3372
3592
|
* Vipps MobilePay's own button, the way the design guidelines ask for it.
|
|
@@ -3395,4 +3615,4 @@ declare function vippsButtonAttributes(verb?: 'buy' | 'pay' | 'express' | 'conti
|
|
|
3395
3615
|
language?: string;
|
|
3396
3616
|
}): Record<string, string>;
|
|
3397
3617
|
|
|
3398
|
-
export { ADD_ITEM_MUTATION, type AddManualOptions, type AddProductOptions, type AnalyticsCommerce, type AnalyticsContext, type AnalyticsEventName, type AnalyticsItemInput, AnalyticsManager, type AnalyticsStartOptions, type ApplePayConfig, type ApplePayResult, type Attribution, BUYER_REF_MAX_LENGTH, type BootstrapCampaign, type BootstrapCampaignEntry, type BootstrapCampaignStatus, type BootstrapResponse, type BootstrapSlot, CHECKOUT_ATTRIBUTION_CAPS, CHECKOUT_SPONSOR_STORAGE_KEY, CLIENT_LANDING_URL_MAX_LENGTH, CONTENT_URL_MAX_LENGTH, CREATE_CART_MUTATION, CREATE_CHECKOUT_MUTATION, CREATE_CHECKOUT_WITH_ATTRIBUTION_MUTATION, CREATE_PAYMENT_STRIPE_MUTATION, CREATE_PAYMENT_VIPPS_MUTATION, type CampaignHint, type CartChangeDetail, type CartLineItem, type CartLineOrigin, CartManager, type CartOrigin, type CartQueryOptions, type CartSlice, type CheckoutAddress, type CheckoutAttributionInput, type CheckoutAttributionWire, type CheckoutChangeDetail, CheckoutManager, type CheckoutManagerDeps, type CheckoutOpenDetail, type CheckoutReference, type CheckoutSponsor, type CheckoutState, type ClientContext, CommerceClient, Configuration, type ContentRef, type CreatePaymentVippsResponse, type CreatePaymentVippsVariables, DELETE_ITEM_MUTATION, type EntryContextWire, type Environment, GET_AVAILABLE_PAYMENT_METHODS_QUERY, GET_CART_QUERY, GET_CHECKOUT_QUERY, GET_LINE_ITEMS_BY_SUPPLIER_QUERY, GET_VIPPS_STATUS_QUERY, GRAPHQL_INT_MAX, type GatewayFeature, type GetVippsStatusVariables, type ImageSize, LINE_ORIGIN_CAPS, type Landing, type LineOriginWire, type LineOriginWireOptions, type ManifestLocation, type ManifestRequest, type ManifestResult, type OrderReference, type OriginPage, type PaymentCompleteDetail, type PaymentMethod, type PaymentSelectDetail, type PaymentSuccessDetail, type PaymentSuccessResult, type PlacementComponent, type Product, type ProductCategory, type ProductImage, type ProductOption, type ProductPrice, type ProductVariant, type PurchaseIds, type RegisterSlotOptions, type ResolvedConfig, SDK_VERSION, type SlotInput, type SlotKind, type Sponsor, type SponsorCartState, type SponsorCommerceBlock, type SponsorIdentity, type SurfacePrivacyMode, type SurfaceResponse, type TrackOptions, UPDATE_CHECKOUT_MUTATION, UPDATE_CHECKOUT_WITH_ATTRIBUTION_MUTATION, UPDATE_ITEM_MUTATION, UPDATE_ITEM_WITH_ORIGIN_MUTATION, UPDATE_SHIPPINGS_BY_SUPPLIER_MUTATION, VIPPS_BUTTON_SCRIPT, VIPPS_BUTTON_TAG, Vio, VioApi, VioApiError, type VioConfig, type VioItem, type VioPlatform, type VippsPaymentState, type VippsStatusResult, activeCampaignEntry, addItem, autoSlotDisplayName, autoSlotId, buyerRefOf, campaignCandidates, capContentUrl, cartSlicesFrom, checkApplePayAvailability, checkoutAttributionOf, componentKindOf, createCart, createCheckout, createCommerceClient, createPaymentStripe, createPaymentVipps, createVioApi, deleteItem, displayPrice, dominantCampaignOf, ensureVippsButton, entryContextOf, executeCartGraphQL, formatPrice, gatewayHas, getAvailablePaymentMethods, getCart, getCartGraphQLOptions, getCheckout, getCheckoutReference, getCustomerSessionId, getGlobalCurrency, getLineItemsBySupplier, getVippsStatus, isUnknownFeatureError, isUnknownTokenError, landingUrl, lineOriginWire, lineOrigins, normalizeBuyerRef, normalizeOrigin, normalizeScope, normalizeSlotKind, originAndPath, primaryImageUrl, purchaseFromPaymentSuccess, purchaseIdsOf, resetGatewayFeatures, resolveCampaignId, resolveClientContext, resolveContent, resolveLanding, resolveSlotCampaign, sameOrigin, showApplePaySheet, sponsorCampaignEntry, sponsorIdentityFrom, storedLanding, toCampaignId, updateCheckout, updateItem, updateShippingsBySupplier, vippsButtonAttributes, withGatewayFeature };
|
|
3618
|
+
export { ADD_ITEM_MUTATION, type AddManualOptions, type AddProductOptions, type AnalyticsCommerce, type AnalyticsContext, type AnalyticsEventName, type AnalyticsItemInput, AnalyticsManager, type AnalyticsStartOptions, type ApplePayConfig, type ApplePayResult, type Attribution, BUYER_REF_MAX_LENGTH, type BootstrapCampaign, type BootstrapCampaignEntry, type BootstrapCampaignStatus, type BootstrapResponse, type BootstrapSlot, CHECKOUT_ATTRIBUTION_CAPS, CHECKOUT_SPONSOR_STORAGE_KEY, CLIENT_LANDING_URL_MAX_LENGTH, CONTENT_URL_MAX_LENGTH, CREATE_CART_MUTATION, CREATE_CHECKOUT_MUTATION, CREATE_CHECKOUT_WITH_ATTRIBUTION_MUTATION, CREATE_PAYMENT_STRIPE_MUTATION, CREATE_PAYMENT_VIPPS_MUTATION, type CampaignHint, type CartChangeDetail, type CartLineItem, type CartLineOrigin, CartManager, type CartOrigin, type CartQueryOptions, type CartSlice, type CartUpdatedDetail, type CheckoutAddress, type CheckoutAttributionInput, type CheckoutAttributionWire, type CheckoutChangeDetail, CheckoutManager, type CheckoutManagerDeps, type CheckoutOpenDetail, type CheckoutReference, type CheckoutSponsor, type CheckoutState, type ClientContext, CommerceClient, Configuration, type ContentRef, type CreatePaymentVippsResponse, type CreatePaymentVippsVariables, DELETE_ITEM_MUTATION, type EntryContextWire, type Environment, GET_AVAILABLE_PAYMENT_METHODS_QUERY, GET_CART_QUERY, GET_CHECKOUT_QUERY, GET_LINE_ITEMS_BY_SUPPLIER_QUERY, GET_VIPPS_STATUS_QUERY, GRAPHQL_INT_MAX, type GatewayFeature, type GetVippsStatusVariables, INTERNAL_KEY, INTERNAL_PARAM, type ImageSize, LINE_ORIGIN_CAPS, type Landing, type LineOriginWire, type LineOriginWireOptions, type ManifestLocation, type ManifestRequest, type ManifestResult, type OrderReference, type OriginPage, type PaymentCompleteDetail, type PaymentMethod, type PaymentSelectDetail, type PaymentSuccessDetail, type PaymentSuccessResult, type PlacementComponent, type Product, type ProductCategory, type ProductImage, type ProductOption, type ProductPrice, type ProductVariant, type PurchaseIds, type RegisterSlotOptions, type ResolvedConfig, SDK_VERSION, type SlotInput, type SlotKind, type Sponsor, type SponsorCartState, type SponsorCommerceBlock, type SponsorIdentity, type SurfacePrivacyMode, type SurfaceResponse, type TrackOptions, UPDATE_CHECKOUT_MUTATION, UPDATE_CHECKOUT_WITH_ATTRIBUTION_MUTATION, UPDATE_ITEM_MUTATION, UPDATE_ITEM_WITH_ORIGIN_MUTATION, UPDATE_SHIPPINGS_BY_SUPPLIER_MUTATION, VIPPS_BUTTON_SCRIPT, VIPPS_BUTTON_TAG, Vio, VioApi, VioApiError, type VioConfig, type VioItem, type VioPlatform, type VippsPaymentState, type VippsStatusResult, activeCampaignEntry, addItem, autoSlotDisplayName, autoSlotId, buyerRefOf, campaignCandidates, capContentUrl, cartSlicesFrom, checkApplePayAvailability, checkoutAttributionOf, componentKindOf, createCart, createCheckout, createCommerceClient, createPaymentStripe, createPaymentVipps, createVioApi, deleteItem, displayPrice, dominantCampaignOf, ensureVippsButton, entryContextOf, executeCartGraphQL, formatPrice, gatewayHas, getAvailablePaymentMethods, getCart, getCartGraphQLOptions, getCheckout, getCheckoutReference, getCustomerSessionId, getGlobalCurrency, getLineItemsBySupplier, getVippsStatus, isUnknownFeatureError, isUnknownTokenError, landingUrl, lineOriginWire, lineOrigins, normalizeBuyerRef, normalizeOrigin, normalizeScope, normalizeSlotKind, originAndPath, primaryImageUrl, purchaseFromPaymentSuccess, purchaseIdsOf, readInternal, resetGatewayFeatures, resolveCampaignId, resolveClientContext, resolveContent, resolveInternal, resolveLanding, resolveSlotCampaign, sameOrigin, showApplePaySheet, sponsorCampaignEntry, sponsorIdentityFrom, storedLanding, toCampaignId, updateCheckout, updateItem, updateShippingsBySupplier, vippsButtonAttributes, withGatewayFeature, writeInternal };
|
package/dist/core/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '../chunk-
|
|
2
|
-
export { ADD_ITEM_MUTATION, AnalyticsManager, BUYER_REF_MAX_LENGTH, CHECKOUT_ATTRIBUTION_CAPS, CHECKOUT_SPONSOR_STORAGE_KEY, CLIENT_LANDING_URL_MAX_LENGTH, CONTENT_URL_MAX_LENGTH, CREATE_CART_MUTATION, CREATE_CHECKOUT_MUTATION, CREATE_CHECKOUT_WITH_ATTRIBUTION_MUTATION, CREATE_PAYMENT_STRIPE_MUTATION, CREATE_PAYMENT_VIPPS_MUTATION, CartManager, CheckoutManager, CommerceClient, Configuration, DELETE_ITEM_MUTATION, GET_AVAILABLE_PAYMENT_METHODS_QUERY, GET_CART_QUERY, GET_CHECKOUT_QUERY, GET_LINE_ITEMS_BY_SUPPLIER_QUERY, GET_VIPPS_STATUS_QUERY, GRAPHQL_INT_MAX, LINE_ORIGIN_CAPS, SDK_VERSION, UPDATE_CHECKOUT_MUTATION, UPDATE_CHECKOUT_WITH_ATTRIBUTION_MUTATION, UPDATE_ITEM_MUTATION, UPDATE_ITEM_WITH_ORIGIN_MUTATION, UPDATE_SHIPPINGS_BY_SUPPLIER_MUTATION, VIPPS_BUTTON_SCRIPT, VIPPS_BUTTON_TAG, Vio, VioApi, VioApiError, activeCampaignEntry, addItem, autoSlotDisplayName, autoSlotId, buyerRefOf, campaignCandidates, capContentUrl, cartSlicesFrom, checkApplePayAvailability, checkoutAttributionOf, componentKindOf, createCart, createCheckout, createCommerceClient, createPaymentStripe, createPaymentVipps, createVioApi, deleteItem, displayPrice, dominantCampaignOf, ensureVippsButton, entryContextOf, executeCartGraphQL, formatPrice, gatewayHas, getAvailablePaymentMethods, getCart, getCartGraphQLOptions, getCheckout, getCheckoutReference, getCustomerSessionId, getGlobalCurrency, getLineItemsBySupplier, getVippsStatus, isUnknownFeatureError, isUnknownTokenError, landingUrl, lineOriginWire, lineOrigins, normalizeBuyerRef, normalizeOrigin, normalizeScope, normalizeSlotKind, originAndPath, primaryImageUrl, purchaseFromPaymentSuccess, purchaseIdsOf, resetGatewayFeatures, resolveCampaignId, resolveClientContext, resolveContent, resolveLanding, resolveSlotCampaign, sameOrigin, showApplePaySheet, sponsorCampaignEntry, sponsorIdentityFrom, storedLanding, toCampaignId, updateCheckout, updateItem, updateShippingsBySupplier, vippsButtonAttributes, withGatewayFeature } from '../chunk-
|
|
1
|
+
import '../chunk-QGJUBVH3.js';
|
|
2
|
+
export { ADD_ITEM_MUTATION, AnalyticsManager, BUYER_REF_MAX_LENGTH, CHECKOUT_ATTRIBUTION_CAPS, CHECKOUT_SPONSOR_STORAGE_KEY, CLIENT_LANDING_URL_MAX_LENGTH, CONTENT_URL_MAX_LENGTH, CREATE_CART_MUTATION, CREATE_CHECKOUT_MUTATION, CREATE_CHECKOUT_WITH_ATTRIBUTION_MUTATION, CREATE_PAYMENT_STRIPE_MUTATION, CREATE_PAYMENT_VIPPS_MUTATION, CartManager, CheckoutManager, CommerceClient, Configuration, DELETE_ITEM_MUTATION, GET_AVAILABLE_PAYMENT_METHODS_QUERY, GET_CART_QUERY, GET_CHECKOUT_QUERY, GET_LINE_ITEMS_BY_SUPPLIER_QUERY, GET_VIPPS_STATUS_QUERY, GRAPHQL_INT_MAX, INTERNAL_KEY, INTERNAL_PARAM, LINE_ORIGIN_CAPS, SDK_VERSION, UPDATE_CHECKOUT_MUTATION, UPDATE_CHECKOUT_WITH_ATTRIBUTION_MUTATION, UPDATE_ITEM_MUTATION, UPDATE_ITEM_WITH_ORIGIN_MUTATION, UPDATE_SHIPPINGS_BY_SUPPLIER_MUTATION, VIPPS_BUTTON_SCRIPT, VIPPS_BUTTON_TAG, Vio, VioApi, VioApiError, activeCampaignEntry, addItem, autoSlotDisplayName, autoSlotId, buyerRefOf, campaignCandidates, capContentUrl, cartSlicesFrom, checkApplePayAvailability, checkoutAttributionOf, componentKindOf, createCart, createCheckout, createCommerceClient, createPaymentStripe, createPaymentVipps, createVioApi, deleteItem, displayPrice, dominantCampaignOf, ensureVippsButton, entryContextOf, executeCartGraphQL, formatPrice, gatewayHas, getAvailablePaymentMethods, getCart, getCartGraphQLOptions, getCheckout, getCheckoutReference, getCustomerSessionId, getGlobalCurrency, getLineItemsBySupplier, getVippsStatus, isUnknownFeatureError, isUnknownTokenError, landingUrl, lineOriginWire, lineOrigins, normalizeBuyerRef, normalizeOrigin, normalizeScope, normalizeSlotKind, originAndPath, primaryImageUrl, purchaseFromPaymentSuccess, purchaseIdsOf, readInternal, resetGatewayFeatures, resolveCampaignId, resolveClientContext, resolveContent, resolveInternal, resolveLanding, resolveSlotCampaign, sameOrigin, showApplePaySheet, sponsorCampaignEntry, sponsorIdentityFrom, storedLanding, toCampaignId, updateCheckout, updateItem, updateShippingsBySupplier, vippsButtonAttributes, withGatewayFeature, writeInternal } from '../chunk-IR4XYTZL.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { ADD_ITEM_MUTATION, AddManualOptions, AddProductOptions, AnalyticsCommerce, AnalyticsContext, AnalyticsEventName, AnalyticsItemInput, AnalyticsManager, AnalyticsStartOptions, ApplePayConfig, ApplePayResult, Attribution, BUYER_REF_MAX_LENGTH, BootstrapCampaign, BootstrapCampaignEntry, BootstrapCampaignStatus, BootstrapResponse, BootstrapSlot, CHECKOUT_ATTRIBUTION_CAPS, CHECKOUT_SPONSOR_STORAGE_KEY, CLIENT_LANDING_URL_MAX_LENGTH, CONTENT_URL_MAX_LENGTH, CREATE_CART_MUTATION, CREATE_CHECKOUT_MUTATION, CREATE_CHECKOUT_WITH_ATTRIBUTION_MUTATION, CREATE_PAYMENT_STRIPE_MUTATION, CREATE_PAYMENT_VIPPS_MUTATION, CampaignHint, CartChangeDetail, CartLineItem, CartLineOrigin, CartManager, CartOrigin, CartQueryOptions, CartSlice, CheckoutAddress, CheckoutAttributionInput, CheckoutAttributionWire, CheckoutChangeDetail, CheckoutManager, CheckoutManagerDeps, CheckoutOpenDetail, CheckoutReference, CheckoutSponsor, CheckoutState, ClientContext, CommerceClient, Configuration, ContentRef, CreatePaymentVippsResponse, CreatePaymentVippsVariables, DELETE_ITEM_MUTATION, EntryContextWire, Environment, GET_AVAILABLE_PAYMENT_METHODS_QUERY, GET_CART_QUERY, GET_CHECKOUT_QUERY, GET_LINE_ITEMS_BY_SUPPLIER_QUERY, GET_VIPPS_STATUS_QUERY, GRAPHQL_INT_MAX, GatewayFeature, GetVippsStatusVariables, ImageSize, LINE_ORIGIN_CAPS, Landing, LineOriginWire, LineOriginWireOptions, ManifestLocation, ManifestRequest, ManifestResult, OrderReference, OriginPage, PaymentCompleteDetail, PaymentMethod, PaymentSelectDetail, PaymentSuccessDetail, PaymentSuccessResult, PlacementComponent, Product, ProductCategory, ProductImage, ProductOption, ProductPrice, ProductVariant, PurchaseIds, RegisterSlotOptions, ResolvedConfig, SDK_VERSION, SlotInput, SlotKind, Sponsor, SponsorCartState, SponsorCommerceBlock, SponsorIdentity, SurfacePrivacyMode, SurfaceResponse, TrackOptions, UPDATE_CHECKOUT_MUTATION, UPDATE_CHECKOUT_WITH_ATTRIBUTION_MUTATION, UPDATE_ITEM_MUTATION, UPDATE_ITEM_WITH_ORIGIN_MUTATION, UPDATE_SHIPPINGS_BY_SUPPLIER_MUTATION, VIPPS_BUTTON_SCRIPT, VIPPS_BUTTON_TAG, Vio, VioApi, VioApiError, VioConfig, VioItem, VioPlatform, VippsPaymentState, VippsStatusResult, activeCampaignEntry, addItem, autoSlotDisplayName, autoSlotId, buyerRefOf, campaignCandidates, capContentUrl, cartSlicesFrom, checkApplePayAvailability, checkoutAttributionOf, componentKindOf, createCart, createCheckout, createCommerceClient, createPaymentStripe, createPaymentVipps, createVioApi, deleteItem, displayPrice, dominantCampaignOf, ensureVippsButton, entryContextOf, executeCartGraphQL, formatPrice, gatewayHas, getAvailablePaymentMethods, getCart, getCartGraphQLOptions, getCheckout, getCheckoutReference, getCustomerSessionId, getGlobalCurrency, getLineItemsBySupplier, getVippsStatus, isUnknownFeatureError, isUnknownTokenError, landingUrl, lineOriginWire, lineOrigins, normalizeBuyerRef, normalizeOrigin, normalizeScope, normalizeSlotKind, originAndPath, primaryImageUrl, purchaseFromPaymentSuccess, purchaseIdsOf, resetGatewayFeatures, resolveCampaignId, resolveClientContext, resolveContent, resolveLanding, resolveSlotCampaign, sameOrigin, showApplePaySheet, sponsorCampaignEntry, sponsorIdentityFrom, storedLanding, toCampaignId, updateCheckout, updateItem, updateShippingsBySupplier, vippsButtonAttributes, withGatewayFeature } from './core/index.js';
|
|
1
|
+
export { ADD_ITEM_MUTATION, AddManualOptions, AddProductOptions, AnalyticsCommerce, AnalyticsContext, AnalyticsEventName, AnalyticsItemInput, AnalyticsManager, AnalyticsStartOptions, ApplePayConfig, ApplePayResult, Attribution, BUYER_REF_MAX_LENGTH, BootstrapCampaign, BootstrapCampaignEntry, BootstrapCampaignStatus, BootstrapResponse, BootstrapSlot, CHECKOUT_ATTRIBUTION_CAPS, CHECKOUT_SPONSOR_STORAGE_KEY, CLIENT_LANDING_URL_MAX_LENGTH, CONTENT_URL_MAX_LENGTH, CREATE_CART_MUTATION, CREATE_CHECKOUT_MUTATION, CREATE_CHECKOUT_WITH_ATTRIBUTION_MUTATION, CREATE_PAYMENT_STRIPE_MUTATION, CREATE_PAYMENT_VIPPS_MUTATION, CampaignHint, CartChangeDetail, CartLineItem, CartLineOrigin, CartManager, CartOrigin, CartQueryOptions, CartSlice, CartUpdatedDetail, CheckoutAddress, CheckoutAttributionInput, CheckoutAttributionWire, CheckoutChangeDetail, CheckoutManager, CheckoutManagerDeps, CheckoutOpenDetail, CheckoutReference, CheckoutSponsor, CheckoutState, ClientContext, CommerceClient, Configuration, ContentRef, CreatePaymentVippsResponse, CreatePaymentVippsVariables, DELETE_ITEM_MUTATION, EntryContextWire, Environment, GET_AVAILABLE_PAYMENT_METHODS_QUERY, GET_CART_QUERY, GET_CHECKOUT_QUERY, GET_LINE_ITEMS_BY_SUPPLIER_QUERY, GET_VIPPS_STATUS_QUERY, GRAPHQL_INT_MAX, GatewayFeature, GetVippsStatusVariables, INTERNAL_KEY, INTERNAL_PARAM, ImageSize, LINE_ORIGIN_CAPS, Landing, LineOriginWire, LineOriginWireOptions, ManifestLocation, ManifestRequest, ManifestResult, OrderReference, OriginPage, PaymentCompleteDetail, PaymentMethod, PaymentSelectDetail, PaymentSuccessDetail, PaymentSuccessResult, PlacementComponent, Product, ProductCategory, ProductImage, ProductOption, ProductPrice, ProductVariant, PurchaseIds, RegisterSlotOptions, ResolvedConfig, SDK_VERSION, SlotInput, SlotKind, Sponsor, SponsorCartState, SponsorCommerceBlock, SponsorIdentity, SurfacePrivacyMode, SurfaceResponse, TrackOptions, UPDATE_CHECKOUT_MUTATION, UPDATE_CHECKOUT_WITH_ATTRIBUTION_MUTATION, UPDATE_ITEM_MUTATION, UPDATE_ITEM_WITH_ORIGIN_MUTATION, UPDATE_SHIPPINGS_BY_SUPPLIER_MUTATION, VIPPS_BUTTON_SCRIPT, VIPPS_BUTTON_TAG, Vio, VioApi, VioApiError, VioConfig, VioItem, VioPlatform, VippsPaymentState, VippsStatusResult, activeCampaignEntry, addItem, autoSlotDisplayName, autoSlotId, buyerRefOf, campaignCandidates, capContentUrl, cartSlicesFrom, checkApplePayAvailability, checkoutAttributionOf, componentKindOf, createCart, createCheckout, createCommerceClient, createPaymentStripe, createPaymentVipps, createVioApi, deleteItem, displayPrice, dominantCampaignOf, ensureVippsButton, entryContextOf, executeCartGraphQL, formatPrice, gatewayHas, getAvailablePaymentMethods, getCart, getCartGraphQLOptions, getCheckout, getCheckoutReference, getCustomerSessionId, getGlobalCurrency, getLineItemsBySupplier, getVippsStatus, isUnknownFeatureError, isUnknownTokenError, landingUrl, lineOriginWire, lineOrigins, normalizeBuyerRef, normalizeOrigin, normalizeScope, normalizeSlotKind, originAndPath, primaryImageUrl, purchaseFromPaymentSuccess, purchaseIdsOf, readInternal, resetGatewayFeatures, resolveCampaignId, resolveClientContext, resolveContent, resolveInternal, resolveLanding, resolveSlotCampaign, sameOrigin, showApplePaySheet, sponsorCampaignEntry, sponsorIdentityFrom, storedLanding, toCampaignId, updateCheckout, updateItem, updateShippingsBySupplier, vippsButtonAttributes, withGatewayFeature, writeInternal } from './core/index.js';
|
|
2
2
|
import 'graphql-request';
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import './chunk-
|
|
2
|
-
export { ADD_ITEM_MUTATION, AnalyticsManager, BUYER_REF_MAX_LENGTH, CHECKOUT_ATTRIBUTION_CAPS, CHECKOUT_SPONSOR_STORAGE_KEY, CLIENT_LANDING_URL_MAX_LENGTH, CONTENT_URL_MAX_LENGTH, CREATE_CART_MUTATION, CREATE_CHECKOUT_MUTATION, CREATE_CHECKOUT_WITH_ATTRIBUTION_MUTATION, CREATE_PAYMENT_STRIPE_MUTATION, CREATE_PAYMENT_VIPPS_MUTATION, CartManager, CheckoutManager, CommerceClient, Configuration, DELETE_ITEM_MUTATION, GET_AVAILABLE_PAYMENT_METHODS_QUERY, GET_CART_QUERY, GET_CHECKOUT_QUERY, GET_LINE_ITEMS_BY_SUPPLIER_QUERY, GET_VIPPS_STATUS_QUERY, GRAPHQL_INT_MAX, LINE_ORIGIN_CAPS, SDK_VERSION, UPDATE_CHECKOUT_MUTATION, UPDATE_CHECKOUT_WITH_ATTRIBUTION_MUTATION, UPDATE_ITEM_MUTATION, UPDATE_ITEM_WITH_ORIGIN_MUTATION, UPDATE_SHIPPINGS_BY_SUPPLIER_MUTATION, VIPPS_BUTTON_SCRIPT, VIPPS_BUTTON_TAG, Vio, VioApi, VioApiError, activeCampaignEntry, addItem, autoSlotDisplayName, autoSlotId, buyerRefOf, campaignCandidates, capContentUrl, cartSlicesFrom, checkApplePayAvailability, checkoutAttributionOf, componentKindOf, createCart, createCheckout, createCommerceClient, createPaymentStripe, createPaymentVipps, createVioApi, deleteItem, displayPrice, dominantCampaignOf, ensureVippsButton, entryContextOf, executeCartGraphQL, formatPrice, gatewayHas, getAvailablePaymentMethods, getCart, getCartGraphQLOptions, getCheckout, getCheckoutReference, getCustomerSessionId, getGlobalCurrency, getLineItemsBySupplier, getVippsStatus, isUnknownFeatureError, isUnknownTokenError, landingUrl, lineOriginWire, lineOrigins, normalizeBuyerRef, normalizeOrigin, normalizeScope, normalizeSlotKind, originAndPath, primaryImageUrl, purchaseFromPaymentSuccess, purchaseIdsOf, resetGatewayFeatures, resolveCampaignId, resolveClientContext, resolveContent, resolveLanding, resolveSlotCampaign, sameOrigin, showApplePaySheet, sponsorCampaignEntry, sponsorIdentityFrom, storedLanding, toCampaignId, updateCheckout, updateItem, updateShippingsBySupplier, vippsButtonAttributes, withGatewayFeature } from './chunk-
|
|
1
|
+
import './chunk-QGJUBVH3.js';
|
|
2
|
+
export { ADD_ITEM_MUTATION, AnalyticsManager, BUYER_REF_MAX_LENGTH, CHECKOUT_ATTRIBUTION_CAPS, CHECKOUT_SPONSOR_STORAGE_KEY, CLIENT_LANDING_URL_MAX_LENGTH, CONTENT_URL_MAX_LENGTH, CREATE_CART_MUTATION, CREATE_CHECKOUT_MUTATION, CREATE_CHECKOUT_WITH_ATTRIBUTION_MUTATION, CREATE_PAYMENT_STRIPE_MUTATION, CREATE_PAYMENT_VIPPS_MUTATION, CartManager, CheckoutManager, CommerceClient, Configuration, DELETE_ITEM_MUTATION, GET_AVAILABLE_PAYMENT_METHODS_QUERY, GET_CART_QUERY, GET_CHECKOUT_QUERY, GET_LINE_ITEMS_BY_SUPPLIER_QUERY, GET_VIPPS_STATUS_QUERY, GRAPHQL_INT_MAX, INTERNAL_KEY, INTERNAL_PARAM, LINE_ORIGIN_CAPS, SDK_VERSION, UPDATE_CHECKOUT_MUTATION, UPDATE_CHECKOUT_WITH_ATTRIBUTION_MUTATION, UPDATE_ITEM_MUTATION, UPDATE_ITEM_WITH_ORIGIN_MUTATION, UPDATE_SHIPPINGS_BY_SUPPLIER_MUTATION, VIPPS_BUTTON_SCRIPT, VIPPS_BUTTON_TAG, Vio, VioApi, VioApiError, activeCampaignEntry, addItem, autoSlotDisplayName, autoSlotId, buyerRefOf, campaignCandidates, capContentUrl, cartSlicesFrom, checkApplePayAvailability, checkoutAttributionOf, componentKindOf, createCart, createCheckout, createCommerceClient, createPaymentStripe, createPaymentVipps, createVioApi, deleteItem, displayPrice, dominantCampaignOf, ensureVippsButton, entryContextOf, executeCartGraphQL, formatPrice, gatewayHas, getAvailablePaymentMethods, getCart, getCartGraphQLOptions, getCheckout, getCheckoutReference, getCustomerSessionId, getGlobalCurrency, getLineItemsBySupplier, getVippsStatus, isUnknownFeatureError, isUnknownTokenError, landingUrl, lineOriginWire, lineOrigins, normalizeBuyerRef, normalizeOrigin, normalizeScope, normalizeSlotKind, originAndPath, primaryImageUrl, purchaseFromPaymentSuccess, purchaseIdsOf, readInternal, resetGatewayFeatures, resolveCampaignId, resolveClientContext, resolveContent, resolveInternal, resolveLanding, resolveSlotCampaign, sameOrigin, showApplePaySheet, sponsorCampaignEntry, sponsorIdentityFrom, storedLanding, toCampaignId, updateCheckout, updateItem, updateShippingsBySupplier, vippsButtonAttributes, withGatewayFeature, writeInternal } from './chunk-IR4XYTZL.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
package/dist/react/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _lit_react from '@lit/react';
|
|
2
|
-
import { V as VioCart$1, a as VioCheckout$1, b as VioProduct$1, c as VioProductCarousel$1, d as VioProductDetail$1 } from '../tokens-
|
|
3
|
-
export { e as VioThemeOverrides, f as VioTokens, g as applyVioTheme } from '../tokens-
|
|
2
|
+
import { V as VioCart$1, a as VioCheckout$1, b as VioProduct$1, c as VioProductCarousel$1, d as VioProductDetail$1 } from '../tokens-D1DCVzOf.js';
|
|
3
|
+
export { e as VioThemeOverrides, f as VioTokens, g as applyVioTheme } from '../tokens-D1DCVzOf.js';
|
|
4
4
|
import 'lit-html';
|
|
5
5
|
import 'lit';
|
|
6
6
|
|
package/dist/react/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { registerVioElements, VioProduct, VioProductCarousel, VioProductDetail, VioCart, VioCheckout } from '../chunk-
|
|
2
|
-
export { VioTokens, applyVioTheme } from '../chunk-
|
|
3
|
-
import '../chunk-
|
|
1
|
+
import { registerVioElements, VioProduct, VioProductCarousel, VioProductDetail, VioCart, VioCheckout } from '../chunk-C5Q6W4B2.js';
|
|
2
|
+
export { VioTokens, applyVioTheme } from '../chunk-C5Q6W4B2.js';
|
|
3
|
+
import '../chunk-IR4XYTZL.js';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
|
|
6
6
|
// node_modules/@lit/react/node/create-component.js
|