diff --git a/api/v1/role/service_connect.ts b/api/v1/role/service_connect.ts index ea754cb..402939b 100644 --- a/api/v1/role/service_connect.ts +++ b/api/v1/role/service_connect.ts @@ -3,7 +3,7 @@ /* eslint-disable */ // @ts-nocheck -import { AssignRequest, AssignResponse, CreateRequest, CreateResponse, DeleteRequest, DeleteResponse, GetRequest, GetResponse, ListRequest, ListResponse, RevokeRequest, RevokeResponse, UpdateRequest, UpdateResponse } from "./service_pb.js"; +import { AssignRequest, AssignResponse, CreateRequest, CreateResponse, DeleteRequest, DeleteResponse, GetRequest, GetResponse, ListForEntityRequest, ListForEntityResponse, ListRequest, ListResponse, RevokeRequest, RevokeResponse, UpdateRequest, UpdateResponse } from "./service_pb.js"; import { MethodKind } from "@bufbuild/protobuf"; /** @@ -91,6 +91,17 @@ export const Service = { O: RevokeResponse, kind: MethodKind.Unary, }, + /** + * List roles for an entity. + * + * @generated from rpc api.v1.role.Service.ListForEntity + */ + listForEntity: { + name: "ListForEntity", + I: ListForEntityRequest, + O: ListForEntityResponse, + kind: MethodKind.Unary, + }, } } as const; diff --git a/api/v1/role/service_pb.ts b/api/v1/role/service_pb.ts index 3170928..e50b2e2 100644 --- a/api/v1/role/service_pb.ts +++ b/api/v1/role/service_pb.ts @@ -8,6 +8,84 @@ import { Message, proto3 } from "@bufbuild/protobuf"; import { EntityID, Permission, Role, Update } from "./role_pb.js"; import { Pagination } from "../../../model/common_pb.js"; +/** + * @generated from message api.v1.role.ListForEntityRequest + */ +export class ListForEntityRequest extends Message { + /** + * The entity to list roles for. + * + * @generated from field: api.v1.role.EntityID entity_id = 1; + */ + entityId?: EntityID; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "api.v1.role.ListForEntityRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "entity_id", kind: "message", T: EntityID }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ListForEntityRequest { + return new ListForEntityRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ListForEntityRequest { + return new ListForEntityRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ListForEntityRequest { + return new ListForEntityRequest().fromJsonString(jsonString, options); + } + + static equals(a: ListForEntityRequest | PlainMessage | undefined, b: ListForEntityRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(ListForEntityRequest, a, b); + } +} + +/** + * @generated from message api.v1.role.ListForEntityResponse + */ +export class ListForEntityResponse extends Message { + /** + * The roles assigned to the entity. + * + * @generated from field: repeated api.v1.role.Role roles = 1; + */ + roles: Role[] = []; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "api.v1.role.ListForEntityResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "roles", kind: "message", T: Role, repeated: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ListForEntityResponse { + return new ListForEntityResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ListForEntityResponse { + return new ListForEntityResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ListForEntityResponse { + return new ListForEntityResponse().fromJsonString(jsonString, options); + } + + static equals(a: ListForEntityResponse | PlainMessage | undefined, b: ListForEntityResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(ListForEntityResponse, a, b); + } +} + /** * Request to create a role. *