@developer.notchatbot/webchat 2.0.0 → 2.1.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.
@@ -0,0 +1,12 @@
1
+ export interface ShopifyAttributionReference {
2
+ conversationId: string;
3
+ expiresAt: number;
4
+ }
5
+ /** Cart API bridge. Only runs network work after engagement or for cleanup of our saved reference. */
6
+ export declare function observeShopifyAttribution(doc: Document, readReference: () => ShopifyAttributionReference | null, storage: {
7
+ read(): string | null;
8
+ write(value: string): void;
9
+ }, request?: typeof fetch): {
10
+ refresh: () => Promise<void>;
11
+ dispose: () => void;
12
+ };
@@ -0,0 +1,8 @@
1
+ export interface AttributionReference {
2
+ token: string;
3
+ expiresAt: number;
4
+ }
5
+ /** Attach only to same-origin Tiendanube purchase forms; unrelated forms remain untouched. */
6
+ export declare function attachTiendanubeAttribution(doc: Document, token: string): number;
7
+ /** Owns field lifecycle across cart rendering; never intercepts payment or blocks navigation. */
8
+ export declare function observeTiendanubeAttribution(doc: Document, reference: AttributionReference, storeId: string, readPlatform: () => unknown, onRetired?: () => void): () => void;
@@ -0,0 +1,13 @@
1
+ interface Reference {
2
+ conversationId: string;
3
+ expiresAt: number;
4
+ }
5
+ /** Uses the store's existing vtexjs checkout transport. Configure its shared queue at integration time. */
6
+ export declare function observeVtexAttribution(doc: Document, readReference: () => Reference | null, storage: {
7
+ read(): string | null;
8
+ write(value: string): void;
9
+ }): {
10
+ refresh: () => Promise<void>;
11
+ dispose: () => void;
12
+ };
13
+ export {};