@iann29/rastro 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/README.md +122 -17
  2. package/agent/integration.md +26 -10
  3. package/agent/manifest.json +10 -5
  4. package/agent/manifest.schema.json +14 -5
  5. package/dist/client/federation.d.ts +28 -8
  6. package/dist/client/federation.d.ts.map +1 -1
  7. package/dist/client/federation.js +12 -1
  8. package/dist/client/federation.js.map +1 -1
  9. package/dist/client/index.d.ts +262 -9
  10. package/dist/client/index.d.ts.map +1 -1
  11. package/dist/client/index.js +119 -2
  12. package/dist/client/index.js.map +1 -1
  13. package/dist/component/_generated/api.d.ts +6 -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 +71 -1
  17. package/dist/component/_generated/component.d.ts.map +1 -1
  18. package/dist/component/constants.d.ts +2 -0
  19. package/dist/component/constants.d.ts.map +1 -1
  20. package/dist/component/constants.js +7 -0
  21. package/dist/component/constants.js.map +1 -1
  22. package/dist/component/coverage.d.ts +1 -0
  23. package/dist/component/coverage.d.ts.map +1 -1
  24. package/dist/component/coverage.js +6 -1
  25. package/dist/component/coverage.js.map +1 -1
  26. package/dist/component/eventStore.d.ts +2 -0
  27. package/dist/component/eventStore.d.ts.map +1 -1
  28. package/dist/component/http.d.ts.map +1 -1
  29. package/dist/component/http.js +51 -1
  30. package/dist/component/http.js.map +1 -1
  31. package/dist/component/ingest.d.ts +2 -0
  32. package/dist/component/ingest.d.ts.map +1 -1
  33. package/dist/component/ingest.js +42 -3
  34. package/dist/component/ingest.js.map +1 -1
  35. package/dist/component/origin.d.ts +70 -0
  36. package/dist/component/origin.d.ts.map +1 -0
  37. package/dist/component/origin.js +230 -0
  38. package/dist/component/origin.js.map +1 -0
  39. package/dist/component/platforms.d.ts +33 -0
  40. package/dist/component/platforms.d.ts.map +1 -0
  41. package/dist/component/platforms.js +328 -0
  42. package/dist/component/platforms.js.map +1 -0
  43. package/dist/component/reports.d.ts +27 -72
  44. package/dist/component/reports.d.ts.map +1 -1
  45. package/dist/component/reports.js +51 -10
  46. package/dist/component/reports.js.map +1 -1
  47. package/dist/component/sanitize.d.ts +5 -0
  48. package/dist/component/sanitize.d.ts.map +1 -1
  49. package/dist/component/sanitize.js +33 -1
  50. package/dist/component/sanitize.js.map +1 -1
  51. package/dist/component/schema.d.ts +62 -7
  52. package/dist/component/schema.js +16 -1
  53. package/dist/component/schema.js.map +1 -1
  54. package/dist/component/trackedLinks.d.ts +91 -0
  55. package/dist/component/trackedLinks.d.ts.map +1 -0
  56. package/dist/component/trackedLinks.js +314 -0
  57. package/dist/component/trackedLinks.js.map +1 -0
  58. package/dist/component/useragent.d.ts +6 -0
  59. package/dist/component/useragent.d.ts.map +1 -1
  60. package/dist/component/useragent.js +9 -0
  61. package/dist/component/useragent.js.map +1 -1
  62. package/dist/component/validators.d.ts +51 -11
  63. package/dist/component/validators.d.ts.map +1 -1
  64. package/dist/component/validators.js +35 -1
  65. package/dist/component/validators.js.map +1 -1
  66. package/dist/tracker/generated.d.ts +6 -6
  67. package/dist/tracker/generated.d.ts.map +1 -1
  68. package/dist/tracker/generated.js +6 -6
  69. package/dist/tracker/generated.js.map +1 -1
  70. package/dist/tracker/tracker.d.ts +1 -0
  71. package/dist/tracker/tracker.d.ts.map +1 -1
  72. package/dist/tracker/tracker.js +16 -4
  73. package/dist/tracker/tracker.js.map +1 -1
  74. package/dist/tracker.min.js +1 -1
  75. package/docs/upgrading.md +152 -19
  76. package/llms.txt +6 -1
  77. package/package.json +2 -2
  78. package/src/component/_generated/api.ts +6 -0
  79. package/src/component/_generated/component.ts +152 -1
  80. package/src/component/constants.ts +7 -0
  81. package/src/component/coverage.ts +7 -1
  82. package/src/component/http.ts +56 -1
  83. package/src/component/ingest.ts +54 -1
  84. package/src/component/origin.ts +273 -0
  85. package/src/component/platforms.ts +359 -0
  86. package/src/component/reports.ts +74 -10
  87. package/src/component/sanitize.ts +39 -1
  88. package/src/component/schema.ts +18 -0
  89. package/src/component/trackedLinks.ts +384 -0
  90. package/src/component/useragent.ts +11 -0
  91. package/src/component/validators.ts +71 -0
  92. package/src/tracker/generated.ts +6 -6
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  Privacy-first, real-time web analytics built as an isolated Convex component.
6
6
 
7
- Amage Rastro combines a 1.1 KB gzip browser tracker with reactive traffic
7
+ Amage Rastro combines a 1.4 KB gzip browser tracker with reactive traffic
8
8
  metrics, a live visitor atlas, journey timelines, trusted payment attribution,
9
9
  goals, funnels, affiliates, and multi-site reports. Data and functions stay
10
10
  inside your Convex deployment.
@@ -55,7 +55,7 @@ capacity claim.
55
55
  | Auto-captured clicks | Anchors, buttons, and `data-rastro-event` controls with a bounded visible label; outbound origin+path |
56
56
  | Bot filtering | Self-declared crawlers, unfurlers, monitors, HTTP libraries, and headless browsers rejected at ingestion |
57
57
  | Cookieless mode | No cookies: pseudonymous visitor id in `localStorage`; sessions end after 30 idle minutes or a sign-in |
58
- | Tiny tracker | 2,407 bytes raw, 1,278 bytes gzip; the test suite enforces `< 1,280` bytes gzip |
58
+ | Tiny tracker | 2,594 bytes raw, 1,395 bytes gzip; the test suite enforces `< 1,400` bytes gzip |
59
59
 
60
60
  ## Quickstart
61
61
 
@@ -82,7 +82,7 @@ Never append `/rastro/tracker.js` to the functions URL.
82
82
  npm install @iann29/rastro
