@reopt-ai/data-contract 0.6.3 → 0.7.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.
Files changed (103) hide show
  1. package/dist/client.cjs +228 -321
  2. package/dist/client.cjs.map +1 -1
  3. package/dist/client.d.cts +57 -71
  4. package/dist/client.d.cts.map +1 -0
  5. package/dist/client.d.ts +57 -71
  6. package/dist/client.d.ts.map +1 -0
  7. package/dist/client.js +228 -322
  8. package/dist/client.js.map +1 -1
  9. package/dist/control.cjs +158 -54
  10. package/dist/control.cjs.map +1 -1
  11. package/dist/control.d.cts +121 -137
  12. package/dist/control.d.cts.map +1 -0
  13. package/dist/control.d.ts +121 -137
  14. package/dist/control.d.ts.map +1 -0
  15. package/dist/control.js +134 -54
  16. package/dist/control.js.map +1 -1
  17. package/dist/events-BUIeU60t.d.cts +142 -0
  18. package/dist/events-BUIeU60t.d.cts.map +1 -0
  19. package/dist/events-BUIeU60t.d.ts +142 -0
  20. package/dist/events-BUIeU60t.d.ts.map +1 -0
  21. package/dist/events.cjs +110 -15
  22. package/dist/events.cjs.map +1 -1
  23. package/dist/events.d.cts +2 -59
  24. package/dist/events.d.ts +2 -59
  25. package/dist/events.js +101 -15
  26. package/dist/events.js.map +1 -1
  27. package/dist/identity.cjs +150 -55
  28. package/dist/identity.cjs.map +1 -1
  29. package/dist/identity.d.cts +21 -20
  30. package/dist/identity.d.cts.map +1 -0
  31. package/dist/identity.d.ts +21 -20
  32. package/dist/identity.d.ts.map +1 -0
  33. package/dist/identity.js +126 -56
  34. package/dist/identity.js.map +1 -1
  35. package/dist/index.cjs +46 -25
  36. package/dist/index.cjs.map +1 -1
  37. package/dist/index.d.cts +37 -54
  38. package/dist/index.d.cts.map +1 -0
  39. package/dist/index.d.ts +37 -54
  40. package/dist/index.d.ts.map +1 -0
  41. package/dist/index.js +36 -25
  42. package/dist/index.js.map +1 -1
  43. package/dist/ingest.cjs +152 -57
  44. package/dist/ingest.cjs.map +1 -1
  45. package/dist/ingest.d.cts +182 -193
  46. package/dist/ingest.d.cts.map +1 -0
  47. package/dist/ingest.d.ts +182 -193
  48. package/dist/ingest.d.ts.map +1 -0
  49. package/dist/ingest.js +126 -57
  50. package/dist/ingest.js.map +1 -1
  51. package/dist/query.cjs +284 -84
  52. package/dist/query.cjs.map +1 -1
  53. package/dist/query.d.cts +456 -469
  54. package/dist/query.d.cts.map +1 -0
  55. package/dist/query.d.ts +456 -469
  56. package/dist/query.d.ts.map +1 -0
  57. package/dist/query.js +245 -84
  58. package/dist/query.js.map +1 -1
  59. package/dist/report.cjs +104 -74
  60. package/dist/report.cjs.map +1 -1
  61. package/dist/report.d.cts +182 -136
  62. package/dist/report.d.cts.map +1 -0
  63. package/dist/report.d.ts +182 -136
  64. package/dist/report.d.ts.map +1 -0
  65. package/dist/report.js +93 -74
  66. package/dist/report.js.map +1 -1
  67. package/dist/version-B_0qb1_K.cjs +53 -0
  68. package/dist/version-B_0qb1_K.cjs.map +1 -0
  69. package/dist/version-C09Cyf4R.js +12 -0
  70. package/dist/version-C09Cyf4R.js.map +1 -0
  71. package/dist/{version-DJ2Grb_N.d.ts → version-CGujUGWd.d.cts} +5 -3
  72. package/dist/version-CGujUGWd.d.cts.map +1 -0
  73. package/dist/{version-DJ2Grb_N.d.cts → version-CGujUGWd.d.ts} +5 -3
  74. package/dist/version-CGujUGWd.d.ts.map +1 -0
  75. package/package.json +69 -28
  76. package/dist/chunk-3EEANNYN.cjs +0 -62
  77. package/dist/chunk-3EEANNYN.cjs.map +0 -1
  78. package/dist/chunk-7W33YGRO.js +0 -160
  79. package/dist/chunk-7W33YGRO.js.map +0 -1
  80. package/dist/chunk-F2RNXJGO.cjs +0 -19
  81. package/dist/chunk-F2RNXJGO.cjs.map +0 -1
  82. package/dist/chunk-FP2X3PRK.js +0 -62
  83. package/dist/chunk-FP2X3PRK.js.map +0 -1
  84. package/dist/chunk-JCEWUSUM.js +0 -53
  85. package/dist/chunk-JCEWUSUM.js.map +0 -1
  86. package/dist/chunk-L3JPDRVG.cjs +0 -160
  87. package/dist/chunk-L3JPDRVG.cjs.map +0 -1
  88. package/dist/chunk-L4KBQAOO.js +0 -204
  89. package/dist/chunk-L4KBQAOO.js.map +0 -1
  90. package/dist/chunk-NJ4JKNBX.js +0 -361
  91. package/dist/chunk-NJ4JKNBX.js.map +0 -1
  92. package/dist/chunk-ORNTN6AK.cjs +0 -53
  93. package/dist/chunk-ORNTN6AK.cjs.map +0 -1
  94. package/dist/chunk-PSUINLW7.js +0 -19
  95. package/dist/chunk-PSUINLW7.js.map +0 -1
  96. package/dist/chunk-RU26QFM2.js +0 -179
  97. package/dist/chunk-RU26QFM2.js.map +0 -1
  98. package/dist/chunk-XDH5QQYF.cjs +0 -361
  99. package/dist/chunk-XDH5QQYF.cjs.map +0 -1
  100. package/dist/chunk-YCTGHWTP.cjs +0 -204
  101. package/dist/chunk-YCTGHWTP.cjs.map +0 -1
  102. package/dist/chunk-ZI6A3WQP.cjs +0 -179
  103. package/dist/chunk-ZI6A3WQP.cjs.map +0 -1
