1 export const getOrgIncomingDefaults = ({
13 url: 'mail/v4/orgincomingdefaults',
14 params: { Location, Page, PageSize, Keyword },
17 interface OrgIncomingDefaultConfig {
23 interface AddOrgIncomingDefaultConfig extends OrgIncomingDefaultConfig {
25 * If email is already registered in orgIncomingDefaults we overwrite the location
26 * Avoids to find the already exiting item ID
31 export const addOrgIncomingDefault = ({ Email, Domain, Location, Overwrite }: AddOrgIncomingDefaultConfig) => {
32 let url = 'mail/v4/orgincomingdefaults';
35 url = `${url}?Overwrite=1`;
41 data: { Email, Domain, Location },
45 export const updateOrgIncomingDefault = (
46 orgIncomingDefaultID: string,
47 { Email, Domain, Location }: OrgIncomingDefaultConfig
50 url: `mail/v4/orgincomingdefaults/${orgIncomingDefaultID}`,
51 data: { Email, Domain, Location },
54 export const deleteOrgIncomingDefaults = (IDs: string[]) => ({
56 url: 'mail/v4/orgincomingdefaults/delete',
60 export const clearOrgIncomingDefaults = () => ({
62 url: 'mail/v4/orgincomingdefaults',