@iann29/rastro 0.1.0-alpha.9 → 0.2.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 (98) hide show
  1. package/README.md +248 -58
  2. package/agent/integration.md +223 -65
  3. package/agent/manifest.json +34 -13
  4. package/agent/manifest.schema.json +53 -11
  5. package/dist/client/federation.d.ts +215 -14
  6. package/dist/client/federation.d.ts.map +1 -1
  7. package/dist/client/federation.js +233 -9
  8. package/dist/client/federation.js.map +1 -1
  9. package/dist/client/heat.d.ts +37 -0
  10. package/dist/client/heat.d.ts.map +1 -0
  11. package/dist/client/heat.js +43 -0
  12. package/dist/client/heat.js.map +1 -0
  13. package/dist/client/index.d.ts +443 -98
  14. package/dist/client/index.d.ts.map +1 -1
  15. package/dist/client/index.js +214 -21
  16. package/dist/client/index.js.map +1 -1
  17. package/dist/component/_generated/api.d.ts +6 -0
  18. package/dist/component/_generated/api.d.ts.map +1 -1
  19. package/dist/component/_generated/api.js.map +1 -1
  20. package/dist/component/_generated/component.d.ts +50 -13
  21. package/dist/component/_generated/component.d.ts.map +1 -1
  22. package/dist/component/constants.d.ts +3 -0
  23. package/dist/component/constants.d.ts.map +1 -1
  24. package/dist/component/constants.js +6 -0
  25. package/dist/component/constants.js.map +1 -1
  26. package/dist/component/coverage.d.ts +9 -0
  27. package/dist/component/coverage.d.ts.map +1 -1
  28. package/dist/component/coverage.js +36 -6
  29. package/dist/component/coverage.js.map +1 -1
  30. package/dist/component/geo.d.ts +2 -0
  31. package/dist/component/geo.d.ts.map +1 -1
  32. package/dist/component/geo.js +56 -19
  33. package/dist/component/geo.js.map +1 -1
  34. package/dist/component/http.d.ts.map +1 -1
  35. package/dist/component/http.js +48 -27
  36. package/dist/component/http.js.map +1 -1
  37. package/dist/component/ingest.d.ts.map +1 -1
  38. package/dist/component/ingest.js +223 -304
  39. package/dist/component/ingest.js.map +1 -1
  40. package/dist/component/localTime.d.ts +25 -0
  41. package/dist/component/localTime.d.ts.map +1 -0
  42. package/dist/component/localTime.js +126 -0
  43. package/dist/component/localTime.js.map +1 -0
  44. package/dist/component/reports.d.ts +44 -13
  45. package/dist/component/reports.d.ts.map +1 -1
  46. package/dist/component/reports.js +193 -38
  47. package/dist/component/reports.js.map +1 -1
  48. package/dist/component/retention.js +26 -8
  49. package/dist/component/retention.js.map +1 -1
  50. package/dist/component/rollupStore.d.ts +320 -0
  51. package/dist/component/rollupStore.d.ts.map +1 -0
  52. package/dist/component/rollupStore.js +596 -0
  53. package/dist/component/rollupStore.js.map +1 -0
  54. package/dist/component/rollups.d.ts +20 -0
  55. package/dist/component/rollups.d.ts.map +1 -0
  56. package/dist/component/rollups.js +73 -0
  57. package/dist/component/rollups.js.map +1 -0
  58. package/dist/component/sanitize.d.ts +5 -0
  59. package/dist/component/sanitize.d.ts.map +1 -1
  60. package/dist/component/sanitize.js +15 -0
  61. package/dist/component/sanitize.js.map +1 -1
  62. package/dist/component/schema.d.ts +345 -11
  63. package/dist/component/schema.js +25 -0
  64. package/dist/component/schema.js.map +1 -1
  65. package/dist/component/sites.d.ts +12 -0
  66. package/dist/component/sites.d.ts.map +1 -1
  67. package/dist/component/sites.js +30 -0
  68. package/dist/component/sites.js.map +1 -1
  69. package/dist/component/validators.d.ts +34 -13
  70. package/dist/component/validators.d.ts.map +1 -1
  71. package/dist/component/validators.js +23 -2
  72. package/dist/component/validators.js.map +1 -1
  73. package/dist/tracker/generated.d.ts +3 -0
  74. package/dist/tracker/generated.d.ts.map +1 -1
  75. package/dist/tracker/generated.js +3 -0
  76. package/dist/tracker/generated.js.map +1 -1
  77. package/docs/federation-setup.md +165 -27
  78. package/docs/federation.md +170 -31
  79. package/docs/upgrading.md +181 -21
  80. package/llms.txt +8 -6
  81. package/package.json +2 -1
  82. package/src/component/_generated/api.ts +6 -0
  83. package/src/component/_generated/component.ts +47 -12
  84. package/src/component/constants.ts +6 -0
  85. package/src/component/coverage.ts +46 -6
  86. package/src/component/geo.ts +82 -28
  87. package/src/component/http.ts +61 -26
  88. package/src/component/ingest.ts +327 -439
  89. package/src/component/localTime.ts +167 -0
  90. package/src/component/reports.ts +261 -39
  91. package/src/component/retention.ts +25 -7
  92. package/src/component/rollupStore.ts +799 -0
  93. package/src/component/rollups.ts +82 -0
  94. package/src/component/sanitize.ts +14 -0
  95. package/src/component/schema.ts +35 -0
  96. package/src/component/sites.ts +32 -0
  97. package/src/component/validators.ts +27 -1
  98. package/src/tracker/generated.ts +12 -0
