All Classes Files Functions Variables Enumerations Enumerator Groups Pages
Aliases.idl
Go to the documentation of this file.
1  /**
2  * @file Aliases.idl
3  * @brief Work with virtual email addresses.
4  *
5  * @author Dusan Juhas
6  *
7  * @copyright Copyright © 2017 Kerio Technologies s.r.o.
8  */
9 
10 #import <kerio/web/idl/SharedStructures.idl>
11 #import <Users.idl> //PublicFolderList
12 #import <DistributedDomain.idl> //HomeServer
13 
14 module kerio {
15 module jsonapi {
16 module admin {
17 
18 /**
19  * Alias type definition
20  */
21 enum AliasType {
22  TypePublicFolder, ///< messages are delivered to public folder
23  TypeEmailAddress ///< messages are delivered to email account
24 };
25 
26 /**
27  * Alias details
28  */
29 struct Alias {
30  kerio::web::KId id; ///< global identification of alias
31  kerio::web::KId domainId; ///< [REQUIRED FOR CREATE] identification in which domain alias exists
32  string name; ///< [REQUIRED FOR CREATE] [USED BY QUICKSEARCH] left side of alias
33  kerio::web::KId deliverToId; ///< empty if email or contains public folder kid
34  string deliverTo; ///< [REQUIRED FOR CREATE] [USED BY QUICKSEARCH] email address or public folder name
35  AliasType type; ///< type of the alias
36  string description; ///< description
37 
38  HomeServer homeServer; ///< [READ-ONLY] Id of alias homeserver if server is in Cluster
39 };
40 
41 /**
42  * List of aliases
43  */
44 typedef sequence<Alias> AliasList;
45 
46 /**
47  * Alias Target discriminator
48  */
49 enum AliasTargetType {
50  TypeUser, ///< user
51  TypeGroup ///< group
52 };
53 
54 /**
55  * Alias target can be a user or group
56  */
57 struct AliasTarget {
58  kerio::web::KId id; ///< unique identifier
59  AliasTargetType type; ///< item type discriminator
60  string name; ///< loginName for the User, name in square brackets for the Group
61  string fullName; ///< fullname for the User, empty string for the Group
62  string description; ///< description of User/Group
63  boolean isEnabled; ///< is the User/Group enabled?
64  DataSource itemSource; ///< is the User/Group stored internally or by LDAP?
65  string emailAddress; ///< first email address
66  HomeServer homeServer; ///< id of users homeserver if server is in Cluster; groups haven't homeserver
67 };
68 
69 /**
70  * List of alias targets
71  */
72 typedef sequence<AliasTarget> AliasTargetList;
73 
74 /**
75  * Alias management
76  */
77 interface Aliases {
78 
79  /**
80  * Obtain a list of mail addresses and/or public folders on which given string will be expanded.
81  *
82  * @param result - list of expansions
83  * @param checkString - string to be checked
84  */
85  void check(out kerio::web::StringList result, in string checkString);
86 
87  /**
88  * Create new aliases
89  *
90  * @param errors - list of error messages for appropriate new aliases
91  * @param result - list of IDs of created aliases
92  * @param aliases - new alias entities
93  */
94  void create(out kerio::web::ErrorList errors, out kerio::web::CreateResultList result, in AliasList aliases);
95 
96  /**
97  * Obtain list of aliases.
98  *
99  * @param list - aliases
100  * @param totalItems - amount of aliases for given search condition, useful when limit is defined in query
101  * @param query - query conditions and limits
102  * @param domainKId - domain identification
103  */
104  void get(out AliasList list, out long totalItems, in kerio::web::SearchQuery query, in kerio::web::KId domainId);
105 
106  /**
107  * Obtain a list of mail public folders in the given domain.
108  *
109  * @param publicFolderList - list of public folders
110  * @param domainId - global identification of the domain
111  */
112  void getMailPublicFolderList(out PublicFolderList publicFolderList, in kerio::web::KId domainId);
113 
114  /**
115  * Obtain a list of alias targets.
116  *
117  * @param list - alias targets
118  * @param totalItems - amount of aliases for given search condition, useful when a limit is defined in the query
119  * @param query - query conditions and limits
120  * @param domainId - global identification of the domain
121  */
122  void getTargetList(out AliasTargetList list, out long totalItems, in kerio::web::SearchQuery query, in kerio::web::KId domainId);
123 
124  /**
125  * Delete aliases.
126  *
127  * @param errors - error message list
128  * @param aliasList - list of global identifiers of aliases to be deleted
129  */
130  void remove(out kerio::web::ErrorList errors, in kerio::web::KIdList aliasIds);
131 
132  /**
133  * Set an existing alias.
134  *
135  * @param errors - error message list
136  * @param aliasIds - list of alias global identifier(s)
137  * @param pattern - pattern to use for new values
138  */
139  void set(out kerio::web::ErrorList errors, in kerio::web::KIdList aliasIds, in Alias pattern);
140 };
141 
142 }; }; };//end of namespace