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 { Subject } from "./auth";
import { Meta } from "./meta";
import { DeleteRequest, DeleteResponse, ReadRequest } from "./resource_base";
import { OperationStatus, Status } from "./status";
export declare const protobufPackage = "io.restorecommerce.dicount";
export declare enum DicountType {
    /** PERCENTAGE - amount = price - price * value/100 */
    PERCENTAGE = "PERCENTAGE",
    /** ABSOLUTE - amount = price - value */
    ABSOLUTE = "ABSOLUTE",
    /** OVERRIDE - amount = value */
    OVERRIDE = "OVERRIDE",
    UNRECOGNIZED = "UNRECOGNIZED"
}
export declare function dicountTypeFromJSON(object: any): DicountType;
export declare function dicountTypeToJSON(object: DicountType): string;
export declare function dicountTypeToNumber(object: DicountType): number;
export interface Discount {
    id?: string | undefined;
    meta?: Meta | undefined;
    name?: string | undefined;
    description?: string | undefined;
    start?: Date | undefined;
    end?: Date | undefined;
    discountType?: DicountType | undefined;
    value?: number | undefined;
    priceGroupIds?: string[] | undefined;
    productCategoryIds?: string[] | undefined;
    individualItems?: Discount_Item[] | undefined;
    grantedDiscountIds?: string[] | undefined;
    /** ???? */
    grantedOrganizationIds?: string[] | undefined;
    /** ???? */
    grantedUserRoleIds?: string[] | undefined;
}
export interface Discount_Item {
    productId?: string | undefined;
    /** empty to address all variants */
    variantIds?: string[] | undefined;
}
export interface DiscountList {
    items?: Discount[] | undefined;
    totalCount?: number | undefined;
    subject?: Subject | undefined;
}
export interface DiscountListResponse {
    items?: DiscountResponse[] | undefined;
    totalCount?: number | undefined;
    operationStatus?: OperationStatus | undefined;
}
export interface DiscountResponse {
    payload?: Discount | undefined;
    status?: Status | undefined;
}
export declare const Discount: MessageFns<Discount>;
export declare const Discount_Item: MessageFns<Discount_Item>;
export declare const DiscountList: MessageFns<DiscountList>;
export declare const DiscountListResponse: MessageFns<DiscountListResponse>;
export declare const DiscountResponse: MessageFns<DiscountResponse>;
/** Microservice definition. */
export type DiscountServiceDefinition = typeof DiscountServiceDefinition;
export declare const DiscountServiceDefinition: {
    readonly name: "DiscountService";
    readonly fullName: "io.restorecommerce.dicount.DiscountService";
    readonly methods: {
        readonly read: {
            readonly name: "Read";
            readonly requestType: typeof ReadRequest;
            readonly requestStream: false;
            readonly responseType: typeof DiscountListResponse;
            readonly responseStream: false;
            readonly options: {
                readonly _unknownFields: {
                    readonly 248008: readonly [Buffer<ArrayBufferLike>];
                };
            };
        };
        readonly create: {
            readonly name: "Create";
            readonly requestType: typeof DiscountList;
            readonly requestStream: false;
            readonly responseType: typeof DiscountListResponse;
            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 DiscountList;
            readonly requestStream: false;
            readonly responseType: typeof DiscountListResponse;
            readonly responseStream: false;
            readonly options: {};
        };
        readonly upsert: {
            readonly name: "Upsert";
            readonly requestType: typeof DiscountList;
            readonly requestStream: false;
            readonly responseType: typeof DiscountListResponse;
            readonly responseStream: false;
            readonly options: {};
        };
    };
};
export interface DiscountServiceImplementation<CallContextExt = {}> {
    read(request: ReadRequest, context: CallContext & CallContextExt): Promise<DeepPartial<DiscountListResponse>>;
    create(request: DiscountList, context: CallContext & CallContextExt): Promise<DeepPartial<DiscountListResponse>>;
    delete(request: DeleteRequest, context: CallContext & CallContextExt): Promise<DeepPartial<DeleteResponse>>;
    update(request: DiscountList, context: CallContext & CallContextExt): Promise<DeepPartial<DiscountListResponse>>;
    upsert(request: DiscountList, context: CallContext & CallContextExt): Promise<DeepPartial<DiscountListResponse>>;
}
export interface DiscountServiceClient<CallOptionsExt = {}> {
    read(request: DeepPartial<ReadRequest>, options?: CallOptions & CallOptionsExt): Promise<DiscountListResponse>;
    create(request: DeepPartial<DiscountList>, options?: CallOptions & CallOptionsExt): Promise<DiscountListResponse>;
    delete(request: DeepPartial<DeleteRequest>, options?: CallOptions & CallOptionsExt): Promise<DeleteResponse>;
    update(request: DeepPartial<DiscountList>, options?: CallOptions & CallOptionsExt): Promise<DiscountListResponse>;
    upsert(request: DeepPartial<DiscountList>, options?: CallOptions & CallOptionsExt): Promise<DiscountListResponse>;
}
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=discount.d.ts.map