All Classes Files Functions Variables Enumerations Enumerator Groups Pages
ContactsCommon.idl
Go to the documentation of this file.
1 /**
2  * @file ContactsCommon.idl
3  * @brief %Contacts management
4  *
5  * @author Dusan Juhas, Frantisek Boranek
6  *
7  * @copyright Copyright © 2017 Kerio Technologies s.r.o.
8  */
9 
10 #import <kerio/web/idl/SharedStructures.idl>
11 #import <common.idl>
12 
13 module kerio {
14 module jsonapi {
15 module contacts {
16 
17 /**
18  * Extension of Apple Address Book
19  */
20 struct ABExtension {
21  string groupId;
22  string label;
23 };
24 
25 /**
26  * Type of a postal address
27  */
28 enum PostalAddressType {
29  AddressHome,
30  AddressWork,
31  AddressOther,
32  AddressCustom ///< no type defined
33 };
34 
35 /**
36  * Structure describing a postal address in contact.
37  */
38 struct PostalAddress {
39  boolean preferred;
40 
41  string pobox; ///< the post office box
42  string extendedAddress; ///< e.g., apartment or suite number
43  string street; ///< the street address
44  string locality; ///< the locality (e.g., city)
45  string state; ///< the region (e.g., state or province);
46  string zip; ///< the postal code
47  string country; ///< the country name (full name)
48 
49  string label;
50  PostalAddressType type;
51  ABExtension extension;
52 };
53 
54 /**
55  * A sequence of postal addresses.
56  */
57 typedef sequence<PostalAddress> PostalAddressList;
58 
59 /**
60  * Email address type.
61  */
62 enum EmailAddressType {
63  EmailWork,
64  EmailHome,
65  EmailOther,
66  EmailCustom, ///< no type defined
67 
68  // valid for distribution lists only
69  RefContact, ///< Reference to existing conatact
70  RefDistributionList ///< Reference to existing distribution list
71 };
72 
73 /**
74  * Structure describing an email address in contact.
75  */
76 struct EmailAddress {
77  string address;
78  string name;
79  boolean preferred;
80  boolean isValidCertificate;
81 
82  EmailAddressType type;
83  kerio::web::KId refId; ///< Global identification of reference. Valid for types 'RefContact' and 'RefDistributionList'.
84 
85  ABExtension extension;
86 };
87 
88 /**
89  * Sequence of email addresses.
90  */
91 typedef sequence<EmailAddress> EmailAddressList;
92 
93 /**
94  * Type of a contact phone number
95  */
96 enum PhoneNumberType {
97  TypeAssistant,
98  TypeWorkVoice,
99  TypeWorkFax,
100  TypeCallback,
101  TypeCar,
102  TypeCompany,
103  TypeHomeVoice,
104  TypeHomeFax,
105  TypeIsdn,
106  TypeMobile,
107  TypeOtherVoice,
108  TypeOtherFax,
109  TypePager,
110  TypePrimary,
111  TypeRadio,
112  TypeTelex,
113  TypeTtyTdd,
114  TypeCustom ///< no type defined
115 };
116 
117 /**
118  * Structure desribing a contact phone number
119  */
120 struct PhoneNumber {
121  PhoneNumberType type;
122  string number; ///< A number - based on the X.500 Telephone Number attribute
123 
124  ABExtension extension;
125 };
126 
127 typedef sequence<PhoneNumber> PhoneNumberList;
128 
129 /**
130  * Type of URL
131  */
132 enum UrlType {
133  UrlHome,
134  UrlWork,
135  UrlOther,
136  UrlCustom ///< no type defined
137 };
138 
139 /**
140  * Structure desribing URL
141  */
142 struct Url {
143  UrlType type;
144  string url;
145 
146  ABExtension extension;
147 };
148 
149 typedef sequence<Url> UrlList;
150 
151 
152 /**
153  * A contact photo. Only JPEG format is supported. Maximum size is 256 kB.
154  */
156  string id; ///< origin ID of attachment or ID from upload response
157  string url; ///< [READ-ONLY] Relative URL from root of web. Eg.: /webmail/api/download/attachment/ba5767a9-7a70-4c90-a6bf-dc8dd62e259c/14/0-1-0-1/picture.jpg
158 };
159 
160 
161 /**
162  * Personal Contact detail.
163  */
165  string commonName;
166  string firstName;
167  string middleName;
168  string surName;
169  string titleBefore;
170  string titleAfter;
171  string nickName;
172 
173  string phoneNumberWorkVoice;
174  string phoneNumberMobile;
175 
176  PostalAddress postalAddressWork;
177  string urlWork;
178 
179  UtcDateTime birthDay;
180  UtcDateTime anniversary;
181  string companyName;
182  string departmentName;
183  string profession;
184  string managerName;
185  string assistantName;
186  string comment;
187  string IMAddress;
188  PhotoAttachment photo;
189 
190  boolean isReadOnly;
191  EmailAddressList emailAddresses;
192 };
193 
194 typedef sequence<PersonalContact> PersonalContactList;
195 
196 
197 }; }; }; // end of namespace
198 
199 /**
200  * @}
201  */