// @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; } /** * 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; } /** * 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; constructor(data?: PartialMessage); static readonly runtime: typeof proto3; static readonly typeName = "authorization.EntityCustom"; static readonly fields: FieldList; static fromBinary(bytes: Uint8Array, options?: Partial): EntityCustom; static fromJson(jsonValue: JsonValue, options?: Partial): EntityCustom; static fromJsonString(jsonString: string, options?: Partial): EntityCustom; static equals(a: EntityCustom | PlainMessage | undefined, b: EntityCustom | PlainMessage | undefined): boolean; } /** * 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; /** * @generated from field: repeated authorization.Entity entities = 2; */ entities: Entity[]; constructor(data?: PartialMessage); static readonly runtime: typeof proto3; static readonly typeName = "authorization.EntityChain"; static readonly fields: FieldList; static fromBinary(bytes: Uint8Array, options?: Partial): EntityChain; static fromJson(jsonValue: JsonValue, options?: Partial): EntityChain; static fromJsonString(jsonString: string, options?: Partial): EntityChain; static equals(a: EntityChain | PlainMessage | undefined, b: EntityChain | PlainMessage | undefined): boolean; } /** * * 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; } /** * * * 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; } /** * @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, } /** * @generated from message authorization.GetDecisionsRequest */ export declare class GetDecisionsRequest extends Message { /** * @generated from field: repeated authorization.DecisionRequest decision_requests = 1; */ decisionRequests: DecisionRequest[]; constructor(data?: PartialMessage); static readonly runtime: typeof proto3; static readonly typeName = "authorization.GetDecisionsRequest"; static readonly fields: FieldList; static fromBinary(bytes: Uint8Array, options?: Partial): GetDecisionsRequest; 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; } /** * @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; } /** * * 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; } /** * @generated from message authorization.EntityEntitlements */ export declare class EntityEntitlements extends Message { /** * @generated from field: string entity_id = 1; */ entityId: string; /** * @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; 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; } /** * 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; } /** * * * 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; } /** * * 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; } /** * @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; } /** * @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; }