From f411ce93db0ab9b973133fbee9ecb00f5dbe344d Mon Sep 17 00:00:00 2001 From: jakedoublev Date: Wed, 22 May 2024 15:06:29 -0700 Subject: [PATCH 1/4] chore(platform): gencode should generate js and d.ts files --- .gitattributes | 2 + .../authorization/authorization_connect.d.ts | 44 +++ .../authorization/authorization_connect.js | 44 +++ .../authorization/authorization_pb.js | 372 ++++++++++++++++++ lib/src/platform/common/common_pb.js | 58 +++ .../entity_resolution_connect.d.ts | 35 ++ .../entity_resolution_connect.js | 35 ++ .../entityresolution/entity_resolution_pb.js | 139 +++++++ lib/src/platform/kas/kas_connect.d.ts | 59 +++ lib/src/platform/kas/kas_connect.js | 59 +++ lib/src/platform/kas/kas_pb.js | 84 ++++ .../policy/attributes/attributes_connect.d.ts | 168 ++++++++ .../policy/attributes/attributes_connect.js | 168 ++++++++ .../policy/attributes/attributes_pb.js | 363 +++++++++++++++++ .../key_access_server_registry_connect.d.ts | 62 +++ .../key_access_server_registry_connect.js | 62 +++ .../key_access_server_registry_pb.js | 113 ++++++ .../policy/namespaces/namespaces_connect.d.ts | 62 +++ .../policy/namespaces/namespaces_connect.js | 62 +++ .../policy/namespaces/namespaces_pb.js | 110 ++++++ lib/src/platform/policy/objects_pb.js | 288 ++++++++++++++ .../resource_mapping_connect.d.ts | 259 ++++++++++++ .../resource_mapping_connect.js | 259 ++++++++++++ .../resourcemapping/resource_mapping_pb.js | 142 +++++++ lib/src/platform/policy/selectors_pb.js | 110 ++++++ .../subject_mapping_connect.d.ts | 118 ++++++ .../subjectmapping/subject_mapping_connect.js | 118 ++++++ .../subjectmapping/subject_mapping_pb.js | 260 ++++++++++++ .../wellknown_configuration_connect.d.ts | 26 ++ .../wellknown_configuration_connect.js | 26 ++ .../wellknown_configuration_pb.js | 35 ++ 31 files changed, 3742 insertions(+) create mode 100644 .gitattributes create mode 100644 lib/src/platform/authorization/authorization_connect.d.ts create mode 100644 lib/src/platform/authorization/authorization_connect.js create mode 100644 lib/src/platform/authorization/authorization_pb.js create mode 100644 lib/src/platform/common/common_pb.js create mode 100644 lib/src/platform/entityresolution/entity_resolution_connect.d.ts create mode 100644 lib/src/platform/entityresolution/entity_resolution_connect.js create mode 100644 lib/src/platform/entityresolution/entity_resolution_pb.js create mode 100644 lib/src/platform/kas/kas_connect.d.ts create mode 100644 lib/src/platform/kas/kas_connect.js create mode 100644 lib/src/platform/kas/kas_pb.js create mode 100644 lib/src/platform/policy/attributes/attributes_connect.d.ts create mode 100644 lib/src/platform/policy/attributes/attributes_connect.js create mode 100644 lib/src/platform/policy/attributes/attributes_pb.js create mode 100644 lib/src/platform/policy/kasregistry/key_access_server_registry_connect.d.ts create mode 100644 lib/src/platform/policy/kasregistry/key_access_server_registry_connect.js create mode 100644 lib/src/platform/policy/kasregistry/key_access_server_registry_pb.js create mode 100644 lib/src/platform/policy/namespaces/namespaces_connect.d.ts create mode 100644 lib/src/platform/policy/namespaces/namespaces_connect.js create mode 100644 lib/src/platform/policy/namespaces/namespaces_pb.js create mode 100644 lib/src/platform/policy/objects_pb.js create mode 100644 lib/src/platform/policy/resourcemapping/resource_mapping_connect.d.ts create mode 100644 lib/src/platform/policy/resourcemapping/resource_mapping_connect.js create mode 100644 lib/src/platform/policy/resourcemapping/resource_mapping_pb.js create mode 100644 lib/src/platform/policy/selectors_pb.js create mode 100644 lib/src/platform/policy/subjectmapping/subject_mapping_connect.d.ts create mode 100644 lib/src/platform/policy/subjectmapping/subject_mapping_connect.js create mode 100644 lib/src/platform/policy/subjectmapping/subject_mapping_pb.js create mode 100644 lib/src/platform/wellknownconfiguration/wellknown_configuration_connect.d.ts create mode 100644 lib/src/platform/wellknownconfiguration/wellknown_configuration_connect.js create mode 100644 lib/src/platform/wellknownconfiguration/wellknown_configuration_pb.js diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..92ff7c43 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# collapses proto gencode in PR diffs by default +lib/src/platform/** linguist-generated=true \ No newline at end of file diff --git a/lib/src/platform/authorization/authorization_connect.d.ts b/lib/src/platform/authorization/authorization_connect.d.ts new file mode 100644 index 00000000..a0697e77 --- /dev/null +++ b/lib/src/platform/authorization/authorization_connect.d.ts @@ -0,0 +1,44 @@ +// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=js+dts,import_extension=none" +// @generated from file authorization/authorization.proto (package authorization, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { GetDecisionsByTokenRequest, GetDecisionsByTokenResponse, GetDecisionsRequest, GetDecisionsResponse, GetEntitlementsRequest, GetEntitlementsResponse } from "./authorization_pb"; +import { MethodKind } from "@bufbuild/protobuf"; + +/** + * @generated from service authorization.AuthorizationService + */ +export declare const AuthorizationService: { + readonly typeName: "authorization.AuthorizationService", + readonly methods: { + /** + * @generated from rpc authorization.AuthorizationService.GetDecisions + */ + readonly getDecisions: { + readonly name: "GetDecisions", + readonly I: typeof GetDecisionsRequest, + readonly O: typeof GetDecisionsResponse, + readonly kind: MethodKind.Unary, + }, + /** + * @generated from rpc authorization.AuthorizationService.GetDecisionsByToken + */ + readonly getDecisionsByToken: { + readonly name: "GetDecisionsByToken", + readonly I: typeof GetDecisionsByTokenRequest, + readonly O: typeof GetDecisionsByTokenResponse, + readonly kind: MethodKind.Unary, + }, + /** + * @generated from rpc authorization.AuthorizationService.GetEntitlements + */ + readonly getEntitlements: { + readonly name: "GetEntitlements", + readonly I: typeof GetEntitlementsRequest, + readonly O: typeof GetEntitlementsResponse, + readonly kind: MethodKind.Unary, + }, + } +}; + diff --git a/lib/src/platform/authorization/authorization_connect.js b/lib/src/platform/authorization/authorization_connect.js new file mode 100644 index 00000000..6aadbe94 --- /dev/null +++ b/lib/src/platform/authorization/authorization_connect.js @@ -0,0 +1,44 @@ +// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=js+dts,import_extension=none" +// @generated from file authorization/authorization.proto (package authorization, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { GetDecisionsByTokenRequest, GetDecisionsByTokenResponse, GetDecisionsRequest, GetDecisionsResponse, GetEntitlementsRequest, GetEntitlementsResponse } from "./authorization_pb"; +import { MethodKind } from "@bufbuild/protobuf"; + +/** + * @generated from service authorization.AuthorizationService + */ +export const AuthorizationService = { + typeName: "authorization.AuthorizationService", + methods: { + /** + * @generated from rpc authorization.AuthorizationService.GetDecisions + */ + getDecisions: { + name: "GetDecisions", + I: GetDecisionsRequest, + O: GetDecisionsResponse, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc authorization.AuthorizationService.GetDecisionsByToken + */ + getDecisionsByToken: { + name: "GetDecisionsByToken", + I: GetDecisionsByTokenRequest, + O: GetDecisionsByTokenResponse, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc authorization.AuthorizationService.GetEntitlements + */ + getEntitlements: { + name: "GetEntitlements", + I: GetEntitlementsRequest, + O: GetEntitlementsResponse, + kind: MethodKind.Unary, + }, + } +}; + diff --git a/lib/src/platform/authorization/authorization_pb.js b/lib/src/platform/authorization/authorization_pb.js new file mode 100644 index 00000000..a4514d80 --- /dev/null +++ b/lib/src/platform/authorization/authorization_pb.js @@ -0,0 +1,372 @@ +// @generated by protoc-gen-es v1.9.0 with parameter "target=js+dts,import_extension=none" +// @generated from file authorization/authorization.proto (package authorization, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { Any, proto3 } from "@bufbuild/protobuf"; +import { Action } from "../policy/objects_pb"; + +/** + * @generated from message authorization.Token + */ +export const Token = /*@__PURE__*/ proto3.makeMessageType( + "authorization.Token", + () => [ + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "jwt", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * PE (Person Entity) or NPE (Non-Person Entity) + * + * @generated from message authorization.Entity + */ +export const Entity = /*@__PURE__*/ proto3.makeMessageType( + "authorization.Entity", + () => [ + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "email_address", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "entity_type" }, + { no: 3, name: "user_name", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "entity_type" }, + { no: 4, name: "remote_claims_url", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "entity_type" }, + { no: 5, name: "uuid", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "entity_type" }, + { no: 6, name: "claims", kind: "message", T: Any, oneof: "entity_type" }, + { no: 7, name: "custom", kind: "message", T: EntityCustom, oneof: "entity_type" }, + { no: 8, name: "client_id", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "entity_type" }, + ], +); + +/** + * Entity type for custom entities beyond the standard types + * + * @generated from message authorization.EntityCustom + */ +export const EntityCustom = /*@__PURE__*/ proto3.makeMessageType( + "authorization.EntityCustom", + () => [ + { no: 1, name: "extension", kind: "message", T: Any }, + ], +); + +/** + * A set of related PE and NPE + * + * @generated from message authorization.EntityChain + */ +export const EntityChain = /*@__PURE__*/ proto3.makeMessageType( + "authorization.EntityChain", + () => [ + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "entities", kind: "message", T: Entity, repeated: true }, + ], +); + +/** + * + * Example Request Get Decisions to answer the question - Do Bob (represented by entity chain ec1) + * and Alice (represented by entity chain ec2) have TRANSMIT authorization for + * 2 resources; resource1 (attr-set-1) defined by attributes foo:bar resource2 (attr-set-2) defined by attribute foo:bar, color:red ? + * + * { + * "actions": [ + * { + * "standard": "STANDARD_ACTION_TRANSMIT" + * } + * ], + * "entityChains": [ + * { + * "id": "ec1", + * "entities": [ + * { + * "emailAddress": "bob@example.org" + * } + * ] + * }, + * { + * "id": "ec2", + * "entities": [ + * { + * "userName": "alice@example.org" + * } + * ] + * } + * ], + * "resourceAttributes": [ + * { + * "resourceAttributeId": "attr-set-1", + * "attributeFqns": [ + * "https://www.example.org/attr/foo/value/value1" + * ] + * }, + * { + * "resourceAttributeId": "attr-set-2", + * "attributeFqns": [ + * "https://example.net/attr/attr1/value/value1", + * "https://example.net/attr/attr1/value/value2" + * ] + * } + * ] + * } + * + * + * @generated from message authorization.DecisionRequest + */ +export const DecisionRequest = /*@__PURE__*/ proto3.makeMessageType( + "authorization.DecisionRequest", + () => [ + { no: 1, name: "actions", kind: "message", T: Action, repeated: true }, + { no: 2, name: "entity_chains", kind: "message", T: EntityChain, repeated: true }, + { no: 3, name: "resource_attributes", kind: "message", T: ResourceAttribute, repeated: true }, + ], +); + +/** + * + * + * Example response for a Decision Request - Do Bob (represented by entity chain ec1) + * and Alice (represented by entity chain ec2) have TRANSMIT authorization for + * 2 resources; resource1 (attr-set-1) defined by attributes foo:bar resource2 (attr-set-2) defined by attribute foo:bar, color:red ? + * + * Results: + * - bob has permitted authorization to transmit for a resource defined by attr-set-1 attributes and has a watermark obligation + * - bob has denied authorization to transmit a for a resource defined by attr-set-2 attributes + * - alice has permitted authorization to transmit for a resource defined by attr-set-1 attributes + * - alice has denied authorization to transmit a for a resource defined by attr-set-2 attributes + * + * { + * "entityChainId": "ec1", + * "resourceAttributesId": "attr-set-1", + * "decision": "DECISION_PERMIT", + * "obligations": [ + * "http://www.example.org/obligation/watermark" + * ] + * }, + * { + * "entityChainId": "ec1", + * "resourceAttributesId": "attr-set-2", + * "decision": "DECISION_PERMIT" + * }, + * { + * "entityChainId": "ec2", + * "resourceAttributesId": "attr-set-1", + * "decision": "DECISION_PERMIT" + * }, + * { + * "entityChainId": "ec2", + * "resourceAttributesId": "attr-set-2", + * "decision": "DECISION_DENY" + * } + * + * + * + * @generated from message authorization.DecisionResponse + */ +export const DecisionResponse = /*@__PURE__*/ proto3.makeMessageType( + "authorization.DecisionResponse", + () => [ + { no: 1, name: "entity_chain_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "resource_attributes_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "action", kind: "message", T: Action }, + { no: 4, name: "decision", kind: "enum", T: proto3.getEnumType(DecisionResponse_Decision) }, + { no: 5, name: "obligations", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + ], +); + +/** + * @generated from enum authorization.DecisionResponse.Decision + */ +export const DecisionResponse_Decision = /*@__PURE__*/ proto3.makeEnum( + "authorization.DecisionResponse.Decision", + [ + {no: 0, name: "DECISION_UNSPECIFIED", localName: "UNSPECIFIED"}, + {no: 1, name: "DECISION_DENY", localName: "DENY"}, + {no: 2, name: "DECISION_PERMIT", localName: "PERMIT"}, + ], +); + +/** + * @generated from message authorization.GetDecisionsRequest + */ +export const GetDecisionsRequest = /*@__PURE__*/ proto3.makeMessageType( + "authorization.GetDecisionsRequest", + () => [ + { no: 1, name: "decision_requests", kind: "message", T: DecisionRequest, repeated: true }, + ], +); + +/** + * @generated from message authorization.GetDecisionsResponse + */ +export const GetDecisionsResponse = /*@__PURE__*/ proto3.makeMessageType( + "authorization.GetDecisionsResponse", + () => [ + { no: 1, name: "decision_responses", kind: "message", T: DecisionResponse, repeated: true }, + ], +); + +/** + * + * Request to get entitlements for one or more entities for an optional attribute scope + * + * Example: Get entitlements for bob and alice (both represented using an email address + * + * { + * "entities": [ + * { + * "id": "e1", + * "emailAddress": "bob@example.org" + * }, + * { + * "id": "e2", + * "emailAddress": "alice@example.org" + * } + * ], + * "scope": { + * "attributeFqns": [ + * "https://example.net/attr/attr1/value/value1", + * "https://example.net/attr/attr1/value/value2" + * ] + * } + * } + * + * + * @generated from message authorization.GetEntitlementsRequest + */ +export const GetEntitlementsRequest = /*@__PURE__*/ proto3.makeMessageType( + "authorization.GetEntitlementsRequest", + () => [ + { no: 1, name: "entities", kind: "message", T: Entity, repeated: true }, + { no: 2, name: "scope", kind: "message", T: ResourceAttribute, opt: true }, + ], +); + +/** + * @generated from message authorization.EntityEntitlements + */ +export const EntityEntitlements = /*@__PURE__*/ proto3.makeMessageType( + "authorization.EntityEntitlements", + () => [ + { no: 1, name: "entity_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "attribute_value_fqns", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + ], +); + +/** + * A logical bucket of attributes belonging to a "Resource" + * + * @generated from message authorization.ResourceAttribute + */ +export const ResourceAttribute = /*@__PURE__*/ proto3.makeMessageType( + "authorization.ResourceAttribute", + () => [ + { no: 1, name: "resource_attributes_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "attribute_value_fqns", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + ], +); + +/** + * + * + * Example Response for a request of : Get entitlements for bob and alice (both represented using an email address + * + * { + * "entitlements": [ + * { + * "entityId": "e1", + * "attributeValueReferences": [ + * { + * "attributeFqn": "http://www.example.org/attr/foo/value/bar" + * } + * ] + * }, + * { + * "entityId": "e2", + * "attributeValueReferences": [ + * { + * "attributeFqn": "http://www.example.org/attr/color/value/red" + * } + * ] + * } + * ] + * } + * + * + * + * @generated from message authorization.GetEntitlementsResponse + */ +export const GetEntitlementsResponse = /*@__PURE__*/ proto3.makeMessageType( + "authorization.GetEntitlementsResponse", + () => [ + { no: 1, name: "entitlements", kind: "message", T: EntityEntitlements, repeated: true }, + ], +); + +/** + * + * Example Request Get Decisions by Token to answer the question - Do Bob and client1 (represented by token tok1) + * and Alice and client2 (represented by token tok2) have TRANSMIT authorization for + * 2 resources; resource1 (attr-set-1) defined by attributes foo:bar resource2 (attr-set-2) defined by attribute foo:bar, color:red ? + * + * { + * "actions": [ + * { + * "standard": "STANDARD_ACTION_TRANSMIT" + * } + * ], + * "tokens": [ + * { + * "id": "tok1", + * "jwt": .... + * }, + * { + * "id": "tok2", + * "jwt": ..... + * } + * ], + * "resourceAttributes": [ + * { + * "attributeFqns": [ + * "https://www.example.org/attr/foo/value/value1" + * ] + * }, + * { + * "attributeFqns": [ + * "https://example.net/attr/attr1/value/value1", + * "https://example.net/attr/attr1/value/value2" + * ] + * } + * ] + * } + * + * + * @generated from message authorization.TokenDecisionRequest + */ +export const TokenDecisionRequest = /*@__PURE__*/ proto3.makeMessageType( + "authorization.TokenDecisionRequest", + () => [ + { no: 1, name: "actions", kind: "message", T: Action, repeated: true }, + { no: 2, name: "tokens", kind: "message", T: Token, repeated: true }, + { no: 3, name: "resource_attributes", kind: "message", T: ResourceAttribute, repeated: true }, + ], +); + +/** + * @generated from message authorization.GetDecisionsByTokenRequest + */ +export const GetDecisionsByTokenRequest = /*@__PURE__*/ proto3.makeMessageType( + "authorization.GetDecisionsByTokenRequest", + () => [ + { no: 1, name: "decision_requests", kind: "message", T: TokenDecisionRequest, repeated: true }, + ], +); + +/** + * @generated from message authorization.GetDecisionsByTokenResponse + */ +export const GetDecisionsByTokenResponse = /*@__PURE__*/ proto3.makeMessageType( + "authorization.GetDecisionsByTokenResponse", + () => [ + { no: 1, name: "decision_responses", kind: "message", T: DecisionResponse, repeated: true }, + ], +); + diff --git a/lib/src/platform/common/common_pb.js b/lib/src/platform/common/common_pb.js new file mode 100644 index 00000000..2876f261 --- /dev/null +++ b/lib/src/platform/common/common_pb.js @@ -0,0 +1,58 @@ +// @generated by protoc-gen-es v1.9.0 with parameter "target=js+dts,import_extension=none" +// @generated from file common/common.proto (package common, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { proto3, Timestamp } from "@bufbuild/protobuf"; + +/** + * @generated from enum common.MetadataUpdateEnum + */ +export const MetadataUpdateEnum = /*@__PURE__*/ proto3.makeEnum( + "common.MetadataUpdateEnum", + [ + {no: 0, name: "METADATA_UPDATE_ENUM_UNSPECIFIED", localName: "UNSPECIFIED"}, + {no: 1, name: "METADATA_UPDATE_ENUM_EXTEND", localName: "EXTEND"}, + {no: 2, name: "METADATA_UPDATE_ENUM_REPLACE", localName: "REPLACE"}, + ], +); + +/** + * buflint ENUM_VALUE_PREFIX: to make sure that C++ scoping rules aren't violated when users add new enum values to an enum in a given package + * + * @generated from enum common.ActiveStateEnum + */ +export const ActiveStateEnum = /*@__PURE__*/ proto3.makeEnum( + "common.ActiveStateEnum", + [ + {no: 0, name: "ACTIVE_STATE_ENUM_UNSPECIFIED", localName: "UNSPECIFIED"}, + {no: 1, name: "ACTIVE_STATE_ENUM_ACTIVE", localName: "ACTIVE"}, + {no: 2, name: "ACTIVE_STATE_ENUM_INACTIVE", localName: "INACTIVE"}, + {no: 3, name: "ACTIVE_STATE_ENUM_ANY", localName: "ANY"}, + ], +); + +/** + * Struct to uniquely identify a resource with optional additional metadata + * + * @generated from message common.Metadata + */ +export const Metadata = /*@__PURE__*/ proto3.makeMessageType( + "common.Metadata", + () => [ + { no: 1, name: "created_at", kind: "message", T: Timestamp }, + { no: 2, name: "updated_at", kind: "message", T: Timestamp }, + { no: 3, name: "labels", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} }, + ], +); + +/** + * @generated from message common.MetadataMutable + */ +export const MetadataMutable = /*@__PURE__*/ proto3.makeMessageType( + "common.MetadataMutable", + () => [ + { no: 3, name: "labels", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} }, + ], +); + diff --git a/lib/src/platform/entityresolution/entity_resolution_connect.d.ts b/lib/src/platform/entityresolution/entity_resolution_connect.d.ts new file mode 100644 index 00000000..7cba8026 --- /dev/null +++ b/lib/src/platform/entityresolution/entity_resolution_connect.d.ts @@ -0,0 +1,35 @@ +// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=js+dts,import_extension=none" +// @generated from file entityresolution/entity_resolution.proto (package entityresolution, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { CreateEntityChainFromJwtRequest, CreateEntityChainFromJwtResponse, ResolveEntitiesRequest, ResolveEntitiesResponse } from "./entity_resolution_pb"; +import { MethodKind } from "@bufbuild/protobuf"; + +/** + * @generated from service entityresolution.EntityResolutionService + */ +export declare const EntityResolutionService: { + readonly typeName: "entityresolution.EntityResolutionService", + readonly methods: { + /** + * @generated from rpc entityresolution.EntityResolutionService.ResolveEntities + */ + readonly resolveEntities: { + readonly name: "ResolveEntities", + readonly I: typeof ResolveEntitiesRequest, + readonly O: typeof ResolveEntitiesResponse, + readonly kind: MethodKind.Unary, + }, + /** + * @generated from rpc entityresolution.EntityResolutionService.CreateEntityChainFromJwt + */ + readonly createEntityChainFromJwt: { + readonly name: "CreateEntityChainFromJwt", + readonly I: typeof CreateEntityChainFromJwtRequest, + readonly O: typeof CreateEntityChainFromJwtResponse, + readonly kind: MethodKind.Unary, + }, + } +}; + diff --git a/lib/src/platform/entityresolution/entity_resolution_connect.js b/lib/src/platform/entityresolution/entity_resolution_connect.js new file mode 100644 index 00000000..33c93871 --- /dev/null +++ b/lib/src/platform/entityresolution/entity_resolution_connect.js @@ -0,0 +1,35 @@ +// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=js+dts,import_extension=none" +// @generated from file entityresolution/entity_resolution.proto (package entityresolution, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { CreateEntityChainFromJwtRequest, CreateEntityChainFromJwtResponse, ResolveEntitiesRequest, ResolveEntitiesResponse } from "./entity_resolution_pb"; +import { MethodKind } from "@bufbuild/protobuf"; + +/** + * @generated from service entityresolution.EntityResolutionService + */ +export const EntityResolutionService = { + typeName: "entityresolution.EntityResolutionService", + methods: { + /** + * @generated from rpc entityresolution.EntityResolutionService.ResolveEntities + */ + resolveEntities: { + name: "ResolveEntities", + I: ResolveEntitiesRequest, + O: ResolveEntitiesResponse, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc entityresolution.EntityResolutionService.CreateEntityChainFromJwt + */ + createEntityChainFromJwt: { + name: "CreateEntityChainFromJwt", + I: CreateEntityChainFromJwtRequest, + O: CreateEntityChainFromJwtResponse, + kind: MethodKind.Unary, + }, + } +}; + diff --git a/lib/src/platform/entityresolution/entity_resolution_pb.js b/lib/src/platform/entityresolution/entity_resolution_pb.js new file mode 100644 index 00000000..d43dca42 --- /dev/null +++ b/lib/src/platform/entityresolution/entity_resolution_pb.js @@ -0,0 +1,139 @@ +// @generated by protoc-gen-es v1.9.0 with parameter "target=js+dts,import_extension=none" +// @generated from file entityresolution/entity_resolution.proto (package entityresolution, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { Any, proto3, Struct } from "@bufbuild/protobuf"; +import { Entity, EntityChain, Token } from "../authorization/authorization_pb"; + +/** + * + * Example: Get idp attributes for bob and alice (both represented using an email address + * { + * "entities": [ + * { + * "id": "e1", + * "emailAddress": "bob@example.org" + * }, + * { + * "id": "e2", + * "emailAddress": "alice@example.org" + * } + * ] + * } + * + * + * @generated from message entityresolution.ResolveEntitiesRequest + */ +export const ResolveEntitiesRequest = /*@__PURE__*/ proto3.makeMessageType( + "entityresolution.ResolveEntitiesRequest", + () => [ + { no: 1, name: "entities", kind: "message", T: Entity, repeated: true }, + ], +); + +/** + * @generated from message entityresolution.EntityRepresentation + */ +export const EntityRepresentation = /*@__PURE__*/ proto3.makeMessageType( + "entityresolution.EntityRepresentation", + () => [ + { no: 1, name: "additional_props", kind: "message", T: Struct, repeated: true }, + { no: 2, name: "original_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * + * Example: Get idp attributes for bob and alice + * { + * "entity_representations": [ + * { + * "idp_entity_id": "e1", + * "additional_props": {"someAttr1":"someValue1"} + * }, + * { + * "idp_entity_id": "e2", + * "additional_props": {"someAttr2":"someValue2"} + * } + * ] + * } + * + * + * @generated from message entityresolution.ResolveEntitiesResponse + */ +export const ResolveEntitiesResponse = /*@__PURE__*/ proto3.makeMessageType( + "entityresolution.ResolveEntitiesResponse", + () => [ + { no: 1, name: "entity_representations", kind: "message", T: EntityRepresentation, repeated: true }, + ], +); + +/** + * @generated from message entityresolution.EntityNotFoundError + */ +export const EntityNotFoundError = /*@__PURE__*/ proto3.makeMessageType( + "entityresolution.EntityNotFoundError", + () => [ + { no: 1, name: "code", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, + { no: 2, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "details", kind: "message", T: Any, repeated: true }, + { no: 4, name: "entity", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * + * Example: Get Entity chains for tokens aaaaaa and bbbbbb + * { + * "tokens": [ + * "aaaaaaa", + * "bbbbbbbb" + * ] + * } + * + * + * @generated from message entityresolution.CreateEntityChainFromJwtRequest + */ +export const CreateEntityChainFromJwtRequest = /*@__PURE__*/ proto3.makeMessageType( + "entityresolution.CreateEntityChainFromJwtRequest", + () => [ + { no: 1, name: "tokens", kind: "message", T: Token, repeated: true }, + ], +); + +/** + * + * Example: Return the entity chains from the provided tokens + * { + * "entity_chains": [ + * { + * "id": "tok1", + * "entities": [ + * { + * "clientId": "client1" + * } + * ] + * }, + * { + * "id": "tok2", + * "entities": [ + * { + * "userName": "alice", + * "clientId": "client2" + * } + * ] + * } + * ] + * } + * + * + * @generated from message entityresolution.CreateEntityChainFromJwtResponse + */ +export const CreateEntityChainFromJwtResponse = /*@__PURE__*/ proto3.makeMessageType( + "entityresolution.CreateEntityChainFromJwtResponse", + () => [ + { no: 1, name: "entity_chains", kind: "message", T: EntityChain, repeated: true }, + ], +); + diff --git a/lib/src/platform/kas/kas_connect.d.ts b/lib/src/platform/kas/kas_connect.d.ts new file mode 100644 index 00000000..f9f30056 --- /dev/null +++ b/lib/src/platform/kas/kas_connect.d.ts @@ -0,0 +1,59 @@ +// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=js+dts,import_extension=none" +// @generated from file kas/kas.proto (package kas, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { InfoRequest, InfoResponse, LegacyPublicKeyRequest, PublicKeyRequest, PublicKeyResponse, RewrapRequest, RewrapResponse } from "./kas_pb"; +import { MethodKind, StringValue } from "@bufbuild/protobuf"; + +/** + * Get app info from the root path + * + * @generated from service kas.AccessService + */ +export declare const AccessService: { + readonly typeName: "kas.AccessService", + readonly methods: { + /** + * Get the current version of the service + * + * @generated from rpc kas.AccessService.Info + */ + readonly info: { + readonly name: "Info", + readonly I: typeof InfoRequest, + readonly O: typeof InfoResponse, + readonly kind: MethodKind.Unary, + }, + /** + * @generated from rpc kas.AccessService.PublicKey + */ + readonly publicKey: { + readonly name: "PublicKey", + readonly I: typeof PublicKeyRequest, + readonly O: typeof PublicKeyResponse, + readonly kind: MethodKind.Unary, + }, + /** + * buf:lint:ignore RPC_RESPONSE_STANDARD_NAME + * + * @generated from rpc kas.AccessService.LegacyPublicKey + */ + readonly legacyPublicKey: { + readonly name: "LegacyPublicKey", + readonly I: typeof LegacyPublicKeyRequest, + readonly O: typeof StringValue, + readonly kind: MethodKind.Unary, + }, + /** + * @generated from rpc kas.AccessService.Rewrap + */ + readonly rewrap: { + readonly name: "Rewrap", + readonly I: typeof RewrapRequest, + readonly O: typeof RewrapResponse, + readonly kind: MethodKind.Unary, + }, + } +}; + diff --git a/lib/src/platform/kas/kas_connect.js b/lib/src/platform/kas/kas_connect.js new file mode 100644 index 00000000..c366abf4 --- /dev/null +++ b/lib/src/platform/kas/kas_connect.js @@ -0,0 +1,59 @@ +// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=js+dts,import_extension=none" +// @generated from file kas/kas.proto (package kas, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { InfoRequest, InfoResponse, LegacyPublicKeyRequest, PublicKeyRequest, PublicKeyResponse, RewrapRequest, RewrapResponse } from "./kas_pb"; +import { MethodKind, StringValue } from "@bufbuild/protobuf"; + +/** + * Get app info from the root path + * + * @generated from service kas.AccessService + */ +export const AccessService = { + typeName: "kas.AccessService", + methods: { + /** + * Get the current version of the service + * + * @generated from rpc kas.AccessService.Info + */ + info: { + name: "Info", + I: InfoRequest, + O: InfoResponse, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc kas.AccessService.PublicKey + */ + publicKey: { + name: "PublicKey", + I: PublicKeyRequest, + O: PublicKeyResponse, + kind: MethodKind.Unary, + }, + /** + * buf:lint:ignore RPC_RESPONSE_STANDARD_NAME + * + * @generated from rpc kas.AccessService.LegacyPublicKey + */ + legacyPublicKey: { + name: "LegacyPublicKey", + I: LegacyPublicKeyRequest, + O: StringValue, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc kas.AccessService.Rewrap + */ + rewrap: { + name: "Rewrap", + I: RewrapRequest, + O: RewrapResponse, + kind: MethodKind.Unary, + }, + } +}; + diff --git a/lib/src/platform/kas/kas_pb.js b/lib/src/platform/kas/kas_pb.js new file mode 100644 index 00000000..73979da4 --- /dev/null +++ b/lib/src/platform/kas/kas_pb.js @@ -0,0 +1,84 @@ +// @generated by protoc-gen-es v1.9.0 with parameter "target=js+dts,import_extension=none" +// @generated from file kas/kas.proto (package kas, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { proto3, Value } from "@bufbuild/protobuf"; + +/** + * Intentionally empty. May include features later. + * + * @generated from message kas.InfoRequest + */ +export const InfoRequest = /*@__PURE__*/ proto3.makeMessageType( + "kas.InfoRequest", + [], +); + +/** + * Service application level metadata + * + * @generated from message kas.InfoResponse + */ +export const InfoResponse = /*@__PURE__*/ proto3.makeMessageType( + "kas.InfoResponse", + () => [ + { no: 1, name: "version", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from message kas.LegacyPublicKeyRequest + */ +export const LegacyPublicKeyRequest = /*@__PURE__*/ proto3.makeMessageType( + "kas.LegacyPublicKeyRequest", + () => [ + { no: 1, name: "algorithm", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from message kas.PublicKeyRequest + */ +export const PublicKeyRequest = /*@__PURE__*/ proto3.makeMessageType( + "kas.PublicKeyRequest", + () => [ + { no: 1, name: "algorithm", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "fmt", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "v", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from message kas.PublicKeyResponse + */ +export const PublicKeyResponse = /*@__PURE__*/ proto3.makeMessageType( + "kas.PublicKeyResponse", + () => [ + { no: 1, name: "public_key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from message kas.RewrapRequest + */ +export const RewrapRequest = /*@__PURE__*/ proto3.makeMessageType( + "kas.RewrapRequest", + () => [ + { no: 1, name: "signed_request_token", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from message kas.RewrapResponse + */ +export const RewrapResponse = /*@__PURE__*/ proto3.makeMessageType( + "kas.RewrapResponse", + () => [ + { no: 1, name: "metadata", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: Value} }, + { no: 2, name: "entity_wrapped_key", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, + { no: 3, name: "session_public_key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "schema_version", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + diff --git a/lib/src/platform/policy/attributes/attributes_connect.d.ts b/lib/src/platform/policy/attributes/attributes_connect.d.ts new file mode 100644 index 00000000..a6712801 --- /dev/null +++ b/lib/src/platform/policy/attributes/attributes_connect.d.ts @@ -0,0 +1,168 @@ +// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=js+dts,import_extension=none" +// @generated from file policy/attributes/attributes.proto (package policy.attributes, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { AssignKeyAccessServerToAttributeRequest, AssignKeyAccessServerToAttributeResponse, AssignKeyAccessServerToValueRequest, AssignKeyAccessServerToValueResponse, CreateAttributeRequest, CreateAttributeResponse, CreateAttributeValueRequest, CreateAttributeValueResponse, DeactivateAttributeRequest, DeactivateAttributeResponse, DeactivateAttributeValueRequest, DeactivateAttributeValueResponse, GetAttributeRequest, GetAttributeResponse, GetAttributeValueRequest, GetAttributeValueResponse, GetAttributeValuesByFqnsRequest, GetAttributeValuesByFqnsResponse, ListAttributesRequest, ListAttributesResponse, ListAttributeValuesRequest, ListAttributeValuesResponse, RemoveKeyAccessServerFromAttributeRequest, RemoveKeyAccessServerFromAttributeResponse, RemoveKeyAccessServerFromValueRequest, RemoveKeyAccessServerFromValueResponse, UpdateAttributeRequest, UpdateAttributeResponse, UpdateAttributeValueRequest, UpdateAttributeValueResponse } from "./attributes_pb"; +import { MethodKind } from "@bufbuild/protobuf"; + +/** + * / + * / Attribute Service + * / + * + * @generated from service policy.attributes.AttributesService + */ +export declare const AttributesService: { + readonly typeName: "policy.attributes.AttributesService", + readonly methods: { + /** + * --------------------------------------* + * Attribute RPCs + * --------------------------------------- + * + * @generated from rpc policy.attributes.AttributesService.ListAttributes + */ + readonly listAttributes: { + readonly name: "ListAttributes", + readonly I: typeof ListAttributesRequest, + readonly O: typeof ListAttributesResponse, + readonly kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.attributes.AttributesService.ListAttributeValues + */ + readonly listAttributeValues: { + readonly name: "ListAttributeValues", + readonly I: typeof ListAttributeValuesRequest, + readonly O: typeof ListAttributeValuesResponse, + readonly kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.attributes.AttributesService.GetAttribute + */ + readonly getAttribute: { + readonly name: "GetAttribute", + readonly I: typeof GetAttributeRequest, + readonly O: typeof GetAttributeResponse, + readonly kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.attributes.AttributesService.GetAttributeValuesByFqns + */ + readonly getAttributeValuesByFqns: { + readonly name: "GetAttributeValuesByFqns", + readonly I: typeof GetAttributeValuesByFqnsRequest, + readonly O: typeof GetAttributeValuesByFqnsResponse, + readonly kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.attributes.AttributesService.CreateAttribute + */ + readonly createAttribute: { + readonly name: "CreateAttribute", + readonly I: typeof CreateAttributeRequest, + readonly O: typeof CreateAttributeResponse, + readonly kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.attributes.AttributesService.UpdateAttribute + */ + readonly updateAttribute: { + readonly name: "UpdateAttribute", + readonly I: typeof UpdateAttributeRequest, + readonly O: typeof UpdateAttributeResponse, + readonly kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.attributes.AttributesService.DeactivateAttribute + */ + readonly deactivateAttribute: { + readonly name: "DeactivateAttribute", + readonly I: typeof DeactivateAttributeRequest, + readonly O: typeof DeactivateAttributeResponse, + readonly kind: MethodKind.Unary, + }, + /** + * --------------------------------------* + * Value RPCs + * --------------------------------------- + * + * @generated from rpc policy.attributes.AttributesService.GetAttributeValue + */ + readonly getAttributeValue: { + readonly name: "GetAttributeValue", + readonly I: typeof GetAttributeValueRequest, + readonly O: typeof GetAttributeValueResponse, + readonly kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.attributes.AttributesService.CreateAttributeValue + */ + readonly createAttributeValue: { + readonly name: "CreateAttributeValue", + readonly I: typeof CreateAttributeValueRequest, + readonly O: typeof CreateAttributeValueResponse, + readonly kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.attributes.AttributesService.UpdateAttributeValue + */ + readonly updateAttributeValue: { + readonly name: "UpdateAttributeValue", + readonly I: typeof UpdateAttributeValueRequest, + readonly O: typeof UpdateAttributeValueResponse, + readonly kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.attributes.AttributesService.DeactivateAttributeValue + */ + readonly deactivateAttributeValue: { + readonly name: "DeactivateAttributeValue", + readonly I: typeof DeactivateAttributeValueRequest, + readonly O: typeof DeactivateAttributeValueResponse, + readonly kind: MethodKind.Unary, + }, + /** + * --------------------------------------* + * Attribute <> Key Access Server RPCs + * --------------------------------------- + * + * @generated from rpc policy.attributes.AttributesService.AssignKeyAccessServerToAttribute + */ + readonly assignKeyAccessServerToAttribute: { + readonly name: "AssignKeyAccessServerToAttribute", + readonly I: typeof AssignKeyAccessServerToAttributeRequest, + readonly O: typeof AssignKeyAccessServerToAttributeResponse, + readonly kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.attributes.AttributesService.RemoveKeyAccessServerFromAttribute + */ + readonly removeKeyAccessServerFromAttribute: { + readonly name: "RemoveKeyAccessServerFromAttribute", + readonly I: typeof RemoveKeyAccessServerFromAttributeRequest, + readonly O: typeof RemoveKeyAccessServerFromAttributeResponse, + readonly kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.attributes.AttributesService.AssignKeyAccessServerToValue + */ + readonly assignKeyAccessServerToValue: { + readonly name: "AssignKeyAccessServerToValue", + readonly I: typeof AssignKeyAccessServerToValueRequest, + readonly O: typeof AssignKeyAccessServerToValueResponse, + readonly kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.attributes.AttributesService.RemoveKeyAccessServerFromValue + */ + readonly removeKeyAccessServerFromValue: { + readonly name: "RemoveKeyAccessServerFromValue", + readonly I: typeof RemoveKeyAccessServerFromValueRequest, + readonly O: typeof RemoveKeyAccessServerFromValueResponse, + readonly kind: MethodKind.Unary, + }, + } +}; + diff --git a/lib/src/platform/policy/attributes/attributes_connect.js b/lib/src/platform/policy/attributes/attributes_connect.js new file mode 100644 index 00000000..7cfe5ad0 --- /dev/null +++ b/lib/src/platform/policy/attributes/attributes_connect.js @@ -0,0 +1,168 @@ +// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=js+dts,import_extension=none" +// @generated from file policy/attributes/attributes.proto (package policy.attributes, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { AssignKeyAccessServerToAttributeRequest, AssignKeyAccessServerToAttributeResponse, AssignKeyAccessServerToValueRequest, AssignKeyAccessServerToValueResponse, CreateAttributeRequest, CreateAttributeResponse, CreateAttributeValueRequest, CreateAttributeValueResponse, DeactivateAttributeRequest, DeactivateAttributeResponse, DeactivateAttributeValueRequest, DeactivateAttributeValueResponse, GetAttributeRequest, GetAttributeResponse, GetAttributeValueRequest, GetAttributeValueResponse, GetAttributeValuesByFqnsRequest, GetAttributeValuesByFqnsResponse, ListAttributesRequest, ListAttributesResponse, ListAttributeValuesRequest, ListAttributeValuesResponse, RemoveKeyAccessServerFromAttributeRequest, RemoveKeyAccessServerFromAttributeResponse, RemoveKeyAccessServerFromValueRequest, RemoveKeyAccessServerFromValueResponse, UpdateAttributeRequest, UpdateAttributeResponse, UpdateAttributeValueRequest, UpdateAttributeValueResponse } from "./attributes_pb"; +import { MethodKind } from "@bufbuild/protobuf"; + +/** + * / + * / Attribute Service + * / + * + * @generated from service policy.attributes.AttributesService + */ +export const AttributesService = { + typeName: "policy.attributes.AttributesService", + methods: { + /** + * --------------------------------------* + * Attribute RPCs + * --------------------------------------- + * + * @generated from rpc policy.attributes.AttributesService.ListAttributes + */ + listAttributes: { + name: "ListAttributes", + I: ListAttributesRequest, + O: ListAttributesResponse, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.attributes.AttributesService.ListAttributeValues + */ + listAttributeValues: { + name: "ListAttributeValues", + I: ListAttributeValuesRequest, + O: ListAttributeValuesResponse, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.attributes.AttributesService.GetAttribute + */ + getAttribute: { + name: "GetAttribute", + I: GetAttributeRequest, + O: GetAttributeResponse, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.attributes.AttributesService.GetAttributeValuesByFqns + */ + getAttributeValuesByFqns: { + name: "GetAttributeValuesByFqns", + I: GetAttributeValuesByFqnsRequest, + O: GetAttributeValuesByFqnsResponse, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.attributes.AttributesService.CreateAttribute + */ + createAttribute: { + name: "CreateAttribute", + I: CreateAttributeRequest, + O: CreateAttributeResponse, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.attributes.AttributesService.UpdateAttribute + */ + updateAttribute: { + name: "UpdateAttribute", + I: UpdateAttributeRequest, + O: UpdateAttributeResponse, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.attributes.AttributesService.DeactivateAttribute + */ + deactivateAttribute: { + name: "DeactivateAttribute", + I: DeactivateAttributeRequest, + O: DeactivateAttributeResponse, + kind: MethodKind.Unary, + }, + /** + * --------------------------------------* + * Value RPCs + * --------------------------------------- + * + * @generated from rpc policy.attributes.AttributesService.GetAttributeValue + */ + getAttributeValue: { + name: "GetAttributeValue", + I: GetAttributeValueRequest, + O: GetAttributeValueResponse, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.attributes.AttributesService.CreateAttributeValue + */ + createAttributeValue: { + name: "CreateAttributeValue", + I: CreateAttributeValueRequest, + O: CreateAttributeValueResponse, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.attributes.AttributesService.UpdateAttributeValue + */ + updateAttributeValue: { + name: "UpdateAttributeValue", + I: UpdateAttributeValueRequest, + O: UpdateAttributeValueResponse, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.attributes.AttributesService.DeactivateAttributeValue + */ + deactivateAttributeValue: { + name: "DeactivateAttributeValue", + I: DeactivateAttributeValueRequest, + O: DeactivateAttributeValueResponse, + kind: MethodKind.Unary, + }, + /** + * --------------------------------------* + * Attribute <> Key Access Server RPCs + * --------------------------------------- + * + * @generated from rpc policy.attributes.AttributesService.AssignKeyAccessServerToAttribute + */ + assignKeyAccessServerToAttribute: { + name: "AssignKeyAccessServerToAttribute", + I: AssignKeyAccessServerToAttributeRequest, + O: AssignKeyAccessServerToAttributeResponse, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.attributes.AttributesService.RemoveKeyAccessServerFromAttribute + */ + removeKeyAccessServerFromAttribute: { + name: "RemoveKeyAccessServerFromAttribute", + I: RemoveKeyAccessServerFromAttributeRequest, + O: RemoveKeyAccessServerFromAttributeResponse, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.attributes.AttributesService.AssignKeyAccessServerToValue + */ + assignKeyAccessServerToValue: { + name: "AssignKeyAccessServerToValue", + I: AssignKeyAccessServerToValueRequest, + O: AssignKeyAccessServerToValueResponse, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.attributes.AttributesService.RemoveKeyAccessServerFromValue + */ + removeKeyAccessServerFromValue: { + name: "RemoveKeyAccessServerFromValue", + I: RemoveKeyAccessServerFromValueRequest, + O: RemoveKeyAccessServerFromValueResponse, + kind: MethodKind.Unary, + }, + } +}; + diff --git a/lib/src/platform/policy/attributes/attributes_pb.js b/lib/src/platform/policy/attributes/attributes_pb.js new file mode 100644 index 00000000..a8eba6fc --- /dev/null +++ b/lib/src/platform/policy/attributes/attributes_pb.js @@ -0,0 +1,363 @@ +// @generated by protoc-gen-es v1.9.0 with parameter "target=js+dts,import_extension=none" +// @generated from file policy/attributes/attributes.proto (package policy.attributes, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { proto3 } from "@bufbuild/protobuf"; +import { ActiveStateEnum, MetadataMutable, MetadataUpdateEnum } from "../../common/common_pb"; +import { Attribute, AttributeRuleTypeEnum, Value } from "../objects_pb"; +import { AttributeValueSelector } from "../selectors_pb"; + +/** + * @generated from message policy.attributes.AttributeKeyAccessServer + */ +export const AttributeKeyAccessServer = /*@__PURE__*/ proto3.makeMessageType( + "policy.attributes.AttributeKeyAccessServer", + () => [ + { no: 1, name: "attribute_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "key_access_server_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from message policy.attributes.ValueKeyAccessServer + */ +export const ValueKeyAccessServer = /*@__PURE__*/ proto3.makeMessageType( + "policy.attributes.ValueKeyAccessServer", + () => [ + { no: 1, name: "value_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "key_access_server_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from message policy.attributes.ListAttributesRequest + */ +export const ListAttributesRequest = /*@__PURE__*/ proto3.makeMessageType( + "policy.attributes.ListAttributesRequest", + () => [ + { no: 1, name: "state", kind: "enum", T: proto3.getEnumType(ActiveStateEnum) }, + { no: 2, name: "namespace", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from message policy.attributes.ListAttributesResponse + */ +export const ListAttributesResponse = /*@__PURE__*/ proto3.makeMessageType( + "policy.attributes.ListAttributesResponse", + () => [ + { no: 1, name: "attributes", kind: "message", T: Attribute, repeated: true }, + ], +); + +/** + * @generated from message policy.attributes.GetAttributeRequest + */ +export const GetAttributeRequest = /*@__PURE__*/ proto3.makeMessageType( + "policy.attributes.GetAttributeRequest", + () => [ + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from message policy.attributes.GetAttributeResponse + */ +export const GetAttributeResponse = /*@__PURE__*/ proto3.makeMessageType( + "policy.attributes.GetAttributeResponse", + () => [ + { no: 1, name: "attribute", kind: "message", T: Attribute }, + ], +); + +/** + * @generated from message policy.attributes.CreateAttributeRequest + */ +export const CreateAttributeRequest = /*@__PURE__*/ proto3.makeMessageType( + "policy.attributes.CreateAttributeRequest", + () => [ + { no: 1, name: "namespace_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "rule", kind: "enum", T: proto3.getEnumType(AttributeRuleTypeEnum) }, + { no: 4, name: "values", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 100, name: "metadata", kind: "message", T: MetadataMutable }, + ], +); + +/** + * @generated from message policy.attributes.CreateAttributeResponse + */ +export const CreateAttributeResponse = /*@__PURE__*/ proto3.makeMessageType( + "policy.attributes.CreateAttributeResponse", + () => [ + { no: 1, name: "attribute", kind: "message", T: Attribute }, + ], +); + +/** + * @generated from message policy.attributes.UpdateAttributeRequest + */ +export const UpdateAttributeRequest = /*@__PURE__*/ proto3.makeMessageType( + "policy.attributes.UpdateAttributeRequest", + () => [ + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 100, name: "metadata", kind: "message", T: MetadataMutable }, + { no: 101, name: "metadata_update_behavior", kind: "enum", T: proto3.getEnumType(MetadataUpdateEnum) }, + ], +); + +/** + * @generated from message policy.attributes.UpdateAttributeResponse + */ +export const UpdateAttributeResponse = /*@__PURE__*/ proto3.makeMessageType( + "policy.attributes.UpdateAttributeResponse", + () => [ + { no: 1, name: "attribute", kind: "message", T: Attribute }, + ], +); + +/** + * @generated from message policy.attributes.DeactivateAttributeRequest + */ +export const DeactivateAttributeRequest = /*@__PURE__*/ proto3.makeMessageType( + "policy.attributes.DeactivateAttributeRequest", + () => [ + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from message policy.attributes.DeactivateAttributeResponse + */ +export const DeactivateAttributeResponse = /*@__PURE__*/ proto3.makeMessageType( + "policy.attributes.DeactivateAttributeResponse", + () => [ + { no: 1, name: "attribute", kind: "message", T: Attribute }, + ], +); + +/** + * / + * / Value RPC messages + * / + * + * @generated from message policy.attributes.GetAttributeValueRequest + */ +export const GetAttributeValueRequest = /*@__PURE__*/ proto3.makeMessageType( + "policy.attributes.GetAttributeValueRequest", + () => [ + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from message policy.attributes.GetAttributeValueResponse + */ +export const GetAttributeValueResponse = /*@__PURE__*/ proto3.makeMessageType( + "policy.attributes.GetAttributeValueResponse", + () => [ + { no: 1, name: "value", kind: "message", T: Value }, + ], +); + +/** + * @generated from message policy.attributes.ListAttributeValuesRequest + */ +export const ListAttributeValuesRequest = /*@__PURE__*/ proto3.makeMessageType( + "policy.attributes.ListAttributeValuesRequest", + () => [ + { no: 1, name: "attribute_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "state", kind: "enum", T: proto3.getEnumType(ActiveStateEnum) }, + ], +); + +/** + * @generated from message policy.attributes.ListAttributeValuesResponse + */ +export const ListAttributeValuesResponse = /*@__PURE__*/ proto3.makeMessageType( + "policy.attributes.ListAttributeValuesResponse", + () => [ + { no: 1, name: "values", kind: "message", T: Value, repeated: true }, + ], +); + +/** + * @generated from message policy.attributes.CreateAttributeValueRequest + */ +export const CreateAttributeValueRequest = /*@__PURE__*/ proto3.makeMessageType( + "policy.attributes.CreateAttributeValueRequest", + () => [ + { no: 1, name: "attribute_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "members", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 100, name: "metadata", kind: "message", T: MetadataMutable }, + ], +); + +/** + * @generated from message policy.attributes.CreateAttributeValueResponse + */ +export const CreateAttributeValueResponse = /*@__PURE__*/ proto3.makeMessageType( + "policy.attributes.CreateAttributeValueResponse", + () => [ + { no: 1, name: "value", kind: "message", T: Value }, + ], +); + +/** + * @generated from message policy.attributes.UpdateAttributeValueRequest + */ +export const UpdateAttributeValueRequest = /*@__PURE__*/ proto3.makeMessageType( + "policy.attributes.UpdateAttributeValueRequest", + () => [ + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "members", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 100, name: "metadata", kind: "message", T: MetadataMutable }, + { no: 101, name: "metadata_update_behavior", kind: "enum", T: proto3.getEnumType(MetadataUpdateEnum) }, + ], +); + +/** + * @generated from message policy.attributes.UpdateAttributeValueResponse + */ +export const UpdateAttributeValueResponse = /*@__PURE__*/ proto3.makeMessageType( + "policy.attributes.UpdateAttributeValueResponse", + () => [ + { no: 1, name: "value", kind: "message", T: Value }, + ], +); + +/** + * @generated from message policy.attributes.DeactivateAttributeValueRequest + */ +export const DeactivateAttributeValueRequest = /*@__PURE__*/ proto3.makeMessageType( + "policy.attributes.DeactivateAttributeValueRequest", + () => [ + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from message policy.attributes.DeactivateAttributeValueResponse + */ +export const DeactivateAttributeValueResponse = /*@__PURE__*/ proto3.makeMessageType( + "policy.attributes.DeactivateAttributeValueResponse", + () => [ + { no: 1, name: "value", kind: "message", T: Value }, + ], +); + +/** + * @generated from message policy.attributes.GetAttributeValuesByFqnsRequest + */ +export const GetAttributeValuesByFqnsRequest = /*@__PURE__*/ proto3.makeMessageType( + "policy.attributes.GetAttributeValuesByFqnsRequest", + () => [ + { no: 1, name: "fqns", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 2, name: "with_value", kind: "message", T: AttributeValueSelector }, + ], +); + +/** + * @generated from message policy.attributes.GetAttributeValuesByFqnsResponse + */ +export const GetAttributeValuesByFqnsResponse = /*@__PURE__*/ proto3.makeMessageType( + "policy.attributes.GetAttributeValuesByFqnsResponse", + () => [ + { no: 1, name: "fqn_attribute_values", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: GetAttributeValuesByFqnsResponse_AttributeAndValue} }, + ], +); + +/** + * @generated from message policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue + */ +export const GetAttributeValuesByFqnsResponse_AttributeAndValue = /*@__PURE__*/ proto3.makeMessageType( + "policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue", + () => [ + { no: 1, name: "attribute", kind: "message", T: Attribute }, + { no: 2, name: "value", kind: "message", T: Value }, + ], + {localName: "GetAttributeValuesByFqnsResponse_AttributeAndValue"}, +); + +/** + * @generated from message policy.attributes.AssignKeyAccessServerToAttributeRequest + */ +export const AssignKeyAccessServerToAttributeRequest = /*@__PURE__*/ proto3.makeMessageType( + "policy.attributes.AssignKeyAccessServerToAttributeRequest", + () => [ + { no: 1, name: "attribute_key_access_server", kind: "message", T: AttributeKeyAccessServer }, + ], +); + +/** + * @generated from message policy.attributes.AssignKeyAccessServerToAttributeResponse + */ +export const AssignKeyAccessServerToAttributeResponse = /*@__PURE__*/ proto3.makeMessageType( + "policy.attributes.AssignKeyAccessServerToAttributeResponse", + () => [ + { no: 1, name: "attribute_key_access_server", kind: "message", T: AttributeKeyAccessServer }, + ], +); + +/** + * @generated from message policy.attributes.RemoveKeyAccessServerFromAttributeRequest + */ +export const RemoveKeyAccessServerFromAttributeRequest = /*@__PURE__*/ proto3.makeMessageType( + "policy.attributes.RemoveKeyAccessServerFromAttributeRequest", + () => [ + { no: 1, name: "attribute_key_access_server", kind: "message", T: AttributeKeyAccessServer }, + ], +); + +/** + * @generated from message policy.attributes.RemoveKeyAccessServerFromAttributeResponse + */ +export const RemoveKeyAccessServerFromAttributeResponse = /*@__PURE__*/ proto3.makeMessageType( + "policy.attributes.RemoveKeyAccessServerFromAttributeResponse", + () => [ + { no: 1, name: "attribute_key_access_server", kind: "message", T: AttributeKeyAccessServer }, + ], +); + +/** + * @generated from message policy.attributes.AssignKeyAccessServerToValueRequest + */ +export const AssignKeyAccessServerToValueRequest = /*@__PURE__*/ proto3.makeMessageType( + "policy.attributes.AssignKeyAccessServerToValueRequest", + () => [ + { no: 1, name: "value_key_access_server", kind: "message", T: ValueKeyAccessServer }, + ], +); + +/** + * @generated from message policy.attributes.AssignKeyAccessServerToValueResponse + */ +export const AssignKeyAccessServerToValueResponse = /*@__PURE__*/ proto3.makeMessageType( + "policy.attributes.AssignKeyAccessServerToValueResponse", + () => [ + { no: 1, name: "value_key_access_server", kind: "message", T: ValueKeyAccessServer }, + ], +); + +/** + * @generated from message policy.attributes.RemoveKeyAccessServerFromValueRequest + */ +export const RemoveKeyAccessServerFromValueRequest = /*@__PURE__*/ proto3.makeMessageType( + "policy.attributes.RemoveKeyAccessServerFromValueRequest", + () => [ + { no: 1, name: "value_key_access_server", kind: "message", T: ValueKeyAccessServer }, + ], +); + +/** + * @generated from message policy.attributes.RemoveKeyAccessServerFromValueResponse + */ +export const RemoveKeyAccessServerFromValueResponse = /*@__PURE__*/ proto3.makeMessageType( + "policy.attributes.RemoveKeyAccessServerFromValueResponse", + () => [ + { no: 1, name: "value_key_access_server", kind: "message", T: ValueKeyAccessServer }, + ], +); + diff --git a/lib/src/platform/policy/kasregistry/key_access_server_registry_connect.d.ts b/lib/src/platform/policy/kasregistry/key_access_server_registry_connect.d.ts new file mode 100644 index 00000000..f0f1e2ea --- /dev/null +++ b/lib/src/platform/policy/kasregistry/key_access_server_registry_connect.d.ts @@ -0,0 +1,62 @@ +// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=js+dts,import_extension=none" +// @generated from file policy/kasregistry/key_access_server_registry.proto (package policy.kasregistry, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { CreateKeyAccessServerRequest, CreateKeyAccessServerResponse, DeleteKeyAccessServerRequest, DeleteKeyAccessServerResponse, GetKeyAccessServerRequest, GetKeyAccessServerResponse, ListKeyAccessServersRequest, ListKeyAccessServersResponse, UpdateKeyAccessServerRequest, UpdateKeyAccessServerResponse } from "./key_access_server_registry_pb"; +import { MethodKind } from "@bufbuild/protobuf"; + +/** + * @generated from service policy.kasregistry.KeyAccessServerRegistryService + */ +export declare const KeyAccessServerRegistryService: { + readonly typeName: "policy.kasregistry.KeyAccessServerRegistryService", + readonly methods: { + /** + * @generated from rpc policy.kasregistry.KeyAccessServerRegistryService.ListKeyAccessServers + */ + readonly listKeyAccessServers: { + readonly name: "ListKeyAccessServers", + readonly I: typeof ListKeyAccessServersRequest, + readonly O: typeof ListKeyAccessServersResponse, + readonly kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.kasregistry.KeyAccessServerRegistryService.GetKeyAccessServer + */ + readonly getKeyAccessServer: { + readonly name: "GetKeyAccessServer", + readonly I: typeof GetKeyAccessServerRequest, + readonly O: typeof GetKeyAccessServerResponse, + readonly kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.kasregistry.KeyAccessServerRegistryService.CreateKeyAccessServer + */ + readonly createKeyAccessServer: { + readonly name: "CreateKeyAccessServer", + readonly I: typeof CreateKeyAccessServerRequest, + readonly O: typeof CreateKeyAccessServerResponse, + readonly kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.kasregistry.KeyAccessServerRegistryService.UpdateKeyAccessServer + */ + readonly updateKeyAccessServer: { + readonly name: "UpdateKeyAccessServer", + readonly I: typeof UpdateKeyAccessServerRequest, + readonly O: typeof UpdateKeyAccessServerResponse, + readonly kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.kasregistry.KeyAccessServerRegistryService.DeleteKeyAccessServer + */ + readonly deleteKeyAccessServer: { + readonly name: "DeleteKeyAccessServer", + readonly I: typeof DeleteKeyAccessServerRequest, + readonly O: typeof DeleteKeyAccessServerResponse, + readonly kind: MethodKind.Unary, + }, + } +}; + diff --git a/lib/src/platform/policy/kasregistry/key_access_server_registry_connect.js b/lib/src/platform/policy/kasregistry/key_access_server_registry_connect.js new file mode 100644 index 00000000..f1b1b14f --- /dev/null +++ b/lib/src/platform/policy/kasregistry/key_access_server_registry_connect.js @@ -0,0 +1,62 @@ +// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=js+dts,import_extension=none" +// @generated from file policy/kasregistry/key_access_server_registry.proto (package policy.kasregistry, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { CreateKeyAccessServerRequest, CreateKeyAccessServerResponse, DeleteKeyAccessServerRequest, DeleteKeyAccessServerResponse, GetKeyAccessServerRequest, GetKeyAccessServerResponse, ListKeyAccessServersRequest, ListKeyAccessServersResponse, UpdateKeyAccessServerRequest, UpdateKeyAccessServerResponse } from "./key_access_server_registry_pb"; +import { MethodKind } from "@bufbuild/protobuf"; + +/** + * @generated from service policy.kasregistry.KeyAccessServerRegistryService + */ +export const KeyAccessServerRegistryService = { + typeName: "policy.kasregistry.KeyAccessServerRegistryService", + methods: { + /** + * @generated from rpc policy.kasregistry.KeyAccessServerRegistryService.ListKeyAccessServers + */ + listKeyAccessServers: { + name: "ListKeyAccessServers", + I: ListKeyAccessServersRequest, + O: ListKeyAccessServersResponse, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.kasregistry.KeyAccessServerRegistryService.GetKeyAccessServer + */ + getKeyAccessServer: { + name: "GetKeyAccessServer", + I: GetKeyAccessServerRequest, + O: GetKeyAccessServerResponse, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.kasregistry.KeyAccessServerRegistryService.CreateKeyAccessServer + */ + createKeyAccessServer: { + name: "CreateKeyAccessServer", + I: CreateKeyAccessServerRequest, + O: CreateKeyAccessServerResponse, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.kasregistry.KeyAccessServerRegistryService.UpdateKeyAccessServer + */ + updateKeyAccessServer: { + name: "UpdateKeyAccessServer", + I: UpdateKeyAccessServerRequest, + O: UpdateKeyAccessServerResponse, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.kasregistry.KeyAccessServerRegistryService.DeleteKeyAccessServer + */ + deleteKeyAccessServer: { + name: "DeleteKeyAccessServer", + I: DeleteKeyAccessServerRequest, + O: DeleteKeyAccessServerResponse, + kind: MethodKind.Unary, + }, + } +}; + diff --git a/lib/src/platform/policy/kasregistry/key_access_server_registry_pb.js b/lib/src/platform/policy/kasregistry/key_access_server_registry_pb.js new file mode 100644 index 00000000..82c26c5f --- /dev/null +++ b/lib/src/platform/policy/kasregistry/key_access_server_registry_pb.js @@ -0,0 +1,113 @@ +// @generated by protoc-gen-es v1.9.0 with parameter "target=js+dts,import_extension=none" +// @generated from file policy/kasregistry/key_access_server_registry.proto (package policy.kasregistry, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { proto3 } from "@bufbuild/protobuf"; +import { KeyAccessServer, PublicKey } from "../objects_pb"; +import { MetadataMutable, MetadataUpdateEnum } from "../../common/common_pb"; + +/** + * @generated from message policy.kasregistry.GetKeyAccessServerRequest + */ +export const GetKeyAccessServerRequest = /*@__PURE__*/ proto3.makeMessageType( + "policy.kasregistry.GetKeyAccessServerRequest", + () => [ + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from message policy.kasregistry.GetKeyAccessServerResponse + */ +export const GetKeyAccessServerResponse = /*@__PURE__*/ proto3.makeMessageType( + "policy.kasregistry.GetKeyAccessServerResponse", + () => [ + { no: 1, name: "key_access_server", kind: "message", T: KeyAccessServer }, + ], +); + +/** + * @generated from message policy.kasregistry.ListKeyAccessServersRequest + */ +export const ListKeyAccessServersRequest = /*@__PURE__*/ proto3.makeMessageType( + "policy.kasregistry.ListKeyAccessServersRequest", + [], +); + +/** + * @generated from message policy.kasregistry.ListKeyAccessServersResponse + */ +export const ListKeyAccessServersResponse = /*@__PURE__*/ proto3.makeMessageType( + "policy.kasregistry.ListKeyAccessServersResponse", + () => [ + { no: 1, name: "key_access_servers", kind: "message", T: KeyAccessServer, repeated: true }, + ], +); + +/** + * @generated from message policy.kasregistry.CreateKeyAccessServerRequest + */ +export const CreateKeyAccessServerRequest = /*@__PURE__*/ proto3.makeMessageType( + "policy.kasregistry.CreateKeyAccessServerRequest", + () => [ + { no: 1, name: "uri", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "public_key", kind: "message", T: PublicKey }, + { no: 100, name: "metadata", kind: "message", T: MetadataMutable }, + ], +); + +/** + * @generated from message policy.kasregistry.CreateKeyAccessServerResponse + */ +export const CreateKeyAccessServerResponse = /*@__PURE__*/ proto3.makeMessageType( + "policy.kasregistry.CreateKeyAccessServerResponse", + () => [ + { no: 1, name: "key_access_server", kind: "message", T: KeyAccessServer }, + ], +); + +/** + * @generated from message policy.kasregistry.UpdateKeyAccessServerRequest + */ +export const UpdateKeyAccessServerRequest = /*@__PURE__*/ proto3.makeMessageType( + "policy.kasregistry.UpdateKeyAccessServerRequest", + () => [ + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "uri", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "public_key", kind: "message", T: PublicKey }, + { no: 100, name: "metadata", kind: "message", T: MetadataMutable }, + { no: 101, name: "metadata_update_behavior", kind: "enum", T: proto3.getEnumType(MetadataUpdateEnum) }, + ], +); + +/** + * @generated from message policy.kasregistry.UpdateKeyAccessServerResponse + */ +export const UpdateKeyAccessServerResponse = /*@__PURE__*/ proto3.makeMessageType( + "policy.kasregistry.UpdateKeyAccessServerResponse", + () => [ + { no: 1, name: "key_access_server", kind: "message", T: KeyAccessServer }, + ], +); + +/** + * @generated from message policy.kasregistry.DeleteKeyAccessServerRequest + */ +export const DeleteKeyAccessServerRequest = /*@__PURE__*/ proto3.makeMessageType( + "policy.kasregistry.DeleteKeyAccessServerRequest", + () => [ + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from message policy.kasregistry.DeleteKeyAccessServerResponse + */ +export const DeleteKeyAccessServerResponse = /*@__PURE__*/ proto3.makeMessageType( + "policy.kasregistry.DeleteKeyAccessServerResponse", + () => [ + { no: 1, name: "key_access_server", kind: "message", T: KeyAccessServer }, + ], +); + diff --git a/lib/src/platform/policy/namespaces/namespaces_connect.d.ts b/lib/src/platform/policy/namespaces/namespaces_connect.d.ts new file mode 100644 index 00000000..669a4817 --- /dev/null +++ b/lib/src/platform/policy/namespaces/namespaces_connect.d.ts @@ -0,0 +1,62 @@ +// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=js+dts,import_extension=none" +// @generated from file policy/namespaces/namespaces.proto (package policy.namespaces, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { CreateNamespaceRequest, CreateNamespaceResponse, DeactivateNamespaceRequest, DeactivateNamespaceResponse, GetNamespaceRequest, GetNamespaceResponse, ListNamespacesRequest, ListNamespacesResponse, UpdateNamespaceRequest, UpdateNamespaceResponse } from "./namespaces_pb"; +import { MethodKind } from "@bufbuild/protobuf"; + +/** + * @generated from service policy.namespaces.NamespaceService + */ +export declare const NamespaceService: { + readonly typeName: "policy.namespaces.NamespaceService", + readonly methods: { + /** + * @generated from rpc policy.namespaces.NamespaceService.GetNamespace + */ + readonly getNamespace: { + readonly name: "GetNamespace", + readonly I: typeof GetNamespaceRequest, + readonly O: typeof GetNamespaceResponse, + readonly kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.namespaces.NamespaceService.ListNamespaces + */ + readonly listNamespaces: { + readonly name: "ListNamespaces", + readonly I: typeof ListNamespacesRequest, + readonly O: typeof ListNamespacesResponse, + readonly kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.namespaces.NamespaceService.CreateNamespace + */ + readonly createNamespace: { + readonly name: "CreateNamespace", + readonly I: typeof CreateNamespaceRequest, + readonly O: typeof CreateNamespaceResponse, + readonly kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.namespaces.NamespaceService.UpdateNamespace + */ + readonly updateNamespace: { + readonly name: "UpdateNamespace", + readonly I: typeof UpdateNamespaceRequest, + readonly O: typeof UpdateNamespaceResponse, + readonly kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.namespaces.NamespaceService.DeactivateNamespace + */ + readonly deactivateNamespace: { + readonly name: "DeactivateNamespace", + readonly I: typeof DeactivateNamespaceRequest, + readonly O: typeof DeactivateNamespaceResponse, + readonly kind: MethodKind.Unary, + }, + } +}; + diff --git a/lib/src/platform/policy/namespaces/namespaces_connect.js b/lib/src/platform/policy/namespaces/namespaces_connect.js new file mode 100644 index 00000000..f962d9f7 --- /dev/null +++ b/lib/src/platform/policy/namespaces/namespaces_connect.js @@ -0,0 +1,62 @@ +// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=js+dts,import_extension=none" +// @generated from file policy/namespaces/namespaces.proto (package policy.namespaces, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { CreateNamespaceRequest, CreateNamespaceResponse, DeactivateNamespaceRequest, DeactivateNamespaceResponse, GetNamespaceRequest, GetNamespaceResponse, ListNamespacesRequest, ListNamespacesResponse, UpdateNamespaceRequest, UpdateNamespaceResponse } from "./namespaces_pb"; +import { MethodKind } from "@bufbuild/protobuf"; + +/** + * @generated from service policy.namespaces.NamespaceService + */ +export const NamespaceService = { + typeName: "policy.namespaces.NamespaceService", + methods: { + /** + * @generated from rpc policy.namespaces.NamespaceService.GetNamespace + */ + getNamespace: { + name: "GetNamespace", + I: GetNamespaceRequest, + O: GetNamespaceResponse, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.namespaces.NamespaceService.ListNamespaces + */ + listNamespaces: { + name: "ListNamespaces", + I: ListNamespacesRequest, + O: ListNamespacesResponse, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.namespaces.NamespaceService.CreateNamespace + */ + createNamespace: { + name: "CreateNamespace", + I: CreateNamespaceRequest, + O: CreateNamespaceResponse, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.namespaces.NamespaceService.UpdateNamespace + */ + updateNamespace: { + name: "UpdateNamespace", + I: UpdateNamespaceRequest, + O: UpdateNamespaceResponse, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.namespaces.NamespaceService.DeactivateNamespace + */ + deactivateNamespace: { + name: "DeactivateNamespace", + I: DeactivateNamespaceRequest, + O: DeactivateNamespaceResponse, + kind: MethodKind.Unary, + }, + } +}; + diff --git a/lib/src/platform/policy/namespaces/namespaces_pb.js b/lib/src/platform/policy/namespaces/namespaces_pb.js new file mode 100644 index 00000000..1ef90ce5 --- /dev/null +++ b/lib/src/platform/policy/namespaces/namespaces_pb.js @@ -0,0 +1,110 @@ +// @generated by protoc-gen-es v1.9.0 with parameter "target=js+dts,import_extension=none" +// @generated from file policy/namespaces/namespaces.proto (package policy.namespaces, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { proto3 } from "@bufbuild/protobuf"; +import { Namespace } from "../objects_pb"; +import { ActiveStateEnum, MetadataMutable, MetadataUpdateEnum } from "../../common/common_pb"; + +/** + * @generated from message policy.namespaces.GetNamespaceRequest + */ +export const GetNamespaceRequest = /*@__PURE__*/ proto3.makeMessageType( + "policy.namespaces.GetNamespaceRequest", + () => [ + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from message policy.namespaces.GetNamespaceResponse + */ +export const GetNamespaceResponse = /*@__PURE__*/ proto3.makeMessageType( + "policy.namespaces.GetNamespaceResponse", + () => [ + { no: 1, name: "namespace", kind: "message", T: Namespace }, + ], +); + +/** + * @generated from message policy.namespaces.ListNamespacesRequest + */ +export const ListNamespacesRequest = /*@__PURE__*/ proto3.makeMessageType( + "policy.namespaces.ListNamespacesRequest", + () => [ + { no: 1, name: "state", kind: "enum", T: proto3.getEnumType(ActiveStateEnum) }, + ], +); + +/** + * @generated from message policy.namespaces.ListNamespacesResponse + */ +export const ListNamespacesResponse = /*@__PURE__*/ proto3.makeMessageType( + "policy.namespaces.ListNamespacesResponse", + () => [ + { no: 1, name: "namespaces", kind: "message", T: Namespace, repeated: true }, + ], +); + +/** + * @generated from message policy.namespaces.CreateNamespaceRequest + */ +export const CreateNamespaceRequest = /*@__PURE__*/ proto3.makeMessageType( + "policy.namespaces.CreateNamespaceRequest", + () => [ + { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 100, name: "metadata", kind: "message", T: MetadataMutable }, + ], +); + +/** + * @generated from message policy.namespaces.CreateNamespaceResponse + */ +export const CreateNamespaceResponse = /*@__PURE__*/ proto3.makeMessageType( + "policy.namespaces.CreateNamespaceResponse", + () => [ + { no: 1, name: "namespace", kind: "message", T: Namespace }, + ], +); + +/** + * @generated from message policy.namespaces.UpdateNamespaceRequest + */ +export const UpdateNamespaceRequest = /*@__PURE__*/ proto3.makeMessageType( + "policy.namespaces.UpdateNamespaceRequest", + () => [ + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 100, name: "metadata", kind: "message", T: MetadataMutable }, + { no: 101, name: "metadata_update_behavior", kind: "enum", T: proto3.getEnumType(MetadataUpdateEnum) }, + ], +); + +/** + * @generated from message policy.namespaces.UpdateNamespaceResponse + */ +export const UpdateNamespaceResponse = /*@__PURE__*/ proto3.makeMessageType( + "policy.namespaces.UpdateNamespaceResponse", + () => [ + { no: 1, name: "namespace", kind: "message", T: Namespace }, + ], +); + +/** + * @generated from message policy.namespaces.DeactivateNamespaceRequest + */ +export const DeactivateNamespaceRequest = /*@__PURE__*/ proto3.makeMessageType( + "policy.namespaces.DeactivateNamespaceRequest", + () => [ + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from message policy.namespaces.DeactivateNamespaceResponse + */ +export const DeactivateNamespaceResponse = /*@__PURE__*/ proto3.makeMessageType( + "policy.namespaces.DeactivateNamespaceResponse", + [], +); + diff --git a/lib/src/platform/policy/objects_pb.js b/lib/src/platform/policy/objects_pb.js new file mode 100644 index 00000000..3484a11e --- /dev/null +++ b/lib/src/platform/policy/objects_pb.js @@ -0,0 +1,288 @@ +// @generated by protoc-gen-es v1.9.0 with parameter "target=js+dts,import_extension=none" +// @generated from file policy/objects.proto (package policy, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { BoolValue, proto3 } from "@bufbuild/protobuf"; +import { Metadata } from "../common/common_pb"; + +/** + * buflint ENUM_VALUE_PREFIX: to make sure that C++ scoping rules aren't violated when users add new enum values to an enum in a given package + * + * @generated from enum policy.AttributeRuleTypeEnum + */ +export const AttributeRuleTypeEnum = /*@__PURE__*/ proto3.makeEnum( + "policy.AttributeRuleTypeEnum", + [ + {no: 0, name: "ATTRIBUTE_RULE_TYPE_ENUM_UNSPECIFIED", localName: "UNSPECIFIED"}, + {no: 1, name: "ATTRIBUTE_RULE_TYPE_ENUM_ALL_OF", localName: "ALL_OF"}, + {no: 2, name: "ATTRIBUTE_RULE_TYPE_ENUM_ANY_OF", localName: "ANY_OF"}, + {no: 3, name: "ATTRIBUTE_RULE_TYPE_ENUM_HIERARCHY", localName: "HIERARCHY"}, + ], +); + +/** + * buflint ENUM_VALUE_PREFIX: to make sure that C++ scoping rules aren't violated when users add new enum values to an enum in a given package + * + * @generated from enum policy.SubjectMappingOperatorEnum + */ +export const SubjectMappingOperatorEnum = /*@__PURE__*/ proto3.makeEnum( + "policy.SubjectMappingOperatorEnum", + [ + {no: 0, name: "SUBJECT_MAPPING_OPERATOR_ENUM_UNSPECIFIED", localName: "UNSPECIFIED"}, + {no: 1, name: "SUBJECT_MAPPING_OPERATOR_ENUM_IN", localName: "IN"}, + {no: 2, name: "SUBJECT_MAPPING_OPERATOR_ENUM_NOT_IN", localName: "NOT_IN"}, + ], +); + +/** + * buflint ENUM_VALUE_PREFIX: to make sure that C++ scoping rules aren't violated when users add new enum values to an enum in a given package + * + * @generated from enum policy.ConditionBooleanTypeEnum + */ +export const ConditionBooleanTypeEnum = /*@__PURE__*/ proto3.makeEnum( + "policy.ConditionBooleanTypeEnum", + [ + {no: 0, name: "CONDITION_BOOLEAN_TYPE_ENUM_UNSPECIFIED", localName: "UNSPECIFIED"}, + {no: 1, name: "CONDITION_BOOLEAN_TYPE_ENUM_AND", localName: "AND"}, + {no: 2, name: "CONDITION_BOOLEAN_TYPE_ENUM_OR", localName: "OR"}, + ], +); + +/** + * @generated from message policy.Namespace + */ +export const Namespace = /*@__PURE__*/ proto3.makeMessageType( + "policy.Namespace", + () => [ + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "fqn", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "active", kind: "message", T: BoolValue }, + { no: 5, name: "metadata", kind: "message", T: Metadata }, + ], +); + +/** + * @generated from message policy.Attribute + */ +export const Attribute = /*@__PURE__*/ proto3.makeMessageType( + "policy.Attribute", + () => [ + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "namespace", kind: "message", T: Namespace }, + { no: 3, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "rule", kind: "enum", T: proto3.getEnumType(AttributeRuleTypeEnum) }, + { no: 5, name: "values", kind: "message", T: Value, repeated: true }, + { no: 6, name: "grants", kind: "message", T: KeyAccessServer, repeated: true }, + { no: 7, name: "fqn", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 8, name: "active", kind: "message", T: BoolValue }, + { no: 100, name: "metadata", kind: "message", T: Metadata }, + ], +); + +/** + * @generated from message policy.Value + */ +export const Value = /*@__PURE__*/ proto3.makeMessageType( + "policy.Value", + () => [ + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "attribute", kind: "message", T: Attribute }, + { no: 3, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "members", kind: "message", T: Value, repeated: true }, + { no: 5, name: "grants", kind: "message", T: KeyAccessServer, repeated: true }, + { no: 6, name: "fqn", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 7, name: "active", kind: "message", T: BoolValue }, + { no: 8, name: "subject_mappings", kind: "message", T: SubjectMapping, repeated: true }, + { no: 100, name: "metadata", kind: "message", T: Metadata }, + ], +); + +/** + * An action an entity can take + * + * @generated from message policy.Action + */ +export const Action = /*@__PURE__*/ proto3.makeMessageType( + "policy.Action", + () => [ + { no: 1, name: "standard", kind: "enum", T: proto3.getEnumType(Action_StandardAction), oneof: "value" }, + { no: 2, name: "custom", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "value" }, + ], +); + +/** + * Standard actions supported by the platform + * + * @generated from enum policy.Action.StandardAction + */ +export const Action_StandardAction = /*@__PURE__*/ proto3.makeEnum( + "policy.Action.StandardAction", + [ + {no: 0, name: "STANDARD_ACTION_UNSPECIFIED", localName: "UNSPECIFIED"}, + {no: 1, name: "STANDARD_ACTION_DECRYPT", localName: "DECRYPT"}, + {no: 2, name: "STANDARD_ACTION_TRANSMIT", localName: "TRANSMIT"}, + ], +); + +/** + * + * Subject Mapping: A Policy assigning Subject Set(s) to a permitted attribute value + action(s) combination + * + * Example: Subjects in sets 1 and 2 are entitled attribute value http://wwww.example.org/attr/example/value/one + * with permitted actions TRANSMIT and DECRYPT + * { + * "id": "someid", + * "attribute_value": {example_one_attribute_value...}, + * "subject_condition_set": {"subject_sets":[{subject_set_1},{subject_set_2}]...}, + * "actions": [{"standard": "STANDARD_ACTION_DECRYPT"}", {"standard": "STANDARD_ACTION_TRANSMIT"}] + * } + * + * @generated from message policy.SubjectMapping + */ +export const SubjectMapping = /*@__PURE__*/ proto3.makeMessageType( + "policy.SubjectMapping", + () => [ + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "attribute_value", kind: "message", T: Value }, + { no: 3, name: "subject_condition_set", kind: "message", T: SubjectConditionSet }, + { no: 4, name: "actions", kind: "message", T: Action, repeated: true }, + { no: 100, name: "metadata", kind: "message", T: Metadata }, + ], +); + +/** + * * + * A Condition defines a rule of + * + * Example: Subjects with a field selected by the flattened selector "'.division'" and a value of "Accounting" or "Marketing": + * { + * "subject_external_selector_value": "'.division'", + * "operator": "SUBJECT_MAPPING_OPERATOR_ENUM_IN", + * "subject_external_values" : ["Accounting", "Marketing"] + * } + * + * Example: Subjects that are not part of the Fantastic Four according to their alias field: + * { + * "subject_external_selector_value": "'.data[0].alias'", + * "operator": "SUBJECT_MAPPING_OPERATOR_ENUM_NOT_IN", + * "subject_external_values" : ["mister_fantastic", "the_thing", "human_torch", "invisible_woman"] + * } + * + * @generated from message policy.Condition + */ +export const Condition = /*@__PURE__*/ proto3.makeMessageType( + "policy.Condition", + () => [ + { no: 1, name: "subject_external_selector_value", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "operator", kind: "enum", T: proto3.getEnumType(SubjectMappingOperatorEnum) }, + { no: 3, name: "subject_external_values", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + ], +); + +/** + * A collection of Conditions evaluated by the boolean_operator provided + * + * @generated from message policy.ConditionGroup + */ +export const ConditionGroup = /*@__PURE__*/ proto3.makeMessageType( + "policy.ConditionGroup", + () => [ + { no: 1, name: "conditions", kind: "message", T: Condition, repeated: true }, + { no: 2, name: "boolean_operator", kind: "enum", T: proto3.getEnumType(ConditionBooleanTypeEnum) }, + ], +); + +/** + * A collection of Condition Groups + * + * @generated from message policy.SubjectSet + */ +export const SubjectSet = /*@__PURE__*/ proto3.makeMessageType( + "policy.SubjectSet", + () => [ + { no: 1, name: "condition_groups", kind: "message", T: ConditionGroup, repeated: true }, + ], +); + +/** + * + * A container for multiple Subject Sets, each containing Condition Groups, each containing Conditions. Multiple Subject Sets in a SubjectConditionSet + * are evaluated with AND logic. As each Subject Mapping has only one Attribute Value, the SubjectConditionSet is reusable across multiple + * Subject Mappings / Attribute Values and is an independent unit. + * + * @generated from message policy.SubjectConditionSet + */ +export const SubjectConditionSet = /*@__PURE__*/ proto3.makeMessageType( + "policy.SubjectConditionSet", + () => [ + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "subject_sets", kind: "message", T: SubjectSet, repeated: true }, + { no: 100, name: "metadata", kind: "message", T: Metadata }, + ], +); + +/** + * + * + * A property of a Subject/Entity as its selector expression -> value result pair. This would mirror external user attributes retrieved + * from an authoritative source such as an IDP (Identity Provider) or User Store. Examples include such ADFS/LDAP, OKTA, etc. + * For now, a valid property must contain both a selector expression & a resulting value. + * + * The external_selector_value is a specifier to select a value from a flattened external representation of an Entity (such as from idP/LDAP), + * and the external_value is the value selected by the external_selector_value on that Entity Representation (Subject Context). These mirror the Condition. + * + * @generated from message policy.SubjectProperty + */ +export const SubjectProperty = /*@__PURE__*/ proto3.makeMessageType( + "policy.SubjectProperty", + () => [ + { no: 1, name: "external_selector_value", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "external_value", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * + * Resource Mappings (aka Access Control Resource Encodings aka ACRE) are structures supporting the mapping of Resources and Attribute Values + * + * @generated from message policy.ResourceMapping + */ +export const ResourceMapping = /*@__PURE__*/ proto3.makeMessageType( + "policy.ResourceMapping", + () => [ + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "metadata", kind: "message", T: Metadata }, + { no: 3, name: "attribute_value", kind: "message", T: Value }, + { no: 4, name: "terms", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + ], +); + +/** + * + * Key Access Server Registry + * + * @generated from message policy.KeyAccessServer + */ +export const KeyAccessServer = /*@__PURE__*/ proto3.makeMessageType( + "policy.KeyAccessServer", + () => [ + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "uri", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "public_key", kind: "message", T: PublicKey }, + { no: 100, name: "metadata", kind: "message", T: Metadata }, + ], +); + +/** + * @generated from message policy.PublicKey + */ +export const PublicKey = /*@__PURE__*/ proto3.makeMessageType( + "policy.PublicKey", + () => [ + { no: 1, name: "remote", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "public_key" }, + { no: 2, name: "local", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "public_key" }, + ], +); + diff --git a/lib/src/platform/policy/resourcemapping/resource_mapping_connect.d.ts b/lib/src/platform/policy/resourcemapping/resource_mapping_connect.d.ts new file mode 100644 index 00000000..38377b11 --- /dev/null +++ b/lib/src/platform/policy/resourcemapping/resource_mapping_connect.d.ts @@ -0,0 +1,259 @@ +// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=js+dts,import_extension=none" +// @generated from file policy/resourcemapping/resource_mapping.proto (package policy.resourcemapping, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { CreateResourceMappingRequest, CreateResourceMappingResponse, DeleteResourceMappingRequest, DeleteResourceMappingResponse, GetResourceMappingRequest, GetResourceMappingResponse, ListResourceMappingsRequest, ListResourceMappingsResponse, UpdateResourceMappingRequest, UpdateResourceMappingResponse } from "./resource_mapping_pb"; +import { MethodKind } from "@bufbuild/protobuf"; + +/** + * + * Resource Mappings + * + * @generated from service policy.resourcemapping.ResourceMappingService + */ +export declare const ResourceMappingService: { + readonly typeName: "policy.resourcemapping.ResourceMappingService", + readonly methods: { + /** + * + * Request Example: + * - empty body + * + * Response Example: + * { + * "resource_mappings": [ + * { + * "terms": [ + * "TOPSECRET", + * "TS", + * ], + * "id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e", + * "metadata": { + * "labels": [], + * "created_at": { + * "seconds": "1706103276", + * "nanos": 510718000 + * }, + * "updated_at": { + * "seconds": "1706107873", + * "nanos": 399786000 + * }, + * "description": "" + * }, + * "attribute_value": { + * "members": [], + * "id": "f0d1d4f6-bff9-45fd-8170-607b6b559349", + * "metadata": null, + * "attribute_id": "", + * "value": "value1" + * } + * } + * ] + * } + * + * @generated from rpc policy.resourcemapping.ResourceMappingService.ListResourceMappings + */ + readonly listResourceMappings: { + readonly name: "ListResourceMappings", + readonly I: typeof ListResourceMappingsRequest, + readonly O: typeof ListResourceMappingsResponse, + readonly kind: MethodKind.Unary, + }, + /** + * + * Request Example: + * { + * "id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e" + * } + * + * Response Example: + * { + * "resource_mapping": { + * "terms": [ + * "TOPSECRET", + * "TS", + * ], + * "id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e", + * "metadata": { + * "labels": [], + * "created_at": { + * "seconds": "1706103276", + * "nanos": 510718000 + * }, + * "updated_at": { + * "seconds": "1706107873", + * "nanos": 399786000 + * }, + * "description": "" + * }, + * "attribute_value": { + * "members": [], + * "id": "f0d1d4f6-bff9-45fd-8170-607b6b559349", + * "metadata": null, + * "attribute_id": "", + * "value": "value1" + * } + * } + * } + * + * @generated from rpc policy.resourcemapping.ResourceMappingService.GetResourceMapping + */ + readonly getResourceMapping: { + readonly name: "GetResourceMapping", + readonly I: typeof GetResourceMappingRequest, + readonly O: typeof GetResourceMappingResponse, + readonly kind: MethodKind.Unary, + }, + /** + * + * Request Example: + * { + * "resource_mapping": { + * "attribute_value_id": "f0d1d4f6-bff9-45fd-8170-607b6b559349", + * "terms": [ + * "TOPSECRET", + * "TS", + * ] + * } + * } + * + * Response Example: + * { + * "resource_mapping": { + * "terms": [ + * "TOPSECRET", + * "TS", + * ], + * "id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e", + * "metadata": { + * "labels": [], + * "created_at": { + * "seconds": "1706103276", + * "nanos": 510718000 + * }, + * "updated_at": { + * "seconds": "1706107873", + * "nanos": 399786000 + * }, + * "description": "" + * }, + * "attribute_value": { + * "members": [], + * "id": "f0d1d4f6-bff9-45fd-8170-607b6b559349", + * "metadata": null, + * "attribute_id": "", + * "value": "value1" + * } + * } + * } + * + * @generated from rpc policy.resourcemapping.ResourceMappingService.CreateResourceMapping + */ + readonly createResourceMapping: { + readonly name: "CreateResourceMapping", + readonly I: typeof CreateResourceMappingRequest, + readonly O: typeof CreateResourceMappingResponse, + readonly kind: MethodKind.Unary, + }, + /** + * + * Request Example: + * { + * "id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e", + * "resource_mapping": { + * "attribute_value_id": "f0d1d4f6-bff9-45fd-8170-607b6b559349", + * "terms": [ + * "TOPSECRET", + * "TS", + * "NEWTERM" + * ] + * } + * } + * + * Response Example: + * { + * "resource_mapping": { + * "terms": [ + * "TOPSECRET", + * "TS", + * ], + * "id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e", + * "metadata": { + * "labels": [], + * "created_at": { + * "seconds": "1706103276", + * "nanos": 510718000 + * }, + * "updated_at": { + * "seconds": "1706107873", + * "nanos": 399786000 + * }, + * "description": "" + * }, + * "attribute_value": { + * "members": [], + * "id": "f0d1d4f6-bff9-45fd-8170-607b6b559349", + * "metadata": null, + * "attribute_id": "", + * "value": "value1" + * } + * } + * } + * + * @generated from rpc policy.resourcemapping.ResourceMappingService.UpdateResourceMapping + */ + readonly updateResourceMapping: { + readonly name: "UpdateResourceMapping", + readonly I: typeof UpdateResourceMappingRequest, + readonly O: typeof UpdateResourceMappingResponse, + readonly kind: MethodKind.Unary, + }, + /** + * + * Request Example: + * { + * "id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e" + * } + * + * Response Example: + * { + * "resource_mapping": { + * "terms": [ + * "TOPSECRET", + * "TS", + * ], + * "id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e", + * "metadata": { + * "labels": [], + * "created_at": { + * "seconds": "1706103276", + * "nanos": 510718000 + * }, + * "updated_at": { + * "seconds": "1706107873", + * "nanos": 399786000 + * }, + * "description": "" + * }, + * "attribute_value": { + * "members": [], + * "id": "f0d1d4f6-bff9-45fd-8170-607b6b559349", + * "metadata": null, + * "attribute_id": "", + * "value": "value1" + * } + * } + * } + * + * @generated from rpc policy.resourcemapping.ResourceMappingService.DeleteResourceMapping + */ + readonly deleteResourceMapping: { + readonly name: "DeleteResourceMapping", + readonly I: typeof DeleteResourceMappingRequest, + readonly O: typeof DeleteResourceMappingResponse, + readonly kind: MethodKind.Unary, + }, + } +}; + diff --git a/lib/src/platform/policy/resourcemapping/resource_mapping_connect.js b/lib/src/platform/policy/resourcemapping/resource_mapping_connect.js new file mode 100644 index 00000000..c9c66071 --- /dev/null +++ b/lib/src/platform/policy/resourcemapping/resource_mapping_connect.js @@ -0,0 +1,259 @@ +// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=js+dts,import_extension=none" +// @generated from file policy/resourcemapping/resource_mapping.proto (package policy.resourcemapping, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { CreateResourceMappingRequest, CreateResourceMappingResponse, DeleteResourceMappingRequest, DeleteResourceMappingResponse, GetResourceMappingRequest, GetResourceMappingResponse, ListResourceMappingsRequest, ListResourceMappingsResponse, UpdateResourceMappingRequest, UpdateResourceMappingResponse } from "./resource_mapping_pb"; +import { MethodKind } from "@bufbuild/protobuf"; + +/** + * + * Resource Mappings + * + * @generated from service policy.resourcemapping.ResourceMappingService + */ +export const ResourceMappingService = { + typeName: "policy.resourcemapping.ResourceMappingService", + methods: { + /** + * + * Request Example: + * - empty body + * + * Response Example: + * { + * "resource_mappings": [ + * { + * "terms": [ + * "TOPSECRET", + * "TS", + * ], + * "id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e", + * "metadata": { + * "labels": [], + * "created_at": { + * "seconds": "1706103276", + * "nanos": 510718000 + * }, + * "updated_at": { + * "seconds": "1706107873", + * "nanos": 399786000 + * }, + * "description": "" + * }, + * "attribute_value": { + * "members": [], + * "id": "f0d1d4f6-bff9-45fd-8170-607b6b559349", + * "metadata": null, + * "attribute_id": "", + * "value": "value1" + * } + * } + * ] + * } + * + * @generated from rpc policy.resourcemapping.ResourceMappingService.ListResourceMappings + */ + listResourceMappings: { + name: "ListResourceMappings", + I: ListResourceMappingsRequest, + O: ListResourceMappingsResponse, + kind: MethodKind.Unary, + }, + /** + * + * Request Example: + * { + * "id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e" + * } + * + * Response Example: + * { + * "resource_mapping": { + * "terms": [ + * "TOPSECRET", + * "TS", + * ], + * "id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e", + * "metadata": { + * "labels": [], + * "created_at": { + * "seconds": "1706103276", + * "nanos": 510718000 + * }, + * "updated_at": { + * "seconds": "1706107873", + * "nanos": 399786000 + * }, + * "description": "" + * }, + * "attribute_value": { + * "members": [], + * "id": "f0d1d4f6-bff9-45fd-8170-607b6b559349", + * "metadata": null, + * "attribute_id": "", + * "value": "value1" + * } + * } + * } + * + * @generated from rpc policy.resourcemapping.ResourceMappingService.GetResourceMapping + */ + getResourceMapping: { + name: "GetResourceMapping", + I: GetResourceMappingRequest, + O: GetResourceMappingResponse, + kind: MethodKind.Unary, + }, + /** + * + * Request Example: + * { + * "resource_mapping": { + * "attribute_value_id": "f0d1d4f6-bff9-45fd-8170-607b6b559349", + * "terms": [ + * "TOPSECRET", + * "TS", + * ] + * } + * } + * + * Response Example: + * { + * "resource_mapping": { + * "terms": [ + * "TOPSECRET", + * "TS", + * ], + * "id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e", + * "metadata": { + * "labels": [], + * "created_at": { + * "seconds": "1706103276", + * "nanos": 510718000 + * }, + * "updated_at": { + * "seconds": "1706107873", + * "nanos": 399786000 + * }, + * "description": "" + * }, + * "attribute_value": { + * "members": [], + * "id": "f0d1d4f6-bff9-45fd-8170-607b6b559349", + * "metadata": null, + * "attribute_id": "", + * "value": "value1" + * } + * } + * } + * + * @generated from rpc policy.resourcemapping.ResourceMappingService.CreateResourceMapping + */ + createResourceMapping: { + name: "CreateResourceMapping", + I: CreateResourceMappingRequest, + O: CreateResourceMappingResponse, + kind: MethodKind.Unary, + }, + /** + * + * Request Example: + * { + * "id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e", + * "resource_mapping": { + * "attribute_value_id": "f0d1d4f6-bff9-45fd-8170-607b6b559349", + * "terms": [ + * "TOPSECRET", + * "TS", + * "NEWTERM" + * ] + * } + * } + * + * Response Example: + * { + * "resource_mapping": { + * "terms": [ + * "TOPSECRET", + * "TS", + * ], + * "id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e", + * "metadata": { + * "labels": [], + * "created_at": { + * "seconds": "1706103276", + * "nanos": 510718000 + * }, + * "updated_at": { + * "seconds": "1706107873", + * "nanos": 399786000 + * }, + * "description": "" + * }, + * "attribute_value": { + * "members": [], + * "id": "f0d1d4f6-bff9-45fd-8170-607b6b559349", + * "metadata": null, + * "attribute_id": "", + * "value": "value1" + * } + * } + * } + * + * @generated from rpc policy.resourcemapping.ResourceMappingService.UpdateResourceMapping + */ + updateResourceMapping: { + name: "UpdateResourceMapping", + I: UpdateResourceMappingRequest, + O: UpdateResourceMappingResponse, + kind: MethodKind.Unary, + }, + /** + * + * Request Example: + * { + * "id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e" + * } + * + * Response Example: + * { + * "resource_mapping": { + * "terms": [ + * "TOPSECRET", + * "TS", + * ], + * "id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e", + * "metadata": { + * "labels": [], + * "created_at": { + * "seconds": "1706103276", + * "nanos": 510718000 + * }, + * "updated_at": { + * "seconds": "1706107873", + * "nanos": 399786000 + * }, + * "description": "" + * }, + * "attribute_value": { + * "members": [], + * "id": "f0d1d4f6-bff9-45fd-8170-607b6b559349", + * "metadata": null, + * "attribute_id": "", + * "value": "value1" + * } + * } + * } + * + * @generated from rpc policy.resourcemapping.ResourceMappingService.DeleteResourceMapping + */ + deleteResourceMapping: { + name: "DeleteResourceMapping", + I: DeleteResourceMappingRequest, + O: DeleteResourceMappingResponse, + kind: MethodKind.Unary, + }, + } +}; + diff --git a/lib/src/platform/policy/resourcemapping/resource_mapping_pb.js b/lib/src/platform/policy/resourcemapping/resource_mapping_pb.js new file mode 100644 index 00000000..c0e0ae56 --- /dev/null +++ b/lib/src/platform/policy/resourcemapping/resource_mapping_pb.js @@ -0,0 +1,142 @@ +// @generated by protoc-gen-es v1.9.0 with parameter "target=js+dts,import_extension=none" +// @generated from file policy/resourcemapping/resource_mapping.proto (package policy.resourcemapping, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { proto3 } from "@bufbuild/protobuf"; +import { ResourceMapping } from "../objects_pb"; +import { MetadataMutable, MetadataUpdateEnum } from "../../common/common_pb"; + +/** + * @generated from message policy.resourcemapping.ListResourceMappingsRequest + */ +export const ListResourceMappingsRequest = /*@__PURE__*/ proto3.makeMessageType( + "policy.resourcemapping.ListResourceMappingsRequest", + [], +); + +/** + * @generated from message policy.resourcemapping.ListResourceMappingsResponse + */ +export const ListResourceMappingsResponse = /*@__PURE__*/ proto3.makeMessageType( + "policy.resourcemapping.ListResourceMappingsResponse", + () => [ + { no: 1, name: "resource_mappings", kind: "message", T: ResourceMapping, repeated: true }, + ], +); + +/** + * @generated from message policy.resourcemapping.GetResourceMappingRequest + */ +export const GetResourceMappingRequest = /*@__PURE__*/ proto3.makeMessageType( + "policy.resourcemapping.GetResourceMappingRequest", + () => [ + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from message policy.resourcemapping.GetResourceMappingResponse + */ +export const GetResourceMappingResponse = /*@__PURE__*/ proto3.makeMessageType( + "policy.resourcemapping.GetResourceMappingResponse", + () => [ + { no: 1, name: "resource_mapping", kind: "message", T: ResourceMapping }, + ], +); + +/** + * + * ### Request + * + * grpcurl -plaintext -d @ localhost:8080 policy.resourcemapping.ResourceMappingService/CreateResourceMapping < [ + { no: 1, name: "attribute_value_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "terms", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 100, name: "metadata", kind: "message", T: MetadataMutable }, + ], +); + +/** + * @generated from message policy.resourcemapping.CreateResourceMappingResponse + */ +export const CreateResourceMappingResponse = /*@__PURE__*/ proto3.makeMessageType( + "policy.resourcemapping.CreateResourceMappingResponse", + () => [ + { no: 1, name: "resource_mapping", kind: "message", T: ResourceMapping }, + ], +); + +/** + * @generated from message policy.resourcemapping.UpdateResourceMappingRequest + */ +export const UpdateResourceMappingRequest = /*@__PURE__*/ proto3.makeMessageType( + "policy.resourcemapping.UpdateResourceMappingRequest", + () => [ + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "attribute_value_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "terms", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 100, name: "metadata", kind: "message", T: MetadataMutable }, + { no: 101, name: "metadata_update_behavior", kind: "enum", T: proto3.getEnumType(MetadataUpdateEnum) }, + ], +); + +/** + * @generated from message policy.resourcemapping.UpdateResourceMappingResponse + */ +export const UpdateResourceMappingResponse = /*@__PURE__*/ proto3.makeMessageType( + "policy.resourcemapping.UpdateResourceMappingResponse", + () => [ + { no: 1, name: "resource_mapping", kind: "message", T: ResourceMapping }, + ], +); + +/** + * @generated from message policy.resourcemapping.DeleteResourceMappingRequest + */ +export const DeleteResourceMappingRequest = /*@__PURE__*/ proto3.makeMessageType( + "policy.resourcemapping.DeleteResourceMappingRequest", + () => [ + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from message policy.resourcemapping.DeleteResourceMappingResponse + */ +export const DeleteResourceMappingResponse = /*@__PURE__*/ proto3.makeMessageType( + "policy.resourcemapping.DeleteResourceMappingResponse", + () => [ + { no: 1, name: "resource_mapping", kind: "message", T: ResourceMapping }, + ], +); + diff --git a/lib/src/platform/policy/selectors_pb.js b/lib/src/platform/policy/selectors_pb.js new file mode 100644 index 00000000..c26c58ed --- /dev/null +++ b/lib/src/platform/policy/selectors_pb.js @@ -0,0 +1,110 @@ +// @generated by protoc-gen-es v1.9.0 with parameter "target=js+dts,import_extension=none" +// @generated from file policy/selectors.proto (package policy, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { proto3 } from "@bufbuild/protobuf"; + +/** + * @generated from message policy.AttributeNamespaceSelector + */ +export const AttributeNamespaceSelector = /*@__PURE__*/ proto3.makeMessageType( + "policy.AttributeNamespaceSelector", + () => [ + { no: 10, name: "with_attributes", kind: "message", T: AttributeNamespaceSelector_AttributeSelector }, + ], +); + +/** + * @generated from message policy.AttributeNamespaceSelector.AttributeSelector + */ +export const AttributeNamespaceSelector_AttributeSelector = /*@__PURE__*/ proto3.makeMessageType( + "policy.AttributeNamespaceSelector.AttributeSelector", + () => [ + { no: 1, name: "with_key_access_grants", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 10, name: "with_values", kind: "message", T: AttributeNamespaceSelector_AttributeSelector_ValueSelector }, + ], + {localName: "AttributeNamespaceSelector_AttributeSelector"}, +); + +/** + * @generated from message policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector + */ +export const AttributeNamespaceSelector_AttributeSelector_ValueSelector = /*@__PURE__*/ proto3.makeMessageType( + "policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector", + () => [ + { no: 1, name: "with_key_access_grants", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 2, name: "with_subject_maps", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 3, name: "with_resource_maps", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + ], + {localName: "AttributeNamespaceSelector_AttributeSelector_ValueSelector"}, +); + +/** + * @generated from message policy.AttributeDefinitionSelector + */ +export const AttributeDefinitionSelector = /*@__PURE__*/ proto3.makeMessageType( + "policy.AttributeDefinitionSelector", + () => [ + { no: 1, name: "with_key_access_grants", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 10, name: "with_namespace", kind: "message", T: AttributeDefinitionSelector_NamespaceSelector }, + { no: 11, name: "with_values", kind: "message", T: AttributeDefinitionSelector_ValueSelector }, + ], +); + +/** + * @generated from message policy.AttributeDefinitionSelector.NamespaceSelector + */ +export const AttributeDefinitionSelector_NamespaceSelector = /*@__PURE__*/ proto3.makeMessageType( + "policy.AttributeDefinitionSelector.NamespaceSelector", + [], + {localName: "AttributeDefinitionSelector_NamespaceSelector"}, +); + +/** + * @generated from message policy.AttributeDefinitionSelector.ValueSelector + */ +export const AttributeDefinitionSelector_ValueSelector = /*@__PURE__*/ proto3.makeMessageType( + "policy.AttributeDefinitionSelector.ValueSelector", + () => [ + { no: 1, name: "with_key_access_grants", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 2, name: "with_subject_maps", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 3, name: "with_resource_maps", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + ], + {localName: "AttributeDefinitionSelector_ValueSelector"}, +); + +/** + * @generated from message policy.AttributeValueSelector + */ +export const AttributeValueSelector = /*@__PURE__*/ proto3.makeMessageType( + "policy.AttributeValueSelector", + () => [ + { no: 1, name: "with_key_access_grants", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 2, name: "with_subject_maps", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 3, name: "with_resource_maps", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 10, name: "with_attribute", kind: "message", T: AttributeValueSelector_AttributeSelector }, + ], +); + +/** + * @generated from message policy.AttributeValueSelector.AttributeSelector + */ +export const AttributeValueSelector_AttributeSelector = /*@__PURE__*/ proto3.makeMessageType( + "policy.AttributeValueSelector.AttributeSelector", + () => [ + { no: 1, name: "with_key_access_grants", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 10, name: "with_namespace", kind: "message", T: AttributeValueSelector_AttributeSelector_NamespaceSelector }, + ], + {localName: "AttributeValueSelector_AttributeSelector"}, +); + +/** + * @generated from message policy.AttributeValueSelector.AttributeSelector.NamespaceSelector + */ +export const AttributeValueSelector_AttributeSelector_NamespaceSelector = /*@__PURE__*/ proto3.makeMessageType( + "policy.AttributeValueSelector.AttributeSelector.NamespaceSelector", + [], + {localName: "AttributeValueSelector_AttributeSelector_NamespaceSelector"}, +); + diff --git a/lib/src/platform/policy/subjectmapping/subject_mapping_connect.d.ts b/lib/src/platform/policy/subjectmapping/subject_mapping_connect.d.ts new file mode 100644 index 00000000..80e62848 --- /dev/null +++ b/lib/src/platform/policy/subjectmapping/subject_mapping_connect.d.ts @@ -0,0 +1,118 @@ +// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=js+dts,import_extension=none" +// @generated from file policy/subjectmapping/subject_mapping.proto (package policy.subjectmapping, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { CreateSubjectConditionSetRequest, CreateSubjectConditionSetResponse, CreateSubjectMappingRequest, CreateSubjectMappingResponse, DeleteSubjectConditionSetRequest, DeleteSubjectConditionSetResponse, DeleteSubjectMappingRequest, DeleteSubjectMappingResponse, GetSubjectConditionSetRequest, GetSubjectConditionSetResponse, GetSubjectMappingRequest, GetSubjectMappingResponse, ListSubjectConditionSetsRequest, ListSubjectConditionSetsResponse, ListSubjectMappingsRequest, ListSubjectMappingsResponse, MatchSubjectMappingsRequest, MatchSubjectMappingsResponse, UpdateSubjectConditionSetRequest, UpdateSubjectConditionSetResponse, UpdateSubjectMappingRequest, UpdateSubjectMappingResponse } from "./subject_mapping_pb"; +import { MethodKind } from "@bufbuild/protobuf"; + +/** + * @generated from service policy.subjectmapping.SubjectMappingService + */ +export declare const SubjectMappingService: { + readonly typeName: "policy.subjectmapping.SubjectMappingService", + readonly methods: { + /** + * Find matching Subject Mappings for a given Subject + * + * @generated from rpc policy.subjectmapping.SubjectMappingService.MatchSubjectMappings + */ + readonly matchSubjectMappings: { + readonly name: "MatchSubjectMappings", + readonly I: typeof MatchSubjectMappingsRequest, + readonly O: typeof MatchSubjectMappingsResponse, + readonly kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.subjectmapping.SubjectMappingService.ListSubjectMappings + */ + readonly listSubjectMappings: { + readonly name: "ListSubjectMappings", + readonly I: typeof ListSubjectMappingsRequest, + readonly O: typeof ListSubjectMappingsResponse, + readonly kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.subjectmapping.SubjectMappingService.GetSubjectMapping + */ + readonly getSubjectMapping: { + readonly name: "GetSubjectMapping", + readonly I: typeof GetSubjectMappingRequest, + readonly O: typeof GetSubjectMappingResponse, + readonly kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.subjectmapping.SubjectMappingService.CreateSubjectMapping + */ + readonly createSubjectMapping: { + readonly name: "CreateSubjectMapping", + readonly I: typeof CreateSubjectMappingRequest, + readonly O: typeof CreateSubjectMappingResponse, + readonly kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.subjectmapping.SubjectMappingService.UpdateSubjectMapping + */ + readonly updateSubjectMapping: { + readonly name: "UpdateSubjectMapping", + readonly I: typeof UpdateSubjectMappingRequest, + readonly O: typeof UpdateSubjectMappingResponse, + readonly kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.subjectmapping.SubjectMappingService.DeleteSubjectMapping + */ + readonly deleteSubjectMapping: { + readonly name: "DeleteSubjectMapping", + readonly I: typeof DeleteSubjectMappingRequest, + readonly O: typeof DeleteSubjectMappingResponse, + readonly kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.subjectmapping.SubjectMappingService.ListSubjectConditionSets + */ + readonly listSubjectConditionSets: { + readonly name: "ListSubjectConditionSets", + readonly I: typeof ListSubjectConditionSetsRequest, + readonly O: typeof ListSubjectConditionSetsResponse, + readonly kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.subjectmapping.SubjectMappingService.GetSubjectConditionSet + */ + readonly getSubjectConditionSet: { + readonly name: "GetSubjectConditionSet", + readonly I: typeof GetSubjectConditionSetRequest, + readonly O: typeof GetSubjectConditionSetResponse, + readonly kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.subjectmapping.SubjectMappingService.CreateSubjectConditionSet + */ + readonly createSubjectConditionSet: { + readonly name: "CreateSubjectConditionSet", + readonly I: typeof CreateSubjectConditionSetRequest, + readonly O: typeof CreateSubjectConditionSetResponse, + readonly kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.subjectmapping.SubjectMappingService.UpdateSubjectConditionSet + */ + readonly updateSubjectConditionSet: { + readonly name: "UpdateSubjectConditionSet", + readonly I: typeof UpdateSubjectConditionSetRequest, + readonly O: typeof UpdateSubjectConditionSetResponse, + readonly kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.subjectmapping.SubjectMappingService.DeleteSubjectConditionSet + */ + readonly deleteSubjectConditionSet: { + readonly name: "DeleteSubjectConditionSet", + readonly I: typeof DeleteSubjectConditionSetRequest, + readonly O: typeof DeleteSubjectConditionSetResponse, + readonly kind: MethodKind.Unary, + }, + } +}; + diff --git a/lib/src/platform/policy/subjectmapping/subject_mapping_connect.js b/lib/src/platform/policy/subjectmapping/subject_mapping_connect.js new file mode 100644 index 00000000..16b1e1a7 --- /dev/null +++ b/lib/src/platform/policy/subjectmapping/subject_mapping_connect.js @@ -0,0 +1,118 @@ +// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=js+dts,import_extension=none" +// @generated from file policy/subjectmapping/subject_mapping.proto (package policy.subjectmapping, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { CreateSubjectConditionSetRequest, CreateSubjectConditionSetResponse, CreateSubjectMappingRequest, CreateSubjectMappingResponse, DeleteSubjectConditionSetRequest, DeleteSubjectConditionSetResponse, DeleteSubjectMappingRequest, DeleteSubjectMappingResponse, GetSubjectConditionSetRequest, GetSubjectConditionSetResponse, GetSubjectMappingRequest, GetSubjectMappingResponse, ListSubjectConditionSetsRequest, ListSubjectConditionSetsResponse, ListSubjectMappingsRequest, ListSubjectMappingsResponse, MatchSubjectMappingsRequest, MatchSubjectMappingsResponse, UpdateSubjectConditionSetRequest, UpdateSubjectConditionSetResponse, UpdateSubjectMappingRequest, UpdateSubjectMappingResponse } from "./subject_mapping_pb"; +import { MethodKind } from "@bufbuild/protobuf"; + +/** + * @generated from service policy.subjectmapping.SubjectMappingService + */ +export const SubjectMappingService = { + typeName: "policy.subjectmapping.SubjectMappingService", + methods: { + /** + * Find matching Subject Mappings for a given Subject + * + * @generated from rpc policy.subjectmapping.SubjectMappingService.MatchSubjectMappings + */ + matchSubjectMappings: { + name: "MatchSubjectMappings", + I: MatchSubjectMappingsRequest, + O: MatchSubjectMappingsResponse, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.subjectmapping.SubjectMappingService.ListSubjectMappings + */ + listSubjectMappings: { + name: "ListSubjectMappings", + I: ListSubjectMappingsRequest, + O: ListSubjectMappingsResponse, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.subjectmapping.SubjectMappingService.GetSubjectMapping + */ + getSubjectMapping: { + name: "GetSubjectMapping", + I: GetSubjectMappingRequest, + O: GetSubjectMappingResponse, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.subjectmapping.SubjectMappingService.CreateSubjectMapping + */ + createSubjectMapping: { + name: "CreateSubjectMapping", + I: CreateSubjectMappingRequest, + O: CreateSubjectMappingResponse, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.subjectmapping.SubjectMappingService.UpdateSubjectMapping + */ + updateSubjectMapping: { + name: "UpdateSubjectMapping", + I: UpdateSubjectMappingRequest, + O: UpdateSubjectMappingResponse, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.subjectmapping.SubjectMappingService.DeleteSubjectMapping + */ + deleteSubjectMapping: { + name: "DeleteSubjectMapping", + I: DeleteSubjectMappingRequest, + O: DeleteSubjectMappingResponse, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.subjectmapping.SubjectMappingService.ListSubjectConditionSets + */ + listSubjectConditionSets: { + name: "ListSubjectConditionSets", + I: ListSubjectConditionSetsRequest, + O: ListSubjectConditionSetsResponse, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.subjectmapping.SubjectMappingService.GetSubjectConditionSet + */ + getSubjectConditionSet: { + name: "GetSubjectConditionSet", + I: GetSubjectConditionSetRequest, + O: GetSubjectConditionSetResponse, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.subjectmapping.SubjectMappingService.CreateSubjectConditionSet + */ + createSubjectConditionSet: { + name: "CreateSubjectConditionSet", + I: CreateSubjectConditionSetRequest, + O: CreateSubjectConditionSetResponse, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.subjectmapping.SubjectMappingService.UpdateSubjectConditionSet + */ + updateSubjectConditionSet: { + name: "UpdateSubjectConditionSet", + I: UpdateSubjectConditionSetRequest, + O: UpdateSubjectConditionSetResponse, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc policy.subjectmapping.SubjectMappingService.DeleteSubjectConditionSet + */ + deleteSubjectConditionSet: { + name: "DeleteSubjectConditionSet", + I: DeleteSubjectConditionSetRequest, + O: DeleteSubjectConditionSetResponse, + kind: MethodKind.Unary, + }, + } +}; + diff --git a/lib/src/platform/policy/subjectmapping/subject_mapping_pb.js b/lib/src/platform/policy/subjectmapping/subject_mapping_pb.js new file mode 100644 index 00000000..a039063d --- /dev/null +++ b/lib/src/platform/policy/subjectmapping/subject_mapping_pb.js @@ -0,0 +1,260 @@ +// @generated by protoc-gen-es v1.9.0 with parameter "target=js+dts,import_extension=none" +// @generated from file policy/subjectmapping/subject_mapping.proto (package policy.subjectmapping, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { proto3 } from "@bufbuild/protobuf"; +import { Action, SubjectConditionSet, SubjectMapping, SubjectProperty, SubjectSet } from "../objects_pb"; +import { MetadataMutable, MetadataUpdateEnum } from "../../common/common_pb"; + +/** + * MatchSubjectMappingsRequest liberally returns a list of SubjectMappings based on the provided SubjectProperties. The SubjectMappings are returned + * if there is any single condition found among the structures that matches for one of the provided properties: + * 1. The external selector value, external value, and an IN operator + * 2. The external selector value, _no_ external value, and a NOT_IN operator + * + * Without this filtering, if a selector value was something like '.emailAddress' or '.username', every Subject is probably going to relate to that mapping + * in some way or another, potentially matching every single attribute in the DB if a policy admin has relied heavily on that field. There is no + * logic applied beyond a single condition within the query to avoid business logic interpreting the supplied conditions beyond the bare minimum + * initial filter. + * + * NOTE: if you have any issues, debug logs are available within the service to help identify why a mapping was or was not returned. + * + * @generated from message policy.subjectmapping.MatchSubjectMappingsRequest + */ +export const MatchSubjectMappingsRequest = /*@__PURE__*/ proto3.makeMessageType( + "policy.subjectmapping.MatchSubjectMappingsRequest", + () => [ + { no: 1, name: "subject_properties", kind: "message", T: SubjectProperty, repeated: true }, + ], +); + +/** + * @generated from message policy.subjectmapping.MatchSubjectMappingsResponse + */ +export const MatchSubjectMappingsResponse = /*@__PURE__*/ proto3.makeMessageType( + "policy.subjectmapping.MatchSubjectMappingsResponse", + () => [ + { no: 1, name: "subject_mappings", kind: "message", T: SubjectMapping, repeated: true }, + ], +); + +/** + * @generated from message policy.subjectmapping.GetSubjectMappingRequest + */ +export const GetSubjectMappingRequest = /*@__PURE__*/ proto3.makeMessageType( + "policy.subjectmapping.GetSubjectMappingRequest", + () => [ + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from message policy.subjectmapping.GetSubjectMappingResponse + */ +export const GetSubjectMappingResponse = /*@__PURE__*/ proto3.makeMessageType( + "policy.subjectmapping.GetSubjectMappingResponse", + () => [ + { no: 1, name: "subject_mapping", kind: "message", T: SubjectMapping }, + ], +); + +/** + * @generated from message policy.subjectmapping.ListSubjectMappingsRequest + */ +export const ListSubjectMappingsRequest = /*@__PURE__*/ proto3.makeMessageType( + "policy.subjectmapping.ListSubjectMappingsRequest", + [], +); + +/** + * @generated from message policy.subjectmapping.ListSubjectMappingsResponse + */ +export const ListSubjectMappingsResponse = /*@__PURE__*/ proto3.makeMessageType( + "policy.subjectmapping.ListSubjectMappingsResponse", + () => [ + { no: 1, name: "subject_mappings", kind: "message", T: SubjectMapping, repeated: true }, + ], +); + +/** + * @generated from message policy.subjectmapping.CreateSubjectMappingRequest + */ +export const CreateSubjectMappingRequest = /*@__PURE__*/ proto3.makeMessageType( + "policy.subjectmapping.CreateSubjectMappingRequest", + () => [ + { no: 1, name: "attribute_value_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "actions", kind: "message", T: Action, repeated: true }, + { no: 3, name: "existing_subject_condition_set_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "new_subject_condition_set", kind: "message", T: SubjectConditionSetCreate }, + { no: 100, name: "metadata", kind: "message", T: MetadataMutable }, + ], +); + +/** + * @generated from message policy.subjectmapping.CreateSubjectMappingResponse + */ +export const CreateSubjectMappingResponse = /*@__PURE__*/ proto3.makeMessageType( + "policy.subjectmapping.CreateSubjectMappingResponse", + () => [ + { no: 1, name: "subject_mapping", kind: "message", T: SubjectMapping }, + ], +); + +/** + * @generated from message policy.subjectmapping.UpdateSubjectMappingRequest + */ +export const UpdateSubjectMappingRequest = /*@__PURE__*/ proto3.makeMessageType( + "policy.subjectmapping.UpdateSubjectMappingRequest", + () => [ + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "subject_condition_set_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "actions", kind: "message", T: Action, repeated: true }, + { no: 100, name: "metadata", kind: "message", T: MetadataMutable }, + { no: 101, name: "metadata_update_behavior", kind: "enum", T: proto3.getEnumType(MetadataUpdateEnum) }, + ], +); + +/** + * @generated from message policy.subjectmapping.UpdateSubjectMappingResponse + */ +export const UpdateSubjectMappingResponse = /*@__PURE__*/ proto3.makeMessageType( + "policy.subjectmapping.UpdateSubjectMappingResponse", + () => [ + { no: 1, name: "subject_mapping", kind: "message", T: SubjectMapping }, + ], +); + +/** + * @generated from message policy.subjectmapping.DeleteSubjectMappingRequest + */ +export const DeleteSubjectMappingRequest = /*@__PURE__*/ proto3.makeMessageType( + "policy.subjectmapping.DeleteSubjectMappingRequest", + () => [ + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from message policy.subjectmapping.DeleteSubjectMappingResponse + */ +export const DeleteSubjectMappingResponse = /*@__PURE__*/ proto3.makeMessageType( + "policy.subjectmapping.DeleteSubjectMappingResponse", + () => [ + { no: 1, name: "subject_mapping", kind: "message", T: SubjectMapping }, + ], +); + +/** + * @generated from message policy.subjectmapping.GetSubjectConditionSetRequest + */ +export const GetSubjectConditionSetRequest = /*@__PURE__*/ proto3.makeMessageType( + "policy.subjectmapping.GetSubjectConditionSetRequest", + () => [ + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from message policy.subjectmapping.GetSubjectConditionSetResponse + */ +export const GetSubjectConditionSetResponse = /*@__PURE__*/ proto3.makeMessageType( + "policy.subjectmapping.GetSubjectConditionSetResponse", + () => [ + { no: 1, name: "subject_condition_set", kind: "message", T: SubjectConditionSet }, + { no: 2, name: "associated_subject_mappings", kind: "message", T: SubjectMapping, repeated: true }, + ], +); + +/** + * @generated from message policy.subjectmapping.ListSubjectConditionSetsRequest + */ +export const ListSubjectConditionSetsRequest = /*@__PURE__*/ proto3.makeMessageType( + "policy.subjectmapping.ListSubjectConditionSetsRequest", + [], +); + +/** + * @generated from message policy.subjectmapping.ListSubjectConditionSetsResponse + */ +export const ListSubjectConditionSetsResponse = /*@__PURE__*/ proto3.makeMessageType( + "policy.subjectmapping.ListSubjectConditionSetsResponse", + () => [ + { no: 1, name: "subject_condition_sets", kind: "message", T: SubjectConditionSet, repeated: true }, + ], +); + +/** + * @generated from message policy.subjectmapping.SubjectConditionSetCreate + */ +export const SubjectConditionSetCreate = /*@__PURE__*/ proto3.makeMessageType( + "policy.subjectmapping.SubjectConditionSetCreate", + () => [ + { no: 1, name: "subject_sets", kind: "message", T: SubjectSet, repeated: true }, + { no: 100, name: "metadata", kind: "message", T: MetadataMutable }, + ], +); + +/** + * @generated from message policy.subjectmapping.CreateSubjectConditionSetRequest + */ +export const CreateSubjectConditionSetRequest = /*@__PURE__*/ proto3.makeMessageType( + "policy.subjectmapping.CreateSubjectConditionSetRequest", + () => [ + { no: 1, name: "subject_condition_set", kind: "message", T: SubjectConditionSetCreate }, + ], +); + +/** + * @generated from message policy.subjectmapping.CreateSubjectConditionSetResponse + */ +export const CreateSubjectConditionSetResponse = /*@__PURE__*/ proto3.makeMessageType( + "policy.subjectmapping.CreateSubjectConditionSetResponse", + () => [ + { no: 1, name: "subject_condition_set", kind: "message", T: SubjectConditionSet }, + ], +); + +/** + * @generated from message policy.subjectmapping.UpdateSubjectConditionSetRequest + */ +export const UpdateSubjectConditionSetRequest = /*@__PURE__*/ proto3.makeMessageType( + "policy.subjectmapping.UpdateSubjectConditionSetRequest", + () => [ + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "subject_sets", kind: "message", T: SubjectSet, repeated: true }, + { no: 100, name: "metadata", kind: "message", T: MetadataMutable }, + { no: 101, name: "metadata_update_behavior", kind: "enum", T: proto3.getEnumType(MetadataUpdateEnum) }, + ], +); + +/** + * @generated from message policy.subjectmapping.UpdateSubjectConditionSetResponse + */ +export const UpdateSubjectConditionSetResponse = /*@__PURE__*/ proto3.makeMessageType( + "policy.subjectmapping.UpdateSubjectConditionSetResponse", + () => [ + { no: 1, name: "subject_condition_set", kind: "message", T: SubjectConditionSet }, + ], +); + +/** + * @generated from message policy.subjectmapping.DeleteSubjectConditionSetRequest + */ +export const DeleteSubjectConditionSetRequest = /*@__PURE__*/ proto3.makeMessageType( + "policy.subjectmapping.DeleteSubjectConditionSetRequest", + () => [ + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from message policy.subjectmapping.DeleteSubjectConditionSetResponse + */ +export const DeleteSubjectConditionSetResponse = /*@__PURE__*/ proto3.makeMessageType( + "policy.subjectmapping.DeleteSubjectConditionSetResponse", + () => [ + { no: 1, name: "subject_condition_set", kind: "message", T: SubjectConditionSet }, + ], +); + diff --git a/lib/src/platform/wellknownconfiguration/wellknown_configuration_connect.d.ts b/lib/src/platform/wellknownconfiguration/wellknown_configuration_connect.d.ts new file mode 100644 index 00000000..98ae9ac1 --- /dev/null +++ b/lib/src/platform/wellknownconfiguration/wellknown_configuration_connect.d.ts @@ -0,0 +1,26 @@ +// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=js+dts,import_extension=none" +// @generated from file wellknownconfiguration/wellknown_configuration.proto (package wellknownconfiguration, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { GetWellKnownConfigurationRequest, GetWellKnownConfigurationResponse } from "./wellknown_configuration_pb"; +import { MethodKind } from "@bufbuild/protobuf"; + +/** + * @generated from service wellknownconfiguration.WellKnownService + */ +export declare const WellKnownService: { + readonly typeName: "wellknownconfiguration.WellKnownService", + readonly methods: { + /** + * @generated from rpc wellknownconfiguration.WellKnownService.GetWellKnownConfiguration + */ + readonly getWellKnownConfiguration: { + readonly name: "GetWellKnownConfiguration", + readonly I: typeof GetWellKnownConfigurationRequest, + readonly O: typeof GetWellKnownConfigurationResponse, + readonly kind: MethodKind.Unary, + }, + } +}; + diff --git a/lib/src/platform/wellknownconfiguration/wellknown_configuration_connect.js b/lib/src/platform/wellknownconfiguration/wellknown_configuration_connect.js new file mode 100644 index 00000000..8b0687b2 --- /dev/null +++ b/lib/src/platform/wellknownconfiguration/wellknown_configuration_connect.js @@ -0,0 +1,26 @@ +// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=js+dts,import_extension=none" +// @generated from file wellknownconfiguration/wellknown_configuration.proto (package wellknownconfiguration, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { GetWellKnownConfigurationRequest, GetWellKnownConfigurationResponse } from "./wellknown_configuration_pb"; +import { MethodKind } from "@bufbuild/protobuf"; + +/** + * @generated from service wellknownconfiguration.WellKnownService + */ +export const WellKnownService = { + typeName: "wellknownconfiguration.WellKnownService", + methods: { + /** + * @generated from rpc wellknownconfiguration.WellKnownService.GetWellKnownConfiguration + */ + getWellKnownConfiguration: { + name: "GetWellKnownConfiguration", + I: GetWellKnownConfigurationRequest, + O: GetWellKnownConfigurationResponse, + kind: MethodKind.Unary, + }, + } +}; + diff --git a/lib/src/platform/wellknownconfiguration/wellknown_configuration_pb.js b/lib/src/platform/wellknownconfiguration/wellknown_configuration_pb.js new file mode 100644 index 00000000..6700d024 --- /dev/null +++ b/lib/src/platform/wellknownconfiguration/wellknown_configuration_pb.js @@ -0,0 +1,35 @@ +// @generated by protoc-gen-es v1.9.0 with parameter "target=js+dts,import_extension=none" +// @generated from file wellknownconfiguration/wellknown_configuration.proto (package wellknownconfiguration, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { proto3, Struct } from "@bufbuild/protobuf"; + +/** + * @generated from message wellknownconfiguration.WellKnownConfig + */ +export const WellKnownConfig = /*@__PURE__*/ proto3.makeMessageType( + "wellknownconfiguration.WellKnownConfig", + () => [ + { no: 1, name: "configuration", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: Struct} }, + ], +); + +/** + * @generated from message wellknownconfiguration.GetWellKnownConfigurationRequest + */ +export const GetWellKnownConfigurationRequest = /*@__PURE__*/ proto3.makeMessageType( + "wellknownconfiguration.GetWellKnownConfigurationRequest", + [], +); + +/** + * @generated from message wellknownconfiguration.GetWellKnownConfigurationResponse + */ +export const GetWellKnownConfigurationResponse = /*@__PURE__*/ proto3.makeMessageType( + "wellknownconfiguration.GetWellKnownConfigurationResponse", + () => [ + { no: 1, name: "configuration", kind: "message", T: Struct }, + ], +); + From e81aa5eac08c3de7400d00c0de69d4ec24417cec Mon Sep 17 00:00:00 2001 From: jakedoublev Date: Wed, 22 May 2024 15:12:20 -0700 Subject: [PATCH 2/4] update buf.gen.yaml and proto generation script to clean gencode on run --- buf.gen.yaml | 19 +- .../AuthorizationServiceClientPb.ts | 140 -- .../authorization/authorization_connect.ts | 39 - .../authorization/authorization_pb.d.ts | 974 ++++++--- .../authorization/authorization_pb.ts | 817 ------- lib/src/platform/common/common_pb.d.ts | 179 +- lib/src/platform/common/common_pb.ts | 194 -- .../Entity_resolutionServiceClientPb.ts | 90 - .../entity_resolution_connect.ts | 25 - .../entity_resolution_pb.d.ts | 345 ++- .../entityresolution/entity_resolution_pb.ts | 263 --- lib/src/platform/kas/KasServiceClientPb.ts | 217 -- lib/src/platform/kas/kas_connect.ts | 66 - lib/src/platform/kas/kas_pb.d.ts | 330 +-- lib/src/platform/kas/kas_pb.ts | 336 --- .../attributes/AttributesServiceClientPb.ts | 790 ------- .../policy/attributes/attributes_connect.ts | 198 -- .../policy/attributes/attributes_pb.d.ts | 1931 ++++++++--------- .../policy/attributes/attributes_pb.ts | 1836 ---------------- ...y_access_server_registryServiceClientPb.ts | 290 --- .../key_access_server_registry_connect.ts | 72 - .../key_access_server_registry_pb.d.ts | 545 +++-- .../key_access_server_registry_pb.ts | 548 ----- .../namespaces/NamespacesServiceClientPb.ts | 290 --- .../policy/namespaces/namespaces_connect.ts | 72 - .../policy/namespaces/namespaces_pb.d.ts | 480 ++-- .../policy/namespaces/namespaces_pb.ts | 517 ----- lib/src/platform/policy/objects_pb.d.ts | 1123 ++++++---- lib/src/platform/policy/objects_pb.ts | 1033 --------- .../Resource_mappingServiceClientPb.ts | 290 --- .../resource_mapping_connect.ts | 269 --- .../resourcemapping/resource_mapping_pb.d.ts | 576 +++-- .../resourcemapping/resource_mapping_pb.ts | 579 ----- lib/src/platform/policy/selectors_pb.d.ts | 506 ++--- lib/src/platform/policy/selectors_pb.ts | 586 ----- .../Subject_mappingServiceClientPb.ts | 590 ----- .../subjectmapping/subject_mapping_connect.ts | 140 -- .../subjectmapping/subject_mapping_pb.d.ts | 1294 ++++++----- .../subjectmapping/subject_mapping_pb.ts | 1325 ----------- .../Wellknown_configurationServiceClientPb.ts | 92 - .../wellknown_configuration_connect.ts | 28 - .../wellknown_configuration_pb.d.ts | 135 +- .../wellknown_configuration_pb.ts | 160 -- scripts/platform.sh | 4 +- 44 files changed, 4513 insertions(+), 15820 deletions(-) delete mode 100644 lib/src/platform/authorization/AuthorizationServiceClientPb.ts delete mode 100644 lib/src/platform/authorization/authorization_connect.ts delete mode 100644 lib/src/platform/authorization/authorization_pb.ts delete mode 100644 lib/src/platform/common/common_pb.ts delete mode 100644 lib/src/platform/entityresolution/Entity_resolutionServiceClientPb.ts delete mode 100644 lib/src/platform/entityresolution/entity_resolution_connect.ts delete mode 100644 lib/src/platform/entityresolution/entity_resolution_pb.ts delete mode 100644 lib/src/platform/kas/KasServiceClientPb.ts delete mode 100644 lib/src/platform/kas/kas_connect.ts delete mode 100644 lib/src/platform/kas/kas_pb.ts delete mode 100644 lib/src/platform/policy/attributes/AttributesServiceClientPb.ts delete mode 100644 lib/src/platform/policy/attributes/attributes_connect.ts delete mode 100644 lib/src/platform/policy/attributes/attributes_pb.ts delete mode 100644 lib/src/platform/policy/kasregistry/Key_access_server_registryServiceClientPb.ts delete mode 100644 lib/src/platform/policy/kasregistry/key_access_server_registry_connect.ts delete mode 100644 lib/src/platform/policy/kasregistry/key_access_server_registry_pb.ts delete mode 100644 lib/src/platform/policy/namespaces/NamespacesServiceClientPb.ts delete mode 100644 lib/src/platform/policy/namespaces/namespaces_connect.ts delete mode 100644 lib/src/platform/policy/namespaces/namespaces_pb.ts delete mode 100644 lib/src/platform/policy/objects_pb.ts delete mode 100644 lib/src/platform/policy/resourcemapping/Resource_mappingServiceClientPb.ts delete mode 100644 lib/src/platform/policy/resourcemapping/resource_mapping_connect.ts delete mode 100644 lib/src/platform/policy/resourcemapping/resource_mapping_pb.ts delete mode 100644 lib/src/platform/policy/selectors_pb.ts delete mode 100644 lib/src/platform/policy/subjectmapping/Subject_mappingServiceClientPb.ts delete mode 100644 lib/src/platform/policy/subjectmapping/subject_mapping_connect.ts delete mode 100644 lib/src/platform/policy/subjectmapping/subject_mapping_pb.ts delete mode 100644 lib/src/platform/wellknownconfiguration/Wellknown_configurationServiceClientPb.ts delete mode 100644 lib/src/platform/wellknownconfiguration/wellknown_configuration_connect.ts delete mode 100644 lib/src/platform/wellknownconfiguration/wellknown_configuration_pb.ts diff --git a/buf.gen.yaml b/buf.gen.yaml index 100bba02..055212e8 100644 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -1,12 +1,13 @@ # Learn more: https://docs.buf.build/configuration/v1/buf-gen-yaml version: v1 plugins: - - name: es - opt: target=ts - out: lib/src/platform - - name: connect-es - out: lib/src/platform - opt: target=ts - - plugin: buf.build/grpc/web - out: lib/src/platform - opt: import_style=typescript,mode=grpcwebtext + - plugin: es + out: lib/src/platform + opt: + - target=js+dts + - import_extension=none + - plugin: connect-es + out: lib/src/platform + opt: + - target=js+dts + - import_extension=none diff --git a/lib/src/platform/authorization/AuthorizationServiceClientPb.ts b/lib/src/platform/authorization/AuthorizationServiceClientPb.ts deleted file mode 100644 index 350c9d47..00000000 --- a/lib/src/platform/authorization/AuthorizationServiceClientPb.ts +++ /dev/null @@ -1,140 +0,0 @@ -/** - * @fileoverview gRPC-Web generated client stub for authorization - * @enhanceable - * @public - */ - -// Code generated by protoc-gen-grpc-web. DO NOT EDIT. -// versions: -// protoc-gen-grpc-web v1.5.0 -// protoc v0.0.0 -// source: authorization/authorization.proto - -/* eslint-disable */ -// @ts-nocheck - -import * as grpcWeb from 'grpc-web'; - -import * as authorization_authorization_pb from '../authorization/authorization_pb'; // proto import: "authorization/authorization.proto" - -export class AuthorizationServiceClient { - client_: grpcWeb.AbstractClientBase; - hostname_: string; - credentials_: null | { [index: string]: string }; - options_: null | { [index: string]: any }; - - constructor( - hostname: string, - credentials?: null | { [index: string]: string }, - options?: null | { [index: string]: any } - ) { - if (!options) options = {}; - if (!credentials) credentials = {}; - options['format'] = 'binary'; - - this.client_ = new grpcWeb.GrpcWebClientBase(options); - this.hostname_ = hostname.replace(/\/+$/, ''); - this.credentials_ = credentials; - this.options_ = options; - } - - methodDescriptorGetDecisions = new grpcWeb.MethodDescriptor( - '/authorization.AuthorizationService/GetDecisions', - grpcWeb.MethodType.UNARY, - authorization_authorization_pb.GetDecisionsRequest, - authorization_authorization_pb.GetDecisionsResponse, - (request: authorization_authorization_pb.GetDecisionsRequest) => { - return request.serializeBinary(); - }, - authorization_authorization_pb.GetDecisionsResponse.deserializeBinary - ); - - getDecisions( - request: authorization_authorization_pb.GetDecisionsRequest, - metadata?: grpcWeb.Metadata | null - ): Promise; - - getDecisions( - request: authorization_authorization_pb.GetDecisionsRequest, - metadata: grpcWeb.Metadata | null, - callback: ( - err: grpcWeb.RpcError, - response: authorization_authorization_pb.GetDecisionsResponse - ) => void - ): grpcWeb.ClientReadableStream; - - getDecisions( - request: authorization_authorization_pb.GetDecisionsRequest, - metadata?: grpcWeb.Metadata | null, - callback?: ( - err: grpcWeb.RpcError, - response: authorization_authorization_pb.GetDecisionsResponse - ) => void - ) { - if (callback !== undefined) { - return this.client_.rpcCall( - this.hostname_ + '/authorization.AuthorizationService/GetDecisions', - request, - metadata || {}, - this.methodDescriptorGetDecisions, - callback - ); - } - return this.client_.unaryCall( - this.hostname_ + '/authorization.AuthorizationService/GetDecisions', - request, - metadata || {}, - this.methodDescriptorGetDecisions - ); - } - - methodDescriptorGetEntitlements = new grpcWeb.MethodDescriptor( - '/authorization.AuthorizationService/GetEntitlements', - grpcWeb.MethodType.UNARY, - authorization_authorization_pb.GetEntitlementsRequest, - authorization_authorization_pb.GetEntitlementsResponse, - (request: authorization_authorization_pb.GetEntitlementsRequest) => { - return request.serializeBinary(); - }, - authorization_authorization_pb.GetEntitlementsResponse.deserializeBinary - ); - - getEntitlements( - request: authorization_authorization_pb.GetEntitlementsRequest, - metadata?: grpcWeb.Metadata | null - ): Promise; - - getEntitlements( - request: authorization_authorization_pb.GetEntitlementsRequest, - metadata: grpcWeb.Metadata | null, - callback: ( - err: grpcWeb.RpcError, - response: authorization_authorization_pb.GetEntitlementsResponse - ) => void - ): grpcWeb.ClientReadableStream; - - getEntitlements( - request: authorization_authorization_pb.GetEntitlementsRequest, - metadata?: grpcWeb.Metadata | null, - callback?: ( - err: grpcWeb.RpcError, - response: authorization_authorization_pb.GetEntitlementsResponse - ) => void - ) { - if (callback !== undefined) { - return this.client_.rpcCall( - this.hostname_ + '/authorization.AuthorizationService/GetEntitlements', - request, - metadata || {}, - this.methodDescriptorGetEntitlements, - callback - ); - } - return this.client_.unaryCall( - this.hostname_ + '/authorization.AuthorizationService/GetEntitlements', - request, - metadata || {}, - this.methodDescriptorGetEntitlements - ); - } -} diff --git a/lib/src/platform/authorization/authorization_connect.ts b/lib/src/platform/authorization/authorization_connect.ts deleted file mode 100644 index 760cd196..00000000 --- a/lib/src/platform/authorization/authorization_connect.ts +++ /dev/null @@ -1,39 +0,0 @@ -// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=ts" -// @generated from file authorization/authorization.proto (package authorization, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { - GetDecisionsRequest, - GetDecisionsResponse, - GetEntitlementsRequest, - GetEntitlementsResponse, -} from './authorization_pb.js'; -import { MethodKind } from '@bufbuild/protobuf'; - -/** - * @generated from service authorization.AuthorizationService - */ -export const AuthorizationService = { - typeName: 'authorization.AuthorizationService', - methods: { - /** - * @generated from rpc authorization.AuthorizationService.GetDecisions - */ - getDecisions: { - name: 'GetDecisions', - I: GetDecisionsRequest, - O: GetDecisionsResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc authorization.AuthorizationService.GetEntitlements - */ - getEntitlements: { - name: 'GetEntitlements', - I: GetEntitlementsRequest, - O: GetEntitlementsResponse, - kind: MethodKind.Unary, - }, - }, -} as const; diff --git a/lib/src/platform/authorization/authorization_pb.d.ts b/lib/src/platform/authorization/authorization_pb.d.ts index 5432853e..7cecbdb2 100644 --- a/lib/src/platform/authorization/authorization_pb.d.ts +++ b/lib/src/platform/authorization/authorization_pb.d.ts @@ -1,359 +1,707 @@ -import * as jspb from 'google-protobuf'; +// @generated by protoc-gen-es v1.9.0 with parameter "target=js+dts,import_extension=none" +// @generated from file authorization/authorization.proto (package authorization, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { Any, BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; +import type { Action } from "../policy/objects_pb"; + +/** + * @generated from message authorization.Token + */ +export declare class Token extends Message { + /** + * ephemeral id for tracking between request and response + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * the token + * + * @generated from field: string jwt = 2; + */ + jwt: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "authorization.Token"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): Token; + + static fromJson(jsonValue: JsonValue, options?: Partial): Token; + + static fromJsonString(jsonString: string, options?: Partial): Token; + + static equals(a: Token | PlainMessage | undefined, b: Token | PlainMessage | undefined): boolean; +} -import * as google_api_annotations_pb from '../google/api/annotations_pb'; // proto import: "google/api/annotations.proto" -import * as google_protobuf_any_pb from 'google-protobuf/google/protobuf/any_pb'; // proto import: "google/protobuf/any.proto" -import * as policy_objects_pb from '../policy/objects_pb'; // proto import: "policy/objects.proto" +/** + * PE (Person Entity) or NPE (Non-Person Entity) + * + * @generated from message authorization.Entity + */ +export declare class Entity extends Message { + /** + * ephemeral id for tracking between request and response + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * Standard entity types supported by the platform + * + * @generated from oneof authorization.Entity.entity_type + */ + entityType: { + /** + * @generated from field: string email_address = 2; + */ + value: string; + case: "emailAddress"; + } | { + /** + * @generated from field: string user_name = 3; + */ + value: string; + case: "userName"; + } | { + /** + * @generated from field: string remote_claims_url = 4; + */ + value: string; + case: "remoteClaimsUrl"; + } | { + /** + * @generated from field: string uuid = 5; + */ + value: string; + case: "uuid"; + } | { + /** + * @generated from field: google.protobuf.Any claims = 6; + */ + value: Any; + case: "claims"; + } | { + /** + * @generated from field: authorization.EntityCustom custom = 7; + */ + value: EntityCustom; + case: "custom"; + } | { + /** + * @generated from field: string client_id = 8; + */ + value: string; + case: "clientId"; + } | { case: undefined; value?: undefined }; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "authorization.Entity"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): Entity; + + static fromJson(jsonValue: JsonValue, options?: Partial): Entity; + + static fromJsonString(jsonString: string, options?: Partial): Entity; + + static equals(a: Entity | PlainMessage | undefined, b: Entity | PlainMessage | undefined): boolean; +} -export class Entity extends jspb.Message { - getId(): string; - setId(value: string): Entity; +/** + * Entity type for custom entities beyond the standard types + * + * @generated from message authorization.EntityCustom + */ +export declare class EntityCustom extends Message { + /** + * @generated from field: google.protobuf.Any extension = 1; + */ + extension?: Any; - getEmailAddress(): string; - setEmailAddress(value: string): Entity; + constructor(data?: PartialMessage); - getUserName(): string; - setUserName(value: string): Entity; + static readonly runtime: typeof proto3; + static readonly typeName = "authorization.EntityCustom"; + static readonly fields: FieldList; - getRemoteClaimsUrl(): string; - setRemoteClaimsUrl(value: string): Entity; + static fromBinary(bytes: Uint8Array, options?: Partial): EntityCustom; - getJwt(): string; - setJwt(value: string): Entity; + static fromJson(jsonValue: JsonValue, options?: Partial): EntityCustom; - getClaims(): google_protobuf_any_pb.Any | undefined; - setClaims(value?: google_protobuf_any_pb.Any): Entity; - hasClaims(): boolean; - clearClaims(): Entity; + static fromJsonString(jsonString: string, options?: Partial): EntityCustom; - getCustom(): EntityCustom | undefined; - setCustom(value?: EntityCustom): Entity; - hasCustom(): boolean; - clearCustom(): Entity; + static equals(a: EntityCustom | PlainMessage | undefined, b: EntityCustom | PlainMessage | undefined): boolean; +} - getClientId(): string; - setClientId(value: string): Entity; +/** + * A set of related PE and NPE + * + * @generated from message authorization.EntityChain + */ +export declare class EntityChain extends Message { + /** + * ephemeral id for tracking between request and response + * + * @generated from field: string id = 1; + */ + id: string; - getEntityTypeCase(): Entity.EntityTypeCase; + /** + * @generated from field: repeated authorization.Entity entities = 2; + */ + entities: Entity[]; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Entity.AsObject; - static toObject(includeInstance: boolean, msg: Entity): Entity.AsObject; - static serializeBinaryToWriter(message: Entity, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Entity; - static deserializeBinaryFromReader(message: Entity, reader: jspb.BinaryReader): Entity; -} + constructor(data?: PartialMessage); -export namespace Entity { - export type AsObject = { - id: string; - emailAddress: string; - userName: string; - remoteClaimsUrl: string; - jwt: string; - claims?: google_protobuf_any_pb.Any.AsObject; - custom?: EntityCustom.AsObject; - clientId: string; - }; - - export enum EntityTypeCase { - ENTITY_TYPE_NOT_SET = 0, - EMAIL_ADDRESS = 2, - USER_NAME = 3, - REMOTE_CLAIMS_URL = 4, - JWT = 5, - CLAIMS = 6, - CUSTOM = 7, - CLIENT_ID = 8, - } -} + static readonly runtime: typeof proto3; + static readonly typeName = "authorization.EntityChain"; + static readonly fields: FieldList; -export class EntityCustom extends jspb.Message { - getExtension(): google_protobuf_any_pb.Any | undefined; - setExtension(value?: google_protobuf_any_pb.Any): EntityCustom; - hasExtension(): boolean; - clearExtension(): EntityCustom; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): EntityCustom.AsObject; - static toObject(includeInstance: boolean, msg: EntityCustom): EntityCustom.AsObject; - static serializeBinaryToWriter(message: EntityCustom, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): EntityCustom; - static deserializeBinaryFromReader( - message: EntityCustom, - reader: jspb.BinaryReader - ): EntityCustom; -} + static fromBinary(bytes: Uint8Array, options?: Partial): EntityChain; -export namespace EntityCustom { - export type AsObject = { - extension?: google_protobuf_any_pb.Any.AsObject; - }; -} + static fromJson(jsonValue: JsonValue, options?: Partial): EntityChain; -export class EntityChain extends jspb.Message { - getId(): string; - setId(value: string): EntityChain; - - getEntitiesList(): Array; - setEntitiesList(value: Array): EntityChain; - clearEntitiesList(): EntityChain; - addEntities(value?: Entity, index?: number): Entity; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): EntityChain.AsObject; - static toObject(includeInstance: boolean, msg: EntityChain): EntityChain.AsObject; - static serializeBinaryToWriter(message: EntityChain, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): EntityChain; - static deserializeBinaryFromReader(message: EntityChain, reader: jspb.BinaryReader): EntityChain; -} + static fromJsonString(jsonString: string, options?: Partial): EntityChain; -export namespace EntityChain { - export type AsObject = { - id: string; - entitiesList: Array; - }; + static equals(a: EntityChain | PlainMessage | undefined, b: EntityChain | PlainMessage | undefined): boolean; } -export class DecisionRequest extends jspb.Message { - getActionsList(): Array; - setActionsList(value: Array): DecisionRequest; - clearActionsList(): DecisionRequest; - addActions(value?: policy_objects_pb.Action, index?: number): policy_objects_pb.Action; - - getEntityChainsList(): Array; - setEntityChainsList(value: Array): DecisionRequest; - clearEntityChainsList(): DecisionRequest; - addEntityChains(value?: EntityChain, index?: number): EntityChain; - - getResourceAttributesList(): Array; - setResourceAttributesList(value: Array): DecisionRequest; - clearResourceAttributesList(): DecisionRequest; - addResourceAttributes(value?: ResourceAttribute, index?: number): ResourceAttribute; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DecisionRequest.AsObject; - static toObject(includeInstance: boolean, msg: DecisionRequest): DecisionRequest.AsObject; - static serializeBinaryToWriter(message: DecisionRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): DecisionRequest; - static deserializeBinaryFromReader( - message: DecisionRequest, - reader: jspb.BinaryReader - ): DecisionRequest; +/** + * + * Example Request Get Decisions to answer the question - Do Bob (represented by entity chain ec1) + * and Alice (represented by entity chain ec2) have TRANSMIT authorization for + * 2 resources; resource1 (attr-set-1) defined by attributes foo:bar resource2 (attr-set-2) defined by attribute foo:bar, color:red ? + * + * { + * "actions": [ + * { + * "standard": "STANDARD_ACTION_TRANSMIT" + * } + * ], + * "entityChains": [ + * { + * "id": "ec1", + * "entities": [ + * { + * "emailAddress": "bob@example.org" + * } + * ] + * }, + * { + * "id": "ec2", + * "entities": [ + * { + * "userName": "alice@example.org" + * } + * ] + * } + * ], + * "resourceAttributes": [ + * { + * "resourceAttributeId": "attr-set-1", + * "attributeFqns": [ + * "https://www.example.org/attr/foo/value/value1" + * ] + * }, + * { + * "resourceAttributeId": "attr-set-2", + * "attributeFqns": [ + * "https://example.net/attr/attr1/value/value1", + * "https://example.net/attr/attr1/value/value2" + * ] + * } + * ] + * } + * + * + * @generated from message authorization.DecisionRequest + */ +export declare class DecisionRequest extends Message { + /** + * @generated from field: repeated policy.Action actions = 1; + */ + actions: Action[]; + + /** + * @generated from field: repeated authorization.EntityChain entity_chains = 2; + */ + entityChains: EntityChain[]; + + /** + * @generated from field: repeated authorization.ResourceAttribute resource_attributes = 3; + */ + resourceAttributes: ResourceAttribute[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "authorization.DecisionRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): DecisionRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): DecisionRequest; + + static fromJsonString(jsonString: string, options?: Partial): DecisionRequest; + + static equals(a: DecisionRequest | PlainMessage | undefined, b: DecisionRequest | PlainMessage | undefined): boolean; } -export namespace DecisionRequest { - export type AsObject = { - actionsList: Array; - entityChainsList: Array; - resourceAttributesList: Array; - }; +/** + * + * + * Example response for a Decision Request - Do Bob (represented by entity chain ec1) + * and Alice (represented by entity chain ec2) have TRANSMIT authorization for + * 2 resources; resource1 (attr-set-1) defined by attributes foo:bar resource2 (attr-set-2) defined by attribute foo:bar, color:red ? + * + * Results: + * - bob has permitted authorization to transmit for a resource defined by attr-set-1 attributes and has a watermark obligation + * - bob has denied authorization to transmit a for a resource defined by attr-set-2 attributes + * - alice has permitted authorization to transmit for a resource defined by attr-set-1 attributes + * - alice has denied authorization to transmit a for a resource defined by attr-set-2 attributes + * + * { + * "entityChainId": "ec1", + * "resourceAttributesId": "attr-set-1", + * "decision": "DECISION_PERMIT", + * "obligations": [ + * "http://www.example.org/obligation/watermark" + * ] + * }, + * { + * "entityChainId": "ec1", + * "resourceAttributesId": "attr-set-2", + * "decision": "DECISION_PERMIT" + * }, + * { + * "entityChainId": "ec2", + * "resourceAttributesId": "attr-set-1", + * "decision": "DECISION_PERMIT" + * }, + * { + * "entityChainId": "ec2", + * "resourceAttributesId": "attr-set-2", + * "decision": "DECISION_DENY" + * } + * + * + * + * @generated from message authorization.DecisionResponse + */ +export declare class DecisionResponse extends Message { + /** + * ephemeral entity chain id from the request + * + * @generated from field: string entity_chain_id = 1; + */ + entityChainId: string; + + /** + * ephemeral resource attributes id from the request + * + * @generated from field: string resource_attributes_id = 2; + */ + resourceAttributesId: string; + + /** + * Action of the decision response + * + * @generated from field: policy.Action action = 3; + */ + action?: Action; + + /** + * The decision response + * + * @generated from field: authorization.DecisionResponse.Decision decision = 4; + */ + decision: DecisionResponse_Decision; + + /** + * optional list of obligations represented in URI format + * + * @generated from field: repeated string obligations = 5; + */ + obligations: string[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "authorization.DecisionResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): DecisionResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): DecisionResponse; + + static fromJsonString(jsonString: string, options?: Partial): DecisionResponse; + + static equals(a: DecisionResponse | PlainMessage | undefined, b: DecisionResponse | PlainMessage | undefined): boolean; } -export class DecisionResponse extends jspb.Message { - getEntityChainId(): string; - setEntityChainId(value: string): DecisionResponse; - - getResourceAttributesId(): string; - setResourceAttributesId(value: string): DecisionResponse; - - getAction(): policy_objects_pb.Action | undefined; - setAction(value?: policy_objects_pb.Action): DecisionResponse; - hasAction(): boolean; - clearAction(): DecisionResponse; - - getDecision(): DecisionResponse.Decision; - setDecision(value: DecisionResponse.Decision): DecisionResponse; - - getObligationsList(): Array; - setObligationsList(value: Array): DecisionResponse; - clearObligationsList(): DecisionResponse; - addObligations(value: string, index?: number): DecisionResponse; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DecisionResponse.AsObject; - static toObject(includeInstance: boolean, msg: DecisionResponse): DecisionResponse.AsObject; - static serializeBinaryToWriter(message: DecisionResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): DecisionResponse; - static deserializeBinaryFromReader( - message: DecisionResponse, - reader: jspb.BinaryReader - ): DecisionResponse; +/** + * @generated from enum authorization.DecisionResponse.Decision + */ +export declare enum DecisionResponse_Decision { + /** + * @generated from enum value: DECISION_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: DECISION_DENY = 1; + */ + DENY = 1, + + /** + * @generated from enum value: DECISION_PERMIT = 2; + */ + PERMIT = 2, } -export namespace DecisionResponse { - export type AsObject = { - entityChainId: string; - resourceAttributesId: string; - action?: policy_objects_pb.Action.AsObject; - decision: DecisionResponse.Decision; - obligationsList: Array; - }; - - export enum Decision { - DECISION_UNSPECIFIED = 0, - DECISION_DENY = 1, - DECISION_PERMIT = 2, - } -} +/** + * @generated from message authorization.GetDecisionsRequest + */ +export declare class GetDecisionsRequest extends Message { + /** + * @generated from field: repeated authorization.DecisionRequest decision_requests = 1; + */ + decisionRequests: DecisionRequest[]; -export class GetDecisionsRequest extends jspb.Message { - getDecisionRequestsList(): Array; - setDecisionRequestsList(value: Array): GetDecisionsRequest; - clearDecisionRequestsList(): GetDecisionsRequest; - addDecisionRequests(value?: DecisionRequest, index?: number): DecisionRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetDecisionsRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetDecisionsRequest): GetDecisionsRequest.AsObject; - static serializeBinaryToWriter(message: GetDecisionsRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetDecisionsRequest; - static deserializeBinaryFromReader( - message: GetDecisionsRequest, - reader: jspb.BinaryReader - ): GetDecisionsRequest; -} + constructor(data?: PartialMessage); -export namespace GetDecisionsRequest { - export type AsObject = { - decisionRequestsList: Array; - }; -} + static readonly runtime: typeof proto3; + static readonly typeName = "authorization.GetDecisionsRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): GetDecisionsRequest; -export class GetDecisionsResponse extends jspb.Message { - getDecisionResponsesList(): Array; - setDecisionResponsesList(value: Array): GetDecisionsResponse; - clearDecisionResponsesList(): GetDecisionsResponse; - addDecisionResponses(value?: DecisionResponse, index?: number): DecisionResponse; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetDecisionsResponse.AsObject; - static toObject( - includeInstance: boolean, - msg: GetDecisionsResponse - ): GetDecisionsResponse.AsObject; - static serializeBinaryToWriter(message: GetDecisionsResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetDecisionsResponse; - static deserializeBinaryFromReader( - message: GetDecisionsResponse, - reader: jspb.BinaryReader - ): GetDecisionsResponse; + static fromJson(jsonValue: JsonValue, options?: Partial): GetDecisionsRequest; + + static fromJsonString(jsonString: string, options?: Partial): GetDecisionsRequest; + + static equals(a: GetDecisionsRequest | PlainMessage | undefined, b: GetDecisionsRequest | PlainMessage | undefined): boolean; } -export namespace GetDecisionsResponse { - export type AsObject = { - decisionResponsesList: Array; - }; +/** + * @generated from message authorization.GetDecisionsResponse + */ +export declare class GetDecisionsResponse extends Message { + /** + * @generated from field: repeated authorization.DecisionResponse decision_responses = 1; + */ + decisionResponses: DecisionResponse[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "authorization.GetDecisionsResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): GetDecisionsResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): GetDecisionsResponse; + + static fromJsonString(jsonString: string, options?: Partial): GetDecisionsResponse; + + static equals(a: GetDecisionsResponse | PlainMessage | undefined, b: GetDecisionsResponse | PlainMessage | undefined): boolean; } -export class GetEntitlementsRequest extends jspb.Message { - getEntitiesList(): Array; - setEntitiesList(value: Array): GetEntitlementsRequest; - clearEntitiesList(): GetEntitlementsRequest; - addEntities(value?: Entity, index?: number): Entity; - - getScope(): ResourceAttribute | undefined; - setScope(value?: ResourceAttribute): GetEntitlementsRequest; - hasScope(): boolean; - clearScope(): GetEntitlementsRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetEntitlementsRequest.AsObject; - static toObject( - includeInstance: boolean, - msg: GetEntitlementsRequest - ): GetEntitlementsRequest.AsObject; - static serializeBinaryToWriter(message: GetEntitlementsRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetEntitlementsRequest; - static deserializeBinaryFromReader( - message: GetEntitlementsRequest, - reader: jspb.BinaryReader - ): GetEntitlementsRequest; +/** + * + * Request to get entitlements for one or more entities for an optional attribute scope + * + * Example: Get entitlements for bob and alice (both represented using an email address + * + * { + * "entities": [ + * { + * "id": "e1", + * "emailAddress": "bob@example.org" + * }, + * { + * "id": "e2", + * "emailAddress": "alice@example.org" + * } + * ], + * "scope": { + * "attributeFqns": [ + * "https://example.net/attr/attr1/value/value1", + * "https://example.net/attr/attr1/value/value2" + * ] + * } + * } + * + * + * @generated from message authorization.GetEntitlementsRequest + */ +export declare class GetEntitlementsRequest extends Message { + /** + * list of requested entities + * + * @generated from field: repeated authorization.Entity entities = 1; + */ + entities: Entity[]; + + /** + * optional attribute fqn as a scope + * + * @generated from field: optional authorization.ResourceAttribute scope = 2; + */ + scope?: ResourceAttribute; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "authorization.GetEntitlementsRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): GetEntitlementsRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): GetEntitlementsRequest; + + static fromJsonString(jsonString: string, options?: Partial): GetEntitlementsRequest; + + static equals(a: GetEntitlementsRequest | PlainMessage | undefined, b: GetEntitlementsRequest | PlainMessage | undefined): boolean; } -export namespace GetEntitlementsRequest { - export type AsObject = { - entitiesList: Array; - scope?: ResourceAttribute.AsObject; - }; +/** + * @generated from message authorization.EntityEntitlements + */ +export declare class EntityEntitlements extends Message { + /** + * @generated from field: string entity_id = 1; + */ + entityId: string; - export enum ScopeCase { - _SCOPE_NOT_SET = 0, - SCOPE = 2, - } -} + /** + * @generated from field: repeated string attribute_value_fqns = 2; + */ + attributeValueFqns: string[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "authorization.EntityEntitlements"; + static readonly fields: FieldList; -export class EntityEntitlements extends jspb.Message { - getEntityId(): string; - setEntityId(value: string): EntityEntitlements; - - getAttributeValueFqnsList(): Array; - setAttributeValueFqnsList(value: Array): EntityEntitlements; - clearAttributeValueFqnsList(): EntityEntitlements; - addAttributeValueFqns(value: string, index?: number): EntityEntitlements; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): EntityEntitlements.AsObject; - static toObject(includeInstance: boolean, msg: EntityEntitlements): EntityEntitlements.AsObject; - static serializeBinaryToWriter(message: EntityEntitlements, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): EntityEntitlements; - static deserializeBinaryFromReader( - message: EntityEntitlements, - reader: jspb.BinaryReader - ): EntityEntitlements; + static fromBinary(bytes: Uint8Array, options?: Partial): EntityEntitlements; + + static fromJson(jsonValue: JsonValue, options?: Partial): EntityEntitlements; + + static fromJsonString(jsonString: string, options?: Partial): EntityEntitlements; + + static equals(a: EntityEntitlements | PlainMessage | undefined, b: EntityEntitlements | PlainMessage | undefined): boolean; } -export namespace EntityEntitlements { - export type AsObject = { - entityId: string; - attributeValueFqnsList: Array; - }; +/** + * A logical bucket of attributes belonging to a "Resource" + * + * @generated from message authorization.ResourceAttribute + */ +export declare class ResourceAttribute extends Message { + /** + * @generated from field: string resource_attributes_id = 1; + */ + resourceAttributesId: string; + + /** + * @generated from field: repeated string attribute_value_fqns = 2; + */ + attributeValueFqns: string[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "authorization.ResourceAttribute"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ResourceAttribute; + + static fromJson(jsonValue: JsonValue, options?: Partial): ResourceAttribute; + + static fromJsonString(jsonString: string, options?: Partial): ResourceAttribute; + + static equals(a: ResourceAttribute | PlainMessage | undefined, b: ResourceAttribute | PlainMessage | undefined): boolean; } -export class ResourceAttribute extends jspb.Message { - getAttributeValueFqnsList(): Array; - setAttributeValueFqnsList(value: Array): ResourceAttribute; - clearAttributeValueFqnsList(): ResourceAttribute; - addAttributeValueFqns(value: string, index?: number): ResourceAttribute; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ResourceAttribute.AsObject; - static toObject(includeInstance: boolean, msg: ResourceAttribute): ResourceAttribute.AsObject; - static serializeBinaryToWriter(message: ResourceAttribute, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ResourceAttribute; - static deserializeBinaryFromReader( - message: ResourceAttribute, - reader: jspb.BinaryReader - ): ResourceAttribute; +/** + * + * + * Example Response for a request of : Get entitlements for bob and alice (both represented using an email address + * + * { + * "entitlements": [ + * { + * "entityId": "e1", + * "attributeValueReferences": [ + * { + * "attributeFqn": "http://www.example.org/attr/foo/value/bar" + * } + * ] + * }, + * { + * "entityId": "e2", + * "attributeValueReferences": [ + * { + * "attributeFqn": "http://www.example.org/attr/color/value/red" + * } + * ] + * } + * ] + * } + * + * + * + * @generated from message authorization.GetEntitlementsResponse + */ +export declare class GetEntitlementsResponse extends Message { + /** + * @generated from field: repeated authorization.EntityEntitlements entitlements = 1; + */ + entitlements: EntityEntitlements[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "authorization.GetEntitlementsResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): GetEntitlementsResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): GetEntitlementsResponse; + + static fromJsonString(jsonString: string, options?: Partial): GetEntitlementsResponse; + + static equals(a: GetEntitlementsResponse | PlainMessage | undefined, b: GetEntitlementsResponse | PlainMessage | undefined): boolean; } -export namespace ResourceAttribute { - export type AsObject = { - attributeValueFqnsList: Array; - }; +/** + * + * Example Request Get Decisions by Token to answer the question - Do Bob and client1 (represented by token tok1) + * and Alice and client2 (represented by token tok2) have TRANSMIT authorization for + * 2 resources; resource1 (attr-set-1) defined by attributes foo:bar resource2 (attr-set-2) defined by attribute foo:bar, color:red ? + * + * { + * "actions": [ + * { + * "standard": "STANDARD_ACTION_TRANSMIT" + * } + * ], + * "tokens": [ + * { + * "id": "tok1", + * "jwt": .... + * }, + * { + * "id": "tok2", + * "jwt": ..... + * } + * ], + * "resourceAttributes": [ + * { + * "attributeFqns": [ + * "https://www.example.org/attr/foo/value/value1" + * ] + * }, + * { + * "attributeFqns": [ + * "https://example.net/attr/attr1/value/value1", + * "https://example.net/attr/attr1/value/value2" + * ] + * } + * ] + * } + * + * + * @generated from message authorization.TokenDecisionRequest + */ +export declare class TokenDecisionRequest extends Message { + /** + * @generated from field: repeated policy.Action actions = 1; + */ + actions: Action[]; + + /** + * @generated from field: repeated authorization.Token tokens = 2; + */ + tokens: Token[]; + + /** + * @generated from field: repeated authorization.ResourceAttribute resource_attributes = 3; + */ + resourceAttributes: ResourceAttribute[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "authorization.TokenDecisionRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): TokenDecisionRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): TokenDecisionRequest; + + static fromJsonString(jsonString: string, options?: Partial): TokenDecisionRequest; + + static equals(a: TokenDecisionRequest | PlainMessage | undefined, b: TokenDecisionRequest | PlainMessage | undefined): boolean; } -export class GetEntitlementsResponse extends jspb.Message { - getEntitlementsList(): Array; - setEntitlementsList(value: Array): GetEntitlementsResponse; - clearEntitlementsList(): GetEntitlementsResponse; - addEntitlements(value?: EntityEntitlements, index?: number): EntityEntitlements; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetEntitlementsResponse.AsObject; - static toObject( - includeInstance: boolean, - msg: GetEntitlementsResponse - ): GetEntitlementsResponse.AsObject; - static serializeBinaryToWriter(message: GetEntitlementsResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetEntitlementsResponse; - static deserializeBinaryFromReader( - message: GetEntitlementsResponse, - reader: jspb.BinaryReader - ): GetEntitlementsResponse; +/** + * @generated from message authorization.GetDecisionsByTokenRequest + */ +export declare class GetDecisionsByTokenRequest extends Message { + /** + * @generated from field: repeated authorization.TokenDecisionRequest decision_requests = 1; + */ + decisionRequests: TokenDecisionRequest[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "authorization.GetDecisionsByTokenRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): GetDecisionsByTokenRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): GetDecisionsByTokenRequest; + + static fromJsonString(jsonString: string, options?: Partial): GetDecisionsByTokenRequest; + + static equals(a: GetDecisionsByTokenRequest | PlainMessage | undefined, b: GetDecisionsByTokenRequest | PlainMessage | undefined): boolean; } -export namespace GetEntitlementsResponse { - export type AsObject = { - entitlementsList: Array; - }; +/** + * @generated from message authorization.GetDecisionsByTokenResponse + */ +export declare class GetDecisionsByTokenResponse extends Message { + /** + * @generated from field: repeated authorization.DecisionResponse decision_responses = 1; + */ + decisionResponses: DecisionResponse[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "authorization.GetDecisionsByTokenResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): GetDecisionsByTokenResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): GetDecisionsByTokenResponse; + + static fromJsonString(jsonString: string, options?: Partial): GetDecisionsByTokenResponse; + + static equals(a: GetDecisionsByTokenResponse | PlainMessage | undefined, b: GetDecisionsByTokenResponse | PlainMessage | undefined): boolean; } + diff --git a/lib/src/platform/authorization/authorization_pb.ts b/lib/src/platform/authorization/authorization_pb.ts deleted file mode 100644 index 81d5923b..00000000 --- a/lib/src/platform/authorization/authorization_pb.ts +++ /dev/null @@ -1,817 +0,0 @@ -// @generated by protoc-gen-es v1.9.0 with parameter "target=ts" -// @generated from file authorization/authorization.proto (package authorization, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import type { - BinaryReadOptions, - FieldList, - JsonReadOptions, - JsonValue, - PartialMessage, - PlainMessage, -} from '@bufbuild/protobuf'; -import { Any, Message, proto3 } from '@bufbuild/protobuf'; -import { Action } from '../policy/objects_pb.js'; - -/** - * PE (Person Entity) or NPE (Non-Person Entity) - * - * @generated from message authorization.Entity - */ -export class Entity extends Message { - /** - * ephemeral id for tracking between request and response - * - * @generated from field: string id = 1; - */ - id = ''; - - /** - * Standard entity types supported by the platform - * - * @generated from oneof authorization.Entity.entity_type - */ - entityType: - | { - /** - * @generated from field: string email_address = 2; - */ - value: string; - case: 'emailAddress'; - } - | { - /** - * @generated from field: string user_name = 3; - */ - value: string; - case: 'userName'; - } - | { - /** - * @generated from field: string remote_claims_url = 4; - */ - value: string; - case: 'remoteClaimsUrl'; - } - | { - /** - * @generated from field: string jwt = 5; - */ - value: string; - case: 'jwt'; - } - | { - /** - * @generated from field: google.protobuf.Any claims = 6; - */ - value: Any; - case: 'claims'; - } - | { - /** - * @generated from field: authorization.EntityCustom custom = 7; - */ - value: EntityCustom; - case: 'custom'; - } - | { - /** - * @generated from field: string client_id = 8; - */ - value: string; - case: 'clientId'; - } - | { case: undefined; value?: undefined } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'authorization.Entity'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { - no: 2, - name: 'email_address', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - oneof: 'entity_type', - }, - { - no: 3, - name: 'user_name', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - oneof: 'entity_type', - }, - { - no: 4, - name: 'remote_claims_url', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - oneof: 'entity_type', - }, - { no: 5, name: 'jwt', kind: 'scalar', T: 9 /* ScalarType.STRING */, oneof: 'entity_type' }, - { no: 6, name: 'claims', kind: 'message', T: Any, oneof: 'entity_type' }, - { no: 7, name: 'custom', kind: 'message', T: EntityCustom, oneof: 'entity_type' }, - { - no: 8, - name: 'client_id', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - oneof: 'entity_type', - }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Entity { - return new Entity().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Entity { - return new Entity().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Entity { - return new Entity().fromJsonString(jsonString, options); - } - - static equals( - a: Entity | PlainMessage | undefined, - b: Entity | PlainMessage | undefined - ): boolean { - return proto3.util.equals(Entity, a, b); - } -} - -/** - * Entity type for custom entities beyond the standard types - * - * @generated from message authorization.EntityCustom - */ -export class EntityCustom extends Message { - /** - * @generated from field: google.protobuf.Any extension = 1; - */ - extension?: Any; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'authorization.EntityCustom'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'extension', kind: 'message', T: Any }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): EntityCustom { - return new EntityCustom().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): EntityCustom { - return new EntityCustom().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): EntityCustom { - return new EntityCustom().fromJsonString(jsonString, options); - } - - static equals( - a: EntityCustom | PlainMessage | undefined, - b: EntityCustom | PlainMessage | undefined - ): boolean { - return proto3.util.equals(EntityCustom, a, b); - } -} - -/** - * A set of related PE and NPE - * - * @generated from message authorization.EntityChain - */ -export class EntityChain extends Message { - /** - * ephemeral id for tracking between request and response - * - * @generated from field: string id = 1; - */ - id = ''; - - /** - * @generated from field: repeated authorization.Entity entities = 2; - */ - entities: Entity[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'authorization.EntityChain'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { no: 2, name: 'entities', kind: 'message', T: Entity, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): EntityChain { - return new EntityChain().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): EntityChain { - return new EntityChain().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): EntityChain { - return new EntityChain().fromJsonString(jsonString, options); - } - - static equals( - a: EntityChain | PlainMessage | undefined, - b: EntityChain | PlainMessage | undefined - ): boolean { - return proto3.util.equals(EntityChain, a, b); - } -} - -/** - * - * Example Request Get Decisions to answer the question - Do Bob (represented by entity chain ec1) - * and Alice (represented by entity chain ec2) have TRANSMIT authorization for - * 2 resources; resource1 (attr-set-1) defined by attributes foo:bar resource2 (attr-set-2) defined by attribute foo:bar, color:red ? - * - * { - * "actions": [ - * { - * "standard": "STANDARD_ACTION_TRANSMIT" - * } - * ], - * "entityChains": [ - * { - * "id": "ec1", - * "entities": [ - * { - * "emailAddress": "bob@example.org" - * } - * ] - * }, - * { - * "id": "ec2", - * "entities": [ - * { - * "userName": "alice@example.org" - * } - * ] - * } - * ], - * "resourceAttributes": [ - * { - * "attributeFqns": [ - * "https://www.example.org/attr/foo/value/value1" - * ] - * }, - * { - * "attributeFqns": [ - * "https://example.net/attr/attr1/value/value1", - * "https://example.net/attr/attr1/value/value2" - * ] - * } - * ] - * } - * - * - * @generated from message authorization.DecisionRequest - */ -export class DecisionRequest extends Message { - /** - * @generated from field: repeated policy.Action actions = 1; - */ - actions: Action[] = []; - - /** - * @generated from field: repeated authorization.EntityChain entity_chains = 2; - */ - entityChains: EntityChain[] = []; - - /** - * @generated from field: repeated authorization.ResourceAttribute resource_attributes = 3; - */ - resourceAttributes: ResourceAttribute[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'authorization.DecisionRequest'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'actions', kind: 'message', T: Action, repeated: true }, - { no: 2, name: 'entity_chains', kind: 'message', T: EntityChain, repeated: true }, - { no: 3, name: 'resource_attributes', kind: 'message', T: ResourceAttribute, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DecisionRequest { - return new DecisionRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DecisionRequest { - return new DecisionRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DecisionRequest { - return new DecisionRequest().fromJsonString(jsonString, options); - } - - static equals( - a: DecisionRequest | PlainMessage | undefined, - b: DecisionRequest | PlainMessage | undefined - ): boolean { - return proto3.util.equals(DecisionRequest, a, b); - } -} - -/** - * - * - * Example response for a Decision Request - Do Bob (represented by entity chain ec1) - * and Alice (represented by entity chain ec2) have TRANSMIT authorization for - * 2 resources; resource1 (attr-set-1) defined by attributes foo:bar resource2 (attr-set-2) defined by attribute foo:bar, color:red ? - * - * Results: - * - bob has permitted authorization to transmit for a resource defined by attr-set-1 attributes and has a watermark obligation - * - bob has denied authorization to transmit a for a resource defined by attr-set-2 attributes - * - alice has permitted authorization to transmit for a resource defined by attr-set-1 attributes - * - alice has denied authorization to transmit a for a resource defined by attr-set-2 attributes - * - * { - * "entityChainId": "ec1", - * "resourceAttributesId": "attr-set-1", - * "decision": "DECISION_PERMIT", - * "obligations": [ - * "http://www.example.org/obligation/watermark" - * ] - * }, - * { - * "entityChainId": "ec1", - * "resourceAttributesId": "attr-set-2", - * "decision": "DECISION_PERMIT" - * }, - * { - * "entityChainId": "ec2", - * "resourceAttributesId": "attr-set-1", - * "decision": "DECISION_PERMIT" - * }, - * { - * "entityChainId": "ec2", - * "resourceAttributesId": "attr-set-2", - * "decision": "DECISION_DENY" - * } - * - * - * - * @generated from message authorization.DecisionResponse - */ -export class DecisionResponse extends Message { - /** - * ephemeral entity chain id from the request - * - * @generated from field: string entity_chain_id = 1; - */ - entityChainId = ''; - - /** - * ephemeral resource attributes id from the request - * - * @generated from field: string resource_attributes_id = 2; - */ - resourceAttributesId = ''; - - /** - * Action of the decision response - * - * @generated from field: policy.Action action = 3; - */ - action?: Action; - - /** - * The decision response - * - * @generated from field: authorization.DecisionResponse.Decision decision = 4; - */ - decision = DecisionResponse_Decision.UNSPECIFIED; - - /** - * optional list of obligations represented in URI format - * - * @generated from field: repeated string obligations = 5; - */ - obligations: string[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'authorization.DecisionResponse'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'entity_chain_id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { no: 2, name: 'resource_attributes_id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { no: 3, name: 'action', kind: 'message', T: Action }, - { no: 4, name: 'decision', kind: 'enum', T: proto3.getEnumType(DecisionResponse_Decision) }, - { no: 5, name: 'obligations', kind: 'scalar', T: 9 /* ScalarType.STRING */, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DecisionResponse { - return new DecisionResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DecisionResponse { - return new DecisionResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DecisionResponse { - return new DecisionResponse().fromJsonString(jsonString, options); - } - - static equals( - a: DecisionResponse | PlainMessage | undefined, - b: DecisionResponse | PlainMessage | undefined - ): boolean { - return proto3.util.equals(DecisionResponse, a, b); - } -} - -/** - * @generated from enum authorization.DecisionResponse.Decision - */ -export enum DecisionResponse_Decision { - /** - * @generated from enum value: DECISION_UNSPECIFIED = 0; - */ - UNSPECIFIED = 0, - - /** - * @generated from enum value: DECISION_DENY = 1; - */ - DENY = 1, - - /** - * @generated from enum value: DECISION_PERMIT = 2; - */ - PERMIT = 2, -} -// Retrieve enum metadata with: proto3.getEnumType(DecisionResponse_Decision) -proto3.util.setEnumType(DecisionResponse_Decision, 'authorization.DecisionResponse.Decision', [ - { no: 0, name: 'DECISION_UNSPECIFIED' }, - { no: 1, name: 'DECISION_DENY' }, - { no: 2, name: 'DECISION_PERMIT' }, -]); - -/** - * @generated from message authorization.GetDecisionsRequest - */ -export class GetDecisionsRequest extends Message { - /** - * @generated from field: repeated authorization.DecisionRequest decision_requests = 1; - */ - decisionRequests: DecisionRequest[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'authorization.GetDecisionsRequest'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'decision_requests', kind: 'message', T: DecisionRequest, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetDecisionsRequest { - return new GetDecisionsRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetDecisionsRequest { - return new GetDecisionsRequest().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): GetDecisionsRequest { - return new GetDecisionsRequest().fromJsonString(jsonString, options); - } - - static equals( - a: GetDecisionsRequest | PlainMessage | undefined, - b: GetDecisionsRequest | PlainMessage | undefined - ): boolean { - return proto3.util.equals(GetDecisionsRequest, a, b); - } -} - -/** - * @generated from message authorization.GetDecisionsResponse - */ -export class GetDecisionsResponse extends Message { - /** - * @generated from field: repeated authorization.DecisionResponse decision_responses = 1; - */ - decisionResponses: DecisionResponse[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'authorization.GetDecisionsResponse'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'decision_responses', kind: 'message', T: DecisionResponse, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetDecisionsResponse { - return new GetDecisionsResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetDecisionsResponse { - return new GetDecisionsResponse().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): GetDecisionsResponse { - return new GetDecisionsResponse().fromJsonString(jsonString, options); - } - - static equals( - a: GetDecisionsResponse | PlainMessage | undefined, - b: GetDecisionsResponse | PlainMessage | undefined - ): boolean { - return proto3.util.equals(GetDecisionsResponse, a, b); - } -} - -/** - * - * Request to get entitlements for one or more entities for an optional attribute scope - * - * Example: Get entitlements for bob and alice (both represented using an email address - * - * { - * "entities": [ - * { - * "id": "e1", - * "emailAddress": "bob@example.org" - * }, - * { - * "id": "e2", - * "emailAddress": "alice@example.org" - * } - * ] - * } - * - * - * @generated from message authorization.GetEntitlementsRequest - */ -export class GetEntitlementsRequest extends Message { - /** - * list of requested entities - * - * @generated from field: repeated authorization.Entity entities = 1; - */ - entities: Entity[] = []; - - /** - * optional attribute fqn as a scope - * - * @generated from field: optional authorization.ResourceAttribute scope = 2; - */ - scope?: ResourceAttribute; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'authorization.GetEntitlementsRequest'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'entities', kind: 'message', T: Entity, repeated: true }, - { no: 2, name: 'scope', kind: 'message', T: ResourceAttribute, opt: true }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): GetEntitlementsRequest { - return new GetEntitlementsRequest().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): GetEntitlementsRequest { - return new GetEntitlementsRequest().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): GetEntitlementsRequest { - return new GetEntitlementsRequest().fromJsonString(jsonString, options); - } - - static equals( - a: GetEntitlementsRequest | PlainMessage | undefined, - b: GetEntitlementsRequest | PlainMessage | undefined - ): boolean { - return proto3.util.equals(GetEntitlementsRequest, a, b); - } -} - -/** - * @generated from message authorization.EntityEntitlements - */ -export class EntityEntitlements extends Message { - /** - * @generated from field: string entity_id = 1; - */ - entityId = ''; - - /** - * @generated from field: repeated string attribute_value_fqns = 2; - */ - attributeValueFqns: string[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'authorization.EntityEntitlements'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'entity_id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { - no: 2, - name: 'attribute_value_fqns', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - repeated: true, - }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): EntityEntitlements { - return new EntityEntitlements().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): EntityEntitlements { - return new EntityEntitlements().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): EntityEntitlements { - return new EntityEntitlements().fromJsonString(jsonString, options); - } - - static equals( - a: EntityEntitlements | PlainMessage | undefined, - b: EntityEntitlements | PlainMessage | undefined - ): boolean { - return proto3.util.equals(EntityEntitlements, a, b); - } -} - -/** - * A logical bucket of attributes belonging to a "Resource" - * - * @generated from message authorization.ResourceAttribute - */ -export class ResourceAttribute extends Message { - /** - * @generated from field: repeated string attribute_value_fqns = 2; - */ - attributeValueFqns: string[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'authorization.ResourceAttribute'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { - no: 2, - name: 'attribute_value_fqns', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - repeated: true, - }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ResourceAttribute { - return new ResourceAttribute().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ResourceAttribute { - return new ResourceAttribute().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ResourceAttribute { - return new ResourceAttribute().fromJsonString(jsonString, options); - } - - static equals( - a: ResourceAttribute | PlainMessage | undefined, - b: ResourceAttribute | PlainMessage | undefined - ): boolean { - return proto3.util.equals(ResourceAttribute, a, b); - } -} - -/** - * - * - * Example Response for a request of : Get entitlements for bob and alice (both represented using an email address - * - * { - * "entitlements": [ - * { - * "entityId": "e1", - * "attributeValueReferences": [ - * { - * "attributeFqn": "http://www.example.org/attr/foo/value/bar" - * } - * ] - * }, - * { - * "entityId": "e2", - * "attributeValueReferences": [ - * { - * "attributeFqn": "http://www.example.org/attr/color/value/red" - * } - * ] - * } - * ] - * } - * - * - * - * @generated from message authorization.GetEntitlementsResponse - */ -export class GetEntitlementsResponse extends Message { - /** - * @generated from field: repeated authorization.EntityEntitlements entitlements = 1; - */ - entitlements: EntityEntitlements[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'authorization.GetEntitlementsResponse'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'entitlements', kind: 'message', T: EntityEntitlements, repeated: true }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): GetEntitlementsResponse { - return new GetEntitlementsResponse().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): GetEntitlementsResponse { - return new GetEntitlementsResponse().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): GetEntitlementsResponse { - return new GetEntitlementsResponse().fromJsonString(jsonString, options); - } - - static equals( - a: GetEntitlementsResponse | PlainMessage | undefined, - b: GetEntitlementsResponse | PlainMessage | undefined - ): boolean { - return proto3.util.equals(GetEntitlementsResponse, a, b); - } -} diff --git a/lib/src/platform/common/common_pb.d.ts b/lib/src/platform/common/common_pb.d.ts index b23807af..369dde74 100644 --- a/lib/src/platform/common/common_pb.d.ts +++ b/lib/src/platform/common/common_pb.d.ts @@ -1,66 +1,129 @@ -import * as jspb from 'google-protobuf'; - -import * as google_protobuf_timestamp_pb from 'google-protobuf/google/protobuf/timestamp_pb'; // proto import: "google/protobuf/timestamp.proto" - -export class Metadata extends jspb.Message { - getCreatedAt(): google_protobuf_timestamp_pb.Timestamp | undefined; - setCreatedAt(value?: google_protobuf_timestamp_pb.Timestamp): Metadata; - hasCreatedAt(): boolean; - clearCreatedAt(): Metadata; - - getUpdatedAt(): google_protobuf_timestamp_pb.Timestamp | undefined; - setUpdatedAt(value?: google_protobuf_timestamp_pb.Timestamp): Metadata; - hasUpdatedAt(): boolean; - clearUpdatedAt(): Metadata; - - getLabelsMap(): jspb.Map; - clearLabelsMap(): Metadata; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Metadata.AsObject; - static toObject(includeInstance: boolean, msg: Metadata): Metadata.AsObject; - static serializeBinaryToWriter(message: Metadata, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Metadata; - static deserializeBinaryFromReader(message: Metadata, reader: jspb.BinaryReader): Metadata; -} +// @generated by protoc-gen-es v1.9.0 with parameter "target=js+dts,import_extension=none" +// @generated from file common/common.proto (package common, syntax proto3) +/* eslint-disable */ +// @ts-nocheck -export namespace Metadata { - export type AsObject = { - createdAt?: google_protobuf_timestamp_pb.Timestamp.AsObject; - updatedAt?: google_protobuf_timestamp_pb.Timestamp.AsObject; - labelsMap: Array<[string, string]>; - }; -} +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage, Timestamp } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; + +/** + * @generated from enum common.MetadataUpdateEnum + */ +export declare enum MetadataUpdateEnum { + /** + * unspecified update type + * + * @generated from enum value: METADATA_UPDATE_ENUM_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, -export class MetadataMutable extends jspb.Message { - getLabelsMap(): jspb.Map; - clearLabelsMap(): MetadataMutable; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MetadataMutable.AsObject; - static toObject(includeInstance: boolean, msg: MetadataMutable): MetadataMutable.AsObject; - static serializeBinaryToWriter(message: MetadataMutable, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MetadataMutable; - static deserializeBinaryFromReader( - message: MetadataMutable, - reader: jspb.BinaryReader - ): MetadataMutable; + /** + * only update the fields that are provided + * + * @generated from enum value: METADATA_UPDATE_ENUM_EXTEND = 1; + */ + EXTEND = 1, + + /** + * replace the entire metadata with the provided metadata + * + * @generated from enum value: METADATA_UPDATE_ENUM_REPLACE = 2; + */ + REPLACE = 2, } -export namespace MetadataMutable { - export type AsObject = { - labelsMap: Array<[string, string]>; - }; +/** + * buflint ENUM_VALUE_PREFIX: to make sure that C++ scoping rules aren't violated when users add new enum values to an enum in a given package + * + * @generated from enum common.ActiveStateEnum + */ +export declare enum ActiveStateEnum { + /** + * @generated from enum value: ACTIVE_STATE_ENUM_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: ACTIVE_STATE_ENUM_ACTIVE = 1; + */ + ACTIVE = 1, + + /** + * @generated from enum value: ACTIVE_STATE_ENUM_INACTIVE = 2; + */ + INACTIVE = 2, + + /** + * @generated from enum value: ACTIVE_STATE_ENUM_ANY = 3; + */ + ANY = 3, } -export enum MetadataUpdateEnum { - METADATA_UPDATE_ENUM_UNSPECIFIED = 0, - METADATA_UPDATE_ENUM_EXTEND = 1, - METADATA_UPDATE_ENUM_REPLACE = 2, +/** + * Struct to uniquely identify a resource with optional additional metadata + * + * @generated from message common.Metadata + */ +export declare class Metadata extends Message { + /** + * created_at set by server (entity who created will recorded in an audit event) + * + * @generated from field: google.protobuf.Timestamp created_at = 1; + */ + createdAt?: Timestamp; + + /** + * updated_at set by server (entity who updated will recorded in an audit event) + * + * @generated from field: google.protobuf.Timestamp updated_at = 2; + */ + updatedAt?: Timestamp; + + /** + * optional short description + * + * @generated from field: map labels = 3; + */ + labels: { [key: string]: string }; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "common.Metadata"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): Metadata; + + static fromJson(jsonValue: JsonValue, options?: Partial): Metadata; + + static fromJsonString(jsonString: string, options?: Partial): Metadata; + + static equals(a: Metadata | PlainMessage | undefined, b: Metadata | PlainMessage | undefined): boolean; } -export enum ActiveStateEnum { - ACTIVE_STATE_ENUM_UNSPECIFIED = 0, - ACTIVE_STATE_ENUM_ACTIVE = 1, - ACTIVE_STATE_ENUM_INACTIVE = 2, - ACTIVE_STATE_ENUM_ANY = 3, + +/** + * @generated from message common.MetadataMutable + */ +export declare class MetadataMutable extends Message { + /** + * optional labels + * + * @generated from field: map labels = 3; + */ + labels: { [key: string]: string }; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "common.MetadataMutable"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): MetadataMutable; + + static fromJson(jsonValue: JsonValue, options?: Partial): MetadataMutable; + + static fromJsonString(jsonString: string, options?: Partial): MetadataMutable; + + static equals(a: MetadataMutable | PlainMessage | undefined, b: MetadataMutable | PlainMessage | undefined): boolean; } + diff --git a/lib/src/platform/common/common_pb.ts b/lib/src/platform/common/common_pb.ts deleted file mode 100644 index 646d1aa5..00000000 --- a/lib/src/platform/common/common_pb.ts +++ /dev/null @@ -1,194 +0,0 @@ -// @generated by protoc-gen-es v1.9.0 with parameter "target=ts" -// @generated from file common/common.proto (package common, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import type { - BinaryReadOptions, - FieldList, - JsonReadOptions, - JsonValue, - PartialMessage, - PlainMessage, -} from '@bufbuild/protobuf'; -import { Message, proto3, Timestamp } from '@bufbuild/protobuf'; - -/** - * @generated from enum common.MetadataUpdateEnum - */ -export enum MetadataUpdateEnum { - /** - * unspecified update type - * - * @generated from enum value: METADATA_UPDATE_ENUM_UNSPECIFIED = 0; - */ - UNSPECIFIED = 0, - - /** - * only update the fields that are provided - * - * @generated from enum value: METADATA_UPDATE_ENUM_EXTEND = 1; - */ - EXTEND = 1, - - /** - * replace the entire metadata with the provided metadata - * - * @generated from enum value: METADATA_UPDATE_ENUM_REPLACE = 2; - */ - REPLACE = 2, -} -// Retrieve enum metadata with: proto3.getEnumType(MetadataUpdateEnum) -proto3.util.setEnumType(MetadataUpdateEnum, 'common.MetadataUpdateEnum', [ - { no: 0, name: 'METADATA_UPDATE_ENUM_UNSPECIFIED' }, - { no: 1, name: 'METADATA_UPDATE_ENUM_EXTEND' }, - { no: 2, name: 'METADATA_UPDATE_ENUM_REPLACE' }, -]); - -/** - * buflint ENUM_VALUE_PREFIX: to make sure that C++ scoping rules aren't violated when users add new enum values to an enum in a given package - * - * @generated from enum common.ActiveStateEnum - */ -export enum ActiveStateEnum { - /** - * @generated from enum value: ACTIVE_STATE_ENUM_UNSPECIFIED = 0; - */ - UNSPECIFIED = 0, - - /** - * @generated from enum value: ACTIVE_STATE_ENUM_ACTIVE = 1; - */ - ACTIVE = 1, - - /** - * @generated from enum value: ACTIVE_STATE_ENUM_INACTIVE = 2; - */ - INACTIVE = 2, - - /** - * @generated from enum value: ACTIVE_STATE_ENUM_ANY = 3; - */ - ANY = 3, -} -// Retrieve enum metadata with: proto3.getEnumType(ActiveStateEnum) -proto3.util.setEnumType(ActiveStateEnum, 'common.ActiveStateEnum', [ - { no: 0, name: 'ACTIVE_STATE_ENUM_UNSPECIFIED' }, - { no: 1, name: 'ACTIVE_STATE_ENUM_ACTIVE' }, - { no: 2, name: 'ACTIVE_STATE_ENUM_INACTIVE' }, - { no: 3, name: 'ACTIVE_STATE_ENUM_ANY' }, -]); - -/** - * Struct to uniquely identify a resource with optional additional metadata - * - * @generated from message common.Metadata - */ -export class Metadata extends Message { - /** - * created_at set by server (entity who created will recorded in an audit event) - * - * @generated from field: google.protobuf.Timestamp created_at = 1; - */ - createdAt?: Timestamp; - - /** - * updated_at set by server (entity who updated will recorded in an audit event) - * - * @generated from field: google.protobuf.Timestamp updated_at = 2; - */ - updatedAt?: Timestamp; - - /** - * optional short description - * - * @generated from field: map labels = 3; - */ - labels: { [key: string]: string } = {}; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'common.Metadata'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'created_at', kind: 'message', T: Timestamp }, - { no: 2, name: 'updated_at', kind: 'message', T: Timestamp }, - { - no: 3, - name: 'labels', - kind: 'map', - K: 9 /* ScalarType.STRING */, - V: { kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Metadata { - return new Metadata().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Metadata { - return new Metadata().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Metadata { - return new Metadata().fromJsonString(jsonString, options); - } - - static equals( - a: Metadata | PlainMessage | undefined, - b: Metadata | PlainMessage | undefined - ): boolean { - return proto3.util.equals(Metadata, a, b); - } -} - -/** - * @generated from message common.MetadataMutable - */ -export class MetadataMutable extends Message { - /** - * optional labels - * - * @generated from field: map labels = 3; - */ - labels: { [key: string]: string } = {}; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'common.MetadataMutable'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { - no: 3, - name: 'labels', - kind: 'map', - K: 9 /* ScalarType.STRING */, - V: { kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): MetadataMutable { - return new MetadataMutable().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): MetadataMutable { - return new MetadataMutable().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): MetadataMutable { - return new MetadataMutable().fromJsonString(jsonString, options); - } - - static equals( - a: MetadataMutable | PlainMessage | undefined, - b: MetadataMutable | PlainMessage | undefined - ): boolean { - return proto3.util.equals(MetadataMutable, a, b); - } -} diff --git a/lib/src/platform/entityresolution/Entity_resolutionServiceClientPb.ts b/lib/src/platform/entityresolution/Entity_resolutionServiceClientPb.ts deleted file mode 100644 index fda400bc..00000000 --- a/lib/src/platform/entityresolution/Entity_resolutionServiceClientPb.ts +++ /dev/null @@ -1,90 +0,0 @@ -/** - * @fileoverview gRPC-Web generated client stub for entityresolution - * @enhanceable - * @public - */ - -// Code generated by protoc-gen-grpc-web. DO NOT EDIT. -// versions: -// protoc-gen-grpc-web v1.5.0 -// protoc v0.0.0 -// source: entityresolution/entity_resolution.proto - -/* eslint-disable */ -// @ts-nocheck - -import * as grpcWeb from 'grpc-web'; - -import * as entityresolution_entity_resolution_pb from '../entityresolution/entity_resolution_pb'; // proto import: "entityresolution/entity_resolution.proto" - -export class EntityResolutionServiceClient { - client_: grpcWeb.AbstractClientBase; - hostname_: string; - credentials_: null | { [index: string]: string }; - options_: null | { [index: string]: any }; - - constructor( - hostname: string, - credentials?: null | { [index: string]: string }, - options?: null | { [index: string]: any } - ) { - if (!options) options = {}; - if (!credentials) credentials = {}; - options['format'] = 'binary'; - - this.client_ = new grpcWeb.GrpcWebClientBase(options); - this.hostname_ = hostname.replace(/\/+$/, ''); - this.credentials_ = credentials; - this.options_ = options; - } - - methodDescriptorResolveEntities = new grpcWeb.MethodDescriptor( - '/entityresolution.EntityResolutionService/ResolveEntities', - grpcWeb.MethodType.UNARY, - entityresolution_entity_resolution_pb.ResolveEntitiesRequest, - entityresolution_entity_resolution_pb.ResolveEntitiesResponse, - (request: entityresolution_entity_resolution_pb.ResolveEntitiesRequest) => { - return request.serializeBinary(); - }, - entityresolution_entity_resolution_pb.ResolveEntitiesResponse.deserializeBinary - ); - - resolveEntities( - request: entityresolution_entity_resolution_pb.ResolveEntitiesRequest, - metadata?: grpcWeb.Metadata | null - ): Promise; - - resolveEntities( - request: entityresolution_entity_resolution_pb.ResolveEntitiesRequest, - metadata: grpcWeb.Metadata | null, - callback: ( - err: grpcWeb.RpcError, - response: entityresolution_entity_resolution_pb.ResolveEntitiesResponse - ) => void - ): grpcWeb.ClientReadableStream; - - resolveEntities( - request: entityresolution_entity_resolution_pb.ResolveEntitiesRequest, - metadata?: grpcWeb.Metadata | null, - callback?: ( - err: grpcWeb.RpcError, - response: entityresolution_entity_resolution_pb.ResolveEntitiesResponse - ) => void - ) { - if (callback !== undefined) { - return this.client_.rpcCall( - this.hostname_ + '/entityresolution.EntityResolutionService/ResolveEntities', - request, - metadata || {}, - this.methodDescriptorResolveEntities, - callback - ); - } - return this.client_.unaryCall( - this.hostname_ + '/entityresolution.EntityResolutionService/ResolveEntities', - request, - metadata || {}, - this.methodDescriptorResolveEntities - ); - } -} diff --git a/lib/src/platform/entityresolution/entity_resolution_connect.ts b/lib/src/platform/entityresolution/entity_resolution_connect.ts deleted file mode 100644 index 57900349..00000000 --- a/lib/src/platform/entityresolution/entity_resolution_connect.ts +++ /dev/null @@ -1,25 +0,0 @@ -// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=ts" -// @generated from file entityresolution/entity_resolution.proto (package entityresolution, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { ResolveEntitiesRequest, ResolveEntitiesResponse } from './entity_resolution_pb.js'; -import { MethodKind } from '@bufbuild/protobuf'; - -/** - * @generated from service entityresolution.EntityResolutionService - */ -export const EntityResolutionService = { - typeName: 'entityresolution.EntityResolutionService', - methods: { - /** - * @generated from rpc entityresolution.EntityResolutionService.ResolveEntities - */ - resolveEntities: { - name: 'ResolveEntities', - I: ResolveEntitiesRequest, - O: ResolveEntitiesResponse, - kind: MethodKind.Unary, - }, - }, -} as const; diff --git a/lib/src/platform/entityresolution/entity_resolution_pb.d.ts b/lib/src/platform/entityresolution/entity_resolution_pb.d.ts index f31feebf..a83ee9d9 100644 --- a/lib/src/platform/entityresolution/entity_resolution_pb.d.ts +++ b/lib/src/platform/entityresolution/entity_resolution_pb.d.ts @@ -1,129 +1,242 @@ -import * as jspb from 'google-protobuf'; - -import * as authorization_authorization_pb from '../authorization/authorization_pb'; // proto import: "authorization/authorization.proto" -import * as google_protobuf_struct_pb from 'google-protobuf/google/protobuf/struct_pb'; // proto import: "google/protobuf/struct.proto" -import * as google_protobuf_any_pb from 'google-protobuf/google/protobuf/any_pb'; // proto import: "google/protobuf/any.proto" -import * as google_api_annotations_pb from '../google/api/annotations_pb'; // proto import: "google/api/annotations.proto" - -export class ResolveEntitiesRequest extends jspb.Message { - getEntitiesList(): Array; - setEntitiesList(value: Array): ResolveEntitiesRequest; - clearEntitiesList(): ResolveEntitiesRequest; - addEntities( - value?: authorization_authorization_pb.Entity, - index?: number - ): authorization_authorization_pb.Entity; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ResolveEntitiesRequest.AsObject; - static toObject( - includeInstance: boolean, - msg: ResolveEntitiesRequest - ): ResolveEntitiesRequest.AsObject; - static serializeBinaryToWriter(message: ResolveEntitiesRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ResolveEntitiesRequest; - static deserializeBinaryFromReader( - message: ResolveEntitiesRequest, - reader: jspb.BinaryReader - ): ResolveEntitiesRequest; +// @generated by protoc-gen-es v1.9.0 with parameter "target=js+dts,import_extension=none" +// @generated from file entityresolution/entity_resolution.proto (package entityresolution, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { Any, BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage, Struct } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; +import type { Entity, EntityChain, Token } from "../authorization/authorization_pb"; + +/** + * + * Example: Get idp attributes for bob and alice (both represented using an email address + * { + * "entities": [ + * { + * "id": "e1", + * "emailAddress": "bob@example.org" + * }, + * { + * "id": "e2", + * "emailAddress": "alice@example.org" + * } + * ] + * } + * + * + * @generated from message entityresolution.ResolveEntitiesRequest + */ +export declare class ResolveEntitiesRequest extends Message { + /** + * @generated from field: repeated authorization.Entity entities = 1; + */ + entities: Entity[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "entityresolution.ResolveEntitiesRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ResolveEntitiesRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): ResolveEntitiesRequest; + + static fromJsonString(jsonString: string, options?: Partial): ResolveEntitiesRequest; + + static equals(a: ResolveEntitiesRequest | PlainMessage | undefined, b: ResolveEntitiesRequest | PlainMessage | undefined): boolean; } -export namespace ResolveEntitiesRequest { - export type AsObject = { - entitiesList: Array; - }; -} +/** + * @generated from message entityresolution.EntityRepresentation + */ +export declare class EntityRepresentation extends Message { + /** + * @generated from field: repeated google.protobuf.Struct additional_props = 1; + */ + additionalProps: Struct[]; -export class EntityRepresentation extends jspb.Message { - getAdditionalPropsList(): Array; - setAdditionalPropsList(value: Array): EntityRepresentation; - clearAdditionalPropsList(): EntityRepresentation; - addAdditionalProps( - value?: google_protobuf_struct_pb.Struct, - index?: number - ): google_protobuf_struct_pb.Struct; - - getOriginalId(): string; - setOriginalId(value: string): EntityRepresentation; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): EntityRepresentation.AsObject; - static toObject( - includeInstance: boolean, - msg: EntityRepresentation - ): EntityRepresentation.AsObject; - static serializeBinaryToWriter(message: EntityRepresentation, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): EntityRepresentation; - static deserializeBinaryFromReader( - message: EntityRepresentation, - reader: jspb.BinaryReader - ): EntityRepresentation; -} + /** + * ephemeral entity id from the request + * + * @generated from field: string original_id = 2; + */ + originalId: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "entityresolution.EntityRepresentation"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): EntityRepresentation; -export namespace EntityRepresentation { - export type AsObject = { - additionalPropsList: Array; - originalId: string; - }; + static fromJson(jsonValue: JsonValue, options?: Partial): EntityRepresentation; + + static fromJsonString(jsonString: string, options?: Partial): EntityRepresentation; + + static equals(a: EntityRepresentation | PlainMessage | undefined, b: EntityRepresentation | PlainMessage | undefined): boolean; } -export class ResolveEntitiesResponse extends jspb.Message { - getEntityRepresentationsList(): Array; - setEntityRepresentationsList(value: Array): ResolveEntitiesResponse; - clearEntityRepresentationsList(): ResolveEntitiesResponse; - addEntityRepresentations(value?: EntityRepresentation, index?: number): EntityRepresentation; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ResolveEntitiesResponse.AsObject; - static toObject( - includeInstance: boolean, - msg: ResolveEntitiesResponse - ): ResolveEntitiesResponse.AsObject; - static serializeBinaryToWriter(message: ResolveEntitiesResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ResolveEntitiesResponse; - static deserializeBinaryFromReader( - message: ResolveEntitiesResponse, - reader: jspb.BinaryReader - ): ResolveEntitiesResponse; +/** + * + * Example: Get idp attributes for bob and alice + * { + * "entity_representations": [ + * { + * "idp_entity_id": "e1", + * "additional_props": {"someAttr1":"someValue1"} + * }, + * { + * "idp_entity_id": "e2", + * "additional_props": {"someAttr2":"someValue2"} + * } + * ] + * } + * + * + * @generated from message entityresolution.ResolveEntitiesResponse + */ +export declare class ResolveEntitiesResponse extends Message { + /** + * @generated from field: repeated entityresolution.EntityRepresentation entity_representations = 1; + */ + entityRepresentations: EntityRepresentation[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "entityresolution.ResolveEntitiesResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ResolveEntitiesResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): ResolveEntitiesResponse; + + static fromJsonString(jsonString: string, options?: Partial): ResolveEntitiesResponse; + + static equals(a: ResolveEntitiesResponse | PlainMessage | undefined, b: ResolveEntitiesResponse | PlainMessage | undefined): boolean; } -export namespace ResolveEntitiesResponse { - export type AsObject = { - entityRepresentationsList: Array; - }; +/** + * @generated from message entityresolution.EntityNotFoundError + */ +export declare class EntityNotFoundError extends Message { + /** + * @generated from field: int32 code = 1; + */ + code: number; + + /** + * @generated from field: string message = 2; + */ + message: string; + + /** + * @generated from field: repeated google.protobuf.Any details = 3; + */ + details: Any[]; + + /** + * @generated from field: string entity = 4; + */ + entity: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "entityresolution.EntityNotFoundError"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): EntityNotFoundError; + + static fromJson(jsonValue: JsonValue, options?: Partial): EntityNotFoundError; + + static fromJsonString(jsonString: string, options?: Partial): EntityNotFoundError; + + static equals(a: EntityNotFoundError | PlainMessage | undefined, b: EntityNotFoundError | PlainMessage | undefined): boolean; } -export class EntityNotFoundError extends jspb.Message { - getCode(): number; - setCode(value: number): EntityNotFoundError; - - getMessage(): string; - setMessage(value: string): EntityNotFoundError; - - getDetailsList(): Array; - setDetailsList(value: Array): EntityNotFoundError; - clearDetailsList(): EntityNotFoundError; - addDetails(value?: google_protobuf_any_pb.Any, index?: number): google_protobuf_any_pb.Any; - - getEntity(): string; - setEntity(value: string): EntityNotFoundError; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): EntityNotFoundError.AsObject; - static toObject(includeInstance: boolean, msg: EntityNotFoundError): EntityNotFoundError.AsObject; - static serializeBinaryToWriter(message: EntityNotFoundError, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): EntityNotFoundError; - static deserializeBinaryFromReader( - message: EntityNotFoundError, - reader: jspb.BinaryReader - ): EntityNotFoundError; +/** + * + * Example: Get Entity chains for tokens aaaaaa and bbbbbb + * { + * "tokens": [ + * "aaaaaaa", + * "bbbbbbbb" + * ] + * } + * + * + * @generated from message entityresolution.CreateEntityChainFromJwtRequest + */ +export declare class CreateEntityChainFromJwtRequest extends Message { + /** + * @generated from field: repeated authorization.Token tokens = 1; + */ + tokens: Token[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "entityresolution.CreateEntityChainFromJwtRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): CreateEntityChainFromJwtRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): CreateEntityChainFromJwtRequest; + + static fromJsonString(jsonString: string, options?: Partial): CreateEntityChainFromJwtRequest; + + static equals(a: CreateEntityChainFromJwtRequest | PlainMessage | undefined, b: CreateEntityChainFromJwtRequest | PlainMessage | undefined): boolean; } -export namespace EntityNotFoundError { - export type AsObject = { - code: number; - message: string; - detailsList: Array; - entity: string; - }; +/** + * + * Example: Return the entity chains from the provided tokens + * { + * "entity_chains": [ + * { + * "id": "tok1", + * "entities": [ + * { + * "clientId": "client1" + * } + * ] + * }, + * { + * "id": "tok2", + * "entities": [ + * { + * "userName": "alice", + * "clientId": "client2" + * } + * ] + * } + * ] + * } + * + * + * @generated from message entityresolution.CreateEntityChainFromJwtResponse + */ +export declare class CreateEntityChainFromJwtResponse extends Message { + /** + * @generated from field: repeated authorization.EntityChain entity_chains = 1; + */ + entityChains: EntityChain[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "entityresolution.CreateEntityChainFromJwtResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): CreateEntityChainFromJwtResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): CreateEntityChainFromJwtResponse; + + static fromJsonString(jsonString: string, options?: Partial): CreateEntityChainFromJwtResponse; + + static equals(a: CreateEntityChainFromJwtResponse | PlainMessage | undefined, b: CreateEntityChainFromJwtResponse | PlainMessage | undefined): boolean; } + diff --git a/lib/src/platform/entityresolution/entity_resolution_pb.ts b/lib/src/platform/entityresolution/entity_resolution_pb.ts deleted file mode 100644 index cd86d994..00000000 --- a/lib/src/platform/entityresolution/entity_resolution_pb.ts +++ /dev/null @@ -1,263 +0,0 @@ -// @generated by protoc-gen-es v1.9.0 with parameter "target=ts" -// @generated from file entityresolution/entity_resolution.proto (package entityresolution, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import type { - BinaryReadOptions, - FieldList, - JsonReadOptions, - JsonValue, - PartialMessage, - PlainMessage, -} from '@bufbuild/protobuf'; -import { Any, Message, proto3, Struct } from '@bufbuild/protobuf'; -import { Entity } from '../authorization/authorization_pb.js'; - -/** - * - * Example: Get idp attributes for bob and alice (both represented using an email address - * { - * "entities": [ - * { - * "id": "e1", - * "emailAddress": "bob@example.org" - * }, - * { - * "id": "e2", - * "emailAddress": "alice@example.org" - * } - * ] - * } - * - * - * @generated from message entityresolution.ResolveEntitiesRequest - */ -export class ResolveEntitiesRequest extends Message { - /** - * @generated from field: repeated authorization.Entity entities = 1; - */ - entities: Entity[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'entityresolution.ResolveEntitiesRequest'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'entities', kind: 'message', T: Entity, repeated: true }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): ResolveEntitiesRequest { - return new ResolveEntitiesRequest().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): ResolveEntitiesRequest { - return new ResolveEntitiesRequest().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): ResolveEntitiesRequest { - return new ResolveEntitiesRequest().fromJsonString(jsonString, options); - } - - static equals( - a: ResolveEntitiesRequest | PlainMessage | undefined, - b: ResolveEntitiesRequest | PlainMessage | undefined - ): boolean { - return proto3.util.equals(ResolveEntitiesRequest, a, b); - } -} - -/** - * @generated from message entityresolution.EntityRepresentation - */ -export class EntityRepresentation extends Message { - /** - * @generated from field: repeated google.protobuf.Struct additional_props = 1; - */ - additionalProps: Struct[] = []; - - /** - * ephemeral entity id from the request - * - * @generated from field: string original_id = 2; - */ - originalId = ''; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'entityresolution.EntityRepresentation'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'additional_props', kind: 'message', T: Struct, repeated: true }, - { no: 2, name: 'original_id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): EntityRepresentation { - return new EntityRepresentation().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): EntityRepresentation { - return new EntityRepresentation().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): EntityRepresentation { - return new EntityRepresentation().fromJsonString(jsonString, options); - } - - static equals( - a: EntityRepresentation | PlainMessage | undefined, - b: EntityRepresentation | PlainMessage | undefined - ): boolean { - return proto3.util.equals(EntityRepresentation, a, b); - } -} - -/** - * - * Example: Get idp attributes for bob and alice - * { - * "entity_representations": [ - * { - * "idp_entity_id": "e1", - * "additional_props": {"someAttr1":"someValue1"} - * }, - * { - * "idp_entity_id": "e2", - * "additional_props": {"someAttr2":"someValue2"} - * } - * ] - * } - * - * - * @generated from message entityresolution.ResolveEntitiesResponse - */ -export class ResolveEntitiesResponse extends Message { - /** - * @generated from field: repeated entityresolution.EntityRepresentation entity_representations = 1; - */ - entityRepresentations: EntityRepresentation[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'entityresolution.ResolveEntitiesResponse'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { - no: 1, - name: 'entity_representations', - kind: 'message', - T: EntityRepresentation, - repeated: true, - }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): ResolveEntitiesResponse { - return new ResolveEntitiesResponse().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): ResolveEntitiesResponse { - return new ResolveEntitiesResponse().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): ResolveEntitiesResponse { - return new ResolveEntitiesResponse().fromJsonString(jsonString, options); - } - - static equals( - a: ResolveEntitiesResponse | PlainMessage | undefined, - b: ResolveEntitiesResponse | PlainMessage | undefined - ): boolean { - return proto3.util.equals(ResolveEntitiesResponse, a, b); - } -} - -/** - * @generated from message entityresolution.EntityNotFoundError - */ -export class EntityNotFoundError extends Message { - /** - * @generated from field: int32 code = 1; - */ - code = 0; - - /** - * @generated from field: string message = 2; - */ - message = ''; - - /** - * @generated from field: repeated google.protobuf.Any details = 3; - */ - details: Any[] = []; - - /** - * @generated from field: string entity = 4; - */ - entity = ''; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'entityresolution.EntityNotFoundError'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'code', kind: 'scalar', T: 5 /* ScalarType.INT32 */ }, - { no: 2, name: 'message', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { no: 3, name: 'details', kind: 'message', T: Any, repeated: true }, - { no: 4, name: 'entity', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): EntityNotFoundError { - return new EntityNotFoundError().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): EntityNotFoundError { - return new EntityNotFoundError().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): EntityNotFoundError { - return new EntityNotFoundError().fromJsonString(jsonString, options); - } - - static equals( - a: EntityNotFoundError | PlainMessage | undefined, - b: EntityNotFoundError | PlainMessage | undefined - ): boolean { - return proto3.util.equals(EntityNotFoundError, a, b); - } -} diff --git a/lib/src/platform/kas/KasServiceClientPb.ts b/lib/src/platform/kas/KasServiceClientPb.ts deleted file mode 100644 index d95b7df2..00000000 --- a/lib/src/platform/kas/KasServiceClientPb.ts +++ /dev/null @@ -1,217 +0,0 @@ -/** - * @fileoverview gRPC-Web generated client stub for kas - * @enhanceable - * @public - */ - -// Code generated by protoc-gen-grpc-web. DO NOT EDIT. -// versions: -// protoc-gen-grpc-web v1.5.0 -// protoc v0.0.0 -// source: kas/kas.proto - -/* eslint-disable */ -// @ts-nocheck - -import * as grpcWeb from 'grpc-web'; - -import * as google_protobuf_wrappers_pb from 'google-protobuf/google/protobuf/wrappers_pb'; // proto import: "google/protobuf/wrappers.proto" -import * as kas_kas_pb from '../kas/kas_pb'; // proto import: "kas/kas.proto" - -export class AccessServiceClient { - client_: grpcWeb.AbstractClientBase; - hostname_: string; - credentials_: null | { [index: string]: string }; - options_: null | { [index: string]: any }; - - constructor( - hostname: string, - credentials?: null | { [index: string]: string }, - options?: null | { [index: string]: any } - ) { - if (!options) options = {}; - if (!credentials) credentials = {}; - options['format'] = 'binary'; - - this.client_ = new grpcWeb.GrpcWebClientBase(options); - this.hostname_ = hostname.replace(/\/+$/, ''); - this.credentials_ = credentials; - this.options_ = options; - } - - methodDescriptorInfo = new grpcWeb.MethodDescriptor( - '/kas.AccessService/Info', - grpcWeb.MethodType.UNARY, - kas_kas_pb.InfoRequest, - kas_kas_pb.InfoResponse, - (request: kas_kas_pb.InfoRequest) => { - return request.serializeBinary(); - }, - kas_kas_pb.InfoResponse.deserializeBinary - ); - - info( - request: kas_kas_pb.InfoRequest, - metadata?: grpcWeb.Metadata | null - ): Promise; - - info( - request: kas_kas_pb.InfoRequest, - metadata: grpcWeb.Metadata | null, - callback: (err: grpcWeb.RpcError, response: kas_kas_pb.InfoResponse) => void - ): grpcWeb.ClientReadableStream; - - info( - request: kas_kas_pb.InfoRequest, - metadata?: grpcWeb.Metadata | null, - callback?: (err: grpcWeb.RpcError, response: kas_kas_pb.InfoResponse) => void - ) { - if (callback !== undefined) { - return this.client_.rpcCall( - this.hostname_ + '/kas.AccessService/Info', - request, - metadata || {}, - this.methodDescriptorInfo, - callback - ); - } - return this.client_.unaryCall( - this.hostname_ + '/kas.AccessService/Info', - request, - metadata || {}, - this.methodDescriptorInfo - ); - } - - methodDescriptorPublicKey = new grpcWeb.MethodDescriptor( - '/kas.AccessService/PublicKey', - grpcWeb.MethodType.UNARY, - kas_kas_pb.PublicKeyRequest, - kas_kas_pb.PublicKeyResponse, - (request: kas_kas_pb.PublicKeyRequest) => { - return request.serializeBinary(); - }, - kas_kas_pb.PublicKeyResponse.deserializeBinary - ); - - publicKey( - request: kas_kas_pb.PublicKeyRequest, - metadata?: grpcWeb.Metadata | null - ): Promise; - - publicKey( - request: kas_kas_pb.PublicKeyRequest, - metadata: grpcWeb.Metadata | null, - callback: (err: grpcWeb.RpcError, response: kas_kas_pb.PublicKeyResponse) => void - ): grpcWeb.ClientReadableStream; - - publicKey( - request: kas_kas_pb.PublicKeyRequest, - metadata?: grpcWeb.Metadata | null, - callback?: (err: grpcWeb.RpcError, response: kas_kas_pb.PublicKeyResponse) => void - ) { - if (callback !== undefined) { - return this.client_.rpcCall( - this.hostname_ + '/kas.AccessService/PublicKey', - request, - metadata || {}, - this.methodDescriptorPublicKey, - callback - ); - } - return this.client_.unaryCall( - this.hostname_ + '/kas.AccessService/PublicKey', - request, - metadata || {}, - this.methodDescriptorPublicKey - ); - } - - methodDescriptorLegacyPublicKey = new grpcWeb.MethodDescriptor( - '/kas.AccessService/LegacyPublicKey', - grpcWeb.MethodType.UNARY, - kas_kas_pb.LegacyPublicKeyRequest, - google_protobuf_wrappers_pb.StringValue, - (request: kas_kas_pb.LegacyPublicKeyRequest) => { - return request.serializeBinary(); - }, - google_protobuf_wrappers_pb.StringValue.deserializeBinary - ); - - legacyPublicKey( - request: kas_kas_pb.LegacyPublicKeyRequest, - metadata?: grpcWeb.Metadata | null - ): Promise; - - legacyPublicKey( - request: kas_kas_pb.LegacyPublicKeyRequest, - metadata: grpcWeb.Metadata | null, - callback: (err: grpcWeb.RpcError, response: google_protobuf_wrappers_pb.StringValue) => void - ): grpcWeb.ClientReadableStream; - - legacyPublicKey( - request: kas_kas_pb.LegacyPublicKeyRequest, - metadata?: grpcWeb.Metadata | null, - callback?: (err: grpcWeb.RpcError, response: google_protobuf_wrappers_pb.StringValue) => void - ) { - if (callback !== undefined) { - return this.client_.rpcCall( - this.hostname_ + '/kas.AccessService/LegacyPublicKey', - request, - metadata || {}, - this.methodDescriptorLegacyPublicKey, - callback - ); - } - return this.client_.unaryCall( - this.hostname_ + '/kas.AccessService/LegacyPublicKey', - request, - metadata || {}, - this.methodDescriptorLegacyPublicKey - ); - } - - methodDescriptorRewrap = new grpcWeb.MethodDescriptor( - '/kas.AccessService/Rewrap', - grpcWeb.MethodType.UNARY, - kas_kas_pb.RewrapRequest, - kas_kas_pb.RewrapResponse, - (request: kas_kas_pb.RewrapRequest) => { - return request.serializeBinary(); - }, - kas_kas_pb.RewrapResponse.deserializeBinary - ); - - rewrap( - request: kas_kas_pb.RewrapRequest, - metadata?: grpcWeb.Metadata | null - ): Promise; - - rewrap( - request: kas_kas_pb.RewrapRequest, - metadata: grpcWeb.Metadata | null, - callback: (err: grpcWeb.RpcError, response: kas_kas_pb.RewrapResponse) => void - ): grpcWeb.ClientReadableStream; - - rewrap( - request: kas_kas_pb.RewrapRequest, - metadata?: grpcWeb.Metadata | null, - callback?: (err: grpcWeb.RpcError, response: kas_kas_pb.RewrapResponse) => void - ) { - if (callback !== undefined) { - return this.client_.rpcCall( - this.hostname_ + '/kas.AccessService/Rewrap', - request, - metadata || {}, - this.methodDescriptorRewrap, - callback - ); - } - return this.client_.unaryCall( - this.hostname_ + '/kas.AccessService/Rewrap', - request, - metadata || {}, - this.methodDescriptorRewrap - ); - } -} diff --git a/lib/src/platform/kas/kas_connect.ts b/lib/src/platform/kas/kas_connect.ts deleted file mode 100644 index cf4734ee..00000000 --- a/lib/src/platform/kas/kas_connect.ts +++ /dev/null @@ -1,66 +0,0 @@ -// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=ts" -// @generated from file kas/kas.proto (package kas, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { - InfoRequest, - InfoResponse, - LegacyPublicKeyRequest, - PublicKeyRequest, - PublicKeyResponse, - RewrapRequest, - RewrapResponse, -} from './kas_pb.js'; -import { MethodKind, StringValue } from '@bufbuild/protobuf'; - -/** - * Get app info from the root path - * - * @generated from service kas.AccessService - */ -export const AccessService = { - typeName: 'kas.AccessService', - methods: { - /** - * Get the current version of the service - * - * @generated from rpc kas.AccessService.Info - */ - info: { - name: 'Info', - I: InfoRequest, - O: InfoResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc kas.AccessService.PublicKey - */ - publicKey: { - name: 'PublicKey', - I: PublicKeyRequest, - O: PublicKeyResponse, - kind: MethodKind.Unary, - }, - /** - * buf:lint:ignore RPC_RESPONSE_STANDARD_NAME - * - * @generated from rpc kas.AccessService.LegacyPublicKey - */ - legacyPublicKey: { - name: 'LegacyPublicKey', - I: LegacyPublicKeyRequest, - O: StringValue, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc kas.AccessService.Rewrap - */ - rewrap: { - name: 'Rewrap', - I: RewrapRequest, - O: RewrapResponse, - kind: MethodKind.Unary, - }, - }, -} as const; diff --git a/lib/src/platform/kas/kas_pb.d.ts b/lib/src/platform/kas/kas_pb.d.ts index 67ed6d72..d8fa8ced 100644 --- a/lib/src/platform/kas/kas_pb.d.ts +++ b/lib/src/platform/kas/kas_pb.d.ts @@ -1,170 +1,200 @@ -import * as jspb from 'google-protobuf'; - -import * as google_api_annotations_pb from '../google/api/annotations_pb'; // proto import: "google/api/annotations.proto" -import * as google_protobuf_struct_pb from 'google-protobuf/google/protobuf/struct_pb'; // proto import: "google/protobuf/struct.proto" -import * as google_protobuf_wrappers_pb from 'google-protobuf/google/protobuf/wrappers_pb'; // proto import: "google/protobuf/wrappers.proto" -import * as protoc$gen$openapiv2_options_annotations_pb from '../protoc-gen-openapiv2/options/annotations_pb'; // proto import: "protoc-gen-openapiv2/options/annotations.proto" - -export class InfoRequest extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): InfoRequest.AsObject; - static toObject(includeInstance: boolean, msg: InfoRequest): InfoRequest.AsObject; - static serializeBinaryToWriter(message: InfoRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): InfoRequest; - static deserializeBinaryFromReader(message: InfoRequest, reader: jspb.BinaryReader): InfoRequest; -} +// @generated by protoc-gen-es v1.9.0 with parameter "target=js+dts,import_extension=none" +// @generated from file kas/kas.proto (package kas, syntax proto3) +/* eslint-disable */ +// @ts-nocheck -export namespace InfoRequest { - export type AsObject = {}; -} +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage, Value } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; -export class InfoResponse extends jspb.Message { - getVersion(): string; - setVersion(value: string): InfoResponse; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): InfoResponse.AsObject; - static toObject(includeInstance: boolean, msg: InfoResponse): InfoResponse.AsObject; - static serializeBinaryToWriter(message: InfoResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): InfoResponse; - static deserializeBinaryFromReader( - message: InfoResponse, - reader: jspb.BinaryReader - ): InfoResponse; -} +/** + * Intentionally empty. May include features later. + * + * @generated from message kas.InfoRequest + */ +export declare class InfoRequest extends Message { + constructor(data?: PartialMessage); -export namespace InfoResponse { - export type AsObject = { - version: string; - }; -} + static readonly runtime: typeof proto3; + static readonly typeName = "kas.InfoRequest"; + static readonly fields: FieldList; -export class LegacyPublicKeyRequest extends jspb.Message { - getAlgorithm(): string; - setAlgorithm(value: string): LegacyPublicKeyRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): LegacyPublicKeyRequest.AsObject; - static toObject( - includeInstance: boolean, - msg: LegacyPublicKeyRequest - ): LegacyPublicKeyRequest.AsObject; - static serializeBinaryToWriter(message: LegacyPublicKeyRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): LegacyPublicKeyRequest; - static deserializeBinaryFromReader( - message: LegacyPublicKeyRequest, - reader: jspb.BinaryReader - ): LegacyPublicKeyRequest; -} + static fromBinary(bytes: Uint8Array, options?: Partial): InfoRequest; -export namespace LegacyPublicKeyRequest { - export type AsObject = { - algorithm: string; - }; -} + static fromJson(jsonValue: JsonValue, options?: Partial): InfoRequest; -export class PublicKeyRequest extends jspb.Message { - getAlgorithm(): string; - setAlgorithm(value: string): PublicKeyRequest; - - getFmt(): string; - setFmt(value: string): PublicKeyRequest; - - getV(): string; - setV(value: string): PublicKeyRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PublicKeyRequest.AsObject; - static toObject(includeInstance: boolean, msg: PublicKeyRequest): PublicKeyRequest.AsObject; - static serializeBinaryToWriter(message: PublicKeyRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PublicKeyRequest; - static deserializeBinaryFromReader( - message: PublicKeyRequest, - reader: jspb.BinaryReader - ): PublicKeyRequest; -} + static fromJsonString(jsonString: string, options?: Partial): InfoRequest; -export namespace PublicKeyRequest { - export type AsObject = { - algorithm: string; - fmt: string; - v: string; - }; + static equals(a: InfoRequest | PlainMessage | undefined, b: InfoRequest | PlainMessage | undefined): boolean; } -export class PublicKeyResponse extends jspb.Message { - getPublicKey(): string; - setPublicKey(value: string): PublicKeyResponse; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PublicKeyResponse.AsObject; - static toObject(includeInstance: boolean, msg: PublicKeyResponse): PublicKeyResponse.AsObject; - static serializeBinaryToWriter(message: PublicKeyResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PublicKeyResponse; - static deserializeBinaryFromReader( - message: PublicKeyResponse, - reader: jspb.BinaryReader - ): PublicKeyResponse; +/** + * Service application level metadata + * + * @generated from message kas.InfoResponse + */ +export declare class InfoResponse extends Message { + /** + * @generated from field: string version = 1; + */ + version: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "kas.InfoResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): InfoResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): InfoResponse; + + static fromJsonString(jsonString: string, options?: Partial): InfoResponse; + + static equals(a: InfoResponse | PlainMessage | undefined, b: InfoResponse | PlainMessage | undefined): boolean; } -export namespace PublicKeyResponse { - export type AsObject = { - publicKey: string; - }; +/** + * @generated from message kas.LegacyPublicKeyRequest + */ +export declare class LegacyPublicKeyRequest extends Message { + /** + * @generated from field: string algorithm = 1; + */ + algorithm: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "kas.LegacyPublicKeyRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): LegacyPublicKeyRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): LegacyPublicKeyRequest; + + static fromJsonString(jsonString: string, options?: Partial): LegacyPublicKeyRequest; + + static equals(a: LegacyPublicKeyRequest | PlainMessage | undefined, b: LegacyPublicKeyRequest | PlainMessage | undefined): boolean; } -export class RewrapRequest extends jspb.Message { - getSignedRequestToken(): string; - setSignedRequestToken(value: string): RewrapRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RewrapRequest.AsObject; - static toObject(includeInstance: boolean, msg: RewrapRequest): RewrapRequest.AsObject; - static serializeBinaryToWriter(message: RewrapRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RewrapRequest; - static deserializeBinaryFromReader( - message: RewrapRequest, - reader: jspb.BinaryReader - ): RewrapRequest; +/** + * @generated from message kas.PublicKeyRequest + */ +export declare class PublicKeyRequest extends Message { + /** + * @generated from field: string algorithm = 1; + */ + algorithm: string; + + /** + * @generated from field: string fmt = 2; + */ + fmt: string; + + /** + * @generated from field: string v = 3; + */ + v: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "kas.PublicKeyRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): PublicKeyRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): PublicKeyRequest; + + static fromJsonString(jsonString: string, options?: Partial): PublicKeyRequest; + + static equals(a: PublicKeyRequest | PlainMessage | undefined, b: PublicKeyRequest | PlainMessage | undefined): boolean; } -export namespace RewrapRequest { - export type AsObject = { - signedRequestToken: string; - }; +/** + * @generated from message kas.PublicKeyResponse + */ +export declare class PublicKeyResponse extends Message { + /** + * @generated from field: string public_key = 1; + */ + publicKey: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "kas.PublicKeyResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): PublicKeyResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): PublicKeyResponse; + + static fromJsonString(jsonString: string, options?: Partial): PublicKeyResponse; + + static equals(a: PublicKeyResponse | PlainMessage | undefined, b: PublicKeyResponse | PlainMessage | undefined): boolean; } -export class RewrapResponse extends jspb.Message { - getMetadataMap(): jspb.Map; - clearMetadataMap(): RewrapResponse; - - getEntityWrappedKey(): Uint8Array | string; - getEntityWrappedKey_asU8(): Uint8Array; - getEntityWrappedKey_asB64(): string; - setEntityWrappedKey(value: Uint8Array | string): RewrapResponse; - - getSessionPublicKey(): string; - setSessionPublicKey(value: string): RewrapResponse; - - getSchemaVersion(): string; - setSchemaVersion(value: string): RewrapResponse; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RewrapResponse.AsObject; - static toObject(includeInstance: boolean, msg: RewrapResponse): RewrapResponse.AsObject; - static serializeBinaryToWriter(message: RewrapResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RewrapResponse; - static deserializeBinaryFromReader( - message: RewrapResponse, - reader: jspb.BinaryReader - ): RewrapResponse; +/** + * @generated from message kas.RewrapRequest + */ +export declare class RewrapRequest extends Message { + /** + * @generated from field: string signed_request_token = 1; + */ + signedRequestToken: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "kas.RewrapRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): RewrapRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): RewrapRequest; + + static fromJsonString(jsonString: string, options?: Partial): RewrapRequest; + + static equals(a: RewrapRequest | PlainMessage | undefined, b: RewrapRequest | PlainMessage | undefined): boolean; } -export namespace RewrapResponse { - export type AsObject = { - metadataMap: Array<[string, google_protobuf_struct_pb.Value.AsObject]>; - entityWrappedKey: Uint8Array | string; - sessionPublicKey: string; - schemaVersion: string; - }; +/** + * @generated from message kas.RewrapResponse + */ +export declare class RewrapResponse extends Message { + /** + * @generated from field: map metadata = 1; + */ + metadata: { [key: string]: Value }; + + /** + * @generated from field: bytes entity_wrapped_key = 2; + */ + entityWrappedKey: Uint8Array; + + /** + * @generated from field: string session_public_key = 3; + */ + sessionPublicKey: string; + + /** + * @generated from field: string schema_version = 4; + */ + schemaVersion: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "kas.RewrapResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): RewrapResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): RewrapResponse; + + static fromJsonString(jsonString: string, options?: Partial): RewrapResponse; + + static equals(a: RewrapResponse | PlainMessage | undefined, b: RewrapResponse | PlainMessage | undefined): boolean; } + diff --git a/lib/src/platform/kas/kas_pb.ts b/lib/src/platform/kas/kas_pb.ts deleted file mode 100644 index 4b4c7b32..00000000 --- a/lib/src/platform/kas/kas_pb.ts +++ /dev/null @@ -1,336 +0,0 @@ -// @generated by protoc-gen-es v1.9.0 with parameter "target=ts" -// @generated from file kas/kas.proto (package kas, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import type { - BinaryReadOptions, - FieldList, - JsonReadOptions, - JsonValue, - PartialMessage, - PlainMessage, -} from '@bufbuild/protobuf'; -import { Message, proto3, Value } from '@bufbuild/protobuf'; - -/** - * Intentionally empty. May include features later. - * - * @generated from message kas.InfoRequest - */ -export class InfoRequest extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'kas.InfoRequest'; - static readonly fields: FieldList = proto3.util.newFieldList(() => []); - - static fromBinary(bytes: Uint8Array, options?: Partial): InfoRequest { - return new InfoRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): InfoRequest { - return new InfoRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): InfoRequest { - return new InfoRequest().fromJsonString(jsonString, options); - } - - static equals( - a: InfoRequest | PlainMessage | undefined, - b: InfoRequest | PlainMessage | undefined - ): boolean { - return proto3.util.equals(InfoRequest, a, b); - } -} - -/** - * Service application level metadata - * - * @generated from message kas.InfoResponse - */ -export class InfoResponse extends Message { - /** - * @generated from field: string version = 1; - */ - version = ''; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'kas.InfoResponse'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'version', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): InfoResponse { - return new InfoResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): InfoResponse { - return new InfoResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): InfoResponse { - return new InfoResponse().fromJsonString(jsonString, options); - } - - static equals( - a: InfoResponse | PlainMessage | undefined, - b: InfoResponse | PlainMessage | undefined - ): boolean { - return proto3.util.equals(InfoResponse, a, b); - } -} - -/** - * @generated from message kas.LegacyPublicKeyRequest - */ -export class LegacyPublicKeyRequest extends Message { - /** - * @generated from field: string algorithm = 1; - */ - algorithm = ''; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'kas.LegacyPublicKeyRequest'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'algorithm', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): LegacyPublicKeyRequest { - return new LegacyPublicKeyRequest().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): LegacyPublicKeyRequest { - return new LegacyPublicKeyRequest().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): LegacyPublicKeyRequest { - return new LegacyPublicKeyRequest().fromJsonString(jsonString, options); - } - - static equals( - a: LegacyPublicKeyRequest | PlainMessage | undefined, - b: LegacyPublicKeyRequest | PlainMessage | undefined - ): boolean { - return proto3.util.equals(LegacyPublicKeyRequest, a, b); - } -} - -/** - * @generated from message kas.PublicKeyRequest - */ -export class PublicKeyRequest extends Message { - /** - * @generated from field: string algorithm = 1; - */ - algorithm = ''; - - /** - * @generated from field: string fmt = 2; - */ - fmt = ''; - - /** - * @generated from field: string v = 3; - */ - v = ''; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'kas.PublicKeyRequest'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'algorithm', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { no: 2, name: 'fmt', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { no: 3, name: 'v', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PublicKeyRequest { - return new PublicKeyRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): PublicKeyRequest { - return new PublicKeyRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): PublicKeyRequest { - return new PublicKeyRequest().fromJsonString(jsonString, options); - } - - static equals( - a: PublicKeyRequest | PlainMessage | undefined, - b: PublicKeyRequest | PlainMessage | undefined - ): boolean { - return proto3.util.equals(PublicKeyRequest, a, b); - } -} - -/** - * @generated from message kas.PublicKeyResponse - */ -export class PublicKeyResponse extends Message { - /** - * @generated from field: string public_key = 1; - */ - publicKey = ''; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'kas.PublicKeyResponse'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'public_key', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PublicKeyResponse { - return new PublicKeyResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): PublicKeyResponse { - return new PublicKeyResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): PublicKeyResponse { - return new PublicKeyResponse().fromJsonString(jsonString, options); - } - - static equals( - a: PublicKeyResponse | PlainMessage | undefined, - b: PublicKeyResponse | PlainMessage | undefined - ): boolean { - return proto3.util.equals(PublicKeyResponse, a, b); - } -} - -/** - * @generated from message kas.RewrapRequest - */ -export class RewrapRequest extends Message { - /** - * @generated from field: string signed_request_token = 1; - */ - signedRequestToken = ''; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'kas.RewrapRequest'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'signed_request_token', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RewrapRequest { - return new RewrapRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): RewrapRequest { - return new RewrapRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RewrapRequest { - return new RewrapRequest().fromJsonString(jsonString, options); - } - - static equals( - a: RewrapRequest | PlainMessage | undefined, - b: RewrapRequest | PlainMessage | undefined - ): boolean { - return proto3.util.equals(RewrapRequest, a, b); - } -} - -/** - * @generated from message kas.RewrapResponse - */ -export class RewrapResponse extends Message { - /** - * @generated from field: map metadata = 1; - */ - metadata: { [key: string]: Value } = {}; - - /** - * @generated from field: bytes entity_wrapped_key = 2; - */ - entityWrappedKey = new Uint8Array(0); - - /** - * @generated from field: string session_public_key = 3; - */ - sessionPublicKey = ''; - - /** - * @generated from field: string schema_version = 4; - */ - schemaVersion = ''; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'kas.RewrapResponse'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { - no: 1, - name: 'metadata', - kind: 'map', - K: 9 /* ScalarType.STRING */, - V: { kind: 'message', T: Value }, - }, - { no: 2, name: 'entity_wrapped_key', kind: 'scalar', T: 12 /* ScalarType.BYTES */ }, - { no: 3, name: 'session_public_key', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { no: 4, name: 'schema_version', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RewrapResponse { - return new RewrapResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): RewrapResponse { - return new RewrapResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RewrapResponse { - return new RewrapResponse().fromJsonString(jsonString, options); - } - - static equals( - a: RewrapResponse | PlainMessage | undefined, - b: RewrapResponse | PlainMessage | undefined - ): boolean { - return proto3.util.equals(RewrapResponse, a, b); - } -} diff --git a/lib/src/platform/policy/attributes/AttributesServiceClientPb.ts b/lib/src/platform/policy/attributes/AttributesServiceClientPb.ts deleted file mode 100644 index b7b1fc03..00000000 --- a/lib/src/platform/policy/attributes/AttributesServiceClientPb.ts +++ /dev/null @@ -1,790 +0,0 @@ -/** - * @fileoverview gRPC-Web generated client stub for policy.attributes - * @enhanceable - * @public - */ - -// Code generated by protoc-gen-grpc-web. DO NOT EDIT. -// versions: -// protoc-gen-grpc-web v1.5.0 -// protoc v0.0.0 -// source: policy/attributes/attributes.proto - -/* eslint-disable */ -// @ts-nocheck - -import * as grpcWeb from 'grpc-web'; - -import * as policy_attributes_attributes_pb from '../../policy/attributes/attributes_pb'; // proto import: "policy/attributes/attributes.proto" - -export class AttributesServiceClient { - client_: grpcWeb.AbstractClientBase; - hostname_: string; - credentials_: null | { [index: string]: string }; - options_: null | { [index: string]: any }; - - constructor( - hostname: string, - credentials?: null | { [index: string]: string }, - options?: null | { [index: string]: any } - ) { - if (!options) options = {}; - if (!credentials) credentials = {}; - options['format'] = 'binary'; - - this.client_ = new grpcWeb.GrpcWebClientBase(options); - this.hostname_ = hostname.replace(/\/+$/, ''); - this.credentials_ = credentials; - this.options_ = options; - } - - methodDescriptorListAttributes = new grpcWeb.MethodDescriptor( - '/policy.attributes.AttributesService/ListAttributes', - grpcWeb.MethodType.UNARY, - policy_attributes_attributes_pb.ListAttributesRequest, - policy_attributes_attributes_pb.ListAttributesResponse, - (request: policy_attributes_attributes_pb.ListAttributesRequest) => { - return request.serializeBinary(); - }, - policy_attributes_attributes_pb.ListAttributesResponse.deserializeBinary - ); - - listAttributes( - request: policy_attributes_attributes_pb.ListAttributesRequest, - metadata?: grpcWeb.Metadata | null - ): Promise; - - listAttributes( - request: policy_attributes_attributes_pb.ListAttributesRequest, - metadata: grpcWeb.Metadata | null, - callback: ( - err: grpcWeb.RpcError, - response: policy_attributes_attributes_pb.ListAttributesResponse - ) => void - ): grpcWeb.ClientReadableStream; - - listAttributes( - request: policy_attributes_attributes_pb.ListAttributesRequest, - metadata?: grpcWeb.Metadata | null, - callback?: ( - err: grpcWeb.RpcError, - response: policy_attributes_attributes_pb.ListAttributesResponse - ) => void - ) { - if (callback !== undefined) { - return this.client_.rpcCall( - this.hostname_ + '/policy.attributes.AttributesService/ListAttributes', - request, - metadata || {}, - this.methodDescriptorListAttributes, - callback - ); - } - return this.client_.unaryCall( - this.hostname_ + '/policy.attributes.AttributesService/ListAttributes', - request, - metadata || {}, - this.methodDescriptorListAttributes - ); - } - - methodDescriptorListAttributeValues = new grpcWeb.MethodDescriptor( - '/policy.attributes.AttributesService/ListAttributeValues', - grpcWeb.MethodType.UNARY, - policy_attributes_attributes_pb.ListAttributeValuesRequest, - policy_attributes_attributes_pb.ListAttributeValuesResponse, - (request: policy_attributes_attributes_pb.ListAttributeValuesRequest) => { - return request.serializeBinary(); - }, - policy_attributes_attributes_pb.ListAttributeValuesResponse.deserializeBinary - ); - - listAttributeValues( - request: policy_attributes_attributes_pb.ListAttributeValuesRequest, - metadata?: grpcWeb.Metadata | null - ): Promise; - - listAttributeValues( - request: policy_attributes_attributes_pb.ListAttributeValuesRequest, - metadata: grpcWeb.Metadata | null, - callback: ( - err: grpcWeb.RpcError, - response: policy_attributes_attributes_pb.ListAttributeValuesResponse - ) => void - ): grpcWeb.ClientReadableStream; - - listAttributeValues( - request: policy_attributes_attributes_pb.ListAttributeValuesRequest, - metadata?: grpcWeb.Metadata | null, - callback?: ( - err: grpcWeb.RpcError, - response: policy_attributes_attributes_pb.ListAttributeValuesResponse - ) => void - ) { - if (callback !== undefined) { - return this.client_.rpcCall( - this.hostname_ + '/policy.attributes.AttributesService/ListAttributeValues', - request, - metadata || {}, - this.methodDescriptorListAttributeValues, - callback - ); - } - return this.client_.unaryCall( - this.hostname_ + '/policy.attributes.AttributesService/ListAttributeValues', - request, - metadata || {}, - this.methodDescriptorListAttributeValues - ); - } - - methodDescriptorGetAttribute = new grpcWeb.MethodDescriptor( - '/policy.attributes.AttributesService/GetAttribute', - grpcWeb.MethodType.UNARY, - policy_attributes_attributes_pb.GetAttributeRequest, - policy_attributes_attributes_pb.GetAttributeResponse, - (request: policy_attributes_attributes_pb.GetAttributeRequest) => { - return request.serializeBinary(); - }, - policy_attributes_attributes_pb.GetAttributeResponse.deserializeBinary - ); - - getAttribute( - request: policy_attributes_attributes_pb.GetAttributeRequest, - metadata?: grpcWeb.Metadata | null - ): Promise; - - getAttribute( - request: policy_attributes_attributes_pb.GetAttributeRequest, - metadata: grpcWeb.Metadata | null, - callback: ( - err: grpcWeb.RpcError, - response: policy_attributes_attributes_pb.GetAttributeResponse - ) => void - ): grpcWeb.ClientReadableStream; - - getAttribute( - request: policy_attributes_attributes_pb.GetAttributeRequest, - metadata?: grpcWeb.Metadata | null, - callback?: ( - err: grpcWeb.RpcError, - response: policy_attributes_attributes_pb.GetAttributeResponse - ) => void - ) { - if (callback !== undefined) { - return this.client_.rpcCall( - this.hostname_ + '/policy.attributes.AttributesService/GetAttribute', - request, - metadata || {}, - this.methodDescriptorGetAttribute, - callback - ); - } - return this.client_.unaryCall( - this.hostname_ + '/policy.attributes.AttributesService/GetAttribute', - request, - metadata || {}, - this.methodDescriptorGetAttribute - ); - } - - methodDescriptorGetAttributeValuesByFqns = new grpcWeb.MethodDescriptor( - '/policy.attributes.AttributesService/GetAttributeValuesByFqns', - grpcWeb.MethodType.UNARY, - policy_attributes_attributes_pb.GetAttributeValuesByFqnsRequest, - policy_attributes_attributes_pb.GetAttributeValuesByFqnsResponse, - (request: policy_attributes_attributes_pb.GetAttributeValuesByFqnsRequest) => { - return request.serializeBinary(); - }, - policy_attributes_attributes_pb.GetAttributeValuesByFqnsResponse.deserializeBinary - ); - - getAttributeValuesByFqns( - request: policy_attributes_attributes_pb.GetAttributeValuesByFqnsRequest, - metadata?: grpcWeb.Metadata | null - ): Promise; - - getAttributeValuesByFqns( - request: policy_attributes_attributes_pb.GetAttributeValuesByFqnsRequest, - metadata: grpcWeb.Metadata | null, - callback: ( - err: grpcWeb.RpcError, - response: policy_attributes_attributes_pb.GetAttributeValuesByFqnsResponse - ) => void - ): grpcWeb.ClientReadableStream; - - getAttributeValuesByFqns( - request: policy_attributes_attributes_pb.GetAttributeValuesByFqnsRequest, - metadata?: grpcWeb.Metadata | null, - callback?: ( - err: grpcWeb.RpcError, - response: policy_attributes_attributes_pb.GetAttributeValuesByFqnsResponse - ) => void - ) { - if (callback !== undefined) { - return this.client_.rpcCall( - this.hostname_ + '/policy.attributes.AttributesService/GetAttributeValuesByFqns', - request, - metadata || {}, - this.methodDescriptorGetAttributeValuesByFqns, - callback - ); - } - return this.client_.unaryCall( - this.hostname_ + '/policy.attributes.AttributesService/GetAttributeValuesByFqns', - request, - metadata || {}, - this.methodDescriptorGetAttributeValuesByFqns - ); - } - - methodDescriptorCreateAttribute = new grpcWeb.MethodDescriptor( - '/policy.attributes.AttributesService/CreateAttribute', - grpcWeb.MethodType.UNARY, - policy_attributes_attributes_pb.CreateAttributeRequest, - policy_attributes_attributes_pb.CreateAttributeResponse, - (request: policy_attributes_attributes_pb.CreateAttributeRequest) => { - return request.serializeBinary(); - }, - policy_attributes_attributes_pb.CreateAttributeResponse.deserializeBinary - ); - - createAttribute( - request: policy_attributes_attributes_pb.CreateAttributeRequest, - metadata?: grpcWeb.Metadata | null - ): Promise; - - createAttribute( - request: policy_attributes_attributes_pb.CreateAttributeRequest, - metadata: grpcWeb.Metadata | null, - callback: ( - err: grpcWeb.RpcError, - response: policy_attributes_attributes_pb.CreateAttributeResponse - ) => void - ): grpcWeb.ClientReadableStream; - - createAttribute( - request: policy_attributes_attributes_pb.CreateAttributeRequest, - metadata?: grpcWeb.Metadata | null, - callback?: ( - err: grpcWeb.RpcError, - response: policy_attributes_attributes_pb.CreateAttributeResponse - ) => void - ) { - if (callback !== undefined) { - return this.client_.rpcCall( - this.hostname_ + '/policy.attributes.AttributesService/CreateAttribute', - request, - metadata || {}, - this.methodDescriptorCreateAttribute, - callback - ); - } - return this.client_.unaryCall( - this.hostname_ + '/policy.attributes.AttributesService/CreateAttribute', - request, - metadata || {}, - this.methodDescriptorCreateAttribute - ); - } - - methodDescriptorUpdateAttribute = new grpcWeb.MethodDescriptor( - '/policy.attributes.AttributesService/UpdateAttribute', - grpcWeb.MethodType.UNARY, - policy_attributes_attributes_pb.UpdateAttributeRequest, - policy_attributes_attributes_pb.UpdateAttributeResponse, - (request: policy_attributes_attributes_pb.UpdateAttributeRequest) => { - return request.serializeBinary(); - }, - policy_attributes_attributes_pb.UpdateAttributeResponse.deserializeBinary - ); - - updateAttribute( - request: policy_attributes_attributes_pb.UpdateAttributeRequest, - metadata?: grpcWeb.Metadata | null - ): Promise; - - updateAttribute( - request: policy_attributes_attributes_pb.UpdateAttributeRequest, - metadata: grpcWeb.Metadata | null, - callback: ( - err: grpcWeb.RpcError, - response: policy_attributes_attributes_pb.UpdateAttributeResponse - ) => void - ): grpcWeb.ClientReadableStream; - - updateAttribute( - request: policy_attributes_attributes_pb.UpdateAttributeRequest, - metadata?: grpcWeb.Metadata | null, - callback?: ( - err: grpcWeb.RpcError, - response: policy_attributes_attributes_pb.UpdateAttributeResponse - ) => void - ) { - if (callback !== undefined) { - return this.client_.rpcCall( - this.hostname_ + '/policy.attributes.AttributesService/UpdateAttribute', - request, - metadata || {}, - this.methodDescriptorUpdateAttribute, - callback - ); - } - return this.client_.unaryCall( - this.hostname_ + '/policy.attributes.AttributesService/UpdateAttribute', - request, - metadata || {}, - this.methodDescriptorUpdateAttribute - ); - } - - methodDescriptorDeactivateAttribute = new grpcWeb.MethodDescriptor( - '/policy.attributes.AttributesService/DeactivateAttribute', - grpcWeb.MethodType.UNARY, - policy_attributes_attributes_pb.DeactivateAttributeRequest, - policy_attributes_attributes_pb.DeactivateAttributeResponse, - (request: policy_attributes_attributes_pb.DeactivateAttributeRequest) => { - return request.serializeBinary(); - }, - policy_attributes_attributes_pb.DeactivateAttributeResponse.deserializeBinary - ); - - deactivateAttribute( - request: policy_attributes_attributes_pb.DeactivateAttributeRequest, - metadata?: grpcWeb.Metadata | null - ): Promise; - - deactivateAttribute( - request: policy_attributes_attributes_pb.DeactivateAttributeRequest, - metadata: grpcWeb.Metadata | null, - callback: ( - err: grpcWeb.RpcError, - response: policy_attributes_attributes_pb.DeactivateAttributeResponse - ) => void - ): grpcWeb.ClientReadableStream; - - deactivateAttribute( - request: policy_attributes_attributes_pb.DeactivateAttributeRequest, - metadata?: grpcWeb.Metadata | null, - callback?: ( - err: grpcWeb.RpcError, - response: policy_attributes_attributes_pb.DeactivateAttributeResponse - ) => void - ) { - if (callback !== undefined) { - return this.client_.rpcCall( - this.hostname_ + '/policy.attributes.AttributesService/DeactivateAttribute', - request, - metadata || {}, - this.methodDescriptorDeactivateAttribute, - callback - ); - } - return this.client_.unaryCall( - this.hostname_ + '/policy.attributes.AttributesService/DeactivateAttribute', - request, - metadata || {}, - this.methodDescriptorDeactivateAttribute - ); - } - - methodDescriptorGetAttributeValue = new grpcWeb.MethodDescriptor( - '/policy.attributes.AttributesService/GetAttributeValue', - grpcWeb.MethodType.UNARY, - policy_attributes_attributes_pb.GetAttributeValueRequest, - policy_attributes_attributes_pb.GetAttributeValueResponse, - (request: policy_attributes_attributes_pb.GetAttributeValueRequest) => { - return request.serializeBinary(); - }, - policy_attributes_attributes_pb.GetAttributeValueResponse.deserializeBinary - ); - - getAttributeValue( - request: policy_attributes_attributes_pb.GetAttributeValueRequest, - metadata?: grpcWeb.Metadata | null - ): Promise; - - getAttributeValue( - request: policy_attributes_attributes_pb.GetAttributeValueRequest, - metadata: grpcWeb.Metadata | null, - callback: ( - err: grpcWeb.RpcError, - response: policy_attributes_attributes_pb.GetAttributeValueResponse - ) => void - ): grpcWeb.ClientReadableStream; - - getAttributeValue( - request: policy_attributes_attributes_pb.GetAttributeValueRequest, - metadata?: grpcWeb.Metadata | null, - callback?: ( - err: grpcWeb.RpcError, - response: policy_attributes_attributes_pb.GetAttributeValueResponse - ) => void - ) { - if (callback !== undefined) { - return this.client_.rpcCall( - this.hostname_ + '/policy.attributes.AttributesService/GetAttributeValue', - request, - metadata || {}, - this.methodDescriptorGetAttributeValue, - callback - ); - } - return this.client_.unaryCall( - this.hostname_ + '/policy.attributes.AttributesService/GetAttributeValue', - request, - metadata || {}, - this.methodDescriptorGetAttributeValue - ); - } - - methodDescriptorCreateAttributeValue = new grpcWeb.MethodDescriptor( - '/policy.attributes.AttributesService/CreateAttributeValue', - grpcWeb.MethodType.UNARY, - policy_attributes_attributes_pb.CreateAttributeValueRequest, - policy_attributes_attributes_pb.CreateAttributeValueResponse, - (request: policy_attributes_attributes_pb.CreateAttributeValueRequest) => { - return request.serializeBinary(); - }, - policy_attributes_attributes_pb.CreateAttributeValueResponse.deserializeBinary - ); - - createAttributeValue( - request: policy_attributes_attributes_pb.CreateAttributeValueRequest, - metadata?: grpcWeb.Metadata | null - ): Promise; - - createAttributeValue( - request: policy_attributes_attributes_pb.CreateAttributeValueRequest, - metadata: grpcWeb.Metadata | null, - callback: ( - err: grpcWeb.RpcError, - response: policy_attributes_attributes_pb.CreateAttributeValueResponse - ) => void - ): grpcWeb.ClientReadableStream; - - createAttributeValue( - request: policy_attributes_attributes_pb.CreateAttributeValueRequest, - metadata?: grpcWeb.Metadata | null, - callback?: ( - err: grpcWeb.RpcError, - response: policy_attributes_attributes_pb.CreateAttributeValueResponse - ) => void - ) { - if (callback !== undefined) { - return this.client_.rpcCall( - this.hostname_ + '/policy.attributes.AttributesService/CreateAttributeValue', - request, - metadata || {}, - this.methodDescriptorCreateAttributeValue, - callback - ); - } - return this.client_.unaryCall( - this.hostname_ + '/policy.attributes.AttributesService/CreateAttributeValue', - request, - metadata || {}, - this.methodDescriptorCreateAttributeValue - ); - } - - methodDescriptorUpdateAttributeValue = new grpcWeb.MethodDescriptor( - '/policy.attributes.AttributesService/UpdateAttributeValue', - grpcWeb.MethodType.UNARY, - policy_attributes_attributes_pb.UpdateAttributeValueRequest, - policy_attributes_attributes_pb.UpdateAttributeValueResponse, - (request: policy_attributes_attributes_pb.UpdateAttributeValueRequest) => { - return request.serializeBinary(); - }, - policy_attributes_attributes_pb.UpdateAttributeValueResponse.deserializeBinary - ); - - updateAttributeValue( - request: policy_attributes_attributes_pb.UpdateAttributeValueRequest, - metadata?: grpcWeb.Metadata | null - ): Promise; - - updateAttributeValue( - request: policy_attributes_attributes_pb.UpdateAttributeValueRequest, - metadata: grpcWeb.Metadata | null, - callback: ( - err: grpcWeb.RpcError, - response: policy_attributes_attributes_pb.UpdateAttributeValueResponse - ) => void - ): grpcWeb.ClientReadableStream; - - updateAttributeValue( - request: policy_attributes_attributes_pb.UpdateAttributeValueRequest, - metadata?: grpcWeb.Metadata | null, - callback?: ( - err: grpcWeb.RpcError, - response: policy_attributes_attributes_pb.UpdateAttributeValueResponse - ) => void - ) { - if (callback !== undefined) { - return this.client_.rpcCall( - this.hostname_ + '/policy.attributes.AttributesService/UpdateAttributeValue', - request, - metadata || {}, - this.methodDescriptorUpdateAttributeValue, - callback - ); - } - return this.client_.unaryCall( - this.hostname_ + '/policy.attributes.AttributesService/UpdateAttributeValue', - request, - metadata || {}, - this.methodDescriptorUpdateAttributeValue - ); - } - - methodDescriptorDeactivateAttributeValue = new grpcWeb.MethodDescriptor( - '/policy.attributes.AttributesService/DeactivateAttributeValue', - grpcWeb.MethodType.UNARY, - policy_attributes_attributes_pb.DeactivateAttributeValueRequest, - policy_attributes_attributes_pb.DeactivateAttributeValueResponse, - (request: policy_attributes_attributes_pb.DeactivateAttributeValueRequest) => { - return request.serializeBinary(); - }, - policy_attributes_attributes_pb.DeactivateAttributeValueResponse.deserializeBinary - ); - - deactivateAttributeValue( - request: policy_attributes_attributes_pb.DeactivateAttributeValueRequest, - metadata?: grpcWeb.Metadata | null - ): Promise; - - deactivateAttributeValue( - request: policy_attributes_attributes_pb.DeactivateAttributeValueRequest, - metadata: grpcWeb.Metadata | null, - callback: ( - err: grpcWeb.RpcError, - response: policy_attributes_attributes_pb.DeactivateAttributeValueResponse - ) => void - ): grpcWeb.ClientReadableStream; - - deactivateAttributeValue( - request: policy_attributes_attributes_pb.DeactivateAttributeValueRequest, - metadata?: grpcWeb.Metadata | null, - callback?: ( - err: grpcWeb.RpcError, - response: policy_attributes_attributes_pb.DeactivateAttributeValueResponse - ) => void - ) { - if (callback !== undefined) { - return this.client_.rpcCall( - this.hostname_ + '/policy.attributes.AttributesService/DeactivateAttributeValue', - request, - metadata || {}, - this.methodDescriptorDeactivateAttributeValue, - callback - ); - } - return this.client_.unaryCall( - this.hostname_ + '/policy.attributes.AttributesService/DeactivateAttributeValue', - request, - metadata || {}, - this.methodDescriptorDeactivateAttributeValue - ); - } - - methodDescriptorAssignKeyAccessServerToAttribute = new grpcWeb.MethodDescriptor( - '/policy.attributes.AttributesService/AssignKeyAccessServerToAttribute', - grpcWeb.MethodType.UNARY, - policy_attributes_attributes_pb.AssignKeyAccessServerToAttributeRequest, - policy_attributes_attributes_pb.AssignKeyAccessServerToAttributeResponse, - (request: policy_attributes_attributes_pb.AssignKeyAccessServerToAttributeRequest) => { - return request.serializeBinary(); - }, - policy_attributes_attributes_pb.AssignKeyAccessServerToAttributeResponse.deserializeBinary - ); - - assignKeyAccessServerToAttribute( - request: policy_attributes_attributes_pb.AssignKeyAccessServerToAttributeRequest, - metadata?: grpcWeb.Metadata | null - ): Promise; - - assignKeyAccessServerToAttribute( - request: policy_attributes_attributes_pb.AssignKeyAccessServerToAttributeRequest, - metadata: grpcWeb.Metadata | null, - callback: ( - err: grpcWeb.RpcError, - response: policy_attributes_attributes_pb.AssignKeyAccessServerToAttributeResponse - ) => void - ): grpcWeb.ClientReadableStream; - - assignKeyAccessServerToAttribute( - request: policy_attributes_attributes_pb.AssignKeyAccessServerToAttributeRequest, - metadata?: grpcWeb.Metadata | null, - callback?: ( - err: grpcWeb.RpcError, - response: policy_attributes_attributes_pb.AssignKeyAccessServerToAttributeResponse - ) => void - ) { - if (callback !== undefined) { - return this.client_.rpcCall( - this.hostname_ + '/policy.attributes.AttributesService/AssignKeyAccessServerToAttribute', - request, - metadata || {}, - this.methodDescriptorAssignKeyAccessServerToAttribute, - callback - ); - } - return this.client_.unaryCall( - this.hostname_ + '/policy.attributes.AttributesService/AssignKeyAccessServerToAttribute', - request, - metadata || {}, - this.methodDescriptorAssignKeyAccessServerToAttribute - ); - } - - methodDescriptorRemoveKeyAccessServerFromAttribute = new grpcWeb.MethodDescriptor( - '/policy.attributes.AttributesService/RemoveKeyAccessServerFromAttribute', - grpcWeb.MethodType.UNARY, - policy_attributes_attributes_pb.RemoveKeyAccessServerFromAttributeRequest, - policy_attributes_attributes_pb.RemoveKeyAccessServerFromAttributeResponse, - (request: policy_attributes_attributes_pb.RemoveKeyAccessServerFromAttributeRequest) => { - return request.serializeBinary(); - }, - policy_attributes_attributes_pb.RemoveKeyAccessServerFromAttributeResponse.deserializeBinary - ); - - removeKeyAccessServerFromAttribute( - request: policy_attributes_attributes_pb.RemoveKeyAccessServerFromAttributeRequest, - metadata?: grpcWeb.Metadata | null - ): Promise; - - removeKeyAccessServerFromAttribute( - request: policy_attributes_attributes_pb.RemoveKeyAccessServerFromAttributeRequest, - metadata: grpcWeb.Metadata | null, - callback: ( - err: grpcWeb.RpcError, - response: policy_attributes_attributes_pb.RemoveKeyAccessServerFromAttributeResponse - ) => void - ): grpcWeb.ClientReadableStream; - - removeKeyAccessServerFromAttribute( - request: policy_attributes_attributes_pb.RemoveKeyAccessServerFromAttributeRequest, - metadata?: grpcWeb.Metadata | null, - callback?: ( - err: grpcWeb.RpcError, - response: policy_attributes_attributes_pb.RemoveKeyAccessServerFromAttributeResponse - ) => void - ) { - if (callback !== undefined) { - return this.client_.rpcCall( - this.hostname_ + '/policy.attributes.AttributesService/RemoveKeyAccessServerFromAttribute', - request, - metadata || {}, - this.methodDescriptorRemoveKeyAccessServerFromAttribute, - callback - ); - } - return this.client_.unaryCall( - this.hostname_ + '/policy.attributes.AttributesService/RemoveKeyAccessServerFromAttribute', - request, - metadata || {}, - this.methodDescriptorRemoveKeyAccessServerFromAttribute - ); - } - - methodDescriptorAssignKeyAccessServerToValue = new grpcWeb.MethodDescriptor( - '/policy.attributes.AttributesService/AssignKeyAccessServerToValue', - grpcWeb.MethodType.UNARY, - policy_attributes_attributes_pb.AssignKeyAccessServerToValueRequest, - policy_attributes_attributes_pb.AssignKeyAccessServerToValueResponse, - (request: policy_attributes_attributes_pb.AssignKeyAccessServerToValueRequest) => { - return request.serializeBinary(); - }, - policy_attributes_attributes_pb.AssignKeyAccessServerToValueResponse.deserializeBinary - ); - - assignKeyAccessServerToValue( - request: policy_attributes_attributes_pb.AssignKeyAccessServerToValueRequest, - metadata?: grpcWeb.Metadata | null - ): Promise; - - assignKeyAccessServerToValue( - request: policy_attributes_attributes_pb.AssignKeyAccessServerToValueRequest, - metadata: grpcWeb.Metadata | null, - callback: ( - err: grpcWeb.RpcError, - response: policy_attributes_attributes_pb.AssignKeyAccessServerToValueResponse - ) => void - ): grpcWeb.ClientReadableStream; - - assignKeyAccessServerToValue( - request: policy_attributes_attributes_pb.AssignKeyAccessServerToValueRequest, - metadata?: grpcWeb.Metadata | null, - callback?: ( - err: grpcWeb.RpcError, - response: policy_attributes_attributes_pb.AssignKeyAccessServerToValueResponse - ) => void - ) { - if (callback !== undefined) { - return this.client_.rpcCall( - this.hostname_ + '/policy.attributes.AttributesService/AssignKeyAccessServerToValue', - request, - metadata || {}, - this.methodDescriptorAssignKeyAccessServerToValue, - callback - ); - } - return this.client_.unaryCall( - this.hostname_ + '/policy.attributes.AttributesService/AssignKeyAccessServerToValue', - request, - metadata || {}, - this.methodDescriptorAssignKeyAccessServerToValue - ); - } - - methodDescriptorRemoveKeyAccessServerFromValue = new grpcWeb.MethodDescriptor( - '/policy.attributes.AttributesService/RemoveKeyAccessServerFromValue', - grpcWeb.MethodType.UNARY, - policy_attributes_attributes_pb.RemoveKeyAccessServerFromValueRequest, - policy_attributes_attributes_pb.RemoveKeyAccessServerFromValueResponse, - (request: policy_attributes_attributes_pb.RemoveKeyAccessServerFromValueRequest) => { - return request.serializeBinary(); - }, - policy_attributes_attributes_pb.RemoveKeyAccessServerFromValueResponse.deserializeBinary - ); - - removeKeyAccessServerFromValue( - request: policy_attributes_attributes_pb.RemoveKeyAccessServerFromValueRequest, - metadata?: grpcWeb.Metadata | null - ): Promise; - - removeKeyAccessServerFromValue( - request: policy_attributes_attributes_pb.RemoveKeyAccessServerFromValueRequest, - metadata: grpcWeb.Metadata | null, - callback: ( - err: grpcWeb.RpcError, - response: policy_attributes_attributes_pb.RemoveKeyAccessServerFromValueResponse - ) => void - ): grpcWeb.ClientReadableStream; - - removeKeyAccessServerFromValue( - request: policy_attributes_attributes_pb.RemoveKeyAccessServerFromValueRequest, - metadata?: grpcWeb.Metadata | null, - callback?: ( - err: grpcWeb.RpcError, - response: policy_attributes_attributes_pb.RemoveKeyAccessServerFromValueResponse - ) => void - ) { - if (callback !== undefined) { - return this.client_.rpcCall( - this.hostname_ + '/policy.attributes.AttributesService/RemoveKeyAccessServerFromValue', - request, - metadata || {}, - this.methodDescriptorRemoveKeyAccessServerFromValue, - callback - ); - } - return this.client_.unaryCall( - this.hostname_ + '/policy.attributes.AttributesService/RemoveKeyAccessServerFromValue', - request, - metadata || {}, - this.methodDescriptorRemoveKeyAccessServerFromValue - ); - } -} diff --git a/lib/src/platform/policy/attributes/attributes_connect.ts b/lib/src/platform/policy/attributes/attributes_connect.ts deleted file mode 100644 index 67dc594c..00000000 --- a/lib/src/platform/policy/attributes/attributes_connect.ts +++ /dev/null @@ -1,198 +0,0 @@ -// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=ts" -// @generated from file policy/attributes/attributes.proto (package policy.attributes, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { - AssignKeyAccessServerToAttributeRequest, - AssignKeyAccessServerToAttributeResponse, - AssignKeyAccessServerToValueRequest, - AssignKeyAccessServerToValueResponse, - CreateAttributeRequest, - CreateAttributeResponse, - CreateAttributeValueRequest, - CreateAttributeValueResponse, - DeactivateAttributeRequest, - DeactivateAttributeResponse, - DeactivateAttributeValueRequest, - DeactivateAttributeValueResponse, - GetAttributeRequest, - GetAttributeResponse, - GetAttributeValueRequest, - GetAttributeValueResponse, - GetAttributeValuesByFqnsRequest, - GetAttributeValuesByFqnsResponse, - ListAttributesRequest, - ListAttributesResponse, - ListAttributeValuesRequest, - ListAttributeValuesResponse, - RemoveKeyAccessServerFromAttributeRequest, - RemoveKeyAccessServerFromAttributeResponse, - RemoveKeyAccessServerFromValueRequest, - RemoveKeyAccessServerFromValueResponse, - UpdateAttributeRequest, - UpdateAttributeResponse, - UpdateAttributeValueRequest, - UpdateAttributeValueResponse, -} from './attributes_pb.js'; -import { MethodKind } from '@bufbuild/protobuf'; - -/** - * / - * / Attribute Service - * / - * - * @generated from service policy.attributes.AttributesService - */ -export const AttributesService = { - typeName: 'policy.attributes.AttributesService', - methods: { - /** - * --------------------------------------* - * Attribute RPCs - * --------------------------------------- - * - * @generated from rpc policy.attributes.AttributesService.ListAttributes - */ - listAttributes: { - name: 'ListAttributes', - I: ListAttributesRequest, - O: ListAttributesResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.attributes.AttributesService.ListAttributeValues - */ - listAttributeValues: { - name: 'ListAttributeValues', - I: ListAttributeValuesRequest, - O: ListAttributeValuesResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.attributes.AttributesService.GetAttribute - */ - getAttribute: { - name: 'GetAttribute', - I: GetAttributeRequest, - O: GetAttributeResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.attributes.AttributesService.GetAttributeValuesByFqns - */ - getAttributeValuesByFqns: { - name: 'GetAttributeValuesByFqns', - I: GetAttributeValuesByFqnsRequest, - O: GetAttributeValuesByFqnsResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.attributes.AttributesService.CreateAttribute - */ - createAttribute: { - name: 'CreateAttribute', - I: CreateAttributeRequest, - O: CreateAttributeResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.attributes.AttributesService.UpdateAttribute - */ - updateAttribute: { - name: 'UpdateAttribute', - I: UpdateAttributeRequest, - O: UpdateAttributeResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.attributes.AttributesService.DeactivateAttribute - */ - deactivateAttribute: { - name: 'DeactivateAttribute', - I: DeactivateAttributeRequest, - O: DeactivateAttributeResponse, - kind: MethodKind.Unary, - }, - /** - * --------------------------------------* - * Value RPCs - * --------------------------------------- - * - * @generated from rpc policy.attributes.AttributesService.GetAttributeValue - */ - getAttributeValue: { - name: 'GetAttributeValue', - I: GetAttributeValueRequest, - O: GetAttributeValueResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.attributes.AttributesService.CreateAttributeValue - */ - createAttributeValue: { - name: 'CreateAttributeValue', - I: CreateAttributeValueRequest, - O: CreateAttributeValueResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.attributes.AttributesService.UpdateAttributeValue - */ - updateAttributeValue: { - name: 'UpdateAttributeValue', - I: UpdateAttributeValueRequest, - O: UpdateAttributeValueResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.attributes.AttributesService.DeactivateAttributeValue - */ - deactivateAttributeValue: { - name: 'DeactivateAttributeValue', - I: DeactivateAttributeValueRequest, - O: DeactivateAttributeValueResponse, - kind: MethodKind.Unary, - }, - /** - * --------------------------------------* - * Attribute <> Key Access Server RPCs - * --------------------------------------- - * - * @generated from rpc policy.attributes.AttributesService.AssignKeyAccessServerToAttribute - */ - assignKeyAccessServerToAttribute: { - name: 'AssignKeyAccessServerToAttribute', - I: AssignKeyAccessServerToAttributeRequest, - O: AssignKeyAccessServerToAttributeResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.attributes.AttributesService.RemoveKeyAccessServerFromAttribute - */ - removeKeyAccessServerFromAttribute: { - name: 'RemoveKeyAccessServerFromAttribute', - I: RemoveKeyAccessServerFromAttributeRequest, - O: RemoveKeyAccessServerFromAttributeResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.attributes.AttributesService.AssignKeyAccessServerToValue - */ - assignKeyAccessServerToValue: { - name: 'AssignKeyAccessServerToValue', - I: AssignKeyAccessServerToValueRequest, - O: AssignKeyAccessServerToValueResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.attributes.AttributesService.RemoveKeyAccessServerFromValue - */ - removeKeyAccessServerFromValue: { - name: 'RemoveKeyAccessServerFromValue', - I: RemoveKeyAccessServerFromValueRequest, - O: RemoveKeyAccessServerFromValueResponse, - kind: MethodKind.Unary, - }, - }, -} as const; diff --git a/lib/src/platform/policy/attributes/attributes_pb.d.ts b/lib/src/platform/policy/attributes/attributes_pb.d.ts index 0ef1ac7f..e4141626 100644 --- a/lib/src/platform/policy/attributes/attributes_pb.d.ts +++ b/lib/src/platform/policy/attributes/attributes_pb.d.ts @@ -1,1004 +1,929 @@ -import * as jspb from 'google-protobuf'; - -import * as buf_validate_validate_pb from '../../buf/validate/validate_pb'; // proto import: "buf/validate/validate.proto" -import * as common_common_pb from '../../common/common_pb'; // proto import: "common/common.proto" -import * as google_api_annotations_pb from '../../google/api/annotations_pb'; // proto import: "google/api/annotations.proto" -import * as policy_objects_pb from '../../policy/objects_pb'; // proto import: "policy/objects.proto" -import * as policy_selectors_pb from '../../policy/selectors_pb'; // proto import: "policy/selectors.proto" - -export class AttributeKeyAccessServer extends jspb.Message { - getAttributeId(): string; - setAttributeId(value: string): AttributeKeyAccessServer; - - getKeyAccessServerId(): string; - setKeyAccessServerId(value: string): AttributeKeyAccessServer; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AttributeKeyAccessServer.AsObject; - static toObject( - includeInstance: boolean, - msg: AttributeKeyAccessServer - ): AttributeKeyAccessServer.AsObject; - static serializeBinaryToWriter( - message: AttributeKeyAccessServer, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): AttributeKeyAccessServer; - static deserializeBinaryFromReader( - message: AttributeKeyAccessServer, - reader: jspb.BinaryReader - ): AttributeKeyAccessServer; -} - -export namespace AttributeKeyAccessServer { - export type AsObject = { - attributeId: string; - keyAccessServerId: string; - }; -} - -export class ValueKeyAccessServer extends jspb.Message { - getValueId(): string; - setValueId(value: string): ValueKeyAccessServer; - - getKeyAccessServerId(): string; - setKeyAccessServerId(value: string): ValueKeyAccessServer; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ValueKeyAccessServer.AsObject; - static toObject( - includeInstance: boolean, - msg: ValueKeyAccessServer - ): ValueKeyAccessServer.AsObject; - static serializeBinaryToWriter(message: ValueKeyAccessServer, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ValueKeyAccessServer; - static deserializeBinaryFromReader( - message: ValueKeyAccessServer, - reader: jspb.BinaryReader - ): ValueKeyAccessServer; -} - -export namespace ValueKeyAccessServer { - export type AsObject = { - valueId: string; - keyAccessServerId: string; - }; -} - -export class ListAttributesRequest extends jspb.Message { - getState(): common_common_pb.ActiveStateEnum; - setState(value: common_common_pb.ActiveStateEnum): ListAttributesRequest; - - getNamespace(): string; - setNamespace(value: string): ListAttributesRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListAttributesRequest.AsObject; - static toObject( - includeInstance: boolean, - msg: ListAttributesRequest - ): ListAttributesRequest.AsObject; - static serializeBinaryToWriter(message: ListAttributesRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListAttributesRequest; - static deserializeBinaryFromReader( - message: ListAttributesRequest, - reader: jspb.BinaryReader - ): ListAttributesRequest; -} - -export namespace ListAttributesRequest { - export type AsObject = { - state: common_common_pb.ActiveStateEnum; - namespace: string; - }; -} - -export class ListAttributesResponse extends jspb.Message { - getAttributesList(): Array; - setAttributesList(value: Array): ListAttributesResponse; - clearAttributesList(): ListAttributesResponse; - addAttributes(value?: policy_objects_pb.Attribute, index?: number): policy_objects_pb.Attribute; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListAttributesResponse.AsObject; - static toObject( - includeInstance: boolean, - msg: ListAttributesResponse - ): ListAttributesResponse.AsObject; - static serializeBinaryToWriter(message: ListAttributesResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListAttributesResponse; - static deserializeBinaryFromReader( - message: ListAttributesResponse, - reader: jspb.BinaryReader - ): ListAttributesResponse; -} - -export namespace ListAttributesResponse { - export type AsObject = { - attributesList: Array; - }; -} - -export class GetAttributeRequest extends jspb.Message { - getId(): string; - setId(value: string): GetAttributeRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAttributeRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetAttributeRequest): GetAttributeRequest.AsObject; - static serializeBinaryToWriter(message: GetAttributeRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAttributeRequest; - static deserializeBinaryFromReader( - message: GetAttributeRequest, - reader: jspb.BinaryReader - ): GetAttributeRequest; -} - -export namespace GetAttributeRequest { - export type AsObject = { - id: string; - }; -} - -export class GetAttributeResponse extends jspb.Message { - getAttribute(): policy_objects_pb.Attribute | undefined; - setAttribute(value?: policy_objects_pb.Attribute): GetAttributeResponse; - hasAttribute(): boolean; - clearAttribute(): GetAttributeResponse; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAttributeResponse.AsObject; - static toObject( - includeInstance: boolean, - msg: GetAttributeResponse - ): GetAttributeResponse.AsObject; - static serializeBinaryToWriter(message: GetAttributeResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAttributeResponse; - static deserializeBinaryFromReader( - message: GetAttributeResponse, - reader: jspb.BinaryReader - ): GetAttributeResponse; -} - -export namespace GetAttributeResponse { - export type AsObject = { - attribute?: policy_objects_pb.Attribute.AsObject; - }; -} - -export class CreateAttributeRequest extends jspb.Message { - getNamespaceId(): string; - setNamespaceId(value: string): CreateAttributeRequest; - - getName(): string; - setName(value: string): CreateAttributeRequest; - - getRule(): policy_objects_pb.AttributeRuleTypeEnum; - setRule(value: policy_objects_pb.AttributeRuleTypeEnum): CreateAttributeRequest; - - getValuesList(): Array; - setValuesList(value: Array): CreateAttributeRequest; - clearValuesList(): CreateAttributeRequest; - addValues(value: string, index?: number): CreateAttributeRequest; - - getMetadata(): common_common_pb.MetadataMutable | undefined; - setMetadata(value?: common_common_pb.MetadataMutable): CreateAttributeRequest; - hasMetadata(): boolean; - clearMetadata(): CreateAttributeRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateAttributeRequest.AsObject; - static toObject( - includeInstance: boolean, - msg: CreateAttributeRequest - ): CreateAttributeRequest.AsObject; - static serializeBinaryToWriter(message: CreateAttributeRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateAttributeRequest; - static deserializeBinaryFromReader( - message: CreateAttributeRequest, - reader: jspb.BinaryReader - ): CreateAttributeRequest; -} - -export namespace CreateAttributeRequest { - export type AsObject = { - namespaceId: string; - name: string; - rule: policy_objects_pb.AttributeRuleTypeEnum; - valuesList: Array; - metadata?: common_common_pb.MetadataMutable.AsObject; - }; -} - -export class CreateAttributeResponse extends jspb.Message { - getAttribute(): policy_objects_pb.Attribute | undefined; - setAttribute(value?: policy_objects_pb.Attribute): CreateAttributeResponse; - hasAttribute(): boolean; - clearAttribute(): CreateAttributeResponse; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateAttributeResponse.AsObject; - static toObject( - includeInstance: boolean, - msg: CreateAttributeResponse - ): CreateAttributeResponse.AsObject; - static serializeBinaryToWriter(message: CreateAttributeResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateAttributeResponse; - static deserializeBinaryFromReader( - message: CreateAttributeResponse, - reader: jspb.BinaryReader - ): CreateAttributeResponse; -} - -export namespace CreateAttributeResponse { - export type AsObject = { - attribute?: policy_objects_pb.Attribute.AsObject; - }; -} - -export class UpdateAttributeRequest extends jspb.Message { - getId(): string; - setId(value: string): UpdateAttributeRequest; - - getMetadata(): common_common_pb.MetadataMutable | undefined; - setMetadata(value?: common_common_pb.MetadataMutable): UpdateAttributeRequest; - hasMetadata(): boolean; - clearMetadata(): UpdateAttributeRequest; - - getMetadataUpdateBehavior(): common_common_pb.MetadataUpdateEnum; - setMetadataUpdateBehavior(value: common_common_pb.MetadataUpdateEnum): UpdateAttributeRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UpdateAttributeRequest.AsObject; - static toObject( - includeInstance: boolean, - msg: UpdateAttributeRequest - ): UpdateAttributeRequest.AsObject; - static serializeBinaryToWriter(message: UpdateAttributeRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UpdateAttributeRequest; - static deserializeBinaryFromReader( - message: UpdateAttributeRequest, - reader: jspb.BinaryReader - ): UpdateAttributeRequest; -} - -export namespace UpdateAttributeRequest { - export type AsObject = { - id: string; - metadata?: common_common_pb.MetadataMutable.AsObject; - metadataUpdateBehavior: common_common_pb.MetadataUpdateEnum; - }; -} - -export class UpdateAttributeResponse extends jspb.Message { - getAttribute(): policy_objects_pb.Attribute | undefined; - setAttribute(value?: policy_objects_pb.Attribute): UpdateAttributeResponse; - hasAttribute(): boolean; - clearAttribute(): UpdateAttributeResponse; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UpdateAttributeResponse.AsObject; - static toObject( - includeInstance: boolean, - msg: UpdateAttributeResponse - ): UpdateAttributeResponse.AsObject; - static serializeBinaryToWriter(message: UpdateAttributeResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UpdateAttributeResponse; - static deserializeBinaryFromReader( - message: UpdateAttributeResponse, - reader: jspb.BinaryReader - ): UpdateAttributeResponse; -} - -export namespace UpdateAttributeResponse { - export type AsObject = { - attribute?: policy_objects_pb.Attribute.AsObject; - }; -} - -export class DeactivateAttributeRequest extends jspb.Message { - getId(): string; - setId(value: string): DeactivateAttributeRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DeactivateAttributeRequest.AsObject; - static toObject( - includeInstance: boolean, - msg: DeactivateAttributeRequest - ): DeactivateAttributeRequest.AsObject; - static serializeBinaryToWriter( - message: DeactivateAttributeRequest, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): DeactivateAttributeRequest; - static deserializeBinaryFromReader( - message: DeactivateAttributeRequest, - reader: jspb.BinaryReader - ): DeactivateAttributeRequest; -} - -export namespace DeactivateAttributeRequest { - export type AsObject = { - id: string; - }; -} - -export class DeactivateAttributeResponse extends jspb.Message { - getAttribute(): policy_objects_pb.Attribute | undefined; - setAttribute(value?: policy_objects_pb.Attribute): DeactivateAttributeResponse; - hasAttribute(): boolean; - clearAttribute(): DeactivateAttributeResponse; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DeactivateAttributeResponse.AsObject; - static toObject( - includeInstance: boolean, - msg: DeactivateAttributeResponse - ): DeactivateAttributeResponse.AsObject; - static serializeBinaryToWriter( - message: DeactivateAttributeResponse, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): DeactivateAttributeResponse; - static deserializeBinaryFromReader( - message: DeactivateAttributeResponse, - reader: jspb.BinaryReader - ): DeactivateAttributeResponse; -} - -export namespace DeactivateAttributeResponse { - export type AsObject = { - attribute?: policy_objects_pb.Attribute.AsObject; - }; -} - -export class GetAttributeValueRequest extends jspb.Message { - getId(): string; - setId(value: string): GetAttributeValueRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAttributeValueRequest.AsObject; - static toObject( - includeInstance: boolean, - msg: GetAttributeValueRequest - ): GetAttributeValueRequest.AsObject; - static serializeBinaryToWriter( - message: GetAttributeValueRequest, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): GetAttributeValueRequest; - static deserializeBinaryFromReader( - message: GetAttributeValueRequest, - reader: jspb.BinaryReader - ): GetAttributeValueRequest; -} - -export namespace GetAttributeValueRequest { - export type AsObject = { - id: string; - }; -} - -export class GetAttributeValueResponse extends jspb.Message { - getValue(): policy_objects_pb.Value | undefined; - setValue(value?: policy_objects_pb.Value): GetAttributeValueResponse; - hasValue(): boolean; - clearValue(): GetAttributeValueResponse; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAttributeValueResponse.AsObject; - static toObject( - includeInstance: boolean, - msg: GetAttributeValueResponse - ): GetAttributeValueResponse.AsObject; - static serializeBinaryToWriter( - message: GetAttributeValueResponse, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): GetAttributeValueResponse; - static deserializeBinaryFromReader( - message: GetAttributeValueResponse, - reader: jspb.BinaryReader - ): GetAttributeValueResponse; -} - -export namespace GetAttributeValueResponse { - export type AsObject = { - value?: policy_objects_pb.Value.AsObject; - }; -} - -export class ListAttributeValuesRequest extends jspb.Message { - getAttributeId(): string; - setAttributeId(value: string): ListAttributeValuesRequest; - - getState(): common_common_pb.ActiveStateEnum; - setState(value: common_common_pb.ActiveStateEnum): ListAttributeValuesRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListAttributeValuesRequest.AsObject; - static toObject( - includeInstance: boolean, - msg: ListAttributeValuesRequest - ): ListAttributeValuesRequest.AsObject; - static serializeBinaryToWriter( - message: ListAttributeValuesRequest, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): ListAttributeValuesRequest; - static deserializeBinaryFromReader( - message: ListAttributeValuesRequest, - reader: jspb.BinaryReader - ): ListAttributeValuesRequest; -} - -export namespace ListAttributeValuesRequest { - export type AsObject = { - attributeId: string; - state: common_common_pb.ActiveStateEnum; - }; -} - -export class ListAttributeValuesResponse extends jspb.Message { - getValuesList(): Array; - setValuesList(value: Array): ListAttributeValuesResponse; - clearValuesList(): ListAttributeValuesResponse; - addValues(value?: policy_objects_pb.Value, index?: number): policy_objects_pb.Value; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListAttributeValuesResponse.AsObject; - static toObject( - includeInstance: boolean, - msg: ListAttributeValuesResponse - ): ListAttributeValuesResponse.AsObject; - static serializeBinaryToWriter( - message: ListAttributeValuesResponse, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): ListAttributeValuesResponse; - static deserializeBinaryFromReader( - message: ListAttributeValuesResponse, - reader: jspb.BinaryReader - ): ListAttributeValuesResponse; -} - -export namespace ListAttributeValuesResponse { - export type AsObject = { - valuesList: Array; - }; -} - -export class CreateAttributeValueRequest extends jspb.Message { - getAttributeId(): string; - setAttributeId(value: string): CreateAttributeValueRequest; - - getValue(): string; - setValue(value: string): CreateAttributeValueRequest; - - getMembersList(): Array; - setMembersList(value: Array): CreateAttributeValueRequest; - clearMembersList(): CreateAttributeValueRequest; - addMembers(value: string, index?: number): CreateAttributeValueRequest; - - getMetadata(): common_common_pb.MetadataMutable | undefined; - setMetadata(value?: common_common_pb.MetadataMutable): CreateAttributeValueRequest; - hasMetadata(): boolean; - clearMetadata(): CreateAttributeValueRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateAttributeValueRequest.AsObject; - static toObject( - includeInstance: boolean, - msg: CreateAttributeValueRequest - ): CreateAttributeValueRequest.AsObject; - static serializeBinaryToWriter( - message: CreateAttributeValueRequest, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): CreateAttributeValueRequest; - static deserializeBinaryFromReader( - message: CreateAttributeValueRequest, - reader: jspb.BinaryReader - ): CreateAttributeValueRequest; -} - -export namespace CreateAttributeValueRequest { - export type AsObject = { - attributeId: string; - value: string; - membersList: Array; - metadata?: common_common_pb.MetadataMutable.AsObject; - }; -} - -export class CreateAttributeValueResponse extends jspb.Message { - getValue(): policy_objects_pb.Value | undefined; - setValue(value?: policy_objects_pb.Value): CreateAttributeValueResponse; - hasValue(): boolean; - clearValue(): CreateAttributeValueResponse; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateAttributeValueResponse.AsObject; - static toObject( - includeInstance: boolean, - msg: CreateAttributeValueResponse - ): CreateAttributeValueResponse.AsObject; - static serializeBinaryToWriter( - message: CreateAttributeValueResponse, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): CreateAttributeValueResponse; - static deserializeBinaryFromReader( - message: CreateAttributeValueResponse, - reader: jspb.BinaryReader - ): CreateAttributeValueResponse; -} - -export namespace CreateAttributeValueResponse { - export type AsObject = { - value?: policy_objects_pb.Value.AsObject; - }; -} - -export class UpdateAttributeValueRequest extends jspb.Message { - getId(): string; - setId(value: string): UpdateAttributeValueRequest; - - getMembersList(): Array; - setMembersList(value: Array): UpdateAttributeValueRequest; - clearMembersList(): UpdateAttributeValueRequest; - addMembers(value: string, index?: number): UpdateAttributeValueRequest; - - getMetadata(): common_common_pb.MetadataMutable | undefined; - setMetadata(value?: common_common_pb.MetadataMutable): UpdateAttributeValueRequest; - hasMetadata(): boolean; - clearMetadata(): UpdateAttributeValueRequest; - - getMetadataUpdateBehavior(): common_common_pb.MetadataUpdateEnum; - setMetadataUpdateBehavior( - value: common_common_pb.MetadataUpdateEnum - ): UpdateAttributeValueRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UpdateAttributeValueRequest.AsObject; - static toObject( - includeInstance: boolean, - msg: UpdateAttributeValueRequest - ): UpdateAttributeValueRequest.AsObject; - static serializeBinaryToWriter( - message: UpdateAttributeValueRequest, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): UpdateAttributeValueRequest; - static deserializeBinaryFromReader( - message: UpdateAttributeValueRequest, - reader: jspb.BinaryReader - ): UpdateAttributeValueRequest; -} - -export namespace UpdateAttributeValueRequest { - export type AsObject = { - id: string; - membersList: Array; - metadata?: common_common_pb.MetadataMutable.AsObject; - metadataUpdateBehavior: common_common_pb.MetadataUpdateEnum; - }; -} - -export class UpdateAttributeValueResponse extends jspb.Message { - getValue(): policy_objects_pb.Value | undefined; - setValue(value?: policy_objects_pb.Value): UpdateAttributeValueResponse; - hasValue(): boolean; - clearValue(): UpdateAttributeValueResponse; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UpdateAttributeValueResponse.AsObject; - static toObject( - includeInstance: boolean, - msg: UpdateAttributeValueResponse - ): UpdateAttributeValueResponse.AsObject; - static serializeBinaryToWriter( - message: UpdateAttributeValueResponse, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): UpdateAttributeValueResponse; - static deserializeBinaryFromReader( - message: UpdateAttributeValueResponse, - reader: jspb.BinaryReader - ): UpdateAttributeValueResponse; -} - -export namespace UpdateAttributeValueResponse { - export type AsObject = { - value?: policy_objects_pb.Value.AsObject; - }; -} - -export class DeactivateAttributeValueRequest extends jspb.Message { - getId(): string; - setId(value: string): DeactivateAttributeValueRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DeactivateAttributeValueRequest.AsObject; - static toObject( - includeInstance: boolean, - msg: DeactivateAttributeValueRequest - ): DeactivateAttributeValueRequest.AsObject; - static serializeBinaryToWriter( - message: DeactivateAttributeValueRequest, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): DeactivateAttributeValueRequest; - static deserializeBinaryFromReader( - message: DeactivateAttributeValueRequest, - reader: jspb.BinaryReader - ): DeactivateAttributeValueRequest; -} - -export namespace DeactivateAttributeValueRequest { - export type AsObject = { - id: string; - }; -} - -export class DeactivateAttributeValueResponse extends jspb.Message { - getValue(): policy_objects_pb.Value | undefined; - setValue(value?: policy_objects_pb.Value): DeactivateAttributeValueResponse; - hasValue(): boolean; - clearValue(): DeactivateAttributeValueResponse; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DeactivateAttributeValueResponse.AsObject; - static toObject( - includeInstance: boolean, - msg: DeactivateAttributeValueResponse - ): DeactivateAttributeValueResponse.AsObject; - static serializeBinaryToWriter( - message: DeactivateAttributeValueResponse, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): DeactivateAttributeValueResponse; - static deserializeBinaryFromReader( - message: DeactivateAttributeValueResponse, - reader: jspb.BinaryReader - ): DeactivateAttributeValueResponse; -} - -export namespace DeactivateAttributeValueResponse { - export type AsObject = { - value?: policy_objects_pb.Value.AsObject; - }; -} - -export class GetAttributeValuesByFqnsRequest extends jspb.Message { - getFqnsList(): Array; - setFqnsList(value: Array): GetAttributeValuesByFqnsRequest; - clearFqnsList(): GetAttributeValuesByFqnsRequest; - addFqns(value: string, index?: number): GetAttributeValuesByFqnsRequest; - - getWithValue(): policy_selectors_pb.AttributeValueSelector | undefined; - setWithValue(value?: policy_selectors_pb.AttributeValueSelector): GetAttributeValuesByFqnsRequest; - hasWithValue(): boolean; - clearWithValue(): GetAttributeValuesByFqnsRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAttributeValuesByFqnsRequest.AsObject; - static toObject( - includeInstance: boolean, - msg: GetAttributeValuesByFqnsRequest - ): GetAttributeValuesByFqnsRequest.AsObject; - static serializeBinaryToWriter( - message: GetAttributeValuesByFqnsRequest, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): GetAttributeValuesByFqnsRequest; - static deserializeBinaryFromReader( - message: GetAttributeValuesByFqnsRequest, - reader: jspb.BinaryReader - ): GetAttributeValuesByFqnsRequest; -} - -export namespace GetAttributeValuesByFqnsRequest { - export type AsObject = { - fqnsList: Array; - withValue?: policy_selectors_pb.AttributeValueSelector.AsObject; - }; -} - -export class GetAttributeValuesByFqnsResponse extends jspb.Message { - getFqnAttributeValuesMap(): jspb.Map; - clearFqnAttributeValuesMap(): GetAttributeValuesByFqnsResponse; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAttributeValuesByFqnsResponse.AsObject; - static toObject( - includeInstance: boolean, - msg: GetAttributeValuesByFqnsResponse - ): GetAttributeValuesByFqnsResponse.AsObject; - static serializeBinaryToWriter( - message: GetAttributeValuesByFqnsResponse, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): GetAttributeValuesByFqnsResponse; - static deserializeBinaryFromReader( - message: GetAttributeValuesByFqnsResponse, - reader: jspb.BinaryReader - ): GetAttributeValuesByFqnsResponse; -} - -export namespace GetAttributeValuesByFqnsResponse { - export type AsObject = { - fqnAttributeValuesMap: Array< - [string, GetAttributeValuesByFqnsResponse.AttributeAndValue.AsObject] - >; - }; - - export class AttributeAndValue extends jspb.Message { - getAttribute(): policy_objects_pb.Attribute | undefined; - setAttribute(value?: policy_objects_pb.Attribute): AttributeAndValue; - hasAttribute(): boolean; - clearAttribute(): AttributeAndValue; - - getValue(): policy_objects_pb.Value | undefined; - setValue(value?: policy_objects_pb.Value): AttributeAndValue; - hasValue(): boolean; - clearValue(): AttributeAndValue; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AttributeAndValue.AsObject; - static toObject(includeInstance: boolean, msg: AttributeAndValue): AttributeAndValue.AsObject; - static serializeBinaryToWriter(message: AttributeAndValue, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AttributeAndValue; - static deserializeBinaryFromReader( - message: AttributeAndValue, - reader: jspb.BinaryReader - ): AttributeAndValue; - } - - export namespace AttributeAndValue { - export type AsObject = { - attribute?: policy_objects_pb.Attribute.AsObject; - value?: policy_objects_pb.Value.AsObject; - }; - } -} - -export class AssignKeyAccessServerToAttributeRequest extends jspb.Message { - getAttributeKeyAccessServer(): AttributeKeyAccessServer | undefined; - setAttributeKeyAccessServer( - value?: AttributeKeyAccessServer - ): AssignKeyAccessServerToAttributeRequest; - hasAttributeKeyAccessServer(): boolean; - clearAttributeKeyAccessServer(): AssignKeyAccessServerToAttributeRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AssignKeyAccessServerToAttributeRequest.AsObject; - static toObject( - includeInstance: boolean, - msg: AssignKeyAccessServerToAttributeRequest - ): AssignKeyAccessServerToAttributeRequest.AsObject; - static serializeBinaryToWriter( - message: AssignKeyAccessServerToAttributeRequest, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): AssignKeyAccessServerToAttributeRequest; - static deserializeBinaryFromReader( - message: AssignKeyAccessServerToAttributeRequest, - reader: jspb.BinaryReader - ): AssignKeyAccessServerToAttributeRequest; -} - -export namespace AssignKeyAccessServerToAttributeRequest { - export type AsObject = { - attributeKeyAccessServer?: AttributeKeyAccessServer.AsObject; - }; -} - -export class AssignKeyAccessServerToAttributeResponse extends jspb.Message { - getAttributeKeyAccessServer(): AttributeKeyAccessServer | undefined; - setAttributeKeyAccessServer( - value?: AttributeKeyAccessServer - ): AssignKeyAccessServerToAttributeResponse; - hasAttributeKeyAccessServer(): boolean; - clearAttributeKeyAccessServer(): AssignKeyAccessServerToAttributeResponse; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AssignKeyAccessServerToAttributeResponse.AsObject; - static toObject( - includeInstance: boolean, - msg: AssignKeyAccessServerToAttributeResponse - ): AssignKeyAccessServerToAttributeResponse.AsObject; - static serializeBinaryToWriter( - message: AssignKeyAccessServerToAttributeResponse, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): AssignKeyAccessServerToAttributeResponse; - static deserializeBinaryFromReader( - message: AssignKeyAccessServerToAttributeResponse, - reader: jspb.BinaryReader - ): AssignKeyAccessServerToAttributeResponse; -} - -export namespace AssignKeyAccessServerToAttributeResponse { - export type AsObject = { - attributeKeyAccessServer?: AttributeKeyAccessServer.AsObject; - }; -} - -export class RemoveKeyAccessServerFromAttributeRequest extends jspb.Message { - getAttributeKeyAccessServer(): AttributeKeyAccessServer | undefined; - setAttributeKeyAccessServer( - value?: AttributeKeyAccessServer - ): RemoveKeyAccessServerFromAttributeRequest; - hasAttributeKeyAccessServer(): boolean; - clearAttributeKeyAccessServer(): RemoveKeyAccessServerFromAttributeRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RemoveKeyAccessServerFromAttributeRequest.AsObject; - static toObject( - includeInstance: boolean, - msg: RemoveKeyAccessServerFromAttributeRequest - ): RemoveKeyAccessServerFromAttributeRequest.AsObject; - static serializeBinaryToWriter( - message: RemoveKeyAccessServerFromAttributeRequest, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): RemoveKeyAccessServerFromAttributeRequest; - static deserializeBinaryFromReader( - message: RemoveKeyAccessServerFromAttributeRequest, - reader: jspb.BinaryReader - ): RemoveKeyAccessServerFromAttributeRequest; -} - -export namespace RemoveKeyAccessServerFromAttributeRequest { - export type AsObject = { - attributeKeyAccessServer?: AttributeKeyAccessServer.AsObject; - }; -} - -export class RemoveKeyAccessServerFromAttributeResponse extends jspb.Message { - getAttributeKeyAccessServer(): AttributeKeyAccessServer | undefined; - setAttributeKeyAccessServer( - value?: AttributeKeyAccessServer - ): RemoveKeyAccessServerFromAttributeResponse; - hasAttributeKeyAccessServer(): boolean; - clearAttributeKeyAccessServer(): RemoveKeyAccessServerFromAttributeResponse; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RemoveKeyAccessServerFromAttributeResponse.AsObject; - static toObject( - includeInstance: boolean, - msg: RemoveKeyAccessServerFromAttributeResponse - ): RemoveKeyAccessServerFromAttributeResponse.AsObject; - static serializeBinaryToWriter( - message: RemoveKeyAccessServerFromAttributeResponse, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): RemoveKeyAccessServerFromAttributeResponse; - static deserializeBinaryFromReader( - message: RemoveKeyAccessServerFromAttributeResponse, - reader: jspb.BinaryReader - ): RemoveKeyAccessServerFromAttributeResponse; -} - -export namespace RemoveKeyAccessServerFromAttributeResponse { - export type AsObject = { - attributeKeyAccessServer?: AttributeKeyAccessServer.AsObject; - }; -} - -export class AssignKeyAccessServerToValueRequest extends jspb.Message { - getValueKeyAccessServer(): ValueKeyAccessServer | undefined; - setValueKeyAccessServer(value?: ValueKeyAccessServer): AssignKeyAccessServerToValueRequest; - hasValueKeyAccessServer(): boolean; - clearValueKeyAccessServer(): AssignKeyAccessServerToValueRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AssignKeyAccessServerToValueRequest.AsObject; - static toObject( - includeInstance: boolean, - msg: AssignKeyAccessServerToValueRequest - ): AssignKeyAccessServerToValueRequest.AsObject; - static serializeBinaryToWriter( - message: AssignKeyAccessServerToValueRequest, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): AssignKeyAccessServerToValueRequest; - static deserializeBinaryFromReader( - message: AssignKeyAccessServerToValueRequest, - reader: jspb.BinaryReader - ): AssignKeyAccessServerToValueRequest; -} - -export namespace AssignKeyAccessServerToValueRequest { - export type AsObject = { - valueKeyAccessServer?: ValueKeyAccessServer.AsObject; - }; -} - -export class AssignKeyAccessServerToValueResponse extends jspb.Message { - getValueKeyAccessServer(): ValueKeyAccessServer | undefined; - setValueKeyAccessServer(value?: ValueKeyAccessServer): AssignKeyAccessServerToValueResponse; - hasValueKeyAccessServer(): boolean; - clearValueKeyAccessServer(): AssignKeyAccessServerToValueResponse; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AssignKeyAccessServerToValueResponse.AsObject; - static toObject( - includeInstance: boolean, - msg: AssignKeyAccessServerToValueResponse - ): AssignKeyAccessServerToValueResponse.AsObject; - static serializeBinaryToWriter( - message: AssignKeyAccessServerToValueResponse, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): AssignKeyAccessServerToValueResponse; - static deserializeBinaryFromReader( - message: AssignKeyAccessServerToValueResponse, - reader: jspb.BinaryReader - ): AssignKeyAccessServerToValueResponse; -} - -export namespace AssignKeyAccessServerToValueResponse { - export type AsObject = { - valueKeyAccessServer?: ValueKeyAccessServer.AsObject; - }; -} - -export class RemoveKeyAccessServerFromValueRequest extends jspb.Message { - getValueKeyAccessServer(): ValueKeyAccessServer | undefined; - setValueKeyAccessServer(value?: ValueKeyAccessServer): RemoveKeyAccessServerFromValueRequest; - hasValueKeyAccessServer(): boolean; - clearValueKeyAccessServer(): RemoveKeyAccessServerFromValueRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RemoveKeyAccessServerFromValueRequest.AsObject; - static toObject( - includeInstance: boolean, - msg: RemoveKeyAccessServerFromValueRequest - ): RemoveKeyAccessServerFromValueRequest.AsObject; - static serializeBinaryToWriter( - message: RemoveKeyAccessServerFromValueRequest, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): RemoveKeyAccessServerFromValueRequest; - static deserializeBinaryFromReader( - message: RemoveKeyAccessServerFromValueRequest, - reader: jspb.BinaryReader - ): RemoveKeyAccessServerFromValueRequest; -} - -export namespace RemoveKeyAccessServerFromValueRequest { - export type AsObject = { - valueKeyAccessServer?: ValueKeyAccessServer.AsObject; - }; -} - -export class RemoveKeyAccessServerFromValueResponse extends jspb.Message { - getValueKeyAccessServer(): ValueKeyAccessServer | undefined; - setValueKeyAccessServer(value?: ValueKeyAccessServer): RemoveKeyAccessServerFromValueResponse; - hasValueKeyAccessServer(): boolean; - clearValueKeyAccessServer(): RemoveKeyAccessServerFromValueResponse; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RemoveKeyAccessServerFromValueResponse.AsObject; - static toObject( - includeInstance: boolean, - msg: RemoveKeyAccessServerFromValueResponse - ): RemoveKeyAccessServerFromValueResponse.AsObject; - static serializeBinaryToWriter( - message: RemoveKeyAccessServerFromValueResponse, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): RemoveKeyAccessServerFromValueResponse; - static deserializeBinaryFromReader( - message: RemoveKeyAccessServerFromValueResponse, - reader: jspb.BinaryReader - ): RemoveKeyAccessServerFromValueResponse; -} - -export namespace RemoveKeyAccessServerFromValueResponse { - export type AsObject = { - valueKeyAccessServer?: ValueKeyAccessServer.AsObject; - }; +// @generated by protoc-gen-es v1.9.0 with parameter "target=js+dts,import_extension=none" +// @generated from file policy/attributes/attributes.proto (package policy.attributes, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; +import type { ActiveStateEnum, MetadataMutable, MetadataUpdateEnum } from "../../common/common_pb"; +import type { Attribute, AttributeRuleTypeEnum, Value } from "../objects_pb"; +import type { AttributeValueSelector } from "../selectors_pb"; + +/** + * @generated from message policy.attributes.AttributeKeyAccessServer + */ +export declare class AttributeKeyAccessServer extends Message { + /** + * @generated from field: string attribute_id = 1; + */ + attributeId: string; + + /** + * @generated from field: string key_access_server_id = 2; + */ + keyAccessServerId: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.attributes.AttributeKeyAccessServer"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): AttributeKeyAccessServer; + + static fromJson(jsonValue: JsonValue, options?: Partial): AttributeKeyAccessServer; + + static fromJsonString(jsonString: string, options?: Partial): AttributeKeyAccessServer; + + static equals(a: AttributeKeyAccessServer | PlainMessage | undefined, b: AttributeKeyAccessServer | PlainMessage | undefined): boolean; +} + +/** + * @generated from message policy.attributes.ValueKeyAccessServer + */ +export declare class ValueKeyAccessServer extends Message { + /** + * @generated from field: string value_id = 1; + */ + valueId: string; + + /** + * @generated from field: string key_access_server_id = 2; + */ + keyAccessServerId: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.attributes.ValueKeyAccessServer"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ValueKeyAccessServer; + + static fromJson(jsonValue: JsonValue, options?: Partial): ValueKeyAccessServer; + + static fromJsonString(jsonString: string, options?: Partial): ValueKeyAccessServer; + + static equals(a: ValueKeyAccessServer | PlainMessage | undefined, b: ValueKeyAccessServer | PlainMessage | undefined): boolean; +} + +/** + * @generated from message policy.attributes.ListAttributesRequest + */ +export declare class ListAttributesRequest extends Message { + /** + * ACTIVE by default when not specified + * + * @generated from field: common.ActiveStateEnum state = 1; + */ + state: ActiveStateEnum; + + /** + * can be id or name + * + * @generated from field: string namespace = 2; + */ + namespace: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.attributes.ListAttributesRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ListAttributesRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): ListAttributesRequest; + + static fromJsonString(jsonString: string, options?: Partial): ListAttributesRequest; + + static equals(a: ListAttributesRequest | PlainMessage | undefined, b: ListAttributesRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message policy.attributes.ListAttributesResponse + */ +export declare class ListAttributesResponse extends Message { + /** + * @generated from field: repeated policy.Attribute attributes = 1; + */ + attributes: Attribute[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.attributes.ListAttributesResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ListAttributesResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): ListAttributesResponse; + + static fromJsonString(jsonString: string, options?: Partial): ListAttributesResponse; + + static equals(a: ListAttributesResponse | PlainMessage | undefined, b: ListAttributesResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message policy.attributes.GetAttributeRequest + */ +export declare class GetAttributeRequest extends Message { + /** + * @generated from field: string id = 1; + */ + id: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.attributes.GetAttributeRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): GetAttributeRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): GetAttributeRequest; + + static fromJsonString(jsonString: string, options?: Partial): GetAttributeRequest; + + static equals(a: GetAttributeRequest | PlainMessage | undefined, b: GetAttributeRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message policy.attributes.GetAttributeResponse + */ +export declare class GetAttributeResponse extends Message { + /** + * @generated from field: policy.Attribute attribute = 1; + */ + attribute?: Attribute; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.attributes.GetAttributeResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): GetAttributeResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): GetAttributeResponse; + + static fromJsonString(jsonString: string, options?: Partial): GetAttributeResponse; + + static equals(a: GetAttributeResponse | PlainMessage | undefined, b: GetAttributeResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message policy.attributes.CreateAttributeRequest + */ +export declare class CreateAttributeRequest extends Message { + /** + * Required + * + * @generated from field: string namespace_id = 1; + */ + namespaceId: string; + + /** + * @generated from field: string name = 2; + */ + name: string; + + /** + * @generated from field: policy.AttributeRuleTypeEnum rule = 3; + */ + rule: AttributeRuleTypeEnum; + + /** + * Optional attribute values (when provided) must be alphanumeric strings, allowing hyphens and underscores but not as the first or last character. + * The stored attribute value will be normalized to lower case. + * + * @generated from field: repeated string values = 4; + */ + values: string[]; + + /** + * Optional + * + * @generated from field: common.MetadataMutable metadata = 100; + */ + metadata?: MetadataMutable; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.attributes.CreateAttributeRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): CreateAttributeRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): CreateAttributeRequest; + + static fromJsonString(jsonString: string, options?: Partial): CreateAttributeRequest; + + static equals(a: CreateAttributeRequest | PlainMessage | undefined, b: CreateAttributeRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message policy.attributes.CreateAttributeResponse + */ +export declare class CreateAttributeResponse extends Message { + /** + * @generated from field: policy.Attribute attribute = 1; + */ + attribute?: Attribute; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.attributes.CreateAttributeResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): CreateAttributeResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): CreateAttributeResponse; + + static fromJsonString(jsonString: string, options?: Partial): CreateAttributeResponse; + + static equals(a: CreateAttributeResponse | PlainMessage | undefined, b: CreateAttributeResponse | PlainMessage | undefined): boolean; } + +/** + * @generated from message policy.attributes.UpdateAttributeRequest + */ +export declare class UpdateAttributeRequest extends Message { + /** + * Required + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * Optional + * + * @generated from field: common.MetadataMutable metadata = 100; + */ + metadata?: MetadataMutable; + + /** + * @generated from field: common.MetadataUpdateEnum metadata_update_behavior = 101; + */ + metadataUpdateBehavior: MetadataUpdateEnum; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.attributes.UpdateAttributeRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): UpdateAttributeRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): UpdateAttributeRequest; + + static fromJsonString(jsonString: string, options?: Partial): UpdateAttributeRequest; + + static equals(a: UpdateAttributeRequest | PlainMessage | undefined, b: UpdateAttributeRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message policy.attributes.UpdateAttributeResponse + */ +export declare class UpdateAttributeResponse extends Message { + /** + * @generated from field: policy.Attribute attribute = 1; + */ + attribute?: Attribute; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.attributes.UpdateAttributeResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): UpdateAttributeResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): UpdateAttributeResponse; + + static fromJsonString(jsonString: string, options?: Partial): UpdateAttributeResponse; + + static equals(a: UpdateAttributeResponse | PlainMessage | undefined, b: UpdateAttributeResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message policy.attributes.DeactivateAttributeRequest + */ +export declare class DeactivateAttributeRequest extends Message { + /** + * @generated from field: string id = 1; + */ + id: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.attributes.DeactivateAttributeRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): DeactivateAttributeRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): DeactivateAttributeRequest; + + static fromJsonString(jsonString: string, options?: Partial): DeactivateAttributeRequest; + + static equals(a: DeactivateAttributeRequest | PlainMessage | undefined, b: DeactivateAttributeRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message policy.attributes.DeactivateAttributeResponse + */ +export declare class DeactivateAttributeResponse extends Message { + /** + * @generated from field: policy.Attribute attribute = 1; + */ + attribute?: Attribute; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.attributes.DeactivateAttributeResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): DeactivateAttributeResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): DeactivateAttributeResponse; + + static fromJsonString(jsonString: string, options?: Partial): DeactivateAttributeResponse; + + static equals(a: DeactivateAttributeResponse | PlainMessage | undefined, b: DeactivateAttributeResponse | PlainMessage | undefined): boolean; +} + +/** + * / + * / Value RPC messages + * / + * + * @generated from message policy.attributes.GetAttributeValueRequest + */ +export declare class GetAttributeValueRequest extends Message { + /** + * @generated from field: string id = 1; + */ + id: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.attributes.GetAttributeValueRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): GetAttributeValueRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): GetAttributeValueRequest; + + static fromJsonString(jsonString: string, options?: Partial): GetAttributeValueRequest; + + static equals(a: GetAttributeValueRequest | PlainMessage | undefined, b: GetAttributeValueRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message policy.attributes.GetAttributeValueResponse + */ +export declare class GetAttributeValueResponse extends Message { + /** + * @generated from field: policy.Value value = 1; + */ + value?: Value; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.attributes.GetAttributeValueResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): GetAttributeValueResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): GetAttributeValueResponse; + + static fromJsonString(jsonString: string, options?: Partial): GetAttributeValueResponse; + + static equals(a: GetAttributeValueResponse | PlainMessage | undefined, b: GetAttributeValueResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message policy.attributes.ListAttributeValuesRequest + */ +export declare class ListAttributeValuesRequest extends Message { + /** + * @generated from field: string attribute_id = 1; + */ + attributeId: string; + + /** + * ACTIVE by default when not specified + * + * @generated from field: common.ActiveStateEnum state = 2; + */ + state: ActiveStateEnum; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.attributes.ListAttributeValuesRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ListAttributeValuesRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): ListAttributeValuesRequest; + + static fromJsonString(jsonString: string, options?: Partial): ListAttributeValuesRequest; + + static equals(a: ListAttributeValuesRequest | PlainMessage | undefined, b: ListAttributeValuesRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message policy.attributes.ListAttributeValuesResponse + */ +export declare class ListAttributeValuesResponse extends Message { + /** + * @generated from field: repeated policy.Value values = 1; + */ + values: Value[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.attributes.ListAttributeValuesResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ListAttributeValuesResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): ListAttributeValuesResponse; + + static fromJsonString(jsonString: string, options?: Partial): ListAttributeValuesResponse; + + static equals(a: ListAttributeValuesResponse | PlainMessage | undefined, b: ListAttributeValuesResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message policy.attributes.CreateAttributeValueRequest + */ +export declare class CreateAttributeValueRequest extends Message { + /** + * Required + * + * @generated from field: string attribute_id = 1; + */ + attributeId: string; + + /** + * @generated from field: string value = 2; + */ + value: string; + + /** + * Optional + * + * @generated from field: repeated string members = 3; + */ + members: string[]; + + /** + * Common metadata + * + * @generated from field: common.MetadataMutable metadata = 100; + */ + metadata?: MetadataMutable; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.attributes.CreateAttributeValueRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): CreateAttributeValueRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): CreateAttributeValueRequest; + + static fromJsonString(jsonString: string, options?: Partial): CreateAttributeValueRequest; + + static equals(a: CreateAttributeValueRequest | PlainMessage | undefined, b: CreateAttributeValueRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message policy.attributes.CreateAttributeValueResponse + */ +export declare class CreateAttributeValueResponse extends Message { + /** + * @generated from field: policy.Value value = 1; + */ + value?: Value; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.attributes.CreateAttributeValueResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): CreateAttributeValueResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): CreateAttributeValueResponse; + + static fromJsonString(jsonString: string, options?: Partial): CreateAttributeValueResponse; + + static equals(a: CreateAttributeValueResponse | PlainMessage | undefined, b: CreateAttributeValueResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message policy.attributes.UpdateAttributeValueRequest + */ +export declare class UpdateAttributeValueRequest extends Message { + /** + * @generated from field: string id = 1; + */ + id: string; + + /** + * Optional + * + * @generated from field: repeated string members = 4; + */ + members: string[]; + + /** + * Common metadata + * + * @generated from field: common.MetadataMutable metadata = 100; + */ + metadata?: MetadataMutable; + + /** + * @generated from field: common.MetadataUpdateEnum metadata_update_behavior = 101; + */ + metadataUpdateBehavior: MetadataUpdateEnum; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.attributes.UpdateAttributeValueRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): UpdateAttributeValueRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): UpdateAttributeValueRequest; + + static fromJsonString(jsonString: string, options?: Partial): UpdateAttributeValueRequest; + + static equals(a: UpdateAttributeValueRequest | PlainMessage | undefined, b: UpdateAttributeValueRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message policy.attributes.UpdateAttributeValueResponse + */ +export declare class UpdateAttributeValueResponse extends Message { + /** + * @generated from field: policy.Value value = 1; + */ + value?: Value; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.attributes.UpdateAttributeValueResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): UpdateAttributeValueResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): UpdateAttributeValueResponse; + + static fromJsonString(jsonString: string, options?: Partial): UpdateAttributeValueResponse; + + static equals(a: UpdateAttributeValueResponse | PlainMessage | undefined, b: UpdateAttributeValueResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message policy.attributes.DeactivateAttributeValueRequest + */ +export declare class DeactivateAttributeValueRequest extends Message { + /** + * @generated from field: string id = 1; + */ + id: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.attributes.DeactivateAttributeValueRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): DeactivateAttributeValueRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): DeactivateAttributeValueRequest; + + static fromJsonString(jsonString: string, options?: Partial): DeactivateAttributeValueRequest; + + static equals(a: DeactivateAttributeValueRequest | PlainMessage | undefined, b: DeactivateAttributeValueRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message policy.attributes.DeactivateAttributeValueResponse + */ +export declare class DeactivateAttributeValueResponse extends Message { + /** + * @generated from field: policy.Value value = 1; + */ + value?: Value; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.attributes.DeactivateAttributeValueResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): DeactivateAttributeValueResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): DeactivateAttributeValueResponse; + + static fromJsonString(jsonString: string, options?: Partial): DeactivateAttributeValueResponse; + + static equals(a: DeactivateAttributeValueResponse | PlainMessage | undefined, b: DeactivateAttributeValueResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message policy.attributes.GetAttributeValuesByFqnsRequest + */ +export declare class GetAttributeValuesByFqnsRequest extends Message { + /** + * Required + * Fully Qualified Names of attribute values (i.e. https:///attr//value/), normalized to lower case. + * + * @generated from field: repeated string fqns = 1; + */ + fqns: string[]; + + /** + * @generated from field: policy.AttributeValueSelector with_value = 2; + */ + withValue?: AttributeValueSelector; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.attributes.GetAttributeValuesByFqnsRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): GetAttributeValuesByFqnsRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): GetAttributeValuesByFqnsRequest; + + static fromJsonString(jsonString: string, options?: Partial): GetAttributeValuesByFqnsRequest; + + static equals(a: GetAttributeValuesByFqnsRequest | PlainMessage | undefined, b: GetAttributeValuesByFqnsRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message policy.attributes.GetAttributeValuesByFqnsResponse + */ +export declare class GetAttributeValuesByFqnsResponse extends Message { + /** + * map of FQNs to complete attributes and the one selected value + * + * @generated from field: map fqn_attribute_values = 1; + */ + fqnAttributeValues: { [key: string]: GetAttributeValuesByFqnsResponse_AttributeAndValue }; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.attributes.GetAttributeValuesByFqnsResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): GetAttributeValuesByFqnsResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): GetAttributeValuesByFqnsResponse; + + static fromJsonString(jsonString: string, options?: Partial): GetAttributeValuesByFqnsResponse; + + static equals(a: GetAttributeValuesByFqnsResponse | PlainMessage | undefined, b: GetAttributeValuesByFqnsResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue + */ +export declare class GetAttributeValuesByFqnsResponse_AttributeAndValue extends Message { + /** + * @generated from field: policy.Attribute attribute = 1; + */ + attribute?: Attribute; + + /** + * @generated from field: policy.Value value = 2; + */ + value?: Value; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): GetAttributeValuesByFqnsResponse_AttributeAndValue; + + static fromJson(jsonValue: JsonValue, options?: Partial): GetAttributeValuesByFqnsResponse_AttributeAndValue; + + static fromJsonString(jsonString: string, options?: Partial): GetAttributeValuesByFqnsResponse_AttributeAndValue; + + static equals(a: GetAttributeValuesByFqnsResponse_AttributeAndValue | PlainMessage | undefined, b: GetAttributeValuesByFqnsResponse_AttributeAndValue | PlainMessage | undefined): boolean; +} + +/** + * @generated from message policy.attributes.AssignKeyAccessServerToAttributeRequest + */ +export declare class AssignKeyAccessServerToAttributeRequest extends Message { + /** + * @generated from field: policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1; + */ + attributeKeyAccessServer?: AttributeKeyAccessServer; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.attributes.AssignKeyAccessServerToAttributeRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): AssignKeyAccessServerToAttributeRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): AssignKeyAccessServerToAttributeRequest; + + static fromJsonString(jsonString: string, options?: Partial): AssignKeyAccessServerToAttributeRequest; + + static equals(a: AssignKeyAccessServerToAttributeRequest | PlainMessage | undefined, b: AssignKeyAccessServerToAttributeRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message policy.attributes.AssignKeyAccessServerToAttributeResponse + */ +export declare class AssignKeyAccessServerToAttributeResponse extends Message { + /** + * @generated from field: policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1; + */ + attributeKeyAccessServer?: AttributeKeyAccessServer; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.attributes.AssignKeyAccessServerToAttributeResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): AssignKeyAccessServerToAttributeResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): AssignKeyAccessServerToAttributeResponse; + + static fromJsonString(jsonString: string, options?: Partial): AssignKeyAccessServerToAttributeResponse; + + static equals(a: AssignKeyAccessServerToAttributeResponse | PlainMessage | undefined, b: AssignKeyAccessServerToAttributeResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message policy.attributes.RemoveKeyAccessServerFromAttributeRequest + */ +export declare class RemoveKeyAccessServerFromAttributeRequest extends Message { + /** + * @generated from field: policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1; + */ + attributeKeyAccessServer?: AttributeKeyAccessServer; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.attributes.RemoveKeyAccessServerFromAttributeRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): RemoveKeyAccessServerFromAttributeRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): RemoveKeyAccessServerFromAttributeRequest; + + static fromJsonString(jsonString: string, options?: Partial): RemoveKeyAccessServerFromAttributeRequest; + + static equals(a: RemoveKeyAccessServerFromAttributeRequest | PlainMessage | undefined, b: RemoveKeyAccessServerFromAttributeRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message policy.attributes.RemoveKeyAccessServerFromAttributeResponse + */ +export declare class RemoveKeyAccessServerFromAttributeResponse extends Message { + /** + * @generated from field: policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1; + */ + attributeKeyAccessServer?: AttributeKeyAccessServer; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.attributes.RemoveKeyAccessServerFromAttributeResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): RemoveKeyAccessServerFromAttributeResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): RemoveKeyAccessServerFromAttributeResponse; + + static fromJsonString(jsonString: string, options?: Partial): RemoveKeyAccessServerFromAttributeResponse; + + static equals(a: RemoveKeyAccessServerFromAttributeResponse | PlainMessage | undefined, b: RemoveKeyAccessServerFromAttributeResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message policy.attributes.AssignKeyAccessServerToValueRequest + */ +export declare class AssignKeyAccessServerToValueRequest extends Message { + /** + * @generated from field: policy.attributes.ValueKeyAccessServer value_key_access_server = 1; + */ + valueKeyAccessServer?: ValueKeyAccessServer; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.attributes.AssignKeyAccessServerToValueRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): AssignKeyAccessServerToValueRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): AssignKeyAccessServerToValueRequest; + + static fromJsonString(jsonString: string, options?: Partial): AssignKeyAccessServerToValueRequest; + + static equals(a: AssignKeyAccessServerToValueRequest | PlainMessage | undefined, b: AssignKeyAccessServerToValueRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message policy.attributes.AssignKeyAccessServerToValueResponse + */ +export declare class AssignKeyAccessServerToValueResponse extends Message { + /** + * @generated from field: policy.attributes.ValueKeyAccessServer value_key_access_server = 1; + */ + valueKeyAccessServer?: ValueKeyAccessServer; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.attributes.AssignKeyAccessServerToValueResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): AssignKeyAccessServerToValueResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): AssignKeyAccessServerToValueResponse; + + static fromJsonString(jsonString: string, options?: Partial): AssignKeyAccessServerToValueResponse; + + static equals(a: AssignKeyAccessServerToValueResponse | PlainMessage | undefined, b: AssignKeyAccessServerToValueResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message policy.attributes.RemoveKeyAccessServerFromValueRequest + */ +export declare class RemoveKeyAccessServerFromValueRequest extends Message { + /** + * @generated from field: policy.attributes.ValueKeyAccessServer value_key_access_server = 1; + */ + valueKeyAccessServer?: ValueKeyAccessServer; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.attributes.RemoveKeyAccessServerFromValueRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): RemoveKeyAccessServerFromValueRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): RemoveKeyAccessServerFromValueRequest; + + static fromJsonString(jsonString: string, options?: Partial): RemoveKeyAccessServerFromValueRequest; + + static equals(a: RemoveKeyAccessServerFromValueRequest | PlainMessage | undefined, b: RemoveKeyAccessServerFromValueRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message policy.attributes.RemoveKeyAccessServerFromValueResponse + */ +export declare class RemoveKeyAccessServerFromValueResponse extends Message { + /** + * @generated from field: policy.attributes.ValueKeyAccessServer value_key_access_server = 1; + */ + valueKeyAccessServer?: ValueKeyAccessServer; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.attributes.RemoveKeyAccessServerFromValueResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): RemoveKeyAccessServerFromValueResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): RemoveKeyAccessServerFromValueResponse; + + static fromJsonString(jsonString: string, options?: Partial): RemoveKeyAccessServerFromValueResponse; + + static equals(a: RemoveKeyAccessServerFromValueResponse | PlainMessage | undefined, b: RemoveKeyAccessServerFromValueResponse | PlainMessage | undefined): boolean; +} + diff --git a/lib/src/platform/policy/attributes/attributes_pb.ts b/lib/src/platform/policy/attributes/attributes_pb.ts deleted file mode 100644 index ffd43c8f..00000000 --- a/lib/src/platform/policy/attributes/attributes_pb.ts +++ /dev/null @@ -1,1836 +0,0 @@ -// @generated by protoc-gen-es v1.9.0 with parameter "target=ts" -// @generated from file policy/attributes/attributes.proto (package policy.attributes, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import type { - BinaryReadOptions, - FieldList, - JsonReadOptions, - JsonValue, - PartialMessage, - PlainMessage, -} from '@bufbuild/protobuf'; -import { Message, proto3 } from '@bufbuild/protobuf'; -import { ActiveStateEnum, MetadataMutable, MetadataUpdateEnum } from '../../common/common_pb.js'; -import { Attribute, AttributeRuleTypeEnum, Value } from '../objects_pb.js'; -import { AttributeValueSelector } from '../selectors_pb.js'; - -/** - * @generated from message policy.attributes.AttributeKeyAccessServer - */ -export class AttributeKeyAccessServer extends Message { - /** - * @generated from field: string attribute_id = 1; - */ - attributeId = ''; - - /** - * @generated from field: string key_access_server_id = 2; - */ - keyAccessServerId = ''; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.attributes.AttributeKeyAccessServer'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'attribute_id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { no: 2, name: 'key_access_server_id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): AttributeKeyAccessServer { - return new AttributeKeyAccessServer().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): AttributeKeyAccessServer { - return new AttributeKeyAccessServer().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): AttributeKeyAccessServer { - return new AttributeKeyAccessServer().fromJsonString(jsonString, options); - } - - static equals( - a: AttributeKeyAccessServer | PlainMessage | undefined, - b: AttributeKeyAccessServer | PlainMessage | undefined - ): boolean { - return proto3.util.equals(AttributeKeyAccessServer, a, b); - } -} - -/** - * @generated from message policy.attributes.ValueKeyAccessServer - */ -export class ValueKeyAccessServer extends Message { - /** - * @generated from field: string value_id = 1; - */ - valueId = ''; - - /** - * @generated from field: string key_access_server_id = 2; - */ - keyAccessServerId = ''; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.attributes.ValueKeyAccessServer'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'value_id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { no: 2, name: 'key_access_server_id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ValueKeyAccessServer { - return new ValueKeyAccessServer().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ValueKeyAccessServer { - return new ValueKeyAccessServer().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): ValueKeyAccessServer { - return new ValueKeyAccessServer().fromJsonString(jsonString, options); - } - - static equals( - a: ValueKeyAccessServer | PlainMessage | undefined, - b: ValueKeyAccessServer | PlainMessage | undefined - ): boolean { - return proto3.util.equals(ValueKeyAccessServer, a, b); - } -} - -/** - * @generated from message policy.attributes.ListAttributesRequest - */ -export class ListAttributesRequest extends Message { - /** - * ACTIVE by default when not specified - * - * @generated from field: common.ActiveStateEnum state = 1; - */ - state = ActiveStateEnum.UNSPECIFIED; - - /** - * can be id or name - * - * @generated from field: string namespace = 2; - */ - namespace = ''; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.attributes.ListAttributesRequest'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'state', kind: 'enum', T: proto3.getEnumType(ActiveStateEnum) }, - { no: 2, name: 'namespace', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): ListAttributesRequest { - return new ListAttributesRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ListAttributesRequest { - return new ListAttributesRequest().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): ListAttributesRequest { - return new ListAttributesRequest().fromJsonString(jsonString, options); - } - - static equals( - a: ListAttributesRequest | PlainMessage | undefined, - b: ListAttributesRequest | PlainMessage | undefined - ): boolean { - return proto3.util.equals(ListAttributesRequest, a, b); - } -} - -/** - * @generated from message policy.attributes.ListAttributesResponse - */ -export class ListAttributesResponse extends Message { - /** - * @generated from field: repeated policy.Attribute attributes = 1; - */ - attributes: Attribute[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.attributes.ListAttributesResponse'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'attributes', kind: 'message', T: Attribute, repeated: true }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): ListAttributesResponse { - return new ListAttributesResponse().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): ListAttributesResponse { - return new ListAttributesResponse().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): ListAttributesResponse { - return new ListAttributesResponse().fromJsonString(jsonString, options); - } - - static equals( - a: ListAttributesResponse | PlainMessage | undefined, - b: ListAttributesResponse | PlainMessage | undefined - ): boolean { - return proto3.util.equals(ListAttributesResponse, a, b); - } -} - -/** - * @generated from message policy.attributes.GetAttributeRequest - */ -export class GetAttributeRequest extends Message { - /** - * @generated from field: string id = 1; - */ - id = ''; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.attributes.GetAttributeRequest'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetAttributeRequest { - return new GetAttributeRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetAttributeRequest { - return new GetAttributeRequest().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): GetAttributeRequest { - return new GetAttributeRequest().fromJsonString(jsonString, options); - } - - static equals( - a: GetAttributeRequest | PlainMessage | undefined, - b: GetAttributeRequest | PlainMessage | undefined - ): boolean { - return proto3.util.equals(GetAttributeRequest, a, b); - } -} - -/** - * @generated from message policy.attributes.GetAttributeResponse - */ -export class GetAttributeResponse extends Message { - /** - * @generated from field: policy.Attribute attribute = 1; - */ - attribute?: Attribute; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.attributes.GetAttributeResponse'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'attribute', kind: 'message', T: Attribute }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetAttributeResponse { - return new GetAttributeResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetAttributeResponse { - return new GetAttributeResponse().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): GetAttributeResponse { - return new GetAttributeResponse().fromJsonString(jsonString, options); - } - - static equals( - a: GetAttributeResponse | PlainMessage | undefined, - b: GetAttributeResponse | PlainMessage | undefined - ): boolean { - return proto3.util.equals(GetAttributeResponse, a, b); - } -} - -/** - * @generated from message policy.attributes.CreateAttributeRequest - */ -export class CreateAttributeRequest extends Message { - /** - * Required - * - * @generated from field: string namespace_id = 1; - */ - namespaceId = ''; - - /** - * @generated from field: string name = 2; - */ - name = ''; - - /** - * @generated from field: policy.AttributeRuleTypeEnum rule = 3; - */ - rule = AttributeRuleTypeEnum.UNSPECIFIED; - - /** - * Optional attribute values (when provided) must be alphanumeric strings, allowing hyphens and underscores but not as the first or last character. - * The stored attribute value will be normalized to lower case. - * - * @generated from field: repeated string values = 4; - */ - values: string[] = []; - - /** - * Optional - * - * @generated from field: common.MetadataMutable metadata = 100; - */ - metadata?: MetadataMutable; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.attributes.CreateAttributeRequest'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'namespace_id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { no: 2, name: 'name', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { no: 3, name: 'rule', kind: 'enum', T: proto3.getEnumType(AttributeRuleTypeEnum) }, - { no: 4, name: 'values', kind: 'scalar', T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 100, name: 'metadata', kind: 'message', T: MetadataMutable }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): CreateAttributeRequest { - return new CreateAttributeRequest().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): CreateAttributeRequest { - return new CreateAttributeRequest().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): CreateAttributeRequest { - return new CreateAttributeRequest().fromJsonString(jsonString, options); - } - - static equals( - a: CreateAttributeRequest | PlainMessage | undefined, - b: CreateAttributeRequest | PlainMessage | undefined - ): boolean { - return proto3.util.equals(CreateAttributeRequest, a, b); - } -} - -/** - * @generated from message policy.attributes.CreateAttributeResponse - */ -export class CreateAttributeResponse extends Message { - /** - * @generated from field: policy.Attribute attribute = 1; - */ - attribute?: Attribute; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.attributes.CreateAttributeResponse'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'attribute', kind: 'message', T: Attribute }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): CreateAttributeResponse { - return new CreateAttributeResponse().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): CreateAttributeResponse { - return new CreateAttributeResponse().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): CreateAttributeResponse { - return new CreateAttributeResponse().fromJsonString(jsonString, options); - } - - static equals( - a: CreateAttributeResponse | PlainMessage | undefined, - b: CreateAttributeResponse | PlainMessage | undefined - ): boolean { - return proto3.util.equals(CreateAttributeResponse, a, b); - } -} - -/** - * @generated from message policy.attributes.UpdateAttributeRequest - */ -export class UpdateAttributeRequest extends Message { - /** - * Required - * - * @generated from field: string id = 1; - */ - id = ''; - - /** - * Optional - * - * @generated from field: common.MetadataMutable metadata = 100; - */ - metadata?: MetadataMutable; - - /** - * @generated from field: common.MetadataUpdateEnum metadata_update_behavior = 101; - */ - metadataUpdateBehavior = MetadataUpdateEnum.UNSPECIFIED; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.attributes.UpdateAttributeRequest'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { no: 100, name: 'metadata', kind: 'message', T: MetadataMutable }, - { - no: 101, - name: 'metadata_update_behavior', - kind: 'enum', - T: proto3.getEnumType(MetadataUpdateEnum), - }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): UpdateAttributeRequest { - return new UpdateAttributeRequest().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): UpdateAttributeRequest { - return new UpdateAttributeRequest().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): UpdateAttributeRequest { - return new UpdateAttributeRequest().fromJsonString(jsonString, options); - } - - static equals( - a: UpdateAttributeRequest | PlainMessage | undefined, - b: UpdateAttributeRequest | PlainMessage | undefined - ): boolean { - return proto3.util.equals(UpdateAttributeRequest, a, b); - } -} - -/** - * @generated from message policy.attributes.UpdateAttributeResponse - */ -export class UpdateAttributeResponse extends Message { - /** - * @generated from field: policy.Attribute attribute = 1; - */ - attribute?: Attribute; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.attributes.UpdateAttributeResponse'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'attribute', kind: 'message', T: Attribute }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): UpdateAttributeResponse { - return new UpdateAttributeResponse().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): UpdateAttributeResponse { - return new UpdateAttributeResponse().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): UpdateAttributeResponse { - return new UpdateAttributeResponse().fromJsonString(jsonString, options); - } - - static equals( - a: UpdateAttributeResponse | PlainMessage | undefined, - b: UpdateAttributeResponse | PlainMessage | undefined - ): boolean { - return proto3.util.equals(UpdateAttributeResponse, a, b); - } -} - -/** - * @generated from message policy.attributes.DeactivateAttributeRequest - */ -export class DeactivateAttributeRequest extends Message { - /** - * @generated from field: string id = 1; - */ - id = ''; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.attributes.DeactivateAttributeRequest'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): DeactivateAttributeRequest { - return new DeactivateAttributeRequest().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): DeactivateAttributeRequest { - return new DeactivateAttributeRequest().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): DeactivateAttributeRequest { - return new DeactivateAttributeRequest().fromJsonString(jsonString, options); - } - - static equals( - a: DeactivateAttributeRequest | PlainMessage | undefined, - b: DeactivateAttributeRequest | PlainMessage | undefined - ): boolean { - return proto3.util.equals(DeactivateAttributeRequest, a, b); - } -} - -/** - * @generated from message policy.attributes.DeactivateAttributeResponse - */ -export class DeactivateAttributeResponse extends Message { - /** - * @generated from field: policy.Attribute attribute = 1; - */ - attribute?: Attribute; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.attributes.DeactivateAttributeResponse'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'attribute', kind: 'message', T: Attribute }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): DeactivateAttributeResponse { - return new DeactivateAttributeResponse().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): DeactivateAttributeResponse { - return new DeactivateAttributeResponse().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): DeactivateAttributeResponse { - return new DeactivateAttributeResponse().fromJsonString(jsonString, options); - } - - static equals( - a: DeactivateAttributeResponse | PlainMessage | undefined, - b: DeactivateAttributeResponse | PlainMessage | undefined - ): boolean { - return proto3.util.equals(DeactivateAttributeResponse, a, b); - } -} - -/** - * / - * / Value RPC messages - * / - * - * @generated from message policy.attributes.GetAttributeValueRequest - */ -export class GetAttributeValueRequest extends Message { - /** - * @generated from field: string id = 1; - */ - id = ''; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.attributes.GetAttributeValueRequest'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): GetAttributeValueRequest { - return new GetAttributeValueRequest().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): GetAttributeValueRequest { - return new GetAttributeValueRequest().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): GetAttributeValueRequest { - return new GetAttributeValueRequest().fromJsonString(jsonString, options); - } - - static equals( - a: GetAttributeValueRequest | PlainMessage | undefined, - b: GetAttributeValueRequest | PlainMessage | undefined - ): boolean { - return proto3.util.equals(GetAttributeValueRequest, a, b); - } -} - -/** - * @generated from message policy.attributes.GetAttributeValueResponse - */ -export class GetAttributeValueResponse extends Message { - /** - * @generated from field: policy.Value value = 1; - */ - value?: Value; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.attributes.GetAttributeValueResponse'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'value', kind: 'message', T: Value }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): GetAttributeValueResponse { - return new GetAttributeValueResponse().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): GetAttributeValueResponse { - return new GetAttributeValueResponse().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): GetAttributeValueResponse { - return new GetAttributeValueResponse().fromJsonString(jsonString, options); - } - - static equals( - a: GetAttributeValueResponse | PlainMessage | undefined, - b: GetAttributeValueResponse | PlainMessage | undefined - ): boolean { - return proto3.util.equals(GetAttributeValueResponse, a, b); - } -} - -/** - * @generated from message policy.attributes.ListAttributeValuesRequest - */ -export class ListAttributeValuesRequest extends Message { - /** - * @generated from field: string attribute_id = 1; - */ - attributeId = ''; - - /** - * ACTIVE by default when not specified - * - * @generated from field: common.ActiveStateEnum state = 2; - */ - state = ActiveStateEnum.UNSPECIFIED; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.attributes.ListAttributeValuesRequest'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'attribute_id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { no: 2, name: 'state', kind: 'enum', T: proto3.getEnumType(ActiveStateEnum) }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): ListAttributeValuesRequest { - return new ListAttributeValuesRequest().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): ListAttributeValuesRequest { - return new ListAttributeValuesRequest().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): ListAttributeValuesRequest { - return new ListAttributeValuesRequest().fromJsonString(jsonString, options); - } - - static equals( - a: ListAttributeValuesRequest | PlainMessage | undefined, - b: ListAttributeValuesRequest | PlainMessage | undefined - ): boolean { - return proto3.util.equals(ListAttributeValuesRequest, a, b); - } -} - -/** - * @generated from message policy.attributes.ListAttributeValuesResponse - */ -export class ListAttributeValuesResponse extends Message { - /** - * @generated from field: repeated policy.Value values = 1; - */ - values: Value[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.attributes.ListAttributeValuesResponse'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'values', kind: 'message', T: Value, repeated: true }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): ListAttributeValuesResponse { - return new ListAttributeValuesResponse().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): ListAttributeValuesResponse { - return new ListAttributeValuesResponse().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): ListAttributeValuesResponse { - return new ListAttributeValuesResponse().fromJsonString(jsonString, options); - } - - static equals( - a: ListAttributeValuesResponse | PlainMessage | undefined, - b: ListAttributeValuesResponse | PlainMessage | undefined - ): boolean { - return proto3.util.equals(ListAttributeValuesResponse, a, b); - } -} - -/** - * @generated from message policy.attributes.CreateAttributeValueRequest - */ -export class CreateAttributeValueRequest extends Message { - /** - * Required - * - * @generated from field: string attribute_id = 1; - */ - attributeId = ''; - - /** - * @generated from field: string value = 2; - */ - value = ''; - - /** - * Optional - * - * @generated from field: repeated string members = 3; - */ - members: string[] = []; - - /** - * Common metadata - * - * @generated from field: common.MetadataMutable metadata = 100; - */ - metadata?: MetadataMutable; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.attributes.CreateAttributeValueRequest'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'attribute_id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { no: 2, name: 'value', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { no: 3, name: 'members', kind: 'scalar', T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 100, name: 'metadata', kind: 'message', T: MetadataMutable }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): CreateAttributeValueRequest { - return new CreateAttributeValueRequest().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): CreateAttributeValueRequest { - return new CreateAttributeValueRequest().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): CreateAttributeValueRequest { - return new CreateAttributeValueRequest().fromJsonString(jsonString, options); - } - - static equals( - a: CreateAttributeValueRequest | PlainMessage | undefined, - b: CreateAttributeValueRequest | PlainMessage | undefined - ): boolean { - return proto3.util.equals(CreateAttributeValueRequest, a, b); - } -} - -/** - * @generated from message policy.attributes.CreateAttributeValueResponse - */ -export class CreateAttributeValueResponse extends Message { - /** - * @generated from field: policy.Value value = 1; - */ - value?: Value; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.attributes.CreateAttributeValueResponse'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'value', kind: 'message', T: Value }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): CreateAttributeValueResponse { - return new CreateAttributeValueResponse().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): CreateAttributeValueResponse { - return new CreateAttributeValueResponse().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): CreateAttributeValueResponse { - return new CreateAttributeValueResponse().fromJsonString(jsonString, options); - } - - static equals( - a: CreateAttributeValueResponse | PlainMessage | undefined, - b: CreateAttributeValueResponse | PlainMessage | undefined - ): boolean { - return proto3.util.equals(CreateAttributeValueResponse, a, b); - } -} - -/** - * @generated from message policy.attributes.UpdateAttributeValueRequest - */ -export class UpdateAttributeValueRequest extends Message { - /** - * @generated from field: string id = 1; - */ - id = ''; - - /** - * Optional - * - * @generated from field: repeated string members = 4; - */ - members: string[] = []; - - /** - * Common metadata - * - * @generated from field: common.MetadataMutable metadata = 100; - */ - metadata?: MetadataMutable; - - /** - * @generated from field: common.MetadataUpdateEnum metadata_update_behavior = 101; - */ - metadataUpdateBehavior = MetadataUpdateEnum.UNSPECIFIED; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.attributes.UpdateAttributeValueRequest'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { no: 4, name: 'members', kind: 'scalar', T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 100, name: 'metadata', kind: 'message', T: MetadataMutable }, - { - no: 101, - name: 'metadata_update_behavior', - kind: 'enum', - T: proto3.getEnumType(MetadataUpdateEnum), - }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): UpdateAttributeValueRequest { - return new UpdateAttributeValueRequest().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): UpdateAttributeValueRequest { - return new UpdateAttributeValueRequest().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): UpdateAttributeValueRequest { - return new UpdateAttributeValueRequest().fromJsonString(jsonString, options); - } - - static equals( - a: UpdateAttributeValueRequest | PlainMessage | undefined, - b: UpdateAttributeValueRequest | PlainMessage | undefined - ): boolean { - return proto3.util.equals(UpdateAttributeValueRequest, a, b); - } -} - -/** - * @generated from message policy.attributes.UpdateAttributeValueResponse - */ -export class UpdateAttributeValueResponse extends Message { - /** - * @generated from field: policy.Value value = 1; - */ - value?: Value; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.attributes.UpdateAttributeValueResponse'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'value', kind: 'message', T: Value }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): UpdateAttributeValueResponse { - return new UpdateAttributeValueResponse().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): UpdateAttributeValueResponse { - return new UpdateAttributeValueResponse().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): UpdateAttributeValueResponse { - return new UpdateAttributeValueResponse().fromJsonString(jsonString, options); - } - - static equals( - a: UpdateAttributeValueResponse | PlainMessage | undefined, - b: UpdateAttributeValueResponse | PlainMessage | undefined - ): boolean { - return proto3.util.equals(UpdateAttributeValueResponse, a, b); - } -} - -/** - * @generated from message policy.attributes.DeactivateAttributeValueRequest - */ -export class DeactivateAttributeValueRequest extends Message { - /** - * @generated from field: string id = 1; - */ - id = ''; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.attributes.DeactivateAttributeValueRequest'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): DeactivateAttributeValueRequest { - return new DeactivateAttributeValueRequest().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): DeactivateAttributeValueRequest { - return new DeactivateAttributeValueRequest().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): DeactivateAttributeValueRequest { - return new DeactivateAttributeValueRequest().fromJsonString(jsonString, options); - } - - static equals( - a: DeactivateAttributeValueRequest | PlainMessage | undefined, - b: DeactivateAttributeValueRequest | PlainMessage | undefined - ): boolean { - return proto3.util.equals(DeactivateAttributeValueRequest, a, b); - } -} - -/** - * @generated from message policy.attributes.DeactivateAttributeValueResponse - */ -export class DeactivateAttributeValueResponse extends Message { - /** - * @generated from field: policy.Value value = 1; - */ - value?: Value; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.attributes.DeactivateAttributeValueResponse'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'value', kind: 'message', T: Value }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): DeactivateAttributeValueResponse { - return new DeactivateAttributeValueResponse().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): DeactivateAttributeValueResponse { - return new DeactivateAttributeValueResponse().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): DeactivateAttributeValueResponse { - return new DeactivateAttributeValueResponse().fromJsonString(jsonString, options); - } - - static equals( - a: - | DeactivateAttributeValueResponse - | PlainMessage - | undefined, - b: DeactivateAttributeValueResponse | PlainMessage | undefined - ): boolean { - return proto3.util.equals(DeactivateAttributeValueResponse, a, b); - } -} - -/** - * @generated from message policy.attributes.GetAttributeValuesByFqnsRequest - */ -export class GetAttributeValuesByFqnsRequest extends Message { - /** - * Required - * Fully Qualified Names of attribute values (i.e. https:///attr//value/), normalized to lower case. - * - * @generated from field: repeated string fqns = 1; - */ - fqns: string[] = []; - - /** - * @generated from field: policy.AttributeValueSelector with_value = 2; - */ - withValue?: AttributeValueSelector; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.attributes.GetAttributeValuesByFqnsRequest'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'fqns', kind: 'scalar', T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 2, name: 'with_value', kind: 'message', T: AttributeValueSelector }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): GetAttributeValuesByFqnsRequest { - return new GetAttributeValuesByFqnsRequest().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): GetAttributeValuesByFqnsRequest { - return new GetAttributeValuesByFqnsRequest().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): GetAttributeValuesByFqnsRequest { - return new GetAttributeValuesByFqnsRequest().fromJsonString(jsonString, options); - } - - static equals( - a: GetAttributeValuesByFqnsRequest | PlainMessage | undefined, - b: GetAttributeValuesByFqnsRequest | PlainMessage | undefined - ): boolean { - return proto3.util.equals(GetAttributeValuesByFqnsRequest, a, b); - } -} - -/** - * @generated from message policy.attributes.GetAttributeValuesByFqnsResponse - */ -export class GetAttributeValuesByFqnsResponse extends Message { - /** - * map of FQNs to complete attributes and the one selected value - * - * @generated from field: map fqn_attribute_values = 1; - */ - fqnAttributeValues: { [key: string]: GetAttributeValuesByFqnsResponse_AttributeAndValue } = {}; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.attributes.GetAttributeValuesByFqnsResponse'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { - no: 1, - name: 'fqn_attribute_values', - kind: 'map', - K: 9 /* ScalarType.STRING */, - V: { kind: 'message', T: GetAttributeValuesByFqnsResponse_AttributeAndValue }, - }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): GetAttributeValuesByFqnsResponse { - return new GetAttributeValuesByFqnsResponse().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): GetAttributeValuesByFqnsResponse { - return new GetAttributeValuesByFqnsResponse().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): GetAttributeValuesByFqnsResponse { - return new GetAttributeValuesByFqnsResponse().fromJsonString(jsonString, options); - } - - static equals( - a: - | GetAttributeValuesByFqnsResponse - | PlainMessage - | undefined, - b: GetAttributeValuesByFqnsResponse | PlainMessage | undefined - ): boolean { - return proto3.util.equals(GetAttributeValuesByFqnsResponse, a, b); - } -} - -/** - * @generated from message policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue - */ -export class GetAttributeValuesByFqnsResponse_AttributeAndValue extends Message { - /** - * @generated from field: policy.Attribute attribute = 1; - */ - attribute?: Attribute; - - /** - * @generated from field: policy.Value value = 2; - */ - value?: Value; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'attribute', kind: 'message', T: Attribute }, - { no: 2, name: 'value', kind: 'message', T: Value }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): GetAttributeValuesByFqnsResponse_AttributeAndValue { - return new GetAttributeValuesByFqnsResponse_AttributeAndValue().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): GetAttributeValuesByFqnsResponse_AttributeAndValue { - return new GetAttributeValuesByFqnsResponse_AttributeAndValue().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): GetAttributeValuesByFqnsResponse_AttributeAndValue { - return new GetAttributeValuesByFqnsResponse_AttributeAndValue().fromJsonString( - jsonString, - options - ); - } - - static equals( - a: - | GetAttributeValuesByFqnsResponse_AttributeAndValue - | PlainMessage - | undefined, - b: - | GetAttributeValuesByFqnsResponse_AttributeAndValue - | PlainMessage - | undefined - ): boolean { - return proto3.util.equals(GetAttributeValuesByFqnsResponse_AttributeAndValue, a, b); - } -} - -/** - * @generated from message policy.attributes.AssignKeyAccessServerToAttributeRequest - */ -export class AssignKeyAccessServerToAttributeRequest extends Message { - /** - * @generated from field: policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1; - */ - attributeKeyAccessServer?: AttributeKeyAccessServer; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.attributes.AssignKeyAccessServerToAttributeRequest'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'attribute_key_access_server', kind: 'message', T: AttributeKeyAccessServer }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): AssignKeyAccessServerToAttributeRequest { - return new AssignKeyAccessServerToAttributeRequest().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): AssignKeyAccessServerToAttributeRequest { - return new AssignKeyAccessServerToAttributeRequest().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): AssignKeyAccessServerToAttributeRequest { - return new AssignKeyAccessServerToAttributeRequest().fromJsonString(jsonString, options); - } - - static equals( - a: - | AssignKeyAccessServerToAttributeRequest - | PlainMessage - | undefined, - b: - | AssignKeyAccessServerToAttributeRequest - | PlainMessage - | undefined - ): boolean { - return proto3.util.equals(AssignKeyAccessServerToAttributeRequest, a, b); - } -} - -/** - * @generated from message policy.attributes.AssignKeyAccessServerToAttributeResponse - */ -export class AssignKeyAccessServerToAttributeResponse extends Message { - /** - * @generated from field: policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1; - */ - attributeKeyAccessServer?: AttributeKeyAccessServer; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.attributes.AssignKeyAccessServerToAttributeResponse'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'attribute_key_access_server', kind: 'message', T: AttributeKeyAccessServer }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): AssignKeyAccessServerToAttributeResponse { - return new AssignKeyAccessServerToAttributeResponse().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): AssignKeyAccessServerToAttributeResponse { - return new AssignKeyAccessServerToAttributeResponse().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): AssignKeyAccessServerToAttributeResponse { - return new AssignKeyAccessServerToAttributeResponse().fromJsonString(jsonString, options); - } - - static equals( - a: - | AssignKeyAccessServerToAttributeResponse - | PlainMessage - | undefined, - b: - | AssignKeyAccessServerToAttributeResponse - | PlainMessage - | undefined - ): boolean { - return proto3.util.equals(AssignKeyAccessServerToAttributeResponse, a, b); - } -} - -/** - * @generated from message policy.attributes.RemoveKeyAccessServerFromAttributeRequest - */ -export class RemoveKeyAccessServerFromAttributeRequest extends Message { - /** - * @generated from field: policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1; - */ - attributeKeyAccessServer?: AttributeKeyAccessServer; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.attributes.RemoveKeyAccessServerFromAttributeRequest'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'attribute_key_access_server', kind: 'message', T: AttributeKeyAccessServer }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): RemoveKeyAccessServerFromAttributeRequest { - return new RemoveKeyAccessServerFromAttributeRequest().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): RemoveKeyAccessServerFromAttributeRequest { - return new RemoveKeyAccessServerFromAttributeRequest().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): RemoveKeyAccessServerFromAttributeRequest { - return new RemoveKeyAccessServerFromAttributeRequest().fromJsonString(jsonString, options); - } - - static equals( - a: - | RemoveKeyAccessServerFromAttributeRequest - | PlainMessage - | undefined, - b: - | RemoveKeyAccessServerFromAttributeRequest - | PlainMessage - | undefined - ): boolean { - return proto3.util.equals(RemoveKeyAccessServerFromAttributeRequest, a, b); - } -} - -/** - * @generated from message policy.attributes.RemoveKeyAccessServerFromAttributeResponse - */ -export class RemoveKeyAccessServerFromAttributeResponse extends Message { - /** - * @generated from field: policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1; - */ - attributeKeyAccessServer?: AttributeKeyAccessServer; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.attributes.RemoveKeyAccessServerFromAttributeResponse'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'attribute_key_access_server', kind: 'message', T: AttributeKeyAccessServer }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): RemoveKeyAccessServerFromAttributeResponse { - return new RemoveKeyAccessServerFromAttributeResponse().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): RemoveKeyAccessServerFromAttributeResponse { - return new RemoveKeyAccessServerFromAttributeResponse().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): RemoveKeyAccessServerFromAttributeResponse { - return new RemoveKeyAccessServerFromAttributeResponse().fromJsonString(jsonString, options); - } - - static equals( - a: - | RemoveKeyAccessServerFromAttributeResponse - | PlainMessage - | undefined, - b: - | RemoveKeyAccessServerFromAttributeResponse - | PlainMessage - | undefined - ): boolean { - return proto3.util.equals(RemoveKeyAccessServerFromAttributeResponse, a, b); - } -} - -/** - * @generated from message policy.attributes.AssignKeyAccessServerToValueRequest - */ -export class AssignKeyAccessServerToValueRequest extends Message { - /** - * @generated from field: policy.attributes.ValueKeyAccessServer value_key_access_server = 1; - */ - valueKeyAccessServer?: ValueKeyAccessServer; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.attributes.AssignKeyAccessServerToValueRequest'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'value_key_access_server', kind: 'message', T: ValueKeyAccessServer }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): AssignKeyAccessServerToValueRequest { - return new AssignKeyAccessServerToValueRequest().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): AssignKeyAccessServerToValueRequest { - return new AssignKeyAccessServerToValueRequest().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): AssignKeyAccessServerToValueRequest { - return new AssignKeyAccessServerToValueRequest().fromJsonString(jsonString, options); - } - - static equals( - a: - | AssignKeyAccessServerToValueRequest - | PlainMessage - | undefined, - b: - | AssignKeyAccessServerToValueRequest - | PlainMessage - | undefined - ): boolean { - return proto3.util.equals(AssignKeyAccessServerToValueRequest, a, b); - } -} - -/** - * @generated from message policy.attributes.AssignKeyAccessServerToValueResponse - */ -export class AssignKeyAccessServerToValueResponse extends Message { - /** - * @generated from field: policy.attributes.ValueKeyAccessServer value_key_access_server = 1; - */ - valueKeyAccessServer?: ValueKeyAccessServer; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.attributes.AssignKeyAccessServerToValueResponse'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'value_key_access_server', kind: 'message', T: ValueKeyAccessServer }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): AssignKeyAccessServerToValueResponse { - return new AssignKeyAccessServerToValueResponse().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): AssignKeyAccessServerToValueResponse { - return new AssignKeyAccessServerToValueResponse().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): AssignKeyAccessServerToValueResponse { - return new AssignKeyAccessServerToValueResponse().fromJsonString(jsonString, options); - } - - static equals( - a: - | AssignKeyAccessServerToValueResponse - | PlainMessage - | undefined, - b: - | AssignKeyAccessServerToValueResponse - | PlainMessage - | undefined - ): boolean { - return proto3.util.equals(AssignKeyAccessServerToValueResponse, a, b); - } -} - -/** - * @generated from message policy.attributes.RemoveKeyAccessServerFromValueRequest - */ -export class RemoveKeyAccessServerFromValueRequest extends Message { - /** - * @generated from field: policy.attributes.ValueKeyAccessServer value_key_access_server = 1; - */ - valueKeyAccessServer?: ValueKeyAccessServer; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.attributes.RemoveKeyAccessServerFromValueRequest'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'value_key_access_server', kind: 'message', T: ValueKeyAccessServer }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): RemoveKeyAccessServerFromValueRequest { - return new RemoveKeyAccessServerFromValueRequest().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): RemoveKeyAccessServerFromValueRequest { - return new RemoveKeyAccessServerFromValueRequest().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): RemoveKeyAccessServerFromValueRequest { - return new RemoveKeyAccessServerFromValueRequest().fromJsonString(jsonString, options); - } - - static equals( - a: - | RemoveKeyAccessServerFromValueRequest - | PlainMessage - | undefined, - b: - | RemoveKeyAccessServerFromValueRequest - | PlainMessage - | undefined - ): boolean { - return proto3.util.equals(RemoveKeyAccessServerFromValueRequest, a, b); - } -} - -/** - * @generated from message policy.attributes.RemoveKeyAccessServerFromValueResponse - */ -export class RemoveKeyAccessServerFromValueResponse extends Message { - /** - * @generated from field: policy.attributes.ValueKeyAccessServer value_key_access_server = 1; - */ - valueKeyAccessServer?: ValueKeyAccessServer; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.attributes.RemoveKeyAccessServerFromValueResponse'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'value_key_access_server', kind: 'message', T: ValueKeyAccessServer }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): RemoveKeyAccessServerFromValueResponse { - return new RemoveKeyAccessServerFromValueResponse().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): RemoveKeyAccessServerFromValueResponse { - return new RemoveKeyAccessServerFromValueResponse().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): RemoveKeyAccessServerFromValueResponse { - return new RemoveKeyAccessServerFromValueResponse().fromJsonString(jsonString, options); - } - - static equals( - a: - | RemoveKeyAccessServerFromValueResponse - | PlainMessage - | undefined, - b: - | RemoveKeyAccessServerFromValueResponse - | PlainMessage - | undefined - ): boolean { - return proto3.util.equals(RemoveKeyAccessServerFromValueResponse, a, b); - } -} diff --git a/lib/src/platform/policy/kasregistry/Key_access_server_registryServiceClientPb.ts b/lib/src/platform/policy/kasregistry/Key_access_server_registryServiceClientPb.ts deleted file mode 100644 index 7765db7f..00000000 --- a/lib/src/platform/policy/kasregistry/Key_access_server_registryServiceClientPb.ts +++ /dev/null @@ -1,290 +0,0 @@ -/** - * @fileoverview gRPC-Web generated client stub for policy.kasregistry - * @enhanceable - * @public - */ - -// Code generated by protoc-gen-grpc-web. DO NOT EDIT. -// versions: -// protoc-gen-grpc-web v1.5.0 -// protoc v0.0.0 -// source: policy/kasregistry/key_access_server_registry.proto - -/* eslint-disable */ -// @ts-nocheck - -import * as grpcWeb from 'grpc-web'; - -import * as policy_kasregistry_key_access_server_registry_pb from '../../policy/kasregistry/key_access_server_registry_pb'; // proto import: "policy/kasregistry/key_access_server_registry.proto" - -export class KeyAccessServerRegistryServiceClient { - client_: grpcWeb.AbstractClientBase; - hostname_: string; - credentials_: null | { [index: string]: string }; - options_: null | { [index: string]: any }; - - constructor( - hostname: string, - credentials?: null | { [index: string]: string }, - options?: null | { [index: string]: any } - ) { - if (!options) options = {}; - if (!credentials) credentials = {}; - options['format'] = 'binary'; - - this.client_ = new grpcWeb.GrpcWebClientBase(options); - this.hostname_ = hostname.replace(/\/+$/, ''); - this.credentials_ = credentials; - this.options_ = options; - } - - methodDescriptorListKeyAccessServers = new grpcWeb.MethodDescriptor( - '/policy.kasregistry.KeyAccessServerRegistryService/ListKeyAccessServers', - grpcWeb.MethodType.UNARY, - policy_kasregistry_key_access_server_registry_pb.ListKeyAccessServersRequest, - policy_kasregistry_key_access_server_registry_pb.ListKeyAccessServersResponse, - (request: policy_kasregistry_key_access_server_registry_pb.ListKeyAccessServersRequest) => { - return request.serializeBinary(); - }, - policy_kasregistry_key_access_server_registry_pb.ListKeyAccessServersResponse.deserializeBinary - ); - - listKeyAccessServers( - request: policy_kasregistry_key_access_server_registry_pb.ListKeyAccessServersRequest, - metadata?: grpcWeb.Metadata | null - ): Promise; - - listKeyAccessServers( - request: policy_kasregistry_key_access_server_registry_pb.ListKeyAccessServersRequest, - metadata: grpcWeb.Metadata | null, - callback: ( - err: grpcWeb.RpcError, - response: policy_kasregistry_key_access_server_registry_pb.ListKeyAccessServersResponse - ) => void - ): grpcWeb.ClientReadableStream; - - listKeyAccessServers( - request: policy_kasregistry_key_access_server_registry_pb.ListKeyAccessServersRequest, - metadata?: grpcWeb.Metadata | null, - callback?: ( - err: grpcWeb.RpcError, - response: policy_kasregistry_key_access_server_registry_pb.ListKeyAccessServersResponse - ) => void - ) { - if (callback !== undefined) { - return this.client_.rpcCall( - this.hostname_ + '/policy.kasregistry.KeyAccessServerRegistryService/ListKeyAccessServers', - request, - metadata || {}, - this.methodDescriptorListKeyAccessServers, - callback - ); - } - return this.client_.unaryCall( - this.hostname_ + '/policy.kasregistry.KeyAccessServerRegistryService/ListKeyAccessServers', - request, - metadata || {}, - this.methodDescriptorListKeyAccessServers - ); - } - - methodDescriptorGetKeyAccessServer = new grpcWeb.MethodDescriptor( - '/policy.kasregistry.KeyAccessServerRegistryService/GetKeyAccessServer', - grpcWeb.MethodType.UNARY, - policy_kasregistry_key_access_server_registry_pb.GetKeyAccessServerRequest, - policy_kasregistry_key_access_server_registry_pb.GetKeyAccessServerResponse, - (request: policy_kasregistry_key_access_server_registry_pb.GetKeyAccessServerRequest) => { - return request.serializeBinary(); - }, - policy_kasregistry_key_access_server_registry_pb.GetKeyAccessServerResponse.deserializeBinary - ); - - getKeyAccessServer( - request: policy_kasregistry_key_access_server_registry_pb.GetKeyAccessServerRequest, - metadata?: grpcWeb.Metadata | null - ): Promise; - - getKeyAccessServer( - request: policy_kasregistry_key_access_server_registry_pb.GetKeyAccessServerRequest, - metadata: grpcWeb.Metadata | null, - callback: ( - err: grpcWeb.RpcError, - response: policy_kasregistry_key_access_server_registry_pb.GetKeyAccessServerResponse - ) => void - ): grpcWeb.ClientReadableStream; - - getKeyAccessServer( - request: policy_kasregistry_key_access_server_registry_pb.GetKeyAccessServerRequest, - metadata?: grpcWeb.Metadata | null, - callback?: ( - err: grpcWeb.RpcError, - response: policy_kasregistry_key_access_server_registry_pb.GetKeyAccessServerResponse - ) => void - ) { - if (callback !== undefined) { - return this.client_.rpcCall( - this.hostname_ + '/policy.kasregistry.KeyAccessServerRegistryService/GetKeyAccessServer', - request, - metadata || {}, - this.methodDescriptorGetKeyAccessServer, - callback - ); - } - return this.client_.unaryCall( - this.hostname_ + '/policy.kasregistry.KeyAccessServerRegistryService/GetKeyAccessServer', - request, - metadata || {}, - this.methodDescriptorGetKeyAccessServer - ); - } - - methodDescriptorCreateKeyAccessServer = new grpcWeb.MethodDescriptor( - '/policy.kasregistry.KeyAccessServerRegistryService/CreateKeyAccessServer', - grpcWeb.MethodType.UNARY, - policy_kasregistry_key_access_server_registry_pb.CreateKeyAccessServerRequest, - policy_kasregistry_key_access_server_registry_pb.CreateKeyAccessServerResponse, - (request: policy_kasregistry_key_access_server_registry_pb.CreateKeyAccessServerRequest) => { - return request.serializeBinary(); - }, - policy_kasregistry_key_access_server_registry_pb.CreateKeyAccessServerResponse.deserializeBinary - ); - - createKeyAccessServer( - request: policy_kasregistry_key_access_server_registry_pb.CreateKeyAccessServerRequest, - metadata?: grpcWeb.Metadata | null - ): Promise; - - createKeyAccessServer( - request: policy_kasregistry_key_access_server_registry_pb.CreateKeyAccessServerRequest, - metadata: grpcWeb.Metadata | null, - callback: ( - err: grpcWeb.RpcError, - response: policy_kasregistry_key_access_server_registry_pb.CreateKeyAccessServerResponse - ) => void - ): grpcWeb.ClientReadableStream; - - createKeyAccessServer( - request: policy_kasregistry_key_access_server_registry_pb.CreateKeyAccessServerRequest, - metadata?: grpcWeb.Metadata | null, - callback?: ( - err: grpcWeb.RpcError, - response: policy_kasregistry_key_access_server_registry_pb.CreateKeyAccessServerResponse - ) => void - ) { - if (callback !== undefined) { - return this.client_.rpcCall( - this.hostname_ + '/policy.kasregistry.KeyAccessServerRegistryService/CreateKeyAccessServer', - request, - metadata || {}, - this.methodDescriptorCreateKeyAccessServer, - callback - ); - } - return this.client_.unaryCall( - this.hostname_ + '/policy.kasregistry.KeyAccessServerRegistryService/CreateKeyAccessServer', - request, - metadata || {}, - this.methodDescriptorCreateKeyAccessServer - ); - } - - methodDescriptorUpdateKeyAccessServer = new grpcWeb.MethodDescriptor( - '/policy.kasregistry.KeyAccessServerRegistryService/UpdateKeyAccessServer', - grpcWeb.MethodType.UNARY, - policy_kasregistry_key_access_server_registry_pb.UpdateKeyAccessServerRequest, - policy_kasregistry_key_access_server_registry_pb.UpdateKeyAccessServerResponse, - (request: policy_kasregistry_key_access_server_registry_pb.UpdateKeyAccessServerRequest) => { - return request.serializeBinary(); - }, - policy_kasregistry_key_access_server_registry_pb.UpdateKeyAccessServerResponse.deserializeBinary - ); - - updateKeyAccessServer( - request: policy_kasregistry_key_access_server_registry_pb.UpdateKeyAccessServerRequest, - metadata?: grpcWeb.Metadata | null - ): Promise; - - updateKeyAccessServer( - request: policy_kasregistry_key_access_server_registry_pb.UpdateKeyAccessServerRequest, - metadata: grpcWeb.Metadata | null, - callback: ( - err: grpcWeb.RpcError, - response: policy_kasregistry_key_access_server_registry_pb.UpdateKeyAccessServerResponse - ) => void - ): grpcWeb.ClientReadableStream; - - updateKeyAccessServer( - request: policy_kasregistry_key_access_server_registry_pb.UpdateKeyAccessServerRequest, - metadata?: grpcWeb.Metadata | null, - callback?: ( - err: grpcWeb.RpcError, - response: policy_kasregistry_key_access_server_registry_pb.UpdateKeyAccessServerResponse - ) => void - ) { - if (callback !== undefined) { - return this.client_.rpcCall( - this.hostname_ + '/policy.kasregistry.KeyAccessServerRegistryService/UpdateKeyAccessServer', - request, - metadata || {}, - this.methodDescriptorUpdateKeyAccessServer, - callback - ); - } - return this.client_.unaryCall( - this.hostname_ + '/policy.kasregistry.KeyAccessServerRegistryService/UpdateKeyAccessServer', - request, - metadata || {}, - this.methodDescriptorUpdateKeyAccessServer - ); - } - - methodDescriptorDeleteKeyAccessServer = new grpcWeb.MethodDescriptor( - '/policy.kasregistry.KeyAccessServerRegistryService/DeleteKeyAccessServer', - grpcWeb.MethodType.UNARY, - policy_kasregistry_key_access_server_registry_pb.DeleteKeyAccessServerRequest, - policy_kasregistry_key_access_server_registry_pb.DeleteKeyAccessServerResponse, - (request: policy_kasregistry_key_access_server_registry_pb.DeleteKeyAccessServerRequest) => { - return request.serializeBinary(); - }, - policy_kasregistry_key_access_server_registry_pb.DeleteKeyAccessServerResponse.deserializeBinary - ); - - deleteKeyAccessServer( - request: policy_kasregistry_key_access_server_registry_pb.DeleteKeyAccessServerRequest, - metadata?: grpcWeb.Metadata | null - ): Promise; - - deleteKeyAccessServer( - request: policy_kasregistry_key_access_server_registry_pb.DeleteKeyAccessServerRequest, - metadata: grpcWeb.Metadata | null, - callback: ( - err: grpcWeb.RpcError, - response: policy_kasregistry_key_access_server_registry_pb.DeleteKeyAccessServerResponse - ) => void - ): grpcWeb.ClientReadableStream; - - deleteKeyAccessServer( - request: policy_kasregistry_key_access_server_registry_pb.DeleteKeyAccessServerRequest, - metadata?: grpcWeb.Metadata | null, - callback?: ( - err: grpcWeb.RpcError, - response: policy_kasregistry_key_access_server_registry_pb.DeleteKeyAccessServerResponse - ) => void - ) { - if (callback !== undefined) { - return this.client_.rpcCall( - this.hostname_ + '/policy.kasregistry.KeyAccessServerRegistryService/DeleteKeyAccessServer', - request, - metadata || {}, - this.methodDescriptorDeleteKeyAccessServer, - callback - ); - } - return this.client_.unaryCall( - this.hostname_ + '/policy.kasregistry.KeyAccessServerRegistryService/DeleteKeyAccessServer', - request, - metadata || {}, - this.methodDescriptorDeleteKeyAccessServer - ); - } -} diff --git a/lib/src/platform/policy/kasregistry/key_access_server_registry_connect.ts b/lib/src/platform/policy/kasregistry/key_access_server_registry_connect.ts deleted file mode 100644 index c148e03a..00000000 --- a/lib/src/platform/policy/kasregistry/key_access_server_registry_connect.ts +++ /dev/null @@ -1,72 +0,0 @@ -// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=ts" -// @generated from file policy/kasregistry/key_access_server_registry.proto (package policy.kasregistry, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { - CreateKeyAccessServerRequest, - CreateKeyAccessServerResponse, - DeleteKeyAccessServerRequest, - DeleteKeyAccessServerResponse, - GetKeyAccessServerRequest, - GetKeyAccessServerResponse, - ListKeyAccessServersRequest, - ListKeyAccessServersResponse, - UpdateKeyAccessServerRequest, - UpdateKeyAccessServerResponse, -} from './key_access_server_registry_pb.js'; -import { MethodKind } from '@bufbuild/protobuf'; - -/** - * @generated from service policy.kasregistry.KeyAccessServerRegistryService - */ -export const KeyAccessServerRegistryService = { - typeName: 'policy.kasregistry.KeyAccessServerRegistryService', - methods: { - /** - * @generated from rpc policy.kasregistry.KeyAccessServerRegistryService.ListKeyAccessServers - */ - listKeyAccessServers: { - name: 'ListKeyAccessServers', - I: ListKeyAccessServersRequest, - O: ListKeyAccessServersResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.kasregistry.KeyAccessServerRegistryService.GetKeyAccessServer - */ - getKeyAccessServer: { - name: 'GetKeyAccessServer', - I: GetKeyAccessServerRequest, - O: GetKeyAccessServerResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.kasregistry.KeyAccessServerRegistryService.CreateKeyAccessServer - */ - createKeyAccessServer: { - name: 'CreateKeyAccessServer', - I: CreateKeyAccessServerRequest, - O: CreateKeyAccessServerResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.kasregistry.KeyAccessServerRegistryService.UpdateKeyAccessServer - */ - updateKeyAccessServer: { - name: 'UpdateKeyAccessServer', - I: UpdateKeyAccessServerRequest, - O: UpdateKeyAccessServerResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.kasregistry.KeyAccessServerRegistryService.DeleteKeyAccessServer - */ - deleteKeyAccessServer: { - name: 'DeleteKeyAccessServer', - I: DeleteKeyAccessServerRequest, - O: DeleteKeyAccessServerResponse, - kind: MethodKind.Unary, - }, - }, -} as const; diff --git a/lib/src/platform/policy/kasregistry/key_access_server_registry_pb.d.ts b/lib/src/platform/policy/kasregistry/key_access_server_registry_pb.d.ts index 3f3918ce..300f59c5 100644 --- a/lib/src/platform/policy/kasregistry/key_access_server_registry_pb.d.ts +++ b/lib/src/platform/policy/kasregistry/key_access_server_registry_pb.d.ts @@ -1,320 +1,283 @@ -import * as jspb from 'google-protobuf'; - -import * as buf_validate_validate_pb from '../../buf/validate/validate_pb'; // proto import: "buf/validate/validate.proto" -import * as common_common_pb from '../../common/common_pb'; // proto import: "common/common.proto" -import * as google_api_annotations_pb from '../../google/api/annotations_pb'; // proto import: "google/api/annotations.proto" -import * as policy_objects_pb from '../../policy/objects_pb'; // proto import: "policy/objects.proto" - -export class GetKeyAccessServerRequest extends jspb.Message { - getId(): string; - setId(value: string): GetKeyAccessServerRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetKeyAccessServerRequest.AsObject; - static toObject( - includeInstance: boolean, - msg: GetKeyAccessServerRequest - ): GetKeyAccessServerRequest.AsObject; - static serializeBinaryToWriter( - message: GetKeyAccessServerRequest, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): GetKeyAccessServerRequest; - static deserializeBinaryFromReader( - message: GetKeyAccessServerRequest, - reader: jspb.BinaryReader - ): GetKeyAccessServerRequest; -} +// @generated by protoc-gen-es v1.9.0 with parameter "target=js+dts,import_extension=none" +// @generated from file policy/kasregistry/key_access_server_registry.proto (package policy.kasregistry, syntax proto3) +/* eslint-disable */ +// @ts-nocheck -export namespace GetKeyAccessServerRequest { - export type AsObject = { - id: string; - }; -} +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; +import type { KeyAccessServer, PublicKey } from "../objects_pb"; +import type { MetadataMutable, MetadataUpdateEnum } from "../../common/common_pb"; -export class GetKeyAccessServerResponse extends jspb.Message { - getKeyAccessServer(): policy_objects_pb.KeyAccessServer | undefined; - setKeyAccessServer(value?: policy_objects_pb.KeyAccessServer): GetKeyAccessServerResponse; - hasKeyAccessServer(): boolean; - clearKeyAccessServer(): GetKeyAccessServerResponse; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetKeyAccessServerResponse.AsObject; - static toObject( - includeInstance: boolean, - msg: GetKeyAccessServerResponse - ): GetKeyAccessServerResponse.AsObject; - static serializeBinaryToWriter( - message: GetKeyAccessServerResponse, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): GetKeyAccessServerResponse; - static deserializeBinaryFromReader( - message: GetKeyAccessServerResponse, - reader: jspb.BinaryReader - ): GetKeyAccessServerResponse; -} +/** + * @generated from message policy.kasregistry.GetKeyAccessServerRequest + */ +export declare class GetKeyAccessServerRequest extends Message { + /** + * @generated from field: string id = 1; + */ + id: string; -export namespace GetKeyAccessServerResponse { - export type AsObject = { - keyAccessServer?: policy_objects_pb.KeyAccessServer.AsObject; - }; -} + constructor(data?: PartialMessage); -export class ListKeyAccessServersRequest extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListKeyAccessServersRequest.AsObject; - static toObject( - includeInstance: boolean, - msg: ListKeyAccessServersRequest - ): ListKeyAccessServersRequest.AsObject; - static serializeBinaryToWriter( - message: ListKeyAccessServersRequest, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): ListKeyAccessServersRequest; - static deserializeBinaryFromReader( - message: ListKeyAccessServersRequest, - reader: jspb.BinaryReader - ): ListKeyAccessServersRequest; -} + static readonly runtime: typeof proto3; + static readonly typeName = "policy.kasregistry.GetKeyAccessServerRequest"; + static readonly fields: FieldList; -export namespace ListKeyAccessServersRequest { - export type AsObject = {}; -} + static fromBinary(bytes: Uint8Array, options?: Partial): GetKeyAccessServerRequest; -export class ListKeyAccessServersResponse extends jspb.Message { - getKeyAccessServersList(): Array; - setKeyAccessServersList( - value: Array - ): ListKeyAccessServersResponse; - clearKeyAccessServersList(): ListKeyAccessServersResponse; - addKeyAccessServers( - value?: policy_objects_pb.KeyAccessServer, - index?: number - ): policy_objects_pb.KeyAccessServer; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListKeyAccessServersResponse.AsObject; - static toObject( - includeInstance: boolean, - msg: ListKeyAccessServersResponse - ): ListKeyAccessServersResponse.AsObject; - static serializeBinaryToWriter( - message: ListKeyAccessServersResponse, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): ListKeyAccessServersResponse; - static deserializeBinaryFromReader( - message: ListKeyAccessServersResponse, - reader: jspb.BinaryReader - ): ListKeyAccessServersResponse; -} + static fromJson(jsonValue: JsonValue, options?: Partial): GetKeyAccessServerRequest; -export namespace ListKeyAccessServersResponse { - export type AsObject = { - keyAccessServersList: Array; - }; -} + static fromJsonString(jsonString: string, options?: Partial): GetKeyAccessServerRequest; -export class CreateKeyAccessServerRequest extends jspb.Message { - getUri(): string; - setUri(value: string): CreateKeyAccessServerRequest; - - getPublicKey(): policy_objects_pb.PublicKey | undefined; - setPublicKey(value?: policy_objects_pb.PublicKey): CreateKeyAccessServerRequest; - hasPublicKey(): boolean; - clearPublicKey(): CreateKeyAccessServerRequest; - - getMetadata(): common_common_pb.MetadataMutable | undefined; - setMetadata(value?: common_common_pb.MetadataMutable): CreateKeyAccessServerRequest; - hasMetadata(): boolean; - clearMetadata(): CreateKeyAccessServerRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateKeyAccessServerRequest.AsObject; - static toObject( - includeInstance: boolean, - msg: CreateKeyAccessServerRequest - ): CreateKeyAccessServerRequest.AsObject; - static serializeBinaryToWriter( - message: CreateKeyAccessServerRequest, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): CreateKeyAccessServerRequest; - static deserializeBinaryFromReader( - message: CreateKeyAccessServerRequest, - reader: jspb.BinaryReader - ): CreateKeyAccessServerRequest; + static equals(a: GetKeyAccessServerRequest | PlainMessage | undefined, b: GetKeyAccessServerRequest | PlainMessage | undefined): boolean; } -export namespace CreateKeyAccessServerRequest { - export type AsObject = { - uri: string; - publicKey?: policy_objects_pb.PublicKey.AsObject; - metadata?: common_common_pb.MetadataMutable.AsObject; - }; -} +/** + * @generated from message policy.kasregistry.GetKeyAccessServerResponse + */ +export declare class GetKeyAccessServerResponse extends Message { + /** + * @generated from field: policy.KeyAccessServer key_access_server = 1; + */ + keyAccessServer?: KeyAccessServer; -export class CreateKeyAccessServerResponse extends jspb.Message { - getKeyAccessServer(): policy_objects_pb.KeyAccessServer | undefined; - setKeyAccessServer(value?: policy_objects_pb.KeyAccessServer): CreateKeyAccessServerResponse; - hasKeyAccessServer(): boolean; - clearKeyAccessServer(): CreateKeyAccessServerResponse; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateKeyAccessServerResponse.AsObject; - static toObject( - includeInstance: boolean, - msg: CreateKeyAccessServerResponse - ): CreateKeyAccessServerResponse.AsObject; - static serializeBinaryToWriter( - message: CreateKeyAccessServerResponse, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): CreateKeyAccessServerResponse; - static deserializeBinaryFromReader( - message: CreateKeyAccessServerResponse, - reader: jspb.BinaryReader - ): CreateKeyAccessServerResponse; -} + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.kasregistry.GetKeyAccessServerResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): GetKeyAccessServerResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): GetKeyAccessServerResponse; -export namespace CreateKeyAccessServerResponse { - export type AsObject = { - keyAccessServer?: policy_objects_pb.KeyAccessServer.AsObject; - }; + static fromJsonString(jsonString: string, options?: Partial): GetKeyAccessServerResponse; + + static equals(a: GetKeyAccessServerResponse | PlainMessage | undefined, b: GetKeyAccessServerResponse | PlainMessage | undefined): boolean; } -export class UpdateKeyAccessServerRequest extends jspb.Message { - getId(): string; - setId(value: string): UpdateKeyAccessServerRequest; - - getUri(): string; - setUri(value: string): UpdateKeyAccessServerRequest; - - getPublicKey(): policy_objects_pb.PublicKey | undefined; - setPublicKey(value?: policy_objects_pb.PublicKey): UpdateKeyAccessServerRequest; - hasPublicKey(): boolean; - clearPublicKey(): UpdateKeyAccessServerRequest; - - getMetadata(): common_common_pb.MetadataMutable | undefined; - setMetadata(value?: common_common_pb.MetadataMutable): UpdateKeyAccessServerRequest; - hasMetadata(): boolean; - clearMetadata(): UpdateKeyAccessServerRequest; - - getMetadataUpdateBehavior(): common_common_pb.MetadataUpdateEnum; - setMetadataUpdateBehavior( - value: common_common_pb.MetadataUpdateEnum - ): UpdateKeyAccessServerRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UpdateKeyAccessServerRequest.AsObject; - static toObject( - includeInstance: boolean, - msg: UpdateKeyAccessServerRequest - ): UpdateKeyAccessServerRequest.AsObject; - static serializeBinaryToWriter( - message: UpdateKeyAccessServerRequest, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): UpdateKeyAccessServerRequest; - static deserializeBinaryFromReader( - message: UpdateKeyAccessServerRequest, - reader: jspb.BinaryReader - ): UpdateKeyAccessServerRequest; +/** + * @generated from message policy.kasregistry.ListKeyAccessServersRequest + */ +export declare class ListKeyAccessServersRequest extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.kasregistry.ListKeyAccessServersRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ListKeyAccessServersRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): ListKeyAccessServersRequest; + + static fromJsonString(jsonString: string, options?: Partial): ListKeyAccessServersRequest; + + static equals(a: ListKeyAccessServersRequest | PlainMessage | undefined, b: ListKeyAccessServersRequest | PlainMessage | undefined): boolean; } -export namespace UpdateKeyAccessServerRequest { - export type AsObject = { - id: string; - uri: string; - publicKey?: policy_objects_pb.PublicKey.AsObject; - metadata?: common_common_pb.MetadataMutable.AsObject; - metadataUpdateBehavior: common_common_pb.MetadataUpdateEnum; - }; +/** + * @generated from message policy.kasregistry.ListKeyAccessServersResponse + */ +export declare class ListKeyAccessServersResponse extends Message { + /** + * @generated from field: repeated policy.KeyAccessServer key_access_servers = 1; + */ + keyAccessServers: KeyAccessServer[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.kasregistry.ListKeyAccessServersResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ListKeyAccessServersResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): ListKeyAccessServersResponse; + + static fromJsonString(jsonString: string, options?: Partial): ListKeyAccessServersResponse; + + static equals(a: ListKeyAccessServersResponse | PlainMessage | undefined, b: ListKeyAccessServersResponse | PlainMessage | undefined): boolean; } -export class UpdateKeyAccessServerResponse extends jspb.Message { - getKeyAccessServer(): policy_objects_pb.KeyAccessServer | undefined; - setKeyAccessServer(value?: policy_objects_pb.KeyAccessServer): UpdateKeyAccessServerResponse; - hasKeyAccessServer(): boolean; - clearKeyAccessServer(): UpdateKeyAccessServerResponse; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UpdateKeyAccessServerResponse.AsObject; - static toObject( - includeInstance: boolean, - msg: UpdateKeyAccessServerResponse - ): UpdateKeyAccessServerResponse.AsObject; - static serializeBinaryToWriter( - message: UpdateKeyAccessServerResponse, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): UpdateKeyAccessServerResponse; - static deserializeBinaryFromReader( - message: UpdateKeyAccessServerResponse, - reader: jspb.BinaryReader - ): UpdateKeyAccessServerResponse; +/** + * @generated from message policy.kasregistry.CreateKeyAccessServerRequest + */ +export declare class CreateKeyAccessServerRequest extends Message { + /** + * Required + * + * @generated from field: string uri = 1; + */ + uri: string; + + /** + * @generated from field: policy.PublicKey public_key = 2; + */ + publicKey?: PublicKey; + + /** + * Common metadata + * + * @generated from field: common.MetadataMutable metadata = 100; + */ + metadata?: MetadataMutable; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.kasregistry.CreateKeyAccessServerRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): CreateKeyAccessServerRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): CreateKeyAccessServerRequest; + + static fromJsonString(jsonString: string, options?: Partial): CreateKeyAccessServerRequest; + + static equals(a: CreateKeyAccessServerRequest | PlainMessage | undefined, b: CreateKeyAccessServerRequest | PlainMessage | undefined): boolean; } -export namespace UpdateKeyAccessServerResponse { - export type AsObject = { - keyAccessServer?: policy_objects_pb.KeyAccessServer.AsObject; - }; +/** + * @generated from message policy.kasregistry.CreateKeyAccessServerResponse + */ +export declare class CreateKeyAccessServerResponse extends Message { + /** + * @generated from field: policy.KeyAccessServer key_access_server = 1; + */ + keyAccessServer?: KeyAccessServer; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.kasregistry.CreateKeyAccessServerResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): CreateKeyAccessServerResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): CreateKeyAccessServerResponse; + + static fromJsonString(jsonString: string, options?: Partial): CreateKeyAccessServerResponse; + + static equals(a: CreateKeyAccessServerResponse | PlainMessage | undefined, b: CreateKeyAccessServerResponse | PlainMessage | undefined): boolean; } -export class DeleteKeyAccessServerRequest extends jspb.Message { - getId(): string; - setId(value: string): DeleteKeyAccessServerRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DeleteKeyAccessServerRequest.AsObject; - static toObject( - includeInstance: boolean, - msg: DeleteKeyAccessServerRequest - ): DeleteKeyAccessServerRequest.AsObject; - static serializeBinaryToWriter( - message: DeleteKeyAccessServerRequest, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): DeleteKeyAccessServerRequest; - static deserializeBinaryFromReader( - message: DeleteKeyAccessServerRequest, - reader: jspb.BinaryReader - ): DeleteKeyAccessServerRequest; +/** + * @generated from message policy.kasregistry.UpdateKeyAccessServerRequest + */ +export declare class UpdateKeyAccessServerRequest extends Message { + /** + * Required + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * @generated from field: string uri = 2; + */ + uri: string; + + /** + * @generated from field: policy.PublicKey public_key = 3; + */ + publicKey?: PublicKey; + + /** + * Common metadata + * + * @generated from field: common.MetadataMutable metadata = 100; + */ + metadata?: MetadataMutable; + + /** + * @generated from field: common.MetadataUpdateEnum metadata_update_behavior = 101; + */ + metadataUpdateBehavior: MetadataUpdateEnum; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.kasregistry.UpdateKeyAccessServerRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): UpdateKeyAccessServerRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): UpdateKeyAccessServerRequest; + + static fromJsonString(jsonString: string, options?: Partial): UpdateKeyAccessServerRequest; + + static equals(a: UpdateKeyAccessServerRequest | PlainMessage | undefined, b: UpdateKeyAccessServerRequest | PlainMessage | undefined): boolean; } -export namespace DeleteKeyAccessServerRequest { - export type AsObject = { - id: string; - }; +/** + * @generated from message policy.kasregistry.UpdateKeyAccessServerResponse + */ +export declare class UpdateKeyAccessServerResponse extends Message { + /** + * @generated from field: policy.KeyAccessServer key_access_server = 1; + */ + keyAccessServer?: KeyAccessServer; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.kasregistry.UpdateKeyAccessServerResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): UpdateKeyAccessServerResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): UpdateKeyAccessServerResponse; + + static fromJsonString(jsonString: string, options?: Partial): UpdateKeyAccessServerResponse; + + static equals(a: UpdateKeyAccessServerResponse | PlainMessage | undefined, b: UpdateKeyAccessServerResponse | PlainMessage | undefined): boolean; } -export class DeleteKeyAccessServerResponse extends jspb.Message { - getKeyAccessServer(): policy_objects_pb.KeyAccessServer | undefined; - setKeyAccessServer(value?: policy_objects_pb.KeyAccessServer): DeleteKeyAccessServerResponse; - hasKeyAccessServer(): boolean; - clearKeyAccessServer(): DeleteKeyAccessServerResponse; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DeleteKeyAccessServerResponse.AsObject; - static toObject( - includeInstance: boolean, - msg: DeleteKeyAccessServerResponse - ): DeleteKeyAccessServerResponse.AsObject; - static serializeBinaryToWriter( - message: DeleteKeyAccessServerResponse, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): DeleteKeyAccessServerResponse; - static deserializeBinaryFromReader( - message: DeleteKeyAccessServerResponse, - reader: jspb.BinaryReader - ): DeleteKeyAccessServerResponse; +/** + * @generated from message policy.kasregistry.DeleteKeyAccessServerRequest + */ +export declare class DeleteKeyAccessServerRequest extends Message { + /** + * @generated from field: string id = 1; + */ + id: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.kasregistry.DeleteKeyAccessServerRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): DeleteKeyAccessServerRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): DeleteKeyAccessServerRequest; + + static fromJsonString(jsonString: string, options?: Partial): DeleteKeyAccessServerRequest; + + static equals(a: DeleteKeyAccessServerRequest | PlainMessage | undefined, b: DeleteKeyAccessServerRequest | PlainMessage | undefined): boolean; } -export namespace DeleteKeyAccessServerResponse { - export type AsObject = { - keyAccessServer?: policy_objects_pb.KeyAccessServer.AsObject; - }; +/** + * @generated from message policy.kasregistry.DeleteKeyAccessServerResponse + */ +export declare class DeleteKeyAccessServerResponse extends Message { + /** + * @generated from field: policy.KeyAccessServer key_access_server = 1; + */ + keyAccessServer?: KeyAccessServer; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.kasregistry.DeleteKeyAccessServerResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): DeleteKeyAccessServerResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): DeleteKeyAccessServerResponse; + + static fromJsonString(jsonString: string, options?: Partial): DeleteKeyAccessServerResponse; + + static equals(a: DeleteKeyAccessServerResponse | PlainMessage | undefined, b: DeleteKeyAccessServerResponse | PlainMessage | undefined): boolean; } + diff --git a/lib/src/platform/policy/kasregistry/key_access_server_registry_pb.ts b/lib/src/platform/policy/kasregistry/key_access_server_registry_pb.ts deleted file mode 100644 index 99817fca..00000000 --- a/lib/src/platform/policy/kasregistry/key_access_server_registry_pb.ts +++ /dev/null @@ -1,548 +0,0 @@ -// @generated by protoc-gen-es v1.9.0 with parameter "target=ts" -// @generated from file policy/kasregistry/key_access_server_registry.proto (package policy.kasregistry, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import type { - BinaryReadOptions, - FieldList, - JsonReadOptions, - JsonValue, - PartialMessage, - PlainMessage, -} from '@bufbuild/protobuf'; -import { Message, proto3 } from '@bufbuild/protobuf'; -import { KeyAccessServer, PublicKey } from '../objects_pb.js'; -import { MetadataMutable, MetadataUpdateEnum } from '../../common/common_pb.js'; - -/** - * @generated from message policy.kasregistry.GetKeyAccessServerRequest - */ -export class GetKeyAccessServerRequest extends Message { - /** - * @generated from field: string id = 1; - */ - id = ''; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.kasregistry.GetKeyAccessServerRequest'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): GetKeyAccessServerRequest { - return new GetKeyAccessServerRequest().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): GetKeyAccessServerRequest { - return new GetKeyAccessServerRequest().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): GetKeyAccessServerRequest { - return new GetKeyAccessServerRequest().fromJsonString(jsonString, options); - } - - static equals( - a: GetKeyAccessServerRequest | PlainMessage | undefined, - b: GetKeyAccessServerRequest | PlainMessage | undefined - ): boolean { - return proto3.util.equals(GetKeyAccessServerRequest, a, b); - } -} - -/** - * @generated from message policy.kasregistry.GetKeyAccessServerResponse - */ -export class GetKeyAccessServerResponse extends Message { - /** - * @generated from field: policy.KeyAccessServer key_access_server = 1; - */ - keyAccessServer?: KeyAccessServer; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.kasregistry.GetKeyAccessServerResponse'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'key_access_server', kind: 'message', T: KeyAccessServer }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): GetKeyAccessServerResponse { - return new GetKeyAccessServerResponse().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): GetKeyAccessServerResponse { - return new GetKeyAccessServerResponse().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): GetKeyAccessServerResponse { - return new GetKeyAccessServerResponse().fromJsonString(jsonString, options); - } - - static equals( - a: GetKeyAccessServerResponse | PlainMessage | undefined, - b: GetKeyAccessServerResponse | PlainMessage | undefined - ): boolean { - return proto3.util.equals(GetKeyAccessServerResponse, a, b); - } -} - -/** - * @generated from message policy.kasregistry.ListKeyAccessServersRequest - */ -export class ListKeyAccessServersRequest extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.kasregistry.ListKeyAccessServersRequest'; - static readonly fields: FieldList = proto3.util.newFieldList(() => []); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): ListKeyAccessServersRequest { - return new ListKeyAccessServersRequest().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): ListKeyAccessServersRequest { - return new ListKeyAccessServersRequest().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): ListKeyAccessServersRequest { - return new ListKeyAccessServersRequest().fromJsonString(jsonString, options); - } - - static equals( - a: ListKeyAccessServersRequest | PlainMessage | undefined, - b: ListKeyAccessServersRequest | PlainMessage | undefined - ): boolean { - return proto3.util.equals(ListKeyAccessServersRequest, a, b); - } -} - -/** - * @generated from message policy.kasregistry.ListKeyAccessServersResponse - */ -export class ListKeyAccessServersResponse extends Message { - /** - * @generated from field: repeated policy.KeyAccessServer key_access_servers = 1; - */ - keyAccessServers: KeyAccessServer[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.kasregistry.ListKeyAccessServersResponse'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'key_access_servers', kind: 'message', T: KeyAccessServer, repeated: true }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): ListKeyAccessServersResponse { - return new ListKeyAccessServersResponse().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): ListKeyAccessServersResponse { - return new ListKeyAccessServersResponse().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): ListKeyAccessServersResponse { - return new ListKeyAccessServersResponse().fromJsonString(jsonString, options); - } - - static equals( - a: ListKeyAccessServersResponse | PlainMessage | undefined, - b: ListKeyAccessServersResponse | PlainMessage | undefined - ): boolean { - return proto3.util.equals(ListKeyAccessServersResponse, a, b); - } -} - -/** - * @generated from message policy.kasregistry.CreateKeyAccessServerRequest - */ -export class CreateKeyAccessServerRequest extends Message { - /** - * Required - * - * @generated from field: string uri = 1; - */ - uri = ''; - - /** - * @generated from field: policy.PublicKey public_key = 2; - */ - publicKey?: PublicKey; - - /** - * Common metadata - * - * @generated from field: common.MetadataMutable metadata = 100; - */ - metadata?: MetadataMutable; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.kasregistry.CreateKeyAccessServerRequest'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'uri', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { no: 2, name: 'public_key', kind: 'message', T: PublicKey }, - { no: 100, name: 'metadata', kind: 'message', T: MetadataMutable }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): CreateKeyAccessServerRequest { - return new CreateKeyAccessServerRequest().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): CreateKeyAccessServerRequest { - return new CreateKeyAccessServerRequest().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): CreateKeyAccessServerRequest { - return new CreateKeyAccessServerRequest().fromJsonString(jsonString, options); - } - - static equals( - a: CreateKeyAccessServerRequest | PlainMessage | undefined, - b: CreateKeyAccessServerRequest | PlainMessage | undefined - ): boolean { - return proto3.util.equals(CreateKeyAccessServerRequest, a, b); - } -} - -/** - * @generated from message policy.kasregistry.CreateKeyAccessServerResponse - */ -export class CreateKeyAccessServerResponse extends Message { - /** - * @generated from field: policy.KeyAccessServer key_access_server = 1; - */ - keyAccessServer?: KeyAccessServer; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.kasregistry.CreateKeyAccessServerResponse'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'key_access_server', kind: 'message', T: KeyAccessServer }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): CreateKeyAccessServerResponse { - return new CreateKeyAccessServerResponse().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): CreateKeyAccessServerResponse { - return new CreateKeyAccessServerResponse().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): CreateKeyAccessServerResponse { - return new CreateKeyAccessServerResponse().fromJsonString(jsonString, options); - } - - static equals( - a: CreateKeyAccessServerResponse | PlainMessage | undefined, - b: CreateKeyAccessServerResponse | PlainMessage | undefined - ): boolean { - return proto3.util.equals(CreateKeyAccessServerResponse, a, b); - } -} - -/** - * @generated from message policy.kasregistry.UpdateKeyAccessServerRequest - */ -export class UpdateKeyAccessServerRequest extends Message { - /** - * Required - * - * @generated from field: string id = 1; - */ - id = ''; - - /** - * @generated from field: string uri = 2; - */ - uri = ''; - - /** - * @generated from field: policy.PublicKey public_key = 3; - */ - publicKey?: PublicKey; - - /** - * Common metadata - * - * @generated from field: common.MetadataMutable metadata = 100; - */ - metadata?: MetadataMutable; - - /** - * @generated from field: common.MetadataUpdateEnum metadata_update_behavior = 101; - */ - metadataUpdateBehavior = MetadataUpdateEnum.UNSPECIFIED; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.kasregistry.UpdateKeyAccessServerRequest'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { no: 2, name: 'uri', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { no: 3, name: 'public_key', kind: 'message', T: PublicKey }, - { no: 100, name: 'metadata', kind: 'message', T: MetadataMutable }, - { - no: 101, - name: 'metadata_update_behavior', - kind: 'enum', - T: proto3.getEnumType(MetadataUpdateEnum), - }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): UpdateKeyAccessServerRequest { - return new UpdateKeyAccessServerRequest().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): UpdateKeyAccessServerRequest { - return new UpdateKeyAccessServerRequest().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): UpdateKeyAccessServerRequest { - return new UpdateKeyAccessServerRequest().fromJsonString(jsonString, options); - } - - static equals( - a: UpdateKeyAccessServerRequest | PlainMessage | undefined, - b: UpdateKeyAccessServerRequest | PlainMessage | undefined - ): boolean { - return proto3.util.equals(UpdateKeyAccessServerRequest, a, b); - } -} - -/** - * @generated from message policy.kasregistry.UpdateKeyAccessServerResponse - */ -export class UpdateKeyAccessServerResponse extends Message { - /** - * @generated from field: policy.KeyAccessServer key_access_server = 1; - */ - keyAccessServer?: KeyAccessServer; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.kasregistry.UpdateKeyAccessServerResponse'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'key_access_server', kind: 'message', T: KeyAccessServer }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): UpdateKeyAccessServerResponse { - return new UpdateKeyAccessServerResponse().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): UpdateKeyAccessServerResponse { - return new UpdateKeyAccessServerResponse().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): UpdateKeyAccessServerResponse { - return new UpdateKeyAccessServerResponse().fromJsonString(jsonString, options); - } - - static equals( - a: UpdateKeyAccessServerResponse | PlainMessage | undefined, - b: UpdateKeyAccessServerResponse | PlainMessage | undefined - ): boolean { - return proto3.util.equals(UpdateKeyAccessServerResponse, a, b); - } -} - -/** - * @generated from message policy.kasregistry.DeleteKeyAccessServerRequest - */ -export class DeleteKeyAccessServerRequest extends Message { - /** - * @generated from field: string id = 1; - */ - id = ''; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.kasregistry.DeleteKeyAccessServerRequest'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): DeleteKeyAccessServerRequest { - return new DeleteKeyAccessServerRequest().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): DeleteKeyAccessServerRequest { - return new DeleteKeyAccessServerRequest().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): DeleteKeyAccessServerRequest { - return new DeleteKeyAccessServerRequest().fromJsonString(jsonString, options); - } - - static equals( - a: DeleteKeyAccessServerRequest | PlainMessage | undefined, - b: DeleteKeyAccessServerRequest | PlainMessage | undefined - ): boolean { - return proto3.util.equals(DeleteKeyAccessServerRequest, a, b); - } -} - -/** - * @generated from message policy.kasregistry.DeleteKeyAccessServerResponse - */ -export class DeleteKeyAccessServerResponse extends Message { - /** - * @generated from field: policy.KeyAccessServer key_access_server = 1; - */ - keyAccessServer?: KeyAccessServer; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.kasregistry.DeleteKeyAccessServerResponse'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'key_access_server', kind: 'message', T: KeyAccessServer }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): DeleteKeyAccessServerResponse { - return new DeleteKeyAccessServerResponse().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): DeleteKeyAccessServerResponse { - return new DeleteKeyAccessServerResponse().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): DeleteKeyAccessServerResponse { - return new DeleteKeyAccessServerResponse().fromJsonString(jsonString, options); - } - - static equals( - a: DeleteKeyAccessServerResponse | PlainMessage | undefined, - b: DeleteKeyAccessServerResponse | PlainMessage | undefined - ): boolean { - return proto3.util.equals(DeleteKeyAccessServerResponse, a, b); - } -} diff --git a/lib/src/platform/policy/namespaces/NamespacesServiceClientPb.ts b/lib/src/platform/policy/namespaces/NamespacesServiceClientPb.ts deleted file mode 100644 index ee0e477d..00000000 --- a/lib/src/platform/policy/namespaces/NamespacesServiceClientPb.ts +++ /dev/null @@ -1,290 +0,0 @@ -/** - * @fileoverview gRPC-Web generated client stub for policy.namespaces - * @enhanceable - * @public - */ - -// Code generated by protoc-gen-grpc-web. DO NOT EDIT. -// versions: -// protoc-gen-grpc-web v1.5.0 -// protoc v0.0.0 -// source: policy/namespaces/namespaces.proto - -/* eslint-disable */ -// @ts-nocheck - -import * as grpcWeb from 'grpc-web'; - -import * as policy_namespaces_namespaces_pb from '../../policy/namespaces/namespaces_pb'; // proto import: "policy/namespaces/namespaces.proto" - -export class NamespaceServiceClient { - client_: grpcWeb.AbstractClientBase; - hostname_: string; - credentials_: null | { [index: string]: string }; - options_: null | { [index: string]: any }; - - constructor( - hostname: string, - credentials?: null | { [index: string]: string }, - options?: null | { [index: string]: any } - ) { - if (!options) options = {}; - if (!credentials) credentials = {}; - options['format'] = 'binary'; - - this.client_ = new grpcWeb.GrpcWebClientBase(options); - this.hostname_ = hostname.replace(/\/+$/, ''); - this.credentials_ = credentials; - this.options_ = options; - } - - methodDescriptorGetNamespace = new grpcWeb.MethodDescriptor( - '/policy.namespaces.NamespaceService/GetNamespace', - grpcWeb.MethodType.UNARY, - policy_namespaces_namespaces_pb.GetNamespaceRequest, - policy_namespaces_namespaces_pb.GetNamespaceResponse, - (request: policy_namespaces_namespaces_pb.GetNamespaceRequest) => { - return request.serializeBinary(); - }, - policy_namespaces_namespaces_pb.GetNamespaceResponse.deserializeBinary - ); - - getNamespace( - request: policy_namespaces_namespaces_pb.GetNamespaceRequest, - metadata?: grpcWeb.Metadata | null - ): Promise; - - getNamespace( - request: policy_namespaces_namespaces_pb.GetNamespaceRequest, - metadata: grpcWeb.Metadata | null, - callback: ( - err: grpcWeb.RpcError, - response: policy_namespaces_namespaces_pb.GetNamespaceResponse - ) => void - ): grpcWeb.ClientReadableStream; - - getNamespace( - request: policy_namespaces_namespaces_pb.GetNamespaceRequest, - metadata?: grpcWeb.Metadata | null, - callback?: ( - err: grpcWeb.RpcError, - response: policy_namespaces_namespaces_pb.GetNamespaceResponse - ) => void - ) { - if (callback !== undefined) { - return this.client_.rpcCall( - this.hostname_ + '/policy.namespaces.NamespaceService/GetNamespace', - request, - metadata || {}, - this.methodDescriptorGetNamespace, - callback - ); - } - return this.client_.unaryCall( - this.hostname_ + '/policy.namespaces.NamespaceService/GetNamespace', - request, - metadata || {}, - this.methodDescriptorGetNamespace - ); - } - - methodDescriptorListNamespaces = new grpcWeb.MethodDescriptor( - '/policy.namespaces.NamespaceService/ListNamespaces', - grpcWeb.MethodType.UNARY, - policy_namespaces_namespaces_pb.ListNamespacesRequest, - policy_namespaces_namespaces_pb.ListNamespacesResponse, - (request: policy_namespaces_namespaces_pb.ListNamespacesRequest) => { - return request.serializeBinary(); - }, - policy_namespaces_namespaces_pb.ListNamespacesResponse.deserializeBinary - ); - - listNamespaces( - request: policy_namespaces_namespaces_pb.ListNamespacesRequest, - metadata?: grpcWeb.Metadata | null - ): Promise; - - listNamespaces( - request: policy_namespaces_namespaces_pb.ListNamespacesRequest, - metadata: grpcWeb.Metadata | null, - callback: ( - err: grpcWeb.RpcError, - response: policy_namespaces_namespaces_pb.ListNamespacesResponse - ) => void - ): grpcWeb.ClientReadableStream; - - listNamespaces( - request: policy_namespaces_namespaces_pb.ListNamespacesRequest, - metadata?: grpcWeb.Metadata | null, - callback?: ( - err: grpcWeb.RpcError, - response: policy_namespaces_namespaces_pb.ListNamespacesResponse - ) => void - ) { - if (callback !== undefined) { - return this.client_.rpcCall( - this.hostname_ + '/policy.namespaces.NamespaceService/ListNamespaces', - request, - metadata || {}, - this.methodDescriptorListNamespaces, - callback - ); - } - return this.client_.unaryCall( - this.hostname_ + '/policy.namespaces.NamespaceService/ListNamespaces', - request, - metadata || {}, - this.methodDescriptorListNamespaces - ); - } - - methodDescriptorCreateNamespace = new grpcWeb.MethodDescriptor( - '/policy.namespaces.NamespaceService/CreateNamespace', - grpcWeb.MethodType.UNARY, - policy_namespaces_namespaces_pb.CreateNamespaceRequest, - policy_namespaces_namespaces_pb.CreateNamespaceResponse, - (request: policy_namespaces_namespaces_pb.CreateNamespaceRequest) => { - return request.serializeBinary(); - }, - policy_namespaces_namespaces_pb.CreateNamespaceResponse.deserializeBinary - ); - - createNamespace( - request: policy_namespaces_namespaces_pb.CreateNamespaceRequest, - metadata?: grpcWeb.Metadata | null - ): Promise; - - createNamespace( - request: policy_namespaces_namespaces_pb.CreateNamespaceRequest, - metadata: grpcWeb.Metadata | null, - callback: ( - err: grpcWeb.RpcError, - response: policy_namespaces_namespaces_pb.CreateNamespaceResponse - ) => void - ): grpcWeb.ClientReadableStream; - - createNamespace( - request: policy_namespaces_namespaces_pb.CreateNamespaceRequest, - metadata?: grpcWeb.Metadata | null, - callback?: ( - err: grpcWeb.RpcError, - response: policy_namespaces_namespaces_pb.CreateNamespaceResponse - ) => void - ) { - if (callback !== undefined) { - return this.client_.rpcCall( - this.hostname_ + '/policy.namespaces.NamespaceService/CreateNamespace', - request, - metadata || {}, - this.methodDescriptorCreateNamespace, - callback - ); - } - return this.client_.unaryCall( - this.hostname_ + '/policy.namespaces.NamespaceService/CreateNamespace', - request, - metadata || {}, - this.methodDescriptorCreateNamespace - ); - } - - methodDescriptorUpdateNamespace = new grpcWeb.MethodDescriptor( - '/policy.namespaces.NamespaceService/UpdateNamespace', - grpcWeb.MethodType.UNARY, - policy_namespaces_namespaces_pb.UpdateNamespaceRequest, - policy_namespaces_namespaces_pb.UpdateNamespaceResponse, - (request: policy_namespaces_namespaces_pb.UpdateNamespaceRequest) => { - return request.serializeBinary(); - }, - policy_namespaces_namespaces_pb.UpdateNamespaceResponse.deserializeBinary - ); - - updateNamespace( - request: policy_namespaces_namespaces_pb.UpdateNamespaceRequest, - metadata?: grpcWeb.Metadata | null - ): Promise; - - updateNamespace( - request: policy_namespaces_namespaces_pb.UpdateNamespaceRequest, - metadata: grpcWeb.Metadata | null, - callback: ( - err: grpcWeb.RpcError, - response: policy_namespaces_namespaces_pb.UpdateNamespaceResponse - ) => void - ): grpcWeb.ClientReadableStream; - - updateNamespace( - request: policy_namespaces_namespaces_pb.UpdateNamespaceRequest, - metadata?: grpcWeb.Metadata | null, - callback?: ( - err: grpcWeb.RpcError, - response: policy_namespaces_namespaces_pb.UpdateNamespaceResponse - ) => void - ) { - if (callback !== undefined) { - return this.client_.rpcCall( - this.hostname_ + '/policy.namespaces.NamespaceService/UpdateNamespace', - request, - metadata || {}, - this.methodDescriptorUpdateNamespace, - callback - ); - } - return this.client_.unaryCall( - this.hostname_ + '/policy.namespaces.NamespaceService/UpdateNamespace', - request, - metadata || {}, - this.methodDescriptorUpdateNamespace - ); - } - - methodDescriptorDeactivateNamespace = new grpcWeb.MethodDescriptor( - '/policy.namespaces.NamespaceService/DeactivateNamespace', - grpcWeb.MethodType.UNARY, - policy_namespaces_namespaces_pb.DeactivateNamespaceRequest, - policy_namespaces_namespaces_pb.DeactivateNamespaceResponse, - (request: policy_namespaces_namespaces_pb.DeactivateNamespaceRequest) => { - return request.serializeBinary(); - }, - policy_namespaces_namespaces_pb.DeactivateNamespaceResponse.deserializeBinary - ); - - deactivateNamespace( - request: policy_namespaces_namespaces_pb.DeactivateNamespaceRequest, - metadata?: grpcWeb.Metadata | null - ): Promise; - - deactivateNamespace( - request: policy_namespaces_namespaces_pb.DeactivateNamespaceRequest, - metadata: grpcWeb.Metadata | null, - callback: ( - err: grpcWeb.RpcError, - response: policy_namespaces_namespaces_pb.DeactivateNamespaceResponse - ) => void - ): grpcWeb.ClientReadableStream; - - deactivateNamespace( - request: policy_namespaces_namespaces_pb.DeactivateNamespaceRequest, - metadata?: grpcWeb.Metadata | null, - callback?: ( - err: grpcWeb.RpcError, - response: policy_namespaces_namespaces_pb.DeactivateNamespaceResponse - ) => void - ) { - if (callback !== undefined) { - return this.client_.rpcCall( - this.hostname_ + '/policy.namespaces.NamespaceService/DeactivateNamespace', - request, - metadata || {}, - this.methodDescriptorDeactivateNamespace, - callback - ); - } - return this.client_.unaryCall( - this.hostname_ + '/policy.namespaces.NamespaceService/DeactivateNamespace', - request, - metadata || {}, - this.methodDescriptorDeactivateNamespace - ); - } -} diff --git a/lib/src/platform/policy/namespaces/namespaces_connect.ts b/lib/src/platform/policy/namespaces/namespaces_connect.ts deleted file mode 100644 index 53427cec..00000000 --- a/lib/src/platform/policy/namespaces/namespaces_connect.ts +++ /dev/null @@ -1,72 +0,0 @@ -// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=ts" -// @generated from file policy/namespaces/namespaces.proto (package policy.namespaces, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { - CreateNamespaceRequest, - CreateNamespaceResponse, - DeactivateNamespaceRequest, - DeactivateNamespaceResponse, - GetNamespaceRequest, - GetNamespaceResponse, - ListNamespacesRequest, - ListNamespacesResponse, - UpdateNamespaceRequest, - UpdateNamespaceResponse, -} from './namespaces_pb.js'; -import { MethodKind } from '@bufbuild/protobuf'; - -/** - * @generated from service policy.namespaces.NamespaceService - */ -export const NamespaceService = { - typeName: 'policy.namespaces.NamespaceService', - methods: { - /** - * @generated from rpc policy.namespaces.NamespaceService.GetNamespace - */ - getNamespace: { - name: 'GetNamespace', - I: GetNamespaceRequest, - O: GetNamespaceResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.namespaces.NamespaceService.ListNamespaces - */ - listNamespaces: { - name: 'ListNamespaces', - I: ListNamespacesRequest, - O: ListNamespacesResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.namespaces.NamespaceService.CreateNamespace - */ - createNamespace: { - name: 'CreateNamespace', - I: CreateNamespaceRequest, - O: CreateNamespaceResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.namespaces.NamespaceService.UpdateNamespace - */ - updateNamespace: { - name: 'UpdateNamespace', - I: UpdateNamespaceRequest, - O: UpdateNamespaceResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.namespaces.NamespaceService.DeactivateNamespace - */ - deactivateNamespace: { - name: 'DeactivateNamespace', - I: DeactivateNamespaceRequest, - O: DeactivateNamespaceResponse, - kind: MethodKind.Unary, - }, - }, -} as const; diff --git a/lib/src/platform/policy/namespaces/namespaces_pb.d.ts b/lib/src/platform/policy/namespaces/namespaces_pb.d.ts index 2d4f252f..2ed7c6ca 100644 --- a/lib/src/platform/policy/namespaces/namespaces_pb.d.ts +++ b/lib/src/platform/policy/namespaces/namespaces_pb.d.ts @@ -1,268 +1,270 @@ -import * as jspb from 'google-protobuf'; - -import * as buf_validate_validate_pb from '../../buf/validate/validate_pb'; // proto import: "buf/validate/validate.proto" -import * as google_api_annotations_pb from '../../google/api/annotations_pb'; // proto import: "google/api/annotations.proto" -import * as common_common_pb from '../../common/common_pb'; // proto import: "common/common.proto" -import * as policy_objects_pb from '../../policy/objects_pb'; // proto import: "policy/objects.proto" - -export class GetNamespaceRequest extends jspb.Message { - getId(): string; - setId(value: string): GetNamespaceRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetNamespaceRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetNamespaceRequest): GetNamespaceRequest.AsObject; - static serializeBinaryToWriter(message: GetNamespaceRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetNamespaceRequest; - static deserializeBinaryFromReader( - message: GetNamespaceRequest, - reader: jspb.BinaryReader - ): GetNamespaceRequest; -} +// @generated by protoc-gen-es v1.9.0 with parameter "target=js+dts,import_extension=none" +// @generated from file policy/namespaces/namespaces.proto (package policy.namespaces, syntax proto3) +/* eslint-disable */ +// @ts-nocheck -export namespace GetNamespaceRequest { - export type AsObject = { - id: string; - }; -} +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; +import type { Namespace } from "../objects_pb"; +import type { ActiveStateEnum, MetadataMutable, MetadataUpdateEnum } from "../../common/common_pb"; -export class GetNamespaceResponse extends jspb.Message { - getNamespace(): policy_objects_pb.Namespace | undefined; - setNamespace(value?: policy_objects_pb.Namespace): GetNamespaceResponse; - hasNamespace(): boolean; - clearNamespace(): GetNamespaceResponse; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetNamespaceResponse.AsObject; - static toObject( - includeInstance: boolean, - msg: GetNamespaceResponse - ): GetNamespaceResponse.AsObject; - static serializeBinaryToWriter(message: GetNamespaceResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetNamespaceResponse; - static deserializeBinaryFromReader( - message: GetNamespaceResponse, - reader: jspb.BinaryReader - ): GetNamespaceResponse; -} +/** + * @generated from message policy.namespaces.GetNamespaceRequest + */ +export declare class GetNamespaceRequest extends Message { + /** + * @generated from field: string id = 1; + */ + id: string; -export namespace GetNamespaceResponse { - export type AsObject = { - namespace?: policy_objects_pb.Namespace.AsObject; - }; -} + constructor(data?: PartialMessage); -export class ListNamespacesRequest extends jspb.Message { - getState(): common_common_pb.ActiveStateEnum; - setState(value: common_common_pb.ActiveStateEnum): ListNamespacesRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListNamespacesRequest.AsObject; - static toObject( - includeInstance: boolean, - msg: ListNamespacesRequest - ): ListNamespacesRequest.AsObject; - static serializeBinaryToWriter(message: ListNamespacesRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListNamespacesRequest; - static deserializeBinaryFromReader( - message: ListNamespacesRequest, - reader: jspb.BinaryReader - ): ListNamespacesRequest; -} + static readonly runtime: typeof proto3; + static readonly typeName = "policy.namespaces.GetNamespaceRequest"; + static readonly fields: FieldList; -export namespace ListNamespacesRequest { - export type AsObject = { - state: common_common_pb.ActiveStateEnum; - }; -} + static fromBinary(bytes: Uint8Array, options?: Partial): GetNamespaceRequest; -export class ListNamespacesResponse extends jspb.Message { - getNamespacesList(): Array; - setNamespacesList(value: Array): ListNamespacesResponse; - clearNamespacesList(): ListNamespacesResponse; - addNamespaces(value?: policy_objects_pb.Namespace, index?: number): policy_objects_pb.Namespace; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListNamespacesResponse.AsObject; - static toObject( - includeInstance: boolean, - msg: ListNamespacesResponse - ): ListNamespacesResponse.AsObject; - static serializeBinaryToWriter(message: ListNamespacesResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListNamespacesResponse; - static deserializeBinaryFromReader( - message: ListNamespacesResponse, - reader: jspb.BinaryReader - ): ListNamespacesResponse; -} + static fromJson(jsonValue: JsonValue, options?: Partial): GetNamespaceRequest; -export namespace ListNamespacesResponse { - export type AsObject = { - namespacesList: Array; - }; -} + static fromJsonString(jsonString: string, options?: Partial): GetNamespaceRequest; -export class CreateNamespaceRequest extends jspb.Message { - getName(): string; - setName(value: string): CreateNamespaceRequest; - - getMetadata(): common_common_pb.MetadataMutable | undefined; - setMetadata(value?: common_common_pb.MetadataMutable): CreateNamespaceRequest; - hasMetadata(): boolean; - clearMetadata(): CreateNamespaceRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateNamespaceRequest.AsObject; - static toObject( - includeInstance: boolean, - msg: CreateNamespaceRequest - ): CreateNamespaceRequest.AsObject; - static serializeBinaryToWriter(message: CreateNamespaceRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateNamespaceRequest; - static deserializeBinaryFromReader( - message: CreateNamespaceRequest, - reader: jspb.BinaryReader - ): CreateNamespaceRequest; + static equals(a: GetNamespaceRequest | PlainMessage | undefined, b: GetNamespaceRequest | PlainMessage | undefined): boolean; } -export namespace CreateNamespaceRequest { - export type AsObject = { - name: string; - metadata?: common_common_pb.MetadataMutable.AsObject; - }; -} +/** + * @generated from message policy.namespaces.GetNamespaceResponse + */ +export declare class GetNamespaceResponse extends Message { + /** + * @generated from field: policy.Namespace namespace = 1; + */ + namespace?: Namespace; -export class CreateNamespaceResponse extends jspb.Message { - getNamespace(): policy_objects_pb.Namespace | undefined; - setNamespace(value?: policy_objects_pb.Namespace): CreateNamespaceResponse; - hasNamespace(): boolean; - clearNamespace(): CreateNamespaceResponse; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateNamespaceResponse.AsObject; - static toObject( - includeInstance: boolean, - msg: CreateNamespaceResponse - ): CreateNamespaceResponse.AsObject; - static serializeBinaryToWriter(message: CreateNamespaceResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateNamespaceResponse; - static deserializeBinaryFromReader( - message: CreateNamespaceResponse, - reader: jspb.BinaryReader - ): CreateNamespaceResponse; -} + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.namespaces.GetNamespaceResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): GetNamespaceResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): GetNamespaceResponse; -export namespace CreateNamespaceResponse { - export type AsObject = { - namespace?: policy_objects_pb.Namespace.AsObject; - }; + static fromJsonString(jsonString: string, options?: Partial): GetNamespaceResponse; + + static equals(a: GetNamespaceResponse | PlainMessage | undefined, b: GetNamespaceResponse | PlainMessage | undefined): boolean; } -export class UpdateNamespaceRequest extends jspb.Message { - getId(): string; - setId(value: string): UpdateNamespaceRequest; - - getMetadata(): common_common_pb.MetadataMutable | undefined; - setMetadata(value?: common_common_pb.MetadataMutable): UpdateNamespaceRequest; - hasMetadata(): boolean; - clearMetadata(): UpdateNamespaceRequest; - - getMetadataUpdateBehavior(): common_common_pb.MetadataUpdateEnum; - setMetadataUpdateBehavior(value: common_common_pb.MetadataUpdateEnum): UpdateNamespaceRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UpdateNamespaceRequest.AsObject; - static toObject( - includeInstance: boolean, - msg: UpdateNamespaceRequest - ): UpdateNamespaceRequest.AsObject; - static serializeBinaryToWriter(message: UpdateNamespaceRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UpdateNamespaceRequest; - static deserializeBinaryFromReader( - message: UpdateNamespaceRequest, - reader: jspb.BinaryReader - ): UpdateNamespaceRequest; +/** + * @generated from message policy.namespaces.ListNamespacesRequest + */ +export declare class ListNamespacesRequest extends Message { + /** + * ACTIVE by default when not specified + * + * @generated from field: common.ActiveStateEnum state = 1; + */ + state: ActiveStateEnum; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.namespaces.ListNamespacesRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ListNamespacesRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): ListNamespacesRequest; + + static fromJsonString(jsonString: string, options?: Partial): ListNamespacesRequest; + + static equals(a: ListNamespacesRequest | PlainMessage | undefined, b: ListNamespacesRequest | PlainMessage | undefined): boolean; } -export namespace UpdateNamespaceRequest { - export type AsObject = { - id: string; - metadata?: common_common_pb.MetadataMutable.AsObject; - metadataUpdateBehavior: common_common_pb.MetadataUpdateEnum; - }; +/** + * @generated from message policy.namespaces.ListNamespacesResponse + */ +export declare class ListNamespacesResponse extends Message { + /** + * @generated from field: repeated policy.Namespace namespaces = 1; + */ + namespaces: Namespace[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.namespaces.ListNamespacesResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ListNamespacesResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): ListNamespacesResponse; + + static fromJsonString(jsonString: string, options?: Partial): ListNamespacesResponse; + + static equals(a: ListNamespacesResponse | PlainMessage | undefined, b: ListNamespacesResponse | PlainMessage | undefined): boolean; } -export class UpdateNamespaceResponse extends jspb.Message { - getNamespace(): policy_objects_pb.Namespace | undefined; - setNamespace(value?: policy_objects_pb.Namespace): UpdateNamespaceResponse; - hasNamespace(): boolean; - clearNamespace(): UpdateNamespaceResponse; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UpdateNamespaceResponse.AsObject; - static toObject( - includeInstance: boolean, - msg: UpdateNamespaceResponse - ): UpdateNamespaceResponse.AsObject; - static serializeBinaryToWriter(message: UpdateNamespaceResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UpdateNamespaceResponse; - static deserializeBinaryFromReader( - message: UpdateNamespaceResponse, - reader: jspb.BinaryReader - ): UpdateNamespaceResponse; +/** + * @generated from message policy.namespaces.CreateNamespaceRequest + */ +export declare class CreateNamespaceRequest extends Message { + /** + * Required + * + * @generated from field: string name = 1; + */ + name: string; + + /** + * Optional + * + * @generated from field: common.MetadataMutable metadata = 100; + */ + metadata?: MetadataMutable; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.namespaces.CreateNamespaceRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): CreateNamespaceRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): CreateNamespaceRequest; + + static fromJsonString(jsonString: string, options?: Partial): CreateNamespaceRequest; + + static equals(a: CreateNamespaceRequest | PlainMessage | undefined, b: CreateNamespaceRequest | PlainMessage | undefined): boolean; } -export namespace UpdateNamespaceResponse { - export type AsObject = { - namespace?: policy_objects_pb.Namespace.AsObject; - }; +/** + * @generated from message policy.namespaces.CreateNamespaceResponse + */ +export declare class CreateNamespaceResponse extends Message { + /** + * @generated from field: policy.Namespace namespace = 1; + */ + namespace?: Namespace; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.namespaces.CreateNamespaceResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): CreateNamespaceResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): CreateNamespaceResponse; + + static fromJsonString(jsonString: string, options?: Partial): CreateNamespaceResponse; + + static equals(a: CreateNamespaceResponse | PlainMessage | undefined, b: CreateNamespaceResponse | PlainMessage | undefined): boolean; } -export class DeactivateNamespaceRequest extends jspb.Message { - getId(): string; - setId(value: string): DeactivateNamespaceRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DeactivateNamespaceRequest.AsObject; - static toObject( - includeInstance: boolean, - msg: DeactivateNamespaceRequest - ): DeactivateNamespaceRequest.AsObject; - static serializeBinaryToWriter( - message: DeactivateNamespaceRequest, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): DeactivateNamespaceRequest; - static deserializeBinaryFromReader( - message: DeactivateNamespaceRequest, - reader: jspb.BinaryReader - ): DeactivateNamespaceRequest; +/** + * @generated from message policy.namespaces.UpdateNamespaceRequest + */ +export declare class UpdateNamespaceRequest extends Message { + /** + * Required + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * Optional + * + * @generated from field: common.MetadataMutable metadata = 100; + */ + metadata?: MetadataMutable; + + /** + * @generated from field: common.MetadataUpdateEnum metadata_update_behavior = 101; + */ + metadataUpdateBehavior: MetadataUpdateEnum; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.namespaces.UpdateNamespaceRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): UpdateNamespaceRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): UpdateNamespaceRequest; + + static fromJsonString(jsonString: string, options?: Partial): UpdateNamespaceRequest; + + static equals(a: UpdateNamespaceRequest | PlainMessage | undefined, b: UpdateNamespaceRequest | PlainMessage | undefined): boolean; } -export namespace DeactivateNamespaceRequest { - export type AsObject = { - id: string; - }; +/** + * @generated from message policy.namespaces.UpdateNamespaceResponse + */ +export declare class UpdateNamespaceResponse extends Message { + /** + * @generated from field: policy.Namespace namespace = 1; + */ + namespace?: Namespace; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.namespaces.UpdateNamespaceResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): UpdateNamespaceResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): UpdateNamespaceResponse; + + static fromJsonString(jsonString: string, options?: Partial): UpdateNamespaceResponse; + + static equals(a: UpdateNamespaceResponse | PlainMessage | undefined, b: UpdateNamespaceResponse | PlainMessage | undefined): boolean; } -export class DeactivateNamespaceResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DeactivateNamespaceResponse.AsObject; - static toObject( - includeInstance: boolean, - msg: DeactivateNamespaceResponse - ): DeactivateNamespaceResponse.AsObject; - static serializeBinaryToWriter( - message: DeactivateNamespaceResponse, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): DeactivateNamespaceResponse; - static deserializeBinaryFromReader( - message: DeactivateNamespaceResponse, - reader: jspb.BinaryReader - ): DeactivateNamespaceResponse; +/** + * @generated from message policy.namespaces.DeactivateNamespaceRequest + */ +export declare class DeactivateNamespaceRequest extends Message { + /** + * @generated from field: string id = 1; + */ + id: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.namespaces.DeactivateNamespaceRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): DeactivateNamespaceRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): DeactivateNamespaceRequest; + + static fromJsonString(jsonString: string, options?: Partial): DeactivateNamespaceRequest; + + static equals(a: DeactivateNamespaceRequest | PlainMessage | undefined, b: DeactivateNamespaceRequest | PlainMessage | undefined): boolean; } -export namespace DeactivateNamespaceResponse { - export type AsObject = {}; +/** + * @generated from message policy.namespaces.DeactivateNamespaceResponse + */ +export declare class DeactivateNamespaceResponse extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.namespaces.DeactivateNamespaceResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): DeactivateNamespaceResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): DeactivateNamespaceResponse; + + static fromJsonString(jsonString: string, options?: Partial): DeactivateNamespaceResponse; + + static equals(a: DeactivateNamespaceResponse | PlainMessage | undefined, b: DeactivateNamespaceResponse | PlainMessage | undefined): boolean; } + diff --git a/lib/src/platform/policy/namespaces/namespaces_pb.ts b/lib/src/platform/policy/namespaces/namespaces_pb.ts deleted file mode 100644 index 7dc17539..00000000 --- a/lib/src/platform/policy/namespaces/namespaces_pb.ts +++ /dev/null @@ -1,517 +0,0 @@ -// @generated by protoc-gen-es v1.9.0 with parameter "target=ts" -// @generated from file policy/namespaces/namespaces.proto (package policy.namespaces, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import type { - BinaryReadOptions, - FieldList, - JsonReadOptions, - JsonValue, - PartialMessage, - PlainMessage, -} from '@bufbuild/protobuf'; -import { Message, proto3 } from '@bufbuild/protobuf'; -import { Namespace } from '../objects_pb.js'; -import { ActiveStateEnum, MetadataMutable, MetadataUpdateEnum } from '../../common/common_pb.js'; - -/** - * @generated from message policy.namespaces.GetNamespaceRequest - */ -export class GetNamespaceRequest extends Message { - /** - * @generated from field: string id = 1; - */ - id = ''; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.namespaces.GetNamespaceRequest'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetNamespaceRequest { - return new GetNamespaceRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetNamespaceRequest { - return new GetNamespaceRequest().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): GetNamespaceRequest { - return new GetNamespaceRequest().fromJsonString(jsonString, options); - } - - static equals( - a: GetNamespaceRequest | PlainMessage | undefined, - b: GetNamespaceRequest | PlainMessage | undefined - ): boolean { - return proto3.util.equals(GetNamespaceRequest, a, b); - } -} - -/** - * @generated from message policy.namespaces.GetNamespaceResponse - */ -export class GetNamespaceResponse extends Message { - /** - * @generated from field: policy.Namespace namespace = 1; - */ - namespace?: Namespace; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.namespaces.GetNamespaceResponse'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'namespace', kind: 'message', T: Namespace }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetNamespaceResponse { - return new GetNamespaceResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetNamespaceResponse { - return new GetNamespaceResponse().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): GetNamespaceResponse { - return new GetNamespaceResponse().fromJsonString(jsonString, options); - } - - static equals( - a: GetNamespaceResponse | PlainMessage | undefined, - b: GetNamespaceResponse | PlainMessage | undefined - ): boolean { - return proto3.util.equals(GetNamespaceResponse, a, b); - } -} - -/** - * @generated from message policy.namespaces.ListNamespacesRequest - */ -export class ListNamespacesRequest extends Message { - /** - * ACTIVE by default when not specified - * - * @generated from field: common.ActiveStateEnum state = 1; - */ - state = ActiveStateEnum.UNSPECIFIED; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.namespaces.ListNamespacesRequest'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'state', kind: 'enum', T: proto3.getEnumType(ActiveStateEnum) }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): ListNamespacesRequest { - return new ListNamespacesRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ListNamespacesRequest { - return new ListNamespacesRequest().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): ListNamespacesRequest { - return new ListNamespacesRequest().fromJsonString(jsonString, options); - } - - static equals( - a: ListNamespacesRequest | PlainMessage | undefined, - b: ListNamespacesRequest | PlainMessage | undefined - ): boolean { - return proto3.util.equals(ListNamespacesRequest, a, b); - } -} - -/** - * @generated from message policy.namespaces.ListNamespacesResponse - */ -export class ListNamespacesResponse extends Message { - /** - * @generated from field: repeated policy.Namespace namespaces = 1; - */ - namespaces: Namespace[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.namespaces.ListNamespacesResponse'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'namespaces', kind: 'message', T: Namespace, repeated: true }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): ListNamespacesResponse { - return new ListNamespacesResponse().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): ListNamespacesResponse { - return new ListNamespacesResponse().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): ListNamespacesResponse { - return new ListNamespacesResponse().fromJsonString(jsonString, options); - } - - static equals( - a: ListNamespacesResponse | PlainMessage | undefined, - b: ListNamespacesResponse | PlainMessage | undefined - ): boolean { - return proto3.util.equals(ListNamespacesResponse, a, b); - } -} - -/** - * @generated from message policy.namespaces.CreateNamespaceRequest - */ -export class CreateNamespaceRequest extends Message { - /** - * Required - * - * @generated from field: string name = 1; - */ - name = ''; - - /** - * Optional - * - * @generated from field: common.MetadataMutable metadata = 100; - */ - metadata?: MetadataMutable; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.namespaces.CreateNamespaceRequest'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'name', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { no: 100, name: 'metadata', kind: 'message', T: MetadataMutable }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): CreateNamespaceRequest { - return new CreateNamespaceRequest().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): CreateNamespaceRequest { - return new CreateNamespaceRequest().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): CreateNamespaceRequest { - return new CreateNamespaceRequest().fromJsonString(jsonString, options); - } - - static equals( - a: CreateNamespaceRequest | PlainMessage | undefined, - b: CreateNamespaceRequest | PlainMessage | undefined - ): boolean { - return proto3.util.equals(CreateNamespaceRequest, a, b); - } -} - -/** - * @generated from message policy.namespaces.CreateNamespaceResponse - */ -export class CreateNamespaceResponse extends Message { - /** - * @generated from field: policy.Namespace namespace = 1; - */ - namespace?: Namespace; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.namespaces.CreateNamespaceResponse'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'namespace', kind: 'message', T: Namespace }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): CreateNamespaceResponse { - return new CreateNamespaceResponse().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): CreateNamespaceResponse { - return new CreateNamespaceResponse().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): CreateNamespaceResponse { - return new CreateNamespaceResponse().fromJsonString(jsonString, options); - } - - static equals( - a: CreateNamespaceResponse | PlainMessage | undefined, - b: CreateNamespaceResponse | PlainMessage | undefined - ): boolean { - return proto3.util.equals(CreateNamespaceResponse, a, b); - } -} - -/** - * @generated from message policy.namespaces.UpdateNamespaceRequest - */ -export class UpdateNamespaceRequest extends Message { - /** - * Required - * - * @generated from field: string id = 1; - */ - id = ''; - - /** - * Optional - * - * @generated from field: common.MetadataMutable metadata = 100; - */ - metadata?: MetadataMutable; - - /** - * @generated from field: common.MetadataUpdateEnum metadata_update_behavior = 101; - */ - metadataUpdateBehavior = MetadataUpdateEnum.UNSPECIFIED; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.namespaces.UpdateNamespaceRequest'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { no: 100, name: 'metadata', kind: 'message', T: MetadataMutable }, - { - no: 101, - name: 'metadata_update_behavior', - kind: 'enum', - T: proto3.getEnumType(MetadataUpdateEnum), - }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): UpdateNamespaceRequest { - return new UpdateNamespaceRequest().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): UpdateNamespaceRequest { - return new UpdateNamespaceRequest().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): UpdateNamespaceRequest { - return new UpdateNamespaceRequest().fromJsonString(jsonString, options); - } - - static equals( - a: UpdateNamespaceRequest | PlainMessage | undefined, - b: UpdateNamespaceRequest | PlainMessage | undefined - ): boolean { - return proto3.util.equals(UpdateNamespaceRequest, a, b); - } -} - -/** - * @generated from message policy.namespaces.UpdateNamespaceResponse - */ -export class UpdateNamespaceResponse extends Message { - /** - * @generated from field: policy.Namespace namespace = 1; - */ - namespace?: Namespace; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.namespaces.UpdateNamespaceResponse'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'namespace', kind: 'message', T: Namespace }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): UpdateNamespaceResponse { - return new UpdateNamespaceResponse().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): UpdateNamespaceResponse { - return new UpdateNamespaceResponse().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): UpdateNamespaceResponse { - return new UpdateNamespaceResponse().fromJsonString(jsonString, options); - } - - static equals( - a: UpdateNamespaceResponse | PlainMessage | undefined, - b: UpdateNamespaceResponse | PlainMessage | undefined - ): boolean { - return proto3.util.equals(UpdateNamespaceResponse, a, b); - } -} - -/** - * @generated from message policy.namespaces.DeactivateNamespaceRequest - */ -export class DeactivateNamespaceRequest extends Message { - /** - * @generated from field: string id = 1; - */ - id = ''; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.namespaces.DeactivateNamespaceRequest'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): DeactivateNamespaceRequest { - return new DeactivateNamespaceRequest().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): DeactivateNamespaceRequest { - return new DeactivateNamespaceRequest().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): DeactivateNamespaceRequest { - return new DeactivateNamespaceRequest().fromJsonString(jsonString, options); - } - - static equals( - a: DeactivateNamespaceRequest | PlainMessage | undefined, - b: DeactivateNamespaceRequest | PlainMessage | undefined - ): boolean { - return proto3.util.equals(DeactivateNamespaceRequest, a, b); - } -} - -/** - * @generated from message policy.namespaces.DeactivateNamespaceResponse - */ -export class DeactivateNamespaceResponse extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.namespaces.DeactivateNamespaceResponse'; - static readonly fields: FieldList = proto3.util.newFieldList(() => []); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): DeactivateNamespaceResponse { - return new DeactivateNamespaceResponse().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): DeactivateNamespaceResponse { - return new DeactivateNamespaceResponse().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): DeactivateNamespaceResponse { - return new DeactivateNamespaceResponse().fromJsonString(jsonString, options); - } - - static equals( - a: DeactivateNamespaceResponse | PlainMessage | undefined, - b: DeactivateNamespaceResponse | PlainMessage | undefined - ): boolean { - return proto3.util.equals(DeactivateNamespaceResponse, a, b); - } -} diff --git a/lib/src/platform/policy/objects_pb.d.ts b/lib/src/platform/policy/objects_pb.d.ts index 0921237b..36fc5d59 100644 --- a/lib/src/platform/policy/objects_pb.d.ts +++ b/lib/src/platform/policy/objects_pb.d.ts @@ -1,502 +1,725 @@ -import * as jspb from 'google-protobuf'; - -import * as buf_validate_validate_pb from '../buf/validate/validate_pb'; // proto import: "buf/validate/validate.proto" -import * as common_common_pb from '../common/common_pb'; // proto import: "common/common.proto" -import * as google_protobuf_wrappers_pb from 'google-protobuf/google/protobuf/wrappers_pb'; // proto import: "google/protobuf/wrappers.proto" - -export class Namespace extends jspb.Message { - getId(): string; - setId(value: string): Namespace; - - getName(): string; - setName(value: string): Namespace; - - getFqn(): string; - setFqn(value: string): Namespace; - - getActive(): google_protobuf_wrappers_pb.BoolValue | undefined; - setActive(value?: google_protobuf_wrappers_pb.BoolValue): Namespace; - hasActive(): boolean; - clearActive(): Namespace; - - getMetadata(): common_common_pb.Metadata | undefined; - setMetadata(value?: common_common_pb.Metadata): Namespace; - hasMetadata(): boolean; - clearMetadata(): Namespace; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Namespace.AsObject; - static toObject(includeInstance: boolean, msg: Namespace): Namespace.AsObject; - static serializeBinaryToWriter(message: Namespace, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Namespace; - static deserializeBinaryFromReader(message: Namespace, reader: jspb.BinaryReader): Namespace; +// @generated by protoc-gen-es v1.9.0 with parameter "target=js+dts,import_extension=none" +// @generated from file policy/objects.proto (package policy, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; +import type { Metadata } from "../common/common_pb"; + +/** + * buflint ENUM_VALUE_PREFIX: to make sure that C++ scoping rules aren't violated when users add new enum values to an enum in a given package + * + * @generated from enum policy.AttributeRuleTypeEnum + */ +export declare enum AttributeRuleTypeEnum { + /** + * @generated from enum value: ATTRIBUTE_RULE_TYPE_ENUM_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: ATTRIBUTE_RULE_TYPE_ENUM_ALL_OF = 1; + */ + ALL_OF = 1, + + /** + * @generated from enum value: ATTRIBUTE_RULE_TYPE_ENUM_ANY_OF = 2; + */ + ANY_OF = 2, + + /** + * @generated from enum value: ATTRIBUTE_RULE_TYPE_ENUM_HIERARCHY = 3; + */ + HIERARCHY = 3, } -export namespace Namespace { - export type AsObject = { - id: string; - name: string; - fqn: string; - active?: google_protobuf_wrappers_pb.BoolValue.AsObject; - metadata?: common_common_pb.Metadata.AsObject; - }; +/** + * buflint ENUM_VALUE_PREFIX: to make sure that C++ scoping rules aren't violated when users add new enum values to an enum in a given package + * + * @generated from enum policy.SubjectMappingOperatorEnum + */ +export declare enum SubjectMappingOperatorEnum { + /** + * @generated from enum value: SUBJECT_MAPPING_OPERATOR_ENUM_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: SUBJECT_MAPPING_OPERATOR_ENUM_IN = 1; + */ + IN = 1, + + /** + * @generated from enum value: SUBJECT_MAPPING_OPERATOR_ENUM_NOT_IN = 2; + */ + NOT_IN = 2, } -export class Attribute extends jspb.Message { - getId(): string; - setId(value: string): Attribute; - - getNamespace(): Namespace | undefined; - setNamespace(value?: Namespace): Attribute; - hasNamespace(): boolean; - clearNamespace(): Attribute; - - getName(): string; - setName(value: string): Attribute; - - getRule(): AttributeRuleTypeEnum; - setRule(value: AttributeRuleTypeEnum): Attribute; - - getValuesList(): Array; - setValuesList(value: Array): Attribute; - clearValuesList(): Attribute; - addValues(value?: Value, index?: number): Value; - - getGrantsList(): Array; - setGrantsList(value: Array): Attribute; - clearGrantsList(): Attribute; - addGrants(value?: KeyAccessServer, index?: number): KeyAccessServer; - - getFqn(): string; - setFqn(value: string): Attribute; - - getActive(): google_protobuf_wrappers_pb.BoolValue | undefined; - setActive(value?: google_protobuf_wrappers_pb.BoolValue): Attribute; - hasActive(): boolean; - clearActive(): Attribute; - - getMetadata(): common_common_pb.Metadata | undefined; - setMetadata(value?: common_common_pb.Metadata): Attribute; - hasMetadata(): boolean; - clearMetadata(): Attribute; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Attribute.AsObject; - static toObject(includeInstance: boolean, msg: Attribute): Attribute.AsObject; - static serializeBinaryToWriter(message: Attribute, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Attribute; - static deserializeBinaryFromReader(message: Attribute, reader: jspb.BinaryReader): Attribute; +/** + * buflint ENUM_VALUE_PREFIX: to make sure that C++ scoping rules aren't violated when users add new enum values to an enum in a given package + * + * @generated from enum policy.ConditionBooleanTypeEnum + */ +export declare enum ConditionBooleanTypeEnum { + /** + * @generated from enum value: CONDITION_BOOLEAN_TYPE_ENUM_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: CONDITION_BOOLEAN_TYPE_ENUM_AND = 1; + */ + AND = 1, + + /** + * @generated from enum value: CONDITION_BOOLEAN_TYPE_ENUM_OR = 2; + */ + OR = 2, } -export namespace Attribute { - export type AsObject = { - id: string; - namespace?: Namespace.AsObject; - name: string; - rule: AttributeRuleTypeEnum; - valuesList: Array; - grantsList: Array; - fqn: string; - active?: google_protobuf_wrappers_pb.BoolValue.AsObject; - metadata?: common_common_pb.Metadata.AsObject; - }; +/** + * @generated from message policy.Namespace + */ +export declare class Namespace extends Message { + /** + * generated uuid in database + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * used to partition Attribute Definitions, support by namespace AuthN and enable federation + * + * @generated from field: string name = 2; + */ + name: string; + + /** + * @generated from field: string fqn = 3; + */ + fqn: string; + + /** + * active by default until explicitly deactivated + * + * @generated from field: google.protobuf.BoolValue active = 4; + */ + active?: boolean; + + /** + * @generated from field: common.Metadata metadata = 5; + */ + metadata?: Metadata; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.Namespace"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): Namespace; + + static fromJson(jsonValue: JsonValue, options?: Partial): Namespace; + + static fromJsonString(jsonString: string, options?: Partial): Namespace; + + static equals(a: Namespace | PlainMessage | undefined, b: Namespace | PlainMessage | undefined): boolean; } -export class Value extends jspb.Message { - getId(): string; - setId(value: string): Value; - - getAttribute(): Attribute | undefined; - setAttribute(value?: Attribute): Value; - hasAttribute(): boolean; - clearAttribute(): Value; - - getValue(): string; - setValue(value: string): Value; - - getMembersList(): Array; - setMembersList(value: Array): Value; - clearMembersList(): Value; - addMembers(value?: Value, index?: number): Value; - - getGrantsList(): Array; - setGrantsList(value: Array): Value; - clearGrantsList(): Value; - addGrants(value?: KeyAccessServer, index?: number): KeyAccessServer; - - getFqn(): string; - setFqn(value: string): Value; - - getActive(): google_protobuf_wrappers_pb.BoolValue | undefined; - setActive(value?: google_protobuf_wrappers_pb.BoolValue): Value; - hasActive(): boolean; - clearActive(): Value; - - getSubjectMappingsList(): Array; - setSubjectMappingsList(value: Array): Value; - clearSubjectMappingsList(): Value; - addSubjectMappings(value?: SubjectMapping, index?: number): SubjectMapping; - - getMetadata(): common_common_pb.Metadata | undefined; - setMetadata(value?: common_common_pb.Metadata): Value; - hasMetadata(): boolean; - clearMetadata(): Value; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Value.AsObject; - static toObject(includeInstance: boolean, msg: Value): Value.AsObject; - static serializeBinaryToWriter(message: Value, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Value; - static deserializeBinaryFromReader(message: Value, reader: jspb.BinaryReader): Value; +/** + * @generated from message policy.Attribute + */ +export declare class Attribute extends Message { + /** + * @generated from field: string id = 1; + */ + id: string; + + /** + * namespace of the attribute + * + * @generated from field: policy.Namespace namespace = 2; + */ + namespace?: Namespace; + + /** + * attribute name + * + * @generated from field: string name = 3; + */ + name: string; + + /** + * attribute rule enum + * + * @generated from field: policy.AttributeRuleTypeEnum rule = 4; + */ + rule: AttributeRuleTypeEnum; + + /** + * @generated from field: repeated policy.Value values = 5; + */ + values: Value[]; + + /** + * @generated from field: repeated policy.KeyAccessServer grants = 6; + */ + grants: KeyAccessServer[]; + + /** + * @generated from field: string fqn = 7; + */ + fqn: string; + + /** + * active by default until explicitly deactivated + * + * @generated from field: google.protobuf.BoolValue active = 8; + */ + active?: boolean; + + /** + * Common metadata + * + * @generated from field: common.Metadata metadata = 100; + */ + metadata?: Metadata; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.Attribute"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): Attribute; + + static fromJson(jsonValue: JsonValue, options?: Partial): Attribute; + + static fromJsonString(jsonString: string, options?: Partial): Attribute; + + static equals(a: Attribute | PlainMessage | undefined, b: Attribute | PlainMessage | undefined): boolean; } -export namespace Value { - export type AsObject = { - id: string; - attribute?: Attribute.AsObject; - value: string; - membersList: Array; - grantsList: Array; - fqn: string; - active?: google_protobuf_wrappers_pb.BoolValue.AsObject; - subjectMappingsList: Array; - metadata?: common_common_pb.Metadata.AsObject; - }; +/** + * @generated from message policy.Value + */ +export declare class Value extends Message { + /** + * generated uuid in database + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * @generated from field: policy.Attribute attribute = 2; + */ + attribute?: Attribute; + + /** + * @generated from field: string value = 3; + */ + value: string; + + /** + * list of attribute values that this value is related to (attribute group) + * + * @generated from field: repeated policy.Value members = 4; + */ + members: Value[]; + + /** + * list of key access servers + * + * @generated from field: repeated policy.KeyAccessServer grants = 5; + */ + grants: KeyAccessServer[]; + + /** + * @generated from field: string fqn = 6; + */ + fqn: string; + + /** + * active by default until explicitly deactivated + * + * @generated from field: google.protobuf.BoolValue active = 7; + */ + active?: boolean; + + /** + * subject mapping + * + * @generated from field: repeated policy.SubjectMapping subject_mappings = 8; + */ + subjectMappings: SubjectMapping[]; + + /** + * Common metadata + * + * @generated from field: common.Metadata metadata = 100; + */ + metadata?: Metadata; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.Value"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): Value; + + static fromJson(jsonValue: JsonValue, options?: Partial): Value; + + static fromJsonString(jsonString: string, options?: Partial): Value; + + static equals(a: Value | PlainMessage | undefined, b: Value | PlainMessage | undefined): boolean; } -export class Action extends jspb.Message { - getStandard(): Action.StandardAction; - setStandard(value: Action.StandardAction): Action; +/** + * An action an entity can take + * + * @generated from message policy.Action + */ +export declare class Action extends Message { + /** + * @generated from oneof policy.Action.value + */ + value: { + /** + * @generated from field: policy.Action.StandardAction standard = 1; + */ + value: Action_StandardAction; + case: "standard"; + } | { + /** + * @generated from field: string custom = 2; + */ + value: string; + case: "custom"; + } | { case: undefined; value?: undefined }; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.Action"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): Action; - getCustom(): string; - setCustom(value: string): Action; + static fromJson(jsonValue: JsonValue, options?: Partial): Action; - getValueCase(): Action.ValueCase; + static fromJsonString(jsonString: string, options?: Partial): Action; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Action.AsObject; - static toObject(includeInstance: boolean, msg: Action): Action.AsObject; - static serializeBinaryToWriter(message: Action, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Action; - static deserializeBinaryFromReader(message: Action, reader: jspb.BinaryReader): Action; + static equals(a: Action | PlainMessage | undefined, b: Action | PlainMessage | undefined): boolean; } -export namespace Action { - export type AsObject = { - standard: Action.StandardAction; - custom: string; - }; - - export enum StandardAction { - STANDARD_ACTION_UNSPECIFIED = 0, - STANDARD_ACTION_DECRYPT = 1, - STANDARD_ACTION_TRANSMIT = 2, - } - - export enum ValueCase { - VALUE_NOT_SET = 0, - STANDARD = 1, - CUSTOM = 2, - } +/** + * Standard actions supported by the platform + * + * @generated from enum policy.Action.StandardAction + */ +export declare enum Action_StandardAction { + /** + * @generated from enum value: STANDARD_ACTION_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: STANDARD_ACTION_DECRYPT = 1; + */ + DECRYPT = 1, + + /** + * @generated from enum value: STANDARD_ACTION_TRANSMIT = 2; + */ + TRANSMIT = 2, } -export class SubjectMapping extends jspb.Message { - getId(): string; - setId(value: string): SubjectMapping; - - getAttributeValue(): Value | undefined; - setAttributeValue(value?: Value): SubjectMapping; - hasAttributeValue(): boolean; - clearAttributeValue(): SubjectMapping; - - getSubjectConditionSet(): SubjectConditionSet | undefined; - setSubjectConditionSet(value?: SubjectConditionSet): SubjectMapping; - hasSubjectConditionSet(): boolean; - clearSubjectConditionSet(): SubjectMapping; - - getActionsList(): Array; - setActionsList(value: Array): SubjectMapping; - clearActionsList(): SubjectMapping; - addActions(value?: Action, index?: number): Action; - - getMetadata(): common_common_pb.Metadata | undefined; - setMetadata(value?: common_common_pb.Metadata): SubjectMapping; - hasMetadata(): boolean; - clearMetadata(): SubjectMapping; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SubjectMapping.AsObject; - static toObject(includeInstance: boolean, msg: SubjectMapping): SubjectMapping.AsObject; - static serializeBinaryToWriter(message: SubjectMapping, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SubjectMapping; - static deserializeBinaryFromReader( - message: SubjectMapping, - reader: jspb.BinaryReader - ): SubjectMapping; +/** + * + * Subject Mapping: A Policy assigning Subject Set(s) to a permitted attribute value + action(s) combination + * + * Example: Subjects in sets 1 and 2 are entitled attribute value http://wwww.example.org/attr/example/value/one + * with permitted actions TRANSMIT and DECRYPT + * { + * "id": "someid", + * "attribute_value": {example_one_attribute_value...}, + * "subject_condition_set": {"subject_sets":[{subject_set_1},{subject_set_2}]...}, + * "actions": [{"standard": "STANDARD_ACTION_DECRYPT"}", {"standard": "STANDARD_ACTION_TRANSMIT"}] + * } + * + * @generated from message policy.SubjectMapping + */ +export declare class SubjectMapping extends Message { + /** + * @generated from field: string id = 1; + */ + id: string; + + /** + * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute" + * + * @generated from field: policy.Value attribute_value = 2; + */ + attributeValue?: Value; + + /** + * the reusable SubjectConditionSet mapped to the given Attribute Value + * + * @generated from field: policy.SubjectConditionSet subject_condition_set = 3; + */ + subjectConditionSet?: SubjectConditionSet; + + /** + * The actions permitted by subjects in this mapping + * + * @generated from field: repeated policy.Action actions = 4; + */ + actions: Action[]; + + /** + * @generated from field: common.Metadata metadata = 100; + */ + metadata?: Metadata; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.SubjectMapping"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SubjectMapping; + + static fromJson(jsonValue: JsonValue, options?: Partial): SubjectMapping; + + static fromJsonString(jsonString: string, options?: Partial): SubjectMapping; + + static equals(a: SubjectMapping | PlainMessage | undefined, b: SubjectMapping | PlainMessage | undefined): boolean; } -export namespace SubjectMapping { - export type AsObject = { - id: string; - attributeValue?: Value.AsObject; - subjectConditionSet?: SubjectConditionSet.AsObject; - actionsList: Array; - metadata?: common_common_pb.Metadata.AsObject; - }; +/** + * * + * A Condition defines a rule of + * + * Example: Subjects with a field selected by the flattened selector "'.division'" and a value of "Accounting" or "Marketing": + * { + * "subject_external_selector_value": "'.division'", + * "operator": "SUBJECT_MAPPING_OPERATOR_ENUM_IN", + * "subject_external_values" : ["Accounting", "Marketing"] + * } + * + * Example: Subjects that are not part of the Fantastic Four according to their alias field: + * { + * "subject_external_selector_value": "'.data[0].alias'", + * "operator": "SUBJECT_MAPPING_OPERATOR_ENUM_NOT_IN", + * "subject_external_values" : ["mister_fantastic", "the_thing", "human_torch", "invisible_woman"] + * } + * + * @generated from message policy.Condition + */ +export declare class Condition extends Message { + /** + * a selector for a field value on a flattened Entity Representation (such as from idP/LDAP) + * + * @generated from field: string subject_external_selector_value = 1; + */ + subjectExternalSelectorValue: string; + + /** + * the evaluation operator of relation + * + * @generated from field: policy.SubjectMappingOperatorEnum operator = 2; + */ + operator: SubjectMappingOperatorEnum; + + /** + * list of comparison values for the result of applying the subject_external_selector_value on a flattened Entity Representation (Subject), evaluated by the operator + * + * @generated from field: repeated string subject_external_values = 3; + */ + subjectExternalValues: string[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.Condition"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): Condition; + + static fromJson(jsonValue: JsonValue, options?: Partial): Condition; + + static fromJsonString(jsonString: string, options?: Partial): Condition; + + static equals(a: Condition | PlainMessage | undefined, b: Condition | PlainMessage | undefined): boolean; } -export class Condition extends jspb.Message { - getSubjectExternalSelectorValue(): string; - setSubjectExternalSelectorValue(value: string): Condition; +/** + * A collection of Conditions evaluated by the boolean_operator provided + * + * @generated from message policy.ConditionGroup + */ +export declare class ConditionGroup extends Message { + /** + * @generated from field: repeated policy.Condition conditions = 1; + */ + conditions: Condition[]; - getOperator(): SubjectMappingOperatorEnum; - setOperator(value: SubjectMappingOperatorEnum): Condition; + /** + * the boolean evaluation type across the conditions + * + * @generated from field: policy.ConditionBooleanTypeEnum boolean_operator = 2; + */ + booleanOperator: ConditionBooleanTypeEnum; - getSubjectExternalValuesList(): Array; - setSubjectExternalValuesList(value: Array): Condition; - clearSubjectExternalValuesList(): Condition; - addSubjectExternalValues(value: string, index?: number): Condition; + constructor(data?: PartialMessage); - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Condition.AsObject; - static toObject(includeInstance: boolean, msg: Condition): Condition.AsObject; - static serializeBinaryToWriter(message: Condition, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Condition; - static deserializeBinaryFromReader(message: Condition, reader: jspb.BinaryReader): Condition; -} + static readonly runtime: typeof proto3; + static readonly typeName = "policy.ConditionGroup"; + static readonly fields: FieldList; -export namespace Condition { - export type AsObject = { - subjectExternalSelectorValue: string; - operator: SubjectMappingOperatorEnum; - subjectExternalValuesList: Array; - }; -} + static fromBinary(bytes: Uint8Array, options?: Partial): ConditionGroup; -export class ConditionGroup extends jspb.Message { - getConditionsList(): Array; - setConditionsList(value: Array): ConditionGroup; - clearConditionsList(): ConditionGroup; - addConditions(value?: Condition, index?: number): Condition; - - getBooleanOperator(): ConditionBooleanTypeEnum; - setBooleanOperator(value: ConditionBooleanTypeEnum): ConditionGroup; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ConditionGroup.AsObject; - static toObject(includeInstance: boolean, msg: ConditionGroup): ConditionGroup.AsObject; - static serializeBinaryToWriter(message: ConditionGroup, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ConditionGroup; - static deserializeBinaryFromReader( - message: ConditionGroup, - reader: jspb.BinaryReader - ): ConditionGroup; -} + static fromJson(jsonValue: JsonValue, options?: Partial): ConditionGroup; -export namespace ConditionGroup { - export type AsObject = { - conditionsList: Array; - booleanOperator: ConditionBooleanTypeEnum; - }; -} + static fromJsonString(jsonString: string, options?: Partial): ConditionGroup; -export class SubjectSet extends jspb.Message { - getConditionGroupsList(): Array; - setConditionGroupsList(value: Array): SubjectSet; - clearConditionGroupsList(): SubjectSet; - addConditionGroups(value?: ConditionGroup, index?: number): ConditionGroup; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SubjectSet.AsObject; - static toObject(includeInstance: boolean, msg: SubjectSet): SubjectSet.AsObject; - static serializeBinaryToWriter(message: SubjectSet, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SubjectSet; - static deserializeBinaryFromReader(message: SubjectSet, reader: jspb.BinaryReader): SubjectSet; + static equals(a: ConditionGroup | PlainMessage | undefined, b: ConditionGroup | PlainMessage | undefined): boolean; } -export namespace SubjectSet { - export type AsObject = { - conditionGroupsList: Array; - }; -} +/** + * A collection of Condition Groups + * + * @generated from message policy.SubjectSet + */ +export declare class SubjectSet extends Message { + /** + * multiple Condition Groups are evaluated with AND logic + * + * @generated from field: repeated policy.ConditionGroup condition_groups = 1; + */ + conditionGroups: ConditionGroup[]; -export class SubjectConditionSet extends jspb.Message { - getId(): string; - setId(value: string): SubjectConditionSet; - - getSubjectSetsList(): Array; - setSubjectSetsList(value: Array): SubjectConditionSet; - clearSubjectSetsList(): SubjectConditionSet; - addSubjectSets(value?: SubjectSet, index?: number): SubjectSet; - - getMetadata(): common_common_pb.Metadata | undefined; - setMetadata(value?: common_common_pb.Metadata): SubjectConditionSet; - hasMetadata(): boolean; - clearMetadata(): SubjectConditionSet; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SubjectConditionSet.AsObject; - static toObject(includeInstance: boolean, msg: SubjectConditionSet): SubjectConditionSet.AsObject; - static serializeBinaryToWriter(message: SubjectConditionSet, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SubjectConditionSet; - static deserializeBinaryFromReader( - message: SubjectConditionSet, - reader: jspb.BinaryReader - ): SubjectConditionSet; -} + constructor(data?: PartialMessage); -export namespace SubjectConditionSet { - export type AsObject = { - id: string; - subjectSetsList: Array; - metadata?: common_common_pb.Metadata.AsObject; - }; -} + static readonly runtime: typeof proto3; + static readonly typeName = "policy.SubjectSet"; + static readonly fields: FieldList; -export class SubjectProperty extends jspb.Message { - getExternalSelectorValue(): string; - setExternalSelectorValue(value: string): SubjectProperty; - - getExternalValue(): string; - setExternalValue(value: string): SubjectProperty; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SubjectProperty.AsObject; - static toObject(includeInstance: boolean, msg: SubjectProperty): SubjectProperty.AsObject; - static serializeBinaryToWriter(message: SubjectProperty, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SubjectProperty; - static deserializeBinaryFromReader( - message: SubjectProperty, - reader: jspb.BinaryReader - ): SubjectProperty; -} + static fromBinary(bytes: Uint8Array, options?: Partial): SubjectSet; -export namespace SubjectProperty { - export type AsObject = { - externalSelectorValue: string; - externalValue: string; - }; -} + static fromJson(jsonValue: JsonValue, options?: Partial): SubjectSet; -export class ResourceMapping extends jspb.Message { - getId(): string; - setId(value: string): ResourceMapping; - - getMetadata(): common_common_pb.Metadata | undefined; - setMetadata(value?: common_common_pb.Metadata): ResourceMapping; - hasMetadata(): boolean; - clearMetadata(): ResourceMapping; - - getAttributeValue(): Value | undefined; - setAttributeValue(value?: Value): ResourceMapping; - hasAttributeValue(): boolean; - clearAttributeValue(): ResourceMapping; - - getTermsList(): Array; - setTermsList(value: Array): ResourceMapping; - clearTermsList(): ResourceMapping; - addTerms(value: string, index?: number): ResourceMapping; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ResourceMapping.AsObject; - static toObject(includeInstance: boolean, msg: ResourceMapping): ResourceMapping.AsObject; - static serializeBinaryToWriter(message: ResourceMapping, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ResourceMapping; - static deserializeBinaryFromReader( - message: ResourceMapping, - reader: jspb.BinaryReader - ): ResourceMapping; -} + static fromJsonString(jsonString: string, options?: Partial): SubjectSet; -export namespace ResourceMapping { - export type AsObject = { - id: string; - metadata?: common_common_pb.Metadata.AsObject; - attributeValue?: Value.AsObject; - termsList: Array; - }; + static equals(a: SubjectSet | PlainMessage | undefined, b: SubjectSet | PlainMessage | undefined): boolean; } -export class KeyAccessServer extends jspb.Message { - getId(): string; - setId(value: string): KeyAccessServer; - - getUri(): string; - setUri(value: string): KeyAccessServer; - - getPublicKey(): PublicKey | undefined; - setPublicKey(value?: PublicKey): KeyAccessServer; - hasPublicKey(): boolean; - clearPublicKey(): KeyAccessServer; - - getMetadata(): common_common_pb.Metadata | undefined; - setMetadata(value?: common_common_pb.Metadata): KeyAccessServer; - hasMetadata(): boolean; - clearMetadata(): KeyAccessServer; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): KeyAccessServer.AsObject; - static toObject(includeInstance: boolean, msg: KeyAccessServer): KeyAccessServer.AsObject; - static serializeBinaryToWriter(message: KeyAccessServer, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): KeyAccessServer; - static deserializeBinaryFromReader( - message: KeyAccessServer, - reader: jspb.BinaryReader - ): KeyAccessServer; -} +/** + * + * A container for multiple Subject Sets, each containing Condition Groups, each containing Conditions. Multiple Subject Sets in a SubjectConditionSet + * are evaluated with AND logic. As each Subject Mapping has only one Attribute Value, the SubjectConditionSet is reusable across multiple + * Subject Mappings / Attribute Values and is an independent unit. + * + * @generated from message policy.SubjectConditionSet + */ +export declare class SubjectConditionSet extends Message { + /** + * @generated from field: string id = 1; + */ + id: string; -export namespace KeyAccessServer { - export type AsObject = { - id: string; - uri: string; - publicKey?: PublicKey.AsObject; - metadata?: common_common_pb.Metadata.AsObject; - }; -} + /** + * @generated from field: repeated policy.SubjectSet subject_sets = 3; + */ + subjectSets: SubjectSet[]; + + /** + * @generated from field: common.Metadata metadata = 100; + */ + metadata?: Metadata; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.SubjectConditionSet"; + static readonly fields: FieldList; -export class PublicKey extends jspb.Message { - getRemote(): string; - setRemote(value: string): PublicKey; + static fromBinary(bytes: Uint8Array, options?: Partial): SubjectConditionSet; - getLocal(): string; - setLocal(value: string): PublicKey; + static fromJson(jsonValue: JsonValue, options?: Partial): SubjectConditionSet; - getPublicKeyCase(): PublicKey.PublicKeyCase; + static fromJsonString(jsonString: string, options?: Partial): SubjectConditionSet; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PublicKey.AsObject; - static toObject(includeInstance: boolean, msg: PublicKey): PublicKey.AsObject; - static serializeBinaryToWriter(message: PublicKey, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PublicKey; - static deserializeBinaryFromReader(message: PublicKey, reader: jspb.BinaryReader): PublicKey; + static equals(a: SubjectConditionSet | PlainMessage | undefined, b: SubjectConditionSet | PlainMessage | undefined): boolean; } -export namespace PublicKey { - export type AsObject = { - remote: string; - local: string; - }; - - export enum PublicKeyCase { - PUBLIC_KEY_NOT_SET = 0, - REMOTE = 1, - LOCAL = 2, - } +/** + * + * + * A property of a Subject/Entity as its selector expression -> value result pair. This would mirror external user attributes retrieved + * from an authoritative source such as an IDP (Identity Provider) or User Store. Examples include such ADFS/LDAP, OKTA, etc. + * For now, a valid property must contain both a selector expression & a resulting value. + * + * The external_selector_value is a specifier to select a value from a flattened external representation of an Entity (such as from idP/LDAP), + * and the external_value is the value selected by the external_selector_value on that Entity Representation (Subject Context). These mirror the Condition. + * + * @generated from message policy.SubjectProperty + */ +export declare class SubjectProperty extends Message { + /** + * @generated from field: string external_selector_value = 1; + */ + externalSelectorValue: string; + + /** + * @generated from field: string external_value = 2; + */ + externalValue: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.SubjectProperty"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SubjectProperty; + + static fromJson(jsonValue: JsonValue, options?: Partial): SubjectProperty; + + static fromJsonString(jsonString: string, options?: Partial): SubjectProperty; + + static equals(a: SubjectProperty | PlainMessage | undefined, b: SubjectProperty | PlainMessage | undefined): boolean; } -export enum AttributeRuleTypeEnum { - ATTRIBUTE_RULE_TYPE_ENUM_UNSPECIFIED = 0, - ATTRIBUTE_RULE_TYPE_ENUM_ALL_OF = 1, - ATTRIBUTE_RULE_TYPE_ENUM_ANY_OF = 2, - ATTRIBUTE_RULE_TYPE_ENUM_HIERARCHY = 3, +/** + * + * Resource Mappings (aka Access Control Resource Encodings aka ACRE) are structures supporting the mapping of Resources and Attribute Values + * + * @generated from message policy.ResourceMapping + */ +export declare class ResourceMapping extends Message { + /** + * @generated from field: string id = 1; + */ + id: string; + + /** + * @generated from field: common.Metadata metadata = 2; + */ + metadata?: Metadata; + + /** + * @generated from field: policy.Value attribute_value = 3; + */ + attributeValue?: Value; + + /** + * @generated from field: repeated string terms = 4; + */ + terms: string[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.ResourceMapping"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ResourceMapping; + + static fromJson(jsonValue: JsonValue, options?: Partial): ResourceMapping; + + static fromJsonString(jsonString: string, options?: Partial): ResourceMapping; + + static equals(a: ResourceMapping | PlainMessage | undefined, b: ResourceMapping | PlainMessage | undefined): boolean; } -export enum SubjectMappingOperatorEnum { - SUBJECT_MAPPING_OPERATOR_ENUM_UNSPECIFIED = 0, - SUBJECT_MAPPING_OPERATOR_ENUM_IN = 1, - SUBJECT_MAPPING_OPERATOR_ENUM_NOT_IN = 2, + +/** + * + * Key Access Server Registry + * + * @generated from message policy.KeyAccessServer + */ +export declare class KeyAccessServer extends Message { + /** + * @generated from field: string id = 1; + */ + id: string; + + /** + * Address of a KAS instance + * + * @generated from field: string uri = 2; + */ + uri: string; + + /** + * @generated from field: policy.PublicKey public_key = 3; + */ + publicKey?: PublicKey; + + /** + * Common metadata + * + * @generated from field: common.Metadata metadata = 100; + */ + metadata?: Metadata; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.KeyAccessServer"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): KeyAccessServer; + + static fromJson(jsonValue: JsonValue, options?: Partial): KeyAccessServer; + + static fromJsonString(jsonString: string, options?: Partial): KeyAccessServer; + + static equals(a: KeyAccessServer | PlainMessage | undefined, b: KeyAccessServer | PlainMessage | undefined): boolean; } -export enum ConditionBooleanTypeEnum { - CONDITION_BOOLEAN_TYPE_ENUM_UNSPECIFIED = 0, - CONDITION_BOOLEAN_TYPE_ENUM_AND = 1, - CONDITION_BOOLEAN_TYPE_ENUM_OR = 2, + +/** + * @generated from message policy.PublicKey + */ +export declare class PublicKey extends Message { + /** + * @generated from oneof policy.PublicKey.public_key + */ + publicKey: { + /** + * kas public key url - optional since can also be retrieved via public key + * + * @generated from field: string remote = 1; + */ + value: string; + case: "remote"; + } | { + /** + * public key - optional since can also be retrieved via url + * + * @generated from field: string local = 2; + */ + value: string; + case: "local"; + } | { case: undefined; value?: undefined }; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.PublicKey"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): PublicKey; + + static fromJson(jsonValue: JsonValue, options?: Partial): PublicKey; + + static fromJsonString(jsonString: string, options?: Partial): PublicKey; + + static equals(a: PublicKey | PlainMessage | undefined, b: PublicKey | PlainMessage | undefined): boolean; } + diff --git a/lib/src/platform/policy/objects_pb.ts b/lib/src/platform/policy/objects_pb.ts deleted file mode 100644 index 79333d9b..00000000 --- a/lib/src/platform/policy/objects_pb.ts +++ /dev/null @@ -1,1033 +0,0 @@ -// @generated by protoc-gen-es v1.9.0 with parameter "target=ts" -// @generated from file policy/objects.proto (package policy, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import type { - BinaryReadOptions, - FieldList, - JsonReadOptions, - JsonValue, - PartialMessage, - PlainMessage, -} from '@bufbuild/protobuf'; -import { BoolValue, Message, proto3 } from '@bufbuild/protobuf'; -import { Metadata } from '../common/common_pb.js'; - -/** - * buflint ENUM_VALUE_PREFIX: to make sure that C++ scoping rules aren't violated when users add new enum values to an enum in a given package - * - * @generated from enum policy.AttributeRuleTypeEnum - */ -export enum AttributeRuleTypeEnum { - /** - * @generated from enum value: ATTRIBUTE_RULE_TYPE_ENUM_UNSPECIFIED = 0; - */ - UNSPECIFIED = 0, - - /** - * @generated from enum value: ATTRIBUTE_RULE_TYPE_ENUM_ALL_OF = 1; - */ - ALL_OF = 1, - - /** - * @generated from enum value: ATTRIBUTE_RULE_TYPE_ENUM_ANY_OF = 2; - */ - ANY_OF = 2, - - /** - * @generated from enum value: ATTRIBUTE_RULE_TYPE_ENUM_HIERARCHY = 3; - */ - HIERARCHY = 3, -} -// Retrieve enum metadata with: proto3.getEnumType(AttributeRuleTypeEnum) -proto3.util.setEnumType(AttributeRuleTypeEnum, 'policy.AttributeRuleTypeEnum', [ - { no: 0, name: 'ATTRIBUTE_RULE_TYPE_ENUM_UNSPECIFIED' }, - { no: 1, name: 'ATTRIBUTE_RULE_TYPE_ENUM_ALL_OF' }, - { no: 2, name: 'ATTRIBUTE_RULE_TYPE_ENUM_ANY_OF' }, - { no: 3, name: 'ATTRIBUTE_RULE_TYPE_ENUM_HIERARCHY' }, -]); - -/** - * buflint ENUM_VALUE_PREFIX: to make sure that C++ scoping rules aren't violated when users add new enum values to an enum in a given package - * - * @generated from enum policy.SubjectMappingOperatorEnum - */ -export enum SubjectMappingOperatorEnum { - /** - * @generated from enum value: SUBJECT_MAPPING_OPERATOR_ENUM_UNSPECIFIED = 0; - */ - UNSPECIFIED = 0, - - /** - * @generated from enum value: SUBJECT_MAPPING_OPERATOR_ENUM_IN = 1; - */ - IN = 1, - - /** - * @generated from enum value: SUBJECT_MAPPING_OPERATOR_ENUM_NOT_IN = 2; - */ - NOT_IN = 2, -} -// Retrieve enum metadata with: proto3.getEnumType(SubjectMappingOperatorEnum) -proto3.util.setEnumType(SubjectMappingOperatorEnum, 'policy.SubjectMappingOperatorEnum', [ - { no: 0, name: 'SUBJECT_MAPPING_OPERATOR_ENUM_UNSPECIFIED' }, - { no: 1, name: 'SUBJECT_MAPPING_OPERATOR_ENUM_IN' }, - { no: 2, name: 'SUBJECT_MAPPING_OPERATOR_ENUM_NOT_IN' }, -]); - -/** - * buflint ENUM_VALUE_PREFIX: to make sure that C++ scoping rules aren't violated when users add new enum values to an enum in a given package - * - * @generated from enum policy.ConditionBooleanTypeEnum - */ -export enum ConditionBooleanTypeEnum { - /** - * @generated from enum value: CONDITION_BOOLEAN_TYPE_ENUM_UNSPECIFIED = 0; - */ - UNSPECIFIED = 0, - - /** - * @generated from enum value: CONDITION_BOOLEAN_TYPE_ENUM_AND = 1; - */ - AND = 1, - - /** - * @generated from enum value: CONDITION_BOOLEAN_TYPE_ENUM_OR = 2; - */ - OR = 2, -} -// Retrieve enum metadata with: proto3.getEnumType(ConditionBooleanTypeEnum) -proto3.util.setEnumType(ConditionBooleanTypeEnum, 'policy.ConditionBooleanTypeEnum', [ - { no: 0, name: 'CONDITION_BOOLEAN_TYPE_ENUM_UNSPECIFIED' }, - { no: 1, name: 'CONDITION_BOOLEAN_TYPE_ENUM_AND' }, - { no: 2, name: 'CONDITION_BOOLEAN_TYPE_ENUM_OR' }, -]); - -/** - * @generated from message policy.Namespace - */ -export class Namespace extends Message { - /** - * generated uuid in database - * - * @generated from field: string id = 1; - */ - id = ''; - - /** - * used to partition Attribute Definitions, support by namespace AuthN and enable federation - * - * @generated from field: string name = 2; - */ - name = ''; - - /** - * @generated from field: string fqn = 3; - */ - fqn = ''; - - /** - * active by default until explicitly deactivated - * - * @generated from field: google.protobuf.BoolValue active = 4; - */ - active?: boolean; - - /** - * @generated from field: common.Metadata metadata = 5; - */ - metadata?: Metadata; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.Namespace'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { no: 2, name: 'name', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { no: 3, name: 'fqn', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { no: 4, name: 'active', kind: 'message', T: BoolValue }, - { no: 5, name: 'metadata', kind: 'message', T: Metadata }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Namespace { - return new Namespace().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Namespace { - return new Namespace().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Namespace { - return new Namespace().fromJsonString(jsonString, options); - } - - static equals( - a: Namespace | PlainMessage | undefined, - b: Namespace | PlainMessage | undefined - ): boolean { - return proto3.util.equals(Namespace, a, b); - } -} - -/** - * @generated from message policy.Attribute - */ -export class Attribute extends Message { - /** - * @generated from field: string id = 1; - */ - id = ''; - - /** - * namespace of the attribute - * - * @generated from field: policy.Namespace namespace = 2; - */ - namespace?: Namespace; - - /** - * attribute name - * - * @generated from field: string name = 3; - */ - name = ''; - - /** - * attribute rule enum - * - * @generated from field: policy.AttributeRuleTypeEnum rule = 4; - */ - rule = AttributeRuleTypeEnum.UNSPECIFIED; - - /** - * @generated from field: repeated policy.Value values = 5; - */ - values: Value[] = []; - - /** - * @generated from field: repeated policy.KeyAccessServer grants = 6; - */ - grants: KeyAccessServer[] = []; - - /** - * @generated from field: string fqn = 7; - */ - fqn = ''; - - /** - * active by default until explicitly deactivated - * - * @generated from field: google.protobuf.BoolValue active = 8; - */ - active?: boolean; - - /** - * Common metadata - * - * @generated from field: common.Metadata metadata = 100; - */ - metadata?: Metadata; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.Attribute'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { no: 2, name: 'namespace', kind: 'message', T: Namespace }, - { no: 3, name: 'name', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { no: 4, name: 'rule', kind: 'enum', T: proto3.getEnumType(AttributeRuleTypeEnum) }, - { no: 5, name: 'values', kind: 'message', T: Value, repeated: true }, - { no: 6, name: 'grants', kind: 'message', T: KeyAccessServer, repeated: true }, - { no: 7, name: 'fqn', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { no: 8, name: 'active', kind: 'message', T: BoolValue }, - { no: 100, name: 'metadata', kind: 'message', T: Metadata }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Attribute { - return new Attribute().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Attribute { - return new Attribute().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Attribute { - return new Attribute().fromJsonString(jsonString, options); - } - - static equals( - a: Attribute | PlainMessage | undefined, - b: Attribute | PlainMessage | undefined - ): boolean { - return proto3.util.equals(Attribute, a, b); - } -} - -/** - * @generated from message policy.Value - */ -export class Value extends Message { - /** - * generated uuid in database - * - * @generated from field: string id = 1; - */ - id = ''; - - /** - * @generated from field: policy.Attribute attribute = 2; - */ - attribute?: Attribute; - - /** - * @generated from field: string value = 3; - */ - value = ''; - - /** - * list of attribute values that this value is related to (attribute group) - * - * @generated from field: repeated policy.Value members = 4; - */ - members: Value[] = []; - - /** - * list of key access servers - * - * @generated from field: repeated policy.KeyAccessServer grants = 5; - */ - grants: KeyAccessServer[] = []; - - /** - * @generated from field: string fqn = 6; - */ - fqn = ''; - - /** - * active by default until explicitly deactivated - * - * @generated from field: google.protobuf.BoolValue active = 7; - */ - active?: boolean; - - /** - * subject mapping - * - * @generated from field: repeated policy.SubjectMapping subject_mappings = 8; - */ - subjectMappings: SubjectMapping[] = []; - - /** - * Common metadata - * - * @generated from field: common.Metadata metadata = 100; - */ - metadata?: Metadata; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.Value'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { no: 2, name: 'attribute', kind: 'message', T: Attribute }, - { no: 3, name: 'value', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { no: 4, name: 'members', kind: 'message', T: Value, repeated: true }, - { no: 5, name: 'grants', kind: 'message', T: KeyAccessServer, repeated: true }, - { no: 6, name: 'fqn', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { no: 7, name: 'active', kind: 'message', T: BoolValue }, - { no: 8, name: 'subject_mappings', kind: 'message', T: SubjectMapping, repeated: true }, - { no: 100, name: 'metadata', kind: 'message', T: Metadata }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Value { - return new Value().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Value { - return new Value().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Value { - return new Value().fromJsonString(jsonString, options); - } - - static equals( - a: Value | PlainMessage | undefined, - b: Value | PlainMessage | undefined - ): boolean { - return proto3.util.equals(Value, a, b); - } -} - -/** - * An action an entity can take - * - * @generated from message policy.Action - */ -export class Action extends Message { - /** - * @generated from oneof policy.Action.value - */ - value: - | { - /** - * @generated from field: policy.Action.StandardAction standard = 1; - */ - value: Action_StandardAction; - case: 'standard'; - } - | { - /** - * @generated from field: string custom = 2; - */ - value: string; - case: 'custom'; - } - | { case: undefined; value?: undefined } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.Action'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { - no: 1, - name: 'standard', - kind: 'enum', - T: proto3.getEnumType(Action_StandardAction), - oneof: 'value', - }, - { no: 2, name: 'custom', kind: 'scalar', T: 9 /* ScalarType.STRING */, oneof: 'value' }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Action { - return new Action().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Action { - return new Action().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Action { - return new Action().fromJsonString(jsonString, options); - } - - static equals( - a: Action | PlainMessage | undefined, - b: Action | PlainMessage | undefined - ): boolean { - return proto3.util.equals(Action, a, b); - } -} - -/** - * Standard actions supported by the platform - * - * @generated from enum policy.Action.StandardAction - */ -export enum Action_StandardAction { - /** - * @generated from enum value: STANDARD_ACTION_UNSPECIFIED = 0; - */ - UNSPECIFIED = 0, - - /** - * @generated from enum value: STANDARD_ACTION_DECRYPT = 1; - */ - DECRYPT = 1, - - /** - * @generated from enum value: STANDARD_ACTION_TRANSMIT = 2; - */ - TRANSMIT = 2, -} -// Retrieve enum metadata with: proto3.getEnumType(Action_StandardAction) -proto3.util.setEnumType(Action_StandardAction, 'policy.Action.StandardAction', [ - { no: 0, name: 'STANDARD_ACTION_UNSPECIFIED' }, - { no: 1, name: 'STANDARD_ACTION_DECRYPT' }, - { no: 2, name: 'STANDARD_ACTION_TRANSMIT' }, -]); - -/** - * - * Subject Mapping: A Policy assigning Subject Set(s) to a permitted attribute value + action(s) combination - * - * Example: Subjects in sets 1 and 2 are entitled attribute value http://wwww.example.org/attr/example/value/one - * with permitted actions TRANSMIT and DECRYPT - * { - * "id": "someid", - * "attribute_value": {example_one_attribute_value...}, - * "subject_condition_set": {"subject_sets":[{subject_set_1},{subject_set_2}]...}, - * "actions": [{"standard": "STANDARD_ACTION_DECRYPT"}", {"standard": "STANDARD_ACTION_TRANSMIT"}] - * } - * - * @generated from message policy.SubjectMapping - */ -export class SubjectMapping extends Message { - /** - * @generated from field: string id = 1; - */ - id = ''; - - /** - * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute" - * - * @generated from field: policy.Value attribute_value = 2; - */ - attributeValue?: Value; - - /** - * the reusable SubjectConditionSet mapped to the given Attribute Value - * - * @generated from field: policy.SubjectConditionSet subject_condition_set = 3; - */ - subjectConditionSet?: SubjectConditionSet; - - /** - * The actions permitted by subjects in this mapping - * - * @generated from field: repeated policy.Action actions = 4; - */ - actions: Action[] = []; - - /** - * @generated from field: common.Metadata metadata = 100; - */ - metadata?: Metadata; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.SubjectMapping'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { no: 2, name: 'attribute_value', kind: 'message', T: Value }, - { no: 3, name: 'subject_condition_set', kind: 'message', T: SubjectConditionSet }, - { no: 4, name: 'actions', kind: 'message', T: Action, repeated: true }, - { no: 100, name: 'metadata', kind: 'message', T: Metadata }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SubjectMapping { - return new SubjectMapping().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SubjectMapping { - return new SubjectMapping().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SubjectMapping { - return new SubjectMapping().fromJsonString(jsonString, options); - } - - static equals( - a: SubjectMapping | PlainMessage | undefined, - b: SubjectMapping | PlainMessage | undefined - ): boolean { - return proto3.util.equals(SubjectMapping, a, b); - } -} - -/** - * * - * A Condition defines a rule of - * - * Example: Subjects with a field selected by the flattened selector "'.division'" and a value of "Accounting" or "Marketing": - * { - * "subject_external_selector_value": "'.division'", - * "operator": "SUBJECT_MAPPING_OPERATOR_ENUM_IN", - * "subject_external_values" : ["Accounting", "Marketing"] - * } - * - * Example: Subjects that are not part of the Fantastic Four according to their alias field: - * { - * "subject_external_selector_value": "'.data[0].alias'", - * "operator": "SUBJECT_MAPPING_OPERATOR_ENUM_NOT_IN", - * "subject_external_values" : ["mister_fantastic", "the_thing", "human_torch", "invisible_woman"] - * } - * - * @generated from message policy.Condition - */ -export class Condition extends Message { - /** - * a selector for a field value on a flattened Entity Representation (such as from idP/LDAP) - * - * @generated from field: string subject_external_selector_value = 1; - */ - subjectExternalSelectorValue = ''; - - /** - * the evaluation operator of relation - * - * @generated from field: policy.SubjectMappingOperatorEnum operator = 2; - */ - operator = SubjectMappingOperatorEnum.UNSPECIFIED; - - /** - * list of comparison values for the result of applying the subject_external_selector_value on a flattened Entity Representation (Subject), evaluated by the operator - * - * @generated from field: repeated string subject_external_values = 3; - */ - subjectExternalValues: string[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.Condition'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { - no: 1, - name: 'subject_external_selector_value', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - }, - { no: 2, name: 'operator', kind: 'enum', T: proto3.getEnumType(SubjectMappingOperatorEnum) }, - { - no: 3, - name: 'subject_external_values', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - repeated: true, - }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Condition { - return new Condition().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Condition { - return new Condition().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Condition { - return new Condition().fromJsonString(jsonString, options); - } - - static equals( - a: Condition | PlainMessage | undefined, - b: Condition | PlainMessage | undefined - ): boolean { - return proto3.util.equals(Condition, a, b); - } -} - -/** - * A collection of Conditions evaluated by the boolean_operator provided - * - * @generated from message policy.ConditionGroup - */ -export class ConditionGroup extends Message { - /** - * @generated from field: repeated policy.Condition conditions = 1; - */ - conditions: Condition[] = []; - - /** - * the boolean evaluation type across the conditions - * - * @generated from field: policy.ConditionBooleanTypeEnum boolean_operator = 2; - */ - booleanOperator = ConditionBooleanTypeEnum.UNSPECIFIED; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.ConditionGroup'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'conditions', kind: 'message', T: Condition, repeated: true }, - { - no: 2, - name: 'boolean_operator', - kind: 'enum', - T: proto3.getEnumType(ConditionBooleanTypeEnum), - }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ConditionGroup { - return new ConditionGroup().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ConditionGroup { - return new ConditionGroup().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ConditionGroup { - return new ConditionGroup().fromJsonString(jsonString, options); - } - - static equals( - a: ConditionGroup | PlainMessage | undefined, - b: ConditionGroup | PlainMessage | undefined - ): boolean { - return proto3.util.equals(ConditionGroup, a, b); - } -} - -/** - * A collection of Condition Groups - * - * @generated from message policy.SubjectSet - */ -export class SubjectSet extends Message { - /** - * multiple Condition Groups are evaluated with AND logic - * - * @generated from field: repeated policy.ConditionGroup condition_groups = 1; - */ - conditionGroups: ConditionGroup[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.SubjectSet'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'condition_groups', kind: 'message', T: ConditionGroup, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SubjectSet { - return new SubjectSet().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SubjectSet { - return new SubjectSet().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SubjectSet { - return new SubjectSet().fromJsonString(jsonString, options); - } - - static equals( - a: SubjectSet | PlainMessage | undefined, - b: SubjectSet | PlainMessage | undefined - ): boolean { - return proto3.util.equals(SubjectSet, a, b); - } -} - -/** - * - * A container for multiple Subject Sets, each containing Condition Groups, each containing Conditions. Multiple Subject Sets in a SubjectConditionSet - * are evaluated with AND logic. As each Subject Mapping has only one Attribute Value, the SubjectConditionSet is reusable across multiple - * Subject Mappings / Attribute Values and is an independent unit. - * - * @generated from message policy.SubjectConditionSet - */ -export class SubjectConditionSet extends Message { - /** - * @generated from field: string id = 1; - */ - id = ''; - - /** - * @generated from field: repeated policy.SubjectSet subject_sets = 3; - */ - subjectSets: SubjectSet[] = []; - - /** - * @generated from field: common.Metadata metadata = 100; - */ - metadata?: Metadata; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.SubjectConditionSet'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { no: 3, name: 'subject_sets', kind: 'message', T: SubjectSet, repeated: true }, - { no: 100, name: 'metadata', kind: 'message', T: Metadata }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SubjectConditionSet { - return new SubjectConditionSet().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SubjectConditionSet { - return new SubjectConditionSet().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): SubjectConditionSet { - return new SubjectConditionSet().fromJsonString(jsonString, options); - } - - static equals( - a: SubjectConditionSet | PlainMessage | undefined, - b: SubjectConditionSet | PlainMessage | undefined - ): boolean { - return proto3.util.equals(SubjectConditionSet, a, b); - } -} - -/** - * - * - * A property of a Subject/Entity as its selector expression -> value result pair. This would mirror external user attributes retrieved - * from an authoritative source such as an IDP (Identity Provider) or User Store. Examples include such ADFS/LDAP, OKTA, etc. - * For now, a valid property must contain both a selector expression & a resulting value. - * - * The external_selector_value is a specifier to select a value from a flattened external representation of an Entity (such as from idP/LDAP), - * and the external_value is the value selected by the external_selector_value on that Entity Representation (Subject Context). These mirror the Condition. - * - * @generated from message policy.SubjectProperty - */ -export class SubjectProperty extends Message { - /** - * @generated from field: string external_selector_value = 1; - */ - externalSelectorValue = ''; - - /** - * @generated from field: string external_value = 2; - */ - externalValue = ''; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.SubjectProperty'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'external_selector_value', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { no: 2, name: 'external_value', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SubjectProperty { - return new SubjectProperty().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SubjectProperty { - return new SubjectProperty().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SubjectProperty { - return new SubjectProperty().fromJsonString(jsonString, options); - } - - static equals( - a: SubjectProperty | PlainMessage | undefined, - b: SubjectProperty | PlainMessage | undefined - ): boolean { - return proto3.util.equals(SubjectProperty, a, b); - } -} - -/** - * - * Resource Mappings (aka Access Control Resource Encodings aka ACRE) are structures supporting the mapping of Resources and Attribute Values - * - * @generated from message policy.ResourceMapping - */ -export class ResourceMapping extends Message { - /** - * @generated from field: string id = 1; - */ - id = ''; - - /** - * @generated from field: common.Metadata metadata = 2; - */ - metadata?: Metadata; - - /** - * @generated from field: policy.Value attribute_value = 3; - */ - attributeValue?: Value; - - /** - * @generated from field: repeated string terms = 4; - */ - terms: string[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.ResourceMapping'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { no: 2, name: 'metadata', kind: 'message', T: Metadata }, - { no: 3, name: 'attribute_value', kind: 'message', T: Value }, - { no: 4, name: 'terms', kind: 'scalar', T: 9 /* ScalarType.STRING */, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ResourceMapping { - return new ResourceMapping().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ResourceMapping { - return new ResourceMapping().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ResourceMapping { - return new ResourceMapping().fromJsonString(jsonString, options); - } - - static equals( - a: ResourceMapping | PlainMessage | undefined, - b: ResourceMapping | PlainMessage | undefined - ): boolean { - return proto3.util.equals(ResourceMapping, a, b); - } -} - -/** - * - * Key Access Server Registry - * - * @generated from message policy.KeyAccessServer - */ -export class KeyAccessServer extends Message { - /** - * @generated from field: string id = 1; - */ - id = ''; - - /** - * Address of a KAS instance - * - * @generated from field: string uri = 2; - */ - uri = ''; - - /** - * @generated from field: policy.PublicKey public_key = 3; - */ - publicKey?: PublicKey; - - /** - * Common metadata - * - * @generated from field: common.Metadata metadata = 100; - */ - metadata?: Metadata; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.KeyAccessServer'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { no: 2, name: 'uri', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { no: 3, name: 'public_key', kind: 'message', T: PublicKey }, - { no: 100, name: 'metadata', kind: 'message', T: Metadata }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): KeyAccessServer { - return new KeyAccessServer().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): KeyAccessServer { - return new KeyAccessServer().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): KeyAccessServer { - return new KeyAccessServer().fromJsonString(jsonString, options); - } - - static equals( - a: KeyAccessServer | PlainMessage | undefined, - b: KeyAccessServer | PlainMessage | undefined - ): boolean { - return proto3.util.equals(KeyAccessServer, a, b); - } -} - -/** - * @generated from message policy.PublicKey - */ -export class PublicKey extends Message { - /** - * @generated from oneof policy.PublicKey.public_key - */ - publicKey: - | { - /** - * kas public key url - optional since can also be retrieved via public key - * - * @generated from field: string remote = 1; - */ - value: string; - case: 'remote'; - } - | { - /** - * public key - optional since can also be retrieved via url - * - * @generated from field: string local = 2; - */ - value: string; - case: 'local'; - } - | { case: undefined; value?: undefined } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.PublicKey'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'remote', kind: 'scalar', T: 9 /* ScalarType.STRING */, oneof: 'public_key' }, - { no: 2, name: 'local', kind: 'scalar', T: 9 /* ScalarType.STRING */, oneof: 'public_key' }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PublicKey { - return new PublicKey().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): PublicKey { - return new PublicKey().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): PublicKey { - return new PublicKey().fromJsonString(jsonString, options); - } - - static equals( - a: PublicKey | PlainMessage | undefined, - b: PublicKey | PlainMessage | undefined - ): boolean { - return proto3.util.equals(PublicKey, a, b); - } -} diff --git a/lib/src/platform/policy/resourcemapping/Resource_mappingServiceClientPb.ts b/lib/src/platform/policy/resourcemapping/Resource_mappingServiceClientPb.ts deleted file mode 100644 index 74b0ee50..00000000 --- a/lib/src/platform/policy/resourcemapping/Resource_mappingServiceClientPb.ts +++ /dev/null @@ -1,290 +0,0 @@ -/** - * @fileoverview gRPC-Web generated client stub for policy.resourcemapping - * @enhanceable - * @public - */ - -// Code generated by protoc-gen-grpc-web. DO NOT EDIT. -// versions: -// protoc-gen-grpc-web v1.5.0 -// protoc v0.0.0 -// source: policy/resourcemapping/resource_mapping.proto - -/* eslint-disable */ -// @ts-nocheck - -import * as grpcWeb from 'grpc-web'; - -import * as policy_resourcemapping_resource_mapping_pb from '../../policy/resourcemapping/resource_mapping_pb'; // proto import: "policy/resourcemapping/resource_mapping.proto" - -export class ResourceMappingServiceClient { - client_: grpcWeb.AbstractClientBase; - hostname_: string; - credentials_: null | { [index: string]: string }; - options_: null | { [index: string]: any }; - - constructor( - hostname: string, - credentials?: null | { [index: string]: string }, - options?: null | { [index: string]: any } - ) { - if (!options) options = {}; - if (!credentials) credentials = {}; - options['format'] = 'binary'; - - this.client_ = new grpcWeb.GrpcWebClientBase(options); - this.hostname_ = hostname.replace(/\/+$/, ''); - this.credentials_ = credentials; - this.options_ = options; - } - - methodDescriptorListResourceMappings = new grpcWeb.MethodDescriptor( - '/policy.resourcemapping.ResourceMappingService/ListResourceMappings', - grpcWeb.MethodType.UNARY, - policy_resourcemapping_resource_mapping_pb.ListResourceMappingsRequest, - policy_resourcemapping_resource_mapping_pb.ListResourceMappingsResponse, - (request: policy_resourcemapping_resource_mapping_pb.ListResourceMappingsRequest) => { - return request.serializeBinary(); - }, - policy_resourcemapping_resource_mapping_pb.ListResourceMappingsResponse.deserializeBinary - ); - - listResourceMappings( - request: policy_resourcemapping_resource_mapping_pb.ListResourceMappingsRequest, - metadata?: grpcWeb.Metadata | null - ): Promise; - - listResourceMappings( - request: policy_resourcemapping_resource_mapping_pb.ListResourceMappingsRequest, - metadata: grpcWeb.Metadata | null, - callback: ( - err: grpcWeb.RpcError, - response: policy_resourcemapping_resource_mapping_pb.ListResourceMappingsResponse - ) => void - ): grpcWeb.ClientReadableStream; - - listResourceMappings( - request: policy_resourcemapping_resource_mapping_pb.ListResourceMappingsRequest, - metadata?: grpcWeb.Metadata | null, - callback?: ( - err: grpcWeb.RpcError, - response: policy_resourcemapping_resource_mapping_pb.ListResourceMappingsResponse - ) => void - ) { - if (callback !== undefined) { - return this.client_.rpcCall( - this.hostname_ + '/policy.resourcemapping.ResourceMappingService/ListResourceMappings', - request, - metadata || {}, - this.methodDescriptorListResourceMappings, - callback - ); - } - return this.client_.unaryCall( - this.hostname_ + '/policy.resourcemapping.ResourceMappingService/ListResourceMappings', - request, - metadata || {}, - this.methodDescriptorListResourceMappings - ); - } - - methodDescriptorGetResourceMapping = new grpcWeb.MethodDescriptor( - '/policy.resourcemapping.ResourceMappingService/GetResourceMapping', - grpcWeb.MethodType.UNARY, - policy_resourcemapping_resource_mapping_pb.GetResourceMappingRequest, - policy_resourcemapping_resource_mapping_pb.GetResourceMappingResponse, - (request: policy_resourcemapping_resource_mapping_pb.GetResourceMappingRequest) => { - return request.serializeBinary(); - }, - policy_resourcemapping_resource_mapping_pb.GetResourceMappingResponse.deserializeBinary - ); - - getResourceMapping( - request: policy_resourcemapping_resource_mapping_pb.GetResourceMappingRequest, - metadata?: grpcWeb.Metadata | null - ): Promise; - - getResourceMapping( - request: policy_resourcemapping_resource_mapping_pb.GetResourceMappingRequest, - metadata: grpcWeb.Metadata | null, - callback: ( - err: grpcWeb.RpcError, - response: policy_resourcemapping_resource_mapping_pb.GetResourceMappingResponse - ) => void - ): grpcWeb.ClientReadableStream; - - getResourceMapping( - request: policy_resourcemapping_resource_mapping_pb.GetResourceMappingRequest, - metadata?: grpcWeb.Metadata | null, - callback?: ( - err: grpcWeb.RpcError, - response: policy_resourcemapping_resource_mapping_pb.GetResourceMappingResponse - ) => void - ) { - if (callback !== undefined) { - return this.client_.rpcCall( - this.hostname_ + '/policy.resourcemapping.ResourceMappingService/GetResourceMapping', - request, - metadata || {}, - this.methodDescriptorGetResourceMapping, - callback - ); - } - return this.client_.unaryCall( - this.hostname_ + '/policy.resourcemapping.ResourceMappingService/GetResourceMapping', - request, - metadata || {}, - this.methodDescriptorGetResourceMapping - ); - } - - methodDescriptorCreateResourceMapping = new grpcWeb.MethodDescriptor( - '/policy.resourcemapping.ResourceMappingService/CreateResourceMapping', - grpcWeb.MethodType.UNARY, - policy_resourcemapping_resource_mapping_pb.CreateResourceMappingRequest, - policy_resourcemapping_resource_mapping_pb.CreateResourceMappingResponse, - (request: policy_resourcemapping_resource_mapping_pb.CreateResourceMappingRequest) => { - return request.serializeBinary(); - }, - policy_resourcemapping_resource_mapping_pb.CreateResourceMappingResponse.deserializeBinary - ); - - createResourceMapping( - request: policy_resourcemapping_resource_mapping_pb.CreateResourceMappingRequest, - metadata?: grpcWeb.Metadata | null - ): Promise; - - createResourceMapping( - request: policy_resourcemapping_resource_mapping_pb.CreateResourceMappingRequest, - metadata: grpcWeb.Metadata | null, - callback: ( - err: grpcWeb.RpcError, - response: policy_resourcemapping_resource_mapping_pb.CreateResourceMappingResponse - ) => void - ): grpcWeb.ClientReadableStream; - - createResourceMapping( - request: policy_resourcemapping_resource_mapping_pb.CreateResourceMappingRequest, - metadata?: grpcWeb.Metadata | null, - callback?: ( - err: grpcWeb.RpcError, - response: policy_resourcemapping_resource_mapping_pb.CreateResourceMappingResponse - ) => void - ) { - if (callback !== undefined) { - return this.client_.rpcCall( - this.hostname_ + '/policy.resourcemapping.ResourceMappingService/CreateResourceMapping', - request, - metadata || {}, - this.methodDescriptorCreateResourceMapping, - callback - ); - } - return this.client_.unaryCall( - this.hostname_ + '/policy.resourcemapping.ResourceMappingService/CreateResourceMapping', - request, - metadata || {}, - this.methodDescriptorCreateResourceMapping - ); - } - - methodDescriptorUpdateResourceMapping = new grpcWeb.MethodDescriptor( - '/policy.resourcemapping.ResourceMappingService/UpdateResourceMapping', - grpcWeb.MethodType.UNARY, - policy_resourcemapping_resource_mapping_pb.UpdateResourceMappingRequest, - policy_resourcemapping_resource_mapping_pb.UpdateResourceMappingResponse, - (request: policy_resourcemapping_resource_mapping_pb.UpdateResourceMappingRequest) => { - return request.serializeBinary(); - }, - policy_resourcemapping_resource_mapping_pb.UpdateResourceMappingResponse.deserializeBinary - ); - - updateResourceMapping( - request: policy_resourcemapping_resource_mapping_pb.UpdateResourceMappingRequest, - metadata?: grpcWeb.Metadata | null - ): Promise; - - updateResourceMapping( - request: policy_resourcemapping_resource_mapping_pb.UpdateResourceMappingRequest, - metadata: grpcWeb.Metadata | null, - callback: ( - err: grpcWeb.RpcError, - response: policy_resourcemapping_resource_mapping_pb.UpdateResourceMappingResponse - ) => void - ): grpcWeb.ClientReadableStream; - - updateResourceMapping( - request: policy_resourcemapping_resource_mapping_pb.UpdateResourceMappingRequest, - metadata?: grpcWeb.Metadata | null, - callback?: ( - err: grpcWeb.RpcError, - response: policy_resourcemapping_resource_mapping_pb.UpdateResourceMappingResponse - ) => void - ) { - if (callback !== undefined) { - return this.client_.rpcCall( - this.hostname_ + '/policy.resourcemapping.ResourceMappingService/UpdateResourceMapping', - request, - metadata || {}, - this.methodDescriptorUpdateResourceMapping, - callback - ); - } - return this.client_.unaryCall( - this.hostname_ + '/policy.resourcemapping.ResourceMappingService/UpdateResourceMapping', - request, - metadata || {}, - this.methodDescriptorUpdateResourceMapping - ); - } - - methodDescriptorDeleteResourceMapping = new grpcWeb.MethodDescriptor( - '/policy.resourcemapping.ResourceMappingService/DeleteResourceMapping', - grpcWeb.MethodType.UNARY, - policy_resourcemapping_resource_mapping_pb.DeleteResourceMappingRequest, - policy_resourcemapping_resource_mapping_pb.DeleteResourceMappingResponse, - (request: policy_resourcemapping_resource_mapping_pb.DeleteResourceMappingRequest) => { - return request.serializeBinary(); - }, - policy_resourcemapping_resource_mapping_pb.DeleteResourceMappingResponse.deserializeBinary - ); - - deleteResourceMapping( - request: policy_resourcemapping_resource_mapping_pb.DeleteResourceMappingRequest, - metadata?: grpcWeb.Metadata | null - ): Promise; - - deleteResourceMapping( - request: policy_resourcemapping_resource_mapping_pb.DeleteResourceMappingRequest, - metadata: grpcWeb.Metadata | null, - callback: ( - err: grpcWeb.RpcError, - response: policy_resourcemapping_resource_mapping_pb.DeleteResourceMappingResponse - ) => void - ): grpcWeb.ClientReadableStream; - - deleteResourceMapping( - request: policy_resourcemapping_resource_mapping_pb.DeleteResourceMappingRequest, - metadata?: grpcWeb.Metadata | null, - callback?: ( - err: grpcWeb.RpcError, - response: policy_resourcemapping_resource_mapping_pb.DeleteResourceMappingResponse - ) => void - ) { - if (callback !== undefined) { - return this.client_.rpcCall( - this.hostname_ + '/policy.resourcemapping.ResourceMappingService/DeleteResourceMapping', - request, - metadata || {}, - this.methodDescriptorDeleteResourceMapping, - callback - ); - } - return this.client_.unaryCall( - this.hostname_ + '/policy.resourcemapping.ResourceMappingService/DeleteResourceMapping', - request, - metadata || {}, - this.methodDescriptorDeleteResourceMapping - ); - } -} diff --git a/lib/src/platform/policy/resourcemapping/resource_mapping_connect.ts b/lib/src/platform/policy/resourcemapping/resource_mapping_connect.ts deleted file mode 100644 index 8e8e3dca..00000000 --- a/lib/src/platform/policy/resourcemapping/resource_mapping_connect.ts +++ /dev/null @@ -1,269 +0,0 @@ -// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=ts" -// @generated from file policy/resourcemapping/resource_mapping.proto (package policy.resourcemapping, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { - CreateResourceMappingRequest, - CreateResourceMappingResponse, - DeleteResourceMappingRequest, - DeleteResourceMappingResponse, - GetResourceMappingRequest, - GetResourceMappingResponse, - ListResourceMappingsRequest, - ListResourceMappingsResponse, - UpdateResourceMappingRequest, - UpdateResourceMappingResponse, -} from './resource_mapping_pb.js'; -import { MethodKind } from '@bufbuild/protobuf'; - -/** - * - * Resource Mappings - * - * @generated from service policy.resourcemapping.ResourceMappingService - */ -export const ResourceMappingService = { - typeName: 'policy.resourcemapping.ResourceMappingService', - methods: { - /** - * - * Request Example: - * - empty body - * - * Response Example: - * { - * "resource_mappings": [ - * { - * "terms": [ - * "TOPSECRET", - * "TS", - * ], - * "id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e", - * "metadata": { - * "labels": [], - * "created_at": { - * "seconds": "1706103276", - * "nanos": 510718000 - * }, - * "updated_at": { - * "seconds": "1706107873", - * "nanos": 399786000 - * }, - * "description": "" - * }, - * "attribute_value": { - * "members": [], - * "id": "f0d1d4f6-bff9-45fd-8170-607b6b559349", - * "metadata": null, - * "attribute_id": "", - * "value": "value1" - * } - * } - * ] - * } - * - * @generated from rpc policy.resourcemapping.ResourceMappingService.ListResourceMappings - */ - listResourceMappings: { - name: 'ListResourceMappings', - I: ListResourceMappingsRequest, - O: ListResourceMappingsResponse, - kind: MethodKind.Unary, - }, - /** - * - * Request Example: - * { - * "id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e" - * } - * - * Response Example: - * { - * "resource_mapping": { - * "terms": [ - * "TOPSECRET", - * "TS", - * ], - * "id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e", - * "metadata": { - * "labels": [], - * "created_at": { - * "seconds": "1706103276", - * "nanos": 510718000 - * }, - * "updated_at": { - * "seconds": "1706107873", - * "nanos": 399786000 - * }, - * "description": "" - * }, - * "attribute_value": { - * "members": [], - * "id": "f0d1d4f6-bff9-45fd-8170-607b6b559349", - * "metadata": null, - * "attribute_id": "", - * "value": "value1" - * } - * } - * } - * - * @generated from rpc policy.resourcemapping.ResourceMappingService.GetResourceMapping - */ - getResourceMapping: { - name: 'GetResourceMapping', - I: GetResourceMappingRequest, - O: GetResourceMappingResponse, - kind: MethodKind.Unary, - }, - /** - * - * Request Example: - * { - * "resource_mapping": { - * "attribute_value_id": "f0d1d4f6-bff9-45fd-8170-607b6b559349", - * "terms": [ - * "TOPSECRET", - * "TS", - * ] - * } - * } - * - * Response Example: - * { - * "resource_mapping": { - * "terms": [ - * "TOPSECRET", - * "TS", - * ], - * "id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e", - * "metadata": { - * "labels": [], - * "created_at": { - * "seconds": "1706103276", - * "nanos": 510718000 - * }, - * "updated_at": { - * "seconds": "1706107873", - * "nanos": 399786000 - * }, - * "description": "" - * }, - * "attribute_value": { - * "members": [], - * "id": "f0d1d4f6-bff9-45fd-8170-607b6b559349", - * "metadata": null, - * "attribute_id": "", - * "value": "value1" - * } - * } - * } - * - * @generated from rpc policy.resourcemapping.ResourceMappingService.CreateResourceMapping - */ - createResourceMapping: { - name: 'CreateResourceMapping', - I: CreateResourceMappingRequest, - O: CreateResourceMappingResponse, - kind: MethodKind.Unary, - }, - /** - * - * Request Example: - * { - * "id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e", - * "resource_mapping": { - * "attribute_value_id": "f0d1d4f6-bff9-45fd-8170-607b6b559349", - * "terms": [ - * "TOPSECRET", - * "TS", - * "NEWTERM" - * ] - * } - * } - * - * Response Example: - * { - * "resource_mapping": { - * "terms": [ - * "TOPSECRET", - * "TS", - * ], - * "id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e", - * "metadata": { - * "labels": [], - * "created_at": { - * "seconds": "1706103276", - * "nanos": 510718000 - * }, - * "updated_at": { - * "seconds": "1706107873", - * "nanos": 399786000 - * }, - * "description": "" - * }, - * "attribute_value": { - * "members": [], - * "id": "f0d1d4f6-bff9-45fd-8170-607b6b559349", - * "metadata": null, - * "attribute_id": "", - * "value": "value1" - * } - * } - * } - * - * @generated from rpc policy.resourcemapping.ResourceMappingService.UpdateResourceMapping - */ - updateResourceMapping: { - name: 'UpdateResourceMapping', - I: UpdateResourceMappingRequest, - O: UpdateResourceMappingResponse, - kind: MethodKind.Unary, - }, - /** - * - * Request Example: - * { - * "id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e" - * } - * - * Response Example: - * { - * "resource_mapping": { - * "terms": [ - * "TOPSECRET", - * "TS", - * ], - * "id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e", - * "metadata": { - * "labels": [], - * "created_at": { - * "seconds": "1706103276", - * "nanos": 510718000 - * }, - * "updated_at": { - * "seconds": "1706107873", - * "nanos": 399786000 - * }, - * "description": "" - * }, - * "attribute_value": { - * "members": [], - * "id": "f0d1d4f6-bff9-45fd-8170-607b6b559349", - * "metadata": null, - * "attribute_id": "", - * "value": "value1" - * } - * } - * } - * - * @generated from rpc policy.resourcemapping.ResourceMappingService.DeleteResourceMapping - */ - deleteResourceMapping: { - name: 'DeleteResourceMapping', - I: DeleteResourceMappingRequest, - O: DeleteResourceMappingResponse, - kind: MethodKind.Unary, - }, - }, -} as const; diff --git a/lib/src/platform/policy/resourcemapping/resource_mapping_pb.d.ts b/lib/src/platform/policy/resourcemapping/resource_mapping_pb.d.ts index c673cdac..5b5f5fbb 100644 --- a/lib/src/platform/policy/resourcemapping/resource_mapping_pb.d.ts +++ b/lib/src/platform/policy/resourcemapping/resource_mapping_pb.d.ts @@ -1,320 +1,314 @@ -import * as jspb from 'google-protobuf'; - -import * as buf_validate_validate_pb from '../../buf/validate/validate_pb'; // proto import: "buf/validate/validate.proto" -import * as google_api_annotations_pb from '../../google/api/annotations_pb'; // proto import: "google/api/annotations.proto" -import * as common_common_pb from '../../common/common_pb'; // proto import: "common/common.proto" -import * as policy_objects_pb from '../../policy/objects_pb'; // proto import: "policy/objects.proto" - -export class ListResourceMappingsRequest extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListResourceMappingsRequest.AsObject; - static toObject( - includeInstance: boolean, - msg: ListResourceMappingsRequest - ): ListResourceMappingsRequest.AsObject; - static serializeBinaryToWriter( - message: ListResourceMappingsRequest, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): ListResourceMappingsRequest; - static deserializeBinaryFromReader( - message: ListResourceMappingsRequest, - reader: jspb.BinaryReader - ): ListResourceMappingsRequest; -} +// @generated by protoc-gen-es v1.9.0 with parameter "target=js+dts,import_extension=none" +// @generated from file policy/resourcemapping/resource_mapping.proto (package policy.resourcemapping, syntax proto3) +/* eslint-disable */ +// @ts-nocheck -export namespace ListResourceMappingsRequest { - export type AsObject = {}; -} +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; +import type { ResourceMapping } from "../objects_pb"; +import type { MetadataMutable, MetadataUpdateEnum } from "../../common/common_pb"; -export class ListResourceMappingsResponse extends jspb.Message { - getResourceMappingsList(): Array; - setResourceMappingsList( - value: Array - ): ListResourceMappingsResponse; - clearResourceMappingsList(): ListResourceMappingsResponse; - addResourceMappings( - value?: policy_objects_pb.ResourceMapping, - index?: number - ): policy_objects_pb.ResourceMapping; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListResourceMappingsResponse.AsObject; - static toObject( - includeInstance: boolean, - msg: ListResourceMappingsResponse - ): ListResourceMappingsResponse.AsObject; - static serializeBinaryToWriter( - message: ListResourceMappingsResponse, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): ListResourceMappingsResponse; - static deserializeBinaryFromReader( - message: ListResourceMappingsResponse, - reader: jspb.BinaryReader - ): ListResourceMappingsResponse; -} +/** + * @generated from message policy.resourcemapping.ListResourceMappingsRequest + */ +export declare class ListResourceMappingsRequest extends Message { + constructor(data?: PartialMessage); -export namespace ListResourceMappingsResponse { - export type AsObject = { - resourceMappingsList: Array; - }; -} + static readonly runtime: typeof proto3; + static readonly typeName = "policy.resourcemapping.ListResourceMappingsRequest"; + static readonly fields: FieldList; -export class GetResourceMappingRequest extends jspb.Message { - getId(): string; - setId(value: string): GetResourceMappingRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetResourceMappingRequest.AsObject; - static toObject( - includeInstance: boolean, - msg: GetResourceMappingRequest - ): GetResourceMappingRequest.AsObject; - static serializeBinaryToWriter( - message: GetResourceMappingRequest, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): GetResourceMappingRequest; - static deserializeBinaryFromReader( - message: GetResourceMappingRequest, - reader: jspb.BinaryReader - ): GetResourceMappingRequest; -} + static fromBinary(bytes: Uint8Array, options?: Partial): ListResourceMappingsRequest; -export namespace GetResourceMappingRequest { - export type AsObject = { - id: string; - }; -} + static fromJson(jsonValue: JsonValue, options?: Partial): ListResourceMappingsRequest; -export class GetResourceMappingResponse extends jspb.Message { - getResourceMapping(): policy_objects_pb.ResourceMapping | undefined; - setResourceMapping(value?: policy_objects_pb.ResourceMapping): GetResourceMappingResponse; - hasResourceMapping(): boolean; - clearResourceMapping(): GetResourceMappingResponse; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetResourceMappingResponse.AsObject; - static toObject( - includeInstance: boolean, - msg: GetResourceMappingResponse - ): GetResourceMappingResponse.AsObject; - static serializeBinaryToWriter( - message: GetResourceMappingResponse, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): GetResourceMappingResponse; - static deserializeBinaryFromReader( - message: GetResourceMappingResponse, - reader: jspb.BinaryReader - ): GetResourceMappingResponse; -} + static fromJsonString(jsonString: string, options?: Partial): ListResourceMappingsRequest; -export namespace GetResourceMappingResponse { - export type AsObject = { - resourceMapping?: policy_objects_pb.ResourceMapping.AsObject; - }; + static equals(a: ListResourceMappingsRequest | PlainMessage | undefined, b: ListResourceMappingsRequest | PlainMessage | undefined): boolean; } -export class CreateResourceMappingRequest extends jspb.Message { - getAttributeValueId(): string; - setAttributeValueId(value: string): CreateResourceMappingRequest; - - getTermsList(): Array; - setTermsList(value: Array): CreateResourceMappingRequest; - clearTermsList(): CreateResourceMappingRequest; - addTerms(value: string, index?: number): CreateResourceMappingRequest; - - getMetadata(): common_common_pb.MetadataMutable | undefined; - setMetadata(value?: common_common_pb.MetadataMutable): CreateResourceMappingRequest; - hasMetadata(): boolean; - clearMetadata(): CreateResourceMappingRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateResourceMappingRequest.AsObject; - static toObject( - includeInstance: boolean, - msg: CreateResourceMappingRequest - ): CreateResourceMappingRequest.AsObject; - static serializeBinaryToWriter( - message: CreateResourceMappingRequest, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): CreateResourceMappingRequest; - static deserializeBinaryFromReader( - message: CreateResourceMappingRequest, - reader: jspb.BinaryReader - ): CreateResourceMappingRequest; -} +/** + * @generated from message policy.resourcemapping.ListResourceMappingsResponse + */ +export declare class ListResourceMappingsResponse extends Message { + /** + * @generated from field: repeated policy.ResourceMapping resource_mappings = 1; + */ + resourceMappings: ResourceMapping[]; -export namespace CreateResourceMappingRequest { - export type AsObject = { - attributeValueId: string; - termsList: Array; - metadata?: common_common_pb.MetadataMutable.AsObject; - }; -} + constructor(data?: PartialMessage); -export class CreateResourceMappingResponse extends jspb.Message { - getResourceMapping(): policy_objects_pb.ResourceMapping | undefined; - setResourceMapping(value?: policy_objects_pb.ResourceMapping): CreateResourceMappingResponse; - hasResourceMapping(): boolean; - clearResourceMapping(): CreateResourceMappingResponse; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateResourceMappingResponse.AsObject; - static toObject( - includeInstance: boolean, - msg: CreateResourceMappingResponse - ): CreateResourceMappingResponse.AsObject; - static serializeBinaryToWriter( - message: CreateResourceMappingResponse, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): CreateResourceMappingResponse; - static deserializeBinaryFromReader( - message: CreateResourceMappingResponse, - reader: jspb.BinaryReader - ): CreateResourceMappingResponse; -} + static readonly runtime: typeof proto3; + static readonly typeName = "policy.resourcemapping.ListResourceMappingsResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ListResourceMappingsResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): ListResourceMappingsResponse; + + static fromJsonString(jsonString: string, options?: Partial): ListResourceMappingsResponse; -export namespace CreateResourceMappingResponse { - export type AsObject = { - resourceMapping?: policy_objects_pb.ResourceMapping.AsObject; - }; + static equals(a: ListResourceMappingsResponse | PlainMessage | undefined, b: ListResourceMappingsResponse | PlainMessage | undefined): boolean; } -export class UpdateResourceMappingRequest extends jspb.Message { - getId(): string; - setId(value: string): UpdateResourceMappingRequest; - - getAttributeValueId(): string; - setAttributeValueId(value: string): UpdateResourceMappingRequest; - - getTermsList(): Array; - setTermsList(value: Array): UpdateResourceMappingRequest; - clearTermsList(): UpdateResourceMappingRequest; - addTerms(value: string, index?: number): UpdateResourceMappingRequest; - - getMetadata(): common_common_pb.MetadataMutable | undefined; - setMetadata(value?: common_common_pb.MetadataMutable): UpdateResourceMappingRequest; - hasMetadata(): boolean; - clearMetadata(): UpdateResourceMappingRequest; - - getMetadataUpdateBehavior(): common_common_pb.MetadataUpdateEnum; - setMetadataUpdateBehavior( - value: common_common_pb.MetadataUpdateEnum - ): UpdateResourceMappingRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UpdateResourceMappingRequest.AsObject; - static toObject( - includeInstance: boolean, - msg: UpdateResourceMappingRequest - ): UpdateResourceMappingRequest.AsObject; - static serializeBinaryToWriter( - message: UpdateResourceMappingRequest, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): UpdateResourceMappingRequest; - static deserializeBinaryFromReader( - message: UpdateResourceMappingRequest, - reader: jspb.BinaryReader - ): UpdateResourceMappingRequest; +/** + * @generated from message policy.resourcemapping.GetResourceMappingRequest + */ +export declare class GetResourceMappingRequest extends Message { + /** + * @generated from field: string id = 1; + */ + id: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.resourcemapping.GetResourceMappingRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): GetResourceMappingRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): GetResourceMappingRequest; + + static fromJsonString(jsonString: string, options?: Partial): GetResourceMappingRequest; + + static equals(a: GetResourceMappingRequest | PlainMessage | undefined, b: GetResourceMappingRequest | PlainMessage | undefined): boolean; } -export namespace UpdateResourceMappingRequest { - export type AsObject = { - id: string; - attributeValueId: string; - termsList: Array; - metadata?: common_common_pb.MetadataMutable.AsObject; - metadataUpdateBehavior: common_common_pb.MetadataUpdateEnum; - }; +/** + * @generated from message policy.resourcemapping.GetResourceMappingResponse + */ +export declare class GetResourceMappingResponse extends Message { + /** + * @generated from field: policy.ResourceMapping resource_mapping = 1; + */ + resourceMapping?: ResourceMapping; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.resourcemapping.GetResourceMappingResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): GetResourceMappingResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): GetResourceMappingResponse; + + static fromJsonString(jsonString: string, options?: Partial): GetResourceMappingResponse; + + static equals(a: GetResourceMappingResponse | PlainMessage | undefined, b: GetResourceMappingResponse | PlainMessage | undefined): boolean; } -export class UpdateResourceMappingResponse extends jspb.Message { - getResourceMapping(): policy_objects_pb.ResourceMapping | undefined; - setResourceMapping(value?: policy_objects_pb.ResourceMapping): UpdateResourceMappingResponse; - hasResourceMapping(): boolean; - clearResourceMapping(): UpdateResourceMappingResponse; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UpdateResourceMappingResponse.AsObject; - static toObject( - includeInstance: boolean, - msg: UpdateResourceMappingResponse - ): UpdateResourceMappingResponse.AsObject; - static serializeBinaryToWriter( - message: UpdateResourceMappingResponse, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): UpdateResourceMappingResponse; - static deserializeBinaryFromReader( - message: UpdateResourceMappingResponse, - reader: jspb.BinaryReader - ): UpdateResourceMappingResponse; +/** + * + * ### Request + * + * grpcurl -plaintext -d @ localhost:8080 policy.resourcemapping.ResourceMappingService/CreateResourceMapping < { + /** + * Required + * + * @generated from field: string attribute_value_id = 1; + */ + attributeValueId: string; + + /** + * @generated from field: repeated string terms = 2; + */ + terms: string[]; + + /** + * Optional + * + * @generated from field: common.MetadataMutable metadata = 100; + */ + metadata?: MetadataMutable; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.resourcemapping.CreateResourceMappingRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): CreateResourceMappingRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): CreateResourceMappingRequest; + + static fromJsonString(jsonString: string, options?: Partial): CreateResourceMappingRequest; + + static equals(a: CreateResourceMappingRequest | PlainMessage | undefined, b: CreateResourceMappingRequest | PlainMessage | undefined): boolean; } -export namespace UpdateResourceMappingResponse { - export type AsObject = { - resourceMapping?: policy_objects_pb.ResourceMapping.AsObject; - }; +/** + * @generated from message policy.resourcemapping.CreateResourceMappingResponse + */ +export declare class CreateResourceMappingResponse extends Message { + /** + * @generated from field: policy.ResourceMapping resource_mapping = 1; + */ + resourceMapping?: ResourceMapping; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.resourcemapping.CreateResourceMappingResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): CreateResourceMappingResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): CreateResourceMappingResponse; + + static fromJsonString(jsonString: string, options?: Partial): CreateResourceMappingResponse; + + static equals(a: CreateResourceMappingResponse | PlainMessage | undefined, b: CreateResourceMappingResponse | PlainMessage | undefined): boolean; } -export class DeleteResourceMappingRequest extends jspb.Message { - getId(): string; - setId(value: string): DeleteResourceMappingRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DeleteResourceMappingRequest.AsObject; - static toObject( - includeInstance: boolean, - msg: DeleteResourceMappingRequest - ): DeleteResourceMappingRequest.AsObject; - static serializeBinaryToWriter( - message: DeleteResourceMappingRequest, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): DeleteResourceMappingRequest; - static deserializeBinaryFromReader( - message: DeleteResourceMappingRequest, - reader: jspb.BinaryReader - ): DeleteResourceMappingRequest; +/** + * @generated from message policy.resourcemapping.UpdateResourceMappingRequest + */ +export declare class UpdateResourceMappingRequest extends Message { + /** + * Required + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * Optional + * + * @generated from field: string attribute_value_id = 4; + */ + attributeValueId: string; + + /** + * @generated from field: repeated string terms = 5; + */ + terms: string[]; + + /** + * Common Metadata + * + * @generated from field: common.MetadataMutable metadata = 100; + */ + metadata?: MetadataMutable; + + /** + * @generated from field: common.MetadataUpdateEnum metadata_update_behavior = 101; + */ + metadataUpdateBehavior: MetadataUpdateEnum; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.resourcemapping.UpdateResourceMappingRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): UpdateResourceMappingRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): UpdateResourceMappingRequest; + + static fromJsonString(jsonString: string, options?: Partial): UpdateResourceMappingRequest; + + static equals(a: UpdateResourceMappingRequest | PlainMessage | undefined, b: UpdateResourceMappingRequest | PlainMessage | undefined): boolean; } -export namespace DeleteResourceMappingRequest { - export type AsObject = { - id: string; - }; +/** + * @generated from message policy.resourcemapping.UpdateResourceMappingResponse + */ +export declare class UpdateResourceMappingResponse extends Message { + /** + * @generated from field: policy.ResourceMapping resource_mapping = 1; + */ + resourceMapping?: ResourceMapping; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.resourcemapping.UpdateResourceMappingResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): UpdateResourceMappingResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): UpdateResourceMappingResponse; + + static fromJsonString(jsonString: string, options?: Partial): UpdateResourceMappingResponse; + + static equals(a: UpdateResourceMappingResponse | PlainMessage | undefined, b: UpdateResourceMappingResponse | PlainMessage | undefined): boolean; } -export class DeleteResourceMappingResponse extends jspb.Message { - getResourceMapping(): policy_objects_pb.ResourceMapping | undefined; - setResourceMapping(value?: policy_objects_pb.ResourceMapping): DeleteResourceMappingResponse; - hasResourceMapping(): boolean; - clearResourceMapping(): DeleteResourceMappingResponse; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DeleteResourceMappingResponse.AsObject; - static toObject( - includeInstance: boolean, - msg: DeleteResourceMappingResponse - ): DeleteResourceMappingResponse.AsObject; - static serializeBinaryToWriter( - message: DeleteResourceMappingResponse, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): DeleteResourceMappingResponse; - static deserializeBinaryFromReader( - message: DeleteResourceMappingResponse, - reader: jspb.BinaryReader - ): DeleteResourceMappingResponse; +/** + * @generated from message policy.resourcemapping.DeleteResourceMappingRequest + */ +export declare class DeleteResourceMappingRequest extends Message { + /** + * @generated from field: string id = 1; + */ + id: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.resourcemapping.DeleteResourceMappingRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): DeleteResourceMappingRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): DeleteResourceMappingRequest; + + static fromJsonString(jsonString: string, options?: Partial): DeleteResourceMappingRequest; + + static equals(a: DeleteResourceMappingRequest | PlainMessage | undefined, b: DeleteResourceMappingRequest | PlainMessage | undefined): boolean; } -export namespace DeleteResourceMappingResponse { - export type AsObject = { - resourceMapping?: policy_objects_pb.ResourceMapping.AsObject; - }; +/** + * @generated from message policy.resourcemapping.DeleteResourceMappingResponse + */ +export declare class DeleteResourceMappingResponse extends Message { + /** + * @generated from field: policy.ResourceMapping resource_mapping = 1; + */ + resourceMapping?: ResourceMapping; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.resourcemapping.DeleteResourceMappingResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): DeleteResourceMappingResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): DeleteResourceMappingResponse; + + static fromJsonString(jsonString: string, options?: Partial): DeleteResourceMappingResponse; + + static equals(a: DeleteResourceMappingResponse | PlainMessage | undefined, b: DeleteResourceMappingResponse | PlainMessage | undefined): boolean; } + diff --git a/lib/src/platform/policy/resourcemapping/resource_mapping_pb.ts b/lib/src/platform/policy/resourcemapping/resource_mapping_pb.ts deleted file mode 100644 index 44189dd3..00000000 --- a/lib/src/platform/policy/resourcemapping/resource_mapping_pb.ts +++ /dev/null @@ -1,579 +0,0 @@ -// @generated by protoc-gen-es v1.9.0 with parameter "target=ts" -// @generated from file policy/resourcemapping/resource_mapping.proto (package policy.resourcemapping, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import type { - BinaryReadOptions, - FieldList, - JsonReadOptions, - JsonValue, - PartialMessage, - PlainMessage, -} from '@bufbuild/protobuf'; -import { Message, proto3 } from '@bufbuild/protobuf'; -import { ResourceMapping } from '../objects_pb.js'; -import { MetadataMutable, MetadataUpdateEnum } from '../../common/common_pb.js'; - -/** - * @generated from message policy.resourcemapping.ListResourceMappingsRequest - */ -export class ListResourceMappingsRequest extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.resourcemapping.ListResourceMappingsRequest'; - static readonly fields: FieldList = proto3.util.newFieldList(() => []); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): ListResourceMappingsRequest { - return new ListResourceMappingsRequest().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): ListResourceMappingsRequest { - return new ListResourceMappingsRequest().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): ListResourceMappingsRequest { - return new ListResourceMappingsRequest().fromJsonString(jsonString, options); - } - - static equals( - a: ListResourceMappingsRequest | PlainMessage | undefined, - b: ListResourceMappingsRequest | PlainMessage | undefined - ): boolean { - return proto3.util.equals(ListResourceMappingsRequest, a, b); - } -} - -/** - * @generated from message policy.resourcemapping.ListResourceMappingsResponse - */ -export class ListResourceMappingsResponse extends Message { - /** - * @generated from field: repeated policy.ResourceMapping resource_mappings = 1; - */ - resourceMappings: ResourceMapping[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.resourcemapping.ListResourceMappingsResponse'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'resource_mappings', kind: 'message', T: ResourceMapping, repeated: true }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): ListResourceMappingsResponse { - return new ListResourceMappingsResponse().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): ListResourceMappingsResponse { - return new ListResourceMappingsResponse().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): ListResourceMappingsResponse { - return new ListResourceMappingsResponse().fromJsonString(jsonString, options); - } - - static equals( - a: ListResourceMappingsResponse | PlainMessage | undefined, - b: ListResourceMappingsResponse | PlainMessage | undefined - ): boolean { - return proto3.util.equals(ListResourceMappingsResponse, a, b); - } -} - -/** - * @generated from message policy.resourcemapping.GetResourceMappingRequest - */ -export class GetResourceMappingRequest extends Message { - /** - * @generated from field: string id = 1; - */ - id = ''; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.resourcemapping.GetResourceMappingRequest'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): GetResourceMappingRequest { - return new GetResourceMappingRequest().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): GetResourceMappingRequest { - return new GetResourceMappingRequest().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): GetResourceMappingRequest { - return new GetResourceMappingRequest().fromJsonString(jsonString, options); - } - - static equals( - a: GetResourceMappingRequest | PlainMessage | undefined, - b: GetResourceMappingRequest | PlainMessage | undefined - ): boolean { - return proto3.util.equals(GetResourceMappingRequest, a, b); - } -} - -/** - * @generated from message policy.resourcemapping.GetResourceMappingResponse - */ -export class GetResourceMappingResponse extends Message { - /** - * @generated from field: policy.ResourceMapping resource_mapping = 1; - */ - resourceMapping?: ResourceMapping; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.resourcemapping.GetResourceMappingResponse'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'resource_mapping', kind: 'message', T: ResourceMapping }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): GetResourceMappingResponse { - return new GetResourceMappingResponse().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): GetResourceMappingResponse { - return new GetResourceMappingResponse().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): GetResourceMappingResponse { - return new GetResourceMappingResponse().fromJsonString(jsonString, options); - } - - static equals( - a: GetResourceMappingResponse | PlainMessage | undefined, - b: GetResourceMappingResponse | PlainMessage | undefined - ): boolean { - return proto3.util.equals(GetResourceMappingResponse, a, b); - } -} - -/** - * - * ### Request - * - * grpcurl -plaintext -d @ localhost:8080 policy.resourcemapping.ResourceMappingService/CreateResourceMapping < { - /** - * Required - * - * @generated from field: string attribute_value_id = 1; - */ - attributeValueId = ''; - - /** - * @generated from field: repeated string terms = 2; - */ - terms: string[] = []; - - /** - * Optional - * - * @generated from field: common.MetadataMutable metadata = 100; - */ - metadata?: MetadataMutable; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.resourcemapping.CreateResourceMappingRequest'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'attribute_value_id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { no: 2, name: 'terms', kind: 'scalar', T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 100, name: 'metadata', kind: 'message', T: MetadataMutable }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): CreateResourceMappingRequest { - return new CreateResourceMappingRequest().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): CreateResourceMappingRequest { - return new CreateResourceMappingRequest().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): CreateResourceMappingRequest { - return new CreateResourceMappingRequest().fromJsonString(jsonString, options); - } - - static equals( - a: CreateResourceMappingRequest | PlainMessage | undefined, - b: CreateResourceMappingRequest | PlainMessage | undefined - ): boolean { - return proto3.util.equals(CreateResourceMappingRequest, a, b); - } -} - -/** - * @generated from message policy.resourcemapping.CreateResourceMappingResponse - */ -export class CreateResourceMappingResponse extends Message { - /** - * @generated from field: policy.ResourceMapping resource_mapping = 1; - */ - resourceMapping?: ResourceMapping; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.resourcemapping.CreateResourceMappingResponse'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'resource_mapping', kind: 'message', T: ResourceMapping }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): CreateResourceMappingResponse { - return new CreateResourceMappingResponse().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): CreateResourceMappingResponse { - return new CreateResourceMappingResponse().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): CreateResourceMappingResponse { - return new CreateResourceMappingResponse().fromJsonString(jsonString, options); - } - - static equals( - a: CreateResourceMappingResponse | PlainMessage | undefined, - b: CreateResourceMappingResponse | PlainMessage | undefined - ): boolean { - return proto3.util.equals(CreateResourceMappingResponse, a, b); - } -} - -/** - * @generated from message policy.resourcemapping.UpdateResourceMappingRequest - */ -export class UpdateResourceMappingRequest extends Message { - /** - * Required - * - * @generated from field: string id = 1; - */ - id = ''; - - /** - * Optional - * - * @generated from field: string attribute_value_id = 4; - */ - attributeValueId = ''; - - /** - * @generated from field: repeated string terms = 5; - */ - terms: string[] = []; - - /** - * Common Metadata - * - * @generated from field: common.MetadataMutable metadata = 100; - */ - metadata?: MetadataMutable; - - /** - * @generated from field: common.MetadataUpdateEnum metadata_update_behavior = 101; - */ - metadataUpdateBehavior = MetadataUpdateEnum.UNSPECIFIED; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.resourcemapping.UpdateResourceMappingRequest'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { no: 4, name: 'attribute_value_id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { no: 5, name: 'terms', kind: 'scalar', T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 100, name: 'metadata', kind: 'message', T: MetadataMutable }, - { - no: 101, - name: 'metadata_update_behavior', - kind: 'enum', - T: proto3.getEnumType(MetadataUpdateEnum), - }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): UpdateResourceMappingRequest { - return new UpdateResourceMappingRequest().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): UpdateResourceMappingRequest { - return new UpdateResourceMappingRequest().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): UpdateResourceMappingRequest { - return new UpdateResourceMappingRequest().fromJsonString(jsonString, options); - } - - static equals( - a: UpdateResourceMappingRequest | PlainMessage | undefined, - b: UpdateResourceMappingRequest | PlainMessage | undefined - ): boolean { - return proto3.util.equals(UpdateResourceMappingRequest, a, b); - } -} - -/** - * @generated from message policy.resourcemapping.UpdateResourceMappingResponse - */ -export class UpdateResourceMappingResponse extends Message { - /** - * @generated from field: policy.ResourceMapping resource_mapping = 1; - */ - resourceMapping?: ResourceMapping; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.resourcemapping.UpdateResourceMappingResponse'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'resource_mapping', kind: 'message', T: ResourceMapping }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): UpdateResourceMappingResponse { - return new UpdateResourceMappingResponse().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): UpdateResourceMappingResponse { - return new UpdateResourceMappingResponse().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): UpdateResourceMappingResponse { - return new UpdateResourceMappingResponse().fromJsonString(jsonString, options); - } - - static equals( - a: UpdateResourceMappingResponse | PlainMessage | undefined, - b: UpdateResourceMappingResponse | PlainMessage | undefined - ): boolean { - return proto3.util.equals(UpdateResourceMappingResponse, a, b); - } -} - -/** - * @generated from message policy.resourcemapping.DeleteResourceMappingRequest - */ -export class DeleteResourceMappingRequest extends Message { - /** - * @generated from field: string id = 1; - */ - id = ''; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.resourcemapping.DeleteResourceMappingRequest'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): DeleteResourceMappingRequest { - return new DeleteResourceMappingRequest().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): DeleteResourceMappingRequest { - return new DeleteResourceMappingRequest().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): DeleteResourceMappingRequest { - return new DeleteResourceMappingRequest().fromJsonString(jsonString, options); - } - - static equals( - a: DeleteResourceMappingRequest | PlainMessage | undefined, - b: DeleteResourceMappingRequest | PlainMessage | undefined - ): boolean { - return proto3.util.equals(DeleteResourceMappingRequest, a, b); - } -} - -/** - * @generated from message policy.resourcemapping.DeleteResourceMappingResponse - */ -export class DeleteResourceMappingResponse extends Message { - /** - * @generated from field: policy.ResourceMapping resource_mapping = 1; - */ - resourceMapping?: ResourceMapping; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.resourcemapping.DeleteResourceMappingResponse'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'resource_mapping', kind: 'message', T: ResourceMapping }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): DeleteResourceMappingResponse { - return new DeleteResourceMappingResponse().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): DeleteResourceMappingResponse { - return new DeleteResourceMappingResponse().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): DeleteResourceMappingResponse { - return new DeleteResourceMappingResponse().fromJsonString(jsonString, options); - } - - static equals( - a: DeleteResourceMappingResponse | PlainMessage | undefined, - b: DeleteResourceMappingResponse | PlainMessage | undefined - ): boolean { - return proto3.util.equals(DeleteResourceMappingResponse, a, b); - } -} diff --git a/lib/src/platform/policy/selectors_pb.d.ts b/lib/src/platform/policy/selectors_pb.d.ts index 857bb0d2..7bb3ab59 100644 --- a/lib/src/platform/policy/selectors_pb.d.ts +++ b/lib/src/platform/policy/selectors_pb.d.ts @@ -1,259 +1,269 @@ -import * as jspb from 'google-protobuf'; - -export class AttributeNamespaceSelector extends jspb.Message { - getWithAttributes(): AttributeNamespaceSelector.AttributeSelector | undefined; - setWithAttributes( - value?: AttributeNamespaceSelector.AttributeSelector - ): AttributeNamespaceSelector; - hasWithAttributes(): boolean; - clearWithAttributes(): AttributeNamespaceSelector; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AttributeNamespaceSelector.AsObject; - static toObject( - includeInstance: boolean, - msg: AttributeNamespaceSelector - ): AttributeNamespaceSelector.AsObject; - static serializeBinaryToWriter( - message: AttributeNamespaceSelector, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): AttributeNamespaceSelector; - static deserializeBinaryFromReader( - message: AttributeNamespaceSelector, - reader: jspb.BinaryReader - ): AttributeNamespaceSelector; +// @generated by protoc-gen-es v1.9.0 with parameter "target=js+dts,import_extension=none" +// @generated from file policy/selectors.proto (package policy, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; + +/** + * @generated from message policy.AttributeNamespaceSelector + */ +export declare class AttributeNamespaceSelector extends Message { + /** + * @generated from field: policy.AttributeNamespaceSelector.AttributeSelector with_attributes = 10; + */ + withAttributes?: AttributeNamespaceSelector_AttributeSelector; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.AttributeNamespaceSelector"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): AttributeNamespaceSelector; + + static fromJson(jsonValue: JsonValue, options?: Partial): AttributeNamespaceSelector; + + static fromJsonString(jsonString: string, options?: Partial): AttributeNamespaceSelector; + + static equals(a: AttributeNamespaceSelector | PlainMessage | undefined, b: AttributeNamespaceSelector | PlainMessage | undefined): boolean; +} + +/** + * @generated from message policy.AttributeNamespaceSelector.AttributeSelector + */ +export declare class AttributeNamespaceSelector_AttributeSelector extends Message { + /** + * @generated from field: bool with_key_access_grants = 1; + */ + withKeyAccessGrants: boolean; + + /** + * @generated from field: policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector with_values = 10; + */ + withValues?: AttributeNamespaceSelector_AttributeSelector_ValueSelector; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.AttributeNamespaceSelector.AttributeSelector"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): AttributeNamespaceSelector_AttributeSelector; + + static fromJson(jsonValue: JsonValue, options?: Partial): AttributeNamespaceSelector_AttributeSelector; + + static fromJsonString(jsonString: string, options?: Partial): AttributeNamespaceSelector_AttributeSelector; + + static equals(a: AttributeNamespaceSelector_AttributeSelector | PlainMessage | undefined, b: AttributeNamespaceSelector_AttributeSelector | PlainMessage | undefined): boolean; +} + +/** + * @generated from message policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector + */ +export declare class AttributeNamespaceSelector_AttributeSelector_ValueSelector extends Message { + /** + * @generated from field: bool with_key_access_grants = 1; + */ + withKeyAccessGrants: boolean; + + /** + * @generated from field: bool with_subject_maps = 2; + */ + withSubjectMaps: boolean; + + /** + * @generated from field: bool with_resource_maps = 3; + */ + withResourceMaps: boolean; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): AttributeNamespaceSelector_AttributeSelector_ValueSelector; + + static fromJson(jsonValue: JsonValue, options?: Partial): AttributeNamespaceSelector_AttributeSelector_ValueSelector; + + static fromJsonString(jsonString: string, options?: Partial): AttributeNamespaceSelector_AttributeSelector_ValueSelector; + + static equals(a: AttributeNamespaceSelector_AttributeSelector_ValueSelector | PlainMessage | undefined, b: AttributeNamespaceSelector_AttributeSelector_ValueSelector | PlainMessage | undefined): boolean; +} + +/** + * @generated from message policy.AttributeDefinitionSelector + */ +export declare class AttributeDefinitionSelector extends Message { + /** + * @generated from field: bool with_key_access_grants = 1; + */ + withKeyAccessGrants: boolean; + + /** + * @generated from field: policy.AttributeDefinitionSelector.NamespaceSelector with_namespace = 10; + */ + withNamespace?: AttributeDefinitionSelector_NamespaceSelector; + + /** + * @generated from field: policy.AttributeDefinitionSelector.ValueSelector with_values = 11; + */ + withValues?: AttributeDefinitionSelector_ValueSelector; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.AttributeDefinitionSelector"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): AttributeDefinitionSelector; + + static fromJson(jsonValue: JsonValue, options?: Partial): AttributeDefinitionSelector; + + static fromJsonString(jsonString: string, options?: Partial): AttributeDefinitionSelector; + + static equals(a: AttributeDefinitionSelector | PlainMessage | undefined, b: AttributeDefinitionSelector | PlainMessage | undefined): boolean; } -export namespace AttributeNamespaceSelector { - export type AsObject = { - withAttributes?: AttributeNamespaceSelector.AttributeSelector.AsObject; - }; - - export class AttributeSelector extends jspb.Message { - getWithKeyAccessGrants(): boolean; - setWithKeyAccessGrants(value: boolean): AttributeSelector; - - getWithValues(): AttributeNamespaceSelector.AttributeSelector.ValueSelector | undefined; - setWithValues( - value?: AttributeNamespaceSelector.AttributeSelector.ValueSelector - ): AttributeSelector; - hasWithValues(): boolean; - clearWithValues(): AttributeSelector; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AttributeSelector.AsObject; - static toObject(includeInstance: boolean, msg: AttributeSelector): AttributeSelector.AsObject; - static serializeBinaryToWriter(message: AttributeSelector, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AttributeSelector; - static deserializeBinaryFromReader( - message: AttributeSelector, - reader: jspb.BinaryReader - ): AttributeSelector; - } - - export namespace AttributeSelector { - export type AsObject = { - withKeyAccessGrants: boolean; - withValues?: AttributeNamespaceSelector.AttributeSelector.ValueSelector.AsObject; - }; - - export class ValueSelector extends jspb.Message { - getWithKeyAccessGrants(): boolean; - setWithKeyAccessGrants(value: boolean): ValueSelector; - - getWithSubjectMaps(): boolean; - setWithSubjectMaps(value: boolean): ValueSelector; - - getWithResourceMaps(): boolean; - setWithResourceMaps(value: boolean): ValueSelector; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ValueSelector.AsObject; - static toObject(includeInstance: boolean, msg: ValueSelector): ValueSelector.AsObject; - static serializeBinaryToWriter(message: ValueSelector, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ValueSelector; - static deserializeBinaryFromReader( - message: ValueSelector, - reader: jspb.BinaryReader - ): ValueSelector; - } - - export namespace ValueSelector { - export type AsObject = { - withKeyAccessGrants: boolean; - withSubjectMaps: boolean; - withResourceMaps: boolean; - }; - } - } +/** + * @generated from message policy.AttributeDefinitionSelector.NamespaceSelector + */ +export declare class AttributeDefinitionSelector_NamespaceSelector extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.AttributeDefinitionSelector.NamespaceSelector"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): AttributeDefinitionSelector_NamespaceSelector; + + static fromJson(jsonValue: JsonValue, options?: Partial): AttributeDefinitionSelector_NamespaceSelector; + + static fromJsonString(jsonString: string, options?: Partial): AttributeDefinitionSelector_NamespaceSelector; + + static equals(a: AttributeDefinitionSelector_NamespaceSelector | PlainMessage | undefined, b: AttributeDefinitionSelector_NamespaceSelector | PlainMessage | undefined): boolean; } -export class AttributeDefinitionSelector extends jspb.Message { - getWithKeyAccessGrants(): boolean; - setWithKeyAccessGrants(value: boolean): AttributeDefinitionSelector; - - getWithNamespace(): AttributeDefinitionSelector.NamespaceSelector | undefined; - setWithNamespace( - value?: AttributeDefinitionSelector.NamespaceSelector - ): AttributeDefinitionSelector; - hasWithNamespace(): boolean; - clearWithNamespace(): AttributeDefinitionSelector; - - getWithValues(): AttributeDefinitionSelector.ValueSelector | undefined; - setWithValues(value?: AttributeDefinitionSelector.ValueSelector): AttributeDefinitionSelector; - hasWithValues(): boolean; - clearWithValues(): AttributeDefinitionSelector; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AttributeDefinitionSelector.AsObject; - static toObject( - includeInstance: boolean, - msg: AttributeDefinitionSelector - ): AttributeDefinitionSelector.AsObject; - static serializeBinaryToWriter( - message: AttributeDefinitionSelector, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): AttributeDefinitionSelector; - static deserializeBinaryFromReader( - message: AttributeDefinitionSelector, - reader: jspb.BinaryReader - ): AttributeDefinitionSelector; +/** + * @generated from message policy.AttributeDefinitionSelector.ValueSelector + */ +export declare class AttributeDefinitionSelector_ValueSelector extends Message { + /** + * @generated from field: bool with_key_access_grants = 1; + */ + withKeyAccessGrants: boolean; + + /** + * @generated from field: bool with_subject_maps = 2; + */ + withSubjectMaps: boolean; + + /** + * @generated from field: bool with_resource_maps = 3; + */ + withResourceMaps: boolean; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.AttributeDefinitionSelector.ValueSelector"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): AttributeDefinitionSelector_ValueSelector; + + static fromJson(jsonValue: JsonValue, options?: Partial): AttributeDefinitionSelector_ValueSelector; + + static fromJsonString(jsonString: string, options?: Partial): AttributeDefinitionSelector_ValueSelector; + + static equals(a: AttributeDefinitionSelector_ValueSelector | PlainMessage | undefined, b: AttributeDefinitionSelector_ValueSelector | PlainMessage | undefined): boolean; } -export namespace AttributeDefinitionSelector { - export type AsObject = { - withKeyAccessGrants: boolean; - withNamespace?: AttributeDefinitionSelector.NamespaceSelector.AsObject; - withValues?: AttributeDefinitionSelector.ValueSelector.AsObject; - }; - - export class NamespaceSelector extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NamespaceSelector.AsObject; - static toObject(includeInstance: boolean, msg: NamespaceSelector): NamespaceSelector.AsObject; - static serializeBinaryToWriter(message: NamespaceSelector, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NamespaceSelector; - static deserializeBinaryFromReader( - message: NamespaceSelector, - reader: jspb.BinaryReader - ): NamespaceSelector; - } - - export namespace NamespaceSelector { - export type AsObject = {}; - } - - export class ValueSelector extends jspb.Message { - getWithKeyAccessGrants(): boolean; - setWithKeyAccessGrants(value: boolean): ValueSelector; - - getWithSubjectMaps(): boolean; - setWithSubjectMaps(value: boolean): ValueSelector; - - getWithResourceMaps(): boolean; - setWithResourceMaps(value: boolean): ValueSelector; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ValueSelector.AsObject; - static toObject(includeInstance: boolean, msg: ValueSelector): ValueSelector.AsObject; - static serializeBinaryToWriter(message: ValueSelector, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ValueSelector; - static deserializeBinaryFromReader( - message: ValueSelector, - reader: jspb.BinaryReader - ): ValueSelector; - } - - export namespace ValueSelector { - export type AsObject = { - withKeyAccessGrants: boolean; - withSubjectMaps: boolean; - withResourceMaps: boolean; - }; - } +/** + * @generated from message policy.AttributeValueSelector + */ +export declare class AttributeValueSelector extends Message { + /** + * @generated from field: bool with_key_access_grants = 1; + */ + withKeyAccessGrants: boolean; + + /** + * @generated from field: bool with_subject_maps = 2; + */ + withSubjectMaps: boolean; + + /** + * @generated from field: bool with_resource_maps = 3; + */ + withResourceMaps: boolean; + + /** + * @generated from field: policy.AttributeValueSelector.AttributeSelector with_attribute = 10; + */ + withAttribute?: AttributeValueSelector_AttributeSelector; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.AttributeValueSelector"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): AttributeValueSelector; + + static fromJson(jsonValue: JsonValue, options?: Partial): AttributeValueSelector; + + static fromJsonString(jsonString: string, options?: Partial): AttributeValueSelector; + + static equals(a: AttributeValueSelector | PlainMessage | undefined, b: AttributeValueSelector | PlainMessage | undefined): boolean; } -export class AttributeValueSelector extends jspb.Message { - getWithKeyAccessGrants(): boolean; - setWithKeyAccessGrants(value: boolean): AttributeValueSelector; - - getWithSubjectMaps(): boolean; - setWithSubjectMaps(value: boolean): AttributeValueSelector; - - getWithResourceMaps(): boolean; - setWithResourceMaps(value: boolean): AttributeValueSelector; - - getWithAttribute(): AttributeValueSelector.AttributeSelector | undefined; - setWithAttribute(value?: AttributeValueSelector.AttributeSelector): AttributeValueSelector; - hasWithAttribute(): boolean; - clearWithAttribute(): AttributeValueSelector; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AttributeValueSelector.AsObject; - static toObject( - includeInstance: boolean, - msg: AttributeValueSelector - ): AttributeValueSelector.AsObject; - static serializeBinaryToWriter(message: AttributeValueSelector, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AttributeValueSelector; - static deserializeBinaryFromReader( - message: AttributeValueSelector, - reader: jspb.BinaryReader - ): AttributeValueSelector; +/** + * @generated from message policy.AttributeValueSelector.AttributeSelector + */ +export declare class AttributeValueSelector_AttributeSelector extends Message { + /** + * @generated from field: bool with_key_access_grants = 1; + */ + withKeyAccessGrants: boolean; + + /** + * @generated from field: policy.AttributeValueSelector.AttributeSelector.NamespaceSelector with_namespace = 10; + */ + withNamespace?: AttributeValueSelector_AttributeSelector_NamespaceSelector; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.AttributeValueSelector.AttributeSelector"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): AttributeValueSelector_AttributeSelector; + + static fromJson(jsonValue: JsonValue, options?: Partial): AttributeValueSelector_AttributeSelector; + + static fromJsonString(jsonString: string, options?: Partial): AttributeValueSelector_AttributeSelector; + + static equals(a: AttributeValueSelector_AttributeSelector | PlainMessage | undefined, b: AttributeValueSelector_AttributeSelector | PlainMessage | undefined): boolean; } -export namespace AttributeValueSelector { - export type AsObject = { - withKeyAccessGrants: boolean; - withSubjectMaps: boolean; - withResourceMaps: boolean; - withAttribute?: AttributeValueSelector.AttributeSelector.AsObject; - }; - - export class AttributeSelector extends jspb.Message { - getWithKeyAccessGrants(): boolean; - setWithKeyAccessGrants(value: boolean): AttributeSelector; - - getWithNamespace(): AttributeValueSelector.AttributeSelector.NamespaceSelector | undefined; - setWithNamespace( - value?: AttributeValueSelector.AttributeSelector.NamespaceSelector - ): AttributeSelector; - hasWithNamespace(): boolean; - clearWithNamespace(): AttributeSelector; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AttributeSelector.AsObject; - static toObject(includeInstance: boolean, msg: AttributeSelector): AttributeSelector.AsObject; - static serializeBinaryToWriter(message: AttributeSelector, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AttributeSelector; - static deserializeBinaryFromReader( - message: AttributeSelector, - reader: jspb.BinaryReader - ): AttributeSelector; - } - - export namespace AttributeSelector { - export type AsObject = { - withKeyAccessGrants: boolean; - withNamespace?: AttributeValueSelector.AttributeSelector.NamespaceSelector.AsObject; - }; - - export class NamespaceSelector extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NamespaceSelector.AsObject; - static toObject(includeInstance: boolean, msg: NamespaceSelector): NamespaceSelector.AsObject; - static serializeBinaryToWriter(message: NamespaceSelector, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NamespaceSelector; - static deserializeBinaryFromReader( - message: NamespaceSelector, - reader: jspb.BinaryReader - ): NamespaceSelector; - } - - export namespace NamespaceSelector { - export type AsObject = {}; - } - } +/** + * @generated from message policy.AttributeValueSelector.AttributeSelector.NamespaceSelector + */ +export declare class AttributeValueSelector_AttributeSelector_NamespaceSelector extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.AttributeValueSelector.AttributeSelector.NamespaceSelector"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): AttributeValueSelector_AttributeSelector_NamespaceSelector; + + static fromJson(jsonValue: JsonValue, options?: Partial): AttributeValueSelector_AttributeSelector_NamespaceSelector; + + static fromJsonString(jsonString: string, options?: Partial): AttributeValueSelector_AttributeSelector_NamespaceSelector; + + static equals(a: AttributeValueSelector_AttributeSelector_NamespaceSelector | PlainMessage | undefined, b: AttributeValueSelector_AttributeSelector_NamespaceSelector | PlainMessage | undefined): boolean; } + diff --git a/lib/src/platform/policy/selectors_pb.ts b/lib/src/platform/policy/selectors_pb.ts deleted file mode 100644 index 8490dc8a..00000000 --- a/lib/src/platform/policy/selectors_pb.ts +++ /dev/null @@ -1,586 +0,0 @@ -// @generated by protoc-gen-es v1.9.0 with parameter "target=ts" -// @generated from file policy/selectors.proto (package policy, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import type { - BinaryReadOptions, - FieldList, - JsonReadOptions, - JsonValue, - PartialMessage, - PlainMessage, -} from '@bufbuild/protobuf'; -import { Message, proto3 } from '@bufbuild/protobuf'; - -/** - * @generated from message policy.AttributeNamespaceSelector - */ -export class AttributeNamespaceSelector extends Message { - /** - * @generated from field: policy.AttributeNamespaceSelector.AttributeSelector with_attributes = 10; - */ - withAttributes?: AttributeNamespaceSelector_AttributeSelector; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.AttributeNamespaceSelector'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { - no: 10, - name: 'with_attributes', - kind: 'message', - T: AttributeNamespaceSelector_AttributeSelector, - }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): AttributeNamespaceSelector { - return new AttributeNamespaceSelector().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): AttributeNamespaceSelector { - return new AttributeNamespaceSelector().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): AttributeNamespaceSelector { - return new AttributeNamespaceSelector().fromJsonString(jsonString, options); - } - - static equals( - a: AttributeNamespaceSelector | PlainMessage | undefined, - b: AttributeNamespaceSelector | PlainMessage | undefined - ): boolean { - return proto3.util.equals(AttributeNamespaceSelector, a, b); - } -} - -/** - * @generated from message policy.AttributeNamespaceSelector.AttributeSelector - */ -export class AttributeNamespaceSelector_AttributeSelector extends Message { - /** - * @generated from field: bool with_key_access_grants = 1; - */ - withKeyAccessGrants = false; - - /** - * @generated from field: policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector with_values = 10; - */ - withValues?: AttributeNamespaceSelector_AttributeSelector_ValueSelector; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.AttributeNamespaceSelector.AttributeSelector'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'with_key_access_grants', kind: 'scalar', T: 8 /* ScalarType.BOOL */ }, - { - no: 10, - name: 'with_values', - kind: 'message', - T: AttributeNamespaceSelector_AttributeSelector_ValueSelector, - }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): AttributeNamespaceSelector_AttributeSelector { - return new AttributeNamespaceSelector_AttributeSelector().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): AttributeNamespaceSelector_AttributeSelector { - return new AttributeNamespaceSelector_AttributeSelector().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): AttributeNamespaceSelector_AttributeSelector { - return new AttributeNamespaceSelector_AttributeSelector().fromJsonString(jsonString, options); - } - - static equals( - a: - | AttributeNamespaceSelector_AttributeSelector - | PlainMessage - | undefined, - b: - | AttributeNamespaceSelector_AttributeSelector - | PlainMessage - | undefined - ): boolean { - return proto3.util.equals(AttributeNamespaceSelector_AttributeSelector, a, b); - } -} - -/** - * @generated from message policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector - */ -export class AttributeNamespaceSelector_AttributeSelector_ValueSelector extends Message { - /** - * @generated from field: bool with_key_access_grants = 1; - */ - withKeyAccessGrants = false; - - /** - * @generated from field: bool with_subject_maps = 2; - */ - withSubjectMaps = false; - - /** - * @generated from field: bool with_resource_maps = 3; - */ - withResourceMaps = false; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'with_key_access_grants', kind: 'scalar', T: 8 /* ScalarType.BOOL */ }, - { no: 2, name: 'with_subject_maps', kind: 'scalar', T: 8 /* ScalarType.BOOL */ }, - { no: 3, name: 'with_resource_maps', kind: 'scalar', T: 8 /* ScalarType.BOOL */ }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): AttributeNamespaceSelector_AttributeSelector_ValueSelector { - return new AttributeNamespaceSelector_AttributeSelector_ValueSelector().fromBinary( - bytes, - options - ); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): AttributeNamespaceSelector_AttributeSelector_ValueSelector { - return new AttributeNamespaceSelector_AttributeSelector_ValueSelector().fromJson( - jsonValue, - options - ); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): AttributeNamespaceSelector_AttributeSelector_ValueSelector { - return new AttributeNamespaceSelector_AttributeSelector_ValueSelector().fromJsonString( - jsonString, - options - ); - } - - static equals( - a: - | AttributeNamespaceSelector_AttributeSelector_ValueSelector - | PlainMessage - | undefined, - b: - | AttributeNamespaceSelector_AttributeSelector_ValueSelector - | PlainMessage - | undefined - ): boolean { - return proto3.util.equals(AttributeNamespaceSelector_AttributeSelector_ValueSelector, a, b); - } -} - -/** - * @generated from message policy.AttributeDefinitionSelector - */ -export class AttributeDefinitionSelector extends Message { - /** - * @generated from field: bool with_key_access_grants = 1; - */ - withKeyAccessGrants = false; - - /** - * @generated from field: policy.AttributeDefinitionSelector.NamespaceSelector with_namespace = 10; - */ - withNamespace?: AttributeDefinitionSelector_NamespaceSelector; - - /** - * @generated from field: policy.AttributeDefinitionSelector.ValueSelector with_values = 11; - */ - withValues?: AttributeDefinitionSelector_ValueSelector; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.AttributeDefinitionSelector'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'with_key_access_grants', kind: 'scalar', T: 8 /* ScalarType.BOOL */ }, - { - no: 10, - name: 'with_namespace', - kind: 'message', - T: AttributeDefinitionSelector_NamespaceSelector, - }, - { no: 11, name: 'with_values', kind: 'message', T: AttributeDefinitionSelector_ValueSelector }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): AttributeDefinitionSelector { - return new AttributeDefinitionSelector().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): AttributeDefinitionSelector { - return new AttributeDefinitionSelector().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): AttributeDefinitionSelector { - return new AttributeDefinitionSelector().fromJsonString(jsonString, options); - } - - static equals( - a: AttributeDefinitionSelector | PlainMessage | undefined, - b: AttributeDefinitionSelector | PlainMessage | undefined - ): boolean { - return proto3.util.equals(AttributeDefinitionSelector, a, b); - } -} - -/** - * @generated from message policy.AttributeDefinitionSelector.NamespaceSelector - */ -export class AttributeDefinitionSelector_NamespaceSelector extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.AttributeDefinitionSelector.NamespaceSelector'; - static readonly fields: FieldList = proto3.util.newFieldList(() => []); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): AttributeDefinitionSelector_NamespaceSelector { - return new AttributeDefinitionSelector_NamespaceSelector().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): AttributeDefinitionSelector_NamespaceSelector { - return new AttributeDefinitionSelector_NamespaceSelector().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): AttributeDefinitionSelector_NamespaceSelector { - return new AttributeDefinitionSelector_NamespaceSelector().fromJsonString(jsonString, options); - } - - static equals( - a: - | AttributeDefinitionSelector_NamespaceSelector - | PlainMessage - | undefined, - b: - | AttributeDefinitionSelector_NamespaceSelector - | PlainMessage - | undefined - ): boolean { - return proto3.util.equals(AttributeDefinitionSelector_NamespaceSelector, a, b); - } -} - -/** - * @generated from message policy.AttributeDefinitionSelector.ValueSelector - */ -export class AttributeDefinitionSelector_ValueSelector extends Message { - /** - * @generated from field: bool with_key_access_grants = 1; - */ - withKeyAccessGrants = false; - - /** - * @generated from field: bool with_subject_maps = 2; - */ - withSubjectMaps = false; - - /** - * @generated from field: bool with_resource_maps = 3; - */ - withResourceMaps = false; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.AttributeDefinitionSelector.ValueSelector'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'with_key_access_grants', kind: 'scalar', T: 8 /* ScalarType.BOOL */ }, - { no: 2, name: 'with_subject_maps', kind: 'scalar', T: 8 /* ScalarType.BOOL */ }, - { no: 3, name: 'with_resource_maps', kind: 'scalar', T: 8 /* ScalarType.BOOL */ }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): AttributeDefinitionSelector_ValueSelector { - return new AttributeDefinitionSelector_ValueSelector().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): AttributeDefinitionSelector_ValueSelector { - return new AttributeDefinitionSelector_ValueSelector().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): AttributeDefinitionSelector_ValueSelector { - return new AttributeDefinitionSelector_ValueSelector().fromJsonString(jsonString, options); - } - - static equals( - a: - | AttributeDefinitionSelector_ValueSelector - | PlainMessage - | undefined, - b: - | AttributeDefinitionSelector_ValueSelector - | PlainMessage - | undefined - ): boolean { - return proto3.util.equals(AttributeDefinitionSelector_ValueSelector, a, b); - } -} - -/** - * @generated from message policy.AttributeValueSelector - */ -export class AttributeValueSelector extends Message { - /** - * @generated from field: bool with_key_access_grants = 1; - */ - withKeyAccessGrants = false; - - /** - * @generated from field: bool with_subject_maps = 2; - */ - withSubjectMaps = false; - - /** - * @generated from field: bool with_resource_maps = 3; - */ - withResourceMaps = false; - - /** - * @generated from field: policy.AttributeValueSelector.AttributeSelector with_attribute = 10; - */ - withAttribute?: AttributeValueSelector_AttributeSelector; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.AttributeValueSelector'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'with_key_access_grants', kind: 'scalar', T: 8 /* ScalarType.BOOL */ }, - { no: 2, name: 'with_subject_maps', kind: 'scalar', T: 8 /* ScalarType.BOOL */ }, - { no: 3, name: 'with_resource_maps', kind: 'scalar', T: 8 /* ScalarType.BOOL */ }, - { - no: 10, - name: 'with_attribute', - kind: 'message', - T: AttributeValueSelector_AttributeSelector, - }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): AttributeValueSelector { - return new AttributeValueSelector().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): AttributeValueSelector { - return new AttributeValueSelector().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): AttributeValueSelector { - return new AttributeValueSelector().fromJsonString(jsonString, options); - } - - static equals( - a: AttributeValueSelector | PlainMessage | undefined, - b: AttributeValueSelector | PlainMessage | undefined - ): boolean { - return proto3.util.equals(AttributeValueSelector, a, b); - } -} - -/** - * @generated from message policy.AttributeValueSelector.AttributeSelector - */ -export class AttributeValueSelector_AttributeSelector extends Message { - /** - * @generated from field: bool with_key_access_grants = 1; - */ - withKeyAccessGrants = false; - - /** - * @generated from field: policy.AttributeValueSelector.AttributeSelector.NamespaceSelector with_namespace = 10; - */ - withNamespace?: AttributeValueSelector_AttributeSelector_NamespaceSelector; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.AttributeValueSelector.AttributeSelector'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'with_key_access_grants', kind: 'scalar', T: 8 /* ScalarType.BOOL */ }, - { - no: 10, - name: 'with_namespace', - kind: 'message', - T: AttributeValueSelector_AttributeSelector_NamespaceSelector, - }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): AttributeValueSelector_AttributeSelector { - return new AttributeValueSelector_AttributeSelector().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): AttributeValueSelector_AttributeSelector { - return new AttributeValueSelector_AttributeSelector().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): AttributeValueSelector_AttributeSelector { - return new AttributeValueSelector_AttributeSelector().fromJsonString(jsonString, options); - } - - static equals( - a: - | AttributeValueSelector_AttributeSelector - | PlainMessage - | undefined, - b: - | AttributeValueSelector_AttributeSelector - | PlainMessage - | undefined - ): boolean { - return proto3.util.equals(AttributeValueSelector_AttributeSelector, a, b); - } -} - -/** - * @generated from message policy.AttributeValueSelector.AttributeSelector.NamespaceSelector - */ -export class AttributeValueSelector_AttributeSelector_NamespaceSelector extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.AttributeValueSelector.AttributeSelector.NamespaceSelector'; - static readonly fields: FieldList = proto3.util.newFieldList(() => []); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): AttributeValueSelector_AttributeSelector_NamespaceSelector { - return new AttributeValueSelector_AttributeSelector_NamespaceSelector().fromBinary( - bytes, - options - ); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): AttributeValueSelector_AttributeSelector_NamespaceSelector { - return new AttributeValueSelector_AttributeSelector_NamespaceSelector().fromJson( - jsonValue, - options - ); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): AttributeValueSelector_AttributeSelector_NamespaceSelector { - return new AttributeValueSelector_AttributeSelector_NamespaceSelector().fromJsonString( - jsonString, - options - ); - } - - static equals( - a: - | AttributeValueSelector_AttributeSelector_NamespaceSelector - | PlainMessage - | undefined, - b: - | AttributeValueSelector_AttributeSelector_NamespaceSelector - | PlainMessage - | undefined - ): boolean { - return proto3.util.equals(AttributeValueSelector_AttributeSelector_NamespaceSelector, a, b); - } -} diff --git a/lib/src/platform/policy/subjectmapping/Subject_mappingServiceClientPb.ts b/lib/src/platform/policy/subjectmapping/Subject_mappingServiceClientPb.ts deleted file mode 100644 index fbcec360..00000000 --- a/lib/src/platform/policy/subjectmapping/Subject_mappingServiceClientPb.ts +++ /dev/null @@ -1,590 +0,0 @@ -/** - * @fileoverview gRPC-Web generated client stub for policy.subjectmapping - * @enhanceable - * @public - */ - -// Code generated by protoc-gen-grpc-web. DO NOT EDIT. -// versions: -// protoc-gen-grpc-web v1.5.0 -// protoc v0.0.0 -// source: policy/subjectmapping/subject_mapping.proto - -/* eslint-disable */ -// @ts-nocheck - -import * as grpcWeb from 'grpc-web'; - -import * as policy_subjectmapping_subject_mapping_pb from '../../policy/subjectmapping/subject_mapping_pb'; // proto import: "policy/subjectmapping/subject_mapping.proto" - -export class SubjectMappingServiceClient { - client_: grpcWeb.AbstractClientBase; - hostname_: string; - credentials_: null | { [index: string]: string }; - options_: null | { [index: string]: any }; - - constructor( - hostname: string, - credentials?: null | { [index: string]: string }, - options?: null | { [index: string]: any } - ) { - if (!options) options = {}; - if (!credentials) credentials = {}; - options['format'] = 'binary'; - - this.client_ = new grpcWeb.GrpcWebClientBase(options); - this.hostname_ = hostname.replace(/\/+$/, ''); - this.credentials_ = credentials; - this.options_ = options; - } - - methodDescriptorMatchSubjectMappings = new grpcWeb.MethodDescriptor( - '/policy.subjectmapping.SubjectMappingService/MatchSubjectMappings', - grpcWeb.MethodType.UNARY, - policy_subjectmapping_subject_mapping_pb.MatchSubjectMappingsRequest, - policy_subjectmapping_subject_mapping_pb.MatchSubjectMappingsResponse, - (request: policy_subjectmapping_subject_mapping_pb.MatchSubjectMappingsRequest) => { - return request.serializeBinary(); - }, - policy_subjectmapping_subject_mapping_pb.MatchSubjectMappingsResponse.deserializeBinary - ); - - matchSubjectMappings( - request: policy_subjectmapping_subject_mapping_pb.MatchSubjectMappingsRequest, - metadata?: grpcWeb.Metadata | null - ): Promise; - - matchSubjectMappings( - request: policy_subjectmapping_subject_mapping_pb.MatchSubjectMappingsRequest, - metadata: grpcWeb.Metadata | null, - callback: ( - err: grpcWeb.RpcError, - response: policy_subjectmapping_subject_mapping_pb.MatchSubjectMappingsResponse - ) => void - ): grpcWeb.ClientReadableStream; - - matchSubjectMappings( - request: policy_subjectmapping_subject_mapping_pb.MatchSubjectMappingsRequest, - metadata?: grpcWeb.Metadata | null, - callback?: ( - err: grpcWeb.RpcError, - response: policy_subjectmapping_subject_mapping_pb.MatchSubjectMappingsResponse - ) => void - ) { - if (callback !== undefined) { - return this.client_.rpcCall( - this.hostname_ + '/policy.subjectmapping.SubjectMappingService/MatchSubjectMappings', - request, - metadata || {}, - this.methodDescriptorMatchSubjectMappings, - callback - ); - } - return this.client_.unaryCall( - this.hostname_ + '/policy.subjectmapping.SubjectMappingService/MatchSubjectMappings', - request, - metadata || {}, - this.methodDescriptorMatchSubjectMappings - ); - } - - methodDescriptorListSubjectMappings = new grpcWeb.MethodDescriptor( - '/policy.subjectmapping.SubjectMappingService/ListSubjectMappings', - grpcWeb.MethodType.UNARY, - policy_subjectmapping_subject_mapping_pb.ListSubjectMappingsRequest, - policy_subjectmapping_subject_mapping_pb.ListSubjectMappingsResponse, - (request: policy_subjectmapping_subject_mapping_pb.ListSubjectMappingsRequest) => { - return request.serializeBinary(); - }, - policy_subjectmapping_subject_mapping_pb.ListSubjectMappingsResponse.deserializeBinary - ); - - listSubjectMappings( - request: policy_subjectmapping_subject_mapping_pb.ListSubjectMappingsRequest, - metadata?: grpcWeb.Metadata | null - ): Promise; - - listSubjectMappings( - request: policy_subjectmapping_subject_mapping_pb.ListSubjectMappingsRequest, - metadata: grpcWeb.Metadata | null, - callback: ( - err: grpcWeb.RpcError, - response: policy_subjectmapping_subject_mapping_pb.ListSubjectMappingsResponse - ) => void - ): grpcWeb.ClientReadableStream; - - listSubjectMappings( - request: policy_subjectmapping_subject_mapping_pb.ListSubjectMappingsRequest, - metadata?: grpcWeb.Metadata | null, - callback?: ( - err: grpcWeb.RpcError, - response: policy_subjectmapping_subject_mapping_pb.ListSubjectMappingsResponse - ) => void - ) { - if (callback !== undefined) { - return this.client_.rpcCall( - this.hostname_ + '/policy.subjectmapping.SubjectMappingService/ListSubjectMappings', - request, - metadata || {}, - this.methodDescriptorListSubjectMappings, - callback - ); - } - return this.client_.unaryCall( - this.hostname_ + '/policy.subjectmapping.SubjectMappingService/ListSubjectMappings', - request, - metadata || {}, - this.methodDescriptorListSubjectMappings - ); - } - - methodDescriptorGetSubjectMapping = new grpcWeb.MethodDescriptor( - '/policy.subjectmapping.SubjectMappingService/GetSubjectMapping', - grpcWeb.MethodType.UNARY, - policy_subjectmapping_subject_mapping_pb.GetSubjectMappingRequest, - policy_subjectmapping_subject_mapping_pb.GetSubjectMappingResponse, - (request: policy_subjectmapping_subject_mapping_pb.GetSubjectMappingRequest) => { - return request.serializeBinary(); - }, - policy_subjectmapping_subject_mapping_pb.GetSubjectMappingResponse.deserializeBinary - ); - - getSubjectMapping( - request: policy_subjectmapping_subject_mapping_pb.GetSubjectMappingRequest, - metadata?: grpcWeb.Metadata | null - ): Promise; - - getSubjectMapping( - request: policy_subjectmapping_subject_mapping_pb.GetSubjectMappingRequest, - metadata: grpcWeb.Metadata | null, - callback: ( - err: grpcWeb.RpcError, - response: policy_subjectmapping_subject_mapping_pb.GetSubjectMappingResponse - ) => void - ): grpcWeb.ClientReadableStream; - - getSubjectMapping( - request: policy_subjectmapping_subject_mapping_pb.GetSubjectMappingRequest, - metadata?: grpcWeb.Metadata | null, - callback?: ( - err: grpcWeb.RpcError, - response: policy_subjectmapping_subject_mapping_pb.GetSubjectMappingResponse - ) => void - ) { - if (callback !== undefined) { - return this.client_.rpcCall( - this.hostname_ + '/policy.subjectmapping.SubjectMappingService/GetSubjectMapping', - request, - metadata || {}, - this.methodDescriptorGetSubjectMapping, - callback - ); - } - return this.client_.unaryCall( - this.hostname_ + '/policy.subjectmapping.SubjectMappingService/GetSubjectMapping', - request, - metadata || {}, - this.methodDescriptorGetSubjectMapping - ); - } - - methodDescriptorCreateSubjectMapping = new grpcWeb.MethodDescriptor( - '/policy.subjectmapping.SubjectMappingService/CreateSubjectMapping', - grpcWeb.MethodType.UNARY, - policy_subjectmapping_subject_mapping_pb.CreateSubjectMappingRequest, - policy_subjectmapping_subject_mapping_pb.CreateSubjectMappingResponse, - (request: policy_subjectmapping_subject_mapping_pb.CreateSubjectMappingRequest) => { - return request.serializeBinary(); - }, - policy_subjectmapping_subject_mapping_pb.CreateSubjectMappingResponse.deserializeBinary - ); - - createSubjectMapping( - request: policy_subjectmapping_subject_mapping_pb.CreateSubjectMappingRequest, - metadata?: grpcWeb.Metadata | null - ): Promise; - - createSubjectMapping( - request: policy_subjectmapping_subject_mapping_pb.CreateSubjectMappingRequest, - metadata: grpcWeb.Metadata | null, - callback: ( - err: grpcWeb.RpcError, - response: policy_subjectmapping_subject_mapping_pb.CreateSubjectMappingResponse - ) => void - ): grpcWeb.ClientReadableStream; - - createSubjectMapping( - request: policy_subjectmapping_subject_mapping_pb.CreateSubjectMappingRequest, - metadata?: grpcWeb.Metadata | null, - callback?: ( - err: grpcWeb.RpcError, - response: policy_subjectmapping_subject_mapping_pb.CreateSubjectMappingResponse - ) => void - ) { - if (callback !== undefined) { - return this.client_.rpcCall( - this.hostname_ + '/policy.subjectmapping.SubjectMappingService/CreateSubjectMapping', - request, - metadata || {}, - this.methodDescriptorCreateSubjectMapping, - callback - ); - } - return this.client_.unaryCall( - this.hostname_ + '/policy.subjectmapping.SubjectMappingService/CreateSubjectMapping', - request, - metadata || {}, - this.methodDescriptorCreateSubjectMapping - ); - } - - methodDescriptorUpdateSubjectMapping = new grpcWeb.MethodDescriptor( - '/policy.subjectmapping.SubjectMappingService/UpdateSubjectMapping', - grpcWeb.MethodType.UNARY, - policy_subjectmapping_subject_mapping_pb.UpdateSubjectMappingRequest, - policy_subjectmapping_subject_mapping_pb.UpdateSubjectMappingResponse, - (request: policy_subjectmapping_subject_mapping_pb.UpdateSubjectMappingRequest) => { - return request.serializeBinary(); - }, - policy_subjectmapping_subject_mapping_pb.UpdateSubjectMappingResponse.deserializeBinary - ); - - updateSubjectMapping( - request: policy_subjectmapping_subject_mapping_pb.UpdateSubjectMappingRequest, - metadata?: grpcWeb.Metadata | null - ): Promise; - - updateSubjectMapping( - request: policy_subjectmapping_subject_mapping_pb.UpdateSubjectMappingRequest, - metadata: grpcWeb.Metadata | null, - callback: ( - err: grpcWeb.RpcError, - response: policy_subjectmapping_subject_mapping_pb.UpdateSubjectMappingResponse - ) => void - ): grpcWeb.ClientReadableStream; - - updateSubjectMapping( - request: policy_subjectmapping_subject_mapping_pb.UpdateSubjectMappingRequest, - metadata?: grpcWeb.Metadata | null, - callback?: ( - err: grpcWeb.RpcError, - response: policy_subjectmapping_subject_mapping_pb.UpdateSubjectMappingResponse - ) => void - ) { - if (callback !== undefined) { - return this.client_.rpcCall( - this.hostname_ + '/policy.subjectmapping.SubjectMappingService/UpdateSubjectMapping', - request, - metadata || {}, - this.methodDescriptorUpdateSubjectMapping, - callback - ); - } - return this.client_.unaryCall( - this.hostname_ + '/policy.subjectmapping.SubjectMappingService/UpdateSubjectMapping', - request, - metadata || {}, - this.methodDescriptorUpdateSubjectMapping - ); - } - - methodDescriptorDeleteSubjectMapping = new grpcWeb.MethodDescriptor( - '/policy.subjectmapping.SubjectMappingService/DeleteSubjectMapping', - grpcWeb.MethodType.UNARY, - policy_subjectmapping_subject_mapping_pb.DeleteSubjectMappingRequest, - policy_subjectmapping_subject_mapping_pb.DeleteSubjectMappingResponse, - (request: policy_subjectmapping_subject_mapping_pb.DeleteSubjectMappingRequest) => { - return request.serializeBinary(); - }, - policy_subjectmapping_subject_mapping_pb.DeleteSubjectMappingResponse.deserializeBinary - ); - - deleteSubjectMapping( - request: policy_subjectmapping_subject_mapping_pb.DeleteSubjectMappingRequest, - metadata?: grpcWeb.Metadata | null - ): Promise; - - deleteSubjectMapping( - request: policy_subjectmapping_subject_mapping_pb.DeleteSubjectMappingRequest, - metadata: grpcWeb.Metadata | null, - callback: ( - err: grpcWeb.RpcError, - response: policy_subjectmapping_subject_mapping_pb.DeleteSubjectMappingResponse - ) => void - ): grpcWeb.ClientReadableStream; - - deleteSubjectMapping( - request: policy_subjectmapping_subject_mapping_pb.DeleteSubjectMappingRequest, - metadata?: grpcWeb.Metadata | null, - callback?: ( - err: grpcWeb.RpcError, - response: policy_subjectmapping_subject_mapping_pb.DeleteSubjectMappingResponse - ) => void - ) { - if (callback !== undefined) { - return this.client_.rpcCall( - this.hostname_ + '/policy.subjectmapping.SubjectMappingService/DeleteSubjectMapping', - request, - metadata || {}, - this.methodDescriptorDeleteSubjectMapping, - callback - ); - } - return this.client_.unaryCall( - this.hostname_ + '/policy.subjectmapping.SubjectMappingService/DeleteSubjectMapping', - request, - metadata || {}, - this.methodDescriptorDeleteSubjectMapping - ); - } - - methodDescriptorListSubjectConditionSets = new grpcWeb.MethodDescriptor( - '/policy.subjectmapping.SubjectMappingService/ListSubjectConditionSets', - grpcWeb.MethodType.UNARY, - policy_subjectmapping_subject_mapping_pb.ListSubjectConditionSetsRequest, - policy_subjectmapping_subject_mapping_pb.ListSubjectConditionSetsResponse, - (request: policy_subjectmapping_subject_mapping_pb.ListSubjectConditionSetsRequest) => { - return request.serializeBinary(); - }, - policy_subjectmapping_subject_mapping_pb.ListSubjectConditionSetsResponse.deserializeBinary - ); - - listSubjectConditionSets( - request: policy_subjectmapping_subject_mapping_pb.ListSubjectConditionSetsRequest, - metadata?: grpcWeb.Metadata | null - ): Promise; - - listSubjectConditionSets( - request: policy_subjectmapping_subject_mapping_pb.ListSubjectConditionSetsRequest, - metadata: grpcWeb.Metadata | null, - callback: ( - err: grpcWeb.RpcError, - response: policy_subjectmapping_subject_mapping_pb.ListSubjectConditionSetsResponse - ) => void - ): grpcWeb.ClientReadableStream; - - listSubjectConditionSets( - request: policy_subjectmapping_subject_mapping_pb.ListSubjectConditionSetsRequest, - metadata?: grpcWeb.Metadata | null, - callback?: ( - err: grpcWeb.RpcError, - response: policy_subjectmapping_subject_mapping_pb.ListSubjectConditionSetsResponse - ) => void - ) { - if (callback !== undefined) { - return this.client_.rpcCall( - this.hostname_ + '/policy.subjectmapping.SubjectMappingService/ListSubjectConditionSets', - request, - metadata || {}, - this.methodDescriptorListSubjectConditionSets, - callback - ); - } - return this.client_.unaryCall( - this.hostname_ + '/policy.subjectmapping.SubjectMappingService/ListSubjectConditionSets', - request, - metadata || {}, - this.methodDescriptorListSubjectConditionSets - ); - } - - methodDescriptorGetSubjectConditionSet = new grpcWeb.MethodDescriptor( - '/policy.subjectmapping.SubjectMappingService/GetSubjectConditionSet', - grpcWeb.MethodType.UNARY, - policy_subjectmapping_subject_mapping_pb.GetSubjectConditionSetRequest, - policy_subjectmapping_subject_mapping_pb.GetSubjectConditionSetResponse, - (request: policy_subjectmapping_subject_mapping_pb.GetSubjectConditionSetRequest) => { - return request.serializeBinary(); - }, - policy_subjectmapping_subject_mapping_pb.GetSubjectConditionSetResponse.deserializeBinary - ); - - getSubjectConditionSet( - request: policy_subjectmapping_subject_mapping_pb.GetSubjectConditionSetRequest, - metadata?: grpcWeb.Metadata | null - ): Promise; - - getSubjectConditionSet( - request: policy_subjectmapping_subject_mapping_pb.GetSubjectConditionSetRequest, - metadata: grpcWeb.Metadata | null, - callback: ( - err: grpcWeb.RpcError, - response: policy_subjectmapping_subject_mapping_pb.GetSubjectConditionSetResponse - ) => void - ): grpcWeb.ClientReadableStream; - - getSubjectConditionSet( - request: policy_subjectmapping_subject_mapping_pb.GetSubjectConditionSetRequest, - metadata?: grpcWeb.Metadata | null, - callback?: ( - err: grpcWeb.RpcError, - response: policy_subjectmapping_subject_mapping_pb.GetSubjectConditionSetResponse - ) => void - ) { - if (callback !== undefined) { - return this.client_.rpcCall( - this.hostname_ + '/policy.subjectmapping.SubjectMappingService/GetSubjectConditionSet', - request, - metadata || {}, - this.methodDescriptorGetSubjectConditionSet, - callback - ); - } - return this.client_.unaryCall( - this.hostname_ + '/policy.subjectmapping.SubjectMappingService/GetSubjectConditionSet', - request, - metadata || {}, - this.methodDescriptorGetSubjectConditionSet - ); - } - - methodDescriptorCreateSubjectConditionSet = new grpcWeb.MethodDescriptor( - '/policy.subjectmapping.SubjectMappingService/CreateSubjectConditionSet', - grpcWeb.MethodType.UNARY, - policy_subjectmapping_subject_mapping_pb.CreateSubjectConditionSetRequest, - policy_subjectmapping_subject_mapping_pb.CreateSubjectConditionSetResponse, - (request: policy_subjectmapping_subject_mapping_pb.CreateSubjectConditionSetRequest) => { - return request.serializeBinary(); - }, - policy_subjectmapping_subject_mapping_pb.CreateSubjectConditionSetResponse.deserializeBinary - ); - - createSubjectConditionSet( - request: policy_subjectmapping_subject_mapping_pb.CreateSubjectConditionSetRequest, - metadata?: grpcWeb.Metadata | null - ): Promise; - - createSubjectConditionSet( - request: policy_subjectmapping_subject_mapping_pb.CreateSubjectConditionSetRequest, - metadata: grpcWeb.Metadata | null, - callback: ( - err: grpcWeb.RpcError, - response: policy_subjectmapping_subject_mapping_pb.CreateSubjectConditionSetResponse - ) => void - ): grpcWeb.ClientReadableStream; - - createSubjectConditionSet( - request: policy_subjectmapping_subject_mapping_pb.CreateSubjectConditionSetRequest, - metadata?: grpcWeb.Metadata | null, - callback?: ( - err: grpcWeb.RpcError, - response: policy_subjectmapping_subject_mapping_pb.CreateSubjectConditionSetResponse - ) => void - ) { - if (callback !== undefined) { - return this.client_.rpcCall( - this.hostname_ + '/policy.subjectmapping.SubjectMappingService/CreateSubjectConditionSet', - request, - metadata || {}, - this.methodDescriptorCreateSubjectConditionSet, - callback - ); - } - return this.client_.unaryCall( - this.hostname_ + '/policy.subjectmapping.SubjectMappingService/CreateSubjectConditionSet', - request, - metadata || {}, - this.methodDescriptorCreateSubjectConditionSet - ); - } - - methodDescriptorUpdateSubjectConditionSet = new grpcWeb.MethodDescriptor( - '/policy.subjectmapping.SubjectMappingService/UpdateSubjectConditionSet', - grpcWeb.MethodType.UNARY, - policy_subjectmapping_subject_mapping_pb.UpdateSubjectConditionSetRequest, - policy_subjectmapping_subject_mapping_pb.UpdateSubjectConditionSetResponse, - (request: policy_subjectmapping_subject_mapping_pb.UpdateSubjectConditionSetRequest) => { - return request.serializeBinary(); - }, - policy_subjectmapping_subject_mapping_pb.UpdateSubjectConditionSetResponse.deserializeBinary - ); - - updateSubjectConditionSet( - request: policy_subjectmapping_subject_mapping_pb.UpdateSubjectConditionSetRequest, - metadata?: grpcWeb.Metadata | null - ): Promise; - - updateSubjectConditionSet( - request: policy_subjectmapping_subject_mapping_pb.UpdateSubjectConditionSetRequest, - metadata: grpcWeb.Metadata | null, - callback: ( - err: grpcWeb.RpcError, - response: policy_subjectmapping_subject_mapping_pb.UpdateSubjectConditionSetResponse - ) => void - ): grpcWeb.ClientReadableStream; - - updateSubjectConditionSet( - request: policy_subjectmapping_subject_mapping_pb.UpdateSubjectConditionSetRequest, - metadata?: grpcWeb.Metadata | null, - callback?: ( - err: grpcWeb.RpcError, - response: policy_subjectmapping_subject_mapping_pb.UpdateSubjectConditionSetResponse - ) => void - ) { - if (callback !== undefined) { - return this.client_.rpcCall( - this.hostname_ + '/policy.subjectmapping.SubjectMappingService/UpdateSubjectConditionSet', - request, - metadata || {}, - this.methodDescriptorUpdateSubjectConditionSet, - callback - ); - } - return this.client_.unaryCall( - this.hostname_ + '/policy.subjectmapping.SubjectMappingService/UpdateSubjectConditionSet', - request, - metadata || {}, - this.methodDescriptorUpdateSubjectConditionSet - ); - } - - methodDescriptorDeleteSubjectConditionSet = new grpcWeb.MethodDescriptor( - '/policy.subjectmapping.SubjectMappingService/DeleteSubjectConditionSet', - grpcWeb.MethodType.UNARY, - policy_subjectmapping_subject_mapping_pb.DeleteSubjectConditionSetRequest, - policy_subjectmapping_subject_mapping_pb.DeleteSubjectConditionSetResponse, - (request: policy_subjectmapping_subject_mapping_pb.DeleteSubjectConditionSetRequest) => { - return request.serializeBinary(); - }, - policy_subjectmapping_subject_mapping_pb.DeleteSubjectConditionSetResponse.deserializeBinary - ); - - deleteSubjectConditionSet( - request: policy_subjectmapping_subject_mapping_pb.DeleteSubjectConditionSetRequest, - metadata?: grpcWeb.Metadata | null - ): Promise; - - deleteSubjectConditionSet( - request: policy_subjectmapping_subject_mapping_pb.DeleteSubjectConditionSetRequest, - metadata: grpcWeb.Metadata | null, - callback: ( - err: grpcWeb.RpcError, - response: policy_subjectmapping_subject_mapping_pb.DeleteSubjectConditionSetResponse - ) => void - ): grpcWeb.ClientReadableStream; - - deleteSubjectConditionSet( - request: policy_subjectmapping_subject_mapping_pb.DeleteSubjectConditionSetRequest, - metadata?: grpcWeb.Metadata | null, - callback?: ( - err: grpcWeb.RpcError, - response: policy_subjectmapping_subject_mapping_pb.DeleteSubjectConditionSetResponse - ) => void - ) { - if (callback !== undefined) { - return this.client_.rpcCall( - this.hostname_ + '/policy.subjectmapping.SubjectMappingService/DeleteSubjectConditionSet', - request, - metadata || {}, - this.methodDescriptorDeleteSubjectConditionSet, - callback - ); - } - return this.client_.unaryCall( - this.hostname_ + '/policy.subjectmapping.SubjectMappingService/DeleteSubjectConditionSet', - request, - metadata || {}, - this.methodDescriptorDeleteSubjectConditionSet - ); - } -} diff --git a/lib/src/platform/policy/subjectmapping/subject_mapping_connect.ts b/lib/src/platform/policy/subjectmapping/subject_mapping_connect.ts deleted file mode 100644 index 97bd5462..00000000 --- a/lib/src/platform/policy/subjectmapping/subject_mapping_connect.ts +++ /dev/null @@ -1,140 +0,0 @@ -// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=ts" -// @generated from file policy/subjectmapping/subject_mapping.proto (package policy.subjectmapping, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { - CreateSubjectConditionSetRequest, - CreateSubjectConditionSetResponse, - CreateSubjectMappingRequest, - CreateSubjectMappingResponse, - DeleteSubjectConditionSetRequest, - DeleteSubjectConditionSetResponse, - DeleteSubjectMappingRequest, - DeleteSubjectMappingResponse, - GetSubjectConditionSetRequest, - GetSubjectConditionSetResponse, - GetSubjectMappingRequest, - GetSubjectMappingResponse, - ListSubjectConditionSetsRequest, - ListSubjectConditionSetsResponse, - ListSubjectMappingsRequest, - ListSubjectMappingsResponse, - MatchSubjectMappingsRequest, - MatchSubjectMappingsResponse, - UpdateSubjectConditionSetRequest, - UpdateSubjectConditionSetResponse, - UpdateSubjectMappingRequest, - UpdateSubjectMappingResponse, -} from './subject_mapping_pb.js'; -import { MethodKind } from '@bufbuild/protobuf'; - -/** - * @generated from service policy.subjectmapping.SubjectMappingService - */ -export const SubjectMappingService = { - typeName: 'policy.subjectmapping.SubjectMappingService', - methods: { - /** - * Find matching Subject Mappings for a given Subject - * - * @generated from rpc policy.subjectmapping.SubjectMappingService.MatchSubjectMappings - */ - matchSubjectMappings: { - name: 'MatchSubjectMappings', - I: MatchSubjectMappingsRequest, - O: MatchSubjectMappingsResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.subjectmapping.SubjectMappingService.ListSubjectMappings - */ - listSubjectMappings: { - name: 'ListSubjectMappings', - I: ListSubjectMappingsRequest, - O: ListSubjectMappingsResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.subjectmapping.SubjectMappingService.GetSubjectMapping - */ - getSubjectMapping: { - name: 'GetSubjectMapping', - I: GetSubjectMappingRequest, - O: GetSubjectMappingResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.subjectmapping.SubjectMappingService.CreateSubjectMapping - */ - createSubjectMapping: { - name: 'CreateSubjectMapping', - I: CreateSubjectMappingRequest, - O: CreateSubjectMappingResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.subjectmapping.SubjectMappingService.UpdateSubjectMapping - */ - updateSubjectMapping: { - name: 'UpdateSubjectMapping', - I: UpdateSubjectMappingRequest, - O: UpdateSubjectMappingResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.subjectmapping.SubjectMappingService.DeleteSubjectMapping - */ - deleteSubjectMapping: { - name: 'DeleteSubjectMapping', - I: DeleteSubjectMappingRequest, - O: DeleteSubjectMappingResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.subjectmapping.SubjectMappingService.ListSubjectConditionSets - */ - listSubjectConditionSets: { - name: 'ListSubjectConditionSets', - I: ListSubjectConditionSetsRequest, - O: ListSubjectConditionSetsResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.subjectmapping.SubjectMappingService.GetSubjectConditionSet - */ - getSubjectConditionSet: { - name: 'GetSubjectConditionSet', - I: GetSubjectConditionSetRequest, - O: GetSubjectConditionSetResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.subjectmapping.SubjectMappingService.CreateSubjectConditionSet - */ - createSubjectConditionSet: { - name: 'CreateSubjectConditionSet', - I: CreateSubjectConditionSetRequest, - O: CreateSubjectConditionSetResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.subjectmapping.SubjectMappingService.UpdateSubjectConditionSet - */ - updateSubjectConditionSet: { - name: 'UpdateSubjectConditionSet', - I: UpdateSubjectConditionSetRequest, - O: UpdateSubjectConditionSetResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.subjectmapping.SubjectMappingService.DeleteSubjectConditionSet - */ - deleteSubjectConditionSet: { - name: 'DeleteSubjectConditionSet', - I: DeleteSubjectConditionSetRequest, - O: DeleteSubjectConditionSetResponse, - kind: MethodKind.Unary, - }, - }, -} as const; diff --git a/lib/src/platform/policy/subjectmapping/subject_mapping_pb.d.ts b/lib/src/platform/policy/subjectmapping/subject_mapping_pb.d.ts index c19d1d53..1ca84a83 100644 --- a/lib/src/platform/policy/subjectmapping/subject_mapping_pb.d.ts +++ b/lib/src/platform/policy/subjectmapping/subject_mapping_pb.d.ts @@ -1,758 +1,672 @@ -import * as jspb from 'google-protobuf'; - -import * as buf_validate_validate_pb from '../../buf/validate/validate_pb'; // proto import: "buf/validate/validate.proto" -import * as google_api_annotations_pb from '../../google/api/annotations_pb'; // proto import: "google/api/annotations.proto" -import * as common_common_pb from '../../common/common_pb'; // proto import: "common/common.proto" -import * as policy_objects_pb from '../../policy/objects_pb'; // proto import: "policy/objects.proto" - -export class MatchSubjectMappingsRequest extends jspb.Message { - getSubjectPropertiesList(): Array; - setSubjectPropertiesList( - value: Array - ): MatchSubjectMappingsRequest; - clearSubjectPropertiesList(): MatchSubjectMappingsRequest; - addSubjectProperties( - value?: policy_objects_pb.SubjectProperty, - index?: number - ): policy_objects_pb.SubjectProperty; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MatchSubjectMappingsRequest.AsObject; - static toObject( - includeInstance: boolean, - msg: MatchSubjectMappingsRequest - ): MatchSubjectMappingsRequest.AsObject; - static serializeBinaryToWriter( - message: MatchSubjectMappingsRequest, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): MatchSubjectMappingsRequest; - static deserializeBinaryFromReader( - message: MatchSubjectMappingsRequest, - reader: jspb.BinaryReader - ): MatchSubjectMappingsRequest; -} +// @generated by protoc-gen-es v1.9.0 with parameter "target=js+dts,import_extension=none" +// @generated from file policy/subjectmapping/subject_mapping.proto (package policy.subjectmapping, syntax proto3) +/* eslint-disable */ +// @ts-nocheck -export namespace MatchSubjectMappingsRequest { - export type AsObject = { - subjectPropertiesList: Array; - }; -} +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; +import type { Action, SubjectConditionSet, SubjectMapping, SubjectProperty, SubjectSet } from "../objects_pb"; +import type { MetadataMutable, MetadataUpdateEnum } from "../../common/common_pb"; -export class MatchSubjectMappingsResponse extends jspb.Message { - getSubjectMappingsList(): Array; - setSubjectMappingsList( - value: Array - ): MatchSubjectMappingsResponse; - clearSubjectMappingsList(): MatchSubjectMappingsResponse; - addSubjectMappings( - value?: policy_objects_pb.SubjectMapping, - index?: number - ): policy_objects_pb.SubjectMapping; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MatchSubjectMappingsResponse.AsObject; - static toObject( - includeInstance: boolean, - msg: MatchSubjectMappingsResponse - ): MatchSubjectMappingsResponse.AsObject; - static serializeBinaryToWriter( - message: MatchSubjectMappingsResponse, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): MatchSubjectMappingsResponse; - static deserializeBinaryFromReader( - message: MatchSubjectMappingsResponse, - reader: jspb.BinaryReader - ): MatchSubjectMappingsResponse; -} +/** + * MatchSubjectMappingsRequest liberally returns a list of SubjectMappings based on the provided SubjectProperties. The SubjectMappings are returned + * if there is any single condition found among the structures that matches for one of the provided properties: + * 1. The external selector value, external value, and an IN operator + * 2. The external selector value, _no_ external value, and a NOT_IN operator + * + * Without this filtering, if a selector value was something like '.emailAddress' or '.username', every Subject is probably going to relate to that mapping + * in some way or another, potentially matching every single attribute in the DB if a policy admin has relied heavily on that field. There is no + * logic applied beyond a single condition within the query to avoid business logic interpreting the supplied conditions beyond the bare minimum + * initial filter. + * + * NOTE: if you have any issues, debug logs are available within the service to help identify why a mapping was or was not returned. + * + * @generated from message policy.subjectmapping.MatchSubjectMappingsRequest + */ +export declare class MatchSubjectMappingsRequest extends Message { + /** + * @generated from field: repeated policy.SubjectProperty subject_properties = 1; + */ + subjectProperties: SubjectProperty[]; -export namespace MatchSubjectMappingsResponse { - export type AsObject = { - subjectMappingsList: Array; - }; -} + constructor(data?: PartialMessage); -export class GetSubjectMappingRequest extends jspb.Message { - getId(): string; - setId(value: string): GetSubjectMappingRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetSubjectMappingRequest.AsObject; - static toObject( - includeInstance: boolean, - msg: GetSubjectMappingRequest - ): GetSubjectMappingRequest.AsObject; - static serializeBinaryToWriter( - message: GetSubjectMappingRequest, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): GetSubjectMappingRequest; - static deserializeBinaryFromReader( - message: GetSubjectMappingRequest, - reader: jspb.BinaryReader - ): GetSubjectMappingRequest; -} + static readonly runtime: typeof proto3; + static readonly typeName = "policy.subjectmapping.MatchSubjectMappingsRequest"; + static readonly fields: FieldList; -export namespace GetSubjectMappingRequest { - export type AsObject = { - id: string; - }; -} + static fromBinary(bytes: Uint8Array, options?: Partial): MatchSubjectMappingsRequest; -export class GetSubjectMappingResponse extends jspb.Message { - getSubjectMapping(): policy_objects_pb.SubjectMapping | undefined; - setSubjectMapping(value?: policy_objects_pb.SubjectMapping): GetSubjectMappingResponse; - hasSubjectMapping(): boolean; - clearSubjectMapping(): GetSubjectMappingResponse; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetSubjectMappingResponse.AsObject; - static toObject( - includeInstance: boolean, - msg: GetSubjectMappingResponse - ): GetSubjectMappingResponse.AsObject; - static serializeBinaryToWriter( - message: GetSubjectMappingResponse, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): GetSubjectMappingResponse; - static deserializeBinaryFromReader( - message: GetSubjectMappingResponse, - reader: jspb.BinaryReader - ): GetSubjectMappingResponse; -} + static fromJson(jsonValue: JsonValue, options?: Partial): MatchSubjectMappingsRequest; -export namespace GetSubjectMappingResponse { - export type AsObject = { - subjectMapping?: policy_objects_pb.SubjectMapping.AsObject; - }; -} + static fromJsonString(jsonString: string, options?: Partial): MatchSubjectMappingsRequest; -export class ListSubjectMappingsRequest extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListSubjectMappingsRequest.AsObject; - static toObject( - includeInstance: boolean, - msg: ListSubjectMappingsRequest - ): ListSubjectMappingsRequest.AsObject; - static serializeBinaryToWriter( - message: ListSubjectMappingsRequest, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): ListSubjectMappingsRequest; - static deserializeBinaryFromReader( - message: ListSubjectMappingsRequest, - reader: jspb.BinaryReader - ): ListSubjectMappingsRequest; + static equals(a: MatchSubjectMappingsRequest | PlainMessage | undefined, b: MatchSubjectMappingsRequest | PlainMessage | undefined): boolean; } -export namespace ListSubjectMappingsRequest { - export type AsObject = {}; -} +/** + * @generated from message policy.subjectmapping.MatchSubjectMappingsResponse + */ +export declare class MatchSubjectMappingsResponse extends Message { + /** + * @generated from field: repeated policy.SubjectMapping subject_mappings = 1; + */ + subjectMappings: SubjectMapping[]; -export class ListSubjectMappingsResponse extends jspb.Message { - getSubjectMappingsList(): Array; - setSubjectMappingsList( - value: Array - ): ListSubjectMappingsResponse; - clearSubjectMappingsList(): ListSubjectMappingsResponse; - addSubjectMappings( - value?: policy_objects_pb.SubjectMapping, - index?: number - ): policy_objects_pb.SubjectMapping; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListSubjectMappingsResponse.AsObject; - static toObject( - includeInstance: boolean, - msg: ListSubjectMappingsResponse - ): ListSubjectMappingsResponse.AsObject; - static serializeBinaryToWriter( - message: ListSubjectMappingsResponse, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): ListSubjectMappingsResponse; - static deserializeBinaryFromReader( - message: ListSubjectMappingsResponse, - reader: jspb.BinaryReader - ): ListSubjectMappingsResponse; -} + constructor(data?: PartialMessage); -export namespace ListSubjectMappingsResponse { - export type AsObject = { - subjectMappingsList: Array; - }; -} + static readonly runtime: typeof proto3; + static readonly typeName = "policy.subjectmapping.MatchSubjectMappingsResponse"; + static readonly fields: FieldList; -export class CreateSubjectMappingRequest extends jspb.Message { - getAttributeValueId(): string; - setAttributeValueId(value: string): CreateSubjectMappingRequest; - - getActionsList(): Array; - setActionsList(value: Array): CreateSubjectMappingRequest; - clearActionsList(): CreateSubjectMappingRequest; - addActions(value?: policy_objects_pb.Action, index?: number): policy_objects_pb.Action; - - getExistingSubjectConditionSetId(): string; - setExistingSubjectConditionSetId(value: string): CreateSubjectMappingRequest; - - getNewSubjectConditionSet(): SubjectConditionSetCreate | undefined; - setNewSubjectConditionSet(value?: SubjectConditionSetCreate): CreateSubjectMappingRequest; - hasNewSubjectConditionSet(): boolean; - clearNewSubjectConditionSet(): CreateSubjectMappingRequest; - - getMetadata(): common_common_pb.MetadataMutable | undefined; - setMetadata(value?: common_common_pb.MetadataMutable): CreateSubjectMappingRequest; - hasMetadata(): boolean; - clearMetadata(): CreateSubjectMappingRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateSubjectMappingRequest.AsObject; - static toObject( - includeInstance: boolean, - msg: CreateSubjectMappingRequest - ): CreateSubjectMappingRequest.AsObject; - static serializeBinaryToWriter( - message: CreateSubjectMappingRequest, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): CreateSubjectMappingRequest; - static deserializeBinaryFromReader( - message: CreateSubjectMappingRequest, - reader: jspb.BinaryReader - ): CreateSubjectMappingRequest; -} + static fromBinary(bytes: Uint8Array, options?: Partial): MatchSubjectMappingsResponse; -export namespace CreateSubjectMappingRequest { - export type AsObject = { - attributeValueId: string; - actionsList: Array; - existingSubjectConditionSetId: string; - newSubjectConditionSet?: SubjectConditionSetCreate.AsObject; - metadata?: common_common_pb.MetadataMutable.AsObject; - }; -} + static fromJson(jsonValue: JsonValue, options?: Partial): MatchSubjectMappingsResponse; -export class CreateSubjectMappingResponse extends jspb.Message { - getSubjectMapping(): policy_objects_pb.SubjectMapping | undefined; - setSubjectMapping(value?: policy_objects_pb.SubjectMapping): CreateSubjectMappingResponse; - hasSubjectMapping(): boolean; - clearSubjectMapping(): CreateSubjectMappingResponse; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateSubjectMappingResponse.AsObject; - static toObject( - includeInstance: boolean, - msg: CreateSubjectMappingResponse - ): CreateSubjectMappingResponse.AsObject; - static serializeBinaryToWriter( - message: CreateSubjectMappingResponse, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): CreateSubjectMappingResponse; - static deserializeBinaryFromReader( - message: CreateSubjectMappingResponse, - reader: jspb.BinaryReader - ): CreateSubjectMappingResponse; -} + static fromJsonString(jsonString: string, options?: Partial): MatchSubjectMappingsResponse; -export namespace CreateSubjectMappingResponse { - export type AsObject = { - subjectMapping?: policy_objects_pb.SubjectMapping.AsObject; - }; + static equals(a: MatchSubjectMappingsResponse | PlainMessage | undefined, b: MatchSubjectMappingsResponse | PlainMessage | undefined): boolean; } -export class UpdateSubjectMappingRequest extends jspb.Message { - getId(): string; - setId(value: string): UpdateSubjectMappingRequest; - - getSubjectConditionSetId(): string; - setSubjectConditionSetId(value: string): UpdateSubjectMappingRequest; - - getActionsList(): Array; - setActionsList(value: Array): UpdateSubjectMappingRequest; - clearActionsList(): UpdateSubjectMappingRequest; - addActions(value?: policy_objects_pb.Action, index?: number): policy_objects_pb.Action; - - getMetadata(): common_common_pb.MetadataMutable | undefined; - setMetadata(value?: common_common_pb.MetadataMutable): UpdateSubjectMappingRequest; - hasMetadata(): boolean; - clearMetadata(): UpdateSubjectMappingRequest; - - getMetadataUpdateBehavior(): common_common_pb.MetadataUpdateEnum; - setMetadataUpdateBehavior( - value: common_common_pb.MetadataUpdateEnum - ): UpdateSubjectMappingRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UpdateSubjectMappingRequest.AsObject; - static toObject( - includeInstance: boolean, - msg: UpdateSubjectMappingRequest - ): UpdateSubjectMappingRequest.AsObject; - static serializeBinaryToWriter( - message: UpdateSubjectMappingRequest, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): UpdateSubjectMappingRequest; - static deserializeBinaryFromReader( - message: UpdateSubjectMappingRequest, - reader: jspb.BinaryReader - ): UpdateSubjectMappingRequest; -} +/** + * @generated from message policy.subjectmapping.GetSubjectMappingRequest + */ +export declare class GetSubjectMappingRequest extends Message { + /** + * @generated from field: string id = 1; + */ + id: string; -export namespace UpdateSubjectMappingRequest { - export type AsObject = { - id: string; - subjectConditionSetId: string; - actionsList: Array; - metadata?: common_common_pb.MetadataMutable.AsObject; - metadataUpdateBehavior: common_common_pb.MetadataUpdateEnum; - }; -} + constructor(data?: PartialMessage); -export class UpdateSubjectMappingResponse extends jspb.Message { - getSubjectMapping(): policy_objects_pb.SubjectMapping | undefined; - setSubjectMapping(value?: policy_objects_pb.SubjectMapping): UpdateSubjectMappingResponse; - hasSubjectMapping(): boolean; - clearSubjectMapping(): UpdateSubjectMappingResponse; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UpdateSubjectMappingResponse.AsObject; - static toObject( - includeInstance: boolean, - msg: UpdateSubjectMappingResponse - ): UpdateSubjectMappingResponse.AsObject; - static serializeBinaryToWriter( - message: UpdateSubjectMappingResponse, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): UpdateSubjectMappingResponse; - static deserializeBinaryFromReader( - message: UpdateSubjectMappingResponse, - reader: jspb.BinaryReader - ): UpdateSubjectMappingResponse; -} + static readonly runtime: typeof proto3; + static readonly typeName = "policy.subjectmapping.GetSubjectMappingRequest"; + static readonly fields: FieldList; -export namespace UpdateSubjectMappingResponse { - export type AsObject = { - subjectMapping?: policy_objects_pb.SubjectMapping.AsObject; - }; -} + static fromBinary(bytes: Uint8Array, options?: Partial): GetSubjectMappingRequest; -export class DeleteSubjectMappingRequest extends jspb.Message { - getId(): string; - setId(value: string): DeleteSubjectMappingRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DeleteSubjectMappingRequest.AsObject; - static toObject( - includeInstance: boolean, - msg: DeleteSubjectMappingRequest - ): DeleteSubjectMappingRequest.AsObject; - static serializeBinaryToWriter( - message: DeleteSubjectMappingRequest, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): DeleteSubjectMappingRequest; - static deserializeBinaryFromReader( - message: DeleteSubjectMappingRequest, - reader: jspb.BinaryReader - ): DeleteSubjectMappingRequest; -} + static fromJson(jsonValue: JsonValue, options?: Partial): GetSubjectMappingRequest; -export namespace DeleteSubjectMappingRequest { - export type AsObject = { - id: string; - }; -} + static fromJsonString(jsonString: string, options?: Partial): GetSubjectMappingRequest; -export class DeleteSubjectMappingResponse extends jspb.Message { - getSubjectMapping(): policy_objects_pb.SubjectMapping | undefined; - setSubjectMapping(value?: policy_objects_pb.SubjectMapping): DeleteSubjectMappingResponse; - hasSubjectMapping(): boolean; - clearSubjectMapping(): DeleteSubjectMappingResponse; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DeleteSubjectMappingResponse.AsObject; - static toObject( - includeInstance: boolean, - msg: DeleteSubjectMappingResponse - ): DeleteSubjectMappingResponse.AsObject; - static serializeBinaryToWriter( - message: DeleteSubjectMappingResponse, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): DeleteSubjectMappingResponse; - static deserializeBinaryFromReader( - message: DeleteSubjectMappingResponse, - reader: jspb.BinaryReader - ): DeleteSubjectMappingResponse; + static equals(a: GetSubjectMappingRequest | PlainMessage | undefined, b: GetSubjectMappingRequest | PlainMessage | undefined): boolean; } -export namespace DeleteSubjectMappingResponse { - export type AsObject = { - subjectMapping?: policy_objects_pb.SubjectMapping.AsObject; - }; -} +/** + * @generated from message policy.subjectmapping.GetSubjectMappingResponse + */ +export declare class GetSubjectMappingResponse extends Message { + /** + * @generated from field: policy.SubjectMapping subject_mapping = 1; + */ + subjectMapping?: SubjectMapping; -export class GetSubjectConditionSetRequest extends jspb.Message { - getId(): string; - setId(value: string): GetSubjectConditionSetRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetSubjectConditionSetRequest.AsObject; - static toObject( - includeInstance: boolean, - msg: GetSubjectConditionSetRequest - ): GetSubjectConditionSetRequest.AsObject; - static serializeBinaryToWriter( - message: GetSubjectConditionSetRequest, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): GetSubjectConditionSetRequest; - static deserializeBinaryFromReader( - message: GetSubjectConditionSetRequest, - reader: jspb.BinaryReader - ): GetSubjectConditionSetRequest; -} + constructor(data?: PartialMessage); -export namespace GetSubjectConditionSetRequest { - export type AsObject = { - id: string; - }; -} + static readonly runtime: typeof proto3; + static readonly typeName = "policy.subjectmapping.GetSubjectMappingResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): GetSubjectMappingResponse; -export class GetSubjectConditionSetResponse extends jspb.Message { - getSubjectConditionSet(): policy_objects_pb.SubjectConditionSet | undefined; - setSubjectConditionSet( - value?: policy_objects_pb.SubjectConditionSet - ): GetSubjectConditionSetResponse; - hasSubjectConditionSet(): boolean; - clearSubjectConditionSet(): GetSubjectConditionSetResponse; - - getAssociatedSubjectMappingsList(): Array; - setAssociatedSubjectMappingsList( - value: Array - ): GetSubjectConditionSetResponse; - clearAssociatedSubjectMappingsList(): GetSubjectConditionSetResponse; - addAssociatedSubjectMappings( - value?: policy_objects_pb.SubjectMapping, - index?: number - ): policy_objects_pb.SubjectMapping; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetSubjectConditionSetResponse.AsObject; - static toObject( - includeInstance: boolean, - msg: GetSubjectConditionSetResponse - ): GetSubjectConditionSetResponse.AsObject; - static serializeBinaryToWriter( - message: GetSubjectConditionSetResponse, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): GetSubjectConditionSetResponse; - static deserializeBinaryFromReader( - message: GetSubjectConditionSetResponse, - reader: jspb.BinaryReader - ): GetSubjectConditionSetResponse; + static fromJson(jsonValue: JsonValue, options?: Partial): GetSubjectMappingResponse; + + static fromJsonString(jsonString: string, options?: Partial): GetSubjectMappingResponse; + + static equals(a: GetSubjectMappingResponse | PlainMessage | undefined, b: GetSubjectMappingResponse | PlainMessage | undefined): boolean; } -export namespace GetSubjectConditionSetResponse { - export type AsObject = { - subjectConditionSet?: policy_objects_pb.SubjectConditionSet.AsObject; - associatedSubjectMappingsList: Array; - }; +/** + * @generated from message policy.subjectmapping.ListSubjectMappingsRequest + */ +export declare class ListSubjectMappingsRequest extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.subjectmapping.ListSubjectMappingsRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ListSubjectMappingsRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): ListSubjectMappingsRequest; + + static fromJsonString(jsonString: string, options?: Partial): ListSubjectMappingsRequest; + + static equals(a: ListSubjectMappingsRequest | PlainMessage | undefined, b: ListSubjectMappingsRequest | PlainMessage | undefined): boolean; } -export class ListSubjectConditionSetsRequest extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListSubjectConditionSetsRequest.AsObject; - static toObject( - includeInstance: boolean, - msg: ListSubjectConditionSetsRequest - ): ListSubjectConditionSetsRequest.AsObject; - static serializeBinaryToWriter( - message: ListSubjectConditionSetsRequest, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): ListSubjectConditionSetsRequest; - static deserializeBinaryFromReader( - message: ListSubjectConditionSetsRequest, - reader: jspb.BinaryReader - ): ListSubjectConditionSetsRequest; +/** + * @generated from message policy.subjectmapping.ListSubjectMappingsResponse + */ +export declare class ListSubjectMappingsResponse extends Message { + /** + * @generated from field: repeated policy.SubjectMapping subject_mappings = 1; + */ + subjectMappings: SubjectMapping[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.subjectmapping.ListSubjectMappingsResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ListSubjectMappingsResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): ListSubjectMappingsResponse; + + static fromJsonString(jsonString: string, options?: Partial): ListSubjectMappingsResponse; + + static equals(a: ListSubjectMappingsResponse | PlainMessage | undefined, b: ListSubjectMappingsResponse | PlainMessage | undefined): boolean; } -export namespace ListSubjectConditionSetsRequest { - export type AsObject = {}; +/** + * @generated from message policy.subjectmapping.CreateSubjectMappingRequest + */ +export declare class CreateSubjectMappingRequest extends Message { + /** + * Required + * Attribute Value to be mapped to + * + * @generated from field: string attribute_value_id = 1; + */ + attributeValueId: string; + + /** + * The actions permitted by subjects in this mapping + * + * @generated from field: repeated policy.Action actions = 2; + */ + actions: Action[]; + + /** + * Either of the following: + * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set) + * + * @generated from field: string existing_subject_condition_set_id = 3; + */ + existingSubjectConditionSetId: string; + + /** + * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided) + * + * @generated from field: policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4; + */ + newSubjectConditionSet?: SubjectConditionSetCreate; + + /** + * Optional + * + * @generated from field: common.MetadataMutable metadata = 100; + */ + metadata?: MetadataMutable; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.subjectmapping.CreateSubjectMappingRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): CreateSubjectMappingRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): CreateSubjectMappingRequest; + + static fromJsonString(jsonString: string, options?: Partial): CreateSubjectMappingRequest; + + static equals(a: CreateSubjectMappingRequest | PlainMessage | undefined, b: CreateSubjectMappingRequest | PlainMessage | undefined): boolean; } -export class ListSubjectConditionSetsResponse extends jspb.Message { - getSubjectConditionSetsList(): Array; - setSubjectConditionSetsList( - value: Array - ): ListSubjectConditionSetsResponse; - clearSubjectConditionSetsList(): ListSubjectConditionSetsResponse; - addSubjectConditionSets( - value?: policy_objects_pb.SubjectConditionSet, - index?: number - ): policy_objects_pb.SubjectConditionSet; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListSubjectConditionSetsResponse.AsObject; - static toObject( - includeInstance: boolean, - msg: ListSubjectConditionSetsResponse - ): ListSubjectConditionSetsResponse.AsObject; - static serializeBinaryToWriter( - message: ListSubjectConditionSetsResponse, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): ListSubjectConditionSetsResponse; - static deserializeBinaryFromReader( - message: ListSubjectConditionSetsResponse, - reader: jspb.BinaryReader - ): ListSubjectConditionSetsResponse; +/** + * @generated from message policy.subjectmapping.CreateSubjectMappingResponse + */ +export declare class CreateSubjectMappingResponse extends Message { + /** + * @generated from field: policy.SubjectMapping subject_mapping = 1; + */ + subjectMapping?: SubjectMapping; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.subjectmapping.CreateSubjectMappingResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): CreateSubjectMappingResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): CreateSubjectMappingResponse; + + static fromJsonString(jsonString: string, options?: Partial): CreateSubjectMappingResponse; + + static equals(a: CreateSubjectMappingResponse | PlainMessage | undefined, b: CreateSubjectMappingResponse | PlainMessage | undefined): boolean; } -export namespace ListSubjectConditionSetsResponse { - export type AsObject = { - subjectConditionSetsList: Array; - }; +/** + * @generated from message policy.subjectmapping.UpdateSubjectMappingRequest + */ +export declare class UpdateSubjectMappingRequest extends Message { + /** + * Required + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * Optional + * Replaces the existing SubjectConditionSet id with a new one + * + * @generated from field: string subject_condition_set_id = 2; + */ + subjectConditionSetId: string; + + /** + * Replaces entire list of actions permitted by subjects + * + * @generated from field: repeated policy.Action actions = 3; + */ + actions: Action[]; + + /** + * Common metadata + * + * @generated from field: common.MetadataMutable metadata = 100; + */ + metadata?: MetadataMutable; + + /** + * @generated from field: common.MetadataUpdateEnum metadata_update_behavior = 101; + */ + metadataUpdateBehavior: MetadataUpdateEnum; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.subjectmapping.UpdateSubjectMappingRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): UpdateSubjectMappingRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): UpdateSubjectMappingRequest; + + static fromJsonString(jsonString: string, options?: Partial): UpdateSubjectMappingRequest; + + static equals(a: UpdateSubjectMappingRequest | PlainMessage | undefined, b: UpdateSubjectMappingRequest | PlainMessage | undefined): boolean; } -export class SubjectConditionSetCreate extends jspb.Message { - getSubjectSetsList(): Array; - setSubjectSetsList(value: Array): SubjectConditionSetCreate; - clearSubjectSetsList(): SubjectConditionSetCreate; - addSubjectSets( - value?: policy_objects_pb.SubjectSet, - index?: number - ): policy_objects_pb.SubjectSet; - - getMetadata(): common_common_pb.MetadataMutable | undefined; - setMetadata(value?: common_common_pb.MetadataMutable): SubjectConditionSetCreate; - hasMetadata(): boolean; - clearMetadata(): SubjectConditionSetCreate; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SubjectConditionSetCreate.AsObject; - static toObject( - includeInstance: boolean, - msg: SubjectConditionSetCreate - ): SubjectConditionSetCreate.AsObject; - static serializeBinaryToWriter( - message: SubjectConditionSetCreate, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): SubjectConditionSetCreate; - static deserializeBinaryFromReader( - message: SubjectConditionSetCreate, - reader: jspb.BinaryReader - ): SubjectConditionSetCreate; +/** + * @generated from message policy.subjectmapping.UpdateSubjectMappingResponse + */ +export declare class UpdateSubjectMappingResponse extends Message { + /** + * Only ID of the updated Subject Mapping provided + * + * @generated from field: policy.SubjectMapping subject_mapping = 1; + */ + subjectMapping?: SubjectMapping; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.subjectmapping.UpdateSubjectMappingResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): UpdateSubjectMappingResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): UpdateSubjectMappingResponse; + + static fromJsonString(jsonString: string, options?: Partial): UpdateSubjectMappingResponse; + + static equals(a: UpdateSubjectMappingResponse | PlainMessage | undefined, b: UpdateSubjectMappingResponse | PlainMessage | undefined): boolean; } -export namespace SubjectConditionSetCreate { - export type AsObject = { - subjectSetsList: Array; - metadata?: common_common_pb.MetadataMutable.AsObject; - }; +/** + * @generated from message policy.subjectmapping.DeleteSubjectMappingRequest + */ +export declare class DeleteSubjectMappingRequest extends Message { + /** + * @generated from field: string id = 1; + */ + id: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.subjectmapping.DeleteSubjectMappingRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): DeleteSubjectMappingRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): DeleteSubjectMappingRequest; + + static fromJsonString(jsonString: string, options?: Partial): DeleteSubjectMappingRequest; + + static equals(a: DeleteSubjectMappingRequest | PlainMessage | undefined, b: DeleteSubjectMappingRequest | PlainMessage | undefined): boolean; } -export class CreateSubjectConditionSetRequest extends jspb.Message { - getSubjectConditionSet(): SubjectConditionSetCreate | undefined; - setSubjectConditionSet(value?: SubjectConditionSetCreate): CreateSubjectConditionSetRequest; - hasSubjectConditionSet(): boolean; - clearSubjectConditionSet(): CreateSubjectConditionSetRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateSubjectConditionSetRequest.AsObject; - static toObject( - includeInstance: boolean, - msg: CreateSubjectConditionSetRequest - ): CreateSubjectConditionSetRequest.AsObject; - static serializeBinaryToWriter( - message: CreateSubjectConditionSetRequest, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): CreateSubjectConditionSetRequest; - static deserializeBinaryFromReader( - message: CreateSubjectConditionSetRequest, - reader: jspb.BinaryReader - ): CreateSubjectConditionSetRequest; +/** + * @generated from message policy.subjectmapping.DeleteSubjectMappingResponse + */ +export declare class DeleteSubjectMappingResponse extends Message { + /** + * Only ID of the updated Subject Mapping provided + * + * @generated from field: policy.SubjectMapping subject_mapping = 1; + */ + subjectMapping?: SubjectMapping; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.subjectmapping.DeleteSubjectMappingResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): DeleteSubjectMappingResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): DeleteSubjectMappingResponse; + + static fromJsonString(jsonString: string, options?: Partial): DeleteSubjectMappingResponse; + + static equals(a: DeleteSubjectMappingResponse | PlainMessage | undefined, b: DeleteSubjectMappingResponse | PlainMessage | undefined): boolean; } -export namespace CreateSubjectConditionSetRequest { - export type AsObject = { - subjectConditionSet?: SubjectConditionSetCreate.AsObject; - }; +/** + * @generated from message policy.subjectmapping.GetSubjectConditionSetRequest + */ +export declare class GetSubjectConditionSetRequest extends Message { + /** + * @generated from field: string id = 1; + */ + id: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.subjectmapping.GetSubjectConditionSetRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): GetSubjectConditionSetRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): GetSubjectConditionSetRequest; + + static fromJsonString(jsonString: string, options?: Partial): GetSubjectConditionSetRequest; + + static equals(a: GetSubjectConditionSetRequest | PlainMessage | undefined, b: GetSubjectConditionSetRequest | PlainMessage | undefined): boolean; } -export class CreateSubjectConditionSetResponse extends jspb.Message { - getSubjectConditionSet(): policy_objects_pb.SubjectConditionSet | undefined; - setSubjectConditionSet( - value?: policy_objects_pb.SubjectConditionSet - ): CreateSubjectConditionSetResponse; - hasSubjectConditionSet(): boolean; - clearSubjectConditionSet(): CreateSubjectConditionSetResponse; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateSubjectConditionSetResponse.AsObject; - static toObject( - includeInstance: boolean, - msg: CreateSubjectConditionSetResponse - ): CreateSubjectConditionSetResponse.AsObject; - static serializeBinaryToWriter( - message: CreateSubjectConditionSetResponse, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): CreateSubjectConditionSetResponse; - static deserializeBinaryFromReader( - message: CreateSubjectConditionSetResponse, - reader: jspb.BinaryReader - ): CreateSubjectConditionSetResponse; +/** + * @generated from message policy.subjectmapping.GetSubjectConditionSetResponse + */ +export declare class GetSubjectConditionSetResponse extends Message { + /** + * @generated from field: policy.SubjectConditionSet subject_condition_set = 1; + */ + subjectConditionSet?: SubjectConditionSet; + + /** + * contextualized Subject Mappings associated with this SubjectConditionSet + * + * @generated from field: repeated policy.SubjectMapping associated_subject_mappings = 2; + */ + associatedSubjectMappings: SubjectMapping[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.subjectmapping.GetSubjectConditionSetResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): GetSubjectConditionSetResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): GetSubjectConditionSetResponse; + + static fromJsonString(jsonString: string, options?: Partial): GetSubjectConditionSetResponse; + + static equals(a: GetSubjectConditionSetResponse | PlainMessage | undefined, b: GetSubjectConditionSetResponse | PlainMessage | undefined): boolean; } -export namespace CreateSubjectConditionSetResponse { - export type AsObject = { - subjectConditionSet?: policy_objects_pb.SubjectConditionSet.AsObject; - }; +/** + * @generated from message policy.subjectmapping.ListSubjectConditionSetsRequest + */ +export declare class ListSubjectConditionSetsRequest extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.subjectmapping.ListSubjectConditionSetsRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ListSubjectConditionSetsRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): ListSubjectConditionSetsRequest; + + static fromJsonString(jsonString: string, options?: Partial): ListSubjectConditionSetsRequest; + + static equals(a: ListSubjectConditionSetsRequest | PlainMessage | undefined, b: ListSubjectConditionSetsRequest | PlainMessage | undefined): boolean; } -export class UpdateSubjectConditionSetRequest extends jspb.Message { - getId(): string; - setId(value: string): UpdateSubjectConditionSetRequest; - - getSubjectSetsList(): Array; - setSubjectSetsList(value: Array): UpdateSubjectConditionSetRequest; - clearSubjectSetsList(): UpdateSubjectConditionSetRequest; - addSubjectSets( - value?: policy_objects_pb.SubjectSet, - index?: number - ): policy_objects_pb.SubjectSet; - - getMetadata(): common_common_pb.MetadataMutable | undefined; - setMetadata(value?: common_common_pb.MetadataMutable): UpdateSubjectConditionSetRequest; - hasMetadata(): boolean; - clearMetadata(): UpdateSubjectConditionSetRequest; - - getMetadataUpdateBehavior(): common_common_pb.MetadataUpdateEnum; - setMetadataUpdateBehavior( - value: common_common_pb.MetadataUpdateEnum - ): UpdateSubjectConditionSetRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UpdateSubjectConditionSetRequest.AsObject; - static toObject( - includeInstance: boolean, - msg: UpdateSubjectConditionSetRequest - ): UpdateSubjectConditionSetRequest.AsObject; - static serializeBinaryToWriter( - message: UpdateSubjectConditionSetRequest, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): UpdateSubjectConditionSetRequest; - static deserializeBinaryFromReader( - message: UpdateSubjectConditionSetRequest, - reader: jspb.BinaryReader - ): UpdateSubjectConditionSetRequest; +/** + * @generated from message policy.subjectmapping.ListSubjectConditionSetsResponse + */ +export declare class ListSubjectConditionSetsResponse extends Message { + /** + * @generated from field: repeated policy.SubjectConditionSet subject_condition_sets = 1; + */ + subjectConditionSets: SubjectConditionSet[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.subjectmapping.ListSubjectConditionSetsResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ListSubjectConditionSetsResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): ListSubjectConditionSetsResponse; + + static fromJsonString(jsonString: string, options?: Partial): ListSubjectConditionSetsResponse; + + static equals(a: ListSubjectConditionSetsResponse | PlainMessage | undefined, b: ListSubjectConditionSetsResponse | PlainMessage | undefined): boolean; } -export namespace UpdateSubjectConditionSetRequest { - export type AsObject = { - id: string; - subjectSetsList: Array; - metadata?: common_common_pb.MetadataMutable.AsObject; - metadataUpdateBehavior: common_common_pb.MetadataUpdateEnum; - }; +/** + * @generated from message policy.subjectmapping.SubjectConditionSetCreate + */ +export declare class SubjectConditionSetCreate extends Message { + /** + * Required + * + * @generated from field: repeated policy.SubjectSet subject_sets = 1; + */ + subjectSets: SubjectSet[]; + + /** + * Optional + * Common metadata + * + * @generated from field: common.MetadataMutable metadata = 100; + */ + metadata?: MetadataMutable; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.subjectmapping.SubjectConditionSetCreate"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SubjectConditionSetCreate; + + static fromJson(jsonValue: JsonValue, options?: Partial): SubjectConditionSetCreate; + + static fromJsonString(jsonString: string, options?: Partial): SubjectConditionSetCreate; + + static equals(a: SubjectConditionSetCreate | PlainMessage | undefined, b: SubjectConditionSetCreate | PlainMessage | undefined): boolean; } -export class UpdateSubjectConditionSetResponse extends jspb.Message { - getSubjectConditionSet(): policy_objects_pb.SubjectConditionSet | undefined; - setSubjectConditionSet( - value?: policy_objects_pb.SubjectConditionSet - ): UpdateSubjectConditionSetResponse; - hasSubjectConditionSet(): boolean; - clearSubjectConditionSet(): UpdateSubjectConditionSetResponse; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UpdateSubjectConditionSetResponse.AsObject; - static toObject( - includeInstance: boolean, - msg: UpdateSubjectConditionSetResponse - ): UpdateSubjectConditionSetResponse.AsObject; - static serializeBinaryToWriter( - message: UpdateSubjectConditionSetResponse, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): UpdateSubjectConditionSetResponse; - static deserializeBinaryFromReader( - message: UpdateSubjectConditionSetResponse, - reader: jspb.BinaryReader - ): UpdateSubjectConditionSetResponse; +/** + * @generated from message policy.subjectmapping.CreateSubjectConditionSetRequest + */ +export declare class CreateSubjectConditionSetRequest extends Message { + /** + * @generated from field: policy.subjectmapping.SubjectConditionSetCreate subject_condition_set = 1; + */ + subjectConditionSet?: SubjectConditionSetCreate; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.subjectmapping.CreateSubjectConditionSetRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): CreateSubjectConditionSetRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): CreateSubjectConditionSetRequest; + + static fromJsonString(jsonString: string, options?: Partial): CreateSubjectConditionSetRequest; + + static equals(a: CreateSubjectConditionSetRequest | PlainMessage | undefined, b: CreateSubjectConditionSetRequest | PlainMessage | undefined): boolean; } -export namespace UpdateSubjectConditionSetResponse { - export type AsObject = { - subjectConditionSet?: policy_objects_pb.SubjectConditionSet.AsObject; - }; +/** + * @generated from message policy.subjectmapping.CreateSubjectConditionSetResponse + */ +export declare class CreateSubjectConditionSetResponse extends Message { + /** + * @generated from field: policy.SubjectConditionSet subject_condition_set = 1; + */ + subjectConditionSet?: SubjectConditionSet; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.subjectmapping.CreateSubjectConditionSetResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): CreateSubjectConditionSetResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): CreateSubjectConditionSetResponse; + + static fromJsonString(jsonString: string, options?: Partial): CreateSubjectConditionSetResponse; + + static equals(a: CreateSubjectConditionSetResponse | PlainMessage | undefined, b: CreateSubjectConditionSetResponse | PlainMessage | undefined): boolean; } -export class DeleteSubjectConditionSetRequest extends jspb.Message { - getId(): string; - setId(value: string): DeleteSubjectConditionSetRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DeleteSubjectConditionSetRequest.AsObject; - static toObject( - includeInstance: boolean, - msg: DeleteSubjectConditionSetRequest - ): DeleteSubjectConditionSetRequest.AsObject; - static serializeBinaryToWriter( - message: DeleteSubjectConditionSetRequest, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): DeleteSubjectConditionSetRequest; - static deserializeBinaryFromReader( - message: DeleteSubjectConditionSetRequest, - reader: jspb.BinaryReader - ): DeleteSubjectConditionSetRequest; +/** + * @generated from message policy.subjectmapping.UpdateSubjectConditionSetRequest + */ +export declare class UpdateSubjectConditionSetRequest extends Message { + /** + * Required + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * Optional + * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions + * + * @generated from field: repeated policy.SubjectSet subject_sets = 2; + */ + subjectSets: SubjectSet[]; + + /** + * Common metadata + * + * @generated from field: common.MetadataMutable metadata = 100; + */ + metadata?: MetadataMutable; + + /** + * @generated from field: common.MetadataUpdateEnum metadata_update_behavior = 101; + */ + metadataUpdateBehavior: MetadataUpdateEnum; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.subjectmapping.UpdateSubjectConditionSetRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): UpdateSubjectConditionSetRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): UpdateSubjectConditionSetRequest; + + static fromJsonString(jsonString: string, options?: Partial): UpdateSubjectConditionSetRequest; + + static equals(a: UpdateSubjectConditionSetRequest | PlainMessage | undefined, b: UpdateSubjectConditionSetRequest | PlainMessage | undefined): boolean; } -export namespace DeleteSubjectConditionSetRequest { - export type AsObject = { - id: string; - }; +/** + * @generated from message policy.subjectmapping.UpdateSubjectConditionSetResponse + */ +export declare class UpdateSubjectConditionSetResponse extends Message { + /** + * Only ID of updated Subject Condition Set provided + * + * @generated from field: policy.SubjectConditionSet subject_condition_set = 1; + */ + subjectConditionSet?: SubjectConditionSet; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.subjectmapping.UpdateSubjectConditionSetResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): UpdateSubjectConditionSetResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): UpdateSubjectConditionSetResponse; + + static fromJsonString(jsonString: string, options?: Partial): UpdateSubjectConditionSetResponse; + + static equals(a: UpdateSubjectConditionSetResponse | PlainMessage | undefined, b: UpdateSubjectConditionSetResponse | PlainMessage | undefined): boolean; } -export class DeleteSubjectConditionSetResponse extends jspb.Message { - getSubjectConditionSet(): policy_objects_pb.SubjectConditionSet | undefined; - setSubjectConditionSet( - value?: policy_objects_pb.SubjectConditionSet - ): DeleteSubjectConditionSetResponse; - hasSubjectConditionSet(): boolean; - clearSubjectConditionSet(): DeleteSubjectConditionSetResponse; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DeleteSubjectConditionSetResponse.AsObject; - static toObject( - includeInstance: boolean, - msg: DeleteSubjectConditionSetResponse - ): DeleteSubjectConditionSetResponse.AsObject; - static serializeBinaryToWriter( - message: DeleteSubjectConditionSetResponse, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): DeleteSubjectConditionSetResponse; - static deserializeBinaryFromReader( - message: DeleteSubjectConditionSetResponse, - reader: jspb.BinaryReader - ): DeleteSubjectConditionSetResponse; +/** + * @generated from message policy.subjectmapping.DeleteSubjectConditionSetRequest + */ +export declare class DeleteSubjectConditionSetRequest extends Message { + /** + * @generated from field: string id = 1; + */ + id: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.subjectmapping.DeleteSubjectConditionSetRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): DeleteSubjectConditionSetRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): DeleteSubjectConditionSetRequest; + + static fromJsonString(jsonString: string, options?: Partial): DeleteSubjectConditionSetRequest; + + static equals(a: DeleteSubjectConditionSetRequest | PlainMessage | undefined, b: DeleteSubjectConditionSetRequest | PlainMessage | undefined): boolean; } -export namespace DeleteSubjectConditionSetResponse { - export type AsObject = { - subjectConditionSet?: policy_objects_pb.SubjectConditionSet.AsObject; - }; +/** + * @generated from message policy.subjectmapping.DeleteSubjectConditionSetResponse + */ +export declare class DeleteSubjectConditionSetResponse extends Message { + /** + * Only ID of deleted Subject Condition Set provided + * + * @generated from field: policy.SubjectConditionSet subject_condition_set = 1; + */ + subjectConditionSet?: SubjectConditionSet; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "policy.subjectmapping.DeleteSubjectConditionSetResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): DeleteSubjectConditionSetResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): DeleteSubjectConditionSetResponse; + + static fromJsonString(jsonString: string, options?: Partial): DeleteSubjectConditionSetResponse; + + static equals(a: DeleteSubjectConditionSetResponse | PlainMessage | undefined, b: DeleteSubjectConditionSetResponse | PlainMessage | undefined): boolean; } + diff --git a/lib/src/platform/policy/subjectmapping/subject_mapping_pb.ts b/lib/src/platform/policy/subjectmapping/subject_mapping_pb.ts deleted file mode 100644 index 555a236c..00000000 --- a/lib/src/platform/policy/subjectmapping/subject_mapping_pb.ts +++ /dev/null @@ -1,1325 +0,0 @@ -// @generated by protoc-gen-es v1.9.0 with parameter "target=ts" -// @generated from file policy/subjectmapping/subject_mapping.proto (package policy.subjectmapping, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import type { - BinaryReadOptions, - FieldList, - JsonReadOptions, - JsonValue, - PartialMessage, - PlainMessage, -} from '@bufbuild/protobuf'; -import { Message, proto3 } from '@bufbuild/protobuf'; -import { - Action, - SubjectConditionSet, - SubjectMapping, - SubjectProperty, - SubjectSet, -} from '../objects_pb.js'; -import { MetadataMutable, MetadataUpdateEnum } from '../../common/common_pb.js'; - -/** - * MatchSubjectMappingsRequest liberally returns a list of SubjectMappings based on the provided SubjectProperties. The SubjectMappings are returned - * if there is any single condition found among the structures that matches for one of the provided properties: - * 1. The external selector value, external value, and an IN operator - * 2. The external selector value, _no_ external value, and a NOT_IN operator - * - * Without this filtering, if a selector value was something like '.emailAddress' or '.username', every Subject is probably going to relate to that mapping - * in some way or another, potentially matching every single attribute in the DB if a policy admin has relied heavily on that field. There is no - * logic applied beyond a single condition within the query to avoid business logic interpreting the supplied conditions beyond the bare minimum - * initial filter. - * - * NOTE: if you have any issues, debug logs are available within the service to help identify why a mapping was or was not returned. - * - * @generated from message policy.subjectmapping.MatchSubjectMappingsRequest - */ -export class MatchSubjectMappingsRequest extends Message { - /** - * @generated from field: repeated policy.SubjectProperty subject_properties = 1; - */ - subjectProperties: SubjectProperty[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.subjectmapping.MatchSubjectMappingsRequest'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'subject_properties', kind: 'message', T: SubjectProperty, repeated: true }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): MatchSubjectMappingsRequest { - return new MatchSubjectMappingsRequest().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): MatchSubjectMappingsRequest { - return new MatchSubjectMappingsRequest().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): MatchSubjectMappingsRequest { - return new MatchSubjectMappingsRequest().fromJsonString(jsonString, options); - } - - static equals( - a: MatchSubjectMappingsRequest | PlainMessage | undefined, - b: MatchSubjectMappingsRequest | PlainMessage | undefined - ): boolean { - return proto3.util.equals(MatchSubjectMappingsRequest, a, b); - } -} - -/** - * @generated from message policy.subjectmapping.MatchSubjectMappingsResponse - */ -export class MatchSubjectMappingsResponse extends Message { - /** - * @generated from field: repeated policy.SubjectMapping subject_mappings = 1; - */ - subjectMappings: SubjectMapping[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.subjectmapping.MatchSubjectMappingsResponse'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'subject_mappings', kind: 'message', T: SubjectMapping, repeated: true }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): MatchSubjectMappingsResponse { - return new MatchSubjectMappingsResponse().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): MatchSubjectMappingsResponse { - return new MatchSubjectMappingsResponse().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): MatchSubjectMappingsResponse { - return new MatchSubjectMappingsResponse().fromJsonString(jsonString, options); - } - - static equals( - a: MatchSubjectMappingsResponse | PlainMessage | undefined, - b: MatchSubjectMappingsResponse | PlainMessage | undefined - ): boolean { - return proto3.util.equals(MatchSubjectMappingsResponse, a, b); - } -} - -/** - * @generated from message policy.subjectmapping.GetSubjectMappingRequest - */ -export class GetSubjectMappingRequest extends Message { - /** - * @generated from field: string id = 1; - */ - id = ''; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.subjectmapping.GetSubjectMappingRequest'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): GetSubjectMappingRequest { - return new GetSubjectMappingRequest().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): GetSubjectMappingRequest { - return new GetSubjectMappingRequest().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): GetSubjectMappingRequest { - return new GetSubjectMappingRequest().fromJsonString(jsonString, options); - } - - static equals( - a: GetSubjectMappingRequest | PlainMessage | undefined, - b: GetSubjectMappingRequest | PlainMessage | undefined - ): boolean { - return proto3.util.equals(GetSubjectMappingRequest, a, b); - } -} - -/** - * @generated from message policy.subjectmapping.GetSubjectMappingResponse - */ -export class GetSubjectMappingResponse extends Message { - /** - * @generated from field: policy.SubjectMapping subject_mapping = 1; - */ - subjectMapping?: SubjectMapping; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.subjectmapping.GetSubjectMappingResponse'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'subject_mapping', kind: 'message', T: SubjectMapping }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): GetSubjectMappingResponse { - return new GetSubjectMappingResponse().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): GetSubjectMappingResponse { - return new GetSubjectMappingResponse().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): GetSubjectMappingResponse { - return new GetSubjectMappingResponse().fromJsonString(jsonString, options); - } - - static equals( - a: GetSubjectMappingResponse | PlainMessage | undefined, - b: GetSubjectMappingResponse | PlainMessage | undefined - ): boolean { - return proto3.util.equals(GetSubjectMappingResponse, a, b); - } -} - -/** - * @generated from message policy.subjectmapping.ListSubjectMappingsRequest - */ -export class ListSubjectMappingsRequest extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.subjectmapping.ListSubjectMappingsRequest'; - static readonly fields: FieldList = proto3.util.newFieldList(() => []); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): ListSubjectMappingsRequest { - return new ListSubjectMappingsRequest().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): ListSubjectMappingsRequest { - return new ListSubjectMappingsRequest().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): ListSubjectMappingsRequest { - return new ListSubjectMappingsRequest().fromJsonString(jsonString, options); - } - - static equals( - a: ListSubjectMappingsRequest | PlainMessage | undefined, - b: ListSubjectMappingsRequest | PlainMessage | undefined - ): boolean { - return proto3.util.equals(ListSubjectMappingsRequest, a, b); - } -} - -/** - * @generated from message policy.subjectmapping.ListSubjectMappingsResponse - */ -export class ListSubjectMappingsResponse extends Message { - /** - * @generated from field: repeated policy.SubjectMapping subject_mappings = 1; - */ - subjectMappings: SubjectMapping[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.subjectmapping.ListSubjectMappingsResponse'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'subject_mappings', kind: 'message', T: SubjectMapping, repeated: true }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): ListSubjectMappingsResponse { - return new ListSubjectMappingsResponse().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): ListSubjectMappingsResponse { - return new ListSubjectMappingsResponse().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): ListSubjectMappingsResponse { - return new ListSubjectMappingsResponse().fromJsonString(jsonString, options); - } - - static equals( - a: ListSubjectMappingsResponse | PlainMessage | undefined, - b: ListSubjectMappingsResponse | PlainMessage | undefined - ): boolean { - return proto3.util.equals(ListSubjectMappingsResponse, a, b); - } -} - -/** - * @generated from message policy.subjectmapping.CreateSubjectMappingRequest - */ -export class CreateSubjectMappingRequest extends Message { - /** - * Required - * Attribute Value to be mapped to - * - * @generated from field: string attribute_value_id = 1; - */ - attributeValueId = ''; - - /** - * The actions permitted by subjects in this mapping - * - * @generated from field: repeated policy.Action actions = 2; - */ - actions: Action[] = []; - - /** - * Either of the following: - * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set) - * - * @generated from field: string existing_subject_condition_set_id = 3; - */ - existingSubjectConditionSetId = ''; - - /** - * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided) - * - * @generated from field: policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4; - */ - newSubjectConditionSet?: SubjectConditionSetCreate; - - /** - * Optional - * - * @generated from field: common.MetadataMutable metadata = 100; - */ - metadata?: MetadataMutable; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.subjectmapping.CreateSubjectMappingRequest'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'attribute_value_id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { no: 2, name: 'actions', kind: 'message', T: Action, repeated: true }, - { - no: 3, - name: 'existing_subject_condition_set_id', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - }, - { no: 4, name: 'new_subject_condition_set', kind: 'message', T: SubjectConditionSetCreate }, - { no: 100, name: 'metadata', kind: 'message', T: MetadataMutable }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): CreateSubjectMappingRequest { - return new CreateSubjectMappingRequest().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): CreateSubjectMappingRequest { - return new CreateSubjectMappingRequest().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): CreateSubjectMappingRequest { - return new CreateSubjectMappingRequest().fromJsonString(jsonString, options); - } - - static equals( - a: CreateSubjectMappingRequest | PlainMessage | undefined, - b: CreateSubjectMappingRequest | PlainMessage | undefined - ): boolean { - return proto3.util.equals(CreateSubjectMappingRequest, a, b); - } -} - -/** - * @generated from message policy.subjectmapping.CreateSubjectMappingResponse - */ -export class CreateSubjectMappingResponse extends Message { - /** - * @generated from field: policy.SubjectMapping subject_mapping = 1; - */ - subjectMapping?: SubjectMapping; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.subjectmapping.CreateSubjectMappingResponse'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'subject_mapping', kind: 'message', T: SubjectMapping }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): CreateSubjectMappingResponse { - return new CreateSubjectMappingResponse().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): CreateSubjectMappingResponse { - return new CreateSubjectMappingResponse().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): CreateSubjectMappingResponse { - return new CreateSubjectMappingResponse().fromJsonString(jsonString, options); - } - - static equals( - a: CreateSubjectMappingResponse | PlainMessage | undefined, - b: CreateSubjectMappingResponse | PlainMessage | undefined - ): boolean { - return proto3.util.equals(CreateSubjectMappingResponse, a, b); - } -} - -/** - * @generated from message policy.subjectmapping.UpdateSubjectMappingRequest - */ -export class UpdateSubjectMappingRequest extends Message { - /** - * Required - * - * @generated from field: string id = 1; - */ - id = ''; - - /** - * Optional - * Replaces the existing SubjectConditionSet id with a new one - * - * @generated from field: string subject_condition_set_id = 2; - */ - subjectConditionSetId = ''; - - /** - * Replaces entire list of actions permitted by subjects - * - * @generated from field: repeated policy.Action actions = 3; - */ - actions: Action[] = []; - - /** - * Common metadata - * - * @generated from field: common.MetadataMutable metadata = 100; - */ - metadata?: MetadataMutable; - - /** - * @generated from field: common.MetadataUpdateEnum metadata_update_behavior = 101; - */ - metadataUpdateBehavior = MetadataUpdateEnum.UNSPECIFIED; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.subjectmapping.UpdateSubjectMappingRequest'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { no: 2, name: 'subject_condition_set_id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { no: 3, name: 'actions', kind: 'message', T: Action, repeated: true }, - { no: 100, name: 'metadata', kind: 'message', T: MetadataMutable }, - { - no: 101, - name: 'metadata_update_behavior', - kind: 'enum', - T: proto3.getEnumType(MetadataUpdateEnum), - }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): UpdateSubjectMappingRequest { - return new UpdateSubjectMappingRequest().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): UpdateSubjectMappingRequest { - return new UpdateSubjectMappingRequest().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): UpdateSubjectMappingRequest { - return new UpdateSubjectMappingRequest().fromJsonString(jsonString, options); - } - - static equals( - a: UpdateSubjectMappingRequest | PlainMessage | undefined, - b: UpdateSubjectMappingRequest | PlainMessage | undefined - ): boolean { - return proto3.util.equals(UpdateSubjectMappingRequest, a, b); - } -} - -/** - * @generated from message policy.subjectmapping.UpdateSubjectMappingResponse - */ -export class UpdateSubjectMappingResponse extends Message { - /** - * Only ID of the updated Subject Mapping provided - * - * @generated from field: policy.SubjectMapping subject_mapping = 1; - */ - subjectMapping?: SubjectMapping; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.subjectmapping.UpdateSubjectMappingResponse'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'subject_mapping', kind: 'message', T: SubjectMapping }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): UpdateSubjectMappingResponse { - return new UpdateSubjectMappingResponse().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): UpdateSubjectMappingResponse { - return new UpdateSubjectMappingResponse().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): UpdateSubjectMappingResponse { - return new UpdateSubjectMappingResponse().fromJsonString(jsonString, options); - } - - static equals( - a: UpdateSubjectMappingResponse | PlainMessage | undefined, - b: UpdateSubjectMappingResponse | PlainMessage | undefined - ): boolean { - return proto3.util.equals(UpdateSubjectMappingResponse, a, b); - } -} - -/** - * @generated from message policy.subjectmapping.DeleteSubjectMappingRequest - */ -export class DeleteSubjectMappingRequest extends Message { - /** - * @generated from field: string id = 1; - */ - id = ''; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.subjectmapping.DeleteSubjectMappingRequest'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): DeleteSubjectMappingRequest { - return new DeleteSubjectMappingRequest().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): DeleteSubjectMappingRequest { - return new DeleteSubjectMappingRequest().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): DeleteSubjectMappingRequest { - return new DeleteSubjectMappingRequest().fromJsonString(jsonString, options); - } - - static equals( - a: DeleteSubjectMappingRequest | PlainMessage | undefined, - b: DeleteSubjectMappingRequest | PlainMessage | undefined - ): boolean { - return proto3.util.equals(DeleteSubjectMappingRequest, a, b); - } -} - -/** - * @generated from message policy.subjectmapping.DeleteSubjectMappingResponse - */ -export class DeleteSubjectMappingResponse extends Message { - /** - * Only ID of the updated Subject Mapping provided - * - * @generated from field: policy.SubjectMapping subject_mapping = 1; - */ - subjectMapping?: SubjectMapping; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.subjectmapping.DeleteSubjectMappingResponse'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'subject_mapping', kind: 'message', T: SubjectMapping }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): DeleteSubjectMappingResponse { - return new DeleteSubjectMappingResponse().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): DeleteSubjectMappingResponse { - return new DeleteSubjectMappingResponse().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): DeleteSubjectMappingResponse { - return new DeleteSubjectMappingResponse().fromJsonString(jsonString, options); - } - - static equals( - a: DeleteSubjectMappingResponse | PlainMessage | undefined, - b: DeleteSubjectMappingResponse | PlainMessage | undefined - ): boolean { - return proto3.util.equals(DeleteSubjectMappingResponse, a, b); - } -} - -/** - * @generated from message policy.subjectmapping.GetSubjectConditionSetRequest - */ -export class GetSubjectConditionSetRequest extends Message { - /** - * @generated from field: string id = 1; - */ - id = ''; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.subjectmapping.GetSubjectConditionSetRequest'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): GetSubjectConditionSetRequest { - return new GetSubjectConditionSetRequest().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): GetSubjectConditionSetRequest { - return new GetSubjectConditionSetRequest().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): GetSubjectConditionSetRequest { - return new GetSubjectConditionSetRequest().fromJsonString(jsonString, options); - } - - static equals( - a: GetSubjectConditionSetRequest | PlainMessage | undefined, - b: GetSubjectConditionSetRequest | PlainMessage | undefined - ): boolean { - return proto3.util.equals(GetSubjectConditionSetRequest, a, b); - } -} - -/** - * @generated from message policy.subjectmapping.GetSubjectConditionSetResponse - */ -export class GetSubjectConditionSetResponse extends Message { - /** - * @generated from field: policy.SubjectConditionSet subject_condition_set = 1; - */ - subjectConditionSet?: SubjectConditionSet; - - /** - * contextualized Subject Mappings associated with this SubjectConditionSet - * - * @generated from field: repeated policy.SubjectMapping associated_subject_mappings = 2; - */ - associatedSubjectMappings: SubjectMapping[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.subjectmapping.GetSubjectConditionSetResponse'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'subject_condition_set', kind: 'message', T: SubjectConditionSet }, - { - no: 2, - name: 'associated_subject_mappings', - kind: 'message', - T: SubjectMapping, - repeated: true, - }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): GetSubjectConditionSetResponse { - return new GetSubjectConditionSetResponse().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): GetSubjectConditionSetResponse { - return new GetSubjectConditionSetResponse().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): GetSubjectConditionSetResponse { - return new GetSubjectConditionSetResponse().fromJsonString(jsonString, options); - } - - static equals( - a: GetSubjectConditionSetResponse | PlainMessage | undefined, - b: GetSubjectConditionSetResponse | PlainMessage | undefined - ): boolean { - return proto3.util.equals(GetSubjectConditionSetResponse, a, b); - } -} - -/** - * @generated from message policy.subjectmapping.ListSubjectConditionSetsRequest - */ -export class ListSubjectConditionSetsRequest extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.subjectmapping.ListSubjectConditionSetsRequest'; - static readonly fields: FieldList = proto3.util.newFieldList(() => []); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): ListSubjectConditionSetsRequest { - return new ListSubjectConditionSetsRequest().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): ListSubjectConditionSetsRequest { - return new ListSubjectConditionSetsRequest().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): ListSubjectConditionSetsRequest { - return new ListSubjectConditionSetsRequest().fromJsonString(jsonString, options); - } - - static equals( - a: ListSubjectConditionSetsRequest | PlainMessage | undefined, - b: ListSubjectConditionSetsRequest | PlainMessage | undefined - ): boolean { - return proto3.util.equals(ListSubjectConditionSetsRequest, a, b); - } -} - -/** - * @generated from message policy.subjectmapping.ListSubjectConditionSetsResponse - */ -export class ListSubjectConditionSetsResponse extends Message { - /** - * @generated from field: repeated policy.SubjectConditionSet subject_condition_sets = 1; - */ - subjectConditionSets: SubjectConditionSet[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.subjectmapping.ListSubjectConditionSetsResponse'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { - no: 1, - name: 'subject_condition_sets', - kind: 'message', - T: SubjectConditionSet, - repeated: true, - }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): ListSubjectConditionSetsResponse { - return new ListSubjectConditionSetsResponse().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): ListSubjectConditionSetsResponse { - return new ListSubjectConditionSetsResponse().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): ListSubjectConditionSetsResponse { - return new ListSubjectConditionSetsResponse().fromJsonString(jsonString, options); - } - - static equals( - a: - | ListSubjectConditionSetsResponse - | PlainMessage - | undefined, - b: ListSubjectConditionSetsResponse | PlainMessage | undefined - ): boolean { - return proto3.util.equals(ListSubjectConditionSetsResponse, a, b); - } -} - -/** - * @generated from message policy.subjectmapping.SubjectConditionSetCreate - */ -export class SubjectConditionSetCreate extends Message { - /** - * Required - * - * @generated from field: repeated policy.SubjectSet subject_sets = 1; - */ - subjectSets: SubjectSet[] = []; - - /** - * Optional - * Common metadata - * - * @generated from field: common.MetadataMutable metadata = 100; - */ - metadata?: MetadataMutable; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.subjectmapping.SubjectConditionSetCreate'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'subject_sets', kind: 'message', T: SubjectSet, repeated: true }, - { no: 100, name: 'metadata', kind: 'message', T: MetadataMutable }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): SubjectConditionSetCreate { - return new SubjectConditionSetCreate().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): SubjectConditionSetCreate { - return new SubjectConditionSetCreate().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): SubjectConditionSetCreate { - return new SubjectConditionSetCreate().fromJsonString(jsonString, options); - } - - static equals( - a: SubjectConditionSetCreate | PlainMessage | undefined, - b: SubjectConditionSetCreate | PlainMessage | undefined - ): boolean { - return proto3.util.equals(SubjectConditionSetCreate, a, b); - } -} - -/** - * @generated from message policy.subjectmapping.CreateSubjectConditionSetRequest - */ -export class CreateSubjectConditionSetRequest extends Message { - /** - * @generated from field: policy.subjectmapping.SubjectConditionSetCreate subject_condition_set = 1; - */ - subjectConditionSet?: SubjectConditionSetCreate; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.subjectmapping.CreateSubjectConditionSetRequest'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'subject_condition_set', kind: 'message', T: SubjectConditionSetCreate }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): CreateSubjectConditionSetRequest { - return new CreateSubjectConditionSetRequest().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): CreateSubjectConditionSetRequest { - return new CreateSubjectConditionSetRequest().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): CreateSubjectConditionSetRequest { - return new CreateSubjectConditionSetRequest().fromJsonString(jsonString, options); - } - - static equals( - a: - | CreateSubjectConditionSetRequest - | PlainMessage - | undefined, - b: CreateSubjectConditionSetRequest | PlainMessage | undefined - ): boolean { - return proto3.util.equals(CreateSubjectConditionSetRequest, a, b); - } -} - -/** - * @generated from message policy.subjectmapping.CreateSubjectConditionSetResponse - */ -export class CreateSubjectConditionSetResponse extends Message { - /** - * @generated from field: policy.SubjectConditionSet subject_condition_set = 1; - */ - subjectConditionSet?: SubjectConditionSet; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.subjectmapping.CreateSubjectConditionSetResponse'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'subject_condition_set', kind: 'message', T: SubjectConditionSet }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): CreateSubjectConditionSetResponse { - return new CreateSubjectConditionSetResponse().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): CreateSubjectConditionSetResponse { - return new CreateSubjectConditionSetResponse().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): CreateSubjectConditionSetResponse { - return new CreateSubjectConditionSetResponse().fromJsonString(jsonString, options); - } - - static equals( - a: - | CreateSubjectConditionSetResponse - | PlainMessage - | undefined, - b: - | CreateSubjectConditionSetResponse - | PlainMessage - | undefined - ): boolean { - return proto3.util.equals(CreateSubjectConditionSetResponse, a, b); - } -} - -/** - * @generated from message policy.subjectmapping.UpdateSubjectConditionSetRequest - */ -export class UpdateSubjectConditionSetRequest extends Message { - /** - * Required - * - * @generated from field: string id = 1; - */ - id = ''; - - /** - * Optional - * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions - * - * @generated from field: repeated policy.SubjectSet subject_sets = 2; - */ - subjectSets: SubjectSet[] = []; - - /** - * Common metadata - * - * @generated from field: common.MetadataMutable metadata = 100; - */ - metadata?: MetadataMutable; - - /** - * @generated from field: common.MetadataUpdateEnum metadata_update_behavior = 101; - */ - metadataUpdateBehavior = MetadataUpdateEnum.UNSPECIFIED; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.subjectmapping.UpdateSubjectConditionSetRequest'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { no: 2, name: 'subject_sets', kind: 'message', T: SubjectSet, repeated: true }, - { no: 100, name: 'metadata', kind: 'message', T: MetadataMutable }, - { - no: 101, - name: 'metadata_update_behavior', - kind: 'enum', - T: proto3.getEnumType(MetadataUpdateEnum), - }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): UpdateSubjectConditionSetRequest { - return new UpdateSubjectConditionSetRequest().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): UpdateSubjectConditionSetRequest { - return new UpdateSubjectConditionSetRequest().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): UpdateSubjectConditionSetRequest { - return new UpdateSubjectConditionSetRequest().fromJsonString(jsonString, options); - } - - static equals( - a: - | UpdateSubjectConditionSetRequest - | PlainMessage - | undefined, - b: UpdateSubjectConditionSetRequest | PlainMessage | undefined - ): boolean { - return proto3.util.equals(UpdateSubjectConditionSetRequest, a, b); - } -} - -/** - * @generated from message policy.subjectmapping.UpdateSubjectConditionSetResponse - */ -export class UpdateSubjectConditionSetResponse extends Message { - /** - * Only ID of updated Subject Condition Set provided - * - * @generated from field: policy.SubjectConditionSet subject_condition_set = 1; - */ - subjectConditionSet?: SubjectConditionSet; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.subjectmapping.UpdateSubjectConditionSetResponse'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'subject_condition_set', kind: 'message', T: SubjectConditionSet }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): UpdateSubjectConditionSetResponse { - return new UpdateSubjectConditionSetResponse().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): UpdateSubjectConditionSetResponse { - return new UpdateSubjectConditionSetResponse().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): UpdateSubjectConditionSetResponse { - return new UpdateSubjectConditionSetResponse().fromJsonString(jsonString, options); - } - - static equals( - a: - | UpdateSubjectConditionSetResponse - | PlainMessage - | undefined, - b: - | UpdateSubjectConditionSetResponse - | PlainMessage - | undefined - ): boolean { - return proto3.util.equals(UpdateSubjectConditionSetResponse, a, b); - } -} - -/** - * @generated from message policy.subjectmapping.DeleteSubjectConditionSetRequest - */ -export class DeleteSubjectConditionSetRequest extends Message { - /** - * @generated from field: string id = 1; - */ - id = ''; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.subjectmapping.DeleteSubjectConditionSetRequest'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): DeleteSubjectConditionSetRequest { - return new DeleteSubjectConditionSetRequest().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): DeleteSubjectConditionSetRequest { - return new DeleteSubjectConditionSetRequest().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): DeleteSubjectConditionSetRequest { - return new DeleteSubjectConditionSetRequest().fromJsonString(jsonString, options); - } - - static equals( - a: - | DeleteSubjectConditionSetRequest - | PlainMessage - | undefined, - b: DeleteSubjectConditionSetRequest | PlainMessage | undefined - ): boolean { - return proto3.util.equals(DeleteSubjectConditionSetRequest, a, b); - } -} - -/** - * @generated from message policy.subjectmapping.DeleteSubjectConditionSetResponse - */ -export class DeleteSubjectConditionSetResponse extends Message { - /** - * Only ID of deleted Subject Condition Set provided - * - * @generated from field: policy.SubjectConditionSet subject_condition_set = 1; - */ - subjectConditionSet?: SubjectConditionSet; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'policy.subjectmapping.DeleteSubjectConditionSetResponse'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'subject_condition_set', kind: 'message', T: SubjectConditionSet }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): DeleteSubjectConditionSetResponse { - return new DeleteSubjectConditionSetResponse().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): DeleteSubjectConditionSetResponse { - return new DeleteSubjectConditionSetResponse().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): DeleteSubjectConditionSetResponse { - return new DeleteSubjectConditionSetResponse().fromJsonString(jsonString, options); - } - - static equals( - a: - | DeleteSubjectConditionSetResponse - | PlainMessage - | undefined, - b: - | DeleteSubjectConditionSetResponse - | PlainMessage - | undefined - ): boolean { - return proto3.util.equals(DeleteSubjectConditionSetResponse, a, b); - } -} diff --git a/lib/src/platform/wellknownconfiguration/Wellknown_configurationServiceClientPb.ts b/lib/src/platform/wellknownconfiguration/Wellknown_configurationServiceClientPb.ts deleted file mode 100644 index 87c4d4d7..00000000 --- a/lib/src/platform/wellknownconfiguration/Wellknown_configurationServiceClientPb.ts +++ /dev/null @@ -1,92 +0,0 @@ -/** - * @fileoverview gRPC-Web generated client stub for wellknownconfiguration - * @enhanceable - * @public - */ - -// Code generated by protoc-gen-grpc-web. DO NOT EDIT. -// versions: -// protoc-gen-grpc-web v1.5.0 -// protoc v0.0.0 -// source: wellknownconfiguration/wellknown_configuration.proto - -/* eslint-disable */ -// @ts-nocheck - -import * as grpcWeb from 'grpc-web'; - -import * as wellknownconfiguration_wellknown_configuration_pb from '../wellknownconfiguration/wellknown_configuration_pb'; // proto import: "wellknownconfiguration/wellknown_configuration.proto" - -export class WellKnownServiceClient { - client_: grpcWeb.AbstractClientBase; - hostname_: string; - credentials_: null | { [index: string]: string }; - options_: null | { [index: string]: any }; - - constructor( - hostname: string, - credentials?: null | { [index: string]: string }, - options?: null | { [index: string]: any } - ) { - if (!options) options = {}; - if (!credentials) credentials = {}; - options['format'] = 'binary'; - - this.client_ = new grpcWeb.GrpcWebClientBase(options); - this.hostname_ = hostname.replace(/\/+$/, ''); - this.credentials_ = credentials; - this.options_ = options; - } - - methodDescriptorGetWellKnownConfiguration = new grpcWeb.MethodDescriptor( - '/wellknownconfiguration.WellKnownService/GetWellKnownConfiguration', - grpcWeb.MethodType.UNARY, - wellknownconfiguration_wellknown_configuration_pb.GetWellKnownConfigurationRequest, - wellknownconfiguration_wellknown_configuration_pb.GetWellKnownConfigurationResponse, - ( - request: wellknownconfiguration_wellknown_configuration_pb.GetWellKnownConfigurationRequest - ) => { - return request.serializeBinary(); - }, - wellknownconfiguration_wellknown_configuration_pb.GetWellKnownConfigurationResponse.deserializeBinary - ); - - getWellKnownConfiguration( - request: wellknownconfiguration_wellknown_configuration_pb.GetWellKnownConfigurationRequest, - metadata?: grpcWeb.Metadata | null - ): Promise; - - getWellKnownConfiguration( - request: wellknownconfiguration_wellknown_configuration_pb.GetWellKnownConfigurationRequest, - metadata: grpcWeb.Metadata | null, - callback: ( - err: grpcWeb.RpcError, - response: wellknownconfiguration_wellknown_configuration_pb.GetWellKnownConfigurationResponse - ) => void - ): grpcWeb.ClientReadableStream; - - getWellKnownConfiguration( - request: wellknownconfiguration_wellknown_configuration_pb.GetWellKnownConfigurationRequest, - metadata?: grpcWeb.Metadata | null, - callback?: ( - err: grpcWeb.RpcError, - response: wellknownconfiguration_wellknown_configuration_pb.GetWellKnownConfigurationResponse - ) => void - ) { - if (callback !== undefined) { - return this.client_.rpcCall( - this.hostname_ + '/wellknownconfiguration.WellKnownService/GetWellKnownConfiguration', - request, - metadata || {}, - this.methodDescriptorGetWellKnownConfiguration, - callback - ); - } - return this.client_.unaryCall( - this.hostname_ + '/wellknownconfiguration.WellKnownService/GetWellKnownConfiguration', - request, - metadata || {}, - this.methodDescriptorGetWellKnownConfiguration - ); - } -} diff --git a/lib/src/platform/wellknownconfiguration/wellknown_configuration_connect.ts b/lib/src/platform/wellknownconfiguration/wellknown_configuration_connect.ts deleted file mode 100644 index 42ec9505..00000000 --- a/lib/src/platform/wellknownconfiguration/wellknown_configuration_connect.ts +++ /dev/null @@ -1,28 +0,0 @@ -// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=ts" -// @generated from file wellknownconfiguration/wellknown_configuration.proto (package wellknownconfiguration, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { - GetWellKnownConfigurationRequest, - GetWellKnownConfigurationResponse, -} from './wellknown_configuration_pb.js'; -import { MethodKind } from '@bufbuild/protobuf'; - -/** - * @generated from service wellknownconfiguration.WellKnownService - */ -export const WellKnownService = { - typeName: 'wellknownconfiguration.WellKnownService', - methods: { - /** - * @generated from rpc wellknownconfiguration.WellKnownService.GetWellKnownConfiguration - */ - getWellKnownConfiguration: { - name: 'GetWellKnownConfiguration', - I: GetWellKnownConfigurationRequest, - O: GetWellKnownConfigurationResponse, - kind: MethodKind.Unary, - }, - }, -} as const; diff --git a/lib/src/platform/wellknownconfiguration/wellknown_configuration_pb.d.ts b/lib/src/platform/wellknownconfiguration/wellknown_configuration_pb.d.ts index 0f0cef8e..59e46b15 100644 --- a/lib/src/platform/wellknownconfiguration/wellknown_configuration_pb.d.ts +++ b/lib/src/platform/wellknownconfiguration/wellknown_configuration_pb.d.ts @@ -1,76 +1,75 @@ -import * as jspb from 'google-protobuf'; - -import * as google_api_annotations_pb from '../google/api/annotations_pb'; // proto import: "google/api/annotations.proto" -import * as google_protobuf_struct_pb from 'google-protobuf/google/protobuf/struct_pb'; // proto import: "google/protobuf/struct.proto" - -export class WellKnownConfig extends jspb.Message { - getConfigurationMap(): jspb.Map; - clearConfigurationMap(): WellKnownConfig; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): WellKnownConfig.AsObject; - static toObject(includeInstance: boolean, msg: WellKnownConfig): WellKnownConfig.AsObject; - static serializeBinaryToWriter(message: WellKnownConfig, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): WellKnownConfig; - static deserializeBinaryFromReader( - message: WellKnownConfig, - reader: jspb.BinaryReader - ): WellKnownConfig; -} +// @generated by protoc-gen-es v1.9.0 with parameter "target=js+dts,import_extension=none" +// @generated from file wellknownconfiguration/wellknown_configuration.proto (package wellknownconfiguration, syntax proto3) +/* eslint-disable */ +// @ts-nocheck -export namespace WellKnownConfig { - export type AsObject = { - configurationMap: Array<[string, google_protobuf_struct_pb.Struct.AsObject]>; - }; -} +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage, Struct } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; -export class GetWellKnownConfigurationRequest extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetWellKnownConfigurationRequest.AsObject; - static toObject( - includeInstance: boolean, - msg: GetWellKnownConfigurationRequest - ): GetWellKnownConfigurationRequest.AsObject; - static serializeBinaryToWriter( - message: GetWellKnownConfigurationRequest, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): GetWellKnownConfigurationRequest; - static deserializeBinaryFromReader( - message: GetWellKnownConfigurationRequest, - reader: jspb.BinaryReader - ): GetWellKnownConfigurationRequest; -} +/** + * @generated from message wellknownconfiguration.WellKnownConfig + */ +export declare class WellKnownConfig extends Message { + /** + * @generated from field: map configuration = 1; + */ + configuration: { [key: string]: Struct }; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "wellknownconfiguration.WellKnownConfig"; + static readonly fields: FieldList; -export namespace GetWellKnownConfigurationRequest { - export type AsObject = {}; + static fromBinary(bytes: Uint8Array, options?: Partial): WellKnownConfig; + + static fromJson(jsonValue: JsonValue, options?: Partial): WellKnownConfig; + + static fromJsonString(jsonString: string, options?: Partial): WellKnownConfig; + + static equals(a: WellKnownConfig | PlainMessage | undefined, b: WellKnownConfig | PlainMessage | undefined): boolean; } -export class GetWellKnownConfigurationResponse extends jspb.Message { - getConfiguration(): google_protobuf_struct_pb.Struct | undefined; - setConfiguration(value?: google_protobuf_struct_pb.Struct): GetWellKnownConfigurationResponse; - hasConfiguration(): boolean; - clearConfiguration(): GetWellKnownConfigurationResponse; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetWellKnownConfigurationResponse.AsObject; - static toObject( - includeInstance: boolean, - msg: GetWellKnownConfigurationResponse - ): GetWellKnownConfigurationResponse.AsObject; - static serializeBinaryToWriter( - message: GetWellKnownConfigurationResponse, - writer: jspb.BinaryWriter - ): void; - static deserializeBinary(bytes: Uint8Array): GetWellKnownConfigurationResponse; - static deserializeBinaryFromReader( - message: GetWellKnownConfigurationResponse, - reader: jspb.BinaryReader - ): GetWellKnownConfigurationResponse; +/** + * @generated from message wellknownconfiguration.GetWellKnownConfigurationRequest + */ +export declare class GetWellKnownConfigurationRequest extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "wellknownconfiguration.GetWellKnownConfigurationRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): GetWellKnownConfigurationRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): GetWellKnownConfigurationRequest; + + static fromJsonString(jsonString: string, options?: Partial): GetWellKnownConfigurationRequest; + + static equals(a: GetWellKnownConfigurationRequest | PlainMessage | undefined, b: GetWellKnownConfigurationRequest | PlainMessage | undefined): boolean; } -export namespace GetWellKnownConfigurationResponse { - export type AsObject = { - configuration?: google_protobuf_struct_pb.Struct.AsObject; - }; +/** + * @generated from message wellknownconfiguration.GetWellKnownConfigurationResponse + */ +export declare class GetWellKnownConfigurationResponse extends Message { + /** + * @generated from field: google.protobuf.Struct configuration = 1; + */ + configuration?: Struct; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "wellknownconfiguration.GetWellKnownConfigurationResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): GetWellKnownConfigurationResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): GetWellKnownConfigurationResponse; + + static fromJsonString(jsonString: string, options?: Partial): GetWellKnownConfigurationResponse; + + static equals(a: GetWellKnownConfigurationResponse | PlainMessage | undefined, b: GetWellKnownConfigurationResponse | PlainMessage | undefined): boolean; } + diff --git a/lib/src/platform/wellknownconfiguration/wellknown_configuration_pb.ts b/lib/src/platform/wellknownconfiguration/wellknown_configuration_pb.ts deleted file mode 100644 index 053603a5..00000000 --- a/lib/src/platform/wellknownconfiguration/wellknown_configuration_pb.ts +++ /dev/null @@ -1,160 +0,0 @@ -// @generated by protoc-gen-es v1.9.0 with parameter "target=ts" -// @generated from file wellknownconfiguration/wellknown_configuration.proto (package wellknownconfiguration, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import type { - BinaryReadOptions, - FieldList, - JsonReadOptions, - JsonValue, - PartialMessage, - PlainMessage, -} from '@bufbuild/protobuf'; -import { Message, proto3, Struct } from '@bufbuild/protobuf'; - -/** - * @generated from message wellknownconfiguration.WellKnownConfig - */ -export class WellKnownConfig extends Message { - /** - * @generated from field: map configuration = 1; - */ - configuration: { [key: string]: Struct } = {}; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'wellknownconfiguration.WellKnownConfig'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { - no: 1, - name: 'configuration', - kind: 'map', - K: 9 /* ScalarType.STRING */, - V: { kind: 'message', T: Struct }, - }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): WellKnownConfig { - return new WellKnownConfig().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): WellKnownConfig { - return new WellKnownConfig().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): WellKnownConfig { - return new WellKnownConfig().fromJsonString(jsonString, options); - } - - static equals( - a: WellKnownConfig | PlainMessage | undefined, - b: WellKnownConfig | PlainMessage | undefined - ): boolean { - return proto3.util.equals(WellKnownConfig, a, b); - } -} - -/** - * @generated from message wellknownconfiguration.GetWellKnownConfigurationRequest - */ -export class GetWellKnownConfigurationRequest extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'wellknownconfiguration.GetWellKnownConfigurationRequest'; - static readonly fields: FieldList = proto3.util.newFieldList(() => []); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): GetWellKnownConfigurationRequest { - return new GetWellKnownConfigurationRequest().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): GetWellKnownConfigurationRequest { - return new GetWellKnownConfigurationRequest().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): GetWellKnownConfigurationRequest { - return new GetWellKnownConfigurationRequest().fromJsonString(jsonString, options); - } - - static equals( - a: - | GetWellKnownConfigurationRequest - | PlainMessage - | undefined, - b: GetWellKnownConfigurationRequest | PlainMessage | undefined - ): boolean { - return proto3.util.equals(GetWellKnownConfigurationRequest, a, b); - } -} - -/** - * @generated from message wellknownconfiguration.GetWellKnownConfigurationResponse - */ -export class GetWellKnownConfigurationResponse extends Message { - /** - * @generated from field: google.protobuf.Struct configuration = 1; - */ - configuration?: Struct; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = 'wellknownconfiguration.GetWellKnownConfigurationResponse'; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'configuration', kind: 'message', T: Struct }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial - ): GetWellKnownConfigurationResponse { - return new GetWellKnownConfigurationResponse().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial - ): GetWellKnownConfigurationResponse { - return new GetWellKnownConfigurationResponse().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial - ): GetWellKnownConfigurationResponse { - return new GetWellKnownConfigurationResponse().fromJsonString(jsonString, options); - } - - static equals( - a: - | GetWellKnownConfigurationResponse - | PlainMessage - | undefined, - b: - | GetWellKnownConfigurationResponse - | PlainMessage - | undefined - ): boolean { - return proto3.util.equals(GetWellKnownConfigurationResponse, a, b); - } -} diff --git a/scripts/platform.sh b/scripts/platform.sh index 5f851e3e..54a93aed 100755 --- a/scripts/platform.sh +++ b/scripts/platform.sh @@ -3,13 +3,13 @@ set -eu # Fetch latest platform code -rm -rf platform +rm -rf platform lib/src/platform git clone https://github.com/opentdf/platform.git # Generate Typescript code cmd=$(npx buf --version) if [ $? -ne 0 ]; then - npm install @bufbuild/protobuf @bufbuild/protoc-gen-es @bufbuild/buf + npm install @bufbuild/protobuf @bufbuild/protoc-gen-es @bufbuild/buf @connectrpc/protoc-gen-connect-es fi npx buf generate platform/service echo "Generated Typescript code from Protobuf files (src: platform/service, dst: lib/src/platform)" \ No newline at end of file From 16d059d26715d15b68dee04a02c3e3adca64f382 Mon Sep 17 00:00:00 2001 From: jakedoublev Date: Thu, 23 May 2024 08:08:19 -0700 Subject: [PATCH 3/4] dummy to fix hanging CI --- .gitattributes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitattributes b/.gitattributes index 92ff7c43..9aad4f57 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,2 @@ # collapses proto gencode in PR diffs by default -lib/src/platform/** linguist-generated=true \ No newline at end of file +lib/src/platform/** linguist-generated=true From 7a7500f4ca80aa306c00fffe7846b28b525617a1 Mon Sep 17 00:00:00 2001 From: jakedoublev Date: Wed, 29 May 2024 09:00:57 -0700 Subject: [PATCH 4/4] remove unneeded dep --- scripts/platform.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/platform.sh b/scripts/platform.sh index 54a93aed..9c04e4ab 100755 --- a/scripts/platform.sh +++ b/scripts/platform.sh @@ -9,7 +9,7 @@ git clone https://github.com/opentdf/platform.git # Generate Typescript code cmd=$(npx buf --version) if [ $? -ne 0 ]; then - npm install @bufbuild/protobuf @bufbuild/protoc-gen-es @bufbuild/buf @connectrpc/protoc-gen-connect-es + npm install @bufbuild/protoc-gen-es @bufbuild/buf @connectrpc/protoc-gen-connect-es fi npx buf generate platform/service echo "Generated Typescript code from Protobuf files (src: platform/service, dst: lib/src/platform)" \ No newline at end of file