UNPKG

1.92 kBTypeScriptView Raw
1import React from 'react';
2import { MutationFunction } from 'react-apollo';
3import { AddToListMutation, ProductListItemOptions, ProductListState, RemoveFromListMutation, UpdateListInput, UpdateListOptions } from '.';
4import { Mutation } from '../../types';
5import { Action } from './product-list-reducer';
6export declare function loginAction({ loginMutation }: {
7 loginMutation: MutationFunction<Mutation['addToCustomerProductList']>;
8}): (dispatch: React.Dispatch<Action>, getState: () => ProductListState) => void;
9export declare function refreshAction(): (dispatch: React.Dispatch<Action>) => void;
10export declare function updateAction({ updateAPI, removeMutation, addMutation, options, articleNumber, variantToReplace, variantArticleNumber }: {
11 updateAPI: boolean;
12 removeMutation: RemoveFromListMutation;
13 addMutation: AddToListMutation;
14 options: UpdateListOptions;
15 variantToReplace?: string;
16 variantArticleNumber: string;
17 articleNumber: string;
18}): (dispatch: React.Dispatch<Action>, getState: () => ProductListState) => void;
19export declare function removeAction({ updateAPI, articleNumber, variantArticleNumber, removeMutation }: UpdateListInput & {
20 removeMutation: RemoveFromListMutation;
21 updateAPI: boolean;
22 articleNumber: string;
23}): (dispatch: React.Dispatch<Action>, getState: () => ProductListState) => void;
24export declare function clearAction({ updateAPI, removeMutation }: {
25 updateAPI: boolean;
26 removeMutation: RemoveFromListMutation;
27}): (dispatch: React.Dispatch<Action>, getState: () => ProductListState) => void;
28export declare function addAction({ articleNumber, variantArticleNumber, addMutation, options, updateAPI }: UpdateListInput & {
29 addMutation: AddToListMutation;
30 options: ProductListItemOptions;
31 updateAPI: boolean;
32 articleNumber: string;
33}): (dispatch: React.Dispatch<Action>, getState: () => ProductListState) => void;