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 { Subject } from "./auth";
import { FilterOp } from "./filter";
import { Meta } from "./meta";
import { DeleteResponse } from "./resource_base";
import { OperationStatus, Status } from "./status";
export declare const protobufPackage = "io.restorecommerce.ostorage";
export interface CopyRequestList {
    items?: CopyRequestItem[] | undefined;
    subject?: Subject | undefined;
}
export interface CopyResponseList {
    responses?: copyResponsePayloadWithStatus[] | undefined;
    operationStatus?: OperationStatus | undefined;
}
export interface copyResponsePayloadWithStatus {
    payload?: CopyResponseItem | undefined;
    status?: Status | undefined;
}
export interface CopyRequestItem {
    bucket?: string | undefined;
    copySource?: string | undefined;
    key?: string | undefined;
    meta?: Meta | undefined;
    options?: Options | undefined;
}
export interface CopyResponseItem {
    bucket?: string | undefined;
    copySource?: string | undefined;
    key?: string | undefined;
    meta?: Meta | undefined;
    options?: Options | undefined;
}
export interface Options {
    encoding?: string | undefined;
    contentType?: string | undefined;
    contentLanguage?: string | undefined;
    contentDisposition?: string | undefined;
    length?: number | undefined;
    version?: string | undefined;
    md5?: string | undefined;
    tags?: Attribute[] | undefined;
    /** optional meta data ex: from and to dates */
    data?: Any | undefined;
}
export interface Object {
    key?: string | undefined;
    bucket?: string | undefined;
    object?: Buffer | undefined;
    meta?: Meta | undefined;
    url?: string | undefined;
    options?: Options | undefined;
    subject?: Subject | undefined;
}
export interface ObjectResponse {
    response?: ObjectResponsePayloadWithStatus | undefined;
    operationStatus?: OperationStatus | undefined;
}
export interface ObjectResponsePayloadWithStatus {
    payload?: ObjectResponsePayload | undefined;
    status?: Status | undefined;
}
export interface ObjectResponsePayload {
    key?: string | undefined;
    bucket?: string | undefined;
    object?: Buffer | undefined;
    meta?: Meta | undefined;
    url?: string | undefined;
    options?: Options | undefined;
}
export interface GetRequest {
    key?: string | undefined;
    bucket?: string | undefined;
    download?: boolean | undefined;
    subject?: Subject | undefined;
}
export interface ListResponse {
    responses?: ObjectsDataWithPayloadStatus[] | undefined;
    operationStatus?: OperationStatus | undefined;
}
export interface ObjectsDataWithPayloadStatus {
    payload?: ObjectData | undefined;
    status?: Status | undefined;
}
export interface ObjectData {
    objectName?: string | undefined;
    url?: string | undefined;
    meta?: Meta | undefined;
}
export interface DeleteRequest {
    key?: string | undefined;
    bucket?: string | undefined;
    subject?: Subject | undefined;
}
export interface PutResponse {
    response?: PutResponseWithPayloadStatus | undefined;
    operationStatus?: OperationStatus | undefined;
}
export interface PutResponseWithPayloadStatus {
    payload?: Response | undefined;
    status?: Status | undefined;
}
export interface Response {
    url?: string | undefined;
    bucket?: string | undefined;
    key?: string | undefined;
    meta?: Meta | undefined;
    tags?: Attribute[] | undefined;
    /** file size of uploaded object */
    length?: number | undefined;
}
export interface ListRequest {
    bucket?: string | undefined;
    /** Filter based on fieldName|operation, value|list */
    filters?: FilterOp | undefined;
    subject?: Subject | undefined;
    maxKeys?: number | undefined;
    prefix?: string | undefined;
}
/**
 * OstorageMessage is used for emitting
 * objectUploaded and objectDownloaded events
 */
