1 export const getIncomingDefaults = ({
13 url: 'mail/v4/incomingdefaults',
14 params: { Location, Page, PageSize, Keyword },
17 interface IncomingDefaultConfig {
23 interface AddIncomingDefaultConfig extends IncomingDefaultConfig {
25 * If email is already registered in incomingDefaults we overwrite the location
26 * Avoids to find the already exiting item ID
31 export const addIncomingDefault = ({ Email, Domain, Location, Overwrite }: AddIncomingDefaultConfig) => {
32 let url = 'mail/v4/incomingdefaults';
35 url = `${url}?Overwrite=1`;
41 data: { Email, Domain, Location },
45 export const updateIncomingDefault = (
46 incomingDefaultID: string,
47 { Email, Domain, Location }: IncomingDefaultConfig
50 url: `mail/v4/incomingdefaults/${incomingDefaultID}`,
51 data: { Email, Domain, Location },
54 export const deleteIncomingDefaults = (IDs: string[]) => ({
56 url: 'mail/v4/incomingdefaults/delete',
60 export const clearIncomingDefaults = () => ({
62 url: 'mail/v4/incomingdefaults',