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 { File } from "./file";
import { BoundingBox3D } from "./geometry";
import { Image } from "./image";
import { Meta } from "./meta";
import { Price } from "./price";
import { Property } from "./property";
import { DeleteRequest, DeleteResponse, ReadRequest } from "./resource_base";
import { OperationStatus, Status } from "./status";
export declare const protobufPackage = "io.restorecommerce.product";
export declare enum AssociationType {
    /** MISCELLANEOUS - Use attributes then... */
    MISCELLANEOUS = "MISCELLANEOUS",
    ACCESSORY = "ACCESSORY",
    RECOMMENDATION = "RECOMMENDATION",
    UNRECOGNIZED = "UNRECOGNIZED"
}
export declare function associationTypeFromJSON(object: any): AssociationType;
export declare function associationTypeToJSON(object: AssociationType): string;
export declare function associationTypeToNumber(object: AssociationType): number;
export interface Association {
    productId?: string | undefined;
    variantId?: string | undefined;
    type?: AssociationType | undefined;
    tags?: string[] | undefined;
    data?: Any | undefined;
    attributes?: Attribute[] | undefined;
}
/** Product resource entity */
export interface Product {
    id?: string | undefined;
    meta?: Meta | undefined;
    product?: IndividualProduct | undefined;
    bundle?: Bundle | undefined;
    shopIds?: string[] | undefined;
    active?: boolean | undefined;
    tags?: string[] | undefined;
    associations?: Association[] | undefined;
    data?: Any | undefined;
    attributes?: Attribute[] | undefined;
}
export interface IndividualProduct {
    name?: string | undefined;
    description?: string | undefined;
    manufacturerId?: string | undefined;
    originCountryId?: string | undefined;
    prototypeId?: string | undefined;
    categoryId?: string | undefined;
    taxIds?: string[] | undefined;
    gtin?: string | undefined;
    physical?: PhysicalProduct | undefined;
    service?: ServiceProduct | undefined;
    virtual?: VirtualProduct | undefined;
}
export interface PhysicalProduct {
    /** complete product definition - for sale */
    variants?: PhysicalVariant[] | undefined;
    /** incomplete templates - not for sale */
    templates?: PhysicalVariant[] | undefined;
}
export interface ServiceProduct {
    variants?: ServiceVariant[] | undefined;
    templates?: ServiceVariant[] | undefined;
}
export interface VirtualProduct {
    variants?: VirtualVariant[] | undefined;
    templates?: VirtualVariant[] | undefined;
}
export interface ProductList {
    items?: Product[] | undefined;
    totalCount?: number | undefined;
    subject?: Subject | undefined;
}
export interface ProductListResponse {
    items?: ProductResponse[] | undefined;
    totalCount?: number | undefined;
    operationStatus?: OperationStatus | undefined;
}
export interface ProductResponse {
    payload?: Product | undefined;
    status?: Status | undefined;
}
export interface Package {
    sizeInCm?: BoundingBox3D | undefined;
    weightInKg?: number | undefined;
    rotatable?: boolean | undefined;
}
export interface PhysicalVariant {
    id?: string | undefined;
    name?: string | undefined;
    description?: string | undefined;
    stockLevel?: number | undefined;
    price?: Price | undefined;
    images?: Image[] | undefined;
    files?: File[] | undefined;
    stockKeepingUnit?: string | undefined;
    parentVariantId?: string | undefined;
    properties?: Property[] | undefined;
    taxIds?: string[] | undefined;
    active?: boolean | undefined;
    /** valid for sale */
    validFrom?: Date | undefined;
    validTo?: Date | undefined;
    attributes?: Attribute[] | undefined;
    /** size for shipping */
    package?: Package | undefined;
    taricCode?: string | undefined;
    hsCode?: string | undefined;
    exportDescription?: string | undefined;
}
export interface ServiceVariant {
    id?: string | undefined;
    name?: string | undefined;
    description?: string | undefined;
    stockLevel?: number | undefined;
    price?: Price | undefined;
    images?: Image[] | undefined;
    files?: File[] | undefined;
    stockKeepingUnit?: string | undefined;
    parentVariantId?: string | undefined;
    properties?: Property[] | undefined;
    taxIds?: string[] | undefined;
    active?: boolean | undefined;
    /** valid for sale */
    validFrom?: Date | undefined;
    validTo?: Date | undefined;
    attributes?: Attribute[] | undefined;
}
export interface VirtualVariant {
    id?: string | undefined;
    name?: string | undefined;
    description?: string | undefined;
    stockLevel?: number | undefined;
    price?: Price | undefined;
    images?: Image[] | undefined;
    files?: File[] | undefined;
    stockKeepingUnit?: string | undefined;
    parentVariantId?: string | undefined;
    properties?: Property[] | undefined;
    taxIds?: string[] | undefined;
    active?: boolean | undefined;
    validFrom?: Date | undefined;
    validTo?: Date | undefined;
    attributes?: Attribute[] | undefined;
}
export interface Bundle {
    name?: string | undefined;
    description?: string | undefined;
    images?: Image[] | undefined;
    products?: BundleProduct[] | undefined;
    price?: Price | undefined;
    prePackaged?: Package | undefined;
    attributes?: Attribute[] | undefined;
    validFrom?: Date | undefined;
    validTo?: Date | undefined;
}
export interface BundleProduct {
    productId?: string | undefined;
    variantId?: string | undefined;
    quantity?: number | undefined;
    /** Price ratio in relation to the bundle price */
    priceRatio?: number | undefined;
}
export interface Session {
    /** get a new id if empty */
    id?: string | undefined;
    /** required field to start a session */
    from?: Date | undefined;
    /** leave empty for auto max session */
    to?: Date | undefined;
}
export interface IndividualProductVariantRequest {
    productId?: string | undefined;
    variantId?: string | undefined;
    quantity?: number | undefined;
    session?: Session | undefined;
    /** for taxing, currency, etc.? */
    localization?: IndividualProductVariantRequest_Localization | undefined;
}
export interface IndividualProductVariantRequest_Localization {
    countryId?: string | undefined;
    localeId?: string | undefined;
    currencyId?: string | undefined;
}
export interface IndividualProductVariantListRequest {
    items?: IndividualProductVariantRequest[] | undefined;
    totalCount?: number | undefined;
    subject?: Subject | undefined;
}
export interface IndividualProductVariant {
    id?: string | undefined;
    meta?: Meta | undefined;
    variantId?: string | undefined;
    name?: string | undefined;
    description?: string | undefined;
    tags?: string[] | undefined;
    associations?: Association[] | undefined;
    data?: Any | undefined;
    taricCode?: string | undefined;
    shopIds?: string[] | undefined;
    manufacturerId?: string | undefined;
    originCountryId?: string | undefined;
    prototypeId?: string | undefined;
    categoryId?: string | undefined;
    gtin?: string | undefined;
    stockLevel?: number | undefined;
    price?: Price | undefined;
    images?: Image[] | undefined;
    files?: File[] | undefined;
    stockKeepingUnit?: string | undefined;
    properties?: Property[] | undefined;
    taxIds?: string[] | undefined;
    active?: boolean | undefined;
    validFrom?: Date | undefined;
    validTo?: Date | undefined;
    attributes?: Attribute[] | undefined;
    /** size for shipping */
    package?: Package | undefined;
    hsCode?: string | undefined;
}
export interface IndividualProductVariantResponse {
    payload?: IndividualProductVariant | undefined;
    status?: Status | undefined;
}
export interface IndividualProductVariantListResponse {
    items?: IndividualProductVariantResponse[] | undefined;
    totalCount?: number | undefined;
    operationStatus?: OperationStatus | undefined;
    session?: Session | undefined;
}
export declare const Association: MessageFns<Association>;
export declare const Product: MessageFns<Product>;
export declare const IndividualProduct: MessageFns<IndividualProduct>;
export declare const PhysicalProduct: MessageFns<PhysicalProduct>;
export declare const ServiceProduct: MessageFns<ServiceProduct>;
export declare const VirtualProduct: MessageFns<VirtualProduct>;
export declare const ProductList: MessageFns<ProductList>;
export declare const ProductListResponse: MessageFns<ProductListResponse>;
export declare const ProductResponse: MessageFns<ProductResponse>;
export declare const Package: MessageFns<Package>;
export declare const PhysicalVariant: MessageFns<PhysicalVariant>;
export declare const ServiceVariant: MessageFns<ServiceVariant>;
export declare const VirtualVariant: MessageFns<VirtualVariant>;
export declare const Bundle: MessageFns<Bundle>;
export declare const BundleProduct: MessageFns<BundleProduct>;
export declare const Session: MessageFns<Session>;
export declare const IndividualProductVariantRequest: MessageFns<IndividualProductVariantRequest>;
export declare const IndividualProductVariantRequest_Localization: MessageFns<IndividualProductVariantRequest_Localization>;
export declare const IndividualProductVariantListRequest: MessageFns<IndividualProductVariantListRequest>;
export declare const IndividualProductVariant: MessageFns<IndividualProductVariant>;
export declare const IndividualProductVariantResponse: MessageFns<IndividualProductVariantResponse>;
export declare const IndividualProductVariantListResponse: MessageFns<IndividualProductVariantListResponse>;
export type ProductServiceDefinition = typeof ProductServiceDefinition;
export declare const ProductServiceDefinition: {
    readonly name: "ProductService";
    readonly fullName: "io.restorecommerce.product.ProductService";
    readonly methods: {
        readonly read: {
            readonly name: "Read";
            readonly requestType: typeof ReadRequest;
            readonly requestStream: false;
            readonly responseType: typeof ProductListResponse;
            readonly responseStream: false;
            readonly options: {
                readonly _unknownFields: {
                    readonly 248008: readonly [Buffer<ArrayBufferLike>];
                };
            };
        };
        readonly create: {
            readonly name: "Create";
            readonly requestType: typeof ProductList;
            readonly requestStream: false;
            readonly responseType: typeof ProductListResponse;
            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 ProductList;
            readonly requestStream: false;
            readonly responseType: typeof ProductListResponse;
            readonly responseStream: false;
            readonly options: {};
        };
        readonly upsert: {
            readonly name: "Upsert";
            readonly requestType: typeof ProductList;
            readonly requestStream: false;
            readonly responseType: typeof ProductListResponse;
            readonly responseStream: false;
            readonly options: {};
        };
        /** Response with resolved product-variants in a flatten message */
        readonly getVariant: {
            readonly name: "GetVariant";
            readonly requestType: typeof IndividualProductVariantListRequest;
            readonly requestStream: false;
            readonly responseType: typeof IndividualProductVariantListResponse;
            readonly responseStream: false;
            readonly options: {
                readonly _unknownFields: {
                    readonly 248008: readonly [Buffer<ArrayBufferLike>];
                };
            };
        };
        /**
         * Response with resolved product-variants
         * Claims a requested quantity from stock level permanently.
         * Response with an error status if requested quantity is not in stock.
         */
        readonly claimVariant: {
            readonly name: "ClaimVariant";
            readonly requestType: typeof IndividualProductVariantListRequest;
            readonly requestStream: false;
            readonly responseType: typeof IndividualProductVariantListResponse;
            readonly responseStream: false;
            readonly options: {};
        };
        /**
         * Response with resolved product-variants
         * Releases a requested quantity back to stock level.
         */
        readonly releaseVariant: {
            readonly name: "ReleaseVariant";
            readonly requestType: typeof IndividualProductVariantListRequest;
            readonly requestStream: false;
            readonly responseType: typeof IndividualProductVariantListResponse;
            readonly responseStream: false;
            readonly options: {};
        };
        /** Claim all products assigned to a session permanently */
        readonly resolveSession: {
            readonly name: "ResolveSession";
            readonly requestType: typeof Session;
            readonly requestStream: false;
            readonly responseType: typeof IndividualProductVariantListResponse;
            readonly responseStream: false;
            readonly options: {};
        };
        /** Drop session and instantly release all claimed products */
        readonly dropSession: {
            readonly name: "DropSession";
            readonly requestType: typeof Session;
            readonly requestStream: false;
            readonly responseType: typeof IndividualProductVariantListResponse;
            readonly responseStream: false;
            readonly options: {};
        };
    };
};
export interface ProductServiceImplementation<CallContextExt = {}> {
    read(request: ReadRequest, context: CallContext & CallContextExt): Promise<DeepPartial<ProductListResponse>>;
    create(request: ProductList, context: CallContext & CallContextExt): Promise<DeepPartial<ProductListResponse>>;
    delete(request: DeleteRequest, context: CallContext & CallContextExt): Promise<DeepPartial<DeleteResponse>>;
    update(request: ProductList, context: CallContext & CallContextExt): Promise<DeepPartial<ProductListResponse>>;
    upsert(request: ProductList, context: CallContext & CallContextExt): Promise<DeepPartial<ProductListResponse>>;
    /** Response with resolved product-variants in a flatten message */
    getVariant(request: IndividualProductVariantListRequest, context: CallContext & CallContextExt): Promise<DeepPartial<IndividualProductVariantListResponse>>;
    /**
     * Response with resolved product-variants
     * Claims a requested quantity from stock level permanently.
     * Response with an error status if requested quantity is not in stock.
     */
    claimVariant(request: IndividualProductVariantListRequest, context: CallContext & CallContextExt): Promise<DeepPartial<IndividualProductVariantListResponse>>;
    /**
     * Response with resolved product-variants
     * Releases a requested quantity back to stock level.
     */
    releaseVariant(request: IndividualProductVariantListRequest, context: CallContext & CallContextExt): Promise<DeepPartial<IndividualProductVariantListResponse>>;
    /** Claim all products assigned to a session permanently */
    resolveSession(request: Session, context: CallContext & CallContextExt): Promise<DeepPartial<IndividualProductVariantListResponse>>;
    /** Drop session and instantly release all claimed products */
    dropSession(request: Session, context: CallContext & CallContextExt): Promise<DeepPartial<IndividualProductVariantListResponse>>;
}
export interface ProductServiceClient<CallOptionsExt = {}> {
    read(request: DeepPartial<ReadRequest>, options?: CallOptions & CallOptionsExt): Promise<ProductListResponse>;
    create(request: DeepPartial<ProductList>, options?: CallOptions & CallOptionsExt): Promise<ProductListResponse>;
    delete(request: DeepPartial<DeleteRequest>, options?: CallOptions & CallOptionsExt): Promise<DeleteResponse>;
    update(request: DeepPartial<ProductList>, options?: CallOptions & CallOptionsExt): Promise<ProductListResponse>;
    upsert(request: DeepPartial<ProductList>, options?: CallOptions & CallOptionsExt): Promise<ProductListResponse>;
    /** Response with resolved product-variants in a flatten message */
    getVariant(request: DeepPartial<IndividualProductVariantListRequest>, options?: CallOptions & CallOptionsExt): Promise<IndividualProductVariantListResponse>;
    /**
     * Response with resolved product-variants
     * Claims a requested quantity from stock level permanently.
     * Response with an error status if requested quantity is not in stock.
     */
    claimVariant(request: DeepPartial<IndividualProductVariantListRequest>, options?: CallOptions & CallOptionsExt): Promise<IndividualProductVariantListResponse>;
    /**
     * Response with resolved product-variants
     * Releases a requested quantity back to stock level.
     */
    releaseVariant(request: DeepPartial<IndividualProductVariantListRequest>, options?: CallOptions & CallOptionsExt): Promise<IndividualProductVariantListResponse>;
    /** Claim all products assigned to a session permanently */
    resolveSession(request: DeepPartial<Session>, options?: CallOptions & CallOptionsExt): Promise<IndividualProductVariantListResponse>;
    /** Drop session and instantly release all claimed products */
    dropSession(request: DeepPartial<Session>, options?: CallOptions & CallOptionsExt): Promise<IndividualProductVariantListResponse>;
}
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=product.d.ts.map