@beworke/pixel 0.1.0-rc.7 → 0.1.0-rc.9

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.
Files changed (150) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/README.md +71 -56
  3. package/RELEASE_CANDIDATE.md +28 -62
  4. package/dist/Pixel-BnN86r4X.d.ts +797 -0
  5. package/dist/Pixel-BoUGqCbP.d.mts +797 -0
  6. package/dist/{StorageFactory-DeMaZ8wk.d.ts → StorageFactory-BfCArzMM.d.ts} +1 -1
  7. package/dist/{StorageFactory-Cq29vF32.d.mts → StorageFactory-C0prtNR7.d.mts} +1 -1
  8. package/dist/browser/index.cjs.js +3 -0
  9. package/dist/browser/index.cjs.js.map +1 -0
  10. package/dist/browser/index.d.mts +55 -0
  11. package/dist/browser/index.d.ts +55 -0
  12. package/dist/browser/index.esm.js +3 -0
  13. package/dist/browser/index.esm.js.map +1 -0
  14. package/dist/browser/pixel.global.js +4 -0
  15. package/dist/browser/pixel.global.js.map +1 -0
  16. package/dist/config/index.cjs.js +1 -1
  17. package/dist/config/index.cjs.js.map +1 -1
  18. package/dist/config/index.d.mts +15 -5
  19. package/dist/config/index.d.ts +15 -5
  20. package/dist/config/index.esm.js +1 -1
  21. package/dist/config/index.esm.js.map +1 -1
  22. package/dist/examples/html-script/RELEASE_CANDIDATE.md +6 -8
  23. package/dist/examples/html-script/add-payment-info/example-add-payment-info-card-autocomplete.html +40 -47
  24. package/dist/examples/html-script/add-payment-info/example-add-payment-info-card-disabled.html +40 -47
  25. package/dist/examples/html-script/add-payment-info/example-add-payment-info-card-fields.html +40 -47
  26. package/dist/examples/html-script/add-payment-info/example-add-payment-info-data-track.html +40 -47
  27. package/dist/examples/html-script/add-payment-info/example-add-payment-info-dedupe.html +40 -47
  28. package/dist/examples/html-script/add-payment-info/example-add-payment-info-manual.html +40 -47
  29. package/dist/examples/html-script/add-payment-info/example-add-payment-info-rules-card.html +40 -47
  30. package/dist/examples/html-script/add-payment-info/example-add-payment-info-security.html +40 -47
  31. package/dist/examples/html-script/add-to-cart/example-add-to-cart-attribute.html +40 -47
  32. package/dist/examples/html-script/add-to-cart/example-add-to-cart-auto.html +40 -47
  33. package/dist/examples/html-script/add-to-cart/example-add-to-cart-click.html +40 -47
  34. package/dist/examples/html-script/add-to-cart/example-add-to-cart-dedupe.html +40 -47
  35. package/dist/examples/html-script/add-to-cart/example-add-to-cart-link.html +40 -47
  36. package/dist/examples/html-script/add-to-cart/example-add-to-cart-manual.html +40 -47
  37. package/dist/examples/html-script/add-to-cart/example-add-to-cart-order-bump.html +40 -47
  38. package/dist/examples/html-script/add-to-cart/example-add-to-cart-text.html +40 -47
  39. package/dist/examples/html-script/behavior/example-behavior-engagement.html +4 -4
  40. package/dist/examples/html-script/behavior/example-behavior-heartbeat.html +4 -4
  41. package/dist/examples/html-script/behavior/example-behavior-runtime-intelligence.html +4 -4
  42. package/dist/examples/html-script/behavior/example-behavior-viewport.html +4 -4
  43. package/dist/examples/html-script/buygoods/example-buygoods-checkout.html +156 -0
  44. package/dist/examples/html-script/example-checkout-commerce.html +31 -30
  45. package/dist/examples/html-script/example-conversion.html +41 -48
  46. package/dist/examples/html-script/example-global-factory-classic.html +45 -0
  47. package/dist/examples/html-script/example-global-factory.html +40 -0
  48. package/dist/examples/html-script/example-integration.html +39 -45
  49. package/dist/examples/html-script/example-landing-commerce.html +3 -8
  50. package/dist/examples/html-script/example-runtime-diagnostics.html +4 -4
  51. package/dist/examples/html-script/example-transport.html +59 -57
  52. package/dist/examples/html-script/full-funnel/checkout.html +3 -1
  53. package/dist/examples/html-script/full-funnel/downsell.html +3 -1
  54. package/dist/examples/html-script/full-funnel/landing.html +3 -1
  55. package/dist/examples/html-script/full-funnel/thank-you.html +3 -1
  56. package/dist/examples/html-script/full-funnel/upsell.html +3 -1
  57. package/dist/examples/html-script/initiate-checkout/example-initiate-checkout-attribute.html +40 -47
  58. package/dist/examples/html-script/initiate-checkout/example-initiate-checkout-auto.html +40 -47
  59. package/dist/examples/html-script/initiate-checkout/example-initiate-checkout-click.html +40 -47
  60. package/dist/examples/html-script/initiate-checkout/example-initiate-checkout-manual.html +40 -47
  61. package/dist/examples/html-script/initiate-checkout/example-initiate-checkout-snapshot.html +40 -47
  62. package/dist/examples/html-script/initiate-checkout/example-initiate-checkout-submit.html +40 -47
  63. package/dist/examples/html-script/initiate-checkout/example-initiate-checkout-text.html +40 -47
  64. package/dist/examples/html-script/lead/example-lead-trigger-attribute.html +40 -47
  65. package/dist/examples/html-script/lead/example-lead-trigger-auto.html +40 -47
  66. package/dist/examples/html-script/lead/example-lead-trigger-click.html +40 -47
  67. package/dist/examples/html-script/release-candidate.html +31 -30
  68. package/dist/examples/html-script/remove-from-cart/README.md +3 -3
  69. package/dist/examples/html-script/remove-from-cart/example-remove-from-cart-attribute.html +40 -47
  70. package/dist/examples/html-script/remove-from-cart/example-remove-from-cart-css.html +40 -47
  71. package/dist/examples/html-script/remove-from-cart/example-remove-from-cart-dedupe.html +47 -54
  72. package/dist/examples/html-script/remove-from-cart/example-remove-from-cart-manual.html +40 -47
  73. package/dist/examples/html-script/remove-from-cart/example-remove-from-cart-multi.html +40 -47
  74. package/dist/examples/html-script/remove-from-cart/example-remove-from-cart-state.html +40 -47
  75. package/dist/examples/html-script/remove-from-cart/example-remove-from-cart-text.html +40 -47
  76. package/dist/examples/html-script/search/example-search-attribute.html +40 -47
  77. package/dist/examples/html-script/search/example-search-button-sync.html +40 -47
  78. package/dist/examples/html-script/search/example-search-dedupe.html +40 -47
  79. package/dist/examples/html-script/search/example-search-input.html +40 -47
  80. package/dist/examples/html-script/search/example-search-manual.html +40 -47
  81. package/dist/examples/html-script/search/example-search-submit.html +40 -47
  82. package/dist/examples/html-script/search/example-search-text.html +40 -47
  83. package/dist/examples/html-script/url-context/example-url-context-allowed-domains.html +4 -4
  84. package/dist/examples/html-script/url-context/example-url-context-landing.html +4 -4
  85. package/dist/examples/html-script/url-context/example-url-context-upsell.html +4 -4
  86. package/dist/examples/html-script/url-context/example-url-context.html +4 -4
  87. package/dist/examples/html-script/view-content/example-view-content-attribute.html +40 -47
  88. package/dist/examples/html-script/view-content/example-view-content-css.html +40 -47
  89. package/dist/examples/html-script/view-content/example-view-content-dedupe.html +40 -47
  90. package/dist/examples/html-script/view-content/example-view-content-empty.html +40 -47
  91. package/dist/examples/html-script/view-content/example-view-content-manual.html +40 -47
  92. package/dist/examples/html-script/view-content/example-view-content-product-card.html +40 -47
  93. package/dist/examples/html-script/view-content/example-view-content-text.html +40 -47
  94. package/dist/index.cjs.js +1 -1
  95. package/dist/index.cjs.js.map +1 -1
  96. package/dist/index.d.mts +8 -6
  97. package/dist/index.d.ts +8 -6
  98. package/dist/index.esm.js +1 -1
  99. package/dist/index.esm.js.map +1 -1
  100. package/dist/{pixel-2uL4LSyC.d.ts → pixel-DNGbAN5C.d.ts} +117 -98
  101. package/dist/{pixel-DMwpppf_.d.mts → pixel-_BSDpx4M.d.mts} +117 -98
  102. package/dist/pixel-default-config-BMYaqs7i.d.ts +21 -0
  103. package/dist/pixel-default-config-DLRya1tl.d.mts +21 -0
  104. package/dist/pixel-settings-D-t9zQb4.d.ts +40 -0
  105. package/dist/pixel-settings-DGxl0MVm.d.mts +40 -0
  106. package/dist/runtime/index.cjs.js +1 -1
  107. package/dist/runtime/index.cjs.js.map +1 -1
  108. package/dist/runtime/index.d.mts +4 -4
  109. package/dist/runtime/index.d.ts +4 -4
  110. package/dist/runtime/index.esm.js +1 -1
  111. package/dist/runtime/index.esm.js.map +1 -1
  112. package/dist/services/index.cjs.js +1 -1
  113. package/dist/services/index.cjs.js.map +1 -1
  114. package/dist/services/index.d.mts +4 -4
  115. package/dist/services/index.d.ts +4 -4
  116. package/dist/services/index.esm.js +1 -1
  117. package/dist/services/index.esm.js.map +1 -1
  118. package/dist/{types-6HF3UlsL.d.mts → types-B-Nzagpk.d.mts} +2 -2
  119. package/dist/{types-CgrabttM.d.mts → types-D0KVsgzs.d.mts} +1 -1
  120. package/dist/{types-fFcQ1apy.d.ts → types-D3kJ9bfT.d.ts} +1 -1
  121. package/dist/{types-BqUEoZo0.d.ts → types-Dfi9C49l.d.ts} +2 -2
  122. package/dist/v2/global.global.js +1 -1
  123. package/dist/v2/global.global.js.map +1 -1
  124. package/dist/v2/index.cjs.js +1 -1
  125. package/dist/v2/index.cjs.js.map +1 -1
  126. package/dist/v2/index.d.mts +21 -787
  127. package/dist/v2/index.d.ts +21 -787
  128. package/dist/v2/index.esm.js +1 -1
  129. package/dist/v2/index.esm.js.map +1 -1
  130. package/docs/public/README.md +7 -4
  131. package/docs/public/api/exports.md +12 -8
  132. package/docs/public/api/pixel.md +27 -6
  133. package/docs/public/configuration/commerce.md +2 -2
  134. package/docs/public/configuration/modules.md +11 -14
  135. package/docs/public/configuration/overview.md +45 -26
  136. package/docs/public/configuration/transport.md +127 -0
  137. package/docs/public/events/catalog.md +3 -1
  138. package/docs/public/getting-started/installation.md +14 -12
  139. package/docs/public/getting-started/quick-start.md +95 -30
  140. package/docs/public/getting-started/react-nextjs.md +57 -34
  141. package/docs/public/getting-started/script-tag.md +55 -32
  142. package/docs/public/guides/funnel-checkout.md +1 -1
  143. package/docs/public/guides/funnel-landing.md +9 -7
  144. package/docs/public/limitations.md +5 -4
  145. package/docs/public/privacy/limitations.md +6 -6
  146. package/docs/public/release-candidate/validation.md +4 -4
  147. package/docs/public/troubleshooting.md +7 -6
  148. package/package.json +8 -3
  149. package/dist/pixel-default-config-BDPUVHse.d.ts +0 -5
  150. package/dist/pixel-default-config-C5uLt52W.d.mts +0 -5
