Skip to content

Commit

Permalink
Merge pull request #196 from josephschorr/exp-count
Browse files Browse the repository at this point in the history
Regenerate for experimental count relationships API
  • Loading branch information
josephschorr committed May 9, 2024
2 parents 8b150c4 + 531fdf4 commit 7f367c1
Show file tree
Hide file tree
Showing 11 changed files with 4,258 additions and 1,359 deletions.
2 changes: 1 addition & 1 deletion magefiles/gen.go
Expand Up @@ -24,7 +24,7 @@ func (g Gen) All() error {
const (
ProtoPath = "proto/authzed/api"
BufRepository = "buf.build/authzed/api"
BufTag = "80f6ef8af583b1a4de4ab7957e7f0a6e6ddf2904"
BufTag = "81d767dd7dc1566ebe956a0fabe05254605482d8"
)

// Proto runs proto codegen
Expand Down
148 changes: 148 additions & 0 deletions proto/apidocs.swagger.json
Expand Up @@ -45,6 +45,39 @@
"application/json"
],
"paths": {
"/v1/experimental/countrelationships": {
"post": {
"summary": "EXPERIMENTAL: CountRelationships returns the count of relationships for *pre-registered* filter.",
"operationId": "ExperimentalService_ExperimentalCountRelationships",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1ExperimentalCountRelationshipsResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/v1ExperimentalCountRelationshipsRequest"
}
}
],
"tags": [
"ExperimentalService"
]
}
},
"/v1/experimental/diffschema": {
"post": {
"summary": "EXPERIMENTAL: DiffSchema is an API that allows clients to request the difference between the\nspecified schema and the schema stored in SpiceDB. This is useful for clients that need to\nintrospect the schema of a SpiceDB instance.",
Expand Down Expand Up @@ -211,6 +244,39 @@
]
}
},
"/v1/experimental/registerrelationshipcounter": {
"post": {
"summary": "EXPERIMENTAL: RegisterRelationshipCounter registers a new filter for counting relationships. A filter must be registered before\na count can be requested.",
"operationId": "ExperimentalService_ExperimentalRegisterRelationshipCounter",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1ExperimentalRegisterRelationshipCounterResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/v1ExperimentalRegisterRelationshipCounterRequest"
}
}
],
"tags": [
"ExperimentalService"
]
}
},
"/v1/experimental/relationships/bulkexport": {
"post": {
"summary": "BulkExportRelationships is the fastest path available to exporting\nrelationships from the server. It is resumable, and will return results\nin an order determined by the server.",
Expand Down Expand Up @@ -289,6 +355,39 @@
]
}
},
"/v1/experimental/unregisterrelationshipcounter": {
"post": {
"summary": "EXPERIMENTAL: UnregisterRelationshipCounter unregisters an existing filter for counting relationships.",
"operationId": "ExperimentalService_ExperimentalUnregisterRelationshipCounter",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1ExperimentalUnregisterRelationshipCounterResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/v1ExperimentalUnregisterRelationshipCounterRequest"
}
}
],
"tags": [
"ExperimentalService"
]
}
},
"/v1/permissions/check": {
"post": {
"summary": "CheckPermission determines for a given resource whether a subject computes\nto having a permission or is a direct member of a particular relation.",
Expand Down Expand Up @@ -1937,6 +2036,32 @@
}
}
},
"v1ExperimentalCountRelationshipsRequest": {
"type": "object",
"properties": {
"consistency": {
"$ref": "#/definitions/v1Consistency",
"description": "consistency defines the consistency level for the count operation. If the\nrequested consistency is fully consistent or represents a zedtoken that is\nnot stored in the system, the count will be performed synchronously, which\ncan be *quite slow* for large datasets."
},
"relationshipFilter": {
"$ref": "#/definitions/v1RelationshipFilter",
"description": "relationship_filter defines the filter to be applied to the relationships\nto be counted."
}
}
},
"v1ExperimentalCountRelationshipsResponse": {
"type": "object",
"properties": {
"readAt": {
"$ref": "#/definitions/v1ZedToken",
"title": "read_at is the ZedToken at which the relationship count was performed"
},
"relationshipCount": {
"type": "string",
"format": "uint64"
}
}
},
"v1ExperimentalDependentRelationsRequest": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -2035,6 +2160,29 @@
}
}
},
"v1ExperimentalRegisterRelationshipCounterRequest": {
"type": "object",
"properties": {
"relationshipFilter": {
"$ref": "#/definitions/v1RelationshipFilter",
"description": "relationship_filter defines the filter to be applied to the relationships\nto be counted."
}
}
},
"v1ExperimentalRegisterRelationshipCounterResponse": {
"type": "object"
},
"v1ExperimentalUnregisterRelationshipCounterRequest": {
"type": "object",
"properties": {
"relationshipFilter": {
"$ref": "#/definitions/v1RelationshipFilter"
}
}
},
"v1ExperimentalUnregisterRelationshipCounterResponse": {
"type": "object"
},
"v1LookupPermissionship": {
"type": "string",
"enum": [
Expand Down
2 changes: 1 addition & 1 deletion proto/authzed/api/v0/zz_generated.version.go
Expand Up @@ -2,5 +2,5 @@ package v0

const (
BufRepository = "buf.build/authzed/api"
BufTag = "80f6ef8af583b1a4de4ab7957e7f0a6e6ddf2904"
BufTag = "81d767dd7dc1566ebe956a0fabe05254605482d8"
)
44 changes: 37 additions & 7 deletions proto/authzed/api/v1/error_reason.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7f367c1

Please sign in to comment.