83
83
  ```
84
84
 
85
- The untagged npm `latest` channel is `0.4.0`. Pin the exact version in the host;
85
+ The untagged npm `latest` channel is `0.5.0`. Pin the exact version in the host;
86
86
  the changelog and the upgrading guide say what each release changes.
87
87
 
88
88
  ### 2. Mount the component
@@ -237,8 +237,9 @@ until it reloads.
237
237
 
238
238
  The tracker sends no client identification. Ingestion derives `browser`, `os`,
239
239
  and `device` from headers the browser attaches itself, and persists only those
240
- three normalized values; the raw `User-Agent` never reaches a mutation or a
241
- component table.
240
+ three normalized values; it also reads the in-app browser's platform id
241
+ (`instagram`, `facebook`, `tiktok`…) for the session's origin, below. The raw
242
+ `User-Agent` never reaches a mutation or a component table.
242
243
 
243
244
  Chromium attaches the low-entropy `Sec-CH-UA`, `Sec-CH-UA-Mobile`, and
244
245
  `Sec-CH-UA-Platform` client hints to cross-origin requests from secure origins,
@@ -577,17 +578,114 @@ payload-bound by the site's financial ledger.
577
578
  The tracker reads `utm_source`, `utm_medium`, `utm_campaign`, `utm_term`, and
578
579
  `utm_content` from the landing URL, keeps them in `sessionStorage` for the rest
579
580
  of the tab — a later session the tab opens after a sign-in or 30 idle minutes
580
- keeps them too — and sends them as properties of every pageview; no other query
581
- parameter ever leaves the page. A session's `source` is the lowercase
582
- `utm_source` when present and the referrer host otherwise, so campaign traffic
583
- no longer reads as `direct`. `utmSource`, `utmMedium`, and `utmCampaign` stay on
584
- the session for journeys; `overview.topCampaigns` ranks `utm_campaign` and
585
- `overview.topMediums` the lowercase `utm_medium` next to `topSources`, by
586
- sessions once the range is covered by the counters. `overview.topOutbound` ranks
587
- the hosts outbound clicks reached the host alone, never the path or query — by
588
- clicks. Both lists are recorded from `metadata.dimensionsSince` (each site's
589
- first ingest on 0.1.0 plus the rollup delay); a range that starts earlier ranks
590
- them from partial data, and the dashboard says so.
581
+ keeps them too — and sends them as properties of every pageview. Besides those
582
+ five, the only thing the landing URL ever yields is the **name** of a click-ID
583
+ key it carried (below); no other query parameter, and no query value at all,
584
+ ever leaves the page. A session's `source` is the lowercase `utm_source` when
585
+ present and the referrer host otherwise, so campaign traffic no longer reads as
586
+ `direct`. `utmSource`, `utmMedium`, and `utmCampaign` stay on the session for
587
+ journeys; `overview.topCampaigns` ranks `utm_campaign` and `overview.topMediums`
588
+ the lowercase `utm_medium` next to `topSources`, by sessions once the range is
589
+ covered by the counters. `overview.topOutbound` ranks the hosts outbound clicks
590
+ reached the host alone, never the path or query by clicks. Both lists are
591
+ recorded from `metadata.dimensionsSince` (each site's first ingest on 0.1.0 plus
592
+ the rollup delay); a range that starts earlier ranks them from partial data, and
593
+ the dashboard says so.
594
+
595
+ A session also keeps where it came from, classified once on its first touch and
596
+ never guessed: `platform` (an id from a closed, versioned table of about forty —
597
+ `instagram`, `google`, `whatsapp`, `chatgpt` — or `unknown` for a host or
598
+ `utm_source` outside it, or `none`), `channel` (`direct`, `organic_search`,
599
+ `paid_search`, `organic_social`, `paid_social`, `messaging`, `email`,
600
+ `affiliate`, `ai`, `display`, `referral`, `offline`), and `evidence`, the rule
601
+ that decided it. One rule decides and the next only runs when it did not:
602
+ `utm_source` through the alias table, then click-ID names, then the referrer
603
+ host by registrable domain, then the in-app browser, then an affiliate `ref`,
604
+ which sets the channel and keeps the platform an earlier rule found. Hosts match
605
+ by whole label, never by substring, so `l.instagram.com`, `instagram.com` and
606
+ `com.instagram.android` are one platform while `docs.google.com` is not Google;
607
+ `utm_medium` picks the channel from a closed table that also accepts the channel
608
+ ids themselves, which is what a tracked link (below) emits, `offline` included.
609
+ Nothing at all is `direct`, the only way to be direct, and a referrer on the
610
+ site's own domains is an internal hop, never an origin. `overview.topPlatforms`,
611
+ `topChannels` and `topEvidence` rank them beside `topSources`; a `topPlatforms`
612
+ value is the platform id alone when the session arrived by that platform's
613
+ default channel and `platform@channel` when it did not (`google@paid_search`),
614
+ so one platform ranks once per channel it was reached by —
615
+ `splitPlatformDimension` reads the pair back. `dataCoverage`'s `origin` dataset
616
+ says from when a site carries them; sessions older than that are classified on
617
+ read and marked `evidence: "legacy"`. `source` keeps the raw `utm_source` or
618
+ host for the drill-down, exactly as before.
619
+
620
+ The tracker reads the click-ID keys of its landing URL and sends them in `clid`:
621
+ their **names** only (`fbclid`, `gclid`, `ttclid`, `mc_cid`…), never their
622
+ values, so no advertising identifier leaves the page. It matches the same
623
+ allowlist the server does, in the same ranking order, and sends at most eight;
624
+ ingestion drops any name outside the allowlist and keeps at most eight of what
625
+ is left. The referrer it sends is scheme and host, so a referrer of the form
626
+ `android-app://<package>` keeps the package alone and the app that opened the
627
+ link is a platform (`com.google.android.gm` is Gmail) instead of nothing.
628
+
629
+ ## Tracked links
630
+
631
+ Some traffic arrives with nothing to read. A link tapped inside WhatsApp,
632
+ Telegram, an SMS or a native e-mail app, or scanned from a QR code, opens with
633
+ no referrer and no campaign, and any analytics tool files it as `direct`. A
634
+ tracked link closes that gap: the dashboard's **Links** tab (or the host API)
635
+ creates `/rastro/l/<slug>` for one place the link will be published, and every
636
+ click lands on the site with that place in its `utm_*`.
637
+
638
+ `GET /rastro/l/<slug>` answers `302` with `Cache-Control: no-store` to the
639
+ link's destination, after appending:
640
+
641
+ | Parameter | Value |
642
+ | -------------- | ------------------------------------------------------------------------------------------------------------------- |
643
+ | `utm_source` | the platform: `instagram`, `whatsapp`, `qr`, or any id of 2–24 lowercase letters, digits or underscores |
644
+ | `utm_medium` | the channel: `organic_social`, `paid_social`, `messaging`, `email`, `affiliate`, `display`, `referral` or `offline` |
645
+ | `utm_campaign` | the campaign, or the slug when the link has none |
646
+ | `utm_content` | the slug |
647
+
648
+ The destination's own query stays exactly as it was, and a `utm_*` key it
649
+ already carries is never overridden. Unknown and disabled slugs answer `404` in
650
+ plain text. The tracker needs nothing new: the landing reads the `utm_*` like
651
+ any campaign link.
652
+
653
+ - **Clicks and bots.** Each click lands in a daily counter spread over four
654
+ shards, so a link that goes viral never serializes on one document. A
655
+ self-declared bot, including the WhatsApp, Facebook and Telegram link
656
+ previews, is still redirected but counted under `bots`, never `clicks`.
657
+ `listTrackedLinks` reports both, all time and over the 30 UTC days ending on
658
+ the day of the `now` it is given.
659
+ - **No open redirect.** A destination must be an absolute `http(s)` URL without
660
+ credentials on one of the site's domains (exact, or a `*.` pattern for
661
+ subdomains). The rule is checked when a link is created or changed and again
662
+ on every click, so a domain removed from the site stops redirecting at once.
663
+ - **Slugs** are 3–32 lowercase letters, digits or hyphens, starting and ending
664
+ with a letter or digit, and unique across the deployment because the route
665
+ names no site. A site keeps at most 200 links. Deleting a link frees its slug
666
+ and removes its counters; disabling it keeps both.
667
+ - **A short domain.** The route lives on the deployment's HTTP origin
668
+ (`https://<deployment>.convex.site/rastro/l/promo`). A host that wants a
669
+ presentable link serves that origin under a short domain of its own, such as
670
+ `go.example.com/rastro/l/promo`; nothing in the component changes.
671
+
672
+ ```ts
673
+ await analytics.createTrackedLink(ctx, {
674
+ siteId,
675
+ slug: "bio-instagram",
676
+ destination: "https://www.example.com/promo",
677
+ platform: "instagram",
678
+ channel: "organic_social",
679
+ campaign: "spring-sale",
680
+ createdBy: userId, // an opaque id, never an e-mail address
681
+ });
682
+ ```
683
+
684
+ A federated dashboard reaches the same functions once the host re-exports
685
+ `listTrackedLinks`, `createTrackedLink`, `updateTrackedLink`, and
686
+ `deleteTrackedLink` from `convex/rastroFederation.ts`. The connection then
687
+ advertises the `trackedLinks` capability: any reader lists the links, and
688
+ changing them needs `analytics:configure`, like goals and affiliates.
591
689
 
