import type { Item, OrderFormItemInput, MarketingData } from '../typings'; import type { LogFn } from './logger'; export type LocalOrderTaskType = 'add_mutation' | 'update_mutation'; export type UpdateQuantityInput = { index: number; quantity: number; } | { uniqueId: string; quantity: number; }; export interface UpdateQuantityMutationVariables { orderItems: UpdateQuantityInput[]; allowedOutdatedData?: string[]; splitItem?: boolean; } export interface AddItemsMutationVariables { items: OrderFormItemInput[]; marketingData?: Partial; salesChannel?: string; allowedOutdatedData?: string[]; } type LocalOrderTask = { id?: string; variables: AddItemsMutationVariables; orderFormItems: Item[]; type: 'add_mutation'; } | { id?: string; variables: UpdateQuantityMutationVariables; orderFormItems: Item[]; type: 'update_mutation'; }; interface LocalOrderQueue { queue: LocalOrderTask[]; } type GetLocalOrderQueue = (log?: LogFn) => LocalOrderQueue; type PushLocalOrderQueueFn = (task: LocalOrderTask, log?: LogFn) => number; type PopLocalOrderQueueFn = (index?: number, log?: LogFn) => LocalOrderTask | undefined; type UpdateLocalQueueItemIdsFn = (args: { fakeUniqueId: string; uniqueId: string; }, log?: LogFn) => void; export declare const getLocalOrderQueue: GetLocalOrderQueue; export declare const pushLocalOrderQueue: PushLocalOrderQueueFn; export declare const popLocalOrderQueue: PopLocalOrderQueueFn; export declare const updateLocalQueueItemIds: UpdateLocalQueueItemIdsFn; export {}; //# sourceMappingURL=localOrderQueue.d.ts.map