@interfere/types 9.0.2 → 9.0.3-canary.1

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 (174) hide show
  1. package/README.md +1 -1
  2. package/dist/data/frame.cjs +1 -0
  3. package/dist/data/frame.d.cts +27 -0
  4. package/dist/data/frame.d.mts +2 -1
  5. package/dist/data/frame.mjs +2 -1
  6. package/dist/data/session.cjs +1 -0
  7. package/dist/data/session.d.cts +8 -0
  8. package/dist/data/session.d.mts +2 -1
  9. package/dist/data/session.mjs +2 -1
  10. package/dist/data/source-maps.cjs +1 -0
  11. package/dist/data/source-maps.d.cts +151 -0
  12. package/dist/data/source-maps.d.mts +7 -2
  13. package/dist/data/source-maps.mjs +2 -1
  14. package/dist/events/error.cjs +1 -0
  15. package/dist/events/error.d.cts +196 -0
  16. package/dist/events/error.d.mts +2 -1
  17. package/dist/events/error.mjs +2 -1
  18. package/dist/events/pageleave.cjs +1 -0
  19. package/dist/events/pageleave.d.cts +13 -0
  20. package/dist/events/pageleave.d.mts +2 -1
  21. package/dist/events/pageleave.mjs +2 -1
  22. package/dist/events/pageview.cjs +1 -0
  23. package/dist/events/pageview.d.cts +14 -0
  24. package/dist/events/pageview.d.mts +2 -1
  25. package/dist/events/pageview.mjs +2 -1
  26. package/dist/integrations/index.cjs +1 -0
  27. package/dist/integrations/index.d.cts +77 -0
  28. package/dist/integrations/index.d.mts +31 -1
  29. package/dist/integrations/index.mjs +2 -1
  30. package/dist/integrations/platforms/cli.cjs +1 -0
  31. package/dist/integrations/platforms/cli.d.cts +12 -0
  32. package/dist/integrations/platforms/cli.d.mts +12 -0
  33. package/dist/integrations/platforms/cli.mjs +2 -0
  34. package/dist/integrations/platforms/github.cjs +1 -0
  35. package/dist/integrations/platforms/github.d.cts +77 -0
  36. package/dist/integrations/platforms/github.d.mts +63 -1
  37. package/dist/integrations/platforms/github.mjs +2 -1
  38. package/dist/integrations/platforms/slack.cjs +1 -0
  39. package/dist/integrations/platforms/slack.d.cts +33 -0
  40. package/dist/integrations/platforms/slack.d.mts +2 -1
  41. package/dist/integrations/platforms/slack.mjs +2 -1
  42. package/dist/integrations/platforms/vercel.cjs +1 -0
  43. package/dist/integrations/platforms/vercel.d.cts +47 -0
  44. package/dist/integrations/platforms/vercel.d.mts +2 -1
  45. package/dist/integrations/platforms/vercel.mjs +2 -1
  46. package/dist/releases/definition.cjs +1 -0
  47. package/dist/releases/definition.d.cts +71 -0
  48. package/dist/releases/definition.d.mts +16 -1
  49. package/dist/releases/definition.mjs +2 -1
  50. package/dist/releases/slug.cjs +1 -0
  51. package/dist/releases/slug.d.cts +24 -0
  52. package/dist/releases/slug.d.mts +3 -1
  53. package/dist/releases/slug.mjs +2 -1
  54. package/dist/sdk/env.cjs +1 -0
  55. package/dist/sdk/env.d.cts +6 -0
  56. package/dist/sdk/env.d.mts +2 -1
  57. package/dist/sdk/env.mjs +2 -1
  58. package/dist/sdk/envelope.cjs +1 -0
  59. package/dist/sdk/envelope.d.cts +1441 -0
  60. package/dist/sdk/envelope.d.mts +14 -61
  61. package/dist/sdk/envelope.mjs +2 -1
  62. package/dist/sdk/errors.cjs +2 -0
  63. package/dist/sdk/errors.d.cts +156 -0
  64. package/dist/sdk/errors.d.mts +4 -1
  65. package/dist/sdk/errors.mjs +3 -2
  66. package/dist/sdk/geo.cjs +1 -0
  67. package/dist/sdk/geo.d.cts +11 -0
  68. package/dist/sdk/geo.d.mts +2 -1
  69. package/dist/sdk/geo.mjs +2 -1
  70. package/dist/sdk/identify.cjs +1 -0
  71. package/dist/sdk/identify.d.cts +35 -0
  72. package/dist/sdk/identify.d.mts +2 -1
  73. package/dist/sdk/identify.mjs +2 -1
  74. package/dist/sdk/plugins/context/browser.cjs +1 -0
  75. package/dist/sdk/plugins/context/browser.d.cts +92 -0
  76. package/dist/sdk/plugins/context/browser.d.mts +2 -1
  77. package/dist/sdk/plugins/context/browser.mjs +2 -1
  78. package/dist/sdk/plugins/context/edge.cjs +1 -0
  79. package/dist/sdk/plugins/context/edge.d.cts +10 -0
  80. package/dist/sdk/plugins/context/edge.d.mts +2 -1
  81. package/dist/sdk/plugins/context/edge.mjs +2 -1
  82. package/dist/sdk/plugins/context/next.cjs +1 -0
  83. package/dist/sdk/plugins/context/next.d.cts +62 -0
  84. package/dist/sdk/plugins/context/next.d.mts +2 -1
  85. package/dist/sdk/plugins/context/next.mjs +2 -1
  86. package/dist/sdk/plugins/context/node.cjs +1 -0
  87. package/dist/sdk/plugins/context/node.d.cts +13 -0
  88. package/dist/sdk/plugins/context/node.d.mts +2 -1
  89. package/dist/sdk/plugins/context/node.mjs +2 -1
  90. package/dist/sdk/plugins/manifest.cjs +1 -0
  91. package/dist/sdk/plugins/manifest.d.cts +60 -0
  92. package/dist/sdk/plugins/manifest.d.mts +2 -1
  93. package/dist/sdk/plugins/manifest.mjs +2 -1
  94. package/dist/sdk/plugins/payload/errors.cjs +1 -0
  95. package/dist/sdk/plugins/payload/errors.d.cts +65 -0
  96. package/dist/sdk/plugins/payload/errors.d.mts +2 -1
  97. package/dist/sdk/plugins/payload/errors.mjs +2 -1
  98. package/dist/sdk/plugins/payload/page-events.cjs +1 -0
  99. package/dist/sdk/plugins/payload/page-events.d.cts +20 -0
  100. package/dist/sdk/plugins/payload/page-events.d.mts +2 -1
  101. package/dist/sdk/plugins/payload/page-events.mjs +2 -1
  102. package/dist/sdk/plugins/payload/rage-click.cjs +1 -0
  103. package/dist/sdk/plugins/payload/rage-click.d.cts +16 -0
  104. package/dist/sdk/plugins/payload/rage-click.d.mts +2 -1
  105. package/dist/sdk/plugins/payload/rage-click.mjs +2 -1
  106. package/dist/sdk/plugins/payload/replay.cjs +1 -0
  107. package/dist/sdk/plugins/payload/replay.d.cts +14 -0
  108. package/dist/sdk/plugins/payload/replay.d.mts +2 -1
  109. package/dist/sdk/plugins/payload/replay.mjs +2 -1
  110. package/dist/sdk/remote-config.cjs +1 -0
  111. package/dist/sdk/remote-config.d.cts +39 -0
  112. package/dist/sdk/remote-config.d.mts +2 -1
  113. package/dist/sdk/remote-config.mjs +2 -1
  114. package/dist/sdk/runtime.cjs +1 -0
  115. package/dist/sdk/runtime.d.cts +41 -0
  116. package/dist/sdk/runtime.d.mts +27 -7
  117. package/dist/sdk/runtime.mjs +2 -1
  118. package/package.json +120 -45
  119. package/dist/data/frame.d.mts.map +0 -1
  120. package/dist/data/frame.mjs.map +0 -1
  121. package/dist/data/session.d.mts.map +0 -1
  122. package/dist/data/session.mjs.map +0 -1
  123. package/dist/data/source-maps.d.mts.map +0 -1
  124. package/dist/data/source-maps.mjs.map +0 -1
  125. package/dist/events/error.d.mts.map +0 -1
  126. package/dist/events/error.mjs.map +0 -1
  127. package/dist/events/pageleave.d.mts.map +0 -1
  128. package/dist/events/pageleave.mjs.map +0 -1
  129. package/dist/events/pageview.d.mts.map +0 -1
  130. package/dist/events/pageview.mjs.map +0 -1
  131. package/dist/integrations/index.d.mts.map +0 -1
  132. package/dist/integrations/index.mjs.map +0 -1
  133. package/dist/integrations/platforms/github.d.mts.map +0 -1
  134. package/dist/integrations/platforms/github.mjs.map +0 -1
  135. package/dist/integrations/platforms/slack.d.mts.map +0 -1
  136. package/dist/integrations/platforms/slack.mjs.map +0 -1
  137. package/dist/integrations/platforms/vercel.d.mts.map +0 -1
  138. package/dist/integrations/platforms/vercel.mjs.map +0 -1
  139. package/dist/releases/definition.d.mts.map +0 -1
  140. package/dist/releases/definition.mjs.map +0 -1
  141. package/dist/releases/slug.d.mts.map +0 -1
  142. package/dist/releases/slug.mjs.map +0 -1
  143. package/dist/sdk/env.d.mts.map +0 -1
  144. package/dist/sdk/env.mjs.map +0 -1
  145. package/dist/sdk/envelope.d.mts.map +0 -1
  146. package/dist/sdk/envelope.mjs.map +0 -1
  147. package/dist/sdk/errors.d.mts.map +0 -1
  148. package/dist/sdk/errors.mjs.map +0 -1
  149. package/dist/sdk/geo.d.mts.map +0 -1
  150. package/dist/sdk/geo.mjs.map +0 -1
  151. package/dist/sdk/identify.d.mts.map +0 -1
  152. package/dist/sdk/identify.mjs.map +0 -1
  153. package/dist/sdk/plugins/context/browser.d.mts.map +0 -1
  154. package/dist/sdk/plugins/context/browser.mjs.map +0 -1
  155. package/dist/sdk/plugins/context/edge.d.mts.map +0 -1
  156. package/dist/sdk/plugins/context/edge.mjs.map +0 -1
  157. package/dist/sdk/plugins/context/next.d.mts.map +0 -1
  158. package/dist/sdk/plugins/context/next.mjs.map +0 -1
  159. package/dist/sdk/plugins/context/node.d.mts.map +0 -1
  160. package/dist/sdk/plugins/context/node.mjs.map +0 -1
  161. package/dist/sdk/plugins/manifest.d.mts.map +0 -1
  162. package/dist/sdk/plugins/manifest.mjs.map +0 -1
  163. package/dist/sdk/plugins/payload/errors.d.mts.map +0 -1
  164. package/dist/sdk/plugins/payload/errors.mjs.map +0 -1
  165. package/dist/sdk/plugins/payload/page-events.d.mts.map +0 -1
  166. package/dist/sdk/plugins/payload/page-events.mjs.map +0 -1
  167. package/dist/sdk/plugins/payload/rage-click.d.mts.map +0 -1
  168. package/dist/sdk/plugins/payload/rage-click.mjs.map +0 -1
  169. package/dist/sdk/plugins/payload/replay.d.mts.map +0 -1
  170. package/dist/sdk/plugins/payload/replay.mjs.map +0 -1
  171. package/dist/sdk/remote-config.d.mts.map +0 -1
  172. package/dist/sdk/remote-config.mjs.map +0 -1
  173. package/dist/sdk/runtime.d.mts.map +0 -1
  174. package/dist/sdk/runtime.mjs.map +0 -1
