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 { BillingAddress, ShippingAddress } from "./address";
import { Amount } from "./amount";
import { Attribute } from "./attribute";
import { Subject } from "./auth";
import { File } from "./file";
import { Meta } from "./meta";
import { Price } from "./price";
import { Property } from "./property";
import { Reference } from "./reference";
import { DeleteRequest, DeleteResponse, ReadRequest } from "./resource_base";
import { OperationStatus, Status, StatusListResponse } from "./status";
export declare const protobufPackage = "io.restorecommerce.invoice";
export declare enum PaymentState {
    UNPAYED = "UNPAYED",
    PAYED = "PAYED",
    UNRECOGNIZED = "UNRECOGNIZED"
}
export declare function paymentStateFromJSON(object: any): PaymentState;
export declare function paymentStateToJSON(object: PaymentState): string;
export declare function paymentStateToNumber(object: PaymentState): number;
export interface RequestInvoiceNumber {
    shopId?: string | undefined;
    context?: Any | undefined;
    subject?: Subject | undefined;
}
export interface InvoiceNumberResponse {
    invoiceNumber?: string | undefined;
    operationStatus?: OperationStatus | undefined;
}
export interface Deleted {
    id?: string | undefined;
}
export interface InvoiceList {
    items?: Invoice[] | undefined;
    totalCount?: number | undefined;
    subject?: Subject | undefined;
}
export interface InvoiceListResponse {
    items?: InvoiceResponse[] | undefined;
    totalCount?: number | undefined;
    operationStatus?: OperationStatus | undefined;
}
export interface InvoiceResponse {
    payload?: Invoice | undefined;
    status?: Status | undefined;
}
export interface InvoiceId {
    id?: string | undefined;
    /** empty takes latest */
    documentIds?: string[] | undefined;
    notificationChannelIds?: string[] | undefined;
    options?: Any | undefined;
    subject?: Subject | undefined;
}
export interface InvoiceIdList {
    items?: InvoiceId[] | undefined;
    totalCount?: number | undefined;
    subject?: Subject | undefined;
}
/** The Invoice recource, stored in DB. */
export interface Invoice {
    id?: string | undefined;
    meta?: Meta | undefined;
    invoiceNumber?: string | undefined;
    references?: Reference[] | undefined;
    userId?: string | undefined;
    /** customer_number ref. to recipent orga */
    customerId?: string | undefined;
    /** shop_number --- ref. to sender orga */
    shopId?: string | undefined;
    timestamp?: Date | undefined;
    paymentState?: PaymentState | undefined;
    sender?: ShippingAddress | undefined;
    recipient?: ShippingAddress | undefined;
    sections?: Section[] | undefined;
    totalAmounts?: Amount[] | undefined;
    paymentHints?: string[] | undefined;
    /** url to rendered PDFs */
    documents?: File[] | undefined;
    /** value performance from date */
    fromDate?: Date | undefined;
    /** value performance to date */
    toDate?: Date | undefined;
    sent?: boolean | undefined;
    withdrawn?: boolean | undefined;
    customerOrderNumber?: string | undefined;
    customerVatId?: string | undefined;
    billingAddress?: BillingAddress | undefined;
}
export interface Section {
    id?: string | undefined;
    customerRemark?: string | undefined;
    positions?: Position[] | undefined;
    /** repeated in case of multiple currencies? */
    amounts?: Amount[] | undefined;
}
export interface Position {
    id?: string | undefined;
    productItem?: ProductItem | undefined;
    fulfillmentItem?: FulfillmentItem | undefined;
    manualItem?: ManualItem | undefined;
    unitPrice?: Price | undefined;
    quantity?: number | undefined;
    amount?: Amount | undefined;
    /** value performance from date */
    fromDate?: Date | undefined;
    /** value performance to date */
    toDate?: Date | undefined;
    attributes?: Attribute[] | undefined;
}
export interface ProductItem {
    productId?: string | undefined;
    variantId?: string | undefined;
}
export interface FulfillmentItem {
    productId?: string | undefined;
    variantId?: string | undefined;
}
export interface ManualItem {
    stockKeepingUnit?: string | undefined;
    name?: string | undefined;
    descritpion?: string | undefined;
    properties?: Property[] | undefined;
}
export declare const RequestInvoiceNumber: MessageFns<RequestInvoiceNumber>;
export declare const InvoiceNumberResponse: MessageFns<InvoiceNumberResponse>;
export declare const Deleted: MessageFns<Deleted>;
export declare const InvoiceList: MessageFns<InvoiceList>;
export declare const InvoiceListResponse: MessageFns<InvoiceListResponse>;
export declare const InvoiceResponse: MessageFns<InvoiceResponse>;
export declare const InvoiceId: MessageFns<InvoiceId>;
export declare const InvoiceIdList: MessageFns<InvoiceIdList>;
export declare const Invoice: MessageFns<Invoice>;
export declare const Section: MessageFns<Section>;
export declare const Position: MessageFns<Position>;
export declare const ProductItem: MessageFns<ProductItem>;
export declare const FulfillmentItem: MessageFns<FulfillmentItem>;
export declare const ManualItem: MessageFns<ManualItem>;
/** Microservice definition. */
export type InvoiceServiceDefinition = typeof InvoiceServiceDefinition;
export declare const InvoiceServiceDefinition: {
    readonly name: "InvoiceService";
    readonly fullName: "io.restorecommerce.invoice.InvoiceService";
    readonly methods: {
        readonly read: {
            readonly name: "Read";
            readonly requestType: typeof ReadRequest;
            readonly requestStream: false;
            readonly responseType: typeof InvoiceListResponse;
            readonly responseStream: false;
            readonly options: {
                readonly _unknownFields: {
                    readonly 248008: readonly [Buffer<ArrayBufferLike>];
                };
            };
        };
        readonly create: {
            readonly name: "Create";
            readonly requestType: typeof InvoiceList;
            readonly requestStream: false;
            readonly responseType: typeof InvoiceListResponse;
            readonly responseStream: false;
            readonly options: {};
        };
        readonly update: {
            readonly name: "Update";
            readonly requestType: typeof InvoiceList;
            readonly requestStream: false;
            readonly responseType: typeof InvoiceListResponse;
            readonly responseStream: false;
            readonly options: {};
        };
        readonly upsert: {
            readonly name: "Upsert";
            readonly requestType: typeof InvoiceList;
            readonly requestStream: false;
            readonly responseType: typeof InvoiceListResponse;
            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: {};
        };
        /** Evaluates and (re-)Renders invoices as PDF to ostorage. (creates if not exist, updates if id is given) */
        readonly render: {
            readonly name: "Render";
            readonly requestType: typeof InvoiceList;
            readonly requestStream: false;
            readonly responseType: typeof InvoiceListResponse;
            readonly responseStream: false;
            readonly options: {};
        };
        /** Mark invoices as withdrawn */
        readonly withdraw: {
            readonly name: "Withdraw";
            readonly requestType: typeof InvoiceIdList;
            readonly requestStream: false;
            readonly responseType: typeof InvoiceListResponse;
            readonly responseStream: false;
            readonly options: {};
        };
        /** Triggers notification-srv (sends invoice per email for instance) */
        readonly send: {
            readonly name: "Send";
            readonly requestType: typeof InvoiceIdList;
            readonly requestStream: false;
            readonly responseType: typeof StatusListResponse;
            readonly responseStream: false;
            readonly options: {};
        };
        /** Generate an incremented invoice number */
        readonly generateInvoiceNumber: {
            readonly name: "GenerateInvoiceNumber";
            readonly requestType: typeof RequestInvoiceNumber;
            readonly requestStream: false;
            readonly responseType: typeof InvoiceNumberResponse;
            readonly responseStream: false;
            readonly options: {};
        };
    };
};
export interface InvoiceServiceImplementation<CallContextExt = {}> {
    read(request: ReadRequest, context: CallContext & CallContextExt): Promise<DeepPartial<InvoiceListResponse>>;
    create(request: InvoiceList, context: CallContext & CallContextExt): Promise<DeepPartial<InvoiceListResponse>>;
    update(request: InvoiceList, context: CallContext & CallContextExt): Promise<DeepPartial<InvoiceListResponse>>;
    upsert(request: InvoiceList, context: CallContext & CallContextExt): Promise<DeepPartial<InvoiceListResponse>>;
    delete(request: DeleteRequest, context: CallContext & CallContextExt): Promise<DeepPartial<DeleteResponse>>;
    /** Evaluates and (re-)Renders invoices as PDF to ostorage. (creates if not exist, updates if id is given) */
    render(request: InvoiceList, context: CallContext & CallContextExt): Promise<DeepPartial<InvoiceListResponse>>;
    /** Mark invoices as withdrawn */
    withdraw(request: InvoiceIdList, context: CallContext & CallContextExt): Promise<DeepPartial<InvoiceListResponse>>;
    /** Triggers notification-srv (sends invoice per email for instance) */
    send(request: InvoiceIdList, context: CallContext & CallContextExt): Promise<DeepPartial<StatusListResponse>>;
    /** Generate an incremented invoice number */
    generateInvoiceNumber(request: RequestInvoiceNumber, context: CallContext & CallContextExt): Promise<DeepPartial<InvoiceNumberResponse>>;
}
export interface InvoiceServiceClient<CallOptionsExt = {}> {
    read(request: DeepPartial<ReadRequest>, options?: CallOptions & CallOptionsExt): Promise<InvoiceListResponse>;
    create(request: DeepPartial<InvoiceList>, options?: CallOptions & CallOptionsExt): Promise<InvoiceListResponse>;
    update(request: DeepPartial<InvoiceList>, options?: CallOptions & CallOptionsExt): Promise<InvoiceListResponse>;
    upsert(request: DeepPartial<InvoiceList>, options?: CallOptions & CallOptionsExt): Promise<InvoiceListResponse>;
    delete(request: DeepPartial<DeleteRequest>, options?: CallOptions & CallOptionsExt): Promise<DeleteResponse>;
    /** Evaluates and (re-)Renders invoices as PDF to ostorage. (creates if not exist, updates if id is given) */
    render(request: DeepPartial<InvoiceList>, options?: CallOptions & CallOptionsExt): Promise<InvoiceListResponse>;
    /** Mark invoices as withdrawn */
    withdraw(request: DeepPartial<InvoiceIdList>, options?: CallOptions & CallOptionsExt): Promise<InvoiceListResponse>;
    /** Triggers notification-srv (sends invoice per email for instance) */
    send(request: DeepPartial<InvoiceIdList>, options?: CallOptions & CallOptionsExt): Promise<StatusListResponse>;
    /** Generate an incremented invoice number */
    generateInvoiceNumber(request: DeepPartial<RequestInvoiceNumber>, options?: CallOptions & CallOptionsExt): Promise<InvoiceNumberResponse>;
}
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=invoice.d.ts.map