@@ -46,12 +46,19 @@ type MetaIntegrationConfig = MetaBrowserDestinationConfig;
46
46
  /** @deprecated use GoogleBrowserDestinationConfig */
47
47
  type GoogleIntegrationConfig = GoogleBrowserDestinationConfig;
48
48
 
49
- type PixelSource = 'pageus' | 'gomarke' | 'bemony' | 'custom';
49
+ /** Valores conhecidos — autocomplete. Qualquer outra string também é válida. */
50
+ type KnownPixelSource = 'pageus' | 'gomarke' | 'bemony' | 'custom';
51
+ type PixelSource = KnownPixelSource | (string & {});
50
52
  type PixelTarget = 'landing' | 'checkout' | 'editor' | 'preview' | 'dashboard' | 'custom';
53
+ /** Checkout/vendor da página. Autocomplete para conhecidos; string livre ok. */
54
+ type KnownPixelPlatform = 'buygoods';
55
+ type PixelPlatform = KnownPixelPlatform | (string & {});
51
56
  type PixelEnvironment = 'production' | 'staging' | 'development';
52
57
  type AppConfig = {
53
58
  source: PixelSource;
54
59
  target: PixelTarget;
60
+ /** Vendor/plataforma do checkout ou da página. Default `''`. */
61
+ platform: PixelPlatform;
55
62
  environment: PixelEnvironment;
56
63
  debug: boolean;
57
64
  };
@@ -77,15 +84,104 @@ type AttributionConfig = {
77
84
  readonly customClickIdParams?: string[];
78
85
  };
79
86
 
