zimbra_wsdl 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +18 -0
- data/Gemfile +4 -0
- data/LICENSE +22 -0
- data/README.md +70 -0
- data/Rakefile +10 -0
- data/doc/ZPL.txt +492 -0
- data/doc/soap-admin.txt +2507 -0
- data/doc/soap-calendar.txt +1357 -0
- data/doc/soap-context-extension.txt +58 -0
- data/doc/soap-im.txt +570 -0
- data/doc/soap-mobile.txt +136 -0
- data/doc/soap-right.txt +806 -0
- data/doc/soap-waitset.txt +347 -0
- data/doc/soap-wiki.txt +290 -0
- data/doc/soap.txt +3554 -0
- data/examples/savon.rb +27 -0
- data/examples/zimbra_authentication_example.rb +3 -0
- data/lib/zimbra.wsdl +1144 -0
- data/lib/zimbra_wsdl/version.rb +3 -0
- data/lib/zimbra_wsdl.rb +19 -0
- data/spec/minitest_helper.rb +8 -0
- data/spec/zimbra_wsdl_spec.rb +11 -0
- data/zimbra_wsdl.gemspec +19 -0
- metadata +87 -0
@@ -0,0 +1,58 @@
|
|
1
|
+
Context extension allows adding extended information to the soap context header. Server applications may choose to add extensions to any soap response. Client should take advantage of extensions it understands while ignore ones it doesn't. In addition, client should not expect a particular extension present in every response.
|
2
|
+
|
3
|
+
Each extension should be a direct child element of <context> soap header and may have a namespace different from "urn:zimbra". For example, the following shows two extensions, extention1 and extension2, present in the FooResponse context header:
|
4
|
+
|
5
|
+
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
|
6
|
+
<soap:Header>
|
7
|
+
<context xmlns="urn:zimbra">
|
8
|
+
<sessionId id="{session-id}"/>
|
9
|
+
<change token="{change-id}"/>
|
10
|
+
<refresh>...</refresh>
|
11
|
+
<notify seq="{sequence-number}">...</notify>
|
12
|
+
<extension1 xmlns="ext1Namespace">...</extension1>
|
13
|
+
<extension2 xmlns="ext2Namespace">...</extension2>
|
14
|
+
</context>
|
15
|
+
<soap:/Header>
|
16
|
+
<soap:Body>
|
17
|
+
<FooResponse>...</FooResponse>
|
18
|
+
</soap:Body>
|
19
|
+
</soap:Envelope>
|
20
|
+
|
21
|
+
================
|
22
|
+
zdsync extension
|
23
|
+
================
|
24
|
+
|
25
|
+
This extension is used by zdesktop to carry sync status information in soap responses so that web client can properly inform user of mailbox sync status. It is only present when server is running as zdesktop backend. zdsync usually is added to every single soap response. It has the following structure:
|
26
|
+
|
27
|
+
<zdsync xmlns="urn:zimbraOffline">
|
28
|
+
[(<account name="{NAME}" id="{ID}" status="{STATUS}" lastsync="{LASTSYNC}" unread="{INBOX_UNREAD_COUNT}">
|
29
|
+
[<error [message="{MESSAGE}"]>
|
30
|
+
[<exception>{EXCEPTION}</exception>]
|
31
|
+
</error>]
|
32
|
+
</account>)*]
|
33
|
+
</zdsync>
|
34
|
+
|
35
|
+
where
|
36
|
+
|
37
|
+
{NAME} -- name of account (email)
|
38
|
+
{ID} -- account ID
|
39
|
+
|
40
|
+
{STATUS} -- choice of unknown|offline|online|running|authfail|error, where
|
41
|
+
unknown: no sync run yet since last server start
|
42
|
+
offline: can't reach remote server, most likely network connection is down
|
43
|
+
online: last sync was successful
|
44
|
+
running: a sync with remote server is in progress
|
45
|
+
authfail: authentication failed in last sync attempt
|
46
|
+
error: last sync encountered an error other than network or authentication problems
|
47
|
+
|
48
|
+
{LASTSYNC} -- timestamp in epoch milliseconds at the end of the last successful sync which could be initial sync or delta sync. 0 means initial sync is not complete (could be running or have encountered error).
|
49
|
+
|
50
|
+
{INBOX_UNREAD_COUNT} -- the number of unread messages in Inbox of the account.
|
51
|
+
|
52
|
+
{MESSAGE} -- human readable error message in English. Note, this is more a debugging aid and client is discouraged to display this directly to user.
|
53
|
+
|
54
|
+
{EXCEPTION} -- exception stack trace associated with the last sync error
|
55
|
+
|
56
|
+
NOTE: <error> is only present when {STATUS} is ERROR, and is cleared when {STATUS} changes to anything else such as running. It is possible that a client may see the same <error> in multiple soap responses if no sync has been attempted between two client requests. Client should avoid alerting the user of the same error multiple times.
|
57
|
+
|
58
|
+
NOTE: The <zdsync> block may contain status of more than one account. If an account is not present, client should assume that account remains the previous status.
|
data/doc/soap-im.txt
ADDED
@@ -0,0 +1,570 @@
|
|
1
|
+
IM Soap API Reference
|
2
|
+
=======================
|
3
|
+
|
4
|
+
A few terms:
|
5
|
+
|
6
|
+
ROSTER: your list of buddies
|
7
|
+
|
8
|
+
CHAT: an ongoing threaded conversation between you and one or more
|
9
|
+
other participants. Some chats are 1:1 and some are multi-user (part
|
10
|
+
of a conference room)
|
11
|
+
|
12
|
+
GATEWAY: a service that allows the user to connect to 3rd party IM
|
13
|
+
services, e.g. the Yahoo! IM service.
|
14
|
+
|
15
|
+
ROLE: In MUC chat, this is something you have while you're IN the chat room
|
16
|
+
- Moderator, None, Participant, Visitor
|
17
|
+
|
18
|
+
AFFILIATION: in MUC chat, a description of the rights you have to the room, not
|
19
|
+
related to being actually "in" the room.
|
20
|
+
- Owner, Admin, Member, Outcast, None
|
21
|
+
|
22
|
+
|
23
|
+
------------------------------------------
|
24
|
+
|
25
|
+
Additional IM error codes (see soap.txt for explanation of error
|
26
|
+
codes):
|
27
|
+
|
28
|
+
im.INVALID_ADDRESS - IM address is invalid (missing @ sign and
|
29
|
+
not able to find in default domain)
|
30
|
+
|
31
|
+
|
32
|
+
------------------------------------------
|
33
|
+
|
34
|
+
|
35
|
+
|
36
|
+
IMGetRoster -- get buddy list
|
37
|
+
-----------
|
38
|
+
<IMGetRosterRequest/>
|
39
|
+
|
40
|
+
<IMGetRosterResponse>
|
41
|
+
<presence SEE BELOW/> // MY current presence value
|
42
|
+
|
43
|
+
<chats>
|
44
|
+
[ // 0 or more active chats
|
45
|
+
<chat thread="threadID">
|
46
|
+
<pcps> // participants in this chat
|
47
|
+
[<p id="num" addr="address" [me="1"] [fulladdr="full_address_if_avail"]
|
48
|
+
[name="friendly_name"] [role="ROLE"] [affiliation="AFFILIATION"]/>]*
|
49
|
+
</pcps>
|
50
|
+
</chat>
|
51
|
+
]*
|
52
|
+
</chats>
|
53
|
+
|
54
|
+
Roster data is sent asynchronously from the server (see "Asynchronous Roster Response" below)
|
55
|
+
in the next notification block.
|
56
|
+
|
57
|
+
</IMGetRosterResponse>
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
IMSubscribe -- subscribe to someone's presence / modify subscription
|
62
|
+
-----------
|
63
|
+
<IMSubscribeRequest addr="foo@bar.com" [name="friendly name"] [groups="group,group..."] [op="add|remove"]/>
|
64
|
+
|
65
|
+
// If the user specified an alias, the server will resolve the alias
|
66
|
+
// to a canonical address -- and add the canonical address to the
|
67
|
+
// Buddy List. The addr returned might be different than the
|
68
|
+
// requested addr
|
69
|
+
<IMSubscribeResponse addr="might-be-different@domain.com"/>
|
70
|
+
|
71
|
+
|
72
|
+
IMAuthorizeSubscribe -- used to OK another user adding you to their buddy list
|
73
|
+
-------------------- send this in response to a <subscribe> notification
|
74
|
+
Optionally, add this user to my buddy list as well
|
75
|
+
|
76
|
+
<IMAuthorizeSubscribeRequest addr="foo@bar.com" authorized="true|false"
|
77
|
+
[add="true|false" name="nickname" groups="group,group..."]/>
|
78
|
+
<IMAuthorizeSubscribeResponse/>
|
79
|
+
|
80
|
+
|
81
|
+
IMSetPresence -- modify your presence state
|
82
|
+
-------------
|
83
|
+
<IMSetPresenceRequest [idle="seconds_idle"]>
|
84
|
+
[
|
85
|
+
<presence [lang="en"] [show="away|chat|dnd|xa|online|offline"] [priority="0-255"] [status="CUSTOM_STATUS"]/>
|
86
|
+
]+ // if multiple, each must have a different lang
|
87
|
+
</IMSetPresenceRequest>
|
88
|
+
|
89
|
+
<IMSetPresenceResponse>
|
90
|
+
|
91
|
+
|
92
|
+
IMSendMessage -- send a new message, optional chat parameter
|
93
|
+
-------------
|
94
|
+
To an existing chat:
|
95
|
+
<IMSendMessageRequest>
|
96
|
+
<message thread="threadID">
|
97
|
+
[<subject [lang="LANGUAGE"]>
|
98
|
+
Plaintext Subject
|
99
|
+
</subject>]* // HTML
|
100
|
+
<body>
|
101
|
+
<text>
|
102
|
+
PLAINTEXT
|
103
|
+
</text>
|
104
|
+
[ <html>
|
105
|
+
HTML text (xhtml required: balance tags)
|
106
|
+
</html>]
|
107
|
+
[<typing/>]
|
108
|
+
</body>
|
109
|
+
</message>
|
110
|
+
</IMSendMessageRequest>
|
111
|
+
|
112
|
+
...OR create a new chat:
|
113
|
+
<IMSendMessageRequest>
|
114
|
+
<message addr="foo@bar.com">
|
115
|
+
[<subject [lang="LANGUAGE"]>SUBJECT</subject>]* // HTML
|
116
|
+
[<body [lang="LANGUAGE">BODY</body>] // HTML
|
117
|
+
[<typing/>]
|
118
|
+
</message>
|
119
|
+
</IMSendMessageRequest>
|
120
|
+
|
121
|
+
<IMSendMessageResponse thread="thread id"/>
|
122
|
+
|
123
|
+
**Send a blank message to indicate/stop typing indicator by itself**
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
IMGetChat -- return the chat history (param = num messages)
|
128
|
+
---------
|
129
|
+
<IMGetChatRequest thread="threadID" [seq="1st-sequence-to-retrieve"]/>
|
130
|
+
|
131
|
+
// chat unknown (server restart? server flushed it due to idleness?)
|
132
|
+
<IMGetChatResponse thread="threadID" error="not_found"/>
|
133
|
+
|
134
|
+
// chat known:
|
135
|
+
<IMGetChatResponse>
|
136
|
+
<chat thread="threadID">
|
137
|
+
<pcps> // PARTICIPANT
|
138
|
+
<p id="num" addr="address" [me="1"] [fulladdr="full_address_if_avail"]
|
139
|
+
[name="friendly_name"] [role="ROLE"] [affiliation="AFFILIATION"]/>*
|
140
|
+
</pcps>
|
141
|
+
<messages>
|
142
|
+
<message seq="sequence-number" ts="timestamp" from="id">
|
143
|
+
[<subject [lang="LANGUAGE"]>SUBJECT</subject>]* // HTML
|
144
|
+
[<body [lang="LANGUAGE">PLAINTEXT BODY</body>] // plaintext
|
145
|
+
[<html>HTML BODY</html>]
|
146
|
+
</message>
|
147
|
+
</messages>
|
148
|
+
</chat>
|
149
|
+
</IMGetChatResponse>
|
150
|
+
|
151
|
+
|
152
|
+
IMJoinConferenceRoom
|
153
|
+
---------------------
|
154
|
+
-- This API joins specified conference room, creating it if it didn't
|
155
|
+
already exists.
|
156
|
+
-- The API returns a CHAT. The <IMGetChatConfiguration>,
|
157
|
+
<IMModifyChatRequest>, and <IMGetChat> APIs can be used on that
|
158
|
+
chat.
|
159
|
+
-- Use the "threadID" paremeter to <IMSendMessageRequest> to send a
|
160
|
+
message to this existing chat.
|
161
|
+
|
162
|
+
<IMJoinConferenceRoomRequest [nickname="nickname] [password="password"] [thread="threadId"] addr="chatAddr"/>
|
163
|
+
|
164
|
+
addr: the full address of the room. This should be of the form
|
165
|
+
ROOMNAME@CONFERENCE_SERVICE - eg
|
166
|
+
myroom@conference.myhost.com See IMListConferenceRooms
|
167
|
+
as a way to get a list of CONFERENCE_SERVICEs available
|
168
|
+
|
169
|
+
thread: used for converting a 1:1 chat into a MUC
|
170
|
+
|
171
|
+
nickname: the "nickname" used for you in the room. All users
|
172
|
+
in a room are required to have a unique nickname in
|
173
|
+
that room. If you don't specify one, the server will
|
174
|
+
use your bare username (the part of your name before
|
175
|
+
the @ sign) as your nickname. If you get a
|
176
|
+
"NicknameConflict" response, you will have to try a
|
177
|
+
different name.
|
178
|
+
|
179
|
+
password: used to enter password-protected rooms
|
180
|
+
|
181
|
+
<IMJoinConferenceRoomResponse thread="threadId" status="STATUS1,STATUS2,..." [error="ERROR"]
|
182
|
+
|
183
|
+
-- If the "NewRoomCreated" status is set, then this is a new room and
|
184
|
+
you're the owner! The room is created in the "locked" state until
|
185
|
+
configured. You need to (at the very least) send an
|
186
|
+
<IMModifyChat op=configure> request to the room in order to allow
|
187
|
+
other people to enter the room
|
188
|
+
|
189
|
+
STATUS codes:
|
190
|
+
NewRoomCreated // this is a NEW, LOCKED, ROOM. You must configure it.
|
191
|
+
|
192
|
+
// These are all informational, for future use only. You can ignore them
|
193
|
+
// for now:
|
194
|
+
EnteringRoomJIDAvailable
|
195
|
+
AffiliationChange
|
196
|
+
ShowsUnavailableMembers
|
197
|
+
DoesNotShowUnavailableMembers
|
198
|
+
ConfigurationChange
|
199
|
+
OccupantPresence
|
200
|
+
LoggingEnabled
|
201
|
+
LoggingDisabled
|
202
|
+
NonAnonymous
|
203
|
+
SemiAnonymous
|
204
|
+
FullyAnonymous
|
205
|
+
RoomnickChanged // your nickname is assigned or changed
|
206
|
+
YouHaveBeenBanned // 301 - you have been banned
|
207
|
+
NewRoomNickname // 303
|
208
|
+
KickedFromRoom // 307 -- you have been kicked from room
|
209
|
+
RemovedForAffiliationChange // 321 - you have been removed b/c your affiliation changed
|
210
|
+
RemovedForMembersOnly // 322 - room is now members-only, and you aren't a member
|
211
|
+
RemovedShutdown // 332 - system or conference service is shutting down
|
212
|
+
|
213
|
+
ERROR codes:
|
214
|
+
PasswordRequired - couldn't enter room password required
|
215
|
+
Banned - room owner has banned you from the room
|
216
|
+
NoSuchRoom -
|
217
|
+
NotAllowed - Room doesn't exist, and you're not allowed to create a new one
|
218
|
+
MustUseReservedRoomnick -
|
219
|
+
NotAMember - Room is invite-only, and you aren't a member
|
220
|
+
NicknameConflict - Someone else is already using your nickname
|
221
|
+
MaxUsers - Room has reached capacity
|
222
|
+
Unknown
|
223
|
+
|
224
|
+
**also look for notification: <n type="enteredchat" thread="threadId"/>**
|
225
|
+
|
226
|
+
|
227
|
+
IMGetChatConfiguration
|
228
|
+
-----------------------
|
229
|
+
Get all configuration information about the specified chat. Note that
|
230
|
+
1:1 chats will have almost no configuration while MUC chats have many config
|
231
|
+
|
232
|
+
<IMGetChatConfiguration (thread="threadId" || addr="address") [requestOwnerConfig="1"]/>
|
233
|
+
|
234
|
+
thread: a threadId from a chat you have already joined (see IMJoinChat)
|
235
|
+
|
236
|
+
addr: a direct address for the conference room (e.g. roomname@conference.domain.com)
|
237
|
+
|
238
|
+
requestOwnerConfig: if TRUE, then attempt to get the "owner's" config for the room, all values private or public.
|
239
|
+
you can only get the owner's config for a room you have joined (thread specified)
|
240
|
+
you can only get the owner's config if you are an owner of the room
|
241
|
+
|
242
|
+
|
243
|
+
<IMGetChatConfifurationResponse (thread="threadId" || addr="address") isMuc="1|0" error="ERROR_CODE"/>
|
244
|
+
ERROR_CODES:
|
245
|
+
not_allowed: you requested the owner config information but you are not an owner of this room
|
246
|
+
no_response_from_remote: the conference service did not respond to our requests
|
247
|
+
not_a_conference_room: the requested conference room doesn't exist, or you don't have permission to access it in that way
|
248
|
+
|
249
|
+
<IMGetChatConfigurationResponse (thread="threadId" || addr="address") isMUC="1|0">
|
250
|
+
[<var name="name">VALUE</var>]*
|
251
|
+
[
|
252
|
+
<var name="name" multi="1">
|
253
|
+
[<value>VALUE</value>]+
|
254
|
+
</var>
|
255
|
+
]*
|
256
|
+
</IMGetChatConfigurationResponse>
|
257
|
+
|
258
|
+
isMUC: if TRUE then this is a chatroom, otherwise it is a 1:1 chat
|
259
|
+
|
260
|
+
|
261
|
+
Config Vars:
|
262
|
+
------------
|
263
|
+
open boolean room is unlocked and may be entered?
|
264
|
+
creationdate string date this room was created
|
265
|
+
publicroom boolean room is hidden from RoomList
|
266
|
+
moderated boolean chat is moderated
|
267
|
+
persistent boolean room not deleted if server restarts
|
268
|
+
membersonly boolean only members may join, only admins can invite
|
269
|
+
nonanonymous boolean if TRUE, then users are not anonymous
|
270
|
+
semianonymous boolean no idea what this means
|
271
|
+
passwordprotect boolean is a password required to join
|
272
|
+
password string the password for the room (make sure you set
|
273
|
+
passwordprotect to be '1' if you want the password
|
274
|
+
enabled)
|
275
|
+
numoccupants integer number of people currently in the room
|
276
|
+
maxusers integer max # users allowed
|
277
|
+
longname string natural language name of room - this is the
|
278
|
+
'name' returned for the room via <IMListConferenceRooms>
|
279
|
+
description string short description of room
|
280
|
+
|
281
|
+
subject string current subject in room
|
282
|
+
subjectmodifyable boolean can the subject be modified by participants?
|
283
|
+
|
284
|
+
allowinvites boolean allow Occupants to invite others
|
285
|
+
|
286
|
+
presencebroadcast MULTI-string list of Roles which get presence updates
|
287
|
+
|
288
|
+
whois MULTI-string list of Affiliations who may discover real JIDs of Occupants
|
289
|
+
owners MULTI-string list of room owners (can change config)
|
290
|
+
admins MULTI-string list of users with ADMIN affiliation
|
291
|
+
|
292
|
+
enablelogging boolean log room conversations
|
293
|
+
reservednick boolean only login with registered nickname?
|
294
|
+
canchangenick boolean allow occupants to change nicknames
|
295
|
+
allowregister boolean allow users to register with the room
|
296
|
+
|
297
|
+
|
298
|
+
FUTRUE - either don't work, or I haven't verified they work...but they're in the XMPP spec
|
299
|
+
------
|
300
|
+
getmemberlist MULTI-string list of Roles/Affiliations that may retrieve member list
|
301
|
+
contactid string - extended - roominfo_contactjid = contact address for room
|
302
|
+
logs_url string - extended - roominfo_logs - URL for archived discussions from room
|
303
|
+
|
304
|
+
|
305
|
+
|
306
|
+
IMModifyChat -- add/remove users from multi-user chat, adjust save preferences, etc
|
307
|
+
------------
|
308
|
+
<IMModifyChatRequest thread="threadId" op="close"/>
|
309
|
+
<IMModifyChatRequest thread="threadId" op="adduser" addr="address>INVITATION_MESSAGE</IMModifyChatRequest>
|
310
|
+
|
311
|
+
<IMModifyChatRequest thread="threadId" op="configure">
|
312
|
+
[<var name="name">VALUE</var>]*
|
313
|
+
[<var name="name" multi="1">[<value>VALUE</value>]*</var>]*
|
314
|
+
</IMModifyChatRequest>
|
315
|
+
--- see IMGetChatConfiguration for list of supported variables
|
316
|
+
|
317
|
+
RESPONSES:
|
318
|
+
|
319
|
+
<IMModifyChatResponse thread="threadID" error="not_found"/>
|
320
|
+
// chat unknown (server restart? server flushed it due to idleness?)
|
321
|
+
// use <IMJoinConferenceRoomRequest> to join/create a MUC
|
322
|
+
|
323
|
+
<IMModifyChatResponse thread="threadID" error="not_allowed"/>
|
324
|
+
// you do not have permission to modify this chat (not owner/admin)
|
325
|
+
|
326
|
+
// successful
|
327
|
+
<IMModifyChatResponse thread="threadId"/>
|
328
|
+
|
329
|
+
|
330
|
+
IMGetPrivacyList -- request the privacy list
|
331
|
+
-----------------
|
332
|
+
<IMGetPrivacyListRequest [name="list_name"]/> // gets default list if
|
333
|
+
// no name specified
|
334
|
+
// response in 'privacy' notification below
|
335
|
+
<IMGetPrivacyListResponse/>
|
336
|
+
|
337
|
+
|
338
|
+
IMSetPrivacyList -- sets the list
|
339
|
+
-------------------
|
340
|
+
<IMSetPrivacyListRequest>
|
341
|
+
<list [name="name"]> // use default list if no name specified
|
342
|
+
[
|
343
|
+
// Entries are evaluated by the server in increasing order (1 then 2 then 3 ...)
|
344
|
+
//
|
345
|
+
// EG, this will allow 'foo@bar.com' but block all others @bar.com:
|
346
|
+
// <item action="allow" order="1" addr="foo@bar.com"/>
|
347
|
+
// <item action="deny" order="2" addr="bar.com"/>
|
348
|
+
//
|
349
|
+
<item action="allow|deny" order="UNIQUE_POSITIVE_INTEGER" addr="address OR domain"/>
|
350
|
+
]*
|
351
|
+
</list>
|
352
|
+
</IMSetPrivacyListRequest>
|
353
|
+
|
354
|
+
<IMSetPrivacyListResponse/>
|
355
|
+
|
356
|
+
|
357
|
+
IMGatewayList - gateways to external IM services
|
358
|
+
--------------
|
359
|
+
<IMGatewayListRequest/>
|
360
|
+
|
361
|
+
|
362
|
+
<IMGatewayListResponse>
|
363
|
+
<service name="name" type="aim|msn|yahoo|icq" domain="type.mydomain.com">
|
364
|
+
[ <registration name="remoteName" state="connectionState" [timeUntilNextConnect="msec_until_next_connect_attempt"/> ] ]
|
365
|
+
</service>
|
366
|
+
</IMGatewayListResponse/>
|
367
|
+
|
368
|
+
connectedState is one of:
|
369
|
+
bad_auth -- auth is bad, will not try to reconnect
|
370
|
+
intentionally_offline -- user's local im presence is "offline" so not connected
|
371
|
+
disabled -- the user's account has been disabled, we will not try to reconnect
|
372
|
+
(this is probably b/c we detected the user logged into the service
|
373
|
+
directly from another location)
|
374
|
+
online
|
375
|
+
shutdown -- shutting down
|
376
|
+
start -- just created, will attempt first connect soon
|
377
|
+
trying_to_connect -- connection attempt in progress
|
378
|
+
NOT_IMPLEMENTED_YET: booted_by_other_login -- will not retry connect: someone has connected to our account has connected from another place
|
379
|
+
|
380
|
+
IMGatewayRegister
|
381
|
+
-----------------
|
382
|
+
<IMGatewayRegisterRequest op="reg" service="SERVICE_NAME" name="remoteName" password="remotePassword"/>
|
383
|
+
<IMGatewayRegisterRequest op="unreg" service="SERVICE_NAME"/>
|
384
|
+
<IMGatewayRegisterRequest op="reconnect" service="SERVICE_NAME"/> // tell the service to try a reconnect right now, also re-enable if the service was in the disabled state
|
385
|
+
|
386
|
+
<IMGatewayRegisterResponse result="0|1"/>
|
387
|
+
|
388
|
+
|
389
|
+
IMSetIdle
|
390
|
+
-----------------
|
391
|
+
<IMSetIdleRequest isIdle="1|0" idleTime="seconds_idle"/>
|
392
|
+
<IMSetIdleResponse/>
|
393
|
+
|
394
|
+
-- idleTime is number of seconds since last user action. Client should
|
395
|
+
make a best-effort to calculate this, but is free to return "0" if
|
396
|
+
unsupported.
|
397
|
+
|
398
|
+
-- Throws ServiceException.SESSION_REQUIRED if there is no session
|
399
|
+
referenced (a session MUST be active for this API to be used)
|
400
|
+
|
401
|
+
When calculating presence, the sever will look at the "idle" values of
|
402
|
+
all active web client sessions. If all sessions are "idle" then the
|
403
|
+
server will update the user's status to "away".
|
404
|
+
|
405
|
+
The web client must be careful to unset the "idle" status when the
|
406
|
+
user comes back, otherwise the user's presence will be stuck in the
|
407
|
+
"Away" state and the user won't understand why.
|
408
|
+
|
409
|
+
|
410
|
+
============================================
|
411
|
+
CONFERENCE APIS
|
412
|
+
- A "conference service" can host one or more Conferences. A user
|
413
|
+
can join a Conference (thereby creating a "Chat")
|
414
|
+
============================================
|
415
|
+
See: IMJoinConferenceRoomRequest
|
416
|
+
See: IMModifyChatRequest
|
417
|
+
See: IMGetChatConfiguration
|
418
|
+
|
419
|
+
|
420
|
+
IMListConferenceServices
|
421
|
+
-------------------------
|
422
|
+
- List all the known conference services within our cloud
|
423
|
+
|
424
|
+
<IMListConferenceServicesRequest/>
|
425
|
+
<IMListConferenceServicesResponse>
|
426
|
+
<svc name="SERVICE_NAME" addr="SERVICE_ADDRESS"/>
|
427
|
+
</IMListConferenceServicesResponse>
|
428
|
+
|
429
|
+
List all the known conference services (MUC servers)
|
430
|
+
|
431
|
+
|
432
|
+
IMListConferenceRooms
|
433
|
+
----------------------
|
434
|
+
- List all the rooms currently active in a given conference service
|
435
|
+
|
436
|
+
<IMListConferenceRoomsRequest/>
|
437
|
+
<IMListConferenceRoomsResponse>
|
438
|
+
<room name="ROOM_NAME" addr="ROOM_ADDRESS"/>
|
439
|
+
</IMListConferenceRoomsResponse>
|
440
|
+
|
441
|
+
List all the available conference rooms on the requested server.
|
442
|
+
Rooms can be joined via the <IMJoinConferenceRoomRequest> API.
|
443
|
+
|
444
|
+
|
445
|
+
|
446
|
+
============================================================
|
447
|
+
IM NOTIFICATIONS
|
448
|
+
============================================================
|
449
|
+
|
450
|
+
//
|
451
|
+
// In soap header block (see soap.txt):
|
452
|
+
//
|
453
|
+
[<soap:Header>
|
454
|
+
<context xmlns="urn:zimbra">
|
455
|
+
...
|
456
|
+
<notify>
|
457
|
+
[<deleted.../>]
|
458
|
+
[<created.../>]
|
459
|
+
[<modified.../>]
|
460
|
+
[
|
461
|
+
<im>
|
462
|
+
[
|
463
|
+
// Asynchronous Roster Response
|
464
|
+
<n type="roster">
|
465
|
+
[<n type="subscribed"...>]* // see "subscribed" notification below
|
466
|
+
[<n type="unsubscribed"...>]* // see "unsubscribed" notification below
|
467
|
+
...
|
468
|
+
</n>
|
469
|
+
]?
|
470
|
+
|
471
|
+
'ask' means we are pending a response to our request to subscribe/unsubscribe
|
472
|
+
---> EG: (subscription="none" ask="subscribe") means we're waiting
|
473
|
+
for a response to subscribe, but we haven't received one yet
|
474
|
+
[
|
475
|
+
<n type="subscribed" to="TOADDR" name="NAME" groups="GROUPS" [ask="subscribe|unsubscribe"]/> // subscription is ACTIVE (you are receiving their presence)
|
476
|
+
]*
|
477
|
+
[
|
478
|
+
<n type="unsubscribed" to="TOADDR" name="NAME" groups="GROUPS" [ask="subscribe|unsubscribe"]/> // subscription is NOT ACTIVE (you are NOT currently receiving their presence information)
|
479
|
+
]*
|
480
|
+
[
|
481
|
+
// NEW MESSAGE RECEIVED:
|
482
|
+
<n type="message" from="address" thread="chat-id" ts="TIMESTAMP" [error="MESSAGE_ERROR_CONDITION"]>
|
483
|
+
[<subject [lang="LANG"]>SUBJECT</subject>]
|
484
|
+
[<body [lang="LANG"] html="1|0">BODY</body>]
|
485
|
+
[<typing/>]
|
486
|
+
</n>
|
487
|
+
]*
|
488
|
+
[
|
489
|
+
// Presence update for a specific user
|
490
|
+
<n type="presence" from="FROMADDR" [lang="en"] [show="away|chat|dnd|xa"] [priority="0-255"] [status="STATUS"]/>
|
491
|
+
]*
|
492
|
+
[
|
493
|
+
// User wants to add you to their buddy list (see <AuthorizeSubscribe> above)
|
494
|
+
<n type="subscribe" from="FROMADDR"/>
|
495
|
+
]*
|
496
|
+
[
|
497
|
+
<n type="enteredchat" thread="chat-id" addr="ADDRESS"> // specified user entered the chat
|
498
|
+
<p id="num" addr="address" [me="1"] [fulladdr="full_address_if_avail"]
|
499
|
+
[name="friendly_name"] [role="ROLE"] [affiliation="AFFILIATION"]/>
|
500
|
+
</n>
|
501
|
+
]*
|
502
|
+
[
|
503
|
+
<n type="chatpresence" thread="chat-id" addr="ADDRESS" role="ROLE" affiliation="AFFILIATION"> // presence update for chat user
|
504
|
+
<p id="num" addr="address" [me="1"] [fulladdr="full_address_if_avail"]
|
505
|
+
[name="friendly_name"] [role="ROLE"] [affiliation="AFFILIATION"]/>
|
506
|
+
</n>
|
507
|
+
]*
|
508
|
+
[
|
509
|
+
<n type="leftchat" [me="1"] thread="chat-id" addr="ADDRESS"/> // specified user left the chat
|
510
|
+
]*
|
511
|
+
[
|
512
|
+
<n type="chatclosed" thread="chat-id"/> // specified chat has been closed
|
513
|
+
]*
|
514
|
+
[
|
515
|
+
// An invitation to join a group chat:
|
516
|
+
<n type="invited" thread="chat-id" addr="ADDRESS">INVITATION_MESSAGE</n>
|
517
|
+
]*
|
518
|
+
[
|
519
|
+
// interop gateway has succeeded/failed to connect us, see <IMGatewayListResponse> above for more info
|
520
|
+
<n type="gwStatus" service="GATEWAY_SERVICE_NAME" state="connectedState SEE ABOVE" [timeUntilNextConnect="msec_until_next_connect_attempt"/> ] />
|
521
|
+
]*
|
522
|
+
[
|
523
|
+
// your account has connected to the interop service from another location
|
524
|
+
<n type="otherLocation" service="GATEWAY_SERVICE_NAME" username="REMOTE_SERVICE_USERNAME"/>
|
525
|
+
]
|
526
|
+
[
|
527
|
+
// privacy (block/allow) list
|
528
|
+
<n type="privacy">
|
529
|
+
<list name="name">
|
530
|
+
[
|
531
|
+
<item action="deny" order="UNIQUE_POSITIVE_INTEGER" addr="address OR domain"/>
|
532
|
+
]*
|
533
|
+
</list>
|
534
|
+
</n>
|
535
|
+
]
|
536
|
+
</im>]
|
537
|
+
]?
|
538
|
+
</notify>]
|
539
|
+
|
540
|
+
|
541
|
+
MESSAGE_ERROR_CONDITIONS:
|
542
|
+
forbidden
|
543
|
+
|
544
|
+
internal_server_error
|
545
|
+
|
546
|
+
item_not_found - user not found (usually NOT sent
|
547
|
+
|
548
|
+
jid_malformed - address is malformed
|
549
|
+
|
550
|
+
not_acceptable - server didn't like your message
|
551
|
+
(e.g. bad-word filter rejected it)
|
552
|
+
|
553
|
+
not_allowed - you're not allowed to send a message there
|
554
|
+
|
555
|
+
payment_required
|
556
|
+
|
557
|
+
recipient_unavailable - that user is temporarily unavailable
|
558
|
+
|
559
|
+
redirect - that user is at a different address
|
560
|
+
|
561
|
+
remote_server_not_found - could not contact the user's domain
|
562
|
+
|
563
|
+
remote_server_timeout
|
564
|
+
|
565
|
+
resource_constraint - the system is too busy right now
|
566
|
+
|
567
|
+
service_unavailable - messages are not accepted by the service
|
568
|
+
|
569
|
+
undefined_condition
|
570
|
+
|