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 © 2017 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  string fax;
28  kerio::web::KId domainId; ///< id of domain associated with company contact
29 };
30 
31 /**
32  * List of company contacts
33  */
34 typedef sequence<CompanyContact> CompanyContactList;
35 
36 /**
37  * Company contacts management
38  */
39 interface CompanyContacts {
40 
41  /**
42  * Create new company contacts.
43  *
44  * @param errors - error message list
45  * @param result - particular results for all items
46  * @param domains - new company contacts entities
47  */
48  void create(out kerio::web::ErrorList errors, out kerio::web::CreateResultList result, in CompanyContactList companyContacts);
49 
50  /**
51  * Obtain a list of company contacts.
52  *
53  * @param list - list of company contacts
54  * @param totalItems - amount of company contacts for given search condition, useful when limit is defined in kerio::web::SearchQuery
55  * @param query - query conditions and limits
56  */
57  void get(out CompanyContactList list, out long totalItems, in kerio::web::SearchQuery query);
58 
59  /**
60  * Obtain a list of company contacts capable to be used for user editor to specified domain (domainId).
61  * This method is valid for an account admin and full admin.
62  * - Parameter "domainId" is optional for account admin.
63  * - Only company contacts for given domain and global company contacts are listed.
64  *
65  * @param companyContactList - list of user templates
66  * @param domainId - Only company contacts for given domain and global company contacts are listed.
67  */
68  void getAvailable(out CompanyContactList companyContactList, in kerio::web::KId domainId);
69 
70  /**
71  * Remove company contacts.
72  *
73  * @param errors - error message list
74  * @param domainIds - list of global identifiers of company contacts to be deleted
75  */
76  void remove(out kerio::web::ErrorList errors, in kerio::web::KIdList companyContactsIds);
77 
78  /**
79  * Set existing company contacts to given pattern.
80  *
81  * @param errors - error message list
82  * @param companyContactsIds - list of the company contacts's global identifier(s)
83  * @param pattern - pattern to use for new values
84  */
85  void set(out kerio::web::ErrorList errors, in kerio::web::KIdList companyContactsIds, in CompanyContact pattern);
86 
87 };
88 
89 }; }; };//end of namespace