80
- type TransportConfig = {
81
- apiEndpoint: string;
82
- apiKey?: string;
83
- timeoutMs?: number;
84
- batch?: {
85
- enabled: boolean;
86
- flushIntervalMs: number;
87
- maxBatchSize: number;
87
+ type TransportTestSenderConfig = {
88
+ mode: 'test';
89
+ capture?: boolean;
90
+ response?: 'success' | 'failure';
91
+ delayMs?: number;
92
+ };
93
+ type TransportInternalSenderConfig = {
94
+ mode: 'internal';
95
+ baseUrl?: string;
96
+ };
97
+ type TransportExternalSenderConfig = {
98
+ mode: 'external';
99
+ endpoints: {
100
+ event: string;
101
+ batch?: string;
88
102
  };
103
+ /**
104
+ * Public browser-visible headers only. Backend secrets must be proxied by a
105
+ * trusted server and must never be embedded in browser configuration.
106
+ */
107
+ headers?: Readonly<Record<string, string>>;
108
+ batchFallback?: 'single' | 'error';
109
+ };
110
+ type TransportSenderConfig = TransportTestSenderConfig | TransportInternalSenderConfig | TransportExternalSenderConfig;
111
+ type TransportPersistenceConfig = {
112
+ enabled: boolean;
113
+ };
114
+ type TransportReplayConfig = {
115
+ enabled: boolean;
116
+ };
117
+ type TransportOrderingConfig = {
118
+ enabled: boolean;
119
+ };
120
+ type TransportCoordinationConfig = {
121
+ enabled: boolean;
122
+ };
123
+ type TransportCircuitBreakerConfig = {
124
+ enabled: boolean;
125
+ failureThreshold: number;
126
+ resetTimeoutMs: number;
127
+ halfOpenMaxAttempts: number;
128
+ };
129
+ type TransportBackpressurePolicy = 'drop_oldest' | 'drop_newest' | 'reject_new' | 'sample' | 'none';
130
+ type TransportBackpressureConfig = {
131
+ enabled: boolean;
132
+ maxQueueSize: number;
133
+ policy: TransportBackpressurePolicy;
134
+ sampleRate?: number;
135
+ };
136
+ type TransportDeadLetterConfig = {
137
+ enabled: boolean;
138
+ maxEntries: number;
139
+ };
140
+ type TransportCompressionConfig = {
141
+ enabled: boolean;
142
+ strategy: 'identity';
143
+ };
144
+ type TransportRetryConfig = {
145
+ enabled: boolean;
146
+ maxAttempts: number;
147
+ baseDelayMs: number;
148
+ maxDelayMs: number;
149
+ multiplier: number;
150
+ };
151
+ type TransportBatchConfig = {
152
+ enabled: boolean;
153
+ batchSize: number;
154
+ maxWaitMs: number;
155
+ };
156
+ type TransportTimeoutConfig = {
157
+ enabled: boolean;
158
+ timeoutMs: number;
159
+ };
160
+ type TransportOfflineConfig = {
161
+ enabled: boolean;
162
+ };
163
+ type TransportFlushConfig = {
164
+ enabled: boolean;
165
+ flushIntervalMs: number;
166
+ flushOnDestroy: boolean;
167
+ prepareUnloadHooks: boolean;
168
+ };
169
+ type TransportConfig = {
170
+ enabled: boolean;
171
+ sender: TransportSenderConfig;
172
+ persistence: TransportPersistenceConfig;
173
+ replay: TransportReplayConfig;
174
+ ordering: TransportOrderingConfig;
175
+ coordination: TransportCoordinationConfig;
176
+ circuitBreaker: TransportCircuitBreakerConfig;
177
+ backpressure: TransportBackpressureConfig;
178
+ deadLetter: TransportDeadLetterConfig;
179
+ compression: TransportCompressionConfig;
180
+ retry: TransportRetryConfig;
181
+ batch: TransportBatchConfig;
182
+ timeout: TransportTimeoutConfig;
183
+ offline: TransportOfflineConfig;
184
+ flush: TransportFlushConfig;
89
185
  };
90
186
 
91
187
  type VisitorStoragePersistence = 'memory' | 'cookie' | 'localStorage' | 'cookie_localStorage';
@@ -203,11 +299,17 @@ type AutoSourceBase = {
203
299
  debounceMs?: number;
204
300
  cooldownMs?: number;
205
301
  };
302
+ type SelectorAutoTrigger = 'click' | 'submit' | 'hover' | 'visible';
206
303
  type SelectorAutoSource = AutoSourceBase & {
207
304
  type: 'selector';
208
305
  selector: SelectorConfig;
209
306
  selectorType?: SelectorType;
210
- trigger?: 'click' | 'submit';
307
+ trigger?: SelectorAutoTrigger;
308
+ /**
309
+ * Só para `trigger: 'visible'`. Fração visível 0–1.
310
+ * Default `0` (qualquer parte na viewport).
311
+ */
312
+ visibleThreshold?: number;
211
313
  };
212
314
  type FormAutoSource = AutoSourceBase & {
213
315
  type: 'form';
@@ -417,7 +519,10 @@ type CommerceConfig = {
417
519
  enrichment?: CommerceEnrichmentConfig;
418
520
  };
419
521
  declare const DEFAULT_COMMERCE_ENRICHMENT: Required<CommerceEnrichmentConfig>;
420
- /** Default seguro: commerce off, sem produtos, sem itens. */
522
+ /**
523
+ * Commerce on by default so catalog/cart enrichment runs when products exist.
524
+ * Empty catalog / empty cart is a no-op.
525
+ */
421
526
  declare const DEFAULT_COMMERCE_CONFIG: CommerceConfig;
422
527
  /** Normaliza calculateValueFrom (inclui aliases legado em runtime). */
423
528
  declare function normalizeCalculateValueFrom(value: CommerceCalculateValueFrom | string | undefined): 'cart' | 'event' | 'manual' | 'catalog';
@@ -744,96 +849,10 @@ type PrivacyModuleConfig = {
744
849
  anonymization: AnonymizationConfig;
745
850
  };
746
851
 
747
- type TransportRetryConfig = {
748
- enabled: boolean;
749
- maxAttempts: number;
750
- baseDelayMs: number;
751
- maxDelayMs: number;
752
- multiplier: number;
753
- };
754
- type TransportBatchConfig = {
755
- enabled: boolean;
756
- batchSize: number;
757
- flushIntervalMs: number;
758
- maxWaitMs: number;
759
- };
760
- type TransportTimeoutConfig = {
761
- enabled: boolean;
762
- timeoutMs: number;
763
- };
764
- type TransportOfflineConfig = {
765
- enabled: boolean;
766
- };
767
- type TransportFlushConfig = {
768
- enabled: boolean;
769
- flushIntervalMs: number;
770
- flushOnDestroy: boolean;
771
- prepareUnloadHooks: boolean;
772
- };
773
- type TransportSenderMode = 'mock' | 'http';
774
- type TransportSenderConfig = {
775
- mode: TransportSenderMode;
776
- };
777
- type TransportPersistenceConfig = {
778
- enabled: boolean;
779
- };
780
- type TransportReplayConfig = {
781
- enabled: boolean;
782
- };
783
- type TransportOrderingConfig = {
784
- enabled: boolean;
785
- };
786
- type TransportCoordinationConfig = {
787
- enabled: boolean;
788
- };
789
- type TransportCircuitBreakerConfig = {
790
- enabled: boolean;
791
- failureThreshold: number;
792
- resetTimeoutMs: number;
793
- halfOpenMaxAttempts: number;
794
- };
795
- type TransportBackpressurePolicy = 'drop_oldest' | 'drop_newest' | 'reject_new' | 'sample' | 'none';
796
- type TransportBackpressureConfig = {
797
- enabled: boolean;
798
- maxQueueSize: number;
799
- policy: TransportBackpressurePolicy;
800
- sampleRate?: number;
801
- };
802
- type TransportDeadLetterConfig = {
803
- enabled: boolean;
804
- maxEntries: number;
805
- };
806
- type TransportCompressionConfig = {
807
- enabled: boolean;
808
- strategy: 'identity';
809
- };
810
- type TransportModuleConfig = {
811
- enabled: boolean;
812
- /** @deprecated Use sender.mode instead */
813
- mockSender: {
814
- enabled: boolean;
815
- };
816
- sender: TransportSenderConfig;
817
- persistence: TransportPersistenceConfig;
818
- replay: TransportReplayConfig;
819
- ordering: TransportOrderingConfig;
820
- coordination: TransportCoordinationConfig;
821
- circuitBreaker: TransportCircuitBreakerConfig;
822
- backpressure: TransportBackpressureConfig;
823
- deadLetter: TransportDeadLetterConfig;
824
- compression: TransportCompressionConfig;
825
- retry: TransportRetryConfig;
826
- batch: TransportBatchConfig;
827
- timeout: TransportTimeoutConfig;
828
- offline: TransportOfflineConfig;
829
- flush: TransportFlushConfig;
830
- };
831
-
832
852
  type ModulesConfig = {
833
853
  core: CoreModuleConfig;
834
854
  behavior: BehaviorModuleConfig;
835
855
  conversion: ConversionModuleConfig;
836
- transport: TransportModuleConfig;
837
856
  integrations: IntegrationsModuleConfig;
838
857
  privacy: PrivacyModuleConfig;
839
858
  };
@@ -849,4 +868,4 @@ type PixelConfig = {
849
868
  modules: ModulesConfig;
850
869
  };
851
870
 
852
- export { type CommerceEnrichmentSource as $, type AttributionStoragePersistence as A, type BehaviorModuleConfig as B, type ConversionModuleConfig as C, type PaymentMethod as D, type EngagementThresholds as E, type FingerprintMode as F, type SelectorAutoSource as G, type SelectorConfig as H, type IntegrationsModuleConfig as I, type SelectorDescriptor as J, type SelectorInput as K, type LifecycleAutoSource as L, type SelectorType as M, type SelectorFormConfig as N, type SelectorFormMode as O, type PixelConfig as P, type QueueStoragePersistence as Q, type SelectorFormTrigger as R, type SessionStoragePersistence as S, type TransportModuleConfig as T, type CommerceCalculateValueFrom as U, type VisitorStoragePersistence as V, type CommerceCartConfig as W, type CommerceCartItem as X, type CommerceCartMode as Y, type CommerceConfig as Z, type CommerceEnrichmentConfig as _, type AttributionConfig as a, type CommerceEventEnrichmentConfig as a0, type CommerceMappingsConfig as a1, type CommerceProduct as a2, type ProductCatalogConfig as a3, type ProductType as a4, type UrlAutoSource as a5, DEFAULT_SELECTOR_TYPE as a6, DEFAULT_COMMERCE_CONFIG as a7, DEFAULT_COMMERCE_ENRICHMENT as a8, getPrimarySelectorValue as a9, type MetaIntegrationConfig as aA, type ModulesConfig as aB, type TikTokBrowserDestinationConfig as aC, type OrderingConfig as aD, type PageViewConfig as aE, type PiiConfig as aF, type PrivacyConsentConfig as aG, type PurchaseAutoDetectorConfig as aH, type RemoveFromCartAutoDetectorConfig as aI, type ScrollBehaviorConfig as aJ, type SearchAutoDetectorConfig as aK, type SessionConfig as aL, type TransportBatchConfig as aM, type TransportFlushConfig as aN, type TransportOfflineConfig as aO, type TransportRetryConfig as aP, type TransportTimeoutConfig as aQ, type ViewContentAutoDetectorConfig as aR, type ViewportBehaviorConfig as aS, type ViewportTargetConfig as aT, type VisibilityBehaviorConfig as aU, type VisitorConfig as aV, normalizeCalculateValueFrom as aa, resolveSelectorTypeFallback as ab, type AddPaymentInfoAutoDetectorConfig as ac, type AddToCartAutoDetectorConfig as ad, type AnonymizationConfig as ae, type AutoConversionConfig as af, type AutoDetectorConfig as ag, type ClickBehaviorConfig as ah, type ConsentConfig as ai, type ConversionAutoDetectorsConfig as aj, type ConversionRulesConfig as ak, type CoordinationConfig as al, type DedupeConfig as am, type EngagementBehaviorConfig as an, type ExitIntentBehaviorConfig as ao, type FingerprintConfig as ap, type GoogleBrowserDestinationConfig as aq, type GoogleIntegrationConfig as ar, type HeartbeatModuleConfig as as, type IdleBehaviorConfig as at, type InitiateCheckoutAutoDetectorConfig as au, type IntegrationTestDestinationConfig as av, type LeadAutoDetectorConfig as aw, type ManualConversionConfig as ax, type ManualEventConfig as ay, type MetaBrowserDestinationConfig as az, type CoreModuleConfig as b, type PrivacyModuleConfig as c, type AppConfig as d, type PixelEnvironment as e, type PixelSource as f, type PixelTarget as g, type IdentityConfig as h, type TransportConfig as i, type StorageConfig as j, type StorageKeysConfig as k, type AutoSourceBase as l, type AutoSourceType as m, type AutoTrackSource as n, type EngagementWeights as o, type EngagementPenalties as p, type FormAutoSource as q, type LinkAutoSource as r, type LinkMatchProtocol as s, type LinkQueryCondition as t, type LinkQueryMatch as u, type LinkTargetMatch as v, type LinkValueBinding as w, type LinkValueResolver as x, type LinkValueTransform as y, type PaymentAutoSource as z };
871
+ export { type LinkQueryCondition as $, type AttributionStoragePersistence as A, type BehaviorModuleConfig as B, type CommerceConfig as C, type TransportReplayConfig as D, type TransportRetryConfig as E, type TransportTestSenderConfig as F, type TransportTimeoutConfig as G, type StorageKeysConfig as H, type IdentityConfig as I, type AutoSourceBase as J, type KnownPixelPlatform as K, type AutoSourceType as L, type ModulesConfig as M, type AutoTrackSource as N, type EngagementThresholds as O, type PixelConfig as P, type QueueStoragePersistence as Q, type EngagementWeights as R, type SessionStoragePersistence as S, type TransportConfig as T, type EngagementPenalties as U, type VisitorStoragePersistence as V, type FingerprintMode as W, type FormAutoSource as X, type LifecycleAutoSource as Y, type LinkAutoSource as Z, type LinkMatchProtocol as _, type AppConfig as a, type PrivacyConsentConfig as a$, type LinkQueryMatch as a0, type LinkTargetMatch as a1, type LinkValueBinding as a2, type LinkValueResolver as a3, type LinkValueTransform as a4, type PaymentAutoSource as a5, type PaymentMethod as a6, type SelectorAutoSource as a7, type SelectorAutoTrigger as a8, type SelectorConfig as a9, type AnonymizationConfig as aA, type AutoConversionConfig as aB, type AutoDetectorConfig as aC, type ClickBehaviorConfig as aD, type ConsentConfig as aE, type ConversionAutoDetectorsConfig as aF, type ConversionRulesConfig as aG, type CoordinationConfig as aH, type DedupeConfig as aI, type EngagementBehaviorConfig as aJ, type ExitIntentBehaviorConfig as aK, type FingerprintConfig as aL, type GoogleBrowserDestinationConfig as aM, type GoogleIntegrationConfig as aN, type HeartbeatModuleConfig as aO, type IdleBehaviorConfig as aP, type InitiateCheckoutAutoDetectorConfig as aQ, type IntegrationTestDestinationConfig as aR, type LeadAutoDetectorConfig as aS, type ManualConversionConfig as aT, type ManualEventConfig as aU, type MetaBrowserDestinationConfig as aV, type MetaIntegrationConfig as aW, type TikTokBrowserDestinationConfig as aX, type OrderingConfig as aY, type PageViewConfig as aZ, type PiiConfig as a_, type SelectorDescriptor as aa, type SelectorInput as ab, type SelectorType as ac, type SelectorFormConfig as ad, type SelectorFormMode as ae, type SelectorFormTrigger as af, type CommerceCalculateValueFrom as ag, type CommerceCartConfig as ah, type CommerceCartItem as ai, type CommerceCartMode as aj, type CommerceEnrichmentConfig as ak, type CommerceEnrichmentSource as al, type CommerceEventEnrichmentConfig as am, type CommerceMappingsConfig as an, type CommerceProduct as ao, type ProductCatalogConfig as ap, type ProductType as aq, type UrlAutoSource as ar, DEFAULT_SELECTOR_TYPE as as, DEFAULT_COMMERCE_CONFIG as at, DEFAULT_COMMERCE_ENRICHMENT as au, getPrimarySelectorValue as av, normalizeCalculateValueFrom as aw, resolveSelectorTypeFallback as ax, type AddPaymentInfoAutoDetectorConfig as ay, type AddToCartAutoDetectorConfig as az, type TransportSenderConfig as b, type PurchaseAutoDetectorConfig as b0, type RemoveFromCartAutoDetectorConfig as b1, type ScrollBehaviorConfig as b2, type SearchAutoDetectorConfig as b3, type SessionConfig as b4, type ViewContentAutoDetectorConfig as b5, type ViewportBehaviorConfig as b6, type ViewportTargetConfig as b7, type VisibilityBehaviorConfig as b8, type VisitorConfig as b9, type StorageConfig as c, type AttributionConfig as d, type ConversionModuleConfig as e, type CoreModuleConfig as f, type IntegrationsModuleConfig as g, type PrivacyModuleConfig as h, type KnownPixelSource as i, type PixelEnvironment as j, type PixelPlatform as k, type PixelSource as l, type PixelTarget as m, type TransportBackpressureConfig as n, type TransportBackpressurePolicy as o, type TransportBatchConfig as p, type TransportCircuitBreakerConfig as q, type TransportCompressionConfig as r, type TransportCoordinationConfig as s, type TransportDeadLetterConfig as t, type TransportExternalSenderConfig as u, type TransportFlushConfig as v, type TransportInternalSenderConfig as w, type TransportOfflineConfig as x, type TransportOrderingConfig as y, type TransportPersistenceConfig as z };
@@ -46,12 +46,19 @@ type MetaIntegrationConfig = MetaBrowserDestinationConfig;
46
46
  /** @deprecated use GoogleBrowserDestinationConfig */
47
47
  type GoogleIntegrationConfig = GoogleBrowserDestinationConfig;
48
48
 
49
- type PixelSource = 'pageus' | 'gomarke' | 'bemony' | 'custom';
49
+ /** Valores conhecidos — autocomplete. Qualquer outra string também é válida. */
50
+ type KnownPixelSource = 'pageus' | 'gomarke' | 'bemony' | 'custom';
51
+ type PixelSource = KnownPixelSource | (string & {});
50
52
  type PixelTarget = 'landing' | 'checkout' | 'editor' | 'preview' | 'dashboard' | 'custom';
53
+ /** Checkout/vendor da página. Autocomplete para conhecidos; string livre ok. */
54
+ type KnownPixelPlatform = 'buygoods';
55
+ type PixelPlatform = KnownPixelPlatform | (string & {});
51
56
  type PixelEnvironment = 'production' | 'staging' | 'development';
52
57
  type AppConfig = {
53
58
  source: PixelSource;
54
59
  target: PixelTarget;
60
+ /** Vendor/plataforma do checkout ou da página. Default `''`. */
61
+ platform: PixelPlatform;
55
62
  environment: PixelEnvironment;
56
63
  debug: boolean;
57
64
  };
@@ -77,15 +84,104 @@ type AttributionConfig = {
77
84
  readonly customClickIdParams?: string[];
78
85
  };
79
86
 
80
- type TransportConfig = {
81
- apiEndpoint: string;
82
- apiKey?: string;
83
- timeoutMs?: number;
84
- batch?: {
85
- enabled: boolean;
86
- flushIntervalMs: number;
87
- maxBatchSize: number;
87
+ type TransportTestSenderConfig = {
88
+ mode: 'test';
89
+ capture?: boolean;
90
+ response?: 'success' | 'failure';
91
+ delayMs?: number;
92
+ };
93
+ type TransportInternalSenderConfig = {
94
+ mode: 'internal';
95
+ baseUrl?: string;
96
+ };
97
+ type TransportExternalSenderConfig = {
98
+ mode: 'external';
99
+ endpoints: {
100
+ event: string;
101
+ batch?: string;
88
102
  };
103
+ /**
104
+ * Public browser-visible headers only. Backend secrets must be proxied by a
105
+ * trusted server and must never be embedded in browser configuration.
106
+ */
107
+ headers?: Readonly<Record<string, string>>;
108
+ batchFallback?: 'single' | 'error';
109
+ };
110
+ type TransportSenderConfig = TransportTestSenderConfig | TransportInternalSenderConfig | TransportExternalSenderConfig;
111
+ type TransportPersistenceConfig = {
112
+ enabled: boolean;
113
+ };
114
+ type TransportReplayConfig = {
115
+ enabled: boolean;
116
+ };
117
+ type TransportOrderingConfig = {
118
+ enabled: boolean;
119
+ };
120
+ type TransportCoordinationConfig = {
121
+ enabled: boolean;
122
+ };
123
+ type TransportCircuitBreakerConfig = {
124
+ enabled: boolean;
125
+ failureThreshold: number;
126
+ resetTimeoutMs: number;
127
+ halfOpenMaxAttempts: number;
128
+ };
129
+ type TransportBackpressurePolicy = 'drop_oldest' | 'drop_newest' | 'reject_new' | 'sample' | 'none';
130
+ type TransportBackpressureConfig = {
131
+ enabled: boolean;
132
+ maxQueueSize: number;
133
+ policy: TransportBackpressurePolicy;
134
+ sampleRate?: number;
135
+ };
136
+ type TransportDeadLetterConfig = {
137
+ enabled: boolean;
138
+ maxEntries: number;
139
+ };
140
+ type TransportCompressionConfig = {
141
+ enabled: boolean;
142
+ strategy: 'identity';
143
+ };
144
+ type TransportRetryConfig = {
145
+ enabled: boolean;
146
+ maxAttempts: number;
147
+ baseDelayMs: number;
148
+ maxDelayMs: number;
149
+ multiplier: number;
150
+ };
151
+ type TransportBatchConfig = {
152
+ enabled: boolean;
153
+ batchSize: number;
154
+ maxWaitMs: number;
155
+ };
156
+ type TransportTimeoutConfig = {
157
+ enabled: boolean;
158
+ timeoutMs: number;
159
+ };
160
+ type TransportOfflineConfig = {
161
+ enabled: boolean;
162
+ };
163
+ type TransportFlushConfig = {
164
+ enabled: boolean;
165
+ flushIntervalMs: number;
166
+ flushOnDestroy: boolean;
167
+ prepareUnloadHooks: boolean;
168
+ };
169
+ type TransportConfig = {
170
+ enabled: boolean;
171
+ sender: TransportSenderConfig;
172
+ persistence: TransportPersistenceConfig;
173
+ replay: TransportReplayConfig;
174
+ ordering: TransportOrderingConfig;
175
+ coordination: TransportCoordinationConfig;
176
+ circuitBreaker: TransportCircuitBreakerConfig;
177
+ backpressure: TransportBackpressureConfig;
178
+ deadLetter: TransportDeadLetterConfig;
179
+ compression: TransportCompressionConfig;
180
+ retry: TransportRetryConfig;
181
+ batch: TransportBatchConfig;
182
+ timeout: TransportTimeoutConfig;
183
+ offline: TransportOfflineConfig;
184
+ flush: TransportFlushConfig;
89
185
  };
90
186
 
91
187
  type VisitorStoragePersistence = 'memory' | 'cookie' | 'localStorage' | 'cookie_localStorage';
@@ -203,11 +299,17 @@ type AutoSourceBase = {
203
299
  debounceMs?: number;
204
300
  cooldownMs?: number;
205
301
  };
302
+ type SelectorAutoTrigger = 'click' | 'submit' | 'hover' | 'visible';
206
303
  type SelectorAutoSource = AutoSourceBase & {
207
304
  type: 'selector';
208
305
  selector: SelectorConfig;
209
306
  selectorType?: SelectorType;
210
- trigger?: 'click' | 'submit';
307
+ trigger?: SelectorAutoTrigger;
308
+ /**
309
+ * Só para `trigger: 'visible'`. Fração visível 0–1.
310
+ * Default `0` (qualquer parte na viewport).
311
+ */
312
+ visibleThreshold?: number;
211
313
  };
212
314
  type FormAutoSource = AutoSourceBase & {
213
315
  type: 'form';
@@ -417,7 +519,10 @@ type CommerceConfig = {
417
519
  enrichment?: CommerceEnrichmentConfig;
418
520
  };
419
521
  declare const DEFAULT_COMMERCE_ENRICHMENT: Required<CommerceEnrichmentConfig>;
420
- /** Default seguro: commerce off, sem produtos, sem itens. */
522
+ /**
523
+ * Commerce on by default so catalog/cart enrichment runs when products exist.
524
+ * Empty catalog / empty cart is a no-op.
525
+ */
421
526
  declare const DEFAULT_COMMERCE_CONFIG: CommerceConfig;
422
527
  /** Normaliza calculateValueFrom (inclui aliases legado em runtime). */
423
528
  declare function normalizeCalculateValueFrom(value: CommerceCalculateValueFrom | string | undefined): 'cart' | 'event' | 'manual' | 'catalog';
@@ -744,96 +849,10 @@ type PrivacyModuleConfig = {
744
849
  anonymization: AnonymizationConfig;
745
850
  };
746
851
 
747
- type TransportRetryConfig = {
748
- enabled: boolean;
749
- maxAttempts: number;
750
- baseDelayMs: number;
751
- maxDelayMs: number;
752
- multiplier: number;
753
- };
754
- type TransportBatchConfig = {
755
- enabled: boolean;
756
- batchSize: number;
757
- flushIntervalMs: number;
758
- maxWaitMs: number;
759
- };
760
- type TransportTimeoutConfig = {
761
- enabled: boolean;
762
- timeoutMs: number;
763
- };
764
- type TransportOfflineConfig = {
765
- enabled: boolean;
766
- };
767
- type TransportFlushConfig = {
768
- enabled: boolean;
769
- flushIntervalMs: number;
770
- flushOnDestroy: boolean;
771
- prepareUnloadHooks: boolean;
772
- };
773
- type TransportSenderMode = 'mock' | 'http';
774
- type TransportSenderConfig = {
775
- mode: TransportSenderMode;
776
- };
777
- type TransportPersistenceConfig = {
778
- enabled: boolean;
779
- };
780
- type TransportReplayConfig = {
781
- enabled: boolean;
782
- };
783
- type TransportOrderingConfig = {
784
- enabled: boolean;
785
- };
786
- type TransportCoordinationConfig = {
787
- enabled: boolean;
788
- };
789
- type TransportCircuitBreakerConfig = {
790
- enabled: boolean;
791
- failureThreshold: number;
792
- resetTimeoutMs: number;
793
- halfOpenMaxAttempts: number;
794
- };
795
- type TransportBackpressurePolicy = 'drop_oldest' | 'drop_newest' | 'reject_new' | 'sample' | 'none';
796
- type TransportBackpressureConfig = {
797
- enabled: boolean;
798
- maxQueueSize: number;
799
- policy: TransportBackpressurePolicy;
800
- sampleRate?: number;
801
- };
802
- type TransportDeadLetterConfig = {
803
- enabled: boolean;
804
- maxEntries: number;
805
- };
806
- type TransportCompressionConfig = {
807
- enabled: boolean;
808
- strategy: 'identity';
809
- };
810
- type TransportModuleConfig = {
811
- enabled: boolean;
812
- /** @deprecated Use sender.mode instead */
813
- mockSender: {
814
- enabled: boolean;
815
- };
816
- sender: TransportSenderConfig;
817
- persistence: TransportPersistenceConfig;
818
- replay: TransportReplayConfig;
819
- ordering: TransportOrderingConfig;
820
- coordination: TransportCoordinationConfig;
821
- circuitBreaker: TransportCircuitBreakerConfig;
822
- backpressure: TransportBackpressureConfig;
823
- deadLetter: TransportDeadLetterConfig;
824
- compression: TransportCompressionConfig;
825
- retry: TransportRetryConfig;
826
- batch: TransportBatchConfig;
827
- timeout: TransportTimeoutConfig;
828
- offline: TransportOfflineConfig;
829
- flush: TransportFlushConfig;
830
- };
831
-
832
852
  type ModulesConfig = {
833
853
  core: CoreModuleConfig;
834
854
  behavior: BehaviorModuleConfig;
835
855
  conversion: ConversionModuleConfig;
836
- transport: TransportModuleConfig;
837
856
  integrations: IntegrationsModuleConfig;
838
857
  privacy: PrivacyModuleConfig;
839
858
  };
@@ -849,4 +868,4 @@ type PixelConfig = {
849
868
  modules: ModulesConfig;
850
869
  };
851
870
 
852
- export { type CommerceEnrichmentSource as $, type AttributionStoragePersistence as A, type BehaviorModuleConfig as B, type ConversionModuleConfig as C, type PaymentMethod as D, type EngagementThresholds as E, type FingerprintMode as F, type SelectorAutoSource as G, type SelectorConfig as H, type IntegrationsModuleConfig as I, type SelectorDescriptor as J, type SelectorInput as K, type LifecycleAutoSource as L, type SelectorType as M, type SelectorFormConfig as N, type SelectorFormMode as O, type PixelConfig as P, type QueueStoragePersistence as Q, type SelectorFormTrigger as R, type SessionStoragePersistence as S, type TransportModuleConfig as T, type CommerceCalculateValueFrom as U, type VisitorStoragePersistence as V, type CommerceCartConfig as W, type CommerceCartItem as X, type CommerceCartMode as Y, type CommerceConfig as Z, type CommerceEnrichmentConfig as _, type AttributionConfig as a, type CommerceEventEnrichmentConfig as a0, type CommerceMappingsConfig as a1, type CommerceProduct as a2, type ProductCatalogConfig as a3, type ProductType as a4, type UrlAutoSource as a5, DEFAULT_SELECTOR_TYPE as a6, DEFAULT_COMMERCE_CONFIG as a7, DEFAULT_COMMERCE_ENRICHMENT as a8, getPrimarySelectorValue as a9, type MetaIntegrationConfig as aA, type ModulesConfig as aB, type TikTokBrowserDestinationConfig as aC, type OrderingConfig as aD, type PageViewConfig as aE, type PiiConfig as aF, type PrivacyConsentConfig as aG, type PurchaseAutoDetectorConfig as aH, type RemoveFromCartAutoDetectorConfig as aI, type ScrollBehaviorConfig as aJ, type SearchAutoDetectorConfig as aK, type SessionConfig as aL, type TransportBatchConfig as aM, type TransportFlushConfig as aN, type TransportOfflineConfig as aO, type TransportRetryConfig as aP, type TransportTimeoutConfig as aQ, type ViewContentAutoDetectorConfig as aR, type ViewportBehaviorConfig as aS, type ViewportTargetConfig as aT, type VisibilityBehaviorConfig as aU, type VisitorConfig as aV, normalizeCalculateValueFrom as aa, resolveSelectorTypeFallback as ab, type AddPaymentInfoAutoDetectorConfig as ac, type AddToCartAutoDetectorConfig as ad, type AnonymizationConfig as ae, type AutoConversionConfig as af, type AutoDetectorConfig as ag, type ClickBehaviorConfig as ah, type ConsentConfig as ai, type ConversionAutoDetectorsConfig as aj, type ConversionRulesConfig as ak, type CoordinationConfig as al, type DedupeConfig as am, type EngagementBehaviorConfig as an, type ExitIntentBehaviorConfig as ao, type FingerprintConfig as ap, type GoogleBrowserDestinationConfig as aq, type GoogleIntegrationConfig as ar, type HeartbeatModuleConfig as as, type IdleBehaviorConfig as at, type InitiateCheckoutAutoDetectorConfig as au, type IntegrationTestDestinationConfig as av, type LeadAutoDetectorConfig as aw, type ManualConversionConfig as ax, type ManualEventConfig as ay, type MetaBrowserDestinationConfig as az, type CoreModuleConfig as b, type PrivacyModuleConfig as c, type AppConfig as d, type PixelEnvironment as e, type PixelSource as f, type PixelTarget as g, type IdentityConfig as h, type TransportConfig as i, type StorageConfig as j, type StorageKeysConfig as k, type AutoSourceBase as l, type AutoSourceType as m, type AutoTrackSource as n, type EngagementWeights as o, type EngagementPenalties as p, type FormAutoSource as q, type LinkAutoSource as r, type LinkMatchProtocol as s, type LinkQueryCondition as t, type LinkQueryMatch as u, type LinkTargetMatch as v, type LinkValueBinding as w, type LinkValueResolver as x, type LinkValueTransform as y, type PaymentAutoSource as z };
871
+ export { type LinkQueryCondition as $, type AttributionStoragePersistence as A, type BehaviorModuleConfig as B, type CommerceConfig as C, type TransportReplayConfig as D, type TransportRetryConfig as E, type TransportTestSenderConfig as F, type TransportTimeoutConfig as G, type StorageKeysConfig as H, type IdentityConfig as I, type AutoSourceBase as J, type KnownPixelPlatform as K, type AutoSourceType as L, type ModulesConfig as M, type AutoTrackSource as N, type EngagementThresholds as O, type PixelConfig as P, type QueueStoragePersistence as Q, type EngagementWeights as R, type SessionStoragePersistence as S, type TransportConfig as T, type EngagementPenalties as U, type VisitorStoragePersistence as V, type FingerprintMode as W, type FormAutoSource as X, type LifecycleAutoSource as Y, type LinkAutoSource as Z, type LinkMatchProtocol as _, type AppConfig as a, type PrivacyConsentConfig as a$, type LinkQueryMatch as a0, type LinkTargetMatch as a1, type LinkValueBinding as a2, type LinkValueResolver as a3, type LinkValueTransform as a4, type PaymentAutoSource as a5, type PaymentMethod as a6, type SelectorAutoSource as a7, type SelectorAutoTrigger as a8, type SelectorConfig as a9, type AnonymizationConfig as aA, type AutoConversionConfig as aB, type AutoDetectorConfig as aC, type ClickBehaviorConfig as aD, type ConsentConfig as aE, type ConversionAutoDetectorsConfig as aF, type ConversionRulesConfig as aG, type CoordinationConfig as aH, type DedupeConfig as aI, type EngagementBehaviorConfig as aJ, type ExitIntentBehaviorConfig as aK, type FingerprintConfig as aL, type GoogleBrowserDestinationConfig as aM, type GoogleIntegrationConfig as aN, type HeartbeatModuleConfig as aO, type IdleBehaviorConfig as aP, type InitiateCheckoutAutoDetectorConfig as aQ, type IntegrationTestDestinationConfig as aR, type LeadAutoDetectorConfig as aS, type ManualConversionConfig as aT, type ManualEventConfig as aU, type MetaBrowserDestinationConfig as aV, type MetaIntegrationConfig as aW, type TikTokBrowserDestinationConfig as aX, type OrderingConfig as aY, type PageViewConfig as aZ, type PiiConfig as a_, type SelectorDescriptor as aa, type SelectorInput as ab, type SelectorType as ac, type SelectorFormConfig as ad, type SelectorFormMode as ae, type SelectorFormTrigger as af, type CommerceCalculateValueFrom as ag, type CommerceCartConfig as ah, type CommerceCartItem as ai, type CommerceCartMode as aj, type CommerceEnrichmentConfig as ak, type CommerceEnrichmentSource as al, type CommerceEventEnrichmentConfig as am, type CommerceMappingsConfig as an, type CommerceProduct as ao, type ProductCatalogConfig as ap, type ProductType as aq, type UrlAutoSource as ar, DEFAULT_SELECTOR_TYPE as as, DEFAULT_COMMERCE_CONFIG as at, DEFAULT_COMMERCE_ENRICHMENT as au, getPrimarySelectorValue as av, normalizeCalculateValueFrom as aw, resolveSelectorTypeFallback as ax, type AddPaymentInfoAutoDetectorConfig as ay, type AddToCartAutoDetectorConfig as az, type TransportSenderConfig as b, type PurchaseAutoDetectorConfig as b0, type RemoveFromCartAutoDetectorConfig as b1, type ScrollBehaviorConfig as b2, type SearchAutoDetectorConfig as b3, type SessionConfig as b4, type ViewContentAutoDetectorConfig as b5, type ViewportBehaviorConfig as b6, type ViewportTargetConfig as b7, type VisibilityBehaviorConfig as b8, type VisitorConfig as b9, type StorageConfig as c, type AttributionConfig as d, type ConversionModuleConfig as e, type CoreModuleConfig as f, type IntegrationsModuleConfig as g, type PrivacyModuleConfig as h, type KnownPixelSource as i, type PixelEnvironment as j, type PixelPlatform as k, type PixelSource as l, type PixelTarget as m, type TransportBackpressureConfig as n, type TransportBackpressurePolicy as o, type TransportBatchConfig as p, type TransportCircuitBreakerConfig as q, type TransportCompressionConfig as r, type TransportCoordinationConfig as s, type TransportDeadLetterConfig as t, type TransportExternalSenderConfig as u, type TransportFlushConfig as v, type TransportInternalSenderConfig as w, type TransportOfflineConfig as x, type TransportOrderingConfig as y, type TransportPersistenceConfig as z };
@@ -0,0 +1,21 @@
1
+ import { P as PixelConfig } from './pixel-DNGbAN5C.js';
2
+ import { P as PixelSettings } from './pixel-settings-D-t9zQb4.js';
3
+
4
+ /**
5
+ * Resolve input público parcial em `PixelConfig` completo e isolado.
6
+ *
7
+ * Não muta `DEFAULT_PIXEL_CONFIG` nem o `settings` recebido.
8
+ * Cada chamada produz uma árvore nova (sem refs mutáveis compartilhadas).
9
+ */
10
+ declare function resolvePixelConfig(settings: PixelSettings): PixelConfig;
11
+
12
+ type PixelConfigurationErrorCode = 'INVALID_PIXEL_ID' | 'INVALID_SETTINGS';
13
+ declare class PixelConfigurationError extends Error {
14
+ readonly code: PixelConfigurationErrorCode;
15
+ readonly cause?: unknown;
16
+ constructor(message: string, code: PixelConfigurationErrorCode, cause?: unknown);
17
+ }
18
+
19
+ declare const DEFAULT_PIXEL_CONFIG: PixelConfig;
20
+
21
+ export { DEFAULT_PIXEL_CONFIG as D, PixelConfigurationError as P, type PixelConfigurationErrorCode as a, resolvePixelConfig as r };
@@ -0,0 +1,21 @@
1
+ import { P as PixelConfig } from './pixel-_BSDpx4M.mjs';
2
+ import { P as PixelSettings } from './pixel-settings-DGxl0MVm.mjs';
3
+
4
+ /**
5
+ * Resolve input público parcial em `PixelConfig` completo e isolado.
6
+ *
7
+ * Não muta `DEFAULT_PIXEL_CONFIG` nem o `settings` recebido.
8
+ * Cada chamada produz uma árvore nova (sem refs mutáveis compartilhadas).
9
+ */
10
+ declare function resolvePixelConfig(settings: PixelSettings): PixelConfig;
11
+
12
+ type PixelConfigurationErrorCode = 'INVALID_PIXEL_ID' | 'INVALID_SETTINGS';
13
+ declare class PixelConfigurationError extends Error {
14
+ readonly code: PixelConfigurationErrorCode;
15
+ readonly cause?: unknown;
16
+ constructor(message: string, code: PixelConfigurationErrorCode, cause?: unknown);
17
+ }
18
+
19
+ declare const DEFAULT_PIXEL_CONFIG: PixelConfig;
20
+
21
+ export { DEFAULT_PIXEL_CONFIG as D, PixelConfigurationError as P, type PixelConfigurationErrorCode as a, resolvePixelConfig as r };
@@ -0,0 +1,40 @@
1
+ import { I as IdentityConfig, a as AppConfig, T as TransportConfig, b as TransportSenderConfig, c as StorageConfig, d as AttributionConfig, C as CommerceConfig, M as ModulesConfig } from './pixel-DNGbAN5C.js';
2
+
3
+ /**
4
+ * Partial profundo seguro para input público.
5
+ *
6
+ * - funções são preservadas;
7
+ * - arrays são substituíveis por inteiro (itens não viram partial);
8
+ * - objetos têm propriedades recursivamente opcionais;
9
+ * - primitivos e unions permanecem.
10
+ */
11
+ type DeepPartial<T> = T extends (...args: never[]) => unknown ? T : T extends readonly (infer Item)[] ? readonly Item[] : T extends object ? {
12
+ [Key in keyof T]?: DeepPartial<T[Key]>;
13
+ } : T;
14
+
15
+ /**
16
+ * Override de transport no input público.
17
+ *
18
+ * `sender` permanece a union discriminada completa: `external` continua
19
+ * exigindo `endpoints.event` em TypeScript. Não é deep-partial irrestrito.
20
+ */
21
+ type PixelTransportSettings = Omit<DeepPartial<TransportConfig>, 'sender'> & {
22
+ sender?: TransportSenderConfig;
23
+ };
24
+ /**
25
+ * Contrato público de entrada: somente `identity.pixelId` é obrigatório.
26
+ * Os demais blocos são parciais e mesclados com `DEFAULT_PIXEL_CONFIG`.
27
+ *
28
+ * Um `PixelConfig` completo continua atribuível a este tipo.
29
+ */
30
+ type PixelSettings = {
31
+ identity: Pick<IdentityConfig, 'pixelId'> & Partial<Omit<IdentityConfig, 'pixelId'>>;
32
+ app?: DeepPartial<AppConfig>;
33
+ transport?: PixelTransportSettings;
34
+ storage?: DeepPartial<StorageConfig>;
35
+ attribution?: DeepPartial<AttributionConfig>;
36
+ commerce?: DeepPartial<CommerceConfig>;
37
+ modules?: DeepPartial<ModulesConfig>;
38
+ };
39
+
40
+ export type { DeepPartial as D, PixelSettings as P, PixelTransportSettings as a };