@@ -1 +1,2 @@
1
- import{z as e}from"zod";const t=e.object({runtime:e.literal(`edge`)}).meta({id:`EdgeContext`,title:`EdgeContext`,description:`Request context for the Edge runtime.`});export{t as edgeContextSchema};
1
+ import{z}from"zod";const edgeContextSchema=z.object({runtime:z.literal(`edge`)}).meta({id:`EdgeContext`,title:`EdgeContext`,description:`Request context for the Edge runtime.`});export{edgeContextSchema};
2
+ //# sourceMappingURL=edge.mjs.map
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let zod=require("zod");const renderSourceSchema=zod.z.enum([`react-server-components`,`react-server-components-payload`,`server-rendering`]).meta({id:`RenderSource`,title:`RenderSource`}),renderTypeSchema=zod.z.enum([`dynamic`,`dynamic-resume`]).meta({id:`RenderType`,title:`RenderType`}),revalidateReasonSchema=zod.z.enum([`on-demand`,`stale`]).meta({id:`RevalidateReason`,title:`RevalidateReason`}),routeTypeSchema=zod.z.enum([`render`,`route`,`action`,`middleware`,`proxy`]).meta({id:`RouteType`,title:`RouteType`}),routerKindSchema=zod.z.enum([`Pages Router`,`App Router`]).meta({id:`RouterKind`,title:`RouterKind`}),nextjsContextSchema=zod.z.object({errorDigest:zod.z.string().optional(),renderSource:renderSourceSchema.optional(),renderType:renderTypeSchema.optional(),requestMethod:zod.z.string().optional(),requestPath:zod.z.string().optional(),revalidateReason:revalidateReasonSchema.optional(),routePath:zod.z.string().optional(),routeType:routeTypeSchema.optional(),routerKind:routerKindSchema.optional(),runtime:zod.z.literal(`nextjs`)}).meta({id:`NextjsContext`,title:`NextjsContext`,description:`Request context for the Next.js runtime.`});exports.nextjsContextSchema=nextjsContextSchema,exports.renderSourceSchema=renderSourceSchema,exports.renderTypeSchema=renderTypeSchema,exports.revalidateReasonSchema=revalidateReasonSchema,exports.routeTypeSchema=routeTypeSchema,exports.routerKindSchema=routerKindSchema;
@@ -0,0 +1,62 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/sdk/plugins/context/next.d.ts
4
+ declare const renderSourceSchema: z.ZodEnum<{
5
+ "react-server-components": "react-server-components";
6
+ "react-server-components-payload": "react-server-components-payload";
7
+ "server-rendering": "server-rendering";
8
+ }>;
9
+ declare const renderTypeSchema: z.ZodEnum<{
10
+ dynamic: "dynamic";
11
+ "dynamic-resume": "dynamic-resume";
12
+ }>;
13
+ declare const revalidateReasonSchema: z.ZodEnum<{
14
+ "on-demand": "on-demand";
15
+ stale: "stale";
16
+ }>;
17
+ declare const routeTypeSchema: z.ZodEnum<{
18
+ action: "action";
19
+ middleware: "middleware";
20
+ proxy: "proxy";
21
+ render: "render";
22
+ route: "route";
23
+ }>;
24
+ declare const routerKindSchema: z.ZodEnum<{
25
+ "App Router": "App Router";
26
+ "Pages Router": "Pages Router";
27
+ }>;
28
+ declare const nextjsContextSchema: z.ZodObject<{
29
+ errorDigest: z.ZodOptional<z.ZodString>;
30
+ renderSource: z.ZodOptional<z.ZodEnum<{
31
+ "react-server-components": "react-server-components";
32
+ "react-server-components-payload": "react-server-components-payload";
33
+ "server-rendering": "server-rendering";
34
+ }>>;
35
+ renderType: z.ZodOptional<z.ZodEnum<{
36
+ dynamic: "dynamic";
37
+ "dynamic-resume": "dynamic-resume";
38
+ }>>;
39
+ requestMethod: z.ZodOptional<z.ZodString>;
40
+ requestPath: z.ZodOptional<z.ZodString>;
41
+ revalidateReason: z.ZodOptional<z.ZodEnum<{
42
+ "on-demand": "on-demand";
43
+ stale: "stale";
44
+ }>>;
45
+ routePath: z.ZodOptional<z.ZodString>;
46
+ routeType: z.ZodOptional<z.ZodEnum<{
47
+ action: "action";
48
+ middleware: "middleware";
49
+ proxy: "proxy";
50
+ render: "render";
51
+ route: "route";
52
+ }>>;
53
+ routerKind: z.ZodOptional<z.ZodEnum<{
54
+ "App Router": "App Router";
55
+ "Pages Router": "Pages Router";
56
+ }>>;
57
+ runtime: z.ZodLiteral<"nextjs">;
58
+ }, z.core.$strip>;
59
+ type NextjsContext = z.infer<typeof nextjsContextSchema>;
60
+ //#endregion
61
+ export { NextjsContext, nextjsContextSchema, renderSourceSchema, renderTypeSchema, revalidateReasonSchema, routeTypeSchema, routerKindSchema };
62
+ //# sourceMappingURL=next.d.cts.map
@@ -58,4 +58,5 @@ declare const nextjsContextSchema: z.ZodObject<{
58
58
  }, z.core.$strip>;
