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 { Subject } from "../io/restorecommerce/auth";
import { Meta } from "../io/restorecommerce/meta";
import { DeleteRequest, DeleteResponse, ReadRequest } from "../io/restorecommerce/resource_base";
import { OperationStatus, Status } from "../io/restorecommerce/status";
export declare const protobufPackage = "test";
export interface TestRequest {
    value?: string | undefined;
}
export interface StreamTestResponse {
    result?: string | undefined;
}
export interface TestResponse {
    result?: string | undefined;
    status?: Status | undefined;
}
export interface TestEvent {
    value?: string | undefined;
    count?: number | undefined;
}
export interface TestBufferedData {
    id?: string | undefined;
    meta?: Meta | undefined;
    value?: string | undefined;
    count?: number | undefined;
    data?: Any | undefined;
}
export interface TestBufferedDataList {
    items?: TestBufferedData[] | undefined;
    total_count?: number | undefined;
}
export interface TestBufferedDataResponse {
    payload?: TestBufferedData | undefined;
    status?: Status | undefined;
}
export interface TestBufferedDataListResponse {
    items?: TestBufferedDataResponse[] | undefined;
    total_count?: number | undefined;
    operation_status?: OperationStatus | undefined;
}
export interface ExtendMe {
    bar?: number | undefined;
}
export interface ResourceList {
    items?: Resource[] | undefined;
    total_count?: number | undefined;
    subject?: Subject | undefined;
}
export interface ResourceListResponse {
    items?: ResourceResponse[] | undefined;
    total_count?: number | undefined;
    operation_status?: OperationStatus | undefined;
}
export interface ResourceResponse {
    payload?: Resource | undefined;
    status?: Status | undefined;
}
/** / Example resource */
export interface Resource {
    id?: string | undefined;
    meta?: Meta | undefined;
    value?: number | undefined;
    text?: string | undefined;
    active?: boolean | undefined;
    created?: Date | undefined;
    status?: string | undefined;
    data?: Any | undefined;
}
export declare const TestRequest: MessageFns<TestRequest>;
export declare const StreamTestResponse: MessageFns<StreamTestResponse>;
export declare const TestResponse: MessageFns<TestResponse>;
export declare const TestEvent: MessageFns<TestEvent>;
export declare const TestBufferedData: MessageFns<TestBufferedData>;
export declare const TestBufferedDataList: MessageFns<TestBufferedDataList>;
export declare const TestBufferedDataResponse: MessageFns<TestBufferedDataResponse>;
export declare const TestBufferedDataListResponse: MessageFns<TestBufferedDataListResponse>;
export declare const ExtendMe: MessageFns<ExtendMe>;
export declare const ResourceList: MessageFns<ResourceList>;
export declare const ResourceListResponse: MessageFns<ResourceListResponse>;
export declare const ResourceResponse: MessageFns<ResourceResponse>;
export declare const Resource: MessageFns<Resource>;
export type TestDefinition = typeof TestDefinition;
export declare const TestDefinition: {
    readonly name: "Test";
    readonly fullName: "test.Test";
    readonly methods: {
        readonly test: {
            readonly name: "Test";
            readonly requestType: typeof TestRequest;
            readonly requestStream: false;
            readonly responseType: typeof TestResponse;
            readonly responseStream: false;
            readonly options: {};
        };
        readonly throw: {
            readonly name: "Throw";
            readonly requestType: typeof TestRequest;
            readonly requestStream: false;
            readonly responseType: typeof TestResponse;
            readonly responseStream: false;
            readonly options: {};
        };
        readonly notImplemented: {
            readonly name: "NotImplemented";
            readonly requestType: typeof TestRequest;
            readonly requestStream: false;
            readonly responseType: typeof TestResponse;
            readonly responseStream: false;
            readonly options: {};
        };
        readonly notFound: {
            readonly name: "NotFound";
            readonly requestType: typeof TestRequest;
            readonly requestStream: false;
            readonly responseType: typeof TestResponse;
            readonly responseStream: false;
            readonly options: {};
        };
        readonly create: {
            readonly name: "Create";
            readonly requestType: typeof TestBufferedDataList;
            readonly requestStream: false;
            readonly responseType: typeof TestBufferedDataListResponse;
            readonly responseStream: false;
            readonly options: {};
        };
        readonly read: {
            readonly name: "Read";
            readonly requestType: typeof ReadRequest;
            readonly requestStream: false;
            readonly responseType: typeof TestBufferedDataListResponse;
            readonly responseStream: false;
            readonly options: {};
        };
    };
};
export interface TestServiceImplementation<CallContextExt = {}> {
    test(request: TestRequest, context: CallContext & CallContextExt): Promise<DeepPartial<TestResponse>>;
    throw(request: TestRequest, context: CallContext & CallContextExt): Promise<DeepPartial<TestResponse>>;
    notImplemented(request: TestRequest, context: CallContext & CallContextExt): Promise<DeepPartial<TestResponse>>;
    notFound(request: TestRequest, context: CallContext & CallContextExt): Promise<DeepPartial<TestResponse>>;
    create(request: TestBufferedDataList, context: CallContext & CallContextExt): Promise<DeepPartial<TestBufferedDataListResponse>>;
    read(request: ReadRequest, context: CallContext & CallContextExt): Promise<DeepPartial<TestBufferedDataListResponse>>;
}
export interface TestClient<CallOptionsExt = {}> {
    test(request: DeepPartial<TestRequest>, options?: CallOptions & CallOptionsExt): Promise<TestResponse>;
    throw(request: DeepPartial<TestRequest>, options?: CallOptions & CallOptionsExt): Promise<TestResponse>;
    notImplemented(request: DeepPartial<TestRequest>, options?: CallOptions & CallOptionsExt): Promise<TestResponse>;
    notFound(request: DeepPartial<TestRequest>, options?: CallOptions & CallOptionsExt): Promise<TestResponse>;
    create(request: DeepPartial<TestBufferedDataList>, options?: CallOptions & CallOptionsExt): Promise<TestBufferedDataListResponse>;
    read(request: DeepPartial<ReadRequest>, options?: CallOptions & CallOptionsExt): Promise<TestBufferedDataListResponse>;
}
/** Stream test service */
export type StreamDefinition = typeof StreamDefinition;
export declare const StreamDefinition: {
    readonly name: "Stream";
    readonly fullName: "test.Stream";
    readonly methods: {
        readonly biStream: {
            readonly name: "BiStream";
            readonly requestType: typeof TestRequest;
            readonly requestStream: true;
            readonly responseType: typeof StreamTestResponse;
            readonly responseStream: true;
            readonly options: {};
        };
        readonly responseStream: {
            readonly name: "ResponseStream";
            readonly requestType: typeof TestRequest;
            readonly requestStream: false;
            readonly responseType: typeof StreamTestResponse;
            readonly responseStream: true;
            readonly options: {};
        };
        readonly requestStream: {
            readonly name: "RequestStream";
            readonly requestType: typeof TestRequest;
            readonly requestStream: true;
            readonly responseType: typeof TestResponse;
            readonly responseStream: false;
            readonly options: {};
        };
    };
};
export interface StreamServiceImplementation<CallContextExt = {}> {
    biStream(request: AsyncIterable<TestRequest>, context: CallContext & CallContextExt): ServerStreamingMethodResult<DeepPartial<StreamTestResponse>>;
    responseStream(request: TestRequest, context: CallContext & CallContextExt): ServerStreamingMethodResult<DeepPartial<StreamTestResponse>>;
    requestStream(request: AsyncIterable<TestRequest>, context: CallContext & CallContextExt): Promise<DeepPartial<TestResponse>>;
}
export interface StreamClient<CallOptionsExt = {}> {
    biStream(request: AsyncIterable<DeepPartial<TestRequest>>, options?: CallOptions & CallOptionsExt): AsyncIterable<StreamTestResponse>;
    responseStream(request: DeepPartial<TestRequest>, options?: CallOptions & CallOptionsExt): AsyncIterable<StreamTestResponse>;
    requestStream(request: AsyncIterable<DeepPartial<TestRequest>>, options?: CallOptions & CallOptionsExt): Promise<TestResponse>;
}
export type CRUDDefinition = typeof CRUDDefinition;
export declare const CRUDDefinition: {
    readonly name: "CRUD";
    readonly fullName: "test.CRUD";
    readonly methods: {
        readonly read: {
            readonly name: "Read";
            readonly requestType: typeof ReadRequest;
            readonly requestStream: false;
            readonly responseType: typeof ResourceListResponse;
            readonly responseStream: false;
            readonly options: {};
        };
        readonly create: {
            readonly name: "Create";
            readonly requestType: typeof ResourceList;
            readonly requestStream: false;
            readonly responseType: typeof ResourceListResponse;
            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 update: {
            readonly name: "Update";
            readonly requestType: typeof ResourceList;
            readonly requestStream: false;
            readonly responseType: typeof ResourceListResponse;
            readonly responseStream: false;
            readonly options: {};
        };
        readonly upsert: {
            readonly name: "Upsert";
            readonly requestType: typeof ResourceList;
            readonly requestStream: false;
            readonly responseType: typeof ResourceListResponse;
            readonly responseStream: false;
            readonly options: {};
        };
    };
};
export interface CRUDServiceImplementation<CallContextExt = {}> {
    read(request: ReadRequest, context: CallContext & CallContextExt): Promise<DeepPartial<ResourceListResponse>>;
    create(request: ResourceList, context: CallContext & CallContextExt): Promise<DeepPartial<ResourceListResponse>>;
    delete(request: DeleteRequest, context: CallContext & CallContextExt): Promise<DeepPartial<DeleteResponse>>;
    update(request: ResourceList, context: CallContext & CallContextExt): Promise<DeepPartial<ResourceListResponse>>;
    upsert(request: ResourceList, context: CallContext & CallContextExt): Promise<DeepPartial<ResourceListResponse>>;
}
export interface CRUDClient<CallOptionsExt = {}> {
    read(request: DeepPartial<ReadRequest>, options?: CallOptions & CallOptionsExt): Promise<ResourceListResponse>;
    create(request: DeepPartial<ResourceList>, options?: CallOptions & CallOptionsExt): Promise<ResourceListResponse>;
    delete(request: DeepPartial<DeleteRequest>, options?: CallOptions & CallOptionsExt): Promise<DeleteResponse>;
    update(request: DeepPartial<ResourceList>, options?: CallOptions & CallOptionsExt): Promise<ResourceListResponse>;
    upsert(request: DeepPartial<ResourceList>, options?: CallOptions & CallOptionsExt): Promise<ResourceListResponse>;
}
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=test.d.ts.map