@heycatch/sdk 0.7.0 → 0.7.1-dev.1456

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/index.d.cts CHANGED
@@ -1,5 +1,27 @@
1
- import { a as HeyCatchPersonProperties, H as HeyCatchConfig, b as HeyCatchProperties, T as TrackOptions } from './shared-B8y8fJCD.cjs';
2
- export { P as PersonPropertyUpdate, S as SDK_VERSION, c as STAGE, d as ServerTrackOptions } from './shared-B8y8fJCD.cjs';
1
+ import { d as HeyCatchPersonProperties, b as HeyCatchConfig, e as HeyCatchProperties, T as TrackOptions } from './shared-BFhHwsG8.cjs';
2
+ export { H as HeyCatchBeforeSend, a as HeyCatchCapturedEvent, c as HeyCatchPersistence, f as HeyCatchSanitizeProperties, K as KNOWN_FRAMEWORKS, g as KNOWN_INSTALL_AGENTS, P as PersonPropertyUpdate, S as SDK_VERSION, h as STAGE, i as ServerTrackOptions, U as UNKNOWN_INSTALL_VALUE } from './shared-BFhHwsG8.cjs';
3
+
4
+ /**
5
+ * Starts capturing after `optOutCapturingByDefault` gated `init()` from
6
+ * sending anything - the consent-gate alternative to skipping `init()`
7
+ * entirely (the "don't call init" workaround this replaces for customers
8
+ * under GDPR/CookieYes-style consent banners). Call once consent is
9
+ * granted.
10
+ *
11
+ * Also releases the browser-storage half of the gate, since `init()` pairs
12
+ * `opt_out_persistence_by_default` with the capture opt-out.
13
+ *
14
+ * Warns and does nothing before `init()` - see the note above.
15
+ */
16
+ declare function optInCapturing(): void;
17
+ /**
18
+ * Stops capturing again, for a visitor who WITHDRAWS consent - the other
19
+ * half of a consent banner, and the only one that can act on the current
20
+ * pageload (not loading the SDK next time cannot un-capture this one).
21
+ *
22
+ * Warns and does nothing before `init()` - see the note above.
23
+ */
24
+ declare function optOutCapturing(): void;
3
25
 
4
26
  /**
5
27
  * Link the anonymous visitor to your authenticated user. Call once
@@ -76,6 +98,8 @@ declare function setPersonProperties(set?: HeyCatchPersonProperties, setOnce?: H
76
98
  */
77
99
  declare const analytics: {
78
100
  readonly init: typeof init;
101
+ readonly optInCapturing: typeof optInCapturing;
102
+ readonly optOutCapturing: typeof optOutCapturing;
79
103
  readonly resetIdentity: typeof resetIdentity;
80
104
  readonly setIdentity: typeof setIdentity;
81
105
  readonly setPersonProperties: typeof setPersonProperties;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,27 @@
1
- import { a as HeyCatchPersonProperties, H as HeyCatchConfig, b as HeyCatchProperties, T as TrackOptions } from './shared-B8y8fJCD.js';
2
- export { P as PersonPropertyUpdate, S as SDK_VERSION, c as STAGE, d as ServerTrackOptions } from './shared-B8y8fJCD.js';
1
+ import { d as HeyCatchPersonProperties, b as HeyCatchConfig, e as HeyCatchProperties, T as TrackOptions } from './shared-BFhHwsG8.js';
2
+ export { H as HeyCatchBeforeSend, a as HeyCatchCapturedEvent, c as HeyCatchPersistence, f as HeyCatchSanitizeProperties, K as KNOWN_FRAMEWORKS, g as KNOWN_INSTALL_AGENTS, P as PersonPropertyUpdate, S as SDK_VERSION, h as STAGE, i as ServerTrackOptions, U as UNKNOWN_INSTALL_VALUE } from './shared-BFhHwsG8.js';
3
+
4
+ /**
5
+ * Starts capturing after `optOutCapturingByDefault` gated `init()` from
6
+ * sending anything - the consent-gate alternative to skipping `init()`
7
+ * entirely (the "don't call init" workaround this replaces for customers
8
+ * under GDPR/CookieYes-style consent banners). Call once consent is
9
+ * granted.
10
+ *
11
+ * Also releases the browser-storage half of the gate, since `init()` pairs
12
+ * `opt_out_persistence_by_default` with the capture opt-out.
13
+ *
14
+ * Warns and does nothing before `init()` - see the note above.
15
+ */
16
+ declare function optInCapturing(): void;
17
+ /**
18
+ * Stops capturing again, for a visitor who WITHDRAWS consent - the other
19
+ * half of a consent banner, and the only one that can act on the current
20
+ * pageload (not loading the SDK next time cannot un-capture this one).
21
+ *
22
+ * Warns and does nothing before `init()` - see the note above.
23
+ */
24
+ declare function optOutCapturing(): void;
3
25
 
4
26
  /**
5
27
  * Link the anonymous visitor to your authenticated user. Call once
@@ -76,6 +98,8 @@ declare function setPersonProperties(set?: HeyCatchPersonProperties, setOnce?: H
76
98
  */
77
99
  declare const analytics: {
78
100
  readonly init: typeof init;
101
+ readonly optInCapturing: typeof optInCapturing;
102
+ readonly optOutCapturing: typeof optOutCapturing;
79
103
  readonly resetIdentity: typeof resetIdentity;
80
104
  readonly setIdentity: typeof setIdentity;
81
105
  readonly setPersonProperties: typeof setPersonProperties;