592
690
  ## Identify visitors after signup
593
691
 
@@ -754,6 +852,8 @@ The `Rastro` class wraps the component boundary for host functions:
754
852
  - Configuration: `upsertGoal`, `listGoals`, `removeGoal`, `upsertFunnel`,
755
853
  `listFunnels`, `removeFunnel`, `upsertAffiliate`, `listAffiliates`,
756
854
  `removeAffiliate`
855
+ - Tracked links: `createTrackedLink`, `updateTrackedLink`, `deleteTrackedLink`,
856
+ `listTrackedLinks`
757
857
  - Retention: `cleanup`, `setRetentionPolicy`, `disableRetentionPolicy`,
758
858
  `runRetentionPolicy`, `retentionStatus`
759
859
 
@@ -1049,7 +1149,12 @@ Amage Rastro's default tracker:
1049
1149
  clicked link or button (at most 64 characters, replaced by `data-rastro-label`
1050
1150
  when present), and outbound link origins and pathnames (the overview ranks
1051
1151
  destinations by host alone);
1052
- - strips query strings and fragments from stored paths and links.
1152
+ - strips query strings and fragments from stored paths and links; of the landing
1153
+ query it keeps the five `utm_*` values and the bare **names** of the
1154
+ advertising click-ID keys it recognizes (`fbclid`, `gclid`…), never a click-ID
1155
+ value, and never any other parameter;
1156
+ - sends the referrer as scheme and host only — an `android-app://<package>`
1157
+ included — never its path or query.
1053
1158
 
1054
1159
  The optional Web Vitals module inherits this contract: it reports at most five
1055
1160
  timing numbers per page load (milliseconds, or CLS scaled by 1000) against the
@@ -519,21 +519,25 @@ export const {
519
519
  retentionStatus,
520
520
  setRetentionPolicy,
521
521
  disableRetentionPolicy,
522
+ listTrackedLinks,
523
+ createTrackedLink,
524
+ updateTrackedLink,
525
+ deleteTrackedLink,
522
526
  } = federated;