59
59
  type NextjsContext = z.infer<typeof nextjsContextSchema>;
60
60
  //#endregion
61
- export { NextjsContext, nextjsContextSchema, renderSourceSchema, renderTypeSchema, revalidateReasonSchema, routeTypeSchema, routerKindSchema };
61
+ export { NextjsContext, nextjsContextSchema, renderSourceSchema, renderTypeSchema, revalidateReasonSchema, routeTypeSchema, routerKindSchema };
62
+ //# sourceMappingURL=next.d.mts.map
@@ -1 +1,2 @@
1
- import{z as e}from"zod";const t=e.enum([`react-server-components`,`react-server-components-payload`,`server-rendering`]).meta({id:`RenderSource`,title:`RenderSource`}),n=e.enum([`dynamic`,`dynamic-resume`]).meta({id:`RenderType`,title:`RenderType`}),r=e.enum([`on-demand`,`stale`]).meta({id:`RevalidateReason`,title:`RevalidateReason`}),i=e.enum([`render`,`route`,`action`,`middleware`,`proxy`]).meta({id:`RouteType`,title:`RouteType`}),a=e.enum([`Pages Router`,`App Router`]).meta({id:`RouterKind`,title:`RouterKind`}),o=e.object({errorDigest:e.string().optional(),renderSource:t.optional(),renderType:n.optional(),requestMethod:e.string().optional(),requestPath:e.string().optional(),revalidateReason:r.optional(),routePath:e.string().optional(),routeType:i.optional(),routerKind:a.optional(),runtime:e.literal(`nextjs`)}).meta({id:`NextjsContext`,title:`NextjsContext`,description:`Request context for the Next.js runtime.`});export{o as nextjsContextSchema,t as renderSourceSchema,n as renderTypeSchema,r as revalidateReasonSchema,i as routeTypeSchema,a as routerKindSchema};
1
+ import{z}from"zod";const renderSourceSchema=z.enum([`react-server-components`,`react-server-components-payload`,`server-rendering`]).meta({id:`RenderSource`,title:`RenderSource`}),renderTypeSchema=z.enum([`dynamic`,`dynamic-resume`]).meta({id:`RenderType`,title:`RenderType`}),revalidateReasonSchema=z.enum([`on-demand`,`stale`]).meta({id:`RevalidateReason`,title:`RevalidateReason`}),routeTypeSchema=z.enum([`render`,`route`,`action`,`middleware`,`proxy`]).meta({id:`RouteType`,title:`RouteType`}),routerKindSchema=z.enum([`Pages Router`,`App Router`]).meta({id:`RouterKind`,title:`RouterKind`}),nextjsContextSchema=z.object({errorDigest:z.string().optional(),renderSource:renderSourceSchema.optional(),renderType:renderTypeSchema.optional(),requestMethod:z.string().optional(),requestPath:z.string().optional(),revalidateReason:revalidateReasonSchema.optional(),routePath:z.string().optional(),routeType:routeTypeSchema.optional(),routerKind:routerKindSchema.optional(),runtime:z.literal(`nextjs`)}).meta({id:`NextjsContext`,title:`NextjsContext`,description:`Request context for the Next.js runtime.`});export{nextjsContextSchema,renderSourceSchema,renderTypeSchema,revalidateReasonSchema,routeTypeSchema,routerKindSchema};
2
+ //# sourceMappingURL=next.mjs.map
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let zod=require("zod");const nodeContextSchema=zod.z.object({errorDigest:zod.z.string().optional(),requestMethod:zod.z.string().optional(),requestPath:zod.z.string().optional(),runtime:zod.z.literal(`node`)}).meta({id:`NodeContext`,title:`NodeContext`,description:`Request context for the Node.js runtime.`});exports.nodeContextSchema=nodeContextSchema;
@@ -0,0 +1,13 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/sdk/plugins/context/node.d.ts
4
+ declare const nodeContextSchema: z.ZodObject<{
5
+ errorDigest: z.ZodOptional<z.ZodString>;
6
+ requestMethod: z.ZodOptional<z.ZodString>;
7
+ requestPath: z.ZodOptional<z.ZodString>;
8
+ runtime: z.ZodLiteral<"node">;
9
+ }, z.core.$strip>;
10
+ type NodeContext = z.infer<typeof nodeContextSchema>;
11
+ //#endregion
12
+ export { NodeContext, nodeContextSchema };
13
+ //# sourceMappingURL=node.d.cts.map
@@ -9,4 +9,5 @@ declare const nodeContextSchema: z.ZodObject<{
9
9
  }, z.core.$strip>;
10
10
  type NodeContext = z.infer<typeof nodeContextSchema>;
11
11
  //#endregion
