From a741a1203b0b79fe7d94b6edf8c1254f001ea7d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Rold=C3=A1n=20Betancort?= Date: Thu, 21 May 2026 18:49:48 +0100 Subject: [PATCH] api(materialize/v0): add at_revision zedtoken to DownloadPermissionSetsResponse DownloadPermissionSetsResponse only exposes the snapshot revision as a Timestamp, so callers wanting to resume into WatchPermissionSets have to either skip the cursor (gap between snapshot and stream) or re-encode the revision from metadata.json themselves. Add an at_revision ZedToken so the snapshot revision can be passed directly to WatchPermissionSets as optional_starting_after. Naming matches PermissionSetChange.at_revision and mirrors the request's optional_at_revision. Regenerate docs/apidocs.swagger.json. --- authzed/api/materialize/v0/watchpermissionsets.proto | 6 ++++++ docs/apidocs.swagger.json | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/authzed/api/materialize/v0/watchpermissionsets.proto b/authzed/api/materialize/v0/watchpermissionsets.proto index 636337e..4be994a 100644 --- a/authzed/api/materialize/v0/watchpermissionsets.proto +++ b/authzed/api/materialize/v0/watchpermissionsets.proto @@ -217,4 +217,10 @@ message DownloadPermissionSetsResponse { // timestamp represents the time associated with the returned data revision. google.protobuf.Timestamp timestamp = 2; + + // at_revision is the snapshot revision the returned files were produced at, + // encoded as a ZedToken. Consumers should pass this token to + // WatchPermissionSets as optional_starting_after to resume the stream + // immediately after the snapshot without leaving gaps in event history. + authzed.api.v1.ZedToken at_revision = 3; } diff --git a/docs/apidocs.swagger.json b/docs/apidocs.swagger.json index ed350c4..a0ce995 100644 --- a/docs/apidocs.swagger.json +++ b/docs/apidocs.swagger.json @@ -1642,6 +1642,10 @@ "type": "string", "format": "date-time", "description": "timestamp represents the time associated with the returned data revision." + }, + "atRevision": { + "$ref": "#/definitions/ZedToken", + "description": "at_revision is the snapshot revision the returned files were produced at,\nencoded as a ZedToken. Consumers should pass this token to\nWatchPermissionSets as optional_starting_after to resume the stream\nimmediately after the snapshot without leaving gaps in event history." } } },