@iann29/rastro 0.1.0-alpha.1 → 0.1.0-alpha.11

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 (179) hide show
  1. package/README.md +693 -69
  2. package/agent/integration.md +801 -0
  3. package/agent/manifest.json +205 -0
  4. package/agent/manifest.schema.json +444 -0
  5. package/dist/client/federation.d.ts +381 -0
  6. package/dist/client/federation.d.ts.map +1 -0
  7. package/dist/client/federation.js +274 -0
  8. package/dist/client/federation.js.map +1 -0
  9. package/dist/client/index.d.ts +2673 -15
  10. package/dist/client/index.d.ts.map +1 -1
  11. package/dist/client/index.js +565 -33
  12. package/dist/client/index.js.map +1 -1
  13. package/dist/component/_generated/api.d.ts +22 -0
  14. package/dist/component/_generated/api.d.ts.map +1 -1
  15. package/dist/component/_generated/api.js.map +1 -1
  16. package/dist/component/_generated/component.d.ts +315 -4
  17. package/dist/component/_generated/component.d.ts.map +1 -1
  18. package/dist/component/_generated/server.d.ts +4 -0
  19. package/dist/component/_generated/server.d.ts.map +1 -1
  20. package/dist/component/_generated/server.js.map +1 -1
  21. package/dist/component/affiliates.d.ts.map +1 -1
  22. package/dist/component/affiliates.js +6 -2
  23. package/dist/component/affiliates.js.map +1 -1
  24. package/dist/component/cardinality.d.ts +12 -0
  25. package/dist/component/cardinality.d.ts.map +1 -0
  26. package/dist/component/cardinality.js +94 -0
  27. package/dist/component/cardinality.js.map +1 -0
  28. package/dist/component/constants.d.ts +28 -1
  29. package/dist/component/constants.d.ts.map +1 -1
  30. package/dist/component/constants.js +44 -1
  31. package/dist/component/constants.js.map +1 -1
  32. package/dist/component/convex.config.d.ts +6 -1
  33. package/dist/component/convex.config.js +9 -1
  34. package/dist/component/convex.config.js.map +1 -1
  35. package/dist/component/coverage.d.ts +27 -0
  36. package/dist/component/coverage.d.ts.map +1 -0
  37. package/dist/component/coverage.js +56 -0
  38. package/dist/component/coverage.js.map +1 -0
  39. package/dist/component/diagnostics.d.ts +9 -0
  40. package/dist/component/diagnostics.d.ts.map +1 -0
  41. package/dist/component/diagnostics.js +47 -0
  42. package/dist/component/diagnostics.js.map +1 -0
  43. package/dist/component/errors.d.ts +1 -1
  44. package/dist/component/errors.d.ts.map +1 -1
  45. package/dist/component/errors.js.map +1 -1
  46. package/dist/component/eventStore.d.ts +21 -9
  47. package/dist/component/eventStore.d.ts.map +1 -1
  48. package/dist/component/eventStore.js +142 -152
  49. package/dist/component/eventStore.js.map +1 -1
  50. package/dist/component/funnels.d.ts.map +1 -1
  51. package/dist/component/funnels.js +5 -3
  52. package/dist/component/funnels.js.map +1 -1
  53. package/dist/component/geo.d.ts +73 -0
  54. package/dist/component/geo.d.ts.map +1 -0
  55. package/dist/component/geo.js +648 -0
  56. package/dist/component/geo.js.map +1 -0
  57. package/dist/component/goals.d.ts.map +1 -1
  58. package/dist/component/goals.js +8 -5
  59. package/dist/component/goals.js.map +1 -1
  60. package/dist/component/guards.d.ts.map +1 -1
  61. package/dist/component/guards.js.map +1 -1
  62. package/dist/component/http.d.ts.map +1 -1
  63. package/dist/component/http.js +281 -62
  64. package/dist/component/http.js.map +1 -1
  65. package/dist/component/identity.d.ts +13 -0
  66. package/dist/component/identity.d.ts.map +1 -0
  67. package/dist/component/identity.js +58 -0
  68. package/dist/component/identity.js.map +1 -0
  69. package/dist/component/ingest.d.ts +3 -1
  70. package/dist/component/ingest.d.ts.map +1 -1
  71. package/dist/component/ingest.js +498 -95
  72. package/dist/component/ingest.js.map +1 -1
  73. package/dist/component/live.d.ts.map +1 -1
  74. package/dist/component/live.js +7 -6
  75. package/dist/component/live.js.map +1 -1
  76. package/dist/component/localTime.d.ts +25 -0
  77. package/dist/component/localTime.d.ts.map +1 -0
  78. package/dist/component/localTime.js +126 -0
  79. package/dist/component/localTime.js.map +1 -0
  80. package/dist/component/reports.d.ts +266 -10
  81. package/dist/component/reports.d.ts.map +1 -1
  82. package/dist/component/reports.js +1243 -137
  83. package/dist/component/reports.js.map +1 -1
  84. package/dist/component/retention.d.ts +75 -1
  85. package/dist/component/retention.d.ts.map +1 -1
  86. package/dist/component/retention.js +561 -38
  87. package/dist/component/retention.js.map +1 -1
  88. package/dist/component/rollupStore.d.ts +320 -0
  89. package/dist/component/rollupStore.d.ts.map +1 -0
  90. package/dist/component/rollupStore.js +596 -0
  91. package/dist/component/rollupStore.js.map +1 -0
  92. package/dist/component/rollups.d.ts +20 -0
  93. package/dist/component/rollups.d.ts.map +1 -0
  94. package/dist/component/rollups.js +73 -0
  95. package/dist/component/rollups.js.map +1 -0
  96. package/dist/component/sanitize.d.ts +24 -1
  97. package/dist/component/sanitize.d.ts.map +1 -1
  98. package/dist/component/sanitize.js +96 -16
  99. package/dist/component/sanitize.js.map +1 -1
  100. package/dist/component/schema.d.ts +687 -65
  101. package/dist/component/schema.js +187 -20
  102. package/dist/component/schema.js.map +1 -1
  103. package/dist/component/sites.d.ts +12 -0
  104. package/dist/component/sites.d.ts.map +1 -1
  105. package/dist/component/sites.js +41 -7
  106. package/dist/component/sites.js.map +1 -1
  107. package/dist/component/useragent.d.ts +9 -0
  108. package/dist/component/useragent.d.ts.map +1 -0
  109. package/dist/component/useragent.js +152 -0
  110. package/dist/component/useragent.js.map +1 -0
  111. package/dist/component/validators.d.ts +124 -69
  112. package/dist/component/validators.d.ts.map +1 -1
  113. package/dist/component/validators.js +35 -14
  114. package/dist/component/validators.js.map +1 -1
  115. package/dist/component/visitors.d.ts +19 -0
  116. package/dist/component/visitors.d.ts.map +1 -0
  117. package/dist/component/visitors.js +86 -0
  118. package/dist/component/visitors.js.map +1 -0
  119. package/dist/component/vitals.d.ts +41 -0
  120. package/dist/component/vitals.d.ts.map +1 -0
  121. package/dist/component/vitals.js +115 -0
  122. package/dist/component/vitals.js.map +1 -0
  123. package/dist/react/index.d.ts.map +1 -1
  124. package/dist/react/index.js.map +1 -1
  125. package/dist/tracker/generated.d.ts +11 -4
  126. package/dist/tracker/generated.d.ts.map +1 -1
  127. package/dist/tracker/generated.js +11 -4
  128. package/dist/tracker/generated.js.map +1 -1
  129. package/dist/tracker/tracker.d.ts +1 -1
  130. package/dist/tracker/tracker.d.ts.map +1 -1
  131. package/dist/tracker/tracker.js +57 -20
  132. package/dist/tracker/tracker.js.map +1 -1
  133. package/dist/tracker/vitals.d.ts +10 -0
  134. package/dist/tracker/vitals.d.ts.map +1 -0
  135. package/dist/tracker/vitals.js +140 -0
  136. package/dist/tracker/vitals.js.map +1 -0
  137. package/dist/tracker.min.js +1 -1
  138. package/dist/vitals.min.js +1 -0
  139. package/docs/benchmarks/2026-08-20-realistic.md +76 -76
  140. package/docs/benchmarks/2026-08-21-formal-certification.md +353 -0
  141. package/docs/benchmarks/2026-08-30-alpha6-recertification.md +206 -0
  142. package/docs/federation-setup.md +464 -0
  143. package/docs/federation.md +352 -0
  144. package/docs/upgrading.md +344 -0
  145. package/llms.txt +72 -0
  146. package/package.json +55 -11
  147. package/scripts/benchmark-ingest.mjs +175 -73
  148. package/scripts/generate-federation-keys.mjs +20 -0
  149. package/src/component/_generated/api.ts +22 -0
  150. package/src/component/_generated/component.ts +381 -4
  151. package/src/component/_generated/server.ts +4 -0
  152. package/src/component/affiliates.ts +20 -5
  153. package/src/component/cardinality.ts +117 -0
  154. package/src/component/constants.ts +44 -1
  155. package/src/component/convex.config.ts +11 -1
  156. package/src/component/coverage.ts +71 -0
  157. package/src/component/diagnostics.ts +65 -0
  158. package/src/component/errors.ts +2 -1
  159. package/src/component/eventStore.ts +217 -193
  160. package/src/component/funnels.ts +19 -16
  161. package/src/component/geo.ts +835 -0
  162. package/src/component/goals.ts +29 -21
  163. package/src/component/guards.ts +3 -1
  164. package/src/component/http.ts +404 -70
  165. package/src/component/identity.ts +74 -0
  166. package/src/component/ingest.ts +894 -188
  167. package/src/component/live.ts +13 -7
  168. package/src/component/localTime.ts +167 -0
  169. package/src/component/reports.ts +1872 -197
  170. package/src/component/retention.ts +788 -96
  171. package/src/component/rollupStore.ts +799 -0
  172. package/src/component/rollups.ts +82 -0
  173. package/src/component/sanitize.ts +144 -29
  174. package/src/component/schema.ts +217 -21
  175. package/src/component/sites.ts +59 -12
  176. package/src/component/useragent.ts +171 -0
  177. package/src/component/validators.ts +49 -14
  178. package/src/component/visitors.ts +116 -0
  179. package/src/component/vitals.ts +146 -0