12
- export { NodeContext, nodeContextSchema };
12
+ export { NodeContext, nodeContextSchema };
13
+ //# sourceMappingURL=node.d.mts.map
@@ -1 +1,2 @@
1
- import{z as e}from"zod";const t=e.object({errorDigest:e.string().optional(),requestMethod:e.string().optional(),requestPath:e.string().optional(),runtime:e.literal(`node`)}).meta({id:`NodeContext`,title:`NodeContext`,description:`Request context for the Node.js runtime.`});export{t as nodeContextSchema};
1
+ import{z}from"zod";const nodeContextSchema=z.object({errorDigest:z.string().optional(),requestMethod:z.string().optional(),requestPath:z.string().optional(),runtime:z.literal(`node`)}).meta({id:`NodeContext`,title:`NodeContext`,description:`Request context for the Node.js runtime.`});export{nodeContextSchema};
2
+ //# sourceMappingURL=node.mjs.map
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const CONSENT_CATEGORIES=[`necessary`,`analytics`,`replay`],PLUGIN_MANIFEST=[{consentCategory:`necessary`,defaultEnabled:!0,events:[{enrich:!0,name:`error`}],name:`errors`},{consentCategory:`analytics`,defaultEnabled:!0,events:[],name:`device`},{consentCategory:`analytics`,defaultEnabled:!0,events:[{enrich:!0,name:`pageview`},{enrich:!0,name:`pageleave`},{enrich:!0,name:`ui_event`}],name:`pageEvents`},{consentCategory:`analytics`,defaultEnabled:!0,events:[{enrich:!0,name:`rage_click`}],name:`rageClick`},{consentCategory:`replay`,defaultEnabled:!0,events:[{enrich:!1,name:`replay_chunk`}],name:`replay`},{consentCategory:`necessary`,defaultEnabled:!0,events:[],name:`logs`}];exports.CONSENT_CATEGORIES=CONSENT_CATEGORIES,exports.PLUGIN_MANIFEST=PLUGIN_MANIFEST;
@@ -0,0 +1,60 @@
1
+ //#region src/sdk/plugins/manifest.d.ts
2
+ declare const CONSENT_CATEGORIES: readonly ["necessary", "analytics", "replay"];
3
+ type AtLeastOne<T> = { [K in keyof T]-?: Required<Pick<T, K>> & Partial<T> }[keyof T];
4
+ declare const PLUGIN_MANIFEST: readonly [{
5
+ readonly consentCategory: "necessary";
6
+ readonly defaultEnabled: true;
7
+ readonly events: readonly [{
8
+ readonly enrich: true;
9
+ readonly name: "error";
10
+ }];
11
+ readonly name: "errors";
12
+ }, {
13
+ readonly consentCategory: "analytics";
14
+ readonly defaultEnabled: true;
15
+ readonly events: readonly [];
16
+ readonly name: "device";
17
+ }, {
18
+ readonly consentCategory: "analytics";
19
+ readonly defaultEnabled: true;
20
+ readonly events: readonly [{
21
+ readonly enrich: true;
22
+ readonly name: "pageview";
23
+ }, {
24
+ readonly enrich: true;
25
+ readonly name: "pageleave";
26
+ }, {
27
+ readonly enrich: true;
28
+ readonly name: "ui_event";
29
+ }];
30
+ readonly name: "pageEvents";
31
+ }, {
32
+ readonly consentCategory: "analytics";
33
+ readonly defaultEnabled: true;
34
+ readonly events: readonly [{
35
+ readonly enrich: true;
36
+ readonly name: "rage_click";
37
+ }];
38
+ readonly name: "rageClick";
39
+ }, {
40
+ readonly consentCategory: "replay";
41
+ readonly defaultEnabled: true;
42
+ readonly events: readonly [{
43
+ readonly enrich: false;
44
+ readonly name: "replay_chunk";
45
+ }];
46
+ readonly name: "replay";
47
+ }, {
48
+ readonly consentCategory: "necessary";
49
+ readonly defaultEnabled: true;
50
+ readonly events: readonly [];
51
+ readonly name: "logs";
52
+ }];
53
+ type PluginManifest = typeof PLUGIN_MANIFEST;
54
+ type ConsentCategory = (typeof CONSENT_CATEGORIES)[number];
55
+ type PluginKey = PluginManifest[number]["name"];
56
+ type GateableCategory = Exclude<ConsentCategory, "necessary">;
57
+ type ConsentState = AtLeastOne<Record<GateableCategory, boolean>>;
58
+ //#endregion
59
+ export { CONSENT_CATEGORIES, ConsentCategory, ConsentState, GateableCategory, PLUGIN_MANIFEST, PluginKey, PluginManifest };
60
+ //# sourceMappingURL=manifest.d.cts.map
@@ -56,4 +56,5 @@ type PluginKey = PluginManifest[number]["name"];
56
56
  type GateableCategory = Exclude<ConsentCategory, "necessary">;
57
57
  type ConsentState = AtLeastOne<Record<GateableCategory, boolean>>;
58
58
  //#endregion
59
- export { CONSENT_CATEGORIES, ConsentCategory, ConsentState, GateableCategory, PLUGIN_MANIFEST, PluginKey, PluginManifest };
59
+ export { CONSENT_CATEGORIES, ConsentCategory, ConsentState, GateableCategory, PLUGIN_MANIFEST, PluginKey, PluginManifest };
60
+ //# sourceMappingURL=manifest.d.mts.map
@@ -1 +1,2 @@
1
- const e=[`necessary`,`analytics`,`replay`],t=[{consentCategory:`necessary`,defaultEnabled:!0,events:[{enrich:!0,name:`error`}],name:`errors`},{consentCategory:`analytics`,defaultEnabled:!0,events:[],name:`device`},{consentCategory:`analytics`,defaultEnabled:!0,events:[{enrich:!0,name:`pageview`},{enrich:!0,name:`pageleave`},{enrich:!0,name:`ui_event`}],name:`pageEvents`},{consentCategory:`analytics`,defaultEnabled:!0,events:[{enrich:!0,name:`rage_click`}],name:`rageClick`},{consentCategory:`replay`,defaultEnabled:!0,events:[{enrich:!1,name:`replay_chunk`}],name:`replay`},{consentCategory:`necessary`,defaultEnabled:!0,events:[],name:`logs`}];export{e as CONSENT_CATEGORIES,t as PLUGIN_MANIFEST};
1
+ const CONSENT_CATEGORIES=[`necessary`,`analytics`,`replay`],PLUGIN_MANIFEST=[{consentCategory:`necessary`,defaultEnabled:!0,events:[{enrich:!0,name:`error`}],name:`errors`},{consentCategory:`analytics`,defaultEnabled:!0,events:[],name:`device`},{consentCategory:`analytics`,defaultEnabled:!0,events:[{enrich:!0,name:`pageview`},{enrich:!0,name:`pageleave`},{enrich:!0,name:`ui_event`}],name:`pageEvents`},{consentCategory:`analytics`,defaultEnabled:!0,events:[{enrich:!0,name:`rage_click`}],name:`rageClick`},{consentCategory:`replay`,defaultEnabled:!0,events:[{enrich:!1,name:`replay_chunk`}],name:`replay`},{consentCategory:`necessary`,defaultEnabled:!0,events:[],name:`logs`}];export{CONSENT_CATEGORIES,PLUGIN_MANIFEST};
2
+ //# sourceMappingURL=manifest.mjs.map
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let zod=require("zod");const errorSourceSchema=zod.z.enum([`client`,`server`,`edge`]).meta({id:`ErrorSource`,title:`ErrorSource`}),errorMechanismSchema=zod.z.object({type:zod.z.string(),handled:zod.z.boolean(),synthetic:zod.z.boolean().optional()}).meta({id:`ErrorMechanism`,title:`ErrorMechanism`,description:`How the exception was captured by the SDK.`}),errorExceptionSchema=zod.z.object({kind:zod.z.literal(`error`),type:zod.z.string(),value:zod.z.string(),mechanism:errorMechanismSchema.optional(),stack:zod.z.string()}),nonErrorExceptionSchema=zod.z.object({kind:zod.z.literal(`non-error`),type:zod.z.string(),value:zod.z.string(),mechanism:errorMechanismSchema.optional(),serialized:zod.z.unknown()}),exceptionValueSchema=zod.z.union([errorExceptionSchema,nonErrorExceptionSchema]).meta({id:`Exception`,title:`Exception`,description:"A single exception. Error-shaped exceptions carry the raw `error.stack` string; non-Error rejections (e.g. `Promise.reject({ code: 401 })`) carry the structured payload as `serialized` instead."}),errorEnvelopePayloadSchema=zod.z.object({exceptions:zod.z.array(exceptionValueSchema).min(1),errorDigest:zod.z.string().optional()}).meta({id:`ErrorPayload`,title:`ErrorPayload`,description:`Payload for an error envelope.`});exports.errorEnvelopePayloadSchema=errorEnvelopePayloadSchema,exports.errorMechanismSchema=errorMechanismSchema,exports.errorSourceSchema=errorSourceSchema,exports.exceptionValueSchema=exceptionValueSchema;
@@ -0,0 +1,65 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/sdk/plugins/payload/errors.d.ts
4
+ declare const errorSourceSchema: z.ZodEnum<{
5
+ client: "client";
6
+ edge: "edge";
7
+ server: "server";
8
+ }>;
9
+ type ErrorSource = z.infer<typeof errorSourceSchema>;
10
+ declare const errorMechanismSchema: z.ZodObject<{
11
+ type: z.ZodString;
12
+ handled: z.ZodBoolean;
13
+ synthetic: z.ZodOptional<z.ZodBoolean>;
14
+ }, z.core.$strip>;
15
+ type ErrorMechanism = z.infer<typeof errorMechanismSchema>;
16
+ declare const exceptionValueSchema: z.ZodUnion<readonly [z.ZodObject<{
17
+ kind: z.ZodLiteral<"error">;
18
+ type: z.ZodString;
19
+ value: z.ZodString;
20
+ mechanism: z.ZodOptional<z.ZodObject<{
21
+ type: z.ZodString;
22
+ handled: z.ZodBoolean;
23
+ synthetic: z.ZodOptional<z.ZodBoolean>;
24
+ }, z.core.$strip>>;
25
+ stack: z.ZodString;
26
+ }, z.core.$strip>, z.ZodObject<{
27
+ kind: z.ZodLiteral<"non-error">;
28
+ type: z.ZodString;
29
+ value: z.ZodString;
30
+ mechanism: z.ZodOptional<z.ZodObject<{
31
+ type: z.ZodString;
32
+ handled: z.ZodBoolean;
33
+ synthetic: z.ZodOptional<z.ZodBoolean>;
34
+ }, z.core.$strip>>;
35
+ serialized: z.ZodUnknown;
36
+ }, z.core.$strip>]>;
37
+ type ExceptionValue = z.infer<typeof exceptionValueSchema>;
38
+ declare const errorEnvelopePayloadSchema: z.ZodObject<{
39
+ exceptions: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
40
+ kind: z.ZodLiteral<"error">;
41
+ type: z.ZodString;
42
+ value: z.ZodString;
43
+ mechanism: z.ZodOptional<z.ZodObject<{
44
+ type: z.ZodString;
45
+ handled: z.ZodBoolean;
46
+ synthetic: z.ZodOptional<z.ZodBoolean>;
47
+ }, z.core.$strip>>;
48
+ stack: z.ZodString;
49
+ }, z.core.$strip>, z.ZodObject<{
50
+ kind: z.ZodLiteral<"non-error">;
51
+ type: z.ZodString;
52
+ value: z.ZodString;
53
+ mechanism: z.ZodOptional<z.ZodObject<{
54
+ type: z.ZodString;
55
+ handled: z.ZodBoolean;
56
+ synthetic: z.ZodOptional<z.ZodBoolean>;
57
+ }, z.core.$strip>>;
58
+ serialized: z.ZodUnknown;
59
+ }, z.core.$strip>]>>;
60
+ errorDigest: z.ZodOptional<z.ZodString>;
61
+ }, z.core.$strip>;
62
+ type ErrorEnvelopePayload = z.infer<typeof errorEnvelopePayloadSchema>;
63
+ //#endregion
64
+ export { ErrorEnvelopePayload, ErrorMechanism, ErrorSource, ExceptionValue, errorEnvelopePayloadSchema, errorMechanismSchema, errorSourceSchema, exceptionValueSchema };
65
+ //# sourceMappingURL=errors.d.cts.map
@@ -61,4 +61,5 @@ declare const errorEnvelopePayloadSchema: z.ZodObject<{
61
61
  }, z.core.$strip>;
