import { type IBaseAdapter } from '@unchainedshop/utils'; import type { DeliveryProvider } from '@unchainedshop/core-delivery'; import type { Product } from '@unchainedshop/core-products'; import type { Order, OrderPosition } from '@unchainedshop/core-orders'; import type { TokenSurrogate, WarehousingConfiguration, WarehousingProviderType } from '@unchainedshop/core-warehousing'; export declare const WarehousingError: { readonly ADAPTER_NOT_FOUND: "ADAPTER_NOT_FOUND"; readonly NOT_IMPLEMENTED: "NOT_IMPLEMENTED"; readonly INCOMPLETE_CONFIGURATION: "INCOMPLETE_CONFIGURATION"; readonly WRONG_CREDENTIALS: "WRONG_CREDENTIALS"; }; export type WarehousingError = (typeof WarehousingError)[keyof typeof WarehousingError]; export interface WarehousingAdapterActions { configurationError: () => WarehousingError | null; isActive: () => boolean; stock: (referenceDate: Date) => Promise; productionTime: (quantityToProduce: number) => Promise; commissioningTime: (quantity: number) => Promise; tokenize: () => Promise[]>; tokenMetadata: (tokenSerialNumber: string, referenceDate: Date) => Promise; isInvalidateable: (tokenSerialNumber: string, referenceDate: Date) => Promise; } export interface WarehousingContext { deliveryProvider?: DeliveryProvider; product?: Product; token?: TokenSurrogate; quantity?: number; referenceDate?: Date; locale?: Intl.Locale; order?: Order; orderPosition?: OrderPosition; } export type IWarehousingAdapter = IBaseAdapter & { orderIndex: number; initialConfiguration: WarehousingConfiguration; typeSupported: (type: WarehousingProviderType) => boolean; actions: (config: WarehousingConfiguration, context: WarehousingContext) => WarehousingAdapterActions; }; export declare const WarehousingAdapter: Omit;