import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
import type { CallContext, CallOptions } from "nice-grpc-common";
import type { FileDescriptorProto as FileDescriptorProto1 } from "ts-proto-descriptors";
import { Any } from "../../google/protobuf/any";
import { Attribute } from "./attribute";
import { PolicySetRQ } from "./policy_set";
import { Target } from "./rule";
import { OperationStatus } from "./status";
export declare const protobufPackage = "io.restorecommerce.access_control";
export interface Request {
    target?: Target | undefined;
    /**
     * generic data structure which can be provided
     * to a contextQuery (see io/restorecommerce/rule.proto)
     */
    context?: Context | undefined;
}
export interface Context {
    subject?: Any | undefined;
    resources?: Any[] | undefined;
    security?: Any | undefined;
}
export interface Response {
    decision?: Response_Decision | undefined;
    obligations?: Attribute[] | undefined;
    evaluationCacheable?: boolean | undefined;
    operationStatus?: OperationStatus | undefined;
}
export declare enum Response_Decision {
    PERMIT = "PERMIT",
    DENY = "DENY",
    NOT_APPLICABLE = "NOT_APPLICABLE",
    INDETERMINATE = "INDETERMINATE",
    UNRECOGNIZED = "UNRECOGNIZED"
}
export declare function response_DecisionFromJSON(object: any): Response_Decision;
export declare function response_DecisionToJSON(object: Response_Decision): string;
export declare function response_DecisionToNumber(object: Response_Decision): number;
export interface ReverseQuery {
    policySets?: PolicySetRQ[] | undefined;
    obligations?: Attribute[] | undefined;
    operationStatus?: OperationStatus | undefined;
}
export declare const Request: MessageFns<Request>;
export declare const Context: MessageFns<Context>;
export declare const Response: MessageFns<Response>;
export declare const ReverseQuery: MessageFns<ReverseQuery>;
export type AccessControlServiceDefinition = typeof AccessControlServiceDefinition;
export declare const AccessControlServiceDefinition: {
    readonly name: "AccessControlService";
    readonly fullName: "io.restorecommerce.access_control.AccessControlService";
    readonly methods: {
        readonly isAllowed: {
            readonly name: "IsAllowed";
            readonly requestType: typeof Request;
            readonly requestStream: false;
            readonly responseType: typeof Response;
            readonly responseStream: false;
            readonly options: {
                readonly _unknownFields: {
                    readonly 248008: readonly [Buffer<ArrayBufferLike>];
                };
            };
        };
        readonly whatIsAllowed: {
            readonly name: "WhatIsAllowed";
            readonly requestType: typeof Request;
            readonly requestStream: false;
            readonly responseType: typeof ReverseQuery;
            readonly responseStream: false;
            readonly options: {
                readonly _unknownFields: {
                    readonly 248008: readonly [Buffer<ArrayBufferLike>];
                };
            };
        };
    };
};
export interface AccessControlServiceImplementation<CallContextExt = {}> {
    isAllowed(request: Request, context: CallContext & CallContextExt): Promise<DeepPartial<Response>>;
    whatIsAllowed(request: Request, context: CallContext & CallContextExt): Promise<DeepPartial<ReverseQuery>>;
}
export interface AccessControlServiceClient<CallOptionsExt = {}> {
    isAllowed(request: DeepPartial<Request>, options?: CallOptions & CallOptionsExt): Promise<Response>;
    whatIsAllowed(request: DeepPartial<Request>, options?: CallOptions & CallOptionsExt): Promise<ReverseQuery>;
}
type ProtoMetaMessageOptions = {
    options?: {
        [key: string]: any;
    };
    fields?: {
        [key: string]: {
            [key: string]: any;
        };
    };
    oneof?: {
        [key: string]: {
            [key: string]: any;
        };
    };
    nested?: {
        [key: string]: ProtoMetaMessageOptions;
    };
};
export interface ProtoMetadata {
    fileDescriptor: FileDescriptorProto1;
    references: {
        [key: string]: any;
    };
    dependencies?: ProtoMetadata[];
    options?: {
        options?: {
            [key: string]: any;
        };
        services?: {
            [key: string]: {
                options?: {
                    [key: string]: any;
                };
                methods?: {
                    [key: string]: {
                        [key: string]: any;
                    };
                };
            };
        };
        messages?: {
            [key: string]: ProtoMetaMessageOptions;
        };
        enums?: {
            [key: string]: {
                options?: {
                    [key: string]: any;
                };
                values?: {
                    [key: string]: {
                        [key: string]: any;
                    };
                };
            };
        };
    };
}
export declare const protoMetadata: ProtoMetadata;
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
    [K in keyof T]?: DeepPartial<T[K]>;
} : Partial<T>;
export interface MessageFns<T> {
    encode(message: T, writer?: BinaryWriter): BinaryWriter;
    decode(input: BinaryReader | Uint8Array, length?: number): T;
    fromJSON(object: any): T;
    toJSON(message: T): unknown;
    create(base?: DeepPartial<T>): T;
    fromPartial(object: DeepPartial<T>): T;
}
export {};
//# sourceMappingURL=access_control.d.ts.map