62
62
  type ErrorEnvelopePayload = z.infer<typeof errorEnvelopePayloadSchema>;
63
63
  //#endregion
64
- export { ErrorEnvelopePayload, ErrorMechanism, ErrorSource, ExceptionValue, errorEnvelopePayloadSchema, errorMechanismSchema, errorSourceSchema, exceptionValueSchema };
64
+ export { ErrorEnvelopePayload, ErrorMechanism, ErrorSource, ExceptionValue, errorEnvelopePayloadSchema, errorMechanismSchema, errorSourceSchema, exceptionValueSchema };
65
+ //# sourceMappingURL=errors.d.mts.map
@@ -1 +1,2 @@
1
- import{z as e}from"zod";const t=e.enum([`client`,`server`,`edge`]).meta({id:`ErrorSource`,title:`ErrorSource`}),n=e.object({type:e.string(),handled:e.boolean(),synthetic:e.boolean().optional()}).meta({id:`ErrorMechanism`,title:`ErrorMechanism`,description:`How the exception was captured by the SDK.`}),r=e.object({kind:e.literal(`error`),type:e.string(),value:e.string(),mechanism:n.optional(),stack:e.string()}),i=e.object({kind:e.literal(`non-error`),type:e.string(),value:e.string(),mechanism:n.optional(),serialized:e.unknown()}),a=e.union([r,i]).meta({id:`Exception`,title:`Exception`,description:"A single exception. Error-shaped exceptions carry the raw `error.stack` string; non-Error rejections (e.g. `Promise.reject({ code: 401 })`) carry the structured payload as `serialized` instead."}),o=e.object({exceptions:e.array(a).min(1),errorDigest:e.string().optional()}).meta({id:`ErrorPayload`,title:`ErrorPayload`,description:`Payload for an error envelope.`});export{o as errorEnvelopePayloadSchema,n as errorMechanismSchema,t as errorSourceSchema,a as exceptionValueSchema};
1
+ import{z}from"zod";const errorSourceSchema=z.enum([`client`,`server`,`edge`]).meta({id:`ErrorSource`,title:`ErrorSource`}),errorMechanismSchema=z.object({type:z.string(),handled:z.boolean(),synthetic:z.boolean().optional()}).meta({id:`ErrorMechanism`,title:`ErrorMechanism`,description:`How the exception was captured by the SDK.`}),errorExceptionSchema=z.object({kind:z.literal(`error`),type:z.string(),value:z.string(),mechanism:errorMechanismSchema.optional(),stack:z.string()}),nonErrorExceptionSchema=z.object({kind:z.literal(`non-error`),type:z.string(),value:z.string(),mechanism:errorMechanismSchema.optional(),serialized:z.unknown()}),exceptionValueSchema=z.union([errorExceptionSchema,nonErrorExceptionSchema]).meta({id:`Exception`,title:`Exception`,description:"A single exception. Error-shaped exceptions carry the raw `error.stack` string; non-Error rejections (e.g. `Promise.reject({ code: 401 })`) carry the structured payload as `serialized` instead."}),errorEnvelopePayloadSchema=z.object({exceptions:z.array(exceptionValueSchema).min(1),errorDigest:z.string().optional()}).meta({id:`ErrorPayload`,title:`ErrorPayload`,description:`Payload for an error envelope.`});export{errorEnvelopePayloadSchema,errorMechanismSchema,errorSourceSchema,exceptionValueSchema};
2
+ //# sourceMappingURL=errors.mjs.map
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let zod=require("zod");const uiEventPayloadSchema=zod.z.object({event:zod.z.record(zod.z.string(),zod.z.unknown())}).meta({id:`UiEventPayload`,title:`UiEventPayload`,description:`Payload for a UI event envelope.`}),pageviewPayloadSchema=zod.z.object({url:zod.z.url(),title:zod.z.string().optional()}).meta({id:`PageviewPayload`,title:`PageviewPayload`,description:`Payload for a pageview envelope.`}),pageleavePayloadSchema=zod.z.object({url:zod.z.url(),durationMs:zod.z.number().optional()}).meta({id:`PageleavePayload`,title:`PageleavePayload`,description:`Payload for a pageleave envelope.`});exports.pageleavePayloadSchema=pageleavePayloadSchema,exports.pageviewPayloadSchema=pageviewPayloadSchema,exports.uiEventPayloadSchema=uiEventPayloadSchema;
@@ -0,0 +1,20 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/sdk/plugins/payload/page-events.d.ts
4
+ declare const uiEventPayloadSchema: z.ZodObject<{
5
+ event: z.ZodRecord<z.ZodString, z.ZodUnknown>;
6
+ }, z.core.$strip>;
7
+ type UiEventPayload = z.infer<typeof uiEventPayloadSchema>;
8
+ declare const pageviewPayloadSchema: z.ZodObject<{
9
+ url: z.ZodURL;
10
+ title: z.ZodOptional<z.ZodString>;
11
+ }, z.core.$strip>;
12
+ type PageviewPayload = z.infer<typeof pageviewPayloadSchema>;
13
+ declare const pageleavePayloadSchema: z.ZodObject<{
14
+ url: z.ZodURL;
15
+ durationMs: z.ZodOptional<z.ZodNumber>;
16
+ }, z.core.$strip>;
17
+ type PageleavePayload = z.infer<typeof pageleavePayloadSchema>;
18
+ //#endregion
19
+ export { PageleavePayload, PageviewPayload, UiEventPayload, pageleavePayloadSchema, pageviewPayloadSchema, uiEventPayloadSchema };
20
+ //# sourceMappingURL=page-events.d.cts.map
@@ -16,4 +16,5 @@ declare const pageleavePayloadSchema: z.ZodObject<{
16
16
  }, z.core.$strip>;
