All Classes Files Functions Variables Enumerations Enumerator Groups Pages
CompanyContacts.idl
1 /**
2  * @file CompanyConacts.idl
3  * @brief Company contacts settings
4  *
5  * @author Miroslav Kroc
6  *
7  * @copyright Copyright © 2011-2013 Kerio Technologies s.r.o.
8  */
9 
10 #import <kerio/web/idl/SharedStructures.idl>
11 
12 module kerio {
13 module jsonapi {
14 module admin {
15 
17  kerio::web::KId id;
18  string name; ///< name of company contact (caption of item in list of contacts)
19  string company;
20  string street;
21  string locality;
22  string state;
23  string zip;
24  string country;
25  string url;
26  string phone;
27  kerio::web::KId domainId; ///< id of domain associated with company contact
28 };
29 
30 /**
31  * List of company contacts
32  */
33 typedef sequence<CompanyContact> CompanyContactList;
34 
35 /**
36  * Company contacts management
37  */
38 interface CompanyContacts {
39 
40  /**
41  * Create new company contacts.
42  *
43  * @param errors - error message list
44  * @param result - particular results for all items
45  * @param domains - new company contacts entities
46  */
47  void create(out kerio::web::ErrorList errors, out kerio::web::CreateResultList result, in CompanyContactList companyContacts);
48 
49  /**
50  * Obtain a list of company contacts.
51  *
52  * @param list - list of company contacts
53  * @param totalItems - amount of company contacts for given search condition, useful when limit is defined in kerio::web::SearchQuery
54  * @param query - query conditions and limits
55  */
56  void get(out CompanyContactList list, out long totalItems, in kerio::web::SearchQuery query);
57 
58  /**
59  * Obtain a list of company contacts capable to be used for user editor to specified domain (domainId).
60  * This method is valid for an account admin and full admin.
61  * - Parameter "domainId" is optional for account admin.
62  * - Only company contacts for given domain and global company contacts are listed.
63  *
64  * @param companyContactList - list of user templates
65  * @param domainId - Only company contacts for given domain and global company contacts are listed.
66  */
67  void getAvailable(out CompanyContactList companyContactList, in kerio::web::KId domainId);
68 
69  /**
70  * Remove company contacts.
71  *
72  * @param errors - error message list
73  * @param domainIds - list of global identifiers of company contacts to be deleted
74  */
75  void remove(out kerio::web::ErrorList errors, in kerio::web::KIdList companyContactsIds);
76 
77  /**
78  * Set existing company contacts to given pattern.
79  *
80  * @param errors - error message list
81  * @param companyContactsIds - list of the company contacts's global identifier(s)
82  * @param pattern - pattern to use for new values
83  */
84  void set(out kerio::web::ErrorList errors, in kerio::web::KIdList companyContactsIds, in CompanyContact pattern);
85 
86 };
87 
88 }; }; };//end of namespace