@@ -1,5 +1,6 @@
1
1
  import { type Infer } from "convex/values";
2
- export declare const eventTypeValidator: import("convex/values").VUnion<"click" | "conversion" | "custom" | "heartbeat" | "outbound" | "pageview", [import("convex/values").VLiteral<"pageview", "required">, import("convex/values").VLiteral<"click", "required">, import("convex/values").VLiteral<"custom", "required">, import("convex/values").VLiteral<"conversion", "required">, import("convex/values").VLiteral<"heartbeat", "required">, import("convex/values").VLiteral<"outbound", "required">], "required", never>;
2
+ export declare const eventTypeValidator: import("convex/values").VUnion<"click" | "conversion" | "custom" | "heartbeat" | "leave" | "outbound" | "pageview" | "vital", [import("convex/values").VLiteral<"pageview", "required">, import("convex/values").VLiteral<"click", "required">, import("convex/values").VLiteral<"custom", "required">, import("convex/values").VLiteral<"conversion", "required">, import("convex/values").VLiteral<"heartbeat", "required">, import("convex/values").VLiteral<"leave", "required">, import("convex/values").VLiteral<"outbound", "required">, import("convex/values").VLiteral<"vital", "required">], "required", never>;
3
+ export declare const vitalMetricValidator: import("convex/values").VUnion<"CLS" | "FCP" | "INP" | "LCP" | "TTFB", [import("convex/values").VLiteral<"LCP", "required">, import("convex/values").VLiteral<"CLS", "required">, import("convex/values").VLiteral<"INP", "required">, import("convex/values").VLiteral<"FCP", "required">, import("convex/values").VLiteral<"TTFB", "required">], "required", never>;
3
4
  export declare const propertyValueValidator: import("convex/values").VUnion<string | number | boolean | null, [import("convex/values").VString<string, "required">, import("convex/values").VFloat64<number, "required">, import("convex/values").VBoolean<boolean, "required">, import("convex/values").VNull<null, "required">], "required", never>;