17
17
  type PageleavePayload = z.infer<typeof pageleavePayloadSchema>;
18
18
  //#endregion
19
- export { PageleavePayload, PageviewPayload, UiEventPayload, pageleavePayloadSchema, pageviewPayloadSchema, uiEventPayloadSchema };
19
+ export { PageleavePayload, PageviewPayload, UiEventPayload, pageleavePayloadSchema, pageviewPayloadSchema, uiEventPayloadSchema };
20
+ //# sourceMappingURL=page-events.d.mts.map
@@ -1 +1,2 @@
1
- import{z as e}from"zod";const t=e.object({event:e.record(e.string(),e.unknown())}).meta({id:`UiEventPayload`,title:`UiEventPayload`,description:`Payload for a UI event envelope.`}),n=e.object({url:e.url(),title:e.string().optional()}).meta({id:`PageviewPayload`,title:`PageviewPayload`,description:`Payload for a pageview envelope.`}),r=e.object({url:e.url(),durationMs:e.number().optional()}).meta({id:`PageleavePayload`,title:`PageleavePayload`,description:`Payload for a pageleave envelope.`});export{r as pageleavePayloadSchema,n as pageviewPayloadSchema,t as uiEventPayloadSchema};
1
+ import{z}from"zod";const uiEventPayloadSchema=z.object({event:z.record(z.string(),z.unknown())}).meta({id:`UiEventPayload`,title:`UiEventPayload`,description:`Payload for a UI event envelope.`}),pageviewPayloadSchema=z.object({url:z.url(),title:z.string().optional()}).meta({id:`PageviewPayload`,title:`PageviewPayload`,description:`Payload for a pageview envelope.`}),pageleavePayloadSchema=z.object({url:z.url(),durationMs:z.number().optional()}).meta({id:`PageleavePayload`,title:`PageleavePayload`,description:`Payload for a pageleave envelope.`});export{pageleavePayloadSchema,pageviewPayloadSchema,uiEventPayloadSchema};
2
+ //# sourceMappingURL=page-events.mjs.map
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let zod=require("zod");const rageClickPayloadSchema=zod.z.object({count:zod.z.number(),timeWindow:zod.z.number(),selector:zod.z.string(),text:zod.z.string(),x:zod.z.number(),y:zod.z.number(),timestamp:zod.z.number()}).meta({id:`RageClickPayload`,title:`RageClickPayload`,description:`Payload for a rage-click envelope.`});exports.rageClickPayloadSchema=rageClickPayloadSchema;
@@ -0,0 +1,16 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/sdk/plugins/payload/rage-click.d.ts
4
+ declare const rageClickPayloadSchema: z.ZodObject<{
5
+ count: z.ZodNumber;
6
+ timeWindow: z.ZodNumber;
7
+ selector: z.ZodString;
8
+ text: z.ZodString;
9
+ x: z.ZodNumber;
10
+ y: z.ZodNumber;
11
+ timestamp: z.ZodNumber;
12
+ }, z.core.$strip>;
13
+ type RageClickPayload = z.infer<typeof rageClickPayloadSchema>;
14
+ //#endregion
15
+ export { RageClickPayload, rageClickPayloadSchema };
16
+ //# sourceMappingURL=rage-click.d.cts.map
@@ -12,4 +12,5 @@ declare const rageClickPayloadSchema: z.ZodObject<{
12
12
  }, z.core.$strip>;
13
13
  type RageClickPayload = z.infer<typeof rageClickPayloadSchema>;
14
14
  //#endregion
15
- export { RageClickPayload, rageClickPayloadSchema };
15
+ export { RageClickPayload, rageClickPayloadSchema };
16
+ //# sourceMappingURL=rage-click.d.mts.map
@@ -1 +1,2 @@
1
- import{z as e}from"zod";const t=e.object({count:e.number(),timeWindow:e.number(),selector:e.string(),text:e.string(),x:e.number(),y:e.number(),timestamp:e.number()}).meta({id:`RageClickPayload`,title:`RageClickPayload`,description:`Payload for a rage-click envelope.`});export{t as rageClickPayloadSchema};
1
+ import{z}from"zod";const rageClickPayloadSchema=z.object({count:z.number(),timeWindow:z.number(),selector:z.string(),text:z.string(),x:z.number(),y:z.number(),timestamp:z.number()}).meta({id:`RageClickPayload`,title:`RageClickPayload`,description:`Payload for a rage-click envelope.`});export{rageClickPayloadSchema};
2
+ //# sourceMappingURL=rage-click.mjs.map
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let zod=require("zod");const replayChunkPayloadSchema=zod.z.object({ts:zod.z.number(),count:zod.z.number(),events:zod.z.array(zod.z.string()),first_event_ts:zod.z.number().optional(),last_event_ts:zod.z.number().optional()}).meta({id:`ReplayChunkPayload`,title:`ReplayChunkPayload`,description:`Payload for a replay-chunk envelope.`});exports.replayChunkPayloadSchema=replayChunkPayloadSchema;
@@ -0,0 +1,14 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/sdk/plugins/payload/replay.d.ts
4
+ declare const replayChunkPayloadSchema: z.ZodObject<{
5
+ ts: z.ZodNumber;
6
+ count: z.ZodNumber;
7
+ events: z.ZodArray<z.ZodString>;
8
+ first_event_ts: z.ZodOptional<z.ZodNumber>;
9
+ last_event_ts: z.ZodOptional<z.ZodNumber>;
10
+ }, z.core.$strip>;
11
+ type ReplayChunkPayload = z.infer<typeof replayChunkPayloadSchema>;
12
+ //#endregion
13
+ export { ReplayChunkPayload, replayChunkPayloadSchema };
14
+ //# sourceMappingURL=replay.d.cts.map
@@ -10,4 +10,5 @@ declare const replayChunkPayloadSchema: z.ZodObject<{
10
10
  }, z.core.$strip>;
11
11
  type ReplayChunkPayload = z.infer<typeof replayChunkPayloadSchema>;
12
12
  //#endregion