@@ -1,11 +1,34 @@
1
- import type { UserIdentity } from "convex/server";
1
+ import type { GenericDataModel, GenericMutationCtx, UserIdentity } from "convex/server";
2
2
  import type { AnalyticsAuthorizationContext } from "./index.js";
3
3
  export declare const FEDERATED_ANALYTICS_CLAIMS: Readonly<{
4
4
  readonly connectionId: "rastro_connection_id";
5
5
  readonly organizationId: "rastro_organization_id";
6
6
  readonly permissions: "rastro_permissions";
7
+ readonly version: "rastro_connection_version";
8
+ readonly transferTo: "rastro_transfer_to";
9
+ /**
10
+ * Optional: the sites the token may read, a subset of the grant. A public
11
+ * link's token carries the sites the link was created for.
12
+ */
13
+ readonly siteIds: "rastro_site_ids";
7
14
  }>;
8
15
  export declare const FEDERATED_ANALYTICS_READ_PERMISSION = "analytics:read";
16
+ /**
17
+ * The opt-in write scope. A token carries it only for organization owners and
18
+ * admins, and a host honors it only when its local grant lists it too: both
19
+ * sides must agree before any configuration function runs.
20
+ */
21
+ export declare const FEDERATED_ANALYTICS_CONFIGURE_PERMISSION = "analytics:configure";
22
+ /**
23
+ * The permission a public link's token carries instead of `analytics:read`.
24
+ * It reaches only the overview, the live visitors, the site summaries, the
25
+ * coverage and the connection status — never sessions, journeys, conversions
26
+ * or the configure scope — and a host honors it only when its local grant lists
27
+ * it, so a customer decides twice before a dashboard goes public. A host from
28
+ * before this permission rejects the token whole, which is the safe failure.
29
+ */
30
+ export declare const FEDERATED_ANALYTICS_PUBLIC_PERMISSION = "analytics:public";
31
+ export declare const FEDERATED_ANALYTICS_PERMISSIONS: readonly ["analytics:read", "analytics:configure", "analytics:public"];
9
32
  export declare const FEDERATED_ANALYTICS_ERROR_CODES: Readonly<{
10
33
  readonly UNAUTHENTICATED: "FEDERATION_UNAUTHENTICATED";
11
34
  readonly ISSUER_MISMATCH: "FEDERATION_ISSUER_MISMATCH";
@@ -13,6 +36,8 @@ export declare const FEDERATED_ANALYTICS_ERROR_CODES: Readonly<{
13
36
  readonly CONNECTION_DENIED: "FEDERATION_CONNECTION_DENIED";
14
37
  readonly INVALID_SCOPE: "FEDERATION_INVALID_SCOPE";
15
38
  readonly SITE_DENIED: "FEDERATION_SITE_DENIED";
39
+ readonly CONFIGURE_FORBIDDEN: "FEDERATION_CONFIGURE_FORBIDDEN";
40
+ readonly PUBLIC_FORBIDDEN: "FEDERATION_PUBLIC_FORBIDDEN";
16
41
  }>;
17
42
  /**
18
43
  * The protocol-v1 baseline every compatible host must serve. Newer hosts may
@@ -35,6 +60,42 @@ export declare const FEDERATED_ANALYTICS_REQUIRED_FUNCTIONS: Readonly<{
35
60
  readonly dataCoverage: "dataCoverage";
36
61
  }>;
37
62
  export declare const FEDERATED_ANALYTICS_REQUIRED_CAPABILITIES: readonly ["siteSummaries", "overview", "liveVisitors", "sessions", "sessionJourney", "conversions", "visitorJourney", "goals", "funnels", "affiliates", "dataCoverage"];
63
+ /**
64
+ * The optional configuration surface behind the `configure` capability. Every
65
+ * function here requires the configure permission on the token and on the
66
+ * host's grant; a host that keeps its grants read-only never runs them.
67
+ */
68
+ export declare const FEDERATED_ANALYTICS_CONFIGURE_FUNCTIONS: Readonly<{
69
+ readonly siteSettings: "siteSettings";
70
+ readonly updateSite: "updateSite";
71
+ readonly listGoals: "listGoals";
72
+ readonly upsertGoal: "upsertGoal";
73
+ readonly removeGoal: "removeGoal";
74
+ readonly listFunnels: "listFunnels";
75
+ readonly upsertFunnel: "upsertFunnel";
76
+ readonly removeFunnel: "removeFunnel";
77
+ readonly listAffiliates: "listAffiliates";
78
+ readonly upsertAffiliate: "upsertAffiliate";
79
+ readonly removeAffiliate: "removeAffiliate";
80
+ readonly retentionStatus: "retentionStatus";
81
+ readonly setRetentionPolicy: "setRetentionPolicy";
82
+ readonly disableRetentionPolicy: "disableRetentionPolicy";
83
+ }>;
84
+ /**
85
+ * The functions a public token may run: the aggregate overview (redacted of
86
+ * revenue, conversions, goals, campaigns and custom events), the live visitors
87
+ * (with the visitor identity replaced by the session id), the redacted site
88
+ * summaries, the coverage and the connection status. Everything else on the
89
+ * surface needs a reader's token.
90
+ */
91
+ export declare const FEDERATED_ANALYTICS_PUBLIC_FUNCTIONS: Readonly<{
92
+ readonly manifest: "manifest";
93
+ readonly connectionStatus: "connectionStatus";
94
+ readonly listSites: "listSites";
95
+ readonly overview: "overview";
96
+ readonly liveVisitors: "liveVisitors";
97
+ readonly dataCoverage: "dataCoverage";
98
+ }>;
38
99
  export declare const FEDERATED_ANALYTICS_CONNECTOR_MANIFEST: Readonly<{
39
100
  readonly protocol: "amage-rastro-analytics";
40
101
  readonly protocolVersion: 1;
@@ -53,10 +114,24 @@ export declare const FEDERATED_ANALYTICS_CONNECTOR_MANIFEST: Readonly<{
53
114
  readonly funnelsReport: "funnelsReport";
54
115
  readonly affiliatesReport: "affiliatesReport";
55
116
  readonly dataCoverage: "dataCoverage";
117
+ readonly siteSettings: "siteSettings";
118
+ readonly updateSite: "updateSite";
119
+ readonly listGoals: "listGoals";
120
+ readonly upsertGoal: "upsertGoal";
121
+ readonly removeGoal: "removeGoal";
122
+ readonly listFunnels: "listFunnels";
123
+ readonly upsertFunnel: "upsertFunnel";
124
+ readonly removeFunnel: "removeFunnel";
125
+ readonly listAffiliates: "listAffiliates";
126
+ readonly upsertAffiliate: "upsertAffiliate";
127
+ readonly removeAffiliate: "removeAffiliate";
128
+ readonly retentionStatus: "retentionStatus";
129
+ readonly setRetentionPolicy: "setRetentionPolicy";
130
+ readonly disableRetentionPolicy: "disableRetentionPolicy";
56
131
  readonly vitalsReport: "vitalsReport";
57
132
  readonly siteMap: "siteMap";
58
133
  }>;
59
- readonly capabilities: readonly ["siteSummaries", "overview", "liveVisitors", "sessions", "sessionJourney", "conversions", "visitorJourney", "goals", "funnels", "affiliates", "dataCoverage", "vitals", "siteMap"];
134
+ readonly capabilities: readonly ["siteSummaries", "overview", "liveVisitors", "sessions", "sessionJourney", "conversions", "visitorJourney", "goals", "funnels", "affiliates", "dataCoverage", "vitals", "siteMap", "localDays", "configure"];
60
135
  readonly limits: Readonly<{
61
136
  readonly maxSitesPerRequest: 10;
62
137
  readonly maxSitesPerConnection: 10;
@@ -66,12 +141,21 @@ export declare const FEDERATED_ANALYTICS_CONNECTOR_MANIFEST: Readonly<{
66
141
  }>;
67
142
  }>;
68
143
  export type FederatedAnalyticsErrorCode = (typeof FEDERATED_ANALYTICS_ERROR_CODES)[keyof typeof FEDERATED_ANALYTICS_ERROR_CODES];
69
- export type FederatedAnalyticsCapability = (typeof FEDERATED_ANALYTICS_CONNECTOR_MANIFEST.capabilities)[number];
144
+ export type FederatedAnalyticsCapability = (typeof FEDERATED_ANALYTICS_CONNECTOR_MANIFEST.capabilities)[number] | "transfer";
145
+ export type FederatedAnalyticsPermission = (typeof FEDERATED_ANALYTICS_PERMISSIONS)[number];
70
146
  export type FederatedAnalyticsManifest = ReturnType<typeof createFederatedAnalyticsManifest>;
71
147
  export interface FederatedAnalyticsConnection {
72
148
  connectionId: string;
73
149
  organizationId: string;
150
+ /** Incremented on transfer, invalidating tokens even after a round trip. */
151
+ version?: number;
74
152
  siteIds: readonly string[];
153
+ /**
154
+ * What the host lets this connection do. Absent means read only; listing
155
+ * `analytics:configure` lets owners and admins of the dashboard organization
156
+ * manage goals, funnels, affiliates, site settings, and retention.
157
+ */
158
+ permissions?: readonly FederatedAnalyticsPermission[];
75
159
  revokedAt?: number;
76
160
  }
77
161
  export interface FederatedAnalyticsIdentity {
@@ -85,34 +169,72 @@ export interface FederatedSiteSummary {
85
169
  currency: string;
86
170
  timezone: string | null;
87
171
  cookieless: boolean;
172
+ /**
173
+ * The site's calendar days, when the host keeps them (alpha.11): the
174
+ * timezone its daily overview buckets follow and the instant from which
175
+ * they are complete. `null` for a site without a timezone, or whose zone
176
+ * never leaves UTC. Hosts before alpha.11 omit the field.
177
+ */
178
+ localDays: {
179
+ timezone: string;
180
+ since: number;
181
+ } | null;
88
182
  }
89
183
  export interface FederatedAnalyticsConnectionStatus {
90
184
  status: "connected";
91
185
  protocolVersion: 1;
92
186
  capabilities: FederatedAnalyticsCapability[];
187
+ /** The permissions both the token and the host's grant agree on. */
188
+ permissions: FederatedAnalyticsPermission[];
93
189
  siteCount: number;
94
190
  }
191
+ /** A resolved connection plus the permissions this request may act with. */
192
+ export type AuthorizedFederatedAnalyticsConnection = FederatedAnalyticsConnection & {
193
+ effectivePermissions: FederatedAnalyticsPermission[];
194
+ };
95
195
  export type ResolveFederatedAnalyticsConnection = (ctx: AnalyticsAuthorizationContext, identity: FederatedAnalyticsIdentity) => FederatedAnalyticsConnection | null | Promise<FederatedAnalyticsConnection | null>;
96
196
  export interface FederatedAnalyticsAuthorizerOptions {
97
197
  issuer: string;
98
198
  resolveConnection: ResolveFederatedAnalyticsConnection;
199
+ /** Opt in by atomically persisting both fields on the authoritative grant. */
200
+ transferConnection?: (ctx: GenericMutationCtx<GenericDataModel>, connection: {
201
+ connectionId: string;
202
+ organizationId: string;
203
+ version: number;
204
+ }) => Promise<void>;
99
205
  }
206
+ 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>;
100
207
  export declare const federatedAnalyticsManifestValidator: import("convex/values").VObject<{
101
- capabilities: ("affiliates" | "conversions" | "dataCoverage" | "funnels" | "goals" | "liveVisitors" | "overview" | "sessionJourney" | "sessions" | "siteMap" | "siteSummaries" | "visitorJourney" | "vitals")[];
208
+ capabilities: ("affiliates" | "configure" | "conversions" | "dataCoverage" | "funnels" | "goals" | "liveVisitors" | "localDays" | "overview" | "sessionJourney" | "sessions" | "siteMap" | "siteSummaries" | "transfer" | "visitorJourney" | "vitals")[];
102
209
  functions: {
103
210
  affiliatesReport: "affiliatesReport";
104
211
  connectionStatus: "connectionStatus";
105
212
  dataCoverage: "dataCoverage";
213
+ disableRetentionPolicy: "disableRetentionPolicy";
106
214
  funnelsReport: "funnelsReport";
107
215
  goalsReport: "goalsReport";
216
+ listAffiliates: "listAffiliates";
108
217
  listConversions: "listConversions";
218
+ listFunnels: "listFunnels";
219
+ listGoals: "listGoals";
109
220
  listSessions: "listSessions";
110
221
  listSites: "listSites";
111
222
  liveVisitors: "liveVisitors";
112
223
  manifest: "manifest";
113
224
  overview: "overview";
225
+ removeAffiliate: "removeAffiliate";
226
+ removeFunnel: "removeFunnel";
227
+ removeGoal: "removeGoal";
228
+ retentionStatus: "retentionStatus";
114
229
  sessionJourney: "sessionJourney";
230
+ setRetentionPolicy: "setRetentionPolicy";
115
231
  siteMap: "siteMap";
232
+ siteSettings: "siteSettings";
233
+ transferConnection?: "transferConnection" | undefined;
234
+ updateSite: "updateSite";
235
+ upsertAffiliate: "upsertAffiliate";
236
+ upsertFunnel: "upsertFunnel";
237
+ upsertGoal: "upsertGoal";
116
238
  visitorJourney: "visitorJourney";
117
239
  vitalsReport: "vitalsReport";
118
240
  };
@@ -134,16 +256,31 @@ export declare const federatedAnalyticsManifestValidator: import("convex/values"
134
256
  affiliatesReport: "affiliatesReport";
135
257
  connectionStatus: "connectionStatus";
136
258
  dataCoverage: "dataCoverage";
259
+ disableRetentionPolicy: "disableRetentionPolicy";
137
260
  funnelsReport: "funnelsReport";
138
261
  goalsReport: "goalsReport";
262
+ listAffiliates: "listAffiliates";
139
263
  listConversions: "listConversions";
264
+ listFunnels: "listFunnels";
265
+ listGoals: "listGoals";
140
266
  listSessions: "listSessions";
141
267
  listSites: "listSites";
142
268
  liveVisitors: "liveVisitors";
143
269
  manifest: "manifest";
144
270
  overview: "overview";
271
+ removeAffiliate: "removeAffiliate";
272
+ removeFunnel: "removeFunnel";
273
+ removeGoal: "removeGoal";
274
+ retentionStatus: "retentionStatus";
145
275
  sessionJourney: "sessionJourney";
276
+ setRetentionPolicy: "setRetentionPolicy";
146
277
  siteMap: "siteMap";
278
+ siteSettings: "siteSettings";
279
+ transferConnection?: "transferConnection" | undefined;
280
+ updateSite: "updateSite";
281
+ upsertAffiliate: "upsertAffiliate";
282
+ upsertFunnel: "upsertFunnel";
283
+ upsertGoal: "upsertGoal";
147
284
  visitorJourney: "visitorJourney";
148
285
  vitalsReport: "vitalsReport";
149
286
  }, {
@@ -162,8 +299,23 @@ export declare const federatedAnalyticsManifestValidator: import("convex/values"
162
299
  dataCoverage: import("convex/values").VLiteral<"dataCoverage", "required">;
163
300
  vitalsReport: import("convex/values").VLiteral<"vitalsReport", "required">;
164
301
  siteMap: import("convex/values").VLiteral<"siteMap", "required">;
165
- }, "required", "affiliatesReport" | "connectionStatus" | "dataCoverage" | "funnelsReport" | "goalsReport" | "listConversions" | "listSessions" | "listSites" | "liveVisitors" | "manifest" | "overview" | "sessionJourney" | "siteMap" | "visitorJourney" | "vitalsReport">;
166
- capabilities: import("convex/values").VArray<("affiliates" | "conversions" | "dataCoverage" | "funnels" | "goals" | "liveVisitors" | "overview" | "sessionJourney" | "sessions" | "siteMap" | "siteSummaries" | "visitorJourney" | "vitals")[], import("convex/values").VUnion<"affiliates" | "conversions" | "dataCoverage" | "funnels" | "goals" | "liveVisitors" | "overview" | "sessionJourney" | "sessions" | "siteMap" | "siteSummaries" | "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<"vitals", "required">, import("convex/values").VLiteral<"siteMap", "required">], "required", never>, "required">;
302
+ siteSettings: import("convex/values").VLiteral<"siteSettings", "required">;
303
+ updateSite: import("convex/values").VLiteral<"updateSite", "required">;
304
+ listGoals: import("convex/values").VLiteral<"listGoals", "required">;
305
+ upsertGoal: import("convex/values").VLiteral<"upsertGoal", "required">;
306
+ removeGoal: import("convex/values").VLiteral<"removeGoal", "required">;
307
+ listFunnels: import("convex/values").VLiteral<"listFunnels", "required">;
308
+ upsertFunnel: import("convex/values").VLiteral<"upsertFunnel", "required">;
309
+ removeFunnel: import("convex/values").VLiteral<"removeFunnel", "required">;
310
+ listAffiliates: import("convex/values").VLiteral<"listAffiliates", "required">;
311
+ upsertAffiliate: import("convex/values").VLiteral<"upsertAffiliate", "required">;
312
+ removeAffiliate: import("convex/values").VLiteral<"removeAffiliate", "required">;
313
+ retentionStatus: import("convex/values").VLiteral<"retentionStatus", "required">;
314
+ setRetentionPolicy: import("convex/values").VLiteral<"setRetentionPolicy", "required">;
315
+ disableRetentionPolicy: import("convex/values").VLiteral<"disableRetentionPolicy", "required">;
316
+ transferConnection: import("convex/values").VLiteral<"transferConnection" | undefined, "optional">;
317
+ }, "required", "affiliatesReport" | "connectionStatus" | "dataCoverage" | "disableRetentionPolicy" | "funnelsReport" | "goalsReport" | "listAffiliates" | "listConversions" | "listFunnels" | "listGoals" | "listSessions" | "listSites" | "liveVisitors" | "manifest" | "overview" | "removeAffiliate" | "removeFunnel" | "removeGoal" | "retentionStatus" | "sessionJourney" | "setRetentionPolicy" | "siteMap" | "siteSettings" | "transferConnection" | "updateSite" | "upsertAffiliate" | "upsertFunnel" | "upsertGoal" | "visitorJourney" | "vitalsReport">;
318
+ capabilities: import("convex/values").VArray<("affiliates" | "configure" | "conversions" | "dataCoverage" | "funnels" | "goals" | "liveVisitors" | "localDays" | "overview" | "sessionJourney" | "sessions" | "siteMap" | "siteSummaries" | "transfer" | "visitorJourney" | "vitals")[], import("convex/values").VUnion<"affiliates" | "configure" | "conversions" | "dataCoverage" | "funnels" | "goals" | "liveVisitors" | "localDays" | "overview" | "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<"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">;
167
319
  limits: import("convex/values").VObject<{
168
320
  maxJourneyEvents: number;
169
321
  maxLiveVisitors: number;
@@ -177,21 +329,43 @@ export declare const federatedAnalyticsManifestValidator: import("convex/values"
177
329
  maxLiveVisitors: import("convex/values").VFloat64<number, "required">;
178
330
  maxJourneyEvents: import("convex/values").VFloat64<number, "required">;
179
331
  }, "required", "maxJourneyEvents" | "maxLiveVisitors" | "maxReportRangeDays" | "maxSitesPerConnection" | "maxSitesPerRequest">;
180
- }, "required", "capabilities" | "functions" | "functions.affiliatesReport" | "functions.connectionStatus" | "functions.dataCoverage" | "functions.funnelsReport" | "functions.goalsReport" | "functions.listConversions" | "functions.listSessions" | "functions.listSites" | "functions.liveVisitors" | "functions.manifest" | "functions.overview" | "functions.sessionJourney" | "functions.siteMap" | "functions.visitorJourney" | "functions.vitalsReport" | "limits" | "limits.maxJourneyEvents" | "limits.maxLiveVisitors" | "limits.maxReportRangeDays" | "limits.maxSitesPerConnection" | "limits.maxSitesPerRequest" | "moduleName" | "protocol" | "protocolVersion">;
332
+ }, "required", "capabilities" | "functions" | "functions.affiliatesReport" | "functions.connectionStatus" | "functions.dataCoverage" | "functions.disableRetentionPolicy" | "functions.funnelsReport" | "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.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">;
181
333
  export declare const federatedAnalyticsConnectionStatusValidator: import("convex/values").VObject<{
182
- capabilities: ("affiliates" | "conversions" | "dataCoverage" | "funnels" | "goals" | "liveVisitors" | "overview" | "sessionJourney" | "sessions" | "siteMap" | "siteSummaries" | "visitorJourney" | "vitals")[];
334
+ capabilities: ("affiliates" | "configure" | "conversions" | "dataCoverage" | "funnels" | "goals" | "liveVisitors" | "localDays" | "overview" | "sessionJourney" | "sessions" | "siteMap" | "siteSummaries" | "transfer" | "visitorJourney" | "vitals")[];
335
+ permissions: ("analytics:configure" | "analytics:public" | "analytics:read")[];
183
336
  protocolVersion: 1;
184
337
  siteCount: number;
185
338
  status: "connected";
186
339
  }, {
187
340
  status: import("convex/values").VLiteral<"connected", "required">;
188
341
  protocolVersion: import("convex/values").VLiteral<1, "required">;
189
- capabilities: import("convex/values").VArray<("affiliates" | "conversions" | "dataCoverage" | "funnels" | "goals" | "liveVisitors" | "overview" | "sessionJourney" | "sessions" | "siteMap" | "siteSummaries" | "visitorJourney" | "vitals")[], import("convex/values").VUnion<"affiliates" | "conversions" | "dataCoverage" | "funnels" | "goals" | "liveVisitors" | "overview" | "sessionJourney" | "sessions" | "siteMap" | "siteSummaries" | "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<"vitals", "required">, import("convex/values").VLiteral<"siteMap", "required">], "required", never>, "required">;
342
+ capabilities: import("convex/values").VArray<("affiliates" | "configure" | "conversions" | "dataCoverage" | "funnels" | "goals" | "liveVisitors" | "localDays" | "overview" | "sessionJourney" | "sessions" | "siteMap" | "siteSummaries" | "transfer" | "visitorJourney" | "vitals")[], import("convex/values").VUnion<"affiliates" | "configure" | "conversions" | "dataCoverage" | "funnels" | "goals" | "liveVisitors" | "localDays" | "overview" | "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<"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">;
343
+ 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">;
190
344
  siteCount: import("convex/values").VFloat64<number, "required">;
191
- }, "required", "capabilities" | "protocolVersion" | "siteCount" | "status">;
345
+ }, "required", "capabilities" | "permissions" | "protocolVersion" | "siteCount" | "status">;
346
+ /**
347
+ * The permissions a request may act with: those the token claims that the
348
+ * host's grant also lists. Reading needs no listing — a grant is a read grant
349
+ * by definition — so a token claiming `analytics:read` always reads, and the
350
+ * configure scope rides on it. A public token claims `analytics:public`
351
+ * instead of reading, and holds it only when the grant lists it.
352
+ */
353
+ export declare function effectiveFederatedPermissions(claimed: readonly string[], connection: Pick<FederatedAnalyticsConnection, "permissions">): FederatedAnalyticsPermission[];
354
+ /**
355
+ * Whether `effective` permissions reach an operation that needs `required`:
356
+ * `analytics:public` names an operation a public token may run, and a reader
357
+ * or a configurer reaches it too; `analytics:read` needs a reader.
358
+ */
359
+ export declare function federatedPermissionSatisfies(effective: readonly FederatedAnalyticsPermission[], required: FederatedAnalyticsPermission): boolean;
360
+ /** A public link's token: it holds the public permission and cannot read. */
361
+ export declare function isPublicFederatedAccess(effective: readonly FederatedAnalyticsPermission[]): boolean;
192
362
  export declare const federatedSiteSummaryValidator: import("convex/values").VObject<{
193
363
  cookieless: boolean;
194
364
  currency: string;
365
+ localDays: {
366
+ since: number;
367
+ timezone: string;
368
+ } | null;
195
369
  name: string;
196
370
  siteId: string;
197
371
  timezone: string | null;
@@ -201,8 +375,18 @@ export declare const federatedSiteSummaryValidator: import("convex/values").VObj
201
375
  currency: import("convex/values").VString<string, "required">;
202
376
  timezone: import("convex/values").VUnion<string | null, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "required", never>;
203
377
  cookieless: import("convex/values").VBoolean<boolean, "required">;
204
- }, "required", "cookieless" | "currency" | "name" | "siteId" | "timezone">;
205
- export declare function createFederatedAnalyticsManifest(): {
378
+ localDays: import("convex/values").VUnion<{
379
+ since: number;
380
+ timezone: string;
381
+ } | null, [import("convex/values").VObject<{
382
+ since: number;
383
+ timezone: string;
384
+ }, {
385
+ timezone: import("convex/values").VString<string, "required">;
386
+ since: import("convex/values").VFloat64<number, "required">;
387
+ }, "required", "since" | "timezone">, import("convex/values").VNull<null, "required">], "required", "since" | "timezone">;
388
+ }, "required", "cookieless" | "currency" | "localDays" | "localDays.since" | "localDays.timezone" | "name" | "siteId" | "timezone">;
389
+ export declare function createFederatedAnalyticsManifest(transfer?: boolean): {
206
390
  protocol: "amage-rastro-analytics";
207
391
  protocolVersion: 1;
208
392
  moduleName: "rastroFederation";
@@ -220,10 +404,25 @@ export declare function createFederatedAnalyticsManifest(): {
220
404
  funnelsReport: "funnelsReport";
221
405
  affiliatesReport: "affiliatesReport";
222
406
  dataCoverage: "dataCoverage";
407
+ siteSettings: "siteSettings";
408
+ updateSite: "updateSite";
409
+ listGoals: "listGoals";
410
+ upsertGoal: "upsertGoal";
411
+ removeGoal: "removeGoal";
412
+ listFunnels: "listFunnels";
413
+ upsertFunnel: "upsertFunnel";
414
+ removeFunnel: "removeFunnel";
415
+ listAffiliates: "listAffiliates";
416
+ upsertAffiliate: "upsertAffiliate";
417
+ removeAffiliate: "removeAffiliate";
418
+ retentionStatus: "retentionStatus";
419
+ setRetentionPolicy: "setRetentionPolicy";
420
+ disableRetentionPolicy: "disableRetentionPolicy";
223
421
  vitalsReport: "vitalsReport";
224
422
  siteMap: "siteMap";
423
+ transferConnection?: "transferConnection" | undefined;
225
424
  };
226
- capabilities: ("affiliates" | "conversions" | "dataCoverage" | "funnels" | "goals" | "liveVisitors" | "overview" | "sessionJourney" | "sessions" | "siteMap" | "siteSummaries" | "visitorJourney" | "vitals")[];
425
+ capabilities: ("affiliates" | "configure" | "conversions" | "dataCoverage" | "funnels" | "goals" | "liveVisitors" | "localDays" | "overview" | "sessionJourney" | "sessions" | "siteMap" | "siteSummaries" | "transfer" | "visitorJourney" | "vitals")[];
227
426
  limits: {
228
427
  maxSitesPerRequest: 10;
229
428
  maxSitesPerConnection: 10;
@@ -232,5 +431,7 @@ export declare function createFederatedAnalyticsManifest(): {
232
431
  maxJourneyEvents: 500;
233
432
  };
234
433
  };
235
- export declare function createFederatedAnalyticsConnectionAuthorizer(options: FederatedAnalyticsAuthorizerOptions): (ctx: AnalyticsAuthorizationContext, requestedSiteIds?: readonly string[]) => Promise<FederatedAnalyticsConnection>;
434
+ export declare function createFederatedAnalyticsConnectionAuthorizer(options: FederatedAnalyticsAuthorizerOptions): (ctx: AnalyticsAuthorizationContext, requestedSiteIds?: readonly string[], requiredPermission?: FederatedAnalyticsPermission) => Promise<AuthorizedFederatedAnalyticsConnection>;
435
+ /** Only a server-issued, destination-bound intent may change a local grant. */
436
+ export declare function transferFederatedAnalyticsConnection(ctx: GenericMutationCtx<GenericDataModel>, options: FederatedAnalyticsAuthorizerOptions): Promise<null>;
236
437
  //# sourceMappingURL=federation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"federation.d.ts","sourceRoot":"","sources":["../../src/client/federation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAQlD,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAC;AAEhE,eAAO,MAAM,0BAA0B;2BACvB,sBAAsB;6BACpB,wBAAwB;0BAC3B,oBAAoB;EACxB,CAAC;AAEZ,eAAO,MAAM,mCAAmC,mBAAmB,CAAC;AAEpE,eAAO,MAAM,+BAA+B;8BACzB,4BAA4B;8BAC5B,4BAA4B;6BAC7B,2BAA2B;gCACxB,8BAA8B;4BAClC,0BAA0B;0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"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,YAAY;wBACb,WAAW;yBACV,YAAY;yBACZ,YAAY;0BACX,aAAa;2BACZ,cAAc;2BACd,cAAc;6BACZ,gBAAgB;8BACf,iBAAiB;8BACjB,iBAAiB;8BACjB,iBAAiB;iCACd,oBAAoB;qCAChB,wBAAwB;EACvC,C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