export interface OstorageMessage {
    key?: string | undefined;
    bucket?: string | undefined;
    metadata?: Any | undefined;
    subject?: Subject | undefined;
}
export interface MoveRequestList {
    items?: MoveRequestItem[] | undefined;
    subject?: Subject | undefined;
}
export interface MoveRequestItem {
    /** destination bucket name */
    bucket?: string | undefined;
    /** source object with bucket name */
    sourceObject?: string | undefined;
    /** destination key name */
    key?: string | undefined;
    meta?: Meta | undefined;
    options?: Options | undefined;
}
export interface MoveResponseList {
    responses?: MoveResponsePayloadWithStatus[] | undefined;
    operationStatus?: OperationStatus | undefined;
}
export interface MoveResponsePayloadWithStatus {
    payload?: MoveResponseItem | undefined;
    status?: Status | undefined;
}
export interface MoveResponseItem {
    bucket?: string | undefined;
    sourceObject?: string | undefined;
    key?: string | undefined;
    meta?: Meta | undefined;
    options?: Options | undefined;
}
export declare const CopyRequestList: MessageFns<CopyRequestList>;
export declare const CopyResponseList: MessageFns<CopyResponseList>;
export declare const copyResponsePayloadWithStatus: MessageFns<copyResponsePayloadWithStatus>;
export declare const CopyRequestItem: MessageFns<CopyRequestItem>;
export declare const CopyResponseItem: MessageFns<CopyResponseItem>;
export declare const Options: MessageFns<Options>;
export declare const Object: MessageFns<Object>;
export declare const ObjectResponse: MessageFns<ObjectResponse>;
export declare const ObjectResponsePayloadWithStatus: MessageFns<ObjectResponsePayloadWithStatus>;
export declare const ObjectResponsePayload: MessageFns<ObjectResponsePayload>;
export declare const GetRequest: MessageFns<GetRequest>;
export declare const ListResponse: MessageFns<ListResponse>;
export declare const ObjectsDataWithPayloadStatus: MessageFns<ObjectsDataWithPayloadStatus>;
export declare const ObjectData: MessageFns<ObjectData>;
export declare const DeleteRequest: MessageFns<DeleteRequest>;
export declare const PutResponse: MessageFns<PutResponse>;
export declare const PutResponseWithPayloadStatus: MessageFns<PutResponseWithPayloadStatus>;
export declare const Response: MessageFns<Response>;
export declare const ListRequest: MessageFns<ListRequest>;
export declare const OstorageMessage: MessageFns<OstorageMessage>;
export declare const MoveRequestList: MessageFns<MoveRequestList>;
export declare const MoveRequestItem: MessageFns<MoveRequestItem>;
export declare const MoveResponseList: MessageFns<MoveResponseList>;
export declare const MoveResponsePayloadWithStatus: MessageFns<MoveResponsePayloadWithStatus>;
export declare const MoveResponseItem: MessageFns<MoveResponseItem>;
export type ObjectServiceDefinition = typeof ObjectServiceDefinition;
export declare const ObjectServiceDefinition: {
    readonly name: "ObjectService";
    readonly fullName: "io.restorecommerce.ostorage.ObjectService";
    readonly methods: {
        readonly get: {
            readonly name: "Get";
            readonly requestType: typeof GetRequest;
            readonly requestStream: false;
            readonly responseType: typeof ObjectResponse;
            readonly responseStream: true;
            readonly options: {
                readonly _unknownFields: {
                    readonly 248008: readonly [Buffer<ArrayBufferLike>];
                };
            };
        };
        readonly put: {
            readonly name: "Put";
            readonly requestType: typeof Object;
            readonly requestStream: true;
            readonly responseType: typeof PutResponse;
            readonly responseStream: false;
            readonly options: {};
        };
        readonly delete: {
            readonly name: "Delete";
            readonly requestType: typeof DeleteRequest;
            readonly requestStream: false;
            readonly responseType: typeof DeleteResponse;
            readonly responseStream: false;
            readonly options: {};
        };
        readonly list: {
            readonly name: "List";
            readonly requestType: typeof ListRequest;
            readonly requestStream: false;
            readonly responseType: typeof ListResponse;
            readonly responseStream: false;
            readonly options: {
                readonly _unknownFields: {
                    readonly 248008: readonly [Buffer<ArrayBufferLike>];
                };
            };
        };
        readonly copy: {
            readonly name: "Copy";
            readonly requestType: typeof CopyRequestList;
            readonly requestStream: false;
            readonly responseType: typeof CopyResponseList;
            readonly responseStream: false;
            readonly options: {};
        };
        readonly move: {
            readonly name: "Move";
            readonly requestType: typeof MoveRequestList;
            readonly requestStream: false;
            readonly responseType: typeof MoveResponseList;
            readonly responseStream: false;
            readonly options: {};
        };
    };
};
export interface ObjectServiceImplementation<CallContextExt = {}> {
    get(request: GetRequest, context: CallContext & CallContextExt): ServerStreamingMethodResult<DeepPartial<ObjectResponse>>;
    put(request: AsyncIterable<Object>, context: CallContext & CallContextExt): Promise<DeepPartial<PutResponse>>;
    delete(request: DeleteRequest, context: CallContext & CallContextExt): Promise<DeepPartial<DeleteResponse>>;
    list(request: ListRequest, context: CallContext & CallContextExt): Promise<DeepPartial<ListResponse>>;
    copy(request: CopyRequestList, context: CallContext & CallContextExt): Promise<DeepPartial<CopyResponseList>>;
    move(request: MoveRequestList, context: CallContext & CallContextExt): Promise<DeepPartial<MoveResponseList>>;
}
export interface ObjectServiceClient<CallOptionsExt = {}> {
    get(request: DeepPartial<GetRequest>, options?: CallOptions & CallOptionsExt): AsyncIterable<ObjectResponse>;
    put(request: AsyncIterable<DeepPartial<Object>>, options?: CallOptions & CallOptionsExt): Promise<PutResponse>;
    delete(request: DeepPartial<DeleteRequest>, options?: CallOptions & CallOptionsExt): Promise<DeleteResponse>;
    list(request: DeepPartial<ListRequest>, options?: CallOptions & CallOptionsExt): Promise<ListResponse>;
    copy(request: DeepPartial<CopyRequestList>, options?: CallOptions & CallOptionsExt): Promise<CopyResponseList>;
    move(request: DeepPartial<MoveRequestList>, options?: CallOptions & CallOptionsExt): Promise<MoveResponseList>;
}
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 type ServerStreamingMethodResult<Response> = {
    [Symbol.asyncIterator](): AsyncIterator<Response, void>;
};
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=ostorage.d.ts.map