13
- export { ReplayChunkPayload, replayChunkPayloadSchema };
13
+ export { ReplayChunkPayload, replayChunkPayloadSchema };
14
+ //# sourceMappingURL=replay.d.mts.map
@@ -1 +1,2 @@
1
- import{z as e}from"zod";const t=e.object({ts:e.number(),count:e.number(),events:e.array(e.string()),first_event_ts:e.number().optional(),last_event_ts:e.number().optional()}).meta({id:`ReplayChunkPayload`,title:`ReplayChunkPayload`,description:`Payload for a replay-chunk envelope.`});export{t as replayChunkPayloadSchema};
1
+ import{z}from"zod";const replayChunkPayloadSchema=z.object({ts:z.number(),count:z.number(),events:z.array(z.string()),first_event_ts:z.number().optional(),last_event_ts:z.number().optional()}).meta({id:`ReplayChunkPayload`,title:`ReplayChunkPayload`,description:`Payload for a replay-chunk envelope.`});export{replayChunkPayloadSchema};
2
+ //# sourceMappingURL=replay.mjs.map
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const require_sdk_plugins_manifest=require("./plugins/manifest.cjs");let zod=require("zod");const remotePluginConfigSchema=zod.z.object(Object.fromEntries(require_sdk_plugins_manifest.PLUGIN_MANIFEST.map(p=>[p.name,zod.z.boolean()]))).meta({id:`RemotePluginConfig`,title:`RemotePluginConfig`}),remoteConfigSchema=zod.z.object({plugins:remotePluginConfigSchema}).meta({id:`RemoteConfig`,title:`RemoteConfig`}),EVENT_TYPE_TO_PLUGIN=Object.fromEntries(require_sdk_plugins_manifest.PLUGIN_MANIFEST.flatMap(plugin=>plugin.events.map(event=>[event.name,plugin.name])));exports.EVENT_TYPE_TO_PLUGIN=EVENT_TYPE_TO_PLUGIN,exports.remoteConfigSchema=remoteConfigSchema,exports.remotePluginConfigSchema=remotePluginConfigSchema;
@@ -0,0 +1,39 @@
1
+ import { EventType } from "./envelope.cjs";
2
+ import { PluginKey } from "./plugins/manifest.cjs";
3
+ import { z } from "zod";
4
+
5
+ //#region src/sdk/remote-config.d.ts
6
+ type RemotePluginConfig = Partial<Record<PluginKey, boolean>>;
7
+ /**
8
+ * Closed-shape schema for the SDK's per-plugin enabled state. Derived
9
+ * from `PLUGIN_MANIFEST` so adding a plugin to the manifest extends
10
+ * this schema automatically — no separate place to keep in sync.
11
+ *
12
+ * The closed shape (vs `Record<string, boolean>`) is what makes Speakeasy
13
+ * generate a typed `{ errors?: boolean, replay?: boolean, ... }` instead
14
+ * of a generic dictionary, and lets the SDK reject typo'd plugin names
15
+ * before they silently drop on the wire.
16
+ */
17
+ declare const remotePluginConfigSchema: z.ZodObject<{
18
+ device: z.ZodBoolean;
19
+ errors: z.ZodBoolean;
20
+ logs: z.ZodBoolean;
21
+ pageEvents: z.ZodBoolean;
22
+ rageClick: z.ZodBoolean;
23
+ replay: z.ZodBoolean;
24
+ }, z.core.$strip>;
25
+ declare const remoteConfigSchema: z.ZodObject<{
26
+ plugins: z.ZodObject<{
27
+ device: z.ZodBoolean;
28
+ errors: z.ZodBoolean;
29
+ logs: z.ZodBoolean;
30
+ pageEvents: z.ZodBoolean;
31
+ rageClick: z.ZodBoolean;
32
+ replay: z.ZodBoolean;
33
+ }, z.core.$strip>;
34
+ }, z.core.$strip>;
35
+ type RemoteConfig = z.infer<typeof remoteConfigSchema>;
36
+ declare const EVENT_TYPE_TO_PLUGIN: Record<EventType, PluginKey>;
37
+ //#endregion
38
+ export { EVENT_TYPE_TO_PLUGIN, RemoteConfig, RemotePluginConfig, remoteConfigSchema, remotePluginConfigSchema };
39
+ //# sourceMappingURL=remote-config.d.cts.map
@@ -35,4 +35,5 @@ declare const remoteConfigSchema: z.ZodObject<{
35
35
  type RemoteConfig = z.infer<typeof remoteConfigSchema>;
36
36
  declare const EVENT_TYPE_TO_PLUGIN: Record<EventType, PluginKey>;
37
37
  //#endregion
38
- export { EVENT_TYPE_TO_PLUGIN, RemoteConfig, RemotePluginConfig, remoteConfigSchema, remotePluginConfigSchema };
38
+ export { EVENT_TYPE_TO_PLUGIN, RemoteConfig, RemotePluginConfig, remoteConfigSchema, remotePluginConfigSchema };
39
+ //# sourceMappingURL=remote-config.d.mts.map
@@ -1 +1,2 @@
1
- import{PLUGIN_MANIFEST as e}from"./plugins/manifest.mjs";import{z as t}from"zod";const n=t.object(Object.fromEntries(e.map(e=>[e.name,t.boolean()]))).meta({id:`RemotePluginConfig`,title:`RemotePluginConfig`}),r=t.object({plugins:n}).meta({id:`RemoteConfig`,title:`RemoteConfig`}),i=Object.fromEntries(e.flatMap(e=>e.events.map(t=>[t.name,e.name])));export{i as EVENT_TYPE_TO_PLUGIN,r as remoteConfigSchema,n as remotePluginConfigSchema};
1
+ import{PLUGIN_MANIFEST}from"./plugins/manifest.mjs";import{z}from"zod";const remotePluginConfigSchema=z.object(Object.fromEntries(PLUGIN_MANIFEST.map(p=>[p.name,z.boolean()]))).meta({id:`RemotePluginConfig`,title:`RemotePluginConfig`}),remoteConfigSchema=z.object({plugins:remotePluginConfigSchema}).meta({id:`RemoteConfig`,title:`RemoteConfig`}),EVENT_TYPE_TO_PLUGIN=Object.fromEntries(PLUGIN_MANIFEST.flatMap(plugin=>plugin.events.map(event=>[event.name,plugin.name])));export{EVENT_TYPE_TO_PLUGIN,remoteConfigSchema,remotePluginConfigSchema};
2
+ //# sourceMappingURL=remote-config.mjs.map
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let zod=require("zod");const envSchema=zod.z.string().min(1).nullable().meta({id:`Environment`,title:`Environment`,description:"Deployment environment the SDK is running in. Free-form label (e.g. `production`, `preview`, `staging`, `development`)."}),DEFAULT_ENVIRONMENT=`development`,ENVIRONMENT_ENV_VARS=[`INTERFERE_ENVIRONMENT`,`VERCEL_ENV`,`NODE_ENV`];function resolveEnvironment(opts){let env=opts?.env??{},explicit=normalizeEnv(opts?.explicit);if(explicit)return explicit;for(let key of ENVIRONMENT_ENV_VARS){let value=normalizeEnv(env[key]);if(value)return value}return DEFAULT_ENVIRONMENT}const runtimeSchema=zod.z.enum([`browser`,`node`,`edge`]).nullable().meta({id:`Runtime`,title:`Runtime`,description:`JavaScript runtime the SDK is running in.`});function inferRuntime(options){return typeof window<`u`&&typeof document<`u`&&typeof navigator<`u`?`browser`:typeof globalThis.EdgeRuntime==`string`||options?.nextRuntime===`edge`?`edge`:typeof process<`u`&&typeof process.versions?.node==`string`?`node`:null}function normalizeEnv(value){if(typeof value!=`string`)return null;let env=value.trim().toLowerCase();return env.length>0?env:null}exports.DEFAULT_ENVIRONMENT=DEFAULT_ENVIRONMENT,exports.envSchema=envSchema,exports.inferRuntime=inferRuntime,exports.normalizeEnv=normalizeEnv,exports.resolveEnvironment=resolveEnvironment,exports.runtimeSchema=runtimeSchema;
@@ -0,0 +1,41 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/sdk/runtime.d.ts
4
+ declare const envSchema: z.ZodNullable<z.ZodString>;
5
+ type Env = z.infer<typeof envSchema>;
6
+ /**
7
+ * Fallback environment when nothing is configured. `development` (not
8
+ * `production`, which is what Sentry defaults to) because the collector has
9
+ * an always-on per-surface environment filter — an unconfigured run is far
10
+ * more likely a developer's laptop than a real deploy, so a filtered-by-default
11
+ * label keeps local noise out of product data. A real deploy sets one of the
12
+ * higher-precedence signals below.
13
+ */
14
+ declare const DEFAULT_ENVIRONMENT = "development";
15
+ /**
16
+ * Resolve the deployment environment using a precedence chain modelled on
17
+ * Sentry's: an explicit value (init option) wins, then a dedicated
18
+ * `INTERFERE_ENVIRONMENT`, then platform signals (`VERCEL_ENV`), then
19
+ * `NODE_ENV` as a last-resort fallback, then {@link DEFAULT_ENVIRONMENT}.
20
+ *
21
+ * `NODE_ENV` is deliberately last: it's a build-mode flag (staging, preview,
22
+ * and prod all ship `NODE_ENV=production`), not a deploy-environment
23
+ * identifier. The dedicated var is the real abstraction.
24
+ */
25
+ declare function resolveEnvironment(opts?: {
26
+ readonly explicit?: string | null | undefined;
27
+ readonly env?: Record<string, string | undefined>;
28
+ }): string;
29
+ declare const runtimeSchema: z.ZodNullable<z.ZodEnum<{
30
+ browser: "browser";
31
+ edge: "edge";
32
+ node: "node";
33
+ }>>;
34
+ type Runtime = z.infer<typeof runtimeSchema>;
35
+ declare function inferRuntime(options?: {
36
+ readonly nextRuntime?: unknown;
37
+ }): Runtime;
38
+ declare function normalizeEnv(value: unknown): string | null;
39
+ //#endregion
40
+ export { DEFAULT_ENVIRONMENT, Env, Runtime, envSchema, inferRuntime, normalizeEnv, resolveEnvironment, runtimeSchema };
41
+ //# sourceMappingURL=runtime.d.cts.map
@@ -1,12 +1,31 @@
1
1
  import { z } from "zod";
2
2
 
3
3
  //#region src/sdk/runtime.d.ts
4
- declare const envSchema: z.ZodNullable<z.ZodEnum<{
5
- development: "development";
6
- preview: "preview";
7
- production: "production";
8
- }>>;
4
+ declare const envSchema: z.ZodNullable<z.ZodString>;
9
5
  type Env = z.infer<typeof envSchema>;
6
+ /**
7
+ * Fallback environment when nothing is configured. `development` (not
8
+ * `production`, which is what Sentry defaults to) because the collector has
9
+ * an always-on per-surface environment filter — an unconfigured run is far
10
+ * more likely a developer's laptop than a real deploy, so a filtered-by-default
11
+ * label keeps local noise out of product data. A real deploy sets one of the
12
+ * higher-precedence signals below.
13
+ */
14
+ declare const DEFAULT_ENVIRONMENT = "development";
15
+ /**
16
+ * Resolve the deployment environment using a precedence chain modelled on
17
+ * Sentry's: an explicit value (init option) wins, then a dedicated
18
+ * `INTERFERE_ENVIRONMENT`, then platform signals (`VERCEL_ENV`), then
19
+ * `NODE_ENV` as a last-resort fallback, then {@link DEFAULT_ENVIRONMENT}.
20
+ *
21
+ * `NODE_ENV` is deliberately last: it's a build-mode flag (staging, preview,
22
+ * and prod all ship `NODE_ENV=production`), not a deploy-environment
23
+ * identifier. The dedicated var is the real abstraction.
24
+ */
25
+ declare function resolveEnvironment(opts?: {
26
+ readonly explicit?: string | null | undefined;
27
+ readonly env?: Record<string, string | undefined>;
28
+ }): string;
10
29
  declare const runtimeSchema: z.ZodNullable<z.ZodEnum<{
11
30
  browser: "browser";
12
31
  edge: "edge";
@@ -16,6 +35,7 @@ type Runtime = z.infer<typeof runtimeSchema>;
16
35
  declare function inferRuntime(options?: {
17
36
  readonly nextRuntime?: unknown;
18
37
  }): Runtime;
19
- declare function normalizeEnv(value: unknown): Env;
38
+ declare function normalizeEnv(value: unknown): string | null;
20
39
  //#endregion
21
- export { Env, Runtime, envSchema, inferRuntime, normalizeEnv, runtimeSchema };
40
+ export { DEFAULT_ENVIRONMENT, Env, Runtime, envSchema, inferRuntime, normalizeEnv, resolveEnvironment, runtimeSchema };
41
+ //# sourceMappingURL=runtime.d.mts.map
@@ -1 +1,2 @@
1
- import{z as e}from"zod";const t=e.enum([`development`,`preview`,`production`]).nullable().meta({id:`Environment`,title:`Environment`,description:`Deployment environment the SDK is running in.`}),n=e.enum([`browser`,`node`,`edge`]).nullable().meta({id:`Runtime`,title:`Runtime`,description:`JavaScript runtime the SDK is running in.`});function r(e){return typeof window<`u`&&typeof document<`u`&&typeof navigator<`u`?`browser`:typeof globalThis.EdgeRuntime==`string`||e?.nextRuntime===`edge`?`edge`:typeof process<`u`&&typeof process.versions?.node==`string`?`node`:null}function i(e){if(typeof e!=`string`)return null;let n=e.toLowerCase();return t.safeParse(n).success?n:null}export{t as envSchema,r as inferRuntime,i as normalizeEnv,n as runtimeSchema};
1
+ import{z}from"zod";const envSchema=z.string().min(1).nullable().meta({id:`Environment`,title:`Environment`,description:"Deployment environment the SDK is running in. Free-form label (e.g. `production`, `preview`, `staging`, `development`)."}),DEFAULT_ENVIRONMENT=`development`,ENVIRONMENT_ENV_VARS=[`INTERFERE_ENVIRONMENT`,`VERCEL_ENV`,`NODE_ENV`];function resolveEnvironment(opts){let env=opts?.env??{},explicit=normalizeEnv(opts?.explicit);if(explicit)return explicit;for(let key of ENVIRONMENT_ENV_VARS){let value=normalizeEnv(env[key]);if(value)return value}return DEFAULT_ENVIRONMENT}const runtimeSchema=z.enum([`browser`,`node`,`edge`]).nullable().meta({id:`Runtime`,title:`Runtime`,description:`JavaScript runtime the SDK is running in.`});function inferRuntime(options){return typeof window<`u`&&typeof document<`u`&&typeof navigator<`u`?`browser`:typeof globalThis.EdgeRuntime==`string`||options?.nextRuntime===`edge`?`edge`:typeof process<`u`&&typeof process.versions?.node==`string`?`node`:null}function normalizeEnv(value){if(typeof value!=`string`)return null;let env=value.trim().toLowerCase();return env.length>0?env:null}export{DEFAULT_ENVIRONMENT,envSchema,inferRuntime,normalizeEnv,resolveEnvironment,runtimeSchema};
2
+ //# sourceMappingURL=runtime.mjs.map