@@ -0,0 +1,142 @@
1
+ //#region src/events.d.ts
2
+ /**
3
+ * `@reopt-ai/data-contract/events` — event names and property keys, with no
4
+ * zod. Browser SDKs import this so their production bundles stay free of
5
+ * schema code; `./ingest` re-exports everything here.
6
+ */
7
+ /** Event names the pipeline reserves for its own session bookkeeping. */
8
+ declare const RESERVED_EVENT_NAMES: readonly ["session_start", "session_end", "screen_view"];
9
+ /**
10
+ * Events the SDKs emit on their own. One declaration, so a consumer that
11
+ * registers them in its event catalogue (to make them roll up) cannot drift
12
+ * from what the SDK actually sends — a drifted name silently falls back to
13
+ * raw queries, which is slower but not visibly wrong.
14
+ */
15
+ declare const AUTO_EVENT_NAMES: {
16
+ readonly pageview: "$pageview";
17
+ readonly screenView: "$screen_view";
18
+ readonly pageleave: "$pageleave";
19
+ readonly webVitals: "$web_vitals";
20
+ readonly exception: "$exception";
21
+ };
22
+ type AutoEventName = (typeof AUTO_EVENT_NAMES)[keyof typeof AUTO_EVENT_NAMES];
23
+ /**
24
+ * Property keys each automatic event carries. Consumers derive their
25
+ * breakdown / rollup property lists from here rather than retyping them.
26
+ * `path`, `origin`, `referrer` and `utm_*` are the keys the ingest pipeline
27
+ * reads into session and event columns.
28
+ */
29
+ declare const AUTO_EVENT_PROPERTIES: {
30
+ readonly $pageview: readonly ["path", "origin", "title", "referrer", "search", "utm_source", "utm_medium", "utm_campaign", "utm_term", "utm_content"];
31
+ readonly $screen_view: readonly ["screen_name"];
32
+ readonly $pageleave: readonly ["path", "origin", "duration", "scroll_depth", "scroll_depth_bucket"];
33
+ readonly $web_vitals: readonly ["metric_name", "metric_id", "value", "delta", "rating", "navigation_type", "path"];
34
+ readonly $exception: readonly ["$exception_type", "$exception_message", "$exception_stack", "$exception_source", "$exception_handled", "$exception_list", "$exception_level", "$exception_fingerprint", "$exception_steps", "path"];
35
+ };
36
+ /**
37
+ * The subset of {@link AUTO_EVENT_PROPERTIES} that is a sensible rollup
38
+ * dimension: low cardinality, categorical. Per-measurement ids and
39
+ * continuous values (`metric_id`, `value`, `delta`, `duration`,
40
+ * `scroll_depth`) are deliberately absent — as dimensions they would make
41
+ * the rollup larger than the raw table it summarises. Derive
42
+ * `rollupProperties` from here, not from the full property list.
43
+ */
44
+ declare const AUTO_EVENT_ROLLUP_KEYS: {
45
+ readonly $pageview: readonly ["path", "origin", "referrer", "utm_source", "utm_medium", "utm_campaign"];
46
+ readonly $screen_view: readonly ["screen_name"];
47
+ readonly $pageleave: readonly ["path", "origin", "scroll_depth_bucket"];
48
+ readonly $web_vitals: readonly ["metric_name", "rating", "navigation_type", "path"];
49
+ readonly $exception: readonly ["$exception_type", "$exception_source", "$exception_handled", "path", "$exception_fingerprint"];
50
+ };
51
+ /**
52
+ * How deep a `cause` chain is carried, and how many frames of each exception.
53
+ *
54
+ * Both caps are part of the contract rather than each SDK's own opinion: the
55
+ * server fingerprints exactly what it receives, so a client that sent more
56
+ * frames than the server hashes would group differently from one that sent
57
+ * fewer, for the same error.
58
+ */
59
+ /**
60
+ * The property carrying the host's build identity.
61
+ *
62
+ * Not in {@link AUTO_EVENT_PROPERTIES}: it is not specific to any automatic
63
+ * event — every event the SDK sends carries it once `release` is configured,
64
+ * the same way a global property does. Error tracking is what reads it, to say
65
+ * which build an issue first and last appeared in and whether a fix held.
66
+ */
67
+ declare const RELEASE_PROPERTY = "$release_id";
68
+ declare const MAX_EXCEPTION_CHAIN = 4;
69
+ declare const MAX_EXCEPTION_FRAMES = 50;
70
+ /**
71
+ * One stack frame, in the shape OTel and Sentry both use.
72
+ *
73
+ * snake_case because it is a wire format, not a JS object — renaming these on
74
+ * the way in or out is how two SDKs end up disagreeing about the same frame.
75
+ */
76
+ interface ExceptionFrame {
77
+ /** The file the frame ran in. Absent for a frame no parser could place. */
78
+ filename?: string;
79
+ /** Empty or absent for an anonymous frame. */
80
+ function?: string;
81
+ /** Dotted module path, where the runtime has one. */
82
+ module?: string;
83
+ lineno?: number;
84
+ colno?: number;
85
+ /**
86
+ * The frame belongs to the app rather than a dependency, the runtime, or a
87
+ * browser extension. Drives the stack panel's default filter, and V1
88
+ * fingerprinting.
89
+ */
90
+ in_app?: boolean;
91
+ /**
92
+ * A source map resolved `function` to its original name. Fingerprinting then
93
+ * drops line and column, because a resolved name survives a rebuild that
94
+ * shifts them.
95
+ */
96
+ resolved?: boolean;
97
+ /** Source context, when a symbolication step has it (WS-E). */
98
+ context_line?: string;
99
+ pre_context?: string[];
100
+ post_context?: string[];
101
+ /** Build-injected chunk id, so a source map can be matched without the URL. */
102
+ chunk_id?: string;
103
+ }
104
+ /** Where an exception came from, and whether anyone caught it. */
105
+ interface ExceptionMechanism {
106
+ /** False means nothing caught it — the error reached the runtime's handler. */
107
+ handled: boolean;
108
+ type: "onerror" | "unhandledrejection" | "manual" | "console" | "nextjs_onRequestError";
109
+ /** The Error was constructed by the SDK to carry a non-Error throw. */
110
+ synthetic?: boolean;
111
+ }
112
+ /** One exception in a cause chain. */
113
+ interface ExceptionEntry {
114
+ type: string;
115
+ value: string;
116
+ mechanism: ExceptionMechanism;
117
+ stacktrace?: {
118
+ frames: ExceptionFrame[];
119
+ /** `raw` means the frames are as the engine reported them — not symbolicated. */
120
+ type: "raw";
121
+ };
122
+ }
123
+ /** A breadcrumb leading up to an exception (A5). */
124
+ interface ExceptionStep {
125
+ /** Epoch milliseconds. */
126
+ timestamp: number;
127
+ category: "navigation" | "click" | "fetch" | "console" | "custom";
128
+ message: string;
129
+ data?: Record<string, unknown>;
130
+ }
131
+ type ExceptionLevel = "fatal" | "error" | "warning" | "info";
132
+ /**
133
+ * `$pageleave.scroll_depth` is the exact 0–100 percentage; `scroll_depth_bucket`
134
+ * is the deepest of these thresholds reached, as a string — the value to
135
+ * break down by. `"0"` means the visitor never reached the first threshold.
136
+ */
137
+ declare const SCROLL_DEPTH_BUCKETS: readonly [25, 50, 75, 100];
138
+ type ScrollDepthBucket = "0" | `${(typeof SCROLL_DEPTH_BUCKETS)[number]}`;
139
+ declare function scrollDepthBucket(depth: number): ScrollDepthBucket;
140
+ //#endregion
141
+ export { ExceptionEntry as a, ExceptionMechanism as c, MAX_EXCEPTION_FRAMES as d, RELEASE_PROPERTY as f, scrollDepthBucket as g, ScrollDepthBucket as h, AutoEventName as i, ExceptionStep as l, SCROLL_DEPTH_BUCKETS as m, AUTO_EVENT_PROPERTIES as n, ExceptionFrame as o, RESERVED_EVENT_NAMES as p, AUTO_EVENT_ROLLUP_KEYS as r, ExceptionLevel as s, AUTO_EVENT_NAMES as t, MAX_EXCEPTION_CHAIN as u };
142
+ //# sourceMappingURL=events-BUIeU60t.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events-BUIeU60t.d.cts","names":[],"sources":["../src/events.ts"],"mappings":";;;;;;;cAOa;;;;;;;cAQA;;;;;;;KAOD,wBAAwB,+BAA+B;;;;;;;cAQtD;;;;;;;;;;;;;;;cA2CA;;;;;;;;;;;;;;;;;;;;;;;cAwCA;cAEA;cACA;;;;;;;UAQI;;EAEf;;EAEA;;EAEA;EACA;EACA;;;;;;EAMA;;;;;;EAMA;;EAEA;EACA;EACA;;EAEA;;;UAIe;;EAEf;EACA;;EAEA;;;UAIe;EACf;EACA;EACA,WAAW;EACX;IACE,QAAQ;;IAER;;;;UAKa;;EAEf;EACA;EACA;EACA,OAAO;;KAGG;;;;;;cAOC;KACD,qCAAqC;iBAEjC,kBAAkB,gBAAgB"}
@@ -0,0 +1,142 @@
1
+ //#region src/events.d.ts
2
+ /**
3
+ * `@reopt-ai/data-contract/events` — event names and property keys, with no
4
+ * zod. Browser SDKs import this so their production bundles stay free of
5
+ * schema code; `./ingest` re-exports everything here.
6
+ */
7
+ /** Event names the pipeline reserves for its own session bookkeeping. */
8
+ declare const RESERVED_EVENT_NAMES: readonly ["session_start", "session_end", "screen_view"];
9
+ /**
10
+ * Events the SDKs emit on their own. One declaration, so a consumer that
11
+ * registers them in its event catalogue (to make them roll up) cannot drift
12
+ * from what the SDK actually sends — a drifted name silently falls back to
13
+ * raw queries, which is slower but not visibly wrong.
14
+ */
15
+ declare const AUTO_EVENT_NAMES: {
16
+ readonly pageview: "$pageview";
17
+ readonly screenView: "$screen_view";
18
+ readonly pageleave: "$pageleave";
19
+ readonly webVitals: "$web_vitals";
20
+ readonly exception: "$exception";
21
+ };
22
+ type AutoEventName = (typeof AUTO_EVENT_NAMES)[keyof typeof AUTO_EVENT_NAMES];
23
+ /**
24
+ * Property keys each automatic event carries. Consumers derive their
25
+ * breakdown / rollup property lists from here rather than retyping them.
26
+ * `path`, `origin`, `referrer` and `utm_*` are the keys the ingest pipeline
27
+ * reads into session and event columns.
28
+ */
29
+ declare const AUTO_EVENT_PROPERTIES: {
30
+ readonly $pageview: readonly ["path", "origin", "title", "referrer", "search", "utm_source", "utm_medium", "utm_campaign", "utm_term", "utm_content"];
31
+ readonly $screen_view: readonly ["screen_name"];
32
+ readonly $pageleave: readonly ["path", "origin", "duration", "scroll_depth", "scroll_depth_bucket"];
33
+ readonly $web_vitals: readonly ["metric_name", "metric_id", "value", "delta", "rating", "navigation_type", "path"];
34
+ readonly $exception: readonly ["$exception_type", "$exception_message", "$exception_stack", "$exception_source", "$exception_handled", "$exception_list", "$exception_level", "$exception_fingerprint", "$exception_steps", "path"];
35
+ };
36
+ /**
37
+ * The subset of {@link AUTO_EVENT_PROPERTIES} that is a sensible rollup
38
+ * dimension: low cardinality, categorical. Per-measurement ids and
39
+ * continuous values (`metric_id`, `value`, `delta`, `duration`,
40
+ * `scroll_depth`) are deliberately absent — as dimensions they would make
41
+ * the rollup larger than the raw table it summarises. Derive
42
+ * `rollupProperties` from here, not from the full property list.
43
+ */
44
+ declare const AUTO_EVENT_ROLLUP_KEYS: {
45
+ readonly $pageview: readonly ["path", "origin", "referrer", "utm_source", "utm_medium", "utm_campaign"];
46
+ readonly $screen_view: readonly ["screen_name"];
47
+ readonly $pageleave: readonly ["path", "origin", "scroll_depth_bucket"];
48
+ readonly $web_vitals: readonly ["metric_name", "rating", "navigation_type", "path"];
49
+ readonly $exception: readonly ["$exception_type", "$exception_source", "$exception_handled", "path", "$exception_fingerprint"];
50
+ };
51
+ /**
52
+ * How deep a `cause` chain is carried, and how many frames of each exception.
53
+ *
54
+ * Both caps are part of the contract rather than each SDK's own opinion: the
55
+ * server fingerprints exactly what it receives, so a client that sent more
56
+ * frames than the server hashes would group differently from one that sent
57
+ * fewer, for the same error.
58
+ */
59
+ /**
60
+ * The property carrying the host's build identity.
61
+ *
62
+ * Not in {@link AUTO_EVENT_PROPERTIES}: it is not specific to any automatic
63
+ * event — every event the SDK sends carries it once `release` is configured,
64
+ * the same way a global property does. Error tracking is what reads it, to say
65
+ * which build an issue first and last appeared in and whether a fix held.
66
+ */
67
+ declare const RELEASE_PROPERTY = "$release_id";
68
+ declare const MAX_EXCEPTION_CHAIN = 4;
69
+ declare const MAX_EXCEPTION_FRAMES = 50;
70
+ /**
71
+ * One stack frame, in the shape OTel and Sentry both use.
72
+ *
73
+ * snake_case because it is a wire format, not a JS object — renaming these on
74
+ * the way in or out is how two SDKs end up disagreeing about the same frame.
75
+ */
76
+ interface ExceptionFrame {
77
+ /** The file the frame ran in. Absent for a frame no parser could place. */
78
+ filename?: string;
79
+ /** Empty or absent for an anonymous frame. */
80
+ function?: string;
81
+ /** Dotted module path, where the runtime has one. */
82
+ module?: string;
83
+ lineno?: number;
84
+ colno?: number;
85
+ /**
86
+ * The frame belongs to the app rather than a dependency, the runtime, or a
87
+ * browser extension. Drives the stack panel's default filter, and V1
88
+ * fingerprinting.
89
+ */
90
+ in_app?: boolean;
91
+ /**
92
+ * A source map resolved `function` to its original name. Fingerprinting then
93
+ * drops line and column, because a resolved name survives a rebuild that
94
+ * shifts them.
95
+ */
96
+ resolved?: boolean;
97
+ /** Source context, when a symbolication step has it (WS-E). */
98
+ context_line?: string;
99
+ pre_context?: string[];
100
+ post_context?: string[];
101
+ /** Build-injected chunk id, so a source map can be matched without the URL. */
102
+ chunk_id?: string;
103
+ }
104
+ /** Where an exception came from, and whether anyone caught it. */
105
+ interface ExceptionMechanism {
106
+ /** False means nothing caught it — the error reached the runtime's handler. */
107
+ handled: boolean;
108
+ type: "onerror" | "unhandledrejection" | "manual" | "console" | "nextjs_onRequestError";
109
+ /** The Error was constructed by the SDK to carry a non-Error throw. */
110
+ synthetic?: boolean;
111
+ }
112
+ /** One exception in a cause chain. */
113
+ interface ExceptionEntry {
114
+ type: string;
115
+ value: string;
116
+ mechanism: ExceptionMechanism;
117
+ stacktrace?: {
118
+ frames: ExceptionFrame[];
119
+ /** `raw` means the frames are as the engine reported them — not symbolicated. */
120
+ type: "raw";
121
+ };
122
+ }
123
+ /** A breadcrumb leading up to an exception (A5). */
124
+ interface ExceptionStep {
125
+ /** Epoch milliseconds. */
126
+ timestamp: number;
127
+ category: "navigation" | "click" | "fetch" | "console" | "custom";
128
+ message: string;
129
+ data?: Record<string, unknown>;
130
+ }
131
+ type ExceptionLevel = "fatal" | "error" | "warning" | "info";
132
+ /**
133
+ * `$pageleave.scroll_depth` is the exact 0–100 percentage; `scroll_depth_bucket`
134
+ * is the deepest of these thresholds reached, as a string — the value to
135
+ * break down by. `"0"` means the visitor never reached the first threshold.
136
+ */
137
+ declare const SCROLL_DEPTH_BUCKETS: readonly [25, 50, 75, 100];
138
+ type ScrollDepthBucket = "0" | `${(typeof SCROLL_DEPTH_BUCKETS)[number]}`;
139
+ declare function scrollDepthBucket(depth: number): ScrollDepthBucket;
140
+ //#endregion
141
+ export { ExceptionEntry as a, ExceptionMechanism as c, MAX_EXCEPTION_FRAMES as d, RELEASE_PROPERTY as f, scrollDepthBucket as g, ScrollDepthBucket as h, AutoEventName as i, ExceptionStep as l, SCROLL_DEPTH_BUCKETS as m, AUTO_EVENT_PROPERTIES as n, ExceptionFrame as o, RESERVED_EVENT_NAMES as p, AUTO_EVENT_ROLLUP_KEYS as r, ExceptionLevel as s, AUTO_EVENT_NAMES as t, MAX_EXCEPTION_CHAIN as u };
142
+ //# sourceMappingURL=events-BUIeU60t.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events-BUIeU60t.d.ts","names":[],"sources":["../src/events.ts"],"mappings":";;;;;;;cAOa;;;;;;;cAQA;;;;;;;KAOD,wBAAwB,+BAA+B;;;;;;;cAQtD;;;;;;;;;;;;;;;cA2CA;;;;;;;;;;;;;;;;;;;;;;;cAwCA;cAEA;cACA;;;;;;;UAQI;;EAEf;;EAEA;;EAEA;EACA;EACA;;;;;;EAMA;;;;;;EAMA;;EAEA;EACA;EACA;;EAEA;;;UAIe;;EAEf;EACA;;EAEA;;;UAIe;EACf;EACA;EACA,WAAW;EACX;IACE,QAAQ;;IAER;;;;UAKa;;EAEf;EACA;EACA;EACA,OAAO;;KAGG;;;;;;cAOC;KACD,qCAAqC;iBAEjC,kBAAkB,gBAAgB"}
package/dist/events.cjs CHANGED
@@ -1,17 +1,112 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ //#region src/events.ts
3
+ const RESERVED_EVENT_NAMES = [
4
+ "session_start",
5
+ "session_end",
6
+ "screen_view"
7
+ ];
8
+ const AUTO_EVENT_NAMES = {
9
+ pageview: "$pageview",
10
+ screenView: "$screen_view",
11
+ pageleave: "$pageleave",
12
+ webVitals: "$web_vitals",
13
+ exception: "$exception"
14
+ };
15
+ const AUTO_EVENT_PROPERTIES = {
16
+ [AUTO_EVENT_NAMES.pageview]: [
17
+ "path",
18
+ "origin",
19
+ "title",
20
+ "referrer",
21
+ "search",
22
+ "utm_source",
23
+ "utm_medium",
24
+ "utm_campaign",
25
+ "utm_term",
26
+ "utm_content"
27
+ ],
28
+ [AUTO_EVENT_NAMES.screenView]: ["screen_name"],
29
+ [AUTO_EVENT_NAMES.pageleave]: [
30
+ "path",
31
+ "origin",
32
+ "duration",
33
+ "scroll_depth",
34
+ "scroll_depth_bucket"
35
+ ],
36
+ [AUTO_EVENT_NAMES.webVitals]: [
37
+ "metric_name",
38
+ "metric_id",
39
+ "value",
40
+ "delta",
41
+ "rating",
42
+ "navigation_type",
43
+ "path"
44
+ ],
45
+ [AUTO_EVENT_NAMES.exception]: [
46
+ "$exception_type",
47
+ "$exception_message",
48
+ "$exception_stack",
49
+ "$exception_source",
50
+ "$exception_handled",
51
+ "$exception_list",
52
+ "$exception_level",
53
+ "$exception_fingerprint",
54
+ "$exception_steps",
55
+ "path"
56
+ ]
57
+ };
58
+ const AUTO_EVENT_ROLLUP_KEYS = {
59
+ [AUTO_EVENT_NAMES.pageview]: [
60
+ "path",
61
+ "origin",
62
+ "referrer",
63
+ "utm_source",
64
+ "utm_medium",
65
+ "utm_campaign"
66
+ ],
67
+ [AUTO_EVENT_NAMES.screenView]: ["screen_name"],
68
+ [AUTO_EVENT_NAMES.pageleave]: [
69
+ "path",
70
+ "origin",
71
+ "scroll_depth_bucket"
72
+ ],
73
+ [AUTO_EVENT_NAMES.webVitals]: [
74
+ "metric_name",
75
+ "rating",
76
+ "navigation_type",
77
+ "path"
78
+ ],
79
+ [AUTO_EVENT_NAMES.exception]: [
80
+ "$exception_type",
81
+ "$exception_source",
82
+ "$exception_handled",
83
+ "path",
84
+ "$exception_fingerprint"
85
+ ]
86
+ };
87
+ const RELEASE_PROPERTY = "$release_id";
88
+ const MAX_EXCEPTION_CHAIN = 4;
89
+ const MAX_EXCEPTION_FRAMES = 50;
90
+ const SCROLL_DEPTH_BUCKETS = [
91
+ 25,
92
+ 50,
93
+ 75,
94
+ 100
95
+ ];
96
+ function scrollDepthBucket(depth) {
97
+ let reached = "0";
98
+ for (const threshold of SCROLL_DEPTH_BUCKETS) if (depth >= threshold) reached = `${threshold}`;
99
+ return reached;
100
+ }
101
+ //#endregion
102
+ exports.AUTO_EVENT_NAMES = AUTO_EVENT_NAMES;
103
+ exports.AUTO_EVENT_PROPERTIES = AUTO_EVENT_PROPERTIES;
104
+ exports.AUTO_EVENT_ROLLUP_KEYS = AUTO_EVENT_ROLLUP_KEYS;
105
+ exports.MAX_EXCEPTION_CHAIN = MAX_EXCEPTION_CHAIN;
106
+ exports.MAX_EXCEPTION_FRAMES = MAX_EXCEPTION_FRAMES;
107
+ exports.RELEASE_PROPERTY = RELEASE_PROPERTY;
108
+ exports.RESERVED_EVENT_NAMES = RESERVED_EVENT_NAMES;
109
+ exports.SCROLL_DEPTH_BUCKETS = SCROLL_DEPTH_BUCKETS;
110
+ exports.scrollDepthBucket = scrollDepthBucket;
2
111
 