4
5
  export declare const eventPropertiesValidator: import("convex/values").VRecord<Record<string, string | number | boolean | null>, import("convex/values").VString<string, "required">, import("convex/values").VUnion<string | number | boolean | null, [import("convex/values").VString<string, "required">, import("convex/values").VFloat64<number, "required">, import("convex/values").VBoolean<boolean, "required">, import("convex/values").VNull<null, "required">], "required", never>, "required", string>;
5
6
  export declare const trackerEventValidator: import("convex/values").VObject<{
@@ -16,13 +17,14 @@ export declare const trackerEventValidator: import("convex/values").VObject<{
16
17
  sessionId: string;
17
18
  target?: string | undefined;
18
19
  timestamp: number;
19
- type: "click" | "conversion" | "custom" | "heartbeat" | "outbound" | "pageview";
20
+ type: "click" | "conversion" | "custom" | "heartbeat" | "leave" | "outbound" | "pageview" | "vital";
21
+ value?: number | undefined;
20
22
  visitorId: string;
21
23
  }, {
22
24
  eventId: import("convex/values").VString<string, "required">;
23
25
  sessionId: import("convex/values").VString<string, "required">;
24
26
  visitorId: import("convex/values").VString<string, "required">;
25
- type: import("convex/values").VUnion<"click" | "conversion" | "custom" | "heartbeat" | "outbound" | "pageview", [import("convex/values").VLiteral<"pageview", "required">, import("convex/values").VLiteral<"click", "required">, import("convex/values").VLiteral<"custom", "required">, import("convex/values").VLiteral<"conversion", "required">, import("convex/values").VLiteral<"heartbeat", "required">, import("convex/values").VLiteral<"outbound", "required">], "required", never>;
27
+ type: import("convex/values").VUnion<"click" | "conversion" | "custom" | "heartbeat" | "leave" | "outbound" | "pageview" | "vital", [import("convex/values").VLiteral<"pageview", "required">, import("convex/values").VLiteral<"click", "required">, import("convex/values").VLiteral<"custom", "required">, import("convex/values").VLiteral<"conversion", "required">, import("convex/values").VLiteral<"heartbeat", "required">, import("convex/values").VLiteral<"leave", "required">, import("convex/values").VLiteral<"outbound", "required">, import("convex/values").VLiteral<"vital", "required">], "required", never>;
26
28
  name: import("convex/values").VString<string | undefined, "optional">;
27
29
  path: import("convex/values").VString<string, "required">;
28
30
  referrer: import("convex/values").VString<string | undefined, "optional">;
@@ -34,7 +36,8 @@ export declare const trackerEventValidator: import("convex/values").VObject<{
34
36
  revenueCents: import("convex/values").VFloat64<number | undefined, "optional">;
35
37
  currency: import("convex/values").VString<string | undefined, "optional">;
36
38
  affiliateSlug: import("convex/values").VString<string | undefined, "optional">;
37
- }, "required", "affiliateSlug" | "currency" | "eventId" | "href" | "name" | "path" | "properties" | "referrer" | "revenueCents" | "sequence" | "sessionId" | "target" | "timestamp" | "type" | "visitorId" | `properties.${string}`>;
39
+ value: import("convex/values").VFloat64<number | undefined, "optional">;
40
+ }, "required", "affiliateSlug" | "currency" | "eventId" | "href" | "name" | "path" | "properties" | "referrer" | "revenueCents" | "sequence" | "sessionId" | "target" | "timestamp" | "type" | "value" | "visitorId" | `properties.${string}`>;
38
41
  export declare const ingestContextValidator: import("convex/values").VObject<{
39
42
  browser?: string | undefined;
40
43
  city?: string | undefined;
@@ -43,6 +46,7 @@ export declare const ingestContextValidator: import("convex/values").VObject<{
43
46
  latitude?: number | undefined;
44
47
  longitude?: number | undefined;
45
48
  os?: string | undefined;
49
+ visitorKey?: string | undefined;
46
50
  }, {
47
51
  country: import("convex/values").VString<string | undefined, "optional">;
48
52
  city: import("convex/values").VString<string | undefined, "optional">;
@@ -51,7 +55,61 @@ export declare const ingestContextValidator: import("convex/values").VObject<{
51
55
  browser: import("convex/values").VString<string | undefined, "optional">;
52
56
  os: import("convex/values").VString<string | undefined, "optional">;
53
57
  device: import("convex/values").VString<string | undefined, "optional">;
54
- }, "required", "browser" | "city" | "country" | "device" | "latitude" | "longitude" | "os">;
58
+ visitorKey: import("convex/values").VString<string | undefined, "optional">;
59
+ }, "required", "browser" | "city" | "country" | "device" | "latitude" | "longitude" | "os" | "visitorKey">;
60
+ export declare const batchedEventValidator: import("convex/values").VObject<{
61
+ affiliateSlug?: string | undefined;
62
+ aggregateCountry?: string | undefined;
63
+ browser?: string | undefined;
64
+ city?: string | undefined;
65
+ country?: string | undefined;
66
+ currency?: string | undefined;
67
+ device?: string | undefined;
68
+ eventId: string;
69
+ href?: string | undefined;
70
+ latitude?: number | undefined;
71
+ longitude?: number | undefined;
72
+ name?: string | undefined;
73
+ os?: string | undefined;
74
+ path: string;
75
+ properties?: Record<string, string | number | boolean | null> | undefined;
76
+ referrer?: string | undefined;
77
+ revenueCents?: number | undefined;
78
+ sequence: number;
79
+ sessionId: string;
80
+ target?: string | undefined;
81
+ timestamp: number;
82
+ type: "click" | "conversion" | "custom" | "heartbeat" | "leave" | "outbound" | "pageview" | "vital";
83
+ value?: number | undefined;
84
+ visitorId: string;
85
+ visitorKey?: string | undefined;
86
+ }, {
87
+ eventId: import("convex/values").VString<string, "required">;
88
+ sessionId: import("convex/values").VString<string, "required">;
89
+ visitorId: import("convex/values").VString<string, "required">;
90
+ type: import("convex/values").VUnion<"click" | "conversion" | "custom" | "heartbeat" | "leave" | "outbound" | "pageview" | "vital", [import("convex/values").VLiteral<"pageview", "required">, import("convex/values").VLiteral<"click", "required">, import("convex/values").VLiteral<"custom", "required">, import("convex/values").VLiteral<"conversion", "required">, import("convex/values").VLiteral<"heartbeat", "required">, import("convex/values").VLiteral<"leave", "required">, import("convex/values").VLiteral<"outbound", "required">, import("convex/values").VLiteral<"vital", "required">], "required", never>;
91
+ name: import("convex/values").VString<string | undefined, "optional">;
92
+ path: import("convex/values").VString<string, "required">;
93
+ referrer: import("convex/values").VString<string | undefined, "optional">;
94
+ timestamp: import("convex/values").VFloat64<number, "required">;
95
+ sequence: import("convex/values").VFloat64<number, "required">;
96
+ target: import("convex/values").VString<string | undefined, "optional">;
97
+ href: import("convex/values").VString<string | undefined, "optional">;
98
+ properties: import("convex/values").VRecord<Record<string, string | number | boolean | null> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VUnion<string | number | boolean | null, [import("convex/values").VString<string, "required">, import("convex/values").VFloat64<number, "required">, import("convex/values").VBoolean<boolean, "required">, import("convex/values").VNull<null, "required">], "required", never>, "optional", string>;
99
+ revenueCents: import("convex/values").VFloat64<number | undefined, "optional">;
100
+ currency: import("convex/values").VString<string | undefined, "optional">;
101
+ affiliateSlug: import("convex/values").VString<string | undefined, "optional">;
102
+ value: import("convex/values").VFloat64<number | undefined, "optional">;
103
+ country: import("convex/values").VString<string | undefined, "optional">;
104
+ city: import("convex/values").VString<string | undefined, "optional">;
105
+ latitude: import("convex/values").VFloat64<number | undefined, "optional">;
106
+ longitude: import("convex/values").VFloat64<number | undefined, "optional">;
107
+ browser: import("convex/values").VString<string | undefined, "optional">;
108
+ os: import("convex/values").VString<string | undefined, "optional">;
109
+ device: import("convex/values").VString<string | undefined, "optional">;
110
+ visitorKey: import("convex/values").VString<string | undefined, "optional">;
111
+ aggregateCountry: import("convex/values").VString<string | undefined, "optional">;
112
+ }, "required", "affiliateSlug" | "aggregateCountry" | "browser" | "city" | "country" | "currency" | "device" | "eventId" | "href" | "latitude" | "longitude" | "name" | "os" | "path" | "properties" | "referrer" | "revenueCents" | "sequence" | "sessionId" | "target" | "timestamp" | "type" | "value" | "visitorId" | "visitorKey" | `properties.${string}`>;
55
113
  export declare const siteFieldsValidator: import("convex/values").VObject<{
56
114
  cookieless: boolean;
57
115
  createdAt: number;
@@ -103,10 +161,12 @@ export declare const sessionFieldsValidator: import("convex/values").VObject<{
103
161
  utmMedium?: string | undefined;
104
162
  utmSource?: string | undefined;
105
163
  visitorId: string;
164
+ visitorKey?: string | undefined;
106
165
  }, {
107
166
  siteId: import("convex/values").VId<import("convex/values").GenericId<"sites">, "required">;
108
167
  sessionId: import("convex/values").VString<string, "required">;
109
168
  visitorId: import("convex/values").VString<string, "required">;
169
+ visitorKey: import("convex/values").VString<string | undefined, "optional">;
110
170
  startedAt: import("convex/values").VFloat64<number, "required">;
111
171
  lastSeenAt: import("convex/values").VFloat64<number, "required">;
112
172
  entryPath: import("convex/values").VString<string, "required">;
@@ -133,7 +193,7 @@ export declare const sessionFieldsValidator: import("convex/values").VObject<{
133
193
  affiliateId: import("convex/values").VId<import("convex/values").GenericId<"affiliates"> | undefined, "optional">;
134
194
  affiliateAttributedAt: import("convex/values").VFloat64<number | undefined, "optional">;
135
195
  affiliateExpiresAt: import("convex/values").VFloat64<number | undefined, "optional">;
136
- }, "required", "affiliateAttributedAt" | "affiliateExpiresAt" | "affiliateId" | "affiliateSlug" | "browser" | "city" | "conversionCount" | "country" | "currency" | "device" | "durationMs" | "entryPath" | "eventCount" | "exitPath" | "lastSeenAt" | "latitude" | "longitude" | "os" | "pageviewCount" | "referrer" | "revenueCents" | "sessionId" | "siteId" | "source" | "startedAt" | "utmCampaign" | "utmMedium" | "utmSource" | "visitorId">;
196
+ }, "required", "affiliateAttributedAt" | "affiliateExpiresAt" | "affiliateId" | "affiliateSlug" | "browser" | "city" | "conversionCount" | "country" | "currency" | "device" | "durationMs" | "entryPath" | "eventCount" | "exitPath" | "lastSeenAt" | "latitude" | "longitude" | "os" | "pageviewCount" | "referrer" | "revenueCents" | "sessionId" | "siteId" | "source" | "startedAt" | "utmCampaign" | "utmMedium" | "utmSource" | "visitorId" | "visitorKey">;
137
197
  export declare const eventFieldsValidator: import("convex/values").VObject<{
138
198
  affiliateSlug?: string | undefined;
139
199
  browser: string;
@@ -156,14 +216,14 @@ export declare const eventFieldsValidator: import("convex/values").VObject<{
156
216
  siteId: import("convex/values").GenericId<"sites">;
157
217
  target?: string | undefined;
158
218
  timestamp: number;
159
- type: "click" | "conversion" | "custom" | "heartbeat" | "outbound" | "pageview";
219
+ type: "click" | "conversion" | "custom" | "heartbeat" | "leave" | "outbound" | "pageview" | "vital";
160
220
  visitorId: string;
161
221
  }, {
162
222
  siteId: import("convex/values").VId<import("convex/values").GenericId<"sites">, "required">;
163
223
  eventId: import("convex/values").VString<string, "required">;
164
224
  sessionId: import("convex/values").VString<string, "required">;
165
225
  visitorId: import("convex/values").VString<string, "required">;
166
- type: import("convex/values").VUnion<"click" | "conversion" | "custom" | "heartbeat" | "outbound" | "pageview", [import("convex/values").VLiteral<"pageview", "required">, import("convex/values").VLiteral<"click", "required">, import("convex/values").VLiteral<"custom", "required">, import("convex/values").VLiteral<"conversion", "required">, import("convex/values").VLiteral<"heartbeat", "required">, import("convex/values").VLiteral<"outbound", "required">], "required", never>;
226
+ type: import("convex/values").VUnion<"click" | "conversion" | "custom" | "heartbeat" | "leave" | "outbound" | "pageview" | "vital", [import("convex/values").VLiteral<"pageview", "required">, import("convex/values").VLiteral<"click", "required">, import("convex/values").VLiteral<"custom", "required">, import("convex/values").VLiteral<"conversion", "required">, import("convex/values").VLiteral<"heartbeat", "required">, import("convex/values").VLiteral<"leave", "required">, import("convex/values").VLiteral<"outbound", "required">, import("convex/values").VLiteral<"vital", "required">], "required", never>;
167
227
  name: import("convex/values").VString<string | undefined, "optional">;
168
228
  path: import("convex/values").VString<string, "required">;
169
229
  referrer: import("convex/values").VString<string | undefined, "optional">;
@@ -183,93 +243,69 @@ export declare const eventFieldsValidator: import("convex/values").VObject<{
183
243
  os: import("convex/values").VString<string, "required">;
184
244
  device: import("convex/values").VString<string, "required">;
185
245
  }, "required", "affiliateSlug" | "browser" | "city" | "country" | "currency" | "device" | "eventId" | "href" | "latitude" | "longitude" | "name" | "os" | "path" | "properties" | "referrer" | "revenueCents" | "sequence" | "sessionId" | "siteId" | "target" | "timestamp" | "type" | "visitorId" | `properties.${string}`>;
186
- export declare const storedEventFieldsValidator: import("convex/values").VObject<{
187
- affiliateSlug?: string | undefined;
188
- browser?: string | undefined;
189
- city?: string | undefined;
190
- country?: string | undefined;
191
- currency?: string | undefined;
192
- device?: string | undefined;
193
- eventId: string;
194
- href?: string | undefined;
195
- latitude?: number | undefined;
196
- longitude?: number | undefined;
197
- name?: string | undefined;
198
- os?: string | undefined;
199
- path: string;
200
- properties?: Record<string, string | number | boolean | null> | undefined;
201
- referrer?: string | undefined;
202
- revenueCents?: number | undefined;
203
- sequence: number;
204
- sessionId: string;
205
- siteId: import("convex/values").GenericId<"sites">;
206
- target?: string | undefined;
207
- timestamp: number;
208
- type: "click" | "conversion" | "custom" | "heartbeat" | "outbound" | "pageview";
209
- visitorId: string;
210
- }, {
211
- siteId: import("convex/values").VId<import("convex/values").GenericId<"sites">, "required">;
212
- eventId: import("convex/values").VString<string, "required">;
213
- sessionId: import("convex/values").VString<string, "required">;
214
- visitorId: import("convex/values").VString<string, "required">;
215
- type: import("convex/values").VUnion<"click" | "conversion" | "custom" | "heartbeat" | "outbound" | "pageview", [import("convex/values").VLiteral<"pageview", "required">, import("convex/values").VLiteral<"click", "required">, import("convex/values").VLiteral<"custom", "required">, import("convex/values").VLiteral<"conversion", "required">, import("convex/values").VLiteral<"heartbeat", "required">, import("convex/values").VLiteral<"outbound", "required">], "required", never>;
216
- name: import("convex/values").VString<string | undefined, "optional">;
217
- path: import("convex/values").VString<string, "required">;
218
- referrer: import("convex/values").VString<string | undefined, "optional">;
219
- timestamp: import("convex/values").VFloat64<number, "required">;
220
- sequence: import("convex/values").VFloat64<number, "required">;
221
- target: import("convex/values").VString<string | undefined, "optional">;
222
- href: import("convex/values").VString<string | undefined, "optional">;
223
- properties: import("convex/values").VRecord<Record<string, string | number | boolean | null> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VUnion<string | number | boolean | null, [import("convex/values").VString<string, "required">, import("convex/values").VFloat64<number, "required">, import("convex/values").VBoolean<boolean, "required">, import("convex/values").VNull<null, "required">], "required", never>, "optional", string>;
224
- revenueCents: import("convex/values").VFloat64<number | undefined, "optional">;
225
- currency: import("convex/values").VString<string | undefined, "optional">;
226
- affiliateSlug: import("convex/values").VString<string | undefined, "optional">;
227
- country: import("convex/values").VString<string | undefined, "optional">;
228
- city: import("convex/values").VString<string | undefined, "optional">;
229
- latitude: import("convex/values").VFloat64<number | undefined, "optional">;
230
- longitude: import("convex/values").VFloat64<number | undefined, "optional">;
231
- browser: import("convex/values").VString<string | undefined, "optional">;
232
- os: import("convex/values").VString<string | undefined, "optional">;
233
- device: import("convex/values").VString<string | undefined, "optional">;
234
- }, "required", "affiliateSlug" | "browser" | "city" | "country" | "currency" | "device" | "eventId" | "href" | "latitude" | "longitude" | "name" | "os" | "path" | "properties" | "referrer" | "revenueCents" | "sequence" | "sessionId" | "siteId" | "target" | "timestamp" | "type" | "visitorId" | `properties.${string}`>;
235
- export declare const dimensionTypeValidator: import("convex/values").VUnion<"browser" | "country" | "device" | "event" | "goal" | "page" | "source", [import("convex/values").VLiteral<"source", "required">, import("convex/values").VLiteral<"page", "required">, import("convex/values").VLiteral<"country", "required">, import("convex/values").VLiteral<"device", "required">, import("convex/values").VLiteral<"browser", "required">, import("convex/values").VLiteral<"event", "required">, import("convex/values").VLiteral<"goal", "required">], "required", never>;
246
+ export declare const dimensionTypeValidator: import("convex/values").VUnion<"browser" | "campaign" | "country" | "device" | "event" | "goal" | "page" | "source", [import("convex/values").VLiteral<"source", "required">, import("convex/values").VLiteral<"campaign", "required">, import("convex/values").VLiteral<"page", "required">, import("convex/values").VLiteral<"country", "required">, import("convex/values").VLiteral<"device", "required">, import("convex/values").VLiteral<"browser", "required">, import("convex/values").VLiteral<"event", "required">, import("convex/values").VLiteral<"goal", "required">], "required", never>;
236
247
  export declare const dimensionSlotValidator: import("convex/values").VObject<{
237
248
  count: number;
249
+ pageviews?: number | undefined;
238
250
  revenueCents: number;
251
+ sessions?: number | undefined;
239
252
  slot: number;
240
- type: "browser" | "country" | "device" | "event" | "goal" | "page" | "source";
253
+ type: "browser" | "campaign" | "country" | "device" | "event" | "goal" | "page" | "source";
241
254
  value: string;
242
255
  }, {
243
- type: import("convex/values").VUnion<"browser" | "country" | "device" | "event" | "goal" | "page" | "source", [import("convex/values").VLiteral<"source", "required">, import("convex/values").VLiteral<"page", "required">, import("convex/values").VLiteral<"country", "required">, import("convex/values").VLiteral<"device", "required">, import("convex/values").VLiteral<"browser", "required">, import("convex/values").VLiteral<"event", "required">, import("convex/values").VLiteral<"goal", "required">], "required", never>;
256
+ type: import("convex/values").VUnion<"browser" | "campaign" | "country" | "device" | "event" | "goal" | "page" | "source", [import("convex/values").VLiteral<"source", "required">, import("convex/values").VLiteral<"campaign", "required">, import("convex/values").VLiteral<"page", "required">, import("convex/values").VLiteral<"country", "required">, import("convex/values").VLiteral<"device", "required">, import("convex/values").VLiteral<"browser", "required">, import("convex/values").VLiteral<"event", "required">, import("convex/values").VLiteral<"goal", "required">], "required", never>;
244
257
  slot: import("convex/values").VFloat64<number, "required">;
245
258
  value: import("convex/values").VString<string, "required">;
246
259
  count: import("convex/values").VFloat64<number, "required">;
247
260
  revenueCents: import("convex/values").VFloat64<number, "required">;
248
- }, "required", "count" | "revenueCents" | "slot" | "type" | "value">;
261
+ pageviews: import("convex/values").VFloat64<number | undefined, "optional">;
262
+ sessions: import("convex/values").VFloat64<number | undefined, "optional">;
263
+ }, "required", "count" | "pageviews" | "revenueCents" | "sessions" | "slot" | "type" | "value">;
264
+ export declare const visitorSketchValidator: import("convex/values").VObject<{
265
+ precision: number;
266
+ registers: ArrayBuffer;
267
+ version: 1;
268
+ }, {
269
+ version: import("convex/values").VLiteral<1, "required">;
270
+ precision: import("convex/values").VFloat64<number, "required">;
271
+ registers: import("convex/values").VBytes<ArrayBuffer, "required">;
272
+ }, "required", "precision" | "registers" | "version">;
273
+ export declare const aggregateGranularityValidator: import("convex/values").VUnion<"day" | "hour" | "localDay", [import("convex/values").VLiteral<"hour", "required">, import("convex/values").VLiteral<"day", "required">, import("convex/values").VLiteral<"localDay", "required">], "required", never>;
249
274
  export declare const aggregateFieldsValidator: import("convex/values").VObject<{
250
275
  bucketStart: number;
251
276
  clicks: number;
277
+ continuedSessions?: number | undefined;
252
278
  conversions: number;
253
279
  customEvents: number;
254
280
  dimensions: {
255
281
  count: number;
282
+ pageviews?: number | undefined;
256
283
  revenueCents: number;
284
+ sessions?: number | undefined;
257
285
  slot: number;
258
- type: "browser" | "country" | "device" | "event" | "goal" | "page" | "source";
286
+ type: "browser" | "campaign" | "country" | "device" | "event" | "goal" | "page" | "source";
259
287
  value: string;
260
288
  }[];
289
+ durationMs?: number | undefined;
261
290
  events: number;
262
- granularity: "day" | "hour";
291
+ granularity: "day" | "hour" | "localDay";
292
+ newVisitors?: number | undefined;
263
293
  outboundClicks: number;
264
294
  pageviews: number;
265
295
  revenueCents: number;
266
296
  sessions: number;
267
297
  shard: number;
268
298
  siteId: import("convex/values").GenericId<"sites">;
299
+ visitorSketch?: {
300
+ precision: number;
301
+ registers: ArrayBuffer;
302
+ version: 1;
303
+ } | undefined;
304
+ visitorSketchComplete?: boolean | undefined;
269
305
  visitors: number;
270
306
  }, {
271
307
  siteId: import("convex/values").VId<import("convex/values").GenericId<"sites">, "required">;
272
- granularity: import("convex/values").VUnion<"day" | "hour", [import("convex/values").VLiteral<"hour", "required">, import("convex/values").VLiteral<"day", "required">], "required", never>;
308
+ granularity: import("convex/values").VUnion<"day" | "hour" | "localDay", [import("convex/values").VLiteral<"hour", "required">, import("convex/values").VLiteral<"day", "required">, import("convex/values").VLiteral<"localDay", "required">], "required", never>;
273
309
  bucketStart: import("convex/values").VFloat64<number, "required">;
274
310
  shard: import("convex/values").VFloat64<number, "required">;
275
311
  events: import("convex/values").VFloat64<number, "required">;
@@ -279,28 +315,47 @@ export declare const aggregateFieldsValidator: import("convex/values").VObject<{
279
315
  outboundClicks: import("convex/values").VFloat64<number, "required">;
280
316
  sessions: import("convex/values").VFloat64<number, "required">;
281
317
  visitors: import("convex/values").VFloat64<number, "required">;
318
+ visitorSketch: import("convex/values").VObject<{
319
+ precision: number;
320
+ registers: ArrayBuffer;
321
+ version: 1;
322
+ } | undefined, {
323
+ version: import("convex/values").VLiteral<1, "required">;
324
+ precision: import("convex/values").VFloat64<number, "required">;
325
+ registers: import("convex/values").VBytes<ArrayBuffer, "required">;
326
+ }, "optional", "precision" | "registers" | "version">;
327
+ visitorSketchComplete: import("convex/values").VBoolean<boolean | undefined, "optional">;
282
328
  conversions: import("convex/values").VFloat64<number, "required">;
283
329
  revenueCents: import("convex/values").VFloat64<number, "required">;
284
330
  dimensions: import("convex/values").VArray<{
285
331
  count: number;
332
+ pageviews?: number | undefined;
286
333
  revenueCents: number;
334
+ sessions?: number | undefined;
287
335
  slot: number;
288
- type: "browser" | "country" | "device" | "event" | "goal" | "page" | "source";
336
+ type: "browser" | "campaign" | "country" | "device" | "event" | "goal" | "page" | "source";
289
337
  value: string;
290
338
  }[], import("convex/values").VObject<{
291
339
  count: number;
340
+ pageviews?: number | undefined;
292
341
  revenueCents: number;
342
+ sessions?: number | undefined;
293
343
  slot: number;
294
- type: "browser" | "country" | "device" | "event" | "goal" | "page" | "source";
344
+ type: "browser" | "campaign" | "country" | "device" | "event" | "goal" | "page" | "source";
295
345
  value: string;
296
346
  }, {
297
- type: import("convex/values").VUnion<"browser" | "country" | "device" | "event" | "goal" | "page" | "source", [import("convex/values").VLiteral<"source", "required">, import("convex/values").VLiteral<"page", "required">, import("convex/values").VLiteral<"country", "required">, import("convex/values").VLiteral<"device", "required">, import("convex/values").VLiteral<"browser", "required">, import("convex/values").VLiteral<"event", "required">, import("convex/values").VLiteral<"goal", "required">], "required", never>;
347
+ type: import("convex/values").VUnion<"browser" | "campaign" | "country" | "device" | "event" | "goal" | "page" | "source", [import("convex/values").VLiteral<"source", "required">, import("convex/values").VLiteral<"campaign", "required">, import("convex/values").VLiteral<"page", "required">, import("convex/values").VLiteral<"country", "required">, import("convex/values").VLiteral<"device", "required">, import("convex/values").VLiteral<"browser", "required">, import("convex/values").VLiteral<"event", "required">, import("convex/values").VLiteral<"goal", "required">], "required", never>;
298
348
  slot: import("convex/values").VFloat64<number, "required">;
299
349
  value: import("convex/values").VString<string, "required">;
300
350
  count: import("convex/values").VFloat64<number, "required">;
301
351
  revenueCents: import("convex/values").VFloat64<number, "required">;
302
- }, "required", "count" | "revenueCents" | "slot" | "type" | "value">, "required">;
303
- }, "required", "bucketStart" | "clicks" | "conversions" | "customEvents" | "dimensions" | "events" | "granularity" | "outboundClicks" | "pageviews" | "revenueCents" | "sessions" | "shard" | "siteId" | "visitors">;
352
+ pageviews: import("convex/values").VFloat64<number | undefined, "optional">;
353
+ sessions: import("convex/values").VFloat64<number | undefined, "optional">;
354
+ }, "required", "count" | "pageviews" | "revenueCents" | "sessions" | "slot" | "type" | "value">, "required">;
355
+ durationMs: import("convex/values").VFloat64<number | undefined, "optional">;
356
+ continuedSessions: import("convex/values").VFloat64<number | undefined, "optional">;
357
+ newVisitors: import("convex/values").VFloat64<number | undefined, "optional">;
358
+ }, "required", "bucketStart" | "clicks" | "continuedSessions" | "conversions" | "customEvents" | "dimensions" | "durationMs" | "events" | "granularity" | "newVisitors" | "outboundClicks" | "pageviews" | "revenueCents" | "sessions" | "shard" | "siteId" | "visitorSketch" | "visitorSketch.precision" | "visitorSketch.registers" | "visitorSketch.version" | "visitorSketchComplete" | "visitors">;
304
359
  export declare const goalMatchTypeValidator: import("convex/values").VUnion<"custom" | "pageview", [import("convex/values").VLiteral<"pageview", "required">, import("convex/values").VLiteral<"custom", "required">], "required", never>;
305
360
  export declare const goalFieldsValidator: import("convex/values").VObject<{
306
361
  active: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"validators.d.ts","sourceRoot":"","sources":["../../src/component/validators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAK,KAAK,KAAK,EAAE,MAAM,eAAe,CAAC;AAE9C,eAAO,MAAM,kBAAkB,0dAO9B,CAAC;AAEF,eAAO,MAAM,sBAAsB,0SAKlC,CAAC;AAEF,eAAO,MAAM,wBAAwB,scAGpC,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oOAgBhC,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;2FAQjC,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;iIAU9B,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mbA8BjC,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6TAwB/B,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6TAUnC,CAAC;A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A0B;;;;;;;;;;;;;;;;;;;;;;yKAWrC,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAC/D,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACjE,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AACrE,MAAM,MAAM,UAAU,GAAG,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAC3D,MAAM,MAAM,SAAS,GAAG,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { v } from "convex/values";
2
- export const eventTypeValidator = v.union(v.literal("pageview"), v.literal("click"), v.literal("custom"), v.literal("conversion"), v.literal("heartbeat"), v.literal("outbound"));
2
+ export const eventTypeValidator = v.union(v.literal("pageview"), v.literal("click"), v.literal("custom"), v.literal("conversion"), v.literal("heartbeat"), v.literal("leave"), v.literal("outbound"), v.literal("vital"));
3
+ export const vitalMetricValidator = v.union(v.literal("LCP"), v.literal("CLS"), v.literal("INP"), v.literal("FCP"), v.literal("TTFB"));
3
4
  export const propertyValueValidator = v.union(v.string(), v.number(), v.boolean(), v.null());
4
5
  export const eventPropertiesValidator = v.record(v.string(), propertyValueValidator);
5
6
  export const trackerEventValidator = v.object({
@@ -18,6 +19,9 @@ export const trackerEventValidator = v.object({
18
19
  revenueCents: v.optional(v.number()),
19
20
  currency: v.optional(v.string()),
20
21
  affiliateSlug: v.optional(v.string()),
22
+ // Web Vitals measurement: milliseconds, or CLS scaled by 1000. Only "vital"
23
+ // events carry it; sanitization strips it from every other type.
24
+ value: v.optional(v.number()),
21
25
  });
22
26
  export const ingestContextValidator = v.object({
23
27
  country: v.optional(v.string()),
@@ -27,6 +31,11 @@ export const ingestContextValidator = v.object({
27
31
  browser: v.optional(v.string()),
28
32
  os: v.optional(v.string()),
29
33
  device: v.optional(v.string()),
34
+ visitorKey: v.optional(v.string()),
35
+ });
36
+ export const batchedEventValidator = trackerEventValidator.extend({
37
+ ...ingestContextValidator.fields,
38
+ aggregateCountry: v.optional(v.string()),
30
39
  });
31
40
  export const siteFieldsValidator = v.object({
32
41
  ownerId: v.string(),
@@ -43,6 +52,7 @@ export const sessionFieldsValidator = v.object({
43
52
  siteId: v.id("sites"),
44
53
  sessionId: v.string(),
45
54
  visitorId: v.string(),
55
+ visitorKey: v.optional(v.string()),
46
56
  startedAt: v.number(),
47
57
  lastSeenAt: v.number(),
48
58
  entryPath: v.string(),
@@ -95,28 +105,31 @@ export const eventFieldsValidator = v.object({
95
105
  os: v.string(),
96
106
  device: v.string(),
97
107
  });
98
- export const storedEventFieldsValidator = eventFieldsValidator
99
- .omit("country", "city", "latitude", "longitude", "browser", "os", "device")
100
- .extend({
101
- country: v.optional(v.string()),
102
- city: v.optional(v.string()),
103
- latitude: v.optional(v.number()),
104
- longitude: v.optional(v.number()),
105
- browser: v.optional(v.string()),
106
- os: v.optional(v.string()),
107
- device: v.optional(v.string()),
108
- });
109
- export const dimensionTypeValidator = v.union(v.literal("source"), v.literal("page"), v.literal("country"), v.literal("device"), v.literal("browser"), v.literal("event"), v.literal("goal"));
108
+ export const dimensionTypeValidator = v.union(v.literal("source"), v.literal("campaign"), v.literal("page"), v.literal("country"), v.literal("device"), v.literal("browser"), v.literal("event"), v.literal("goal"));
110
109
  export const dimensionSlotValidator = v.object({
111
110
  type: dimensionTypeValidator,
112
111
  slot: v.number(),
113
112
  value: v.string(),
114
113
  count: v.number(),
115
114
  revenueCents: v.number(),
115
+ // Slots written since alpha.11 also count the pageviews and the sessions
116
+ // (a session's first event) they saw, so pages rank by views and every
117
+ // other dimension by sessions instead of by raw event volume.
118
+ pageviews: v.optional(v.number()),
119
+ sessions: v.optional(v.number()),
120
+ });
121
+ export const visitorSketchValidator = v.object({
122
+ version: v.literal(1),
123
+ precision: v.number(),
124
+ registers: v.bytes(),
116
125
  });
126
+ export const aggregateGranularityValidator = v.union(v.literal("hour"), v.literal("day"),
127
+ // One bucket per calendar day in the site's timezone, written alongside
128
+ // the UTC day for sites with a timezone (see localTime.ts).
129
+ v.literal("localDay"));
117
130
  export const aggregateFieldsValidator = v.object({
118
131
  siteId: v.id("sites"),
119
- granularity: v.union(v.literal("hour"), v.literal("day")),
132
+ granularity: aggregateGranularityValidator,
120
133
  bucketStart: v.number(),
121
134
  shard: v.number(),
122
135
  events: v.number(),
@@ -126,9 +139,17 @@ export const aggregateFieldsValidator = v.object({
126
139
  outboundClicks: v.number(),
127
140
  sessions: v.number(),
128
141
  visitors: v.number(),
142
+ visitorSketch: v.optional(visitorSketchValidator),
143
+ visitorSketchComplete: v.optional(v.boolean()),
129
144
  conversions: v.number(),
130
145
  revenueCents: v.number(),
131
146
  dimensions: v.array(dimensionSlotValidator),
147
+ // Engagement counters recorded since alpha.11: how much session duration
148
+ // grew from the activity that landed in this bucket, sessions that reached
149
+ // a second pageview here, and sessions of visitors never seen before.
150
+ durationMs: v.optional(v.number()),
151
+ continuedSessions: v.optional(v.number()),
152
+ newVisitors: v.optional(v.number()),
132
153
  });
133
154
  export const goalMatchTypeValidator = v.union(v.literal("pageview"), v.literal("custom"));
134
155
  export const goalFieldsValidator = v.object({
@@ -1 +1 @@
1
- {"version":3,"file":"validators.js","sourceRoot":"","sources":["../../src/component/validators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAc,MAAM,eAAe,CAAC;AAE9C,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CACvC,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,EACrB,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,EAClB,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,EACnB,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,EACvB,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,EACtB,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,CACtB,CAAC;AAEF,MAAM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AAC,QAAQ,CAAC,wBAAwB,CAAC;CACjD,CAAC,CAAC"}
@@ -0,0 +1,19 @@
1
+ import type { Id } from "./_generated/dataModel.js";
2
+ import { type QueryCtx } from "./_generated/server.js";
3
+ /**
4
+ * Folds an anonymous visitor id into the pseudonymous identity the host
5
+ * supplies after signup or sign-in. Links are one level deep: an alias can
6
+ * belong to one identity, an identity can never become an alias, and an
7
+ * alias can never own aliases, so journeys stay bounded and unambiguous.
8
+ */
9
+ export declare const link: import("convex/server").RegisteredMutation<"public", {
10
+ previousVisitorId: string;
11
+ siteId: import("convex/values").GenericId<"sites">;
12
+ visitorId: string;
13
+ }, Promise<{
14
+ linked: boolean;
15
+ aliasCount: number;
16
+ }>>;
17
+ /** The identity a visitor id resolves to, followed by every alias it owns. */
18
+ export declare function resolveVisitorIdentities(ctx: QueryCtx, siteId: Id<"sites">, visitorId: string): Promise<string[]>;
19
+ //# sourceMappingURL=visitors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"visitors.d.ts","sourceRoot":"","sources":["../../src/component/visitors.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAY,KAAK,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAEjE;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;;;;;;GAwEf,CAAC;AAEH,8EAA8E;AAC9E,wBAAsB,wBAAwB,CAC5C,GAAG,EAAE,QAAQ,EACb,MAAM,EAAE,EAAE,CAAC,OAAO,CAAC,EACnB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,MAAM,EAAE,CAAC,CAUnB"}