@iann29/rastro 0.1.0-alpha.10 → 0.1.0-alpha.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +215 -46
- package/agent/integration.md +186 -46
- package/agent/manifest.json +28 -10
- package/agent/manifest.schema.json +41 -8
- package/dist/client/federation.d.ts +156 -11
- package/dist/client/federation.d.ts.map +1 -1
- package/dist/client/federation.js +82 -4
- package/dist/client/federation.js.map +1 -1
- package/dist/client/index.d.ts +306 -97
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +116 -13
- package/dist/client/index.js.map +1 -1
- package/dist/component/_generated/api.d.ts +6 -0
- package/dist/component/_generated/api.d.ts.map +1 -1
- package/dist/component/_generated/api.js.map +1 -1
- package/dist/component/_generated/component.d.ts +26 -13
- package/dist/component/_generated/component.d.ts.map +1 -1
- package/dist/component/constants.d.ts +3 -0
- package/dist/component/constants.d.ts.map +1 -1
- package/dist/component/constants.js +6 -0
- package/dist/component/constants.js.map +1 -1
- package/dist/component/coverage.d.ts +8 -0
- package/dist/component/coverage.d.ts.map +1 -1
- package/dist/component/coverage.js +32 -6
- package/dist/component/coverage.js.map +1 -1
- package/dist/component/geo.d.ts +2 -0
- package/dist/component/geo.d.ts.map +1 -1
- package/dist/component/geo.js +56 -19
- package/dist/component/geo.js.map +1 -1
- package/dist/component/http.d.ts.map +1 -1
- package/dist/component/http.js +47 -27
- package/dist/component/http.js.map +1 -1
- package/dist/component/ingest.d.ts.map +1 -1
- package/dist/component/ingest.js +149 -295
- package/dist/component/ingest.js.map +1 -1
- package/dist/component/localTime.d.ts +25 -0
- package/dist/component/localTime.d.ts.map +1 -0
- package/dist/component/localTime.js +126 -0
- package/dist/component/localTime.js.map +1 -0
- package/dist/component/reports.d.ts +20 -13
- package/dist/component/reports.d.ts.map +1 -1
- package/dist/component/reports.js +158 -38
- package/dist/component/reports.js.map +1 -1
- package/dist/component/retention.js +26 -8
- package/dist/component/retention.js.map +1 -1
- package/dist/component/rollupStore.d.ts +320 -0
- package/dist/component/rollupStore.d.ts.map +1 -0
- package/dist/component/rollupStore.js +596 -0
- package/dist/component/rollupStore.js.map +1 -0
- package/dist/component/rollups.d.ts +20 -0
- package/dist/component/rollups.d.ts.map +1 -0
- package/dist/component/rollups.js +73 -0
- package/dist/component/rollups.js.map +1 -0
- package/dist/component/schema.d.ts +311 -5
- package/dist/component/schema.js +9 -0
- package/dist/component/schema.js.map +1 -1
- package/dist/component/sites.d.ts +12 -0
- package/dist/component/sites.d.ts.map +1 -1
- package/dist/component/sites.js +30 -0
- package/dist/component/sites.js.map +1 -1
- package/dist/component/validators.d.ts +24 -5
- package/dist/component/validators.d.ts.map +1 -1
- package/dist/component/validators.js +16 -1
- package/dist/component/validators.js.map +1 -1
- package/dist/tracker/generated.d.ts +3 -0
- package/dist/tracker/generated.d.ts.map +1 -1
- package/dist/tracker/generated.js +3 -0
- package/dist/tracker/generated.js.map +1 -1
- package/docs/federation-setup.md +93 -26
- package/docs/federation.md +120 -30
- package/docs/upgrading.md +103 -17
- package/llms.txt +6 -5
- package/package.json +2 -1
- package/src/component/_generated/api.ts +6 -0
- package/src/component/_generated/component.ts +27 -12
- package/src/component/constants.ts +6 -0
- package/src/component/coverage.ts +41 -6
- package/src/component/geo.ts +82 -28
- package/src/component/http.ts +60 -26
- package/src/component/ingest.ts +226 -425
- package/src/component/localTime.ts +167 -0
- package/src/component/reports.ts +222 -39
- package/src/component/retention.ts +25 -7
- package/src/component/rollupStore.ts +799 -0
- package/src/component/rollups.ts +82 -0
- package/src/component/schema.ts +17 -0
- package/src/component/sites.ts +32 -0
- package/src/component/validators.ts +20 -1
- package/src/tracker/generated.ts +12 -0
|
@@ -6,6 +6,13 @@ export declare const FEDERATED_ANALYTICS_CLAIMS: Readonly<{
|
|
|
6
6
|
readonly permissions: "rastro_permissions";
|
|
7
7
|
}>;
|
|
8
8
|
export declare const FEDERATED_ANALYTICS_READ_PERMISSION = "analytics:read";
|
|
9
|
+
/**
|
|
10
|
+
* The opt-in write scope. A token carries it only for organization owners and
|
|
11
|
+
* admins, and a host honors it only when its local grant lists it too: both
|
|
12
|
+
* sides must agree before any configuration function runs.
|
|
13
|
+
*/
|
|
14
|
+
export declare const FEDERATED_ANALYTICS_CONFIGURE_PERMISSION = "analytics:configure";
|
|
15
|
+
export declare const FEDERATED_ANALYTICS_PERMISSIONS: readonly ["analytics:read", "analytics:configure"];
|
|
9
16
|
export declare const FEDERATED_ANALYTICS_ERROR_CODES: Readonly<{
|
|
10
17
|
readonly UNAUTHENTICATED: "FEDERATION_UNAUTHENTICATED";
|
|
11
18
|
readonly ISSUER_MISMATCH: "FEDERATION_ISSUER_MISMATCH";
|
|
@@ -13,6 +20,7 @@ export declare const FEDERATED_ANALYTICS_ERROR_CODES: Readonly<{
|
|
|
13
20
|
readonly CONNECTION_DENIED: "FEDERATION_CONNECTION_DENIED";
|
|
14
21
|
readonly INVALID_SCOPE: "FEDERATION_INVALID_SCOPE";
|
|
15
22
|
readonly SITE_DENIED: "FEDERATION_SITE_DENIED";
|
|
23
|
+
readonly CONFIGURE_FORBIDDEN: "FEDERATION_CONFIGURE_FORBIDDEN";
|
|
16
24
|
}>;
|
|
17
25
|
/**
|
|
18
26
|
* The protocol-v1 baseline every compatible host must serve. Newer hosts may
|
|
@@ -35,6 +43,27 @@ export declare const FEDERATED_ANALYTICS_REQUIRED_FUNCTIONS: Readonly<{
|
|
|
35
43
|
readonly dataCoverage: "dataCoverage";
|
|
36
44
|
}>;
|
|
37
45
|
export declare const FEDERATED_ANALYTICS_REQUIRED_CAPABILITIES: readonly ["siteSummaries", "overview", "liveVisitors", "sessions", "sessionJourney", "conversions", "visitorJourney", "goals", "funnels", "affiliates", "dataCoverage"];
|
|
46
|
+
/**
|
|
47
|
+
* The optional configuration surface behind the `configure` capability. Every
|
|
48
|
+
* function here requires the configure permission on the token and on the
|
|
49
|
+
* host's grant; a host that keeps its grants read-only never runs them.
|
|
50
|
+
*/
|
|
51
|
+
export declare const FEDERATED_ANALYTICS_CONFIGURE_FUNCTIONS: Readonly<{
|
|
52
|
+
readonly siteSettings: "siteSettings";
|
|
53
|
+
readonly updateSite: "updateSite";
|
|
54
|
+
readonly listGoals: "listGoals";
|
|
55
|
+
readonly upsertGoal: "upsertGoal";
|
|
56
|
+
readonly removeGoal: "removeGoal";
|
|
57
|
+
readonly listFunnels: "listFunnels";
|
|
58
|
+
readonly upsertFunnel: "upsertFunnel";
|
|
59
|
+
readonly removeFunnel: "removeFunnel";
|
|
60
|
+
readonly listAffiliates: "listAffiliates";
|
|
61
|
+
readonly upsertAffiliate: "upsertAffiliate";
|
|
62
|
+
readonly removeAffiliate: "removeAffiliate";
|
|
63
|
+
readonly retentionStatus: "retentionStatus";
|
|
64
|
+
readonly setRetentionPolicy: "setRetentionPolicy";
|
|
65
|
+
readonly disableRetentionPolicy: "disableRetentionPolicy";
|
|
66
|
+
}>;
|
|
38
67
|
export declare const FEDERATED_ANALYTICS_CONNECTOR_MANIFEST: Readonly<{
|
|
39
68
|
readonly protocol: "amage-rastro-analytics";
|
|
40
69
|
readonly protocolVersion: 1;
|
|
@@ -53,10 +82,24 @@ export declare const FEDERATED_ANALYTICS_CONNECTOR_MANIFEST: Readonly<{
|
|
|
53
82
|
readonly funnelsReport: "funnelsReport";
|
|
54
83
|
readonly affiliatesReport: "affiliatesReport";
|
|
55
84
|
readonly dataCoverage: "dataCoverage";
|
|
85
|
+
readonly siteSettings: "siteSettings";
|
|
86
|
+
readonly updateSite: "updateSite";
|
|
87
|
+
readonly listGoals: "listGoals";
|
|
88
|
+
readonly upsertGoal: "upsertGoal";
|
|
89
|
+
readonly removeGoal: "removeGoal";
|
|
90
|
+
readonly listFunnels: "listFunnels";
|
|
91
|
+
readonly upsertFunnel: "upsertFunnel";
|
|
92
|
+
readonly removeFunnel: "removeFunnel";
|
|
93
|
+
readonly listAffiliates: "listAffiliates";
|
|
94
|
+
readonly upsertAffiliate: "upsertAffiliate";
|
|
95
|
+
readonly removeAffiliate: "removeAffiliate";
|
|
96
|
+
readonly retentionStatus: "retentionStatus";
|
|
97
|
+
readonly setRetentionPolicy: "setRetentionPolicy";
|
|
98
|
+
readonly disableRetentionPolicy: "disableRetentionPolicy";
|
|
56
99
|
readonly vitalsReport: "vitalsReport";
|
|
57
100
|
readonly siteMap: "siteMap";
|
|
58
101
|
}>;
|
|
59
|
-
readonly capabilities: readonly ["siteSummaries", "overview", "liveVisitors", "sessions", "sessionJourney", "conversions", "visitorJourney", "goals", "funnels", "affiliates", "dataCoverage", "vitals", "siteMap"];
|
|
102
|
+
readonly capabilities: readonly ["siteSummaries", "overview", "liveVisitors", "sessions", "sessionJourney", "conversions", "visitorJourney", "goals", "funnels", "affiliates", "dataCoverage", "vitals", "siteMap", "localDays", "configure"];
|
|
60
103
|
readonly limits: Readonly<{
|
|
61
104
|
readonly maxSitesPerRequest: 10;
|
|
62
105
|
readonly maxSitesPerConnection: 10;
|
|
@@ -67,11 +110,18 @@ export declare const FEDERATED_ANALYTICS_CONNECTOR_MANIFEST: Readonly<{
|
|
|
67
110
|
}>;
|
|
68
111
|
export type FederatedAnalyticsErrorCode = (typeof FEDERATED_ANALYTICS_ERROR_CODES)[keyof typeof FEDERATED_ANALYTICS_ERROR_CODES];
|
|
69
112
|
export type FederatedAnalyticsCapability = (typeof FEDERATED_ANALYTICS_CONNECTOR_MANIFEST.capabilities)[number];
|
|
113
|
+
export type FederatedAnalyticsPermission = (typeof FEDERATED_ANALYTICS_PERMISSIONS)[number];
|
|
70
114
|
export type FederatedAnalyticsManifest = ReturnType<typeof createFederatedAnalyticsManifest>;
|
|
71
115
|
export interface FederatedAnalyticsConnection {
|
|
72
116
|
connectionId: string;
|
|
73
117
|
organizationId: string;
|
|
74
118
|
siteIds: readonly string[];
|
|
119
|
+
/**
|
|
120
|
+
* What the host lets this connection do. Absent means read only; listing
|
|
121
|
+
* `analytics:configure` lets owners and admins of the dashboard organization
|
|
122
|
+
* manage goals, funnels, affiliates, site settings, and retention.
|
|
123
|
+
*/
|
|
124
|
+
permissions?: readonly FederatedAnalyticsPermission[];
|
|
75
125
|
revokedAt?: number;
|
|
76
126
|
}
|
|
77
127
|
export interface FederatedAnalyticsIdentity {
|
|
@@ -85,34 +135,65 @@ export interface FederatedSiteSummary {
|
|
|
85
135
|
currency: string;
|
|
86
136
|
timezone: string | null;
|
|
87
137
|
cookieless: boolean;
|
|
138
|
+
/**
|
|
139
|
+
* The site's calendar days, when the host keeps them (alpha.11): the
|
|
140
|
+
* timezone its daily overview buckets follow and the instant from which
|
|
141
|
+
* they are complete. `null` for a site without a timezone, or whose zone
|
|
142
|
+
* never leaves UTC. Hosts before alpha.11 omit the field.
|
|
143
|
+
*/
|
|
144
|
+
localDays: {
|
|
145
|
+
timezone: string;
|
|
146
|
+
since: number;
|
|
147
|
+
} | null;
|
|
88
148
|
}
|
|
89
149
|
export interface FederatedAnalyticsConnectionStatus {
|
|
90
150
|
status: "connected";
|
|
91
151
|
protocolVersion: 1;
|
|
92
152
|
capabilities: FederatedAnalyticsCapability[];
|
|
153
|
+
/** The permissions both the token and the host's grant agree on. */
|
|
154
|
+
permissions: FederatedAnalyticsPermission[];
|
|
93
155
|
siteCount: number;
|
|
94
156
|
}
|
|
157
|
+
/** A resolved connection plus the permissions this request may act with. */
|
|
158
|
+
export type AuthorizedFederatedAnalyticsConnection = FederatedAnalyticsConnection & {
|
|
159
|
+
effectivePermissions: FederatedAnalyticsPermission[];
|
|
160
|
+
};
|
|
95
161
|
export type ResolveFederatedAnalyticsConnection = (ctx: AnalyticsAuthorizationContext, identity: FederatedAnalyticsIdentity) => FederatedAnalyticsConnection | null | Promise<FederatedAnalyticsConnection | null>;
|
|
96
162
|
export interface FederatedAnalyticsAuthorizerOptions {
|
|
97
163
|
issuer: string;
|
|
98
164
|
resolveConnection: ResolveFederatedAnalyticsConnection;
|
|
99
165
|
}
|
|
166
|
+
export declare const federatedAnalyticsPermissionValidator: import("convex/values").VUnion<"analytics:configure" | "analytics:read", [import("convex/values").VLiteral<"analytics:read", "required">, import("convex/values").VLiteral<"analytics:configure", "required">], "required", never>;
|
|
100
167
|
export declare const federatedAnalyticsManifestValidator: import("convex/values").VObject<{
|
|
101
|
-
capabilities: ("affiliates" | "conversions" | "dataCoverage" | "funnels" | "goals" | "liveVisitors" | "overview" | "sessionJourney" | "sessions" | "siteMap" | "siteSummaries" | "visitorJourney" | "vitals")[];
|
|
168
|
+
capabilities: ("affiliates" | "configure" | "conversions" | "dataCoverage" | "funnels" | "goals" | "liveVisitors" | "localDays" | "overview" | "sessionJourney" | "sessions" | "siteMap" | "siteSummaries" | "visitorJourney" | "vitals")[];
|
|
102
169
|
functions: {
|
|
103
170
|
affiliatesReport: "affiliatesReport";
|
|
104
171
|
connectionStatus: "connectionStatus";
|
|
105
172
|
dataCoverage: "dataCoverage";
|
|
173
|
+
disableRetentionPolicy: "disableRetentionPolicy";
|
|
106
174
|
funnelsReport: "funnelsReport";
|
|
107
175
|
goalsReport: "goalsReport";
|
|
176
|
+
listAffiliates: "listAffiliates";
|
|
108
177
|
listConversions: "listConversions";
|
|
178
|
+
listFunnels: "listFunnels";
|
|
179
|
+
listGoals: "listGoals";
|
|
109
180
|
listSessions: "listSessions";
|
|
110
181
|
listSites: "listSites";
|
|
111
182
|
liveVisitors: "liveVisitors";
|
|
112
183
|
manifest: "manifest";
|
|
113
184
|
overview: "overview";
|
|
185
|
+
removeAffiliate: "removeAffiliate";
|
|
186
|
+
removeFunnel: "removeFunnel";
|
|
187
|
+
removeGoal: "removeGoal";
|
|
188
|
+
retentionStatus: "retentionStatus";
|
|
114
189
|
sessionJourney: "sessionJourney";
|
|
190
|
+
setRetentionPolicy: "setRetentionPolicy";
|
|
115
191
|
siteMap: "siteMap";
|
|
192
|
+
siteSettings: "siteSettings";
|
|
193
|
+
updateSite: "updateSite";
|
|
194
|
+
upsertAffiliate: "upsertAffiliate";
|
|
195
|
+
upsertFunnel: "upsertFunnel";
|
|
196
|
+
upsertGoal: "upsertGoal";
|
|
116
197
|
visitorJourney: "visitorJourney";
|
|
117
198
|
vitalsReport: "vitalsReport";
|
|
118
199
|
};
|
|
@@ -134,16 +215,30 @@ export declare const federatedAnalyticsManifestValidator: import("convex/values"
|
|
|
134
215
|
affiliatesReport: "affiliatesReport";
|
|
135
216
|
connectionStatus: "connectionStatus";
|
|
136
217
|
dataCoverage: "dataCoverage";
|
|
218
|
+
disableRetentionPolicy: "disableRetentionPolicy";
|
|
137
219
|
funnelsReport: "funnelsReport";
|
|
138
220
|
goalsReport: "goalsReport";
|
|
221
|
+
listAffiliates: "listAffiliates";
|
|
139
222
|
listConversions: "listConversions";
|
|
223
|
+
listFunnels: "listFunnels";
|
|
224
|
+
listGoals: "listGoals";
|
|
140
225
|
listSessions: "listSessions";
|
|
141
226
|
listSites: "listSites";
|
|
142
227
|
liveVisitors: "liveVisitors";
|
|
143
228
|
manifest: "manifest";
|
|
144
229
|
overview: "overview";
|
|
230
|
+
removeAffiliate: "removeAffiliate";
|
|
231
|
+
removeFunnel: "removeFunnel";
|
|
232
|
+
removeGoal: "removeGoal";
|
|
233
|
+
retentionStatus: "retentionStatus";
|
|
145
234
|
sessionJourney: "sessionJourney";
|
|
235
|
+
setRetentionPolicy: "setRetentionPolicy";
|
|
146
236
|
siteMap: "siteMap";
|
|
237
|
+
siteSettings: "siteSettings";
|
|
238
|
+
updateSite: "updateSite";
|
|
239
|
+
upsertAffiliate: "upsertAffiliate";
|
|
240
|
+
upsertFunnel: "upsertFunnel";
|
|
241
|
+
upsertGoal: "upsertGoal";
|
|
147
242
|
visitorJourney: "visitorJourney";
|
|
148
243
|
vitalsReport: "vitalsReport";
|
|
149
244
|
}, {
|
|
@@ -162,8 +257,22 @@ export declare const federatedAnalyticsManifestValidator: import("convex/values"
|
|
|
162
257
|
dataCoverage: import("convex/values").VLiteral<"dataCoverage", "required">;
|
|
163
258
|
vitalsReport: import("convex/values").VLiteral<"vitalsReport", "required">;
|
|
164
259
|
siteMap: import("convex/values").VLiteral<"siteMap", "required">;
|
|
165
|
-
|
|
166
|
-
|
|
260
|
+
siteSettings: import("convex/values").VLiteral<"siteSettings", "required">;
|
|
261
|
+
updateSite: import("convex/values").VLiteral<"updateSite", "required">;
|
|
262
|
+
listGoals: import("convex/values").VLiteral<"listGoals", "required">;
|
|
263
|
+
upsertGoal: import("convex/values").VLiteral<"upsertGoal", "required">;
|
|
264
|
+
removeGoal: import("convex/values").VLiteral<"removeGoal", "required">;
|
|
265
|
+
listFunnels: import("convex/values").VLiteral<"listFunnels", "required">;
|
|
266
|
+
upsertFunnel: import("convex/values").VLiteral<"upsertFunnel", "required">;
|
|
267
|
+
removeFunnel: import("convex/values").VLiteral<"removeFunnel", "required">;
|
|
268
|
+
listAffiliates: import("convex/values").VLiteral<"listAffiliates", "required">;
|
|
269
|
+
upsertAffiliate: import("convex/values").VLiteral<"upsertAffiliate", "required">;
|
|
270
|
+
removeAffiliate: import("convex/values").VLiteral<"removeAffiliate", "required">;
|
|
271
|
+
retentionStatus: import("convex/values").VLiteral<"retentionStatus", "required">;
|
|
272
|
+
setRetentionPolicy: import("convex/values").VLiteral<"setRetentionPolicy", "required">;
|
|
273
|
+
disableRetentionPolicy: import("convex/values").VLiteral<"disableRetentionPolicy", "required">;
|
|
274
|
+
}, "required", "affiliatesReport" | "connectionStatus" | "dataCoverage" | "disableRetentionPolicy" | "funnelsReport" | "goalsReport" | "listAffiliates" | "listConversions" | "listFunnels" | "listGoals" | "listSessions" | "listSites" | "liveVisitors" | "manifest" | "overview" | "removeAffiliate" | "removeFunnel" | "removeGoal" | "retentionStatus" | "sessionJourney" | "setRetentionPolicy" | "siteMap" | "siteSettings" | "updateSite" | "upsertAffiliate" | "upsertFunnel" | "upsertGoal" | "visitorJourney" | "vitalsReport">;
|
|
275
|
+
capabilities: import("convex/values").VArray<("affiliates" | "configure" | "conversions" | "dataCoverage" | "funnels" | "goals" | "liveVisitors" | "localDays" | "overview" | "sessionJourney" | "sessions" | "siteMap" | "siteSummaries" | "visitorJourney" | "vitals")[], import("convex/values").VUnion<"affiliates" | "configure" | "conversions" | "dataCoverage" | "funnels" | "goals" | "liveVisitors" | "localDays" | "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">, import("convex/values").VLiteral<"localDays", "required">, import("convex/values").VLiteral<"configure", "required">], "required", never>, "required">;
|
|
167
276
|
limits: import("convex/values").VObject<{
|
|
168
277
|
maxJourneyEvents: number;
|
|
169
278
|
maxLiveVisitors: number;
|
|
@@ -177,21 +286,33 @@ export declare const federatedAnalyticsManifestValidator: import("convex/values"
|
|
|
177
286
|
maxLiveVisitors: import("convex/values").VFloat64<number, "required">;
|
|
178
287
|
maxJourneyEvents: import("convex/values").VFloat64<number, "required">;
|
|
179
288
|
}, "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">;
|
|
289
|
+
}, "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.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
290
|
export declare const federatedAnalyticsConnectionStatusValidator: import("convex/values").VObject<{
|
|
182
|
-
capabilities: ("affiliates" | "conversions" | "dataCoverage" | "funnels" | "goals" | "liveVisitors" | "overview" | "sessionJourney" | "sessions" | "siteMap" | "siteSummaries" | "visitorJourney" | "vitals")[];
|
|
291
|
+
capabilities: ("affiliates" | "configure" | "conversions" | "dataCoverage" | "funnels" | "goals" | "liveVisitors" | "localDays" | "overview" | "sessionJourney" | "sessions" | "siteMap" | "siteSummaries" | "visitorJourney" | "vitals")[];
|
|
292
|
+
permissions: ("analytics:configure" | "analytics:read")[];
|
|
183
293
|
protocolVersion: 1;
|
|
184
294
|
siteCount: number;
|
|
185
295
|
status: "connected";
|
|
186
296
|
}, {
|
|
187
297
|
status: import("convex/values").VLiteral<"connected", "required">;
|
|
188
298
|
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">;
|
|
299
|
+
capabilities: import("convex/values").VArray<("affiliates" | "configure" | "conversions" | "dataCoverage" | "funnels" | "goals" | "liveVisitors" | "localDays" | "overview" | "sessionJourney" | "sessions" | "siteMap" | "siteSummaries" | "visitorJourney" | "vitals")[], import("convex/values").VUnion<"affiliates" | "configure" | "conversions" | "dataCoverage" | "funnels" | "goals" | "liveVisitors" | "localDays" | "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">, import("convex/values").VLiteral<"localDays", "required">, import("convex/values").VLiteral<"configure", "required">], "required", never>, "required">;
|
|
300
|
+
permissions: import("convex/values").VArray<("analytics:configure" | "analytics:read")[], import("convex/values").VUnion<"analytics:configure" | "analytics:read", [import("convex/values").VLiteral<"analytics:read", "required">, import("convex/values").VLiteral<"analytics:configure", "required">], "required", never>, "required">;
|
|
190
301
|
siteCount: import("convex/values").VFloat64<number, "required">;
|
|
191
|
-
}, "required", "capabilities" | "protocolVersion" | "siteCount" | "status">;
|
|
302
|
+
}, "required", "capabilities" | "permissions" | "protocolVersion" | "siteCount" | "status">;
|
|
303
|
+
/**
|
|
304
|
+
* The permissions a request may act with: those the token claims that the
|
|
305
|
+
* host's grant also lists. Reading needs no listing — a grant is a read grant
|
|
306
|
+
* by definition — so the read permission is always present.
|
|
307
|
+
*/
|
|
308
|
+
export declare function effectiveFederatedPermissions(claimed: readonly string[], connection: Pick<FederatedAnalyticsConnection, "permissions">): FederatedAnalyticsPermission[];
|
|
192
309
|
export declare const federatedSiteSummaryValidator: import("convex/values").VObject<{
|
|
193
310
|
cookieless: boolean;
|
|
194
311
|
currency: string;
|
|
312
|
+
localDays: {
|
|
313
|
+
since: number;
|
|
314
|
+
timezone: string;
|
|
315
|
+
} | null;
|
|
195
316
|
name: string;
|
|
196
317
|
siteId: string;
|
|
197
318
|
timezone: string | null;
|
|
@@ -201,7 +322,17 @@ export declare const federatedSiteSummaryValidator: import("convex/values").VObj
|
|
|
201
322
|
currency: import("convex/values").VString<string, "required">;
|
|
202
323
|
timezone: import("convex/values").VUnion<string | null, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "required", never>;
|
|
203
324
|
cookieless: import("convex/values").VBoolean<boolean, "required">;
|
|
204
|
-
|
|
325
|
+
localDays: import("convex/values").VUnion<{
|
|
326
|
+
since: number;
|
|
327
|
+
timezone: string;
|
|
328
|
+
} | null, [import("convex/values").VObject<{
|
|
329
|
+
since: number;
|
|
330
|
+
timezone: string;
|
|
331
|
+
}, {
|
|
332
|
+
timezone: import("convex/values").VString<string, "required">;
|
|
333
|
+
since: import("convex/values").VFloat64<number, "required">;
|
|
334
|
+
}, "required", "since" | "timezone">, import("convex/values").VNull<null, "required">], "required", "since" | "timezone">;
|
|
335
|
+
}, "required", "cookieless" | "currency" | "localDays" | "localDays.since" | "localDays.timezone" | "name" | "siteId" | "timezone">;
|
|
205
336
|
export declare function createFederatedAnalyticsManifest(): {
|
|
206
337
|
protocol: "amage-rastro-analytics";
|
|
207
338
|
protocolVersion: 1;
|
|
@@ -220,10 +351,24 @@ export declare function createFederatedAnalyticsManifest(): {
|
|
|
220
351
|
funnelsReport: "funnelsReport";
|
|
221
352
|
affiliatesReport: "affiliatesReport";
|
|
222
353
|
dataCoverage: "dataCoverage";
|
|
354
|
+
siteSettings: "siteSettings";
|
|
355
|
+
updateSite: "updateSite";
|
|
356
|
+
listGoals: "listGoals";
|
|
357
|
+
upsertGoal: "upsertGoal";
|
|
358
|
+
removeGoal: "removeGoal";
|
|
359
|
+
listFunnels: "listFunnels";
|
|
360
|
+
upsertFunnel: "upsertFunnel";
|
|
361
|
+
removeFunnel: "removeFunnel";
|
|
362
|
+
listAffiliates: "listAffiliates";
|
|
363
|
+
upsertAffiliate: "upsertAffiliate";
|
|
364
|
+
removeAffiliate: "removeAffiliate";
|
|
365
|
+
retentionStatus: "retentionStatus";
|
|
366
|
+
setRetentionPolicy: "setRetentionPolicy";
|
|
367
|
+
disableRetentionPolicy: "disableRetentionPolicy";
|
|
223
368
|
vitalsReport: "vitalsReport";
|
|
224
369
|
siteMap: "siteMap";
|
|
225
370
|
};
|
|
226
|
-
capabilities: ("affiliates" | "conversions" | "dataCoverage" | "funnels" | "goals" | "liveVisitors" | "overview" | "sessionJourney" | "sessions" | "siteMap" | "siteSummaries" | "visitorJourney" | "vitals")[];
|
|
371
|
+
capabilities: ("affiliates" | "configure" | "conversions" | "dataCoverage" | "funnels" | "goals" | "liveVisitors" | "localDays" | "overview" | "sessionJourney" | "sessions" | "siteMap" | "siteSummaries" | "visitorJourney" | "vitals")[];
|
|
227
372
|
limits: {
|
|
228
373
|
maxSitesPerRequest: 10;
|
|
229
374
|
maxSitesPerConnection: 10;
|
|
@@ -232,5 +377,5 @@ export declare function createFederatedAnalyticsManifest(): {
|
|
|
232
377
|
maxJourneyEvents: 500;
|
|
233
378
|
};
|
|
234
379
|
};
|
|
235
|
-
export declare function createFederatedAnalyticsConnectionAuthorizer(options: FederatedAnalyticsAuthorizerOptions): (ctx: AnalyticsAuthorizationContext, requestedSiteIds?: readonly string[]) => Promise<
|
|
380
|
+
export declare function createFederatedAnalyticsConnectionAuthorizer(options: FederatedAnalyticsAuthorizerOptions): (ctx: AnalyticsAuthorizationContext, requestedSiteIds?: readonly string[], requiredPermission?: FederatedAnalyticsPermission) => Promise<AuthorizedFederatedAnalyticsConnection>;
|
|
236
381
|
//# 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;
|
|
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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,YAAY;oBACZ,YAAY;qBACX,aAAa;sBACZ,cAAc;sBACd,cAAc;wBACZ,gBAAgB;yBACf,iBAAiB;yBACjB,iBAAiB;yBACjB,iBAAiB;4BACd,oBAAoB;gCAChB,wBAAwB;sBAIlC,cAAc;iBACnB,SAAS;;;;;;;;;;EAyNnB;AAED,wBAAgB,4CAA4C,CAC1D,OAAO,EAAE,mCAAmC,SAUrC,6BAA6B,qBACf,SAAS,MAAM,EAAE,uBAChB,4BAA4B,KAC/C,OAAO,CAAC,sCAAsC,CAAC,CA0FnD"}
|
|
@@ -6,6 +6,16 @@ export const FEDERATED_ANALYTICS_CLAIMS = Object.freeze({
|
|
|
6
6
|
permissions: "rastro_permissions",
|
|
7
7
|
});
|
|
8
8
|
export const FEDERATED_ANALYTICS_READ_PERMISSION = "analytics:read";
|
|
9
|
+
/**
|
|
10
|
+
* The opt-in write scope. A token carries it only for organization owners and
|
|
11
|
+
* admins, and a host honors it only when its local grant lists it too: both
|
|
12
|
+
* sides must agree before any configuration function runs.
|
|
13
|
+
*/
|
|
14
|
+
export const FEDERATED_ANALYTICS_CONFIGURE_PERMISSION = "analytics:configure";
|
|
15
|
+
export const FEDERATED_ANALYTICS_PERMISSIONS = Object.freeze([
|
|
16
|
+
FEDERATED_ANALYTICS_READ_PERMISSION,
|
|
17
|
+
FEDERATED_ANALYTICS_CONFIGURE_PERMISSION,
|
|
18
|
+
]);
|
|
9
19
|
export const FEDERATED_ANALYTICS_ERROR_CODES = Object.freeze({
|
|
10
20
|
UNAUTHENTICATED: "FEDERATION_UNAUTHENTICATED",
|
|
11
21
|
ISSUER_MISMATCH: "FEDERATION_ISSUER_MISMATCH",
|
|
@@ -13,6 +23,7 @@ export const FEDERATED_ANALYTICS_ERROR_CODES = Object.freeze({
|
|
|
13
23
|
CONNECTION_DENIED: "FEDERATION_CONNECTION_DENIED",
|
|
14
24
|
INVALID_SCOPE: "FEDERATION_INVALID_SCOPE",
|
|
15
25
|
SITE_DENIED: "FEDERATION_SITE_DENIED",
|
|
26
|
+
CONFIGURE_FORBIDDEN: "FEDERATION_CONFIGURE_FORBIDDEN",
|
|
16
27
|
});
|
|
17
28
|
const MAX_CONNECTION_SITE_IDS = MAX_REPORT_SITES;
|
|
18
29
|
/**
|
|
@@ -48,15 +59,41 @@ export const FEDERATED_ANALYTICS_REQUIRED_CAPABILITIES = Object.freeze([
|
|
|
48
59
|
"affiliates",
|
|
49
60
|
"dataCoverage",
|
|
50
61
|
]);
|
|
62
|
+
/**
|
|
63
|
+
* The optional configuration surface behind the `configure` capability. Every
|
|
64
|
+
* function here requires the configure permission on the token and on the
|
|
65
|
+
* host's grant; a host that keeps its grants read-only never runs them.
|
|
66
|
+
*/
|
|
67
|
+
export const FEDERATED_ANALYTICS_CONFIGURE_FUNCTIONS = Object.freeze({
|
|
68
|
+
siteSettings: "siteSettings",
|
|
69
|
+
updateSite: "updateSite",
|
|
70
|
+
listGoals: "listGoals",
|
|
71
|
+
upsertGoal: "upsertGoal",
|
|
72
|
+
removeGoal: "removeGoal",
|
|
73
|
+
listFunnels: "listFunnels",
|
|
74
|
+
upsertFunnel: "upsertFunnel",
|
|
75
|
+
removeFunnel: "removeFunnel",
|
|
76
|
+
listAffiliates: "listAffiliates",
|
|
77
|
+
upsertAffiliate: "upsertAffiliate",
|
|
78
|
+
removeAffiliate: "removeAffiliate",
|
|
79
|
+
retentionStatus: "retentionStatus",
|
|
80
|
+
setRetentionPolicy: "setRetentionPolicy",
|
|
81
|
+
disableRetentionPolicy: "disableRetentionPolicy",
|
|
82
|
+
});
|
|
51
83
|
const FEDERATED_ANALYTICS_FUNCTION_NAMES = Object.freeze({
|
|
52
84
|
...FEDERATED_ANALYTICS_REQUIRED_FUNCTIONS,
|
|
53
85
|
vitalsReport: "vitalsReport",
|
|
54
86
|
siteMap: "siteMap",
|
|
87
|
+
...FEDERATED_ANALYTICS_CONFIGURE_FUNCTIONS,
|
|
55
88
|
});
|
|
56
89
|
const FEDERATED_ANALYTICS_CAPABILITIES = Object.freeze([
|
|
57
90
|
...FEDERATED_ANALYTICS_REQUIRED_CAPABILITIES,
|
|
58
91
|
"vitals",
|
|
59
92
|
"siteMap",
|
|
93
|
+
// The daily overview answers whole calendar days in the site's timezone
|
|
94
|
+
// from its own buckets (alpha.11); dashboards must not require it.
|
|
95
|
+
"localDays",
|
|
96
|
+
"configure",
|
|
60
97
|
]);
|
|
61
98
|
const FEDERATED_ANALYTICS_LIMITS = Object.freeze({
|
|
62
99
|
maxSitesPerRequest: MAX_REPORT_SITES,
|
|
@@ -75,7 +112,8 @@ export const FEDERATED_ANALYTICS_CONNECTOR_MANIFEST = Object.freeze({
|
|
|
75
112
|
});
|
|
76
113
|
const MAX_CLAIM_LENGTH = 128;
|
|
77
114
|
const MAX_PERMISSIONS = 16;
|
|
78
|
-
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("vitals"), v.literal("siteMap"));
|
|
115
|
+
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("vitals"), v.literal("siteMap"), v.literal("localDays"), v.literal("configure"));
|
|
116
|
+
export const federatedAnalyticsPermissionValidator = v.union(v.literal(FEDERATED_ANALYTICS_READ_PERMISSION), v.literal(FEDERATED_ANALYTICS_CONFIGURE_PERMISSION));
|
|
79
117
|
export const federatedAnalyticsManifestValidator = v.object({
|
|
80
118
|
protocol: v.literal(FEDERATED_ANALYTICS_CONNECTOR_MANIFEST.protocol),
|
|
81
119
|
protocolVersion: v.literal(FEDERATED_ANALYTICS_CONNECTOR_MANIFEST.protocolVersion),
|
|
@@ -96,6 +134,20 @@ export const federatedAnalyticsManifestValidator = v.object({
|
|
|
96
134
|
dataCoverage: v.literal("dataCoverage"),
|
|
97
135
|
vitalsReport: v.literal("vitalsReport"),
|
|
98
136
|
siteMap: v.literal("siteMap"),
|
|
137
|
+
siteSettings: v.literal("siteSettings"),
|
|
138
|
+
updateSite: v.literal("updateSite"),
|
|
139
|
+
listGoals: v.literal("listGoals"),
|
|
140
|
+
upsertGoal: v.literal("upsertGoal"),
|
|
141
|
+
removeGoal: v.literal("removeGoal"),
|
|
142
|
+
listFunnels: v.literal("listFunnels"),
|
|
143
|
+
upsertFunnel: v.literal("upsertFunnel"),
|
|
144
|
+
removeFunnel: v.literal("removeFunnel"),
|
|
145
|
+
listAffiliates: v.literal("listAffiliates"),
|
|
146
|
+
upsertAffiliate: v.literal("upsertAffiliate"),
|
|
147
|
+
removeAffiliate: v.literal("removeAffiliate"),
|
|
148
|
+
retentionStatus: v.literal("retentionStatus"),
|
|
149
|
+
setRetentionPolicy: v.literal("setRetentionPolicy"),
|
|
150
|
+
disableRetentionPolicy: v.literal("disableRetentionPolicy"),
|
|
99
151
|
}),
|
|
100
152
|
capabilities: v.array(federatedAnalyticsCapabilityValidator),
|
|
101
153
|
limits: v.object({
|
|
@@ -110,14 +162,26 @@ export const federatedAnalyticsConnectionStatusValidator = v.object({
|
|
|
110
162
|
status: v.literal("connected"),
|
|
111
163
|
protocolVersion: v.literal(1),
|
|
112
164
|
capabilities: v.array(federatedAnalyticsCapabilityValidator),
|
|
165
|
+
permissions: v.array(federatedAnalyticsPermissionValidator),
|
|
113
166
|
siteCount: v.number(),
|
|
114
167
|
});
|
|
168
|
+
/**
|
|
169
|
+
* The permissions a request may act with: those the token claims that the
|
|
170
|
+
* host's grant also lists. Reading needs no listing — a grant is a read grant
|
|
171
|
+
* by definition — so the read permission is always present.
|
|
172
|
+
*/
|
|
173
|
+
export function effectiveFederatedPermissions(claimed, connection) {
|
|
174
|
+
const granted = new Set(connection.permissions ?? []);
|
|
175
|
+
return FEDERATED_ANALYTICS_PERMISSIONS.filter((permission) => permission === FEDERATED_ANALYTICS_READ_PERMISSION ||
|
|
176
|
+
(claimed.includes(permission) && granted.has(permission)));
|
|
177
|
+
}
|
|
115
178
|
export const federatedSiteSummaryValidator = v.object({
|
|
116
179
|
siteId: v.string(),
|
|
117
180
|
name: v.string(),
|
|
118
181
|
currency: v.string(),
|
|
119
182
|
timezone: v.union(v.string(), v.null()),
|
|
120
183
|
cookieless: v.boolean(),
|
|
184
|
+
localDays: v.union(v.object({ timezone: v.string(), since: v.number() }), v.null()),
|
|
121
185
|
});
|
|
122
186
|
export function createFederatedAnalyticsManifest() {
|
|
123
187
|
return {
|
|
@@ -134,7 +198,7 @@ export function createFederatedAnalyticsConnectionAuthorizer(options) {
|
|
|
134
198
|
if (typeof options.resolveConnection !== "function") {
|
|
135
199
|
throw new Error("Federated analytics connection resolver is required");
|
|
136
200
|
}
|
|
137
|
-
return async (ctx, requestedSiteIds) => {
|
|
201
|
+
return async (ctx, requestedSiteIds, requiredPermission = FEDERATED_ANALYTICS_READ_PERMISSION) => {
|
|
138
202
|
const identity = await ctx.auth.getUserIdentity();
|
|
139
203
|
if (!identity) {
|
|
140
204
|
fail(FEDERATED_ANALYTICS_ERROR_CODES.UNAUTHENTICATED, "Federated analytics authentication is required");
|
|
@@ -162,9 +226,18 @@ export function createFederatedAnalyticsConnectionAuthorizer(options) {
|
|
|
162
226
|
connection.organizationId !== organizationId ||
|
|
163
227
|
!isStringArray(connection.siteIds, MAX_CONNECTION_SITE_IDS) ||
|
|
164
228
|
connection.siteIds.length === 0 ||
|
|
165
|
-
new Set(connection.siteIds).size !== connection.siteIds.length
|
|
229
|
+
new Set(connection.siteIds).size !== connection.siteIds.length ||
|
|
230
|
+
(connection.permissions !== undefined &&
|
|
231
|
+
!isPermissionList(connection.permissions))) {
|
|
166
232
|
fail(FEDERATED_ANALYTICS_ERROR_CODES.CONNECTION_DENIED, "Federated analytics connection is not active");
|
|
167
233
|
}
|
|
234
|
+
// The permission is settled before the site scope, so a read-only token
|
|
235
|
+
// probing a configuration function learns nothing about which sites the
|
|
236
|
+
// grant covers.
|
|
237
|
+
const effectivePermissions = effectiveFederatedPermissions(permissions, connection);
|
|
238
|
+
if (!effectivePermissions.includes(requiredPermission)) {
|
|
239
|
+
fail(FEDERATED_ANALYTICS_ERROR_CODES.CONFIGURE_FORBIDDEN, "Federated analytics configuration is not permitted");
|
|
240
|
+
}
|
|
168
241
|
if (requestedSiteIds !== undefined) {
|
|
169
242
|
if (requestedSiteIds.length === 0 ||
|
|
170
243
|
requestedSiteIds.length > MAX_REPORT_SITES ||
|
|
@@ -177,7 +250,7 @@ export function createFederatedAnalyticsConnectionAuthorizer(options) {
|
|
|
177
250
|
fail(FEDERATED_ANALYTICS_ERROR_CODES.SITE_DENIED, "Federated analytics site is not authorized");
|
|
178
251
|
}
|
|
179
252
|
}
|
|
180
|
-
return connection;
|
|
253
|
+
return { ...connection, effectivePermissions };
|
|
181
254
|
};
|
|
182
255
|
}
|
|
183
256
|
function isBoundedClaim(value) {
|
|
@@ -190,6 +263,11 @@ function isStringArray(value, maximumLength) {
|
|
|
190
263
|
value.length <= maximumLength &&
|
|
191
264
|
value.every(isBoundedClaim));
|
|
192
265
|
}
|
|
266
|
+
function isPermissionList(value) {
|
|
267
|
+
return (Array.isArray(value) &&
|
|
268
|
+
value.length <= FEDERATED_ANALYTICS_PERMISSIONS.length &&
|
|
269
|
+
value.every((entry) => FEDERATED_ANALYTICS_PERMISSIONS.includes(entry)));
|
|
270
|
+
}
|
|
193
271
|
function fail(code, message) {
|
|
194
272
|
throw new ConvexError({ code, message });
|
|
195
273
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"federation.js","sourceRoot":"","sources":["../../src/client/federation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EACL,kBAAkB,EA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