3
-
4
-
5
-
6
-
7
-
8
- var _chunk3EEANNYNcjs = require('./chunk-3EEANNYN.cjs');
9
-
10
-
11
-
12
-
13
-
14
-
15
-
16
- exports.AUTO_EVENT_NAMES = _chunk3EEANNYNcjs.AUTO_EVENT_NAMES; exports.AUTO_EVENT_PROPERTIES = _chunk3EEANNYNcjs.AUTO_EVENT_PROPERTIES; exports.AUTO_EVENT_ROLLUP_KEYS = _chunk3EEANNYNcjs.AUTO_EVENT_ROLLUP_KEYS; exports.RESERVED_EVENT_NAMES = _chunk3EEANNYNcjs.RESERVED_EVENT_NAMES; exports.SCROLL_DEPTH_BUCKETS = _chunk3EEANNYNcjs.SCROLL_DEPTH_BUCKETS; exports.scrollDepthBucket = _chunk3EEANNYNcjs.scrollDepthBucket;
17
112
  //# sourceMappingURL=events.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/eric/reopt-ai/reopt-data/packages/data-contract/dist/events.cjs"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACF,iaAAC","file":"/Users/eric/reopt-ai/reopt-data/packages/data-contract/dist/events.cjs"}
1
+ {"version":3,"file":"events.cjs","names":[],"sources":["../src/events.ts"],"sourcesContent":["/**\n * `@reopt-ai/data-contract/events` — event names and property keys, with no\n * zod. Browser SDKs import this so their production bundles stay free of\n * schema code; `./ingest` re-exports everything here.\n */\n\n/** Event names the pipeline reserves for its own session bookkeeping. */\nexport const RESERVED_EVENT_NAMES = [\"session_start\", \"session_end\", \"screen_view\"] as const;\n\n/**\n * Events the SDKs emit on their own. One declaration, so a consumer that\n * registers them in its event catalogue (to make them roll up) cannot drift\n * from what the SDK actually sends — a drifted name silently falls back to\n * raw queries, which is slower but not visibly wrong.\n */\nexport const AUTO_EVENT_NAMES = {\n pageview: \"$pageview\",\n screenView: \"$screen_view\",\n pageleave: \"$pageleave\",\n webVitals: \"$web_vitals\",\n exception: \"$exception\",\n} as const;\nexport type AutoEventName = (typeof AUTO_EVENT_NAMES)[keyof typeof AUTO_EVENT_NAMES];\n\n/**\n * Property keys each automatic event carries. Consumers derive their\n * breakdown / rollup property lists from here rather than retyping them.\n * `path`, `origin`, `referrer` and `utm_*` are the keys the ingest pipeline\n * reads into session and event columns.\n */\nexport const AUTO_EVENT_PROPERTIES = {\n [AUTO_EVENT_NAMES.pageview]: [\n \"path\",\n \"origin\",\n \"title\",\n \"referrer\",\n \"search\",\n \"utm_source\",\n \"utm_medium\",\n \"utm_campaign\",\n \"utm_term\",\n \"utm_content\",\n ],\n [AUTO_EVENT_NAMES.screenView]: [\"screen_name\"],\n [AUTO_EVENT_NAMES.pageleave]: [\"path\", \"origin\", \"duration\", \"scroll_depth\", \"scroll_depth_bucket\"],\n [AUTO_EVENT_NAMES.webVitals]: [\"metric_name\", \"metric_id\", \"value\", \"delta\", \"rating\", \"navigation_type\", \"path\"],\n // `$`-prefixed on purpose: these are reserved, SDK-owned keys with fixed\n // semantics, distinguished from a host's own snake_case vocabulary the\n // same way the event names are. Not a typo — do not strip the prefix.\n [AUTO_EVENT_NAMES.exception]: [\n \"$exception_type\",\n \"$exception_message\",\n \"$exception_stack\",\n \"$exception_source\",\n \"$exception_handled\",\n // Structured form. The flat keys above stay for every consumer written\n // against them, and because V1 fingerprinting and the rollup keys read them.\n \"$exception_list\",\n \"$exception_level\",\n \"$exception_fingerprint\",\n \"$exception_steps\",\n \"path\",\n ],\n} as const satisfies Record<AutoEventName, readonly string[]>;\n\n/**\n * The subset of {@link AUTO_EVENT_PROPERTIES} that is a sensible rollup\n * dimension: low cardinality, categorical. Per-measurement ids and\n * continuous values (`metric_id`, `value`, `delta`, `duration`,\n * `scroll_depth`) are deliberately absent — as dimensions they would make\n * the rollup larger than the raw table it summarises. Derive\n * `rollupProperties` from here, not from the full property list.\n */\nexport const AUTO_EVENT_ROLLUP_KEYS = {\n [AUTO_EVENT_NAMES.pageview]: [\"path\", \"origin\", \"referrer\", \"utm_source\", \"utm_medium\", \"utm_campaign\"],\n [AUTO_EVENT_NAMES.screenView]: [\"screen_name\"],\n [AUTO_EVENT_NAMES.pageleave]: [\"path\", \"origin\", \"scroll_depth_bucket\"],\n [AUTO_EVENT_NAMES.webVitals]: [\"metric_name\", \"rating\", \"navigation_type\", \"path\"],\n [AUTO_EVENT_NAMES.exception]: [\n \"$exception_type\",\n \"$exception_source\",\n \"$exception_handled\",\n \"path\",\n // The one high-ish cardinality key in this table, and deliberately so: a\n // fingerprint is one per *issue*, not one per occurrence, so its cardinality\n // is the size of the issue list — hundreds, where `path` on a busy site is\n // thousands. Rolling it up is what lets the issue list read a whole month\n // without scanning every exception event. The per-day `__other__` fold still\n // applies, and the read refuses the rollup when it has folded (see\n // `errorFingerprintVolumes`), because a folded fingerprint would report zero\n // rather than \"unknown\".\n \"$exception_fingerprint\",\n ],\n} as const satisfies Record<AutoEventName, readonly string[]>;\n\n// ─── Exceptions ─────────────────────────────────────────────────────────────\n\n/**\n * How deep a `cause` chain is carried, and how many frames of each exception.\n *\n * Both caps are part of the contract rather than each SDK's own opinion: the\n * server fingerprints exactly what it receives, so a client that sent more\n * frames than the server hashes would group differently from one that sent\n * fewer, for the same error.\n */\n/**\n * The property carrying the host's build identity.\n *\n * Not in {@link AUTO_EVENT_PROPERTIES}: it is not specific to any automatic\n * event — every event the SDK sends carries it once `release` is configured,\n * the same way a global property does. Error tracking is what reads it, to say\n * which build an issue first and last appeared in and whether a fix held.\n */\nexport const RELEASE_PROPERTY = \"$release_id\";\n\nexport const MAX_EXCEPTION_CHAIN = 4;\nexport const MAX_EXCEPTION_FRAMES = 50;\n\n/**\n * One stack frame, in the shape OTel and Sentry both use.\n *\n * snake_case because it is a wire format, not a JS object — renaming these on\n * the way in or out is how two SDKs end up disagreeing about the same frame.\n */\nexport interface ExceptionFrame {\n /** The file the frame ran in. Absent for a frame no parser could place. */\n filename?: string;\n /** Empty or absent for an anonymous frame. */\n function?: string;\n /** Dotted module path, where the runtime has one. */\n module?: string;\n lineno?: number;\n colno?: number;\n /**\n * The frame belongs to the app rather than a dependency, the runtime, or a\n * browser extension. Drives the stack panel's default filter, and V1\n * fingerprinting.\n */\n in_app?: boolean;\n /**\n * A source map resolved `function` to its original name. Fingerprinting then\n * drops line and column, because a resolved name survives a rebuild that\n * shifts them.\n */\n resolved?: boolean;\n /** Source context, when a symbolication step has it (WS-E). */\n context_line?: string;\n pre_context?: string[];\n post_context?: string[];\n /** Build-injected chunk id, so a source map can be matched without the URL. */\n chunk_id?: string;\n}\n\n/** Where an exception came from, and whether anyone caught it. */\nexport interface ExceptionMechanism {\n /** False means nothing caught it — the error reached the runtime's handler. */\n handled: boolean;\n type: \"onerror\" | \"unhandledrejection\" | \"manual\" | \"console\" | \"nextjs_onRequestError\";\n /** The Error was constructed by the SDK to carry a non-Error throw. */\n synthetic?: boolean;\n}\n\n/** One exception in a cause chain. */\nexport interface ExceptionEntry {\n type: string;\n value: string;\n mechanism: ExceptionMechanism;\n stacktrace?: {\n frames: ExceptionFrame[];\n /** `raw` means the frames are as the engine reported them — not symbolicated. */\n type: \"raw\";\n };\n}\n\n/** A breadcrumb leading up to an exception (A5). */\nexport interface ExceptionStep {\n /** Epoch milliseconds. */\n timestamp: number;\n category: \"navigation\" | \"click\" | \"fetch\" | \"console\" | \"custom\";\n message: string;\n data?: Record<string, unknown>;\n}\n\nexport type ExceptionLevel = \"fatal\" | \"error\" | \"warning\" | \"info\";\n\n/**\n * `$pageleave.scroll_depth` is the exact 0–100 percentage; `scroll_depth_bucket`\n * is the deepest of these thresholds reached, as a string — the value to\n * break down by. `\"0\"` means the visitor never reached the first threshold.\n */\nexport const SCROLL_DEPTH_BUCKETS = [25, 50, 75, 100] as const;\nexport type ScrollDepthBucket = \"0\" | `${(typeof SCROLL_DEPTH_BUCKETS)[number]}`;\n\nexport function scrollDepthBucket(depth: number): ScrollDepthBucket {\n let reached: ScrollDepthBucket = \"0\";\n for (const threshold of SCROLL_DEPTH_BUCKETS) {\n if (depth >= threshold) reached = `${threshold}`;\n }\n return reached;\n}\n"],"mappings":";;AAOA,MAAa,uBAAuB;CAAC;CAAiB;CAAe;AAAa;AAQlF,MAAa,mBAAmB;CAC9B,UAAU;CACV,YAAY;CACZ,WAAW;CACX,WAAW;CACX,WAAW;AACb;AASA,MAAa,wBAAwB;EAClC,iBAAiB,WAAW;EAC3B;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;EACC,iBAAiB,aAAa,CAAC,aAAa;EAC5C,iBAAiB,YAAY;EAAC;EAAQ;EAAU;EAAY;EAAgB;CAAqB;EACjG,iBAAiB,YAAY;EAAC;EAAe;EAAa;EAAS;EAAS;EAAU;EAAmB;CAAM;EAI/G,iBAAiB,YAAY;EAC5B;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;CACF;AACF;AAUA,MAAa,yBAAyB;EACnC,iBAAiB,WAAW;EAAC;EAAQ;EAAU;EAAY;EAAc;EAAc;CAAc;EACrG,iBAAiB,aAAa,CAAC,aAAa;EAC5C,iBAAiB,YAAY;EAAC;EAAQ;EAAU;CAAqB;EACrE,iBAAiB,YAAY;EAAC;EAAe;EAAU;EAAmB;CAAM;EAChF,iBAAiB,YAAY;EAC5B;EACA;EACA;EACA;EASA;CACF;AACF;AAoBA,MAAa,mBAAmB;AAEhC,MAAa,sBAAsB;AACnC,MAAa,uBAAuB;AA0EpC,MAAa,uBAAuB;CAAC;CAAI;CAAI;CAAI;AAAG;AAGpD,SAAgB,kBAAkB,OAAkC;CAClE,IAAI,UAA6B;CACjC,KAAK,MAAM,aAAa,sBACtB,IAAI,SAAS,WAAW,UAAU,GAAG;CAEvC,OAAO;AACT"}
package/dist/events.d.cts CHANGED
@@ -1,59 +1,2 @@
1
- /**
2
- * `@reopt-ai/data-contract/events` event names and property keys, with no
3
- * zod. Browser SDKs import this so their production bundles stay free of
4
- * schema code; `./ingest` re-exports everything here.
5
- */
6
- /** Event names the pipeline reserves for its own session bookkeeping. */
7
- declare const RESERVED_EVENT_NAMES: readonly ["session_start", "session_end", "screen_view"];
8
- /**
9
- * Events the SDKs emit on their own. One declaration, so a consumer that
10
- * registers them in its event catalogue (to make them roll up) cannot drift
11
- * from what the SDK actually sends — a drifted name silently falls back to
12
- * raw queries, which is slower but not visibly wrong.
13
- */
14
- declare const AUTO_EVENT_NAMES: {
15
- readonly pageview: "$pageview";
16
- readonly screenView: "$screen_view";
17
- readonly pageleave: "$pageleave";
18
- readonly webVitals: "$web_vitals";
19
- readonly exception: "$exception";
20
- };
21
- type AutoEventName = (typeof AUTO_EVENT_NAMES)[keyof typeof AUTO_EVENT_NAMES];
22
- /**
23
- * Property keys each automatic event carries. Consumers derive their
24
- * breakdown / rollup property lists from here rather than retyping them.
25
- * `path`, `origin`, `referrer` and `utm_*` are the keys the ingest pipeline
26
- * reads into session and event columns.
27
- */
28
- declare const AUTO_EVENT_PROPERTIES: {
29
- readonly $pageview: readonly ["path", "origin", "title", "referrer", "search", "utm_source", "utm_medium", "utm_campaign", "utm_term", "utm_content"];
30
- readonly $screen_view: readonly ["screen_name"];
31
- readonly $pageleave: readonly ["path", "origin", "duration", "scroll_depth", "scroll_depth_bucket"];
32
- readonly $web_vitals: readonly ["metric_name", "metric_id", "value", "delta", "rating", "navigation_type", "path"];
33
- readonly $exception: readonly ["$exception_type", "$exception_message", "$exception_stack", "$exception_source", "$exception_handled", "path"];
34
- };
35
- /**
36
- * The subset of {@link AUTO_EVENT_PROPERTIES} that is a sensible rollup
37
- * dimension: low cardinality, categorical. Per-measurement ids and
38
- * continuous values (`metric_id`, `value`, `delta`, `duration`,
39
- * `scroll_depth`) are deliberately absent — as dimensions they would make
40
- * the rollup larger than the raw table it summarises. Derive
41
- * `rollupProperties` from here, not from the full property list.
42
- */
43
- declare const AUTO_EVENT_ROLLUP_KEYS: {
44
- readonly $pageview: readonly ["path", "origin", "referrer", "utm_source", "utm_medium", "utm_campaign"];
45
- readonly $screen_view: readonly ["screen_name"];
46
- readonly $pageleave: readonly ["path", "origin", "scroll_depth_bucket"];
47
- readonly $web_vitals: readonly ["metric_name", "rating", "navigation_type", "path"];
48
- readonly $exception: readonly ["$exception_type", "$exception_source", "$exception_handled", "path"];
49
- };
50
- /**
51
- * `$pageleave.scroll_depth` is the exact 0–100 percentage; `scroll_depth_bucket`
52
- * is the deepest of these thresholds reached, as a string — the value to
53
- * break down by. `"0"` means the visitor never reached the first threshold.
54
- */
55
- declare const SCROLL_DEPTH_BUCKETS: readonly [25, 50, 75, 100];
56
- type ScrollDepthBucket = "0" | `${(typeof SCROLL_DEPTH_BUCKETS)[number]}`;
57
- declare function scrollDepthBucket(depth: number): ScrollDepthBucket;
58
-
59
- export { AUTO_EVENT_NAMES, AUTO_EVENT_PROPERTIES, AUTO_EVENT_ROLLUP_KEYS, type AutoEventName, RESERVED_EVENT_NAMES, SCROLL_DEPTH_BUCKETS, type ScrollDepthBucket, scrollDepthBucket };
1
+ import { a as ExceptionEntry, c as ExceptionMechanism, d as MAX_EXCEPTION_FRAMES, f as RELEASE_PROPERTY, g as scrollDepthBucket, h as ScrollDepthBucket, i as AutoEventName, l as ExceptionStep, m as SCROLL_DEPTH_BUCKETS, n as AUTO_EVENT_PROPERTIES, o as ExceptionFrame, p as RESERVED_EVENT_NAMES, r as AUTO_EVENT_ROLLUP_KEYS, s as ExceptionLevel, t as AUTO_EVENT_NAMES, u as MAX_EXCEPTION_CHAIN } from "./events-BUIeU60t.cjs";
2
+ export { AUTO_EVENT_NAMES, AUTO_EVENT_PROPERTIES, AUTO_EVENT_ROLLUP_KEYS, AutoEventName, ExceptionEntry, ExceptionFrame, ExceptionLevel, ExceptionMechanism, ExceptionStep, MAX_EXCEPTION_CHAIN, MAX_EXCEPTION_FRAMES, RELEASE_PROPERTY, RESERVED_EVENT_NAMES, SCROLL_DEPTH_BUCKETS, ScrollDepthBucket, scrollDepthBucket };
package/dist/events.d.ts CHANGED
@@ -1,59 +1,2 @@
1
- /**
2
- * `@reopt-ai/data-contract/events` event names and property keys, with no
3
- * zod. Browser SDKs import this so their production bundles stay free of
4
- * schema code; `./ingest` re-exports everything here.
5
- */
6
- /** Event names the pipeline reserves for its own session bookkeeping. */
7
- declare const RESERVED_EVENT_NAMES: readonly ["session_start", "session_end", "screen_view"];
8
- /**
9
- * Events the SDKs emit on their own. One declaration, so a consumer that
10
- * registers them in its event catalogue (to make them roll up) cannot drift
11
- * from what the SDK actually sends — a drifted name silently falls back to
12
- * raw queries, which is slower but not visibly wrong.
13
- */
14
- declare const AUTO_EVENT_NAMES: {
15
- readonly pageview: "$pageview";
16
- readonly screenView: "$screen_view";
17
- readonly pageleave: "$pageleave";
18
- readonly webVitals: "$web_vitals";
19
- readonly exception: "$exception";
20
- };
21
- type AutoEventName = (typeof AUTO_EVENT_NAMES)[keyof typeof AUTO_EVENT_NAMES];
22
- /**
23
- * Property keys each automatic event carries. Consumers derive their
24
- * breakdown / rollup property lists from here rather than retyping them.
25
- * `path`, `origin`, `referrer` and `utm_*` are the keys the ingest pipeline
26
- * reads into session and event columns.
27
- */
28
- declare const AUTO_EVENT_PROPERTIES: {
29
- readonly $pageview: readonly ["path", "origin", "title", "referrer", "search", "utm_source", "utm_medium", "utm_campaign", "utm_term", "utm_content"];
30
- readonly $screen_view: readonly ["screen_name"];
31
- readonly $pageleave: readonly ["path", "origin", "duration", "scroll_depth", "scroll_depth_bucket"];
32
- readonly $web_vitals: readonly ["metric_name", "metric_id", "value", "delta", "rating", "navigation_type", "path"];
33
- readonly $exception: readonly ["$exception_type", "$exception_message", "$exception_stack", "$exception_source", "$exception_handled", "path"];
34
- };
35
- /**
36
- * The subset of {@link AUTO_EVENT_PROPERTIES} that is a sensible rollup
37
- * dimension: low cardinality, categorical. Per-measurement ids and
38
- * continuous values (`metric_id`, `value`, `delta`, `duration`,
39
- * `scroll_depth`) are deliberately absent — as dimensions they would make
40
- * the rollup larger than the raw table it summarises. Derive
41
- * `rollupProperties` from here, not from the full property list.
42
- */
43
- declare const AUTO_EVENT_ROLLUP_KEYS: {
44
- readonly $pageview: readonly ["path", "origin", "referrer", "utm_source", "utm_medium", "utm_campaign"];
45
- readonly $screen_view: readonly ["screen_name"];
46
- readonly $pageleave: readonly ["path", "origin", "scroll_depth_bucket"];
47
- readonly $web_vitals: readonly ["metric_name", "rating", "navigation_type", "path"];
48
- readonly $exception: readonly ["$exception_type", "$exception_source", "$exception_handled", "path"];
49
- };
50
- /**
51
- * `$pageleave.scroll_depth` is the exact 0–100 percentage; `scroll_depth_bucket`
52
- * is the deepest of these thresholds reached, as a string — the value to
53
- * break down by. `"0"` means the visitor never reached the first threshold.
54
- */
55
- declare const SCROLL_DEPTH_BUCKETS: readonly [25, 50, 75, 100];
56
- type ScrollDepthBucket = "0" | `${(typeof SCROLL_DEPTH_BUCKETS)[number]}`;
57
- declare function scrollDepthBucket(depth: number): ScrollDepthBucket;
58
-
59
- export { AUTO_EVENT_NAMES, AUTO_EVENT_PROPERTIES, AUTO_EVENT_ROLLUP_KEYS, type AutoEventName, RESERVED_EVENT_NAMES, SCROLL_DEPTH_BUCKETS, type ScrollDepthBucket, scrollDepthBucket };
1
+ import { a as ExceptionEntry, c as ExceptionMechanism, d as MAX_EXCEPTION_FRAMES, f as RELEASE_PROPERTY, g as scrollDepthBucket, h as ScrollDepthBucket, i as AutoEventName, l as ExceptionStep, m as SCROLL_DEPTH_BUCKETS, n as AUTO_EVENT_PROPERTIES, o as ExceptionFrame, p as RESERVED_EVENT_NAMES, r as AUTO_EVENT_ROLLUP_KEYS, s as ExceptionLevel, t as AUTO_EVENT_NAMES, u as MAX_EXCEPTION_CHAIN } from "./events-BUIeU60t.js";
2
+ export { AUTO_EVENT_NAMES, AUTO_EVENT_PROPERTIES, AUTO_EVENT_ROLLUP_KEYS, AutoEventName, ExceptionEntry, ExceptionFrame, ExceptionLevel, ExceptionMechanism, ExceptionStep, MAX_EXCEPTION_CHAIN, MAX_EXCEPTION_FRAMES, RELEASE_PROPERTY, RESERVED_EVENT_NAMES, SCROLL_DEPTH_BUCKETS, ScrollDepthBucket, scrollDepthBucket };