@posthog/types 1.372.10 → 1.373.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/dist/capture.d.ts CHANGED
@@ -60,6 +60,13 @@ export interface CaptureOptions {
60
60
  * If set, overrides the current timestamp
61
61
  */
62
62
  timestamp?: Date;
63
+ /**
64
+ * If set, overrides the auto-generated event uuid. Useful for cross-source idempotency
65
+ * (e.g. a server webhook and a browser success page both firing for the same business
66
+ * transaction): emit both events with the same deterministic uuid so PostHog can dedupe
67
+ * them.
68
+ */
69
+ uuid?: string;
63
70
  /**
64
71
  * Internal flag set by captureException() / sendExceptionEvent() to indicate this $exception
65
72
  * event originated from the proper exception capture path. Used to warn users who call
@@ -1 +1 @@
1
- {"version":3,"file":"capture.d.ts","sourceRoot":"","sources":["../src/capture.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAE1C;;;;GAIG;AACH,MAAM,MAAM,cAAc,GACpB,gBAAgB,GAChB,SAAS,GACT,YAAY,GACZ,WAAW,GACX,aAAa,GACb,aAAa,GACb,cAAc,GACd,mBAAmB,GACnB,YAAY,CAAA;AAElB;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAC9B,MAAM,GACN,WAAW,GACX,YAAY,GACZ,WAAW,GACX,gBAAgB,GAChB,eAAe,GACf,sBAAsB,CAAA;AAE5B,MAAM,MAAM,SAAS,GACf,wBAAwB,GACxB,cAAc,GAId,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;AAEnB,MAAM,WAAW,aAAa;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,SAAS,CAAA;IAChB,UAAU,EAAE,UAAU,CAAA;IACtB,IAAI,CAAC,EAAE,UAAU,CAAA;IACjB,SAAS,CAAC,EAAE,UAAU,CAAA;IACtB,SAAS,CAAC,EAAE,IAAI,CAAA;CACnB;AAED,MAAM,WAAW,cAA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AAU,EAAE,UAAU,CAAA;IACtB,IAAI,CAAC,EAAE,UAAU,CAAA;IACjB,SAAS,CAAC,EAAE,UAAU,CAAA;IACtB,SAAS,CAAC,EAAE,IAAI,CAAA;CACnB;AAED,MAAM,WAAW,cAAc;IAC3B;;;OAGG;IACH,IAAI,CAAC,EAAE,UAAU,CAAA;IAEjB;;;OAGG;IACH,SAAS,CAAC,EAAE,UAAU,CAAA;IAEtB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IAErB;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAA;IAExB;;OAEG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAA;IAEnC;;OAEG;IACH,SAAS,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,YAAY,CAAA;IAE1C;;OAEG;IACH,SAAS,CAAC,EAAE,IAAI,CAAA;IAEhB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;;;OAIG;IACH,+BAA+B,CAAC,EAAE,OAAO,CAAA;CAC5C;AAED,MAAM,MAAM,YAAY,GAAG,CAAC,EAAE,EAAE,aAAa,GAAG,IAAI,KAAK,aAAa,GAAG,IAAI,CAAA"}
@@ -1195,7 +1195,7 @@ export interface PostHogConfig {
1195
1195
  * - **Disabled (0)**: No background refreshes. Flags only update on page load or manual `reloadFeatureFlags()` calls.
1196
1196
  * Use this if you control flag updates manually or have infrequent flag changes.
1197
1197
  *
1198
- * Note: Refreshes are automatically skipped when the browser tab is hidden.
1198
+ * Note: Refreshes are automatically skipped when the browser tab is hidden or no document is available.
1199
1199
  *
1200
1200
  * @default 300000 (5 minutes)
1201
1201
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@posthog/types",
3
- "version": "1.372.10",
3
+ "version": "1.373.0",
4
4
  "description": "Type definitions for the PostHog JavaScript SDK",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
package/src/capture.ts CHANGED
@@ -97,6 +97,14 @@ export interface CaptureOptions {
97
97
  */
98
98
  timestamp?: Date
99
99
 
100
+ /**
101
+ * If set, overrides the auto-generated event uuid. Useful for cross-source idempotency
102
+ * (e.g. a server webhook and a browser success page both firing for the same business
103
+ * transaction): emit both events with the same deterministic uuid so PostHog can dedupe
104
+ * them.
105
+ */
106
+ uuid?: string
107
+
100
108
  /**
101
109
  * Internal flag set by captureException() / sendExceptionEvent() to indicate this $exception
102
110
  * event originated from the proper exception capture path. Used to warn users who call
@@ -1350,7 +1350,7 @@ export interface PostHogConfig {
1350
1350
  * - **Disabled (0)**: No background refreshes. Flags only update on page load or manual `reloadFeatureFlags()` calls.
1351
1351
  * Use this if you control flag updates manually or have infrequent flag changes.
1352
1352
  *
1353
- * Note: Refreshes are automatically skipped when the browser tab is hidden.
1353
+ * Note: Refreshes are automatically skipped when the browser tab is hidden or no document is available.
1354
1354
  *
1355
1355
  * @default 300000 (5 minutes)
1356
1356
  */