@interfere/types 5.0.0 → 8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/data/source-maps.d.mts +1 -8
- package/dist/data/source-maps.d.mts.map +1 -1
- package/dist/data/source-maps.mjs +1 -1
- package/dist/data/source-maps.mjs.map +1 -1
- package/dist/integrations/index.d.mts +1 -17
- package/dist/integrations/index.d.mts.map +1 -1
- package/dist/integrations/index.mjs +5 -7
- package/dist/integrations/index.mjs.map +1 -1
- package/dist/integrations/platforms/github.d.mts +1 -6
- package/dist/integrations/platforms/github.d.mts.map +1 -1
- package/dist/integrations/platforms/github.mjs +2 -4
- package/dist/integrations/platforms/github.mjs.map +1 -1
- package/dist/integrations/platforms/vercel.d.mts +1 -23
- package/dist/integrations/platforms/vercel.d.mts.map +1 -1
- package/dist/integrations/platforms/vercel.mjs +2 -4
- package/dist/integrations/platforms/vercel.mjs.map +1 -1
- package/dist/sdk/env.d.mts +3 -7
- package/dist/sdk/env.d.mts.map +1 -1
- package/dist/sdk/env.mjs +1 -1
- package/dist/sdk/env.mjs.map +1 -1
- package/dist/sdk/envelope.d.mts +4 -162
- package/dist/sdk/envelope.d.mts.map +1 -1
- package/dist/sdk/envelope.mjs +5 -7
- package/dist/sdk/envelope.mjs.map +1 -1
- package/dist/sdk/identify.d.mts +2 -0
- package/dist/sdk/identify.d.mts.map +1 -1
- package/dist/sdk/identify.mjs +2 -0
- package/dist/sdk/identify.mjs.map +1 -1
- package/dist/sdk/runtime.d.mts +2 -5
- package/dist/sdk/runtime.d.mts.map +1 -1
- package/dist/sdk/runtime.mjs +1 -5
- package/dist/sdk/runtime.mjs.map +1 -1
- package/dist/util/omit-undefined.d.mts +5 -0
- package/dist/util/omit-undefined.d.mts.map +1 -0
- package/dist/util/omit-undefined.mjs +8 -0
- package/dist/util/omit-undefined.mjs.map +1 -0
- package/package.json +5 -5
- package/dist/auth/public-token.d.mts +0 -9
- package/dist/auth/public-token.d.mts.map +0 -1
- package/dist/auth/public-token.mjs +0 -7
- package/dist/auth/public-token.mjs.map +0 -1
- package/dist/data/surface.d.mts +0 -7
- package/dist/data/surface.d.mts.map +0 -1
- package/dist/data/surface.mjs +0 -4
- package/dist/data/surface.mjs.map +0 -1
- package/dist/events/identify.d.mts +0 -13
- package/dist/events/identify.d.mts.map +0 -1
- package/dist/events/identify.mjs +0 -11
- package/dist/events/identify.mjs.map +0 -1
- package/dist/events/index.d.mts +0 -396
- package/dist/events/index.d.mts.map +0 -1
- package/dist/events/index.mjs +0 -82
- package/dist/events/index.mjs.map +0 -1
- package/dist/events/rage-click.d.mts +0 -17
- package/dist/events/rage-click.d.mts.map +0 -1
- package/dist/events/rage-click.mjs +0 -15
- package/dist/events/rage-click.mjs.map +0 -1
- package/dist/events/replay-chunk.d.mts +0 -16
- package/dist/events/replay-chunk.d.mts.map +0 -1
- package/dist/events/replay-chunk.mjs +0 -14
- package/dist/events/replay-chunk.mjs.map +0 -1
- package/dist/events/session-summary.d.mts +0 -15
- package/dist/events/session-summary.d.mts.map +0 -1
- package/dist/events/session-summary.mjs +0 -13
- package/dist/events/session-summary.mjs.map +0 -1
- package/dist/events/ui-event.d.mts +0 -11
- package/dist/events/ui-event.d.mts.map +0 -1
- package/dist/events/ui-event.mjs +0 -9
- package/dist/events/ui-event.mjs.map +0 -1
- package/dist/sdk/capture.d.mts +0 -8
- package/dist/sdk/capture.d.mts.map +0 -1
- package/dist/sdk/capture.mjs +0 -12
- package/dist/sdk/capture.mjs.map +0 -1
- package/dist/sdk/config.d.mts +0 -183
- package/dist/sdk/config.d.mts.map +0 -1
- package/dist/sdk/config.mjs +0 -71
- package/dist/sdk/config.mjs.map +0 -1
- package/dist/sdk/packages.d.mts +0 -7
- package/dist/sdk/packages.d.mts.map +0 -1
- package/dist/sdk/packages.mjs +0 -9
- package/dist/sdk/packages.mjs.map +0 -1
- package/dist/sdk/plugins/lib/schemas.d.mts +0 -22
- package/dist/sdk/plugins/lib/schemas.d.mts.map +0 -1
- package/dist/sdk/plugins/lib/schemas.mjs +0 -1
- package/dist/sdk/plugins/payload/ai-summary.d.mts +0 -13
- package/dist/sdk/plugins/payload/ai-summary.d.mts.map +0 -1
- package/dist/sdk/plugins/payload/ai-summary.mjs +0 -11
- package/dist/sdk/plugins/payload/ai-summary.mjs.map +0 -1
package/dist/sdk/runtime.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.mjs","names":[],"sources":["../../src/sdk/runtime.ts"],"sourcesContent":["import { z } from \"zod/v4\";\n\nexport const envSchema = z\n .enum([\"development\", \"preview\", \"production\"])\n .nullable();\n\nexport type Env = z.infer<typeof envSchema>;\n\nexport const runtimeSchema = z.enum([\"browser\", \"node\", \"edge\"]).nullable();\n\nexport type Runtime = z.infer<typeof runtimeSchema>;\n\nexport function inferRuntime(options?: {\n readonly nextRuntime?: unknown;\n}): Runtime {\n // Browser\n if (\n typeof window !== \"undefined\" &&\n typeof document !== \"undefined\" &&\n typeof navigator !== \"undefined\"\n ) {\n return \"browser\";\n }\n\n // Edge (Vercel sets globalThis.EdgeRuntime = \"edge-runtime\")\n if (\n typeof (globalThis as { EdgeRuntime?: unknown }).EdgeRuntime === \"string\"\n ) {\n return \"edge\";\n }\n\n // Next.js Edge (explicit signal)\n if (options?.nextRuntime === \"edge\") {\n return \"edge\";\n }\n\n // Node\n if (\n typeof process !== \"undefined\" &&\n typeof process.versions?.node === \"string\"\n ) {\n return \"node\";\n }\n\n return null;\n}\n\nexport function normalizeEnv(value: unknown): Env {\n if (typeof value !== \"string\") {\n return null;\n }\n\n const env = value.toLowerCase();\n\n if (envSchema.safeParse(env).success) {\n return env as Env;\n }\n\n return null;\n}\n
|
|
1
|
+
{"version":3,"file":"runtime.mjs","names":[],"sources":["../../src/sdk/runtime.ts"],"sourcesContent":["import { z } from \"zod/v4\";\n\nexport const envSchema = z\n .enum([\"development\", \"preview\", \"production\"])\n .nullable();\n\nexport type Env = z.infer<typeof envSchema>;\n\nexport const runtimeSchema = z.enum([\"browser\", \"node\", \"edge\"]).nullable();\n\nexport type Runtime = z.infer<typeof runtimeSchema>;\n\nexport function inferRuntime(options?: {\n readonly nextRuntime?: unknown;\n}): Runtime {\n // Browser\n if (\n typeof window !== \"undefined\" &&\n typeof document !== \"undefined\" &&\n typeof navigator !== \"undefined\"\n ) {\n return \"browser\";\n }\n\n // Edge (Vercel sets globalThis.EdgeRuntime = \"edge-runtime\")\n if (\n typeof (globalThis as { EdgeRuntime?: unknown }).EdgeRuntime === \"string\"\n ) {\n return \"edge\";\n }\n\n // Next.js Edge (explicit signal)\n if (options?.nextRuntime === \"edge\") {\n return \"edge\";\n }\n\n // Node\n if (\n typeof process !== \"undefined\" &&\n typeof process.versions?.node === \"string\"\n ) {\n return \"node\";\n }\n\n return null;\n}\n\nexport function normalizeEnv(value: unknown): Env {\n if (typeof value !== \"string\") {\n return null;\n }\n\n const env = value.toLowerCase();\n\n if (envSchema.safeParse(env).success) {\n return env as Env;\n }\n\n return null;\n}\n"],"mappings":";;AAEA,MAAa,YAAY,EACtB,KAAK;CAAC;CAAe;CAAW;CAAa,CAAC,CAC9C,UAAU;AAIb,MAAa,gBAAgB,EAAE,KAAK;CAAC;CAAW;CAAQ;CAAO,CAAC,CAAC,UAAU;AAI3E,SAAgB,aAAa,SAEjB;AAEV,KACE,OAAO,WAAW,eAClB,OAAO,aAAa,eACpB,OAAO,cAAc,YAErB,QAAO;AAIT,KACE,OAAQ,WAAyC,gBAAgB,SAEjE,QAAO;AAIT,KAAI,SAAS,gBAAgB,OAC3B,QAAO;AAIT,KACE,OAAO,YAAY,eACnB,OAAO,QAAQ,UAAU,SAAS,SAElC,QAAO;AAGT,QAAO;;AAGT,SAAgB,aAAa,OAAqB;AAChD,KAAI,OAAO,UAAU,SACnB,QAAO;CAGT,MAAM,MAAM,MAAM,aAAa;AAE/B,KAAI,UAAU,UAAU,IAAI,CAAC,QAC3B,QAAO;AAGT,QAAO"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
//#region src/util/omit-undefined.d.ts
|
|
2
|
+
type OmitUndefined<T extends object> = Partial<{ [K in keyof T]: Exclude<T[K], undefined> }>;
|
|
3
|
+
declare function omitUndefined<T extends object>(value: T): OmitUndefined<T>;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { OmitUndefined, omitUndefined };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"omit-undefined.d.mts","names":[],"sources":["../../src/util/omit-undefined.ts"],"mappings":";KAAY,aAAA,qBAAkC,OAAA,eAChC,CAAA,GAAI,OAAA,CAAQ,CAAA,CAAE,CAAA;AAAA,iBAGZ,aAAA,kBAAA,CAAgC,KAAA,EAAO,CAAA,GAAI,aAAA,CAAc,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"omit-undefined.mjs","names":[],"sources":["../../src/util/omit-undefined.ts"],"sourcesContent":["export type OmitUndefined<T extends object> = Partial<{\n [K in keyof T]: Exclude<T[K], undefined>;\n}>;\n\nexport function omitUndefined<T extends object>(value: T): OmitUndefined<T> {\n const result: Record<string, unknown> = {};\n\n for (const [key, entry] of Object.entries(value as Record<string, unknown>)) {\n if (entry !== undefined) {\n result[key] = entry;\n }\n }\n\n return result as OmitUndefined<T>;\n}\n"],"mappings":";AAIA,SAAgB,cAAgC,OAA4B;CAC1E,MAAM,SAAkC,EAAE;AAE1C,MAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,MAAiC,CACzE,KAAI,UAAU,KAAA,EACZ,QAAO,OAAO;AAIlB,QAAO"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@interfere/types",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "TypeScript & Zod types for Interfere",
|
|
6
6
|
"keywords": [
|
|
@@ -106,16 +106,16 @@
|
|
|
106
106
|
"typecheck": "tsc --noEmit --incremental"
|
|
107
107
|
},
|
|
108
108
|
"dependencies": {
|
|
109
|
-
"@interfere/constants": "^
|
|
109
|
+
"@interfere/constants": "^8.0.0",
|
|
110
110
|
"error-stack-parser-es": "^1.0.5",
|
|
111
111
|
"zod": "^4.3.6"
|
|
112
112
|
},
|
|
113
113
|
"devDependencies": {
|
|
114
|
-
"@interfere/typescript-config": "^
|
|
115
|
-
"@interfere/vitest-config": "^
|
|
114
|
+
"@interfere/typescript-config": "^8.0.0",
|
|
115
|
+
"@interfere/vitest-config": "^8.0.0",
|
|
116
116
|
"@types/node": "^24.12.0",
|
|
117
117
|
"@vitest/coverage-v8": "^4.0.18",
|
|
118
|
-
"tsdown": "^0.21.
|
|
118
|
+
"tsdown": "^0.21.4",
|
|
119
119
|
"typescript": "5.9.3",
|
|
120
120
|
"vitest": "^4.0.18"
|
|
121
121
|
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { z } from "zod/v4";
|
|
2
|
-
|
|
3
|
-
//#region src/auth/public-token.d.ts
|
|
4
|
-
declare const PUBLIC_TOKEN_PREFIX = "int_pub_";
|
|
5
|
-
declare const PUBLIC_TOKEN_REGEX: RegExp;
|
|
6
|
-
declare const publicTokenSchema: z.ZodString;
|
|
7
|
-
type PublicToken = z.infer<typeof publicTokenSchema>;
|
|
8
|
-
//#endregion
|
|
9
|
-
export { PUBLIC_TOKEN_PREFIX, PUBLIC_TOKEN_REGEX, PublicToken, publicTokenSchema };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"public-token.d.mts","names":[],"sources":["../../src/auth/public-token.ts"],"mappings":";;;cAEa,mBAAA;AAAA,cACA,kBAAA,EAAkB,MAAA;AAAA,cAElB,iBAAA,EAAiB,CAAA,CAAA,SAAA;AAAA,KAElB,WAAA,GAAc,CAAA,CAAE,KAAA,QAAa,iBAAA"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { z } from "zod/v4";
|
|
2
|
-
//#region src/auth/public-token.ts
|
|
3
|
-
const PUBLIC_TOKEN_PREFIX = "int_pub_";
|
|
4
|
-
const PUBLIC_TOKEN_REGEX = /^int_pub_([a-zA-Z0-9]+)$/;
|
|
5
|
-
const publicTokenSchema = z.string().startsWith(PUBLIC_TOKEN_PREFIX);
|
|
6
|
-
//#endregion
|
|
7
|
-
export { PUBLIC_TOKEN_PREFIX, PUBLIC_TOKEN_REGEX, publicTokenSchema };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"public-token.mjs","names":[],"sources":["../../src/auth/public-token.ts"],"sourcesContent":["import { z } from \"zod/v4\";\n\nexport const PUBLIC_TOKEN_PREFIX = \"int_pub_\";\nexport const PUBLIC_TOKEN_REGEX = /^int_pub_([a-zA-Z0-9]+)$/;\n\nexport const publicTokenSchema = z.string().startsWith(PUBLIC_TOKEN_PREFIX);\n\nexport type PublicToken = z.infer<typeof publicTokenSchema>;\n"],"mappings":";;AAEA,MAAa,sBAAsB;AACnC,MAAa,qBAAqB;AAElC,MAAa,oBAAoB,EAAE,QAAQ,CAAC,WAAW,oBAAoB"}
|
package/dist/data/surface.d.mts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"surface.d.mts","names":[],"sources":["../../src/data/surface.ts"],"mappings":";;;cAIa,iBAAA,EAAiB,CAAA,CAAA,SAAA;AAAA,KAQlB,WAAA,GAAc,CAAA,CAAE,KAAA,QAAa,iBAAA"}
|
package/dist/data/surface.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"surface.mjs","names":[],"sources":["../../src/data/surface.ts"],"sourcesContent":["import { z } from \"zod/v4\";\n\nconst SURFACE_SLUG_MAX_LENGTH = 255;\n\nexport const surfaceSlugSchema = z\n .string()\n .min(1)\n .max(SURFACE_SLUG_MAX_LENGTH)\n .regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/, {\n message: \"Surface slug must be lowercase letters, numbers, and hyphens\",\n });\n\nexport type SurfaceSlug = z.infer<typeof surfaceSlugSchema>;\n"],"mappings":";AAIA,MAAa,oBAAoB,EAC9B,QAAQ,CACR,IAAI,EAAE,CACN,IAL6B,IAKD,CAC5B,MAAM,8BAA8B,EACnC,SAAS,gEACV,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { z } from "zod/v4";
|
|
2
|
-
|
|
3
|
-
//#region src/events/identify.d.ts
|
|
4
|
-
declare const identifyFactsPayloadSchema: z.ZodObject<{
|
|
5
|
-
identifier: z.ZodString;
|
|
6
|
-
email: z.ZodOptional<z.ZodString>;
|
|
7
|
-
name: z.ZodOptional<z.ZodString>;
|
|
8
|
-
avatar: z.ZodOptional<z.ZodString>;
|
|
9
|
-
traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
10
|
-
}, z.core.$strip>;
|
|
11
|
-
type IdentifyFactsPayload = z.infer<typeof identifyFactsPayloadSchema>;
|
|
12
|
-
//#endregion
|
|
13
|
-
export { IdentifyFactsPayload, identifyFactsPayloadSchema };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"identify.d.mts","names":[],"sources":["../../src/events/identify.ts"],"mappings":";;;cAEa,0BAAA,EAA0B,CAAA,CAAA,SAAA;;;;;;;KAQ3B,oBAAA,GAAuB,CAAA,CAAE,KAAA,QAAa,0BAAA"}
|
package/dist/events/identify.mjs
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { z } from "zod/v4";
|
|
2
|
-
//#region src/events/identify.ts
|
|
3
|
-
const identifyFactsPayloadSchema = z.object({
|
|
4
|
-
identifier: z.string(),
|
|
5
|
-
email: z.string().optional(),
|
|
6
|
-
name: z.string().optional(),
|
|
7
|
-
avatar: z.string().optional(),
|
|
8
|
-
traits: z.record(z.string(), z.unknown()).optional()
|
|
9
|
-
});
|
|
10
|
-
//#endregion
|
|
11
|
-
export { identifyFactsPayloadSchema };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"identify.mjs","names":[],"sources":["../../src/events/identify.ts"],"sourcesContent":["import { z } from \"zod/v4\";\n\nexport const identifyFactsPayloadSchema = z.object({\n identifier: z.string(),\n email: z.string().optional(),\n name: z.string().optional(),\n avatar: z.string().optional(),\n traits: z.record(z.string(), z.unknown()).optional(),\n});\n\nexport type IdentifyFactsPayload = z.infer<typeof identifyFactsPayloadSchema>;\n"],"mappings":";;AAEA,MAAa,6BAA6B,EAAE,OAAO;CACjD,YAAY,EAAE,QAAQ;CACtB,OAAO,EAAE,QAAQ,CAAC,UAAU;CAC5B,MAAM,EAAE,QAAQ,CAAC,UAAU;CAC3B,QAAQ,EAAE,QAAQ,CAAC,UAAU;CAC7B,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,SAAS,CAAC,CAAC,UAAU;CACrD,CAAC"}
|
package/dist/events/index.d.mts
DELETED
|
@@ -1,396 +0,0 @@
|
|
|
1
|
-
import { z } from "zod/v4";
|
|
2
|
-
|
|
3
|
-
//#region src/events/index.d.ts
|
|
4
|
-
declare const factsPayloadSchemas: {
|
|
5
|
-
readonly error: z.ZodObject<{
|
|
6
|
-
frames: z.ZodArray<z.ZodObject<{
|
|
7
|
-
fileName: z.ZodOptional<z.ZodString>;
|
|
8
|
-
functionName: z.ZodOptional<z.ZodString>;
|
|
9
|
-
lineNumber: z.ZodOptional<z.ZodNumber>;
|
|
10
|
-
columnNumber: z.ZodOptional<z.ZodNumber>;
|
|
11
|
-
source: z.ZodOptional<z.ZodString>;
|
|
12
|
-
}, z.core.$strip>>;
|
|
13
|
-
enrichedFrames: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
14
|
-
file: z.ZodNullable<z.ZodString>;
|
|
15
|
-
line: z.ZodNullable<z.ZodNumber>;
|
|
16
|
-
column: z.ZodNullable<z.ZodNumber>;
|
|
17
|
-
fn: z.ZodNullable<z.ZodString>;
|
|
18
|
-
originalFile: z.ZodNullable<z.ZodString>;
|
|
19
|
-
originalLine: z.ZodNullable<z.ZodNumber>;
|
|
20
|
-
originalColumn: z.ZodNullable<z.ZodNumber>;
|
|
21
|
-
originalName: z.ZodNullable<z.ZodString>;
|
|
22
|
-
sourceMapFound: z.ZodBoolean;
|
|
23
|
-
inApp: z.ZodBoolean;
|
|
24
|
-
rawId: z.ZodString;
|
|
25
|
-
}, z.core.$strip>>>;
|
|
26
|
-
frameCount: z.ZodOptional<z.ZodNumber>;
|
|
27
|
-
enrichedFrameCount: z.ZodOptional<z.ZodNumber>;
|
|
28
|
-
message: z.ZodNullable<z.ZodString>;
|
|
29
|
-
name: z.ZodNullable<z.ZodString>;
|
|
30
|
-
stack: z.ZodNullable<z.ZodString>;
|
|
31
|
-
mechanism: z.ZodOptional<z.ZodObject<{
|
|
32
|
-
type: z.ZodString;
|
|
33
|
-
handled: z.ZodBoolean;
|
|
34
|
-
synthetic: z.ZodOptional<z.ZodBoolean>;
|
|
35
|
-
}, z.core.$strip>>;
|
|
36
|
-
context: z.ZodOptional<z.ZodObject<{
|
|
37
|
-
framework: z.ZodOptional<z.ZodString>;
|
|
38
|
-
routerKind: z.ZodOptional<z.ZodEnum<{
|
|
39
|
-
"Pages Router": "Pages Router";
|
|
40
|
-
"App Router": "App Router";
|
|
41
|
-
}>>;
|
|
42
|
-
routePath: z.ZodOptional<z.ZodString>;
|
|
43
|
-
routeType: z.ZodOptional<z.ZodEnum<{
|
|
44
|
-
render: "render";
|
|
45
|
-
route: "route";
|
|
46
|
-
action: "action";
|
|
47
|
-
middleware: "middleware";
|
|
48
|
-
proxy: "proxy";
|
|
49
|
-
}>>;
|
|
50
|
-
renderSource: z.ZodOptional<z.ZodEnum<{
|
|
51
|
-
"react-server-components": "react-server-components";
|
|
52
|
-
"react-server-components-payload": "react-server-components-payload";
|
|
53
|
-
"server-rendering": "server-rendering";
|
|
54
|
-
}>>;
|
|
55
|
-
revalidateReason: z.ZodOptional<z.ZodEnum<{
|
|
56
|
-
"on-demand": "on-demand";
|
|
57
|
-
stale: "stale";
|
|
58
|
-
}>>;
|
|
59
|
-
renderType: z.ZodOptional<z.ZodEnum<{
|
|
60
|
-
dynamic: "dynamic";
|
|
61
|
-
"dynamic-resume": "dynamic-resume";
|
|
62
|
-
}>>;
|
|
63
|
-
requestPath: z.ZodOptional<z.ZodString>;
|
|
64
|
-
requestMethod: z.ZodOptional<z.ZodString>;
|
|
65
|
-
errorDigest: z.ZodOptional<z.ZodString>;
|
|
66
|
-
}, z.core.$strip>>;
|
|
67
|
-
captureSource: z.ZodOptional<z.ZodString>;
|
|
68
|
-
fingerprintComponents: z.ZodOptional<z.ZodObject<{
|
|
69
|
-
hash: z.ZodString;
|
|
70
|
-
components: z.ZodArray<z.ZodString>;
|
|
71
|
-
}, z.core.$strip>>;
|
|
72
|
-
runtime: z.ZodOptional<z.ZodString>;
|
|
73
|
-
releaseId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
74
|
-
}, z.core.$strip>;
|
|
75
|
-
readonly pageview: z.ZodObject<{
|
|
76
|
-
url: z.ZodString;
|
|
77
|
-
title: z.ZodOptional<z.ZodString>;
|
|
78
|
-
referrer: z.ZodOptional<z.ZodString>;
|
|
79
|
-
runtime: z.ZodOptional<z.ZodString>;
|
|
80
|
-
releaseId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
81
|
-
}, z.core.$strip>;
|
|
82
|
-
readonly pageleave: z.ZodObject<{
|
|
83
|
-
url: z.ZodString;
|
|
84
|
-
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
85
|
-
runtime: z.ZodOptional<z.ZodString>;
|
|
86
|
-
releaseId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
87
|
-
}, z.core.$strip>;
|
|
88
|
-
readonly ui_event: z.ZodObject<{
|
|
89
|
-
event: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
90
|
-
runtime: z.ZodOptional<z.ZodString>;
|
|
91
|
-
releaseId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
92
|
-
}, z.core.$strip>;
|
|
93
|
-
readonly replay_chunk: z.ZodObject<{
|
|
94
|
-
ts: z.ZodNumber;
|
|
95
|
-
count: z.ZodNumber;
|
|
96
|
-
first_event_ts: z.ZodOptional<z.ZodNumber>;
|
|
97
|
-
last_event_ts: z.ZodOptional<z.ZodNumber>;
|
|
98
|
-
chunk_count: z.ZodOptional<z.ZodNumber>;
|
|
99
|
-
runtime: z.ZodOptional<z.ZodString>;
|
|
100
|
-
releaseId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
101
|
-
objectKey: z.ZodOptional<z.ZodString>;
|
|
102
|
-
}, z.core.$strip>;
|
|
103
|
-
readonly session_summary: z.ZodObject<{
|
|
104
|
-
summary: z.ZodString;
|
|
105
|
-
pageTitle: z.ZodString;
|
|
106
|
-
pageUrl: z.ZodString;
|
|
107
|
-
contentLength: z.ZodNumber;
|
|
108
|
-
timestamp: z.ZodNumber;
|
|
109
|
-
runtime: z.ZodOptional<z.ZodString>;
|
|
110
|
-
releaseId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
111
|
-
}, z.core.$strip>;
|
|
112
|
-
readonly rage_click: z.ZodObject<{
|
|
113
|
-
count: z.ZodNumber;
|
|
114
|
-
timeWindow: z.ZodNumber;
|
|
115
|
-
selector: z.ZodString;
|
|
116
|
-
text: z.ZodString;
|
|
117
|
-
x: z.ZodNumber;
|
|
118
|
-
y: z.ZodNumber;
|
|
119
|
-
timestamp: z.ZodNumber;
|
|
120
|
-
runtime: z.ZodOptional<z.ZodString>;
|
|
121
|
-
releaseId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
122
|
-
}, z.core.$strip>;
|
|
123
|
-
readonly identify: z.ZodObject<{
|
|
124
|
-
identifier: z.ZodString;
|
|
125
|
-
email: z.ZodOptional<z.ZodString>;
|
|
126
|
-
name: z.ZodOptional<z.ZodString>;
|
|
127
|
-
avatar: z.ZodOptional<z.ZodString>;
|
|
128
|
-
traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
129
|
-
}, z.core.$strip>;
|
|
130
|
-
};
|
|
131
|
-
type FactsEventType = keyof typeof factsPayloadSchemas;
|
|
132
|
-
declare const factsEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
133
|
-
uuid: z.ZodString;
|
|
134
|
-
organizationId: z.ZodString;
|
|
135
|
-
surfaceId: z.ZodString;
|
|
136
|
-
environment: z.ZodString;
|
|
137
|
-
sessionId: z.ZodNullable<z.ZodString>;
|
|
138
|
-
fingerprint: z.ZodNullable<z.ZodString>;
|
|
139
|
-
errorSource: z.ZodNullable<z.ZodEnum<{
|
|
140
|
-
edge: "edge";
|
|
141
|
-
client: "client";
|
|
142
|
-
server: "server";
|
|
143
|
-
}>>;
|
|
144
|
-
buildId: z.ZodNullable<z.ZodString>;
|
|
145
|
-
timestamp: z.ZodDate;
|
|
146
|
-
createdAt: z.ZodDate;
|
|
147
|
-
insertedAt: z.ZodDate;
|
|
148
|
-
event: z.ZodLiteral<"error">;
|
|
149
|
-
payload: z.ZodObject<{
|
|
150
|
-
frames: z.ZodArray<z.ZodObject<{
|
|
151
|
-
fileName: z.ZodOptional<z.ZodString>;
|
|
152
|
-
functionName: z.ZodOptional<z.ZodString>;
|
|
153
|
-
lineNumber: z.ZodOptional<z.ZodNumber>;
|
|
154
|
-
columnNumber: z.ZodOptional<z.ZodNumber>;
|
|
155
|
-
source: z.ZodOptional<z.ZodString>;
|
|
156
|
-
}, z.core.$strip>>;
|
|
157
|
-
enrichedFrames: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
158
|
-
file: z.ZodNullable<z.ZodString>;
|
|
159
|
-
line: z.ZodNullable<z.ZodNumber>;
|
|
160
|
-
column: z.ZodNullable<z.ZodNumber>;
|
|
161
|
-
fn: z.ZodNullable<z.ZodString>;
|
|
162
|
-
originalFile: z.ZodNullable<z.ZodString>;
|
|
163
|
-
originalLine: z.ZodNullable<z.ZodNumber>;
|
|
164
|
-
originalColumn: z.ZodNullable<z.ZodNumber>;
|
|
165
|
-
originalName: z.ZodNullable<z.ZodString>;
|
|
166
|
-
sourceMapFound: z.ZodBoolean;
|
|
167
|
-
inApp: z.ZodBoolean;
|
|
168
|
-
rawId: z.ZodString;
|
|
169
|
-
}, z.core.$strip>>>;
|
|
170
|
-
frameCount: z.ZodOptional<z.ZodNumber>;
|
|
171
|
-
enrichedFrameCount: z.ZodOptional<z.ZodNumber>;
|
|
172
|
-
message: z.ZodNullable<z.ZodString>;
|
|
173
|
-
name: z.ZodNullable<z.ZodString>;
|
|
174
|
-
stack: z.ZodNullable<z.ZodString>;
|
|
175
|
-
mechanism: z.ZodOptional<z.ZodObject<{
|
|
176
|
-
type: z.ZodString;
|
|
177
|
-
handled: z.ZodBoolean;
|
|
178
|
-
synthetic: z.ZodOptional<z.ZodBoolean>;
|
|
179
|
-
}, z.core.$strip>>;
|
|
180
|
-
context: z.ZodOptional<z.ZodObject<{
|
|
181
|
-
framework: z.ZodOptional<z.ZodString>;
|
|
182
|
-
routerKind: z.ZodOptional<z.ZodEnum<{
|
|
183
|
-
"Pages Router": "Pages Router";
|
|
184
|
-
"App Router": "App Router";
|
|
185
|
-
}>>;
|
|
186
|
-
routePath: z.ZodOptional<z.ZodString>;
|
|
187
|
-
routeType: z.ZodOptional<z.ZodEnum<{
|
|
188
|
-
render: "render";
|
|
189
|
-
route: "route";
|
|
190
|
-
action: "action";
|
|
191
|
-
middleware: "middleware";
|
|
192
|
-
proxy: "proxy";
|
|
193
|
-
}>>;
|
|
194
|
-
renderSource: z.ZodOptional<z.ZodEnum<{
|
|
195
|
-
"react-server-components": "react-server-components";
|
|
196
|
-
"react-server-components-payload": "react-server-components-payload";
|
|
197
|
-
"server-rendering": "server-rendering";
|
|
198
|
-
}>>;
|
|
199
|
-
revalidateReason: z.ZodOptional<z.ZodEnum<{
|
|
200
|
-
"on-demand": "on-demand";
|
|
201
|
-
stale: "stale";
|
|
202
|
-
}>>;
|
|
203
|
-
renderType: z.ZodOptional<z.ZodEnum<{
|
|
204
|
-
dynamic: "dynamic";
|
|
205
|
-
"dynamic-resume": "dynamic-resume";
|
|
206
|
-
}>>;
|
|
207
|
-
requestPath: z.ZodOptional<z.ZodString>;
|
|
208
|
-
requestMethod: z.ZodOptional<z.ZodString>;
|
|
209
|
-
errorDigest: z.ZodOptional<z.ZodString>;
|
|
210
|
-
}, z.core.$strip>>;
|
|
211
|
-
captureSource: z.ZodOptional<z.ZodString>;
|
|
212
|
-
fingerprintComponents: z.ZodOptional<z.ZodObject<{
|
|
213
|
-
hash: z.ZodString;
|
|
214
|
-
components: z.ZodArray<z.ZodString>;
|
|
215
|
-
}, z.core.$strip>>;
|
|
216
|
-
runtime: z.ZodOptional<z.ZodString>;
|
|
217
|
-
releaseId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
218
|
-
}, z.core.$strip>;
|
|
219
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
220
|
-
uuid: z.ZodString;
|
|
221
|
-
organizationId: z.ZodString;
|
|
222
|
-
surfaceId: z.ZodString;
|
|
223
|
-
environment: z.ZodString;
|
|
224
|
-
sessionId: z.ZodNullable<z.ZodString>;
|
|
225
|
-
fingerprint: z.ZodNullable<z.ZodString>;
|
|
226
|
-
errorSource: z.ZodNullable<z.ZodEnum<{
|
|
227
|
-
edge: "edge";
|
|
228
|
-
client: "client";
|
|
229
|
-
server: "server";
|
|
230
|
-
}>>;
|
|
231
|
-
buildId: z.ZodNullable<z.ZodString>;
|
|
232
|
-
timestamp: z.ZodDate;
|
|
233
|
-
createdAt: z.ZodDate;
|
|
234
|
-
insertedAt: z.ZodDate;
|
|
235
|
-
event: z.ZodLiteral<"pageview">;
|
|
236
|
-
payload: z.ZodObject<{
|
|
237
|
-
url: z.ZodString;
|
|
238
|
-
title: z.ZodOptional<z.ZodString>;
|
|
239
|
-
referrer: z.ZodOptional<z.ZodString>;
|
|
240
|
-
runtime: z.ZodOptional<z.ZodString>;
|
|
241
|
-
releaseId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
242
|
-
}, z.core.$strip>;
|
|
243
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
244
|
-
uuid: z.ZodString;
|
|
245
|
-
organizationId: z.ZodString;
|
|
246
|
-
surfaceId: z.ZodString;
|
|
247
|
-
environment: z.ZodString;
|
|
248
|
-
sessionId: z.ZodNullable<z.ZodString>;
|
|
249
|
-
fingerprint: z.ZodNullable<z.ZodString>;
|
|
250
|
-
errorSource: z.ZodNullable<z.ZodEnum<{
|
|
251
|
-
edge: "edge";
|
|
252
|
-
client: "client";
|
|
253
|
-
server: "server";
|
|
254
|
-
}>>;
|
|
255
|
-
buildId: z.ZodNullable<z.ZodString>;
|
|
256
|
-
timestamp: z.ZodDate;
|
|
257
|
-
createdAt: z.ZodDate;
|
|
258
|
-
insertedAt: z.ZodDate;
|
|
259
|
-
event: z.ZodLiteral<"pageleave">;
|
|
260
|
-
payload: z.ZodObject<{
|
|
261
|
-
url: z.ZodString;
|
|
262
|
-
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
263
|
-
runtime: z.ZodOptional<z.ZodString>;
|
|
264
|
-
releaseId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
265
|
-
}, z.core.$strip>;
|
|
266
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
267
|
-
uuid: z.ZodString;
|
|
268
|
-
organizationId: z.ZodString;
|
|
269
|
-
surfaceId: z.ZodString;
|
|
270
|
-
environment: z.ZodString;
|
|
271
|
-
sessionId: z.ZodNullable<z.ZodString>;
|
|
272
|
-
fingerprint: z.ZodNullable<z.ZodString>;
|
|
273
|
-
errorSource: z.ZodNullable<z.ZodEnum<{
|
|
274
|
-
edge: "edge";
|
|
275
|
-
client: "client";
|
|
276
|
-
server: "server";
|
|
277
|
-
}>>;
|
|
278
|
-
buildId: z.ZodNullable<z.ZodString>;
|
|
279
|
-
timestamp: z.ZodDate;
|
|
280
|
-
createdAt: z.ZodDate;
|
|
281
|
-
insertedAt: z.ZodDate;
|
|
282
|
-
event: z.ZodLiteral<"ui_event">;
|
|
283
|
-
payload: z.ZodObject<{
|
|
284
|
-
event: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
285
|
-
runtime: z.ZodOptional<z.ZodString>;
|
|
286
|
-
releaseId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
287
|
-
}, z.core.$strip>;
|
|
288
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
289
|
-
uuid: z.ZodString;
|
|
290
|
-
organizationId: z.ZodString;
|
|
291
|
-
surfaceId: z.ZodString;
|
|
292
|
-
environment: z.ZodString;
|
|
293
|
-
sessionId: z.ZodNullable<z.ZodString>;
|
|
294
|
-
fingerprint: z.ZodNullable<z.ZodString>;
|
|
295
|
-
errorSource: z.ZodNullable<z.ZodEnum<{
|
|
296
|
-
edge: "edge";
|
|
297
|
-
client: "client";
|
|
298
|
-
server: "server";
|
|
299
|
-
}>>;
|
|
300
|
-
buildId: z.ZodNullable<z.ZodString>;
|
|
301
|
-
timestamp: z.ZodDate;
|
|
302
|
-
createdAt: z.ZodDate;
|
|
303
|
-
insertedAt: z.ZodDate;
|
|
304
|
-
event: z.ZodLiteral<"replay_chunk">;
|
|
305
|
-
payload: z.ZodObject<{
|
|
306
|
-
ts: z.ZodNumber;
|
|
307
|
-
count: z.ZodNumber;
|
|
308
|
-
first_event_ts: z.ZodOptional<z.ZodNumber>;
|
|
309
|
-
last_event_ts: z.ZodOptional<z.ZodNumber>;
|
|
310
|
-
chunk_count: z.ZodOptional<z.ZodNumber>;
|
|
311
|
-
runtime: z.ZodOptional<z.ZodString>;
|
|
312
|
-
releaseId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
313
|
-
objectKey: z.ZodOptional<z.ZodString>;
|
|
314
|
-
}, z.core.$strip>;
|
|
315
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
316
|
-
uuid: z.ZodString;
|
|
317
|
-
organizationId: z.ZodString;
|
|
318
|
-
surfaceId: z.ZodString;
|
|
319
|
-
environment: z.ZodString;
|
|
320
|
-
sessionId: z.ZodNullable<z.ZodString>;
|
|
321
|
-
fingerprint: z.ZodNullable<z.ZodString>;
|
|
322
|
-
errorSource: z.ZodNullable<z.ZodEnum<{
|
|
323
|
-
edge: "edge";
|
|
324
|
-
client: "client";
|
|
325
|
-
server: "server";
|
|
326
|
-
}>>;
|
|
327
|
-
buildId: z.ZodNullable<z.ZodString>;
|
|
328
|
-
timestamp: z.ZodDate;
|
|
329
|
-
createdAt: z.ZodDate;
|
|
330
|
-
insertedAt: z.ZodDate;
|
|
331
|
-
event: z.ZodLiteral<"session_summary">;
|
|
332
|
-
payload: z.ZodObject<{
|
|
333
|
-
summary: z.ZodString;
|
|
334
|
-
pageTitle: z.ZodString;
|
|
335
|
-
pageUrl: z.ZodString;
|
|
336
|
-
contentLength: z.ZodNumber;
|
|
337
|
-
timestamp: z.ZodNumber;
|
|
338
|
-
runtime: z.ZodOptional<z.ZodString>;
|
|
339
|
-
releaseId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
340
|
-
}, z.core.$strip>;
|
|
341
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
342
|
-
uuid: z.ZodString;
|
|
343
|
-
organizationId: z.ZodString;
|
|
344
|
-
surfaceId: z.ZodString;
|
|
345
|
-
environment: z.ZodString;
|
|
346
|
-
sessionId: z.ZodNullable<z.ZodString>;
|
|
347
|
-
fingerprint: z.ZodNullable<z.ZodString>;
|
|
348
|
-
errorSource: z.ZodNullable<z.ZodEnum<{
|
|
349
|
-
edge: "edge";
|
|
350
|
-
client: "client";
|
|
351
|
-
server: "server";
|
|
352
|
-
}>>;
|
|
353
|
-
buildId: z.ZodNullable<z.ZodString>;
|
|
354
|
-
timestamp: z.ZodDate;
|
|
355
|
-
createdAt: z.ZodDate;
|
|
356
|
-
insertedAt: z.ZodDate;
|
|
357
|
-
event: z.ZodLiteral<"rage_click">;
|
|
358
|
-
payload: z.ZodObject<{
|
|
359
|
-
count: z.ZodNumber;
|
|
360
|
-
timeWindow: z.ZodNumber;
|
|
361
|
-
selector: z.ZodString;
|
|
362
|
-
text: z.ZodString;
|
|
363
|
-
x: z.ZodNumber;
|
|
364
|
-
y: z.ZodNumber;
|
|
365
|
-
timestamp: z.ZodNumber;
|
|
366
|
-
runtime: z.ZodOptional<z.ZodString>;
|
|
367
|
-
releaseId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
368
|
-
}, z.core.$strip>;
|
|
369
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
370
|
-
uuid: z.ZodString;
|
|
371
|
-
organizationId: z.ZodString;
|
|
372
|
-
surfaceId: z.ZodString;
|
|
373
|
-
environment: z.ZodString;
|
|
374
|
-
sessionId: z.ZodNullable<z.ZodString>;
|
|
375
|
-
fingerprint: z.ZodNullable<z.ZodString>;
|
|
376
|
-
errorSource: z.ZodNullable<z.ZodEnum<{
|
|
377
|
-
edge: "edge";
|
|
378
|
-
client: "client";
|
|
379
|
-
server: "server";
|
|
380
|
-
}>>;
|
|
381
|
-
buildId: z.ZodNullable<z.ZodString>;
|
|
382
|
-
timestamp: z.ZodDate;
|
|
383
|
-
createdAt: z.ZodDate;
|
|
384
|
-
insertedAt: z.ZodDate;
|
|
385
|
-
event: z.ZodLiteral<"identify">;
|
|
386
|
-
payload: z.ZodObject<{
|
|
387
|
-
identifier: z.ZodString;
|
|
388
|
-
email: z.ZodOptional<z.ZodString>;
|
|
389
|
-
name: z.ZodOptional<z.ZodString>;
|
|
390
|
-
avatar: z.ZodOptional<z.ZodString>;
|
|
391
|
-
traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
392
|
-
}, z.core.$strip>;
|
|
393
|
-
}, z.core.$strip>], "event">;
|
|
394
|
-
type FactsEvent = z.infer<typeof factsEventSchema>;
|
|
395
|
-
//#endregion
|
|
396
|
-
export { FactsEvent, FactsEventType, factsEventSchema, factsPayloadSchemas };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/events/index.ts"],"mappings":";;;cAWa,mBAAA;EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAWD,cAAA,gBAA8B,mBAAA;AAAA,cAkB7B,gBAAA,EAAgB,CAAA,CAAA,qBAAA,EAAA,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA2CjB,UAAA,GAAa,CAAA,CAAE,KAAA,QAAa,gBAAA"}
|
package/dist/events/index.mjs
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { errorFactsPayloadSchema } from "./error.mjs";
|
|
2
|
-
import { identifyFactsPayloadSchema } from "./identify.mjs";
|
|
3
|
-
import { pageleaveFactsPayloadSchema } from "./pageleave.mjs";
|
|
4
|
-
import { pageviewFactsPayloadSchema } from "./pageview.mjs";
|
|
5
|
-
import { rageClickFactsPayloadSchema } from "./rage-click.mjs";
|
|
6
|
-
import { replayChunkFactsPayloadSchema } from "./replay-chunk.mjs";
|
|
7
|
-
import { sessionSummaryFactsPayloadSchema } from "./session-summary.mjs";
|
|
8
|
-
import { uiEventFactsPayloadSchema } from "./ui-event.mjs";
|
|
9
|
-
import { z } from "zod/v4";
|
|
10
|
-
//#region src/events/index.ts
|
|
11
|
-
const factsPayloadSchemas = {
|
|
12
|
-
error: errorFactsPayloadSchema,
|
|
13
|
-
pageview: pageviewFactsPayloadSchema,
|
|
14
|
-
pageleave: pageleaveFactsPayloadSchema,
|
|
15
|
-
ui_event: uiEventFactsPayloadSchema,
|
|
16
|
-
replay_chunk: replayChunkFactsPayloadSchema,
|
|
17
|
-
session_summary: sessionSummaryFactsPayloadSchema,
|
|
18
|
-
rage_click: rageClickFactsPayloadSchema,
|
|
19
|
-
identify: identifyFactsPayloadSchema
|
|
20
|
-
};
|
|
21
|
-
const errorSourceSchema = z.enum([
|
|
22
|
-
"client",
|
|
23
|
-
"server",
|
|
24
|
-
"edge"
|
|
25
|
-
]);
|
|
26
|
-
const commonFactsFields = {
|
|
27
|
-
uuid: z.string(),
|
|
28
|
-
organizationId: z.string(),
|
|
29
|
-
surfaceId: z.string(),
|
|
30
|
-
environment: z.string(),
|
|
31
|
-
sessionId: z.string().nullable(),
|
|
32
|
-
fingerprint: z.string().nullable(),
|
|
33
|
-
errorSource: errorSourceSchema.nullable(),
|
|
34
|
-
buildId: z.string().nullable(),
|
|
35
|
-
timestamp: z.date(),
|
|
36
|
-
createdAt: z.date(),
|
|
37
|
-
insertedAt: z.date()
|
|
38
|
-
};
|
|
39
|
-
const factsEventSchema = z.discriminatedUnion("event", [
|
|
40
|
-
z.object({
|
|
41
|
-
event: z.literal("error"),
|
|
42
|
-
payload: errorFactsPayloadSchema,
|
|
43
|
-
...commonFactsFields
|
|
44
|
-
}),
|
|
45
|
-
z.object({
|
|
46
|
-
event: z.literal("pageview"),
|
|
47
|
-
payload: pageviewFactsPayloadSchema,
|
|
48
|
-
...commonFactsFields
|
|
49
|
-
}),
|
|
50
|
-
z.object({
|
|
51
|
-
event: z.literal("pageleave"),
|
|
52
|
-
payload: pageleaveFactsPayloadSchema,
|
|
53
|
-
...commonFactsFields
|
|
54
|
-
}),
|
|
55
|
-
z.object({
|
|
56
|
-
event: z.literal("ui_event"),
|
|
57
|
-
payload: uiEventFactsPayloadSchema,
|
|
58
|
-
...commonFactsFields
|
|
59
|
-
}),
|
|
60
|
-
z.object({
|
|
61
|
-
event: z.literal("replay_chunk"),
|
|
62
|
-
payload: replayChunkFactsPayloadSchema,
|
|
63
|
-
...commonFactsFields
|
|
64
|
-
}),
|
|
65
|
-
z.object({
|
|
66
|
-
event: z.literal("session_summary"),
|
|
67
|
-
payload: sessionSummaryFactsPayloadSchema,
|
|
68
|
-
...commonFactsFields
|
|
69
|
-
}),
|
|
70
|
-
z.object({
|
|
71
|
-
event: z.literal("rage_click"),
|
|
72
|
-
payload: rageClickFactsPayloadSchema,
|
|
73
|
-
...commonFactsFields
|
|
74
|
-
}),
|
|
75
|
-
z.object({
|
|
76
|
-
event: z.literal("identify"),
|
|
77
|
-
payload: identifyFactsPayloadSchema,
|
|
78
|
-
...commonFactsFields
|
|
79
|
-
})
|
|
80
|
-
]);
|
|
81
|
-
//#endregion
|
|
82
|
-
export { factsEventSchema, factsPayloadSchemas };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/events/index.ts"],"sourcesContent":["import { z } from \"zod/v4\";\n\nimport { errorFactsPayloadSchema } from \"./error.js\";\nimport { identifyFactsPayloadSchema } from \"./identify.js\";\nimport { pageleaveFactsPayloadSchema } from \"./pageleave.js\";\nimport { pageviewFactsPayloadSchema } from \"./pageview.js\";\nimport { rageClickFactsPayloadSchema } from \"./rage-click.js\";\nimport { replayChunkFactsPayloadSchema } from \"./replay-chunk.js\";\nimport { sessionSummaryFactsPayloadSchema } from \"./session-summary.js\";\nimport { uiEventFactsPayloadSchema } from \"./ui-event.js\";\n\nexport const factsPayloadSchemas = {\n error: errorFactsPayloadSchema,\n pageview: pageviewFactsPayloadSchema,\n pageleave: pageleaveFactsPayloadSchema,\n ui_event: uiEventFactsPayloadSchema,\n replay_chunk: replayChunkFactsPayloadSchema,\n session_summary: sessionSummaryFactsPayloadSchema,\n rage_click: rageClickFactsPayloadSchema,\n identify: identifyFactsPayloadSchema,\n} as const;\n\nexport type FactsEventType = keyof typeof factsPayloadSchemas;\n\nconst errorSourceSchema = z.enum([\"client\", \"server\", \"edge\"]);\n\nconst commonFactsFields = {\n uuid: z.string(),\n organizationId: z.string(),\n surfaceId: z.string(),\n environment: z.string(),\n sessionId: z.string().nullable(),\n fingerprint: z.string().nullable(),\n errorSource: errorSourceSchema.nullable(),\n buildId: z.string().nullable(),\n timestamp: z.date(),\n createdAt: z.date(),\n insertedAt: z.date(),\n};\n\nexport const factsEventSchema = z.discriminatedUnion(\"event\", [\n z.object({\n event: z.literal(\"error\"),\n payload: errorFactsPayloadSchema,\n ...commonFactsFields,\n }),\n z.object({\n event: z.literal(\"pageview\"),\n payload: pageviewFactsPayloadSchema,\n ...commonFactsFields,\n }),\n z.object({\n event: z.literal(\"pageleave\"),\n payload: pageleaveFactsPayloadSchema,\n ...commonFactsFields,\n }),\n z.object({\n event: z.literal(\"ui_event\"),\n payload: uiEventFactsPayloadSchema,\n ...commonFactsFields,\n }),\n z.object({\n event: z.literal(\"replay_chunk\"),\n payload: replayChunkFactsPayloadSchema,\n ...commonFactsFields,\n }),\n z.object({\n event: z.literal(\"session_summary\"),\n payload: sessionSummaryFactsPayloadSchema,\n ...commonFactsFields,\n }),\n z.object({\n event: z.literal(\"rage_click\"),\n payload: rageClickFactsPayloadSchema,\n ...commonFactsFields,\n }),\n z.object({\n event: z.literal(\"identify\"),\n payload: identifyFactsPayloadSchema,\n ...commonFactsFields,\n }),\n]);\n\nexport type FactsEvent = z.infer<typeof factsEventSchema>;\n"],"mappings":";;;;;;;;;;AAWA,MAAa,sBAAsB;CACjC,OAAO;CACP,UAAU;CACV,WAAW;CACX,UAAU;CACV,cAAc;CACd,iBAAiB;CACjB,YAAY;CACZ,UAAU;CACX;AAID,MAAM,oBAAoB,EAAE,KAAK;CAAC;CAAU;CAAU;CAAO,CAAC;AAE9D,MAAM,oBAAoB;CACxB,MAAM,EAAE,QAAQ;CAChB,gBAAgB,EAAE,QAAQ;CAC1B,WAAW,EAAE,QAAQ;CACrB,aAAa,EAAE,QAAQ;CACvB,WAAW,EAAE,QAAQ,CAAC,UAAU;CAChC,aAAa,EAAE,QAAQ,CAAC,UAAU;CAClC,aAAa,kBAAkB,UAAU;CACzC,SAAS,EAAE,QAAQ,CAAC,UAAU;CAC9B,WAAW,EAAE,MAAM;CACnB,WAAW,EAAE,MAAM;CACnB,YAAY,EAAE,MAAM;CACrB;AAED,MAAa,mBAAmB,EAAE,mBAAmB,SAAS;CAC5D,EAAE,OAAO;EACP,OAAO,EAAE,QAAQ,QAAQ;EACzB,SAAS;EACT,GAAG;EACJ,CAAC;CACF,EAAE,OAAO;EACP,OAAO,EAAE,QAAQ,WAAW;EAC5B,SAAS;EACT,GAAG;EACJ,CAAC;CACF,EAAE,OAAO;EACP,OAAO,EAAE,QAAQ,YAAY;EAC7B,SAAS;EACT,GAAG;EACJ,CAAC;CACF,EAAE,OAAO;EACP,OAAO,EAAE,QAAQ,WAAW;EAC5B,SAAS;EACT,GAAG;EACJ,CAAC;CACF,EAAE,OAAO;EACP,OAAO,EAAE,QAAQ,eAAe;EAChC,SAAS;EACT,GAAG;EACJ,CAAC;CACF,EAAE,OAAO;EACP,OAAO,EAAE,QAAQ,kBAAkB;EACnC,SAAS;EACT,GAAG;EACJ,CAAC;CACF,EAAE,OAAO;EACP,OAAO,EAAE,QAAQ,aAAa;EAC9B,SAAS;EACT,GAAG;EACJ,CAAC;CACF,EAAE,OAAO;EACP,OAAO,EAAE,QAAQ,WAAW;EAC5B,SAAS;EACT,GAAG;EACJ,CAAC;CACH,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { z } from "zod/v4";
|
|
2
|
-
|
|
3
|
-
//#region src/events/rage-click.d.ts
|
|
4
|
-
declare const rageClickFactsPayloadSchema: 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
|
-
runtime: z.ZodOptional<z.ZodString>;
|
|
13
|
-
releaseId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
14
|
-
}, z.core.$strip>;
|
|
15
|
-
type RageClickFactsPayload = z.infer<typeof rageClickFactsPayloadSchema>;
|
|
16
|
-
//#endregion
|
|
17
|
-
export { RageClickFactsPayload, rageClickFactsPayloadSchema };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rage-click.d.mts","names":[],"sources":["../../src/events/rage-click.ts"],"mappings":";;;cAEa,2BAAA,EAA2B,CAAA,CAAA,SAAA;;;;;;;;;;;KAY5B,qBAAA,GAAwB,CAAA,CAAE,KAAA,QAAa,2BAAA"}
|