523
527
  ```
524
528
 
525
529
  `manifest` is public static metadata. Every report function is read-only and
526
530
  requires both a valid JWT and a matching, non-revoked local grant. The functions
527
- from `siteSettings` down form the configure scope (optional capability
528
- `configure`, hosts from `alpha.11`): they additionally require
529
- `analytics:configure` on the token — the control plane claims it only for
530
- organization owners and admins — and in the grant's `permissions`, and fail with
531
- `FEDERATION_CONFIGURE_FORBIDDEN` otherwise. Export them even when every grant
532
- stays read only, so a later opt-in needs no host deploy; the dashboard never
533
- calls them for a read-only connection. The issuer falls back to the production
534
- control plane so the module compiles and pushes before the environment variable
535
- exists; tokens are still rejected until `auth.config.ts` trusts the same issuer,
536
- which needs both variables set and a push afterwards.
531
+ from `siteSettings` to `disableRetentionPolicy` form the configure scope
532
+ (optional capability `configure`, hosts from `alpha.11`): they additionally
533
+ require `analytics:configure` on the token — the control plane claims it only
534
+ for organization owners and admins — and in the grant's `permissions`, and fail
535
+ with `FEDERATION_CONFIGURE_FORBIDDEN` otherwise. Export them even when every
536
+ grant stays read only, so a later opt-in needs no host deploy; the dashboard
537
+ never calls them for a read-only connection. The issuer falls back to the
538
+ production control plane so the module compiles and pushes before the
539
+ environment variable exists; tokens are still rejected until `auth.config.ts`
540
+ trusts the same issuer, which needs both variables set and a push afterwards.
537
541
 
538
542
  A public link's token carries `analytics:public` instead of `analytics:read` and
539
543
  `rastro_site_ids` naming the link's sites. It runs only `manifest`,
@@ -587,6 +591,18 @@ the token and in the grant:
587
591
  | `setRetentionPolicy` | `siteId` and five day counts between 1 and 3650 | Starts the recurring cleanup chains |
588
592
  | `disableRetentionPolicy` | one `siteId` | Stops automatic cleanup; nothing is restored |
589
593
 
594
+ Tracked links, behind the optional `trackedLinks` capability. Listing needs only
595
+ a reader; the three writes require `analytics:configure` like the configure
596
+ scope above. A host serves them by re-exporting the four functions; one that
597
+ does not keeps working and advertises no `trackedLinks` capability.
598
+
599
+ | Function | Input summary | Important output/behavior |
600
+ | ------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
601
+ | `listTrackedLinks` | one `siteId` and `now` | Definitions with clicks and bot hits, all time and over 30 UTC days |
602
+ | `createTrackedLink` | `siteId`, slug, destination, platform, channel, campaign, `createdBy` | Returns the link ID; the destination must be on one of the site's domains |
603
+ | `updateTrackedLink` | `siteId`, `linkId`, optional destination, platform, channel, campaign, disabled | Changes everything but the slug; a disabled link answers 404 |
604
+ | `deleteTrackedLink` | `siteId`, `linkId` | Deletes the link, frees its slug, and purges its click counters |
605
+
590
606
  The federated surface deliberately excludes ingestion, owner IDs, network IDs,
591
607
  and arbitrary host functions, and shows a site's domains only through
592
608
  `siteSettings` to a connection allowed to change them. Goal, funnel, and
@@ -15,11 +15,11 @@
15
15
  "upgrading": "https://www.amagerastro.com/docs/reference/upgrading.md",
16
16
  "integrity": {
17
17
  "algorithm": "sha256",
18
- "agent": "e26de56729dd0b474669d2b40292afb314224200da4e70f6dabd407ce7aea6e7",
19
- "llms": "2072c0c06b5ec130c59edc269d66665ffd042053a9f7238a16811431a9251c19",
18
+ "agent": "994ba7a57ada6238b9d8fdc3280e352c185c0a97772e627ee1bdc1afda1185cb",
19
+ "llms": "46fb9a206d2f41d30f72f80ac9764d30535d7d1d65afe475e03d72b075cf6359",
20
20
  "protocol": "f2be7e3db250824d0c1293eb31b2e4514ebed8b21fe4974d4f4797fd86abe04f",
21
21
  "setup": "bf2509a87a8eab9c047276b813f029bb2c9ddd58c0e54754432e3fef7891f3c9",
22
- "upgrading": "fee72acf124487309a739f8344dc507346712c68d11a957c7068d4838aa79f6b"
22
+ "upgrading": "e675d73c3df963ad85aa918c3b4bd8acb74c9179940497bf034ff566fa513cc7"
23
23
  }
24
24
  },
25
25
  "controlPlane": {
@@ -85,7 +85,11 @@
85
85
  "removeAffiliate": "removeAffiliate",
86
86
  "retentionStatus": "retentionStatus",
87
87
  "setRetentionPolicy": "setRetentionPolicy",
88
- "disableRetentionPolicy": "disableRetentionPolicy"
88
+ "disableRetentionPolicy": "disableRetentionPolicy",
89
+ "listTrackedLinks": "listTrackedLinks",
90
+ "createTrackedLink": "createTrackedLink",
91
+ "updateTrackedLink": "updateTrackedLink",
92
+ "deleteTrackedLink": "deleteTrackedLink"
89
93
  },
90
94
  "capabilities": [
91
95
  "siteSummaries",
@@ -104,7 +108,8 @@
104
108
  "vitals",
105
109
  "siteMap",
106
110
  "localDays",
107
- "configure"
111
+ "configure",
112
+ "trackedLinks"
108
113
  ],
109
114
  "limits": {
110
115
  "maxSitesPerRequest": 10,
@@ -185,7 +185,11 @@
185
185
  "removeAffiliate",
186
186
  "retentionStatus",
187
187
  "setRetentionPolicy",
188
- "disableRetentionPolicy"
188
+ "disableRetentionPolicy",
189
+ "listTrackedLinks",
190
+ "createTrackedLink",
191
+ "updateTrackedLink",
192
+ "deleteTrackedLink"
189
193
  ],
190
194
  "properties": {
191
195
  "manifest": { "const": "manifest" },
@@ -218,14 +222,18 @@
218
222
  "removeAffiliate": { "const": "removeAffiliate" },
219
223
  "retentionStatus": { "const": "retentionStatus" },
220
224
  "setRetentionPolicy": { "const": "setRetentionPolicy" },
221
- "disableRetentionPolicy": { "const": "disableRetentionPolicy" }
225
+ "disableRetentionPolicy": { "const": "disableRetentionPolicy" },
226
+ "listTrackedLinks": { "const": "listTrackedLinks" },
227
+ "createTrackedLink": { "const": "createTrackedLink" },
228
+ "updateTrackedLink": { "const": "updateTrackedLink" },
229
+ "deleteTrackedLink": { "const": "deleteTrackedLink" }
222
230
  },
223
231
  "additionalProperties": false
224
232
  },
225
233
  "capabilities": {
226
234
  "type": "array",
227
- "minItems": 15,
228
- "maxItems": 17,
235
+ "minItems": 16,
236
+ "maxItems": 18,
229
237
  "uniqueItems": true,
230
238
  "items": {
231
239
  "enum": [
@@ -245,7 +253,8 @@
245
253
  "vitals",
246
254
  "siteMap",
247
255
  "localDays",
248
- "configure"
256
+ "configure",
257
+ "trackedLinks"
249
258
  ]
250
259
  }
251
260
  },
@@ -132,8 +132,12 @@ export declare const FEDERATED_ANALYTICS_CONNECTOR_MANIFEST: Readonly<{
132
132
  readonly revenueSummary: "revenueSummary";
133
133
  readonly vitalsReport: "vitalsReport";
134
134
  readonly siteMap: "siteMap";
135
+ readonly listTrackedLinks: "listTrackedLinks";
136
+ readonly createTrackedLink: "createTrackedLink";
137
+ readonly updateTrackedLink: "updateTrackedLink";
138
+ readonly deleteTrackedLink: "deleteTrackedLink";
135
139
  }>;
136
- readonly capabilities: readonly ["siteSummaries", "overview", "liveVisitors", "sessions", "sessionJourney", "conversions", "visitorJourney", "goals", "funnels", "affiliates", "dataCoverage", "sessionDetails", "revenueSummary", "vitals", "siteMap", "localDays", "configure"];
140
+ readonly capabilities: readonly ["siteSummaries", "overview", "liveVisitors", "sessions", "sessionJourney", "conversions", "visitorJourney", "goals", "funnels", "affiliates", "dataCoverage", "sessionDetails", "revenueSummary", "vitals", "siteMap", "localDays", "configure", "trackedLinks"];
137
141
  readonly limits: Readonly<{
138
142
  readonly maxSitesPerRequest: 10;
139
143
  readonly maxSitesPerConnection: 10;
@@ -207,11 +211,13 @@ export interface FederatedAnalyticsAuthorizerOptions {
207
211
  }
208
212
  export declare const federatedAnalyticsPermissionValidator: import("convex/values").VUnion<"analytics:configure" | "analytics:public" | "analytics:read", [import("convex/values").VLiteral<"analytics:read", "required">, import("convex/values").VLiteral<"analytics:configure", "required">, import("convex/values").VLiteral<"analytics:public", "required">], "required", never>;
209
213
  export declare const federatedAnalyticsManifestValidator: import("convex/values").VObject<{
210
- capabilities: ("affiliates" | "configure" | "conversions" | "dataCoverage" | "funnels" | "goals" | "liveVisitors" | "localDays" | "overview" | "revenueSummary" | "sessionDetails" | "sessionJourney" | "sessions" | "siteMap" | "siteSummaries" | "transfer" | "visitorJourney" | "vitals")[];
214
+ capabilities: ("affiliates" | "configure" | "conversions" | "dataCoverage" | "funnels" | "goals" | "liveVisitors" | "localDays" | "overview" | "revenueSummary" | "sessionDetails" | "sessionJourney" | "sessions" | "siteMap" | "siteSummaries" | "trackedLinks" | "transfer" | "visitorJourney" | "vitals")[];
211
215
  functions: {
212
216
  affiliatesReport: "affiliatesReport";
213
217
  connectionStatus: "connectionStatus";
218
+ createTrackedLink: "createTrackedLink";
214
219
  dataCoverage: "dataCoverage";
220
+ deleteTrackedLink: "deleteTrackedLink";
215
221
  disableRetentionPolicy: "disableRetentionPolicy";
216
222
  funnelsReport: "funnelsReport";
217
223
  getSession: "getSession";
@@ -222,6 +228,7 @@ export declare const federatedAnalyticsManifestValidator: import("convex/values"
222
228
  listGoals: "listGoals";
223
229
  listSessions: "listSessions";
224
230
  listSites: "listSites";
231
+ listTrackedLinks: "listTrackedLinks";
225
232
  liveVisitors: "liveVisitors";
226
233
  manifest: "manifest";
227
234
  overview: "overview";
@@ -236,6 +243,7 @@ export declare const federatedAnalyticsManifestValidator: import("convex/values"
236
243
  siteSettings: "siteSettings";
237
244
  transferConnection?: "transferConnection" | undefined;
238
245
  updateSite: "updateSite";
246
+ updateTrackedLink: "updateTrackedLink";
239
247
  upsertAffiliate: "upsertAffiliate";
240
248
  upsertFunnel: "upsertFunnel";
241
249
  upsertGoal: "upsertGoal";
@@ -259,7 +267,9 @@ export declare const federatedAnalyticsManifestValidator: import("convex/values"
259
267
  functions: import("convex/values").VObject<{
260
268
  affiliatesReport: "affiliatesReport";
261
269
  connectionStatus: "connectionStatus";
270
+ createTrackedLink: "createTrackedLink";
262
271
  dataCoverage: "dataCoverage";
272
+ deleteTrackedLink: "deleteTrackedLink";
263
273
  disableRetentionPolicy: "disableRetentionPolicy";
264
274
  funnelsReport: "funnelsReport";
265
275
  getSession: "getSession";
@@ -270,6 +280,7 @@ export declare const federatedAnalyticsManifestValidator: import("convex/values"
270
280
  listGoals: "listGoals";
271
281
  listSessions: "listSessions";
272
282
  listSites: "listSites";
283
+ listTrackedLinks: "listTrackedLinks";
273
284
  liveVisitors: "liveVisitors";
274
285
  manifest: "manifest";
275
286
  overview: "overview";
@@ -284,6 +295,7 @@ export declare const federatedAnalyticsManifestValidator: import("convex/values"
284
295
  siteSettings: "siteSettings";
285
296
  transferConnection?: "transferConnection" | undefined;
286
297
  updateSite: "updateSite";
298
+ updateTrackedLink: "updateTrackedLink";
287
299
  upsertAffiliate: "upsertAffiliate";
288
300
  upsertFunnel: "upsertFunnel";
289
301
  upsertGoal: "upsertGoal";
@@ -321,9 +333,13 @@ export declare const federatedAnalyticsManifestValidator: import("convex/values"
321
333
  retentionStatus: import("convex/values").VLiteral<"retentionStatus", "required">;
322
334
  setRetentionPolicy: import("convex/values").VLiteral<"setRetentionPolicy", "required">;
323
335
  disableRetentionPolicy: import("convex/values").VLiteral<"disableRetentionPolicy", "required">;
336
+ listTrackedLinks: import("convex/values").VLiteral<"listTrackedLinks", "required">;
337
+ createTrackedLink: import("convex/values").VLiteral<"createTrackedLink", "required">;
338
+ updateTrackedLink: import("convex/values").VLiteral<"updateTrackedLink", "required">;
339
+ deleteTrackedLink: import("convex/values").VLiteral<"deleteTrackedLink", "required">;
324
340
  transferConnection: import("convex/values").VLiteral<"transferConnection" | undefined, "optional">;
325
- }, "required", "affiliatesReport" | "connectionStatus" | "dataCoverage" | "disableRetentionPolicy" | "funnelsReport" | "getSession" | "goalsReport" | "listAffiliates" | "listConversions" | "listFunnels" | "listGoals" | "listSessions" | "listSites" | "liveVisitors" | "manifest" | "overview" | "removeAffiliate" | "removeFunnel" | "removeGoal" | "retentionStatus" | "revenueSummary" | "sessionJourney" | "setRetentionPolicy" | "siteMap" | "siteSettings" | "transferConnection" | "updateSite" | "upsertAffiliate" | "upsertFunnel" | "upsertGoal" | "visitorJourney" | "vitalsReport">;
326
- capabilities: import("convex/values").VArray<("affiliates" | "configure" | "conversions" | "dataCoverage" | "funnels" | "goals" | "liveVisitors" | "localDays" | "overview" | "revenueSummary" | "sessionDetails" | "sessionJourney" | "sessions" | "siteMap" | "siteSummaries" | "transfer" | "visitorJourney" | "vitals")[], import("convex/values").VUnion<"affiliates" | "configure" | "conversions" | "dataCoverage" | "funnels" | "goals" | "liveVisitors" | "localDays" | "overview" | "revenueSummary" | "sessionDetails" | "sessionJourney" | "sessions" | "siteMap" | "siteSummaries" | "transfer" | "visitorJourney" | "vitals", [import("convex/values").VLiteral<"siteSummaries", "required">, import("convex/values").VLiteral<"overview", "required">, import("convex/values").VLiteral<"liveVisitors", "required">, import("convex/values").VLiteral<"sessions", "required">, import("convex/values").VLiteral<"sessionJourney", "required">, import("convex/values").VLiteral<"conversions", "required">, import("convex/values").VLiteral<"visitorJourney", "required">, import("convex/values").VLiteral<"goals", "required">, import("convex/values").VLiteral<"funnels", "required">, import("convex/values").VLiteral<"affiliates", "required">, import("convex/values").VLiteral<"dataCoverage", "required">, import("convex/values").VLiteral<"sessionDetails", "required">, import("convex/values").VLiteral<"revenueSummary", "required">, import("convex/values").VLiteral<"vitals", "required">, import("convex/values").VLiteral<"siteMap", "required">, import("convex/values").VLiteral<"localDays", "required">, import("convex/values").VLiteral<"configure", "required">, import("convex/values").VLiteral<"transfer", "required">], "required", never>, "required">;
341
+ }, "required", "affiliatesReport" | "connectionStatus" | "createTrackedLink" | "dataCoverage" | "deleteTrackedLink" | "disableRetentionPolicy" | "funnelsReport" | "getSession" | "goalsReport" | "listAffiliates" | "listConversions" | "listFunnels" | "listGoals" | "listSessions" | "listSites" | "listTrackedLinks" | "liveVisitors" | "manifest" | "overview" | "removeAffiliate" | "removeFunnel" | "removeGoal" | "retentionStatus" | "revenueSummary" | "sessionJourney" | "setRetentionPolicy" | "siteMap" | "siteSettings" | "transferConnection" | "updateSite" | "updateTrackedLink" | "upsertAffiliate" | "upsertFunnel" | "upsertGoal" | "visitorJourney" | "vitalsReport">;
342
+ capabilities: import("convex/values").VArray<("affiliates" | "configure" | "conversions" | "dataCoverage" | "funnels" | "goals" | "liveVisitors" | "localDays" | "overview" | "revenueSummary" | "sessionDetails" | "sessionJourney" | "sessions" | "siteMap" | "siteSummaries" | "trackedLinks" | "transfer" | "visitorJourney" | "vitals")[], import("convex/values").VUnion<"affiliates" | "configure" | "conversions" | "dataCoverage" | "funnels" | "goals" | "liveVisitors" | "localDays" | "overview" | "revenueSummary" | "sessionDetails" | "sessionJourney" | "sessions" | "siteMap" | "siteSummaries" | "trackedLinks" | "transfer" | "visitorJourney" | "vitals", [import("convex/values").VLiteral<"siteSummaries", "required">, import("convex/values").VLiteral<"overview", "required">, import("convex/values").VLiteral<"liveVisitors", "required">, import("convex/values").VLiteral<"sessions", "required">, import("convex/values").VLiteral<"sessionJourney", "required">, import("convex/values").VLiteral<"conversions", "required">, import("convex/values").VLiteral<"visitorJourney", "required">, import("convex/values").VLiteral<"goals", "required">, import("convex/values").VLiteral<"funnels", "required">, import("convex/values").VLiteral<"affiliates", "required">, import("convex/values").VLiteral<"dataCoverage", "required">, import("convex/values").VLiteral<"sessionDetails", "required">, import("convex/values").VLiteral<"revenueSummary", "required">, import("convex/values").VLiteral<"vitals", "required">, import("convex/values").VLiteral<"siteMap", "required">, import("convex/values").VLiteral<"localDays", "required">, import("convex/values").VLiteral<"configure", "required">, import("convex/values").VLiteral<"trackedLinks", "required">, import("convex/values").VLiteral<"transfer", "required">], "required", never>, "required">;
327
343
  limits: import("convex/values").VObject<{
328
344
  maxJourneyEvents: number;
329
345
  maxLiveVisitors: number;
@@ -337,9 +353,9 @@ export declare const federatedAnalyticsManifestValidator: import("convex/values"
337
353
  maxLiveVisitors: import("convex/values").VFloat64<number, "required">;
338
354
  maxJourneyEvents: import("convex/values").VFloat64<number, "required">;
339
355
  }, "required", "maxJourneyEvents" | "maxLiveVisitors" | "maxReportRangeDays" | "maxSitesPerConnection" | "maxSitesPerRequest">;
340
- }, "required", "capabilities" | "functions" | "functions.affiliatesReport" | "functions.connectionStatus" | "functions.dataCoverage" | "functions.disableRetentionPolicy" | "functions.funnelsReport" | "functions.getSession" | "functions.goalsReport" | "functions.listAffiliates" | "functions.listConversions" | "functions.listFunnels" | "functions.listGoals" | "functions.listSessions" | "functions.listSites" | "functions.liveVisitors" | "functions.manifest" | "functions.overview" | "functions.removeAffiliate" | "functions.removeFunnel" | "functions.removeGoal" | "functions.retentionStatus" | "functions.revenueSummary" | "functions.sessionJourney" | "functions.setRetentionPolicy" | "functions.siteMap" | "functions.siteSettings" | "functions.transferConnection" | "functions.updateSite" | "functions.upsertAffiliate" | "functions.upsertFunnel" | "functions.upsertGoal" | "functions.visitorJourney" | "functions.vitalsReport" | "limits" | "limits.maxJourneyEvents" | "limits.maxLiveVisitors" | "limits.maxReportRangeDays" | "limits.maxSitesPerConnection" | "limits.maxSitesPerRequest" | "moduleName" | "protocol" | "protocolVersion">;
356
+ }, "required", "capabilities" | "functions" | "functions.affiliatesReport" | "functions.connectionStatus" | "functions.createTrackedLink" | "functions.dataCoverage" | "functions.deleteTrackedLink" | "functions.disableRetentionPolicy" | "functions.funnelsReport" | "functions.getSession" | "functions.goalsReport" | "functions.listAffiliates" | "functions.listConversions" | "functions.listFunnels" | "functions.listGoals" | "functions.listSessions" | "functions.listSites" | "functions.listTrackedLinks" | "functions.liveVisitors" | "functions.manifest" | "functions.overview" | "functions.removeAffiliate" | "functions.removeFunnel" | "functions.removeGoal" | "functions.retentionStatus" | "functions.revenueSummary" | "functions.sessionJourney" | "functions.setRetentionPolicy" | "functions.siteMap" | "functions.siteSettings" | "functions.transferConnection" | "functions.updateSite" | "functions.updateTrackedLink" | "functions.upsertAffiliate" | "functions.upsertFunnel" | "functions.upsertGoal" | "functions.visitorJourney" | "functions.vitalsReport" | "limits" | "limits.maxJourneyEvents" | "limits.maxLiveVisitors" | "limits.maxReportRangeDays" | "limits.maxSitesPerConnection" | "limits.maxSitesPerRequest" | "moduleName" | "protocol" | "protocolVersion">;
341
357
  export declare const federatedAnalyticsConnectionStatusValidator: import("convex/values").VObject<{
342
- capabilities: ("affiliates" | "configure" | "conversions" | "dataCoverage" | "funnels" | "goals" | "liveVisitors" | "localDays" | "overview" | "revenueSummary" | "sessionDetails" | "sessionJourney" | "sessions" | "siteMap" | "siteSummaries" | "transfer" | "visitorJourney" | "vitals")[];
358
+ capabilities: ("affiliates" | "configure" | "conversions" | "dataCoverage" | "funnels" | "goals" | "liveVisitors" | "localDays" | "overview" | "revenueSummary" | "sessionDetails" | "sessionJourney" | "sessions" | "siteMap" | "siteSummaries" | "trackedLinks" | "transfer" | "visitorJourney" | "vitals")[];
343
359
  permissions: ("analytics:configure" | "analytics:public" | "analytics:read")[];
344
360
  protocolVersion: 1;
345
361
  siteCount: number;
@@ -347,7 +363,7 @@ export declare const federatedAnalyticsConnectionStatusValidator: import("convex
347
363
  }, {
348
364
  status: import("convex/values").VLiteral<"connected", "required">;
349
365
  protocolVersion: import("convex/values").VLiteral<1, "required">;
350
- capabilities: import("convex/values").VArray<("affiliates" | "configure" | "conversions" | "dataCoverage" | "funnels" | "goals" | "liveVisitors" | "localDays" | "overview" | "revenueSummary" | "sessionDetails" | "sessionJourney" | "sessions" | "siteMap" | "siteSummaries" | "transfer" | "visitorJourney" | "vitals")[], import("convex/values").VUnion<"affiliates" | "configure" | "conversions" | "dataCoverage" | "funnels" | "goals" | "liveVisitors" | "localDays" | "overview" | "revenueSummary" | "sessionDetails" | "sessionJourney" | "sessions" | "siteMap" | "siteSummaries" | "transfer" | "visitorJourney" | "vitals", [import("convex/values").VLiteral<"siteSummaries", "required">, import("convex/values").VLiteral<"overview", "required">, import("convex/values").VLiteral<"liveVisitors", "required">, import("convex/values").VLiteral<"sessions", "required">, import("convex/values").VLiteral<"sessionJourney", "required">, import("convex/values").VLiteral<"conversions", "required">, import("convex/values").VLiteral<"visitorJourney", "required">, import("convex/values").VLiteral<"goals", "required">, import("convex/values").VLiteral<"funnels", "required">, import("convex/values").VLiteral<"affiliates", "required">, import("convex/values").VLiteral<"dataCoverage", "required">, import("convex/values").VLiteral<"sessionDetails", "required">, import("convex/values").VLiteral<"revenueSummary", "required">, import("convex/values").VLiteral<"vitals", "required">, import("convex/values").VLiteral<"siteMap", "required">, import("convex/values").VLiteral<"localDays", "required">, import("convex/values").VLiteral<"configure", "required">, import("convex/values").VLiteral<"transfer", "required">], "required", never>, "required">;
366
+ capabilities: import("convex/values").VArray<("affiliates" | "configure" | "conversions" | "dataCoverage" | "funnels" | "goals" | "liveVisitors" | "localDays" | "overview" | "revenueSummary" | "sessionDetails" | "sessionJourney" | "sessions" | "siteMap" | "siteSummaries" | "trackedLinks" | "transfer" | "visitorJourney" | "vitals")[], import("convex/values").VUnion<"affiliates" | "configure" | "conversions" | "dataCoverage" | "funnels" | "goals" | "liveVisitors" | "localDays" | "overview" | "revenueSummary" | "sessionDetails" | "sessionJourney" | "sessions" | "siteMap" | "siteSummaries" | "trackedLinks" | "transfer" | "visitorJourney" | "vitals", [import("convex/values").VLiteral<"siteSummaries", "required">, import("convex/values").VLiteral<"overview", "required">, import("convex/values").VLiteral<"liveVisitors", "required">, import("convex/values").VLiteral<"sessions", "required">, import("convex/values").VLiteral<"sessionJourney", "required">, import("convex/values").VLiteral<"conversions", "required">, import("convex/values").VLiteral<"visitorJourney", "required">, import("convex/values").VLiteral<"goals", "required">, import("convex/values").VLiteral<"funnels", "required">, import("convex/values").VLiteral<"affiliates", "required">, import("convex/values").VLiteral<"dataCoverage", "required">, import("convex/values").VLiteral<"sessionDetails", "required">, import("convex/values").VLiteral<"revenueSummary", "required">, import("convex/values").VLiteral<"vitals", "required">, import("convex/values").VLiteral<"siteMap", "required">, import("convex/values").VLiteral<"localDays", "required">, import("convex/values").VLiteral<"configure", "required">, import("convex/values").VLiteral<"trackedLinks", "required">, import("convex/values").VLiteral<"transfer", "required">], "required", never>, "required">;
351
367
  permissions: import("convex/values").VArray<("analytics:configure" | "analytics:public" | "analytics:read")[], import("convex/values").VUnion<"analytics:configure" | "analytics:public" | "analytics:read", [import("convex/values").VLiteral<"analytics:read", "required">, import("convex/values").VLiteral<"analytics:configure", "required">, import("convex/values").VLiteral<"analytics:public", "required">], "required", never>, "required">;
352
368
  siteCount: import("convex/values").VFloat64<number, "required">;
353
369
  }, "required", "capabilities" | "permissions" | "protocolVersion" | "siteCount" | "status">;
@@ -430,9 +446,13 @@ export declare function createFederatedAnalyticsManifest(transfer?: boolean): {
430
446
  revenueSummary: "revenueSummary";
431
447
  vitalsReport: "vitalsReport";
432
448
  siteMap: "siteMap";
449
+ listTrackedLinks: "listTrackedLinks";
450
+ createTrackedLink: "createTrackedLink";
451
+ updateTrackedLink: "updateTrackedLink";
452
+ deleteTrackedLink: "deleteTrackedLink";
433
453
  transferConnection?: "transferConnection" | undefined;
434
454
  };
435
- capabilities: ("affiliates" | "configure" | "conversions" | "dataCoverage" | "funnels" | "goals" | "liveVisitors" | "localDays" | "overview" | "revenueSummary" | "sessionDetails" | "sessionJourney" | "sessions" | "siteMap" | "siteSummaries" | "transfer" | "visitorJourney" | "vitals")[];
455
+ capabilities: ("affiliates" | "configure" | "conversions" | "dataCoverage" | "funnels" | "goals" | "liveVisitors" | "localDays" | "overview" | "revenueSummary" | "sessionDetails" | "sessionJourney" | "sessions" | "siteMap" | "siteSummaries" | "trackedLinks" | "transfer" | "visitorJourney" | "vitals")[];
436
456
  limits: {
437
457
  maxSitesPerRequest: 10;
438
458
  maxSitesPerConnection: 10;
@@ -1 +1 @@
1
- {"version":3,"file":"federation.d.ts","sourceRoot":"","sources":["../../src/client/federation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,kBAAkB,EAClB,YAAY,EACb,MAAM,eAAe,CAAC;AAQvB,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAC;AAEhE,eAAO,MAAM,0BAA0B;2BACvB,sBAAsB;6BACpB,wBAAwB;0BA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,4BAA4B,KAC/C,OAAO,CAAC,sCAAsC,CAAC,CA8HnD;AAED,+EAA+E;AAC/E,wBAAsB,oCAAoC,CACxD,GAAG,EAAE,kBAAkB,CAAC,gBAAgB,CAAC,EACzC,OAAO,EAAE,mCAAmC,iBAsE7C"}
1
+ {"version":3,"file":"federation.d.ts","sourceRoot":"","sources":["../../src/client/federation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,kBAAkB,EAClB,YAAY,EACb,MAAM,eAAe,CAAC;AAQvB,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAC;AAEhE,eAAO,MAAM,0BAA0B;2BACvB,sBAAsB;6BACpB,wBAAwB;0BAC3B,oBAAoB;sBACxB,2BAA2B;yBACxB,oBAAoB;IAChC;;;OAGG;sBACM,iBAAiB;EACjB,CAAC;AAEZ,eAAO,MAAM,mCAAmC,mBAAmB,CAAC;AACpE;;;;GAIG;AACH,eAAO,MAAM,wCAAwC,wBAAwB,CAAC;AAC9E;;;;;;;GAOG;AACH,eAAO,MAAM,qCAAqC,qBAAqB,CAAC;AACxE,eAAO,MAAM,+BAA+B,wEAIjC,CAAC;AAEZ,eAAO,MAAM,+BAA+B;8BACzB,4BAA4B;8BAC5B,4BAA4B;6BAC7B,2BAA2B;gCACxB,8BAA8B;4BAClC,0BAA0B;0BAC5B,wBAAwB;kCAChB,gCAAgC;+BACnC,6BAA6B;EACtC,CAAC;AAGZ;;;;GAIG;AACH,eAAO,MAAM,sCAAsC;uBACvC,UAAU;+BACF,kBAAkB;wBACzB,WAAW;uBACZ,UAAU;2BACN,cAAc;2BACd,cAAc;6BACZ,gBAAgB;8BACf,iBAAiB;6BAClB,gBAAgB;0BACnB,aAAa;4BACX,eAAe;+BACZ,kBAAkB;2BACtB,cAAc;EACnB,CAAC;AACZ,eAAO,MAAM,yCAAyC,yKAY3C,CAAC;AACZ;;;;GAIG;AACH,eAAO,MAAM,uCAAuC;2BACpC,cAAc;yBAChB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BAAkB;mBACzB,WAAW;kBACZ,UAAU;sBACN,cAAc;sBACd,cAAc;wBACZ,gBAAgB;yBACf,iBAAiB;wBAClB,gBAAgB;qBACnB,aAAa;uBACX,eAAe;0BACZ,kBAAkB;sBACtB,cAAc;sBAqBd,cAAc;oBAChB,YAAY;mBACb,WAAW;oBACV,YAAY;oBACZ,YAAY;qBACX,aAAa;sBACZ,cAAc;sBACd,cAAc;wBACZ,gBAAgB;yBACf,iBAAiB;yBACjB,iBAAiB;yBACjB,iBAAiB;4BACd,oBAAoB;gCAChB,wBAAwB;oBAmBpC,YAAY;wBACR,gBAAgB;sBAClB,cAAc;iBACnB,SAAS;0BAIA,kBAAkB;2BACjB,mBAAmB;2BACnB,mBAAmB;2BACnB,mBAAmB;;;;;;;;;;;EAkSvC;AAED,wBAAgB,4CAA4C,CAC1D,OAAO,EAAE,mCAAmC,SAUrC,6BAA6B,qBACf,SAAS,MAAM,EAAE,uBAChB,4BAA4B,KAC/C,OAAO,CAAC,sCAAsC,CAAC,CA8HnD;AAED,+EAA+E;AAC/E,wBAAsB,oCAAoC,CACxD,GAAG,EAAE,kBAAkB,CAAC,gBAAgB,CAAC,EACzC,OAAO,EAAE,mCAAmC,iBAsE7C"}
@@ -120,6 +120,12 @@ const FEDERATED_ANALYTICS_FUNCTION_NAMES = Object.freeze({
120
120
  vitalsReport: "vitalsReport",
121
121
  siteMap: "siteMap",
122
122
  ...FEDERATED_ANALYTICS_CONFIGURE_FUNCTIONS,
123
+ // Behind the optional `trackedLinks` capability. Listing needs a reader;
124
+ // the other three need the configure permission, like any site change.
125
+ listTrackedLinks: "listTrackedLinks",
126
+ createTrackedLink: "createTrackedLink",
127
+ updateTrackedLink: "updateTrackedLink",
128
+ deleteTrackedLink: "deleteTrackedLink",
123
129
  });
124
130
  const FEDERATED_ANALYTICS_CAPABILITIES = Object.freeze([
125
131
  ...FEDERATED_ANALYTICS_REQUIRED_CAPABILITIES,
@@ -131,6 +137,7 @@ const FEDERATED_ANALYTICS_CAPABILITIES = Object.freeze([
131
137
  // from its own buckets (alpha.11); dashboards must not require it.
132
138
  "localDays",
133
139
  "configure",
140
+ "trackedLinks",
134
141
  ]);
135
142
  const FEDERATED_ANALYTICS_LIMITS = Object.freeze({
136
143
  maxSitesPerRequest: MAX_REPORT_SITES,
@@ -149,7 +156,7 @@ export const FEDERATED_ANALYTICS_CONNECTOR_MANIFEST = Object.freeze({
149
156
  });
150
157
  const MAX_CLAIM_LENGTH = 128;
151
158
  const MAX_PERMISSIONS = 16;
152
- const federatedAnalyticsCapabilityValidator = v.union(v.literal("siteSummaries"), v.literal("overview"), v.literal("liveVisitors"), v.literal("sessions"), v.literal("sessionJourney"), v.literal("conversions"), v.literal("visitorJourney"), v.literal("goals"), v.literal("funnels"), v.literal("affiliates"), v.literal("dataCoverage"), v.literal("sessionDetails"), v.literal("revenueSummary"), v.literal("vitals"), v.literal("siteMap"), v.literal("localDays"), v.literal("configure"), v.literal("transfer"));
159
+ const federatedAnalyticsCapabilityValidator = v.union(v.literal("siteSummaries"), v.literal("overview"), v.literal("liveVisitors"), v.literal("sessions"), v.literal("sessionJourney"), v.literal("conversions"), v.literal("visitorJourney"), v.literal("goals"), v.literal("funnels"), v.literal("affiliates"), v.literal("dataCoverage"), v.literal("sessionDetails"), v.literal("revenueSummary"), v.literal("vitals"), v.literal("siteMap"), v.literal("localDays"), v.literal("configure"), v.literal("trackedLinks"), v.literal("transfer"));
153
160
  export const federatedAnalyticsPermissionValidator = v.union(v.literal(FEDERATED_ANALYTICS_READ_PERMISSION), v.literal(FEDERATED_ANALYTICS_CONFIGURE_PERMISSION), v.literal(FEDERATED_ANALYTICS_PUBLIC_PERMISSION));
154
161
  export const federatedAnalyticsManifestValidator = v.object({
155
162
  protocol: v.literal(FEDERATED_ANALYTICS_CONNECTOR_MANIFEST.protocol),
@@ -187,6 +194,10 @@ export const federatedAnalyticsManifestValidator = v.object({
187
194
  retentionStatus: v.literal("retentionStatus"),
188
195
  setRetentionPolicy: v.literal("setRetentionPolicy"),
189
196
  disableRetentionPolicy: v.literal("disableRetentionPolicy"),
197
+ listTrackedLinks: v.literal("listTrackedLinks"),
198
+ createTrackedLink: v.literal("createTrackedLink"),
199
+ updateTrackedLink: v.literal("updateTrackedLink"),
200
+ deleteTrackedLink: v.literal("deleteTrackedLink"),
190
201
  transferConnection: v.optional(v.literal("transferConnection")),
191
202
  }),
192
203
  capabilities: v.array(federatedAnalyticsCapabilityValidator),