MongooseIM GraphQL API Reference

A static documentation of the MongooseIM GraphQL User API

API Endpoints
http://localhost:5561/api/graphql

Queries

account

Description

Account management

Response

Returns an AccountUserQuery

Example

Query
query account {
  account {
    field
  }
}
Response
{"data": {"account": {"field": false}}}

checkAuth

Description

Check authorization status

Response

Returns a UserAuthInfo

Example

Query
query checkAuth {
  checkAuth {
    username
    authStatus
  }
}
Response
{
  "data": {
    "checkAuth": {
      "username": "alice",
      "authStatus": "AUTHORIZED"
    }
  }
}

last

Description

Last activity management

Response

Returns a LastUserQuery

Example

Query
query last {
  last {
    getLast {
      ...LastActivityFragment
    }
  }
}
Response
{"data": {"last": {"getLast": LastActivity}}}

muc

Description

MUC room management

Response

Returns a MUCUserQuery

Example

Query
query muc {
  muc {
    listRooms {
      ...MUCRoomsPayloadFragment
    }
    getRoomConfig {
      ...MUCRoomConfigFragment
    }
    listRoomUsers {
      ...MUCRoomUserFragment
    }
    listRoomAffiliations {
      ...MUCRoomAffiliationFragment
    }
    getRoomMessages {
      ...StanzasPayloadFragment
    }
  }
}
Response
{
  "data": {
    "muc": {
      "listRooms": MUCRoomsPayload,
      "getRoomConfig": MUCRoomConfig,
      "listRoomUsers": [MUCRoomUser],
      "listRoomAffiliations": [MUCRoomAffiliation],
      "getRoomMessages": StanzasPayload
    }
  }
}

muc_light

Description

MUC Light room management

Response

Returns a MUCLightUserQuery

Example

Query
query muc_light {
  muc_light {
    getRoomMessages {
      ...StanzasPayloadFragment
    }
    getRoomConfig {
      ...RoomFragment
    }
    listRoomUsers {
      ...RoomUserFragment
    }
    listRooms
    getBlockingList {
      ...BlockingItemFragment
    }
  }
}
Response
{
  "data": {
    "muc_light": {
      "getRoomMessages": StanzasPayload,
      "getRoomConfig": Room,
      "listRoomUsers": [RoomUser],
      "listRooms": ["alice@localhost"],
      "getBlockingList": [BlockingItem]
    }
  }
}

private

Description

User's private storage management

Response

Returns a PrivateUserQuery

Example

Query
query private {
  private {
    getPrivate
  }
}
Response
{
  "data": {
    "private": {
      "getPrivate": "<message to='bob@localhost' type='chat' from='alice@localhost'><body>Hi!</body></message>"
    }
  }
}

roster

Description

Roster/Contacts management

Response

Returns a RosterUserQuery

Example

Query
query roster {
  roster {
    listContacts {
      ...ContactFragment
    }
    getContact {
      ...ContactFragment
    }
  }
}
Response
{
  "data": {
    "roster": {
      "listContacts": [Contact],
      "getContact": Contact
    }
  }
}

session

Description

Session management

Response

Returns a SessionUserQuery

Example

Query
query session {
  session {
    listResources
    countResources
    listSessions {
      ...SessionFragment
    }
  }
}
Response
{
  "data": {
    "session": {
      "listResources": ["res1"],
      "countResources": 123,
      "listSessions": [Session]
    }
  }
}

stanza

Description

Stanza management

Response

Returns a StanzaUserQuery

Example

Query
query stanza {
  stanza {
    getLastMessages {
      ...StanzasPayloadFragment
    }
  }
}
Response
{"data": {"stanza": {"getLastMessages": StanzasPayload}}}

vcard

Description

Vcard management

Response

Returns a VcardUserQuery

Example

Query
query vcard {
  vcard {
    getVcard {
      ...VcardFragment
    }
  }
}
Response
{"data": {"vcard": {"getVcard": Vcard}}}

Mutations

account

Description

Account management

Response

Returns an AccountUserMutation

Example

Query
mutation account {
  account {
    unregister
    changePassword
  }
}
Response
{
  "data": {
    "account": {
      "unregister": "xyz789",
      "changePassword": "xyz789"
    }
  }
}

httpUpload

Description

Http upload

Response

Returns a HttpUploadUserMutation

Example

Query
mutation httpUpload {
  httpUpload {
    getUrl {
      ...FileUrlsFragment
    }
  }
}
Response
{"data": {"httpUpload": {"getUrl": FileUrls}}}

inbox

Description

Inbox bin management

Response

Returns an InboxUserMutation

Example

Query
mutation inbox {
  inbox {
    flushBin
  }
}
Response
{"data": {"inbox": {"flushBin": 987}}}

last

Description

Last activity management

Response

Returns a LastUserMutation

Example

Query
mutation last {
  last {
    setLast {
      ...LastActivityFragment
    }
  }
}
Response
{"data": {"last": {"setLast": LastActivity}}}

muc

Description

MUC room management

Response

Returns a MUCUserMutation

Example

Query
mutation muc {
  muc {
    createInstantRoom {
      ...MUCRoomDescFragment
    }
    inviteUser
    kickUser
    sendMessageToRoom
    sendPrivateMessage
    deleteRoom
    changeRoomConfiguration {
      ...MUCRoomConfigFragment
    }
    setUserRole
    setUserAffiliation
    enterRoom
    exitRoom
  }
}
Response
{
  "data": {
    "muc": {
      "createInstantRoom": MUCRoomDesc,
      "inviteUser": "xyz789",
      "kickUser": "abc123",
      "sendMessageToRoom": "abc123",
      "sendPrivateMessage": "xyz789",
      "deleteRoom": "abc123",
      "changeRoomConfiguration": MUCRoomConfig,
      "setUserRole": "abc123",
      "setUserAffiliation": "abc123",
      "enterRoom": "abc123",
      "exitRoom": "xyz789"
    }
  }
}

muc_light

Description

MUC Light room management

Response

Returns a MUCLightUserMutation

Example

Query
mutation muc_light {
  muc_light {
    createRoom {
      ...RoomFragment
    }
    changeRoomConfiguration {
      ...RoomFragment
    }
    inviteUser
    deleteRoom
    kickUser
    sendMessageToRoom
    setBlockingList
  }
}
Response
{
  "data": {
    "muc_light": {
      "createRoom": Room,
      "changeRoomConfiguration": Room,
      "inviteUser": "xyz789",
      "deleteRoom": "xyz789",
      "kickUser": "xyz789",
      "sendMessageToRoom": "xyz789",
      "setBlockingList": "xyz789"
    }
  }
}

private

Description

User's private storage management

Response

Returns a PrivateUserMutation

Example

Query
mutation private {
  private {
    setPrivate
  }
}
Response
{
  "data": {
    "private": {
      "setPrivate": "<message to='bob@localhost' type='chat' from='alice@localhost'><body>Hi!</body></message>"
    }
  }
}

roster

Description

Roster/Contacts management

Response

Returns a RosterUserMutation

Example

Query
mutation roster {
  roster {
    addContact
    addContacts
    subscription
    deleteContact
    deleteContacts
  }
}
Response
{
  "data": {
    "roster": {
      "addContact": "abc123",
      "addContacts": ["abc123"],
      "subscription": "abc123",
      "deleteContact": "xyz789",
      "deleteContacts": ["abc123"]
    }
  }
}

stanza

Description

Stanza management

Response

Returns a StanzaUserMutation

Example

Query
mutation stanza {
  stanza {
    sendMessage {
      ...SendStanzaPayloadFragment
    }
    sendMessageHeadLine {
      ...SendStanzaPayloadFragment
    }
    sendStanza {
      ...SendStanzaPayloadFragment
    }
  }
}
Response
{
  "data": {
    "stanza": {
      "sendMessage": SendStanzaPayload,
      "sendMessageHeadLine": SendStanzaPayload,
      "sendStanza": SendStanzaPayload
    }
  }
}

token

Description

OAUTH token management

Response

Returns a TokenUserMutation

Example

Query
mutation token {
  token {
    requestToken {
      ...TokenFragment
    }
    revokeToken
  }
}
Response
{
  "data": {
    "token": {
      "requestToken": Token,
      "revokeToken": "abc123"
    }
  }
}

vcard

Description

Vcard management

Response

Returns a VcardUserMutation

Example

Query
mutation vcard {
  vcard {
    setVcard {
      ...VcardFragment
    }
  }
}
Response
{"data": {"vcard": {"setVcard": Vcard}}}

Subscriptions

stanza

Response

Returns a StanzaUserSubscription

Example

Query
subscription stanza {
  stanza {
    subscribeForMessages {
      ...StanzaMapFragment
    }
  }
}
Response
{"data": {"stanza": {"subscribeForMessages": StanzaMap}}}

Types

AccountUserMutation

Description

Allow user to manage own account.

Fields
Field Name Description
unregister - String Remove an account
changePassword - String Change the password of an account
Arguments
newPassword - String!
Example
{
  "unregister": "xyz789",
  "changePassword": "abc123"
}

AccountUserQuery

Description

Allow user to get information about account.

Fields
Field Name Description
field - Boolean
Example
{"field": false}

Address

Fields
Field Name Description
tags - [AddressTags] Address tags
pobox - String Post office box
extadd - String Extra address data
street - String Street name
locality - String Locality (e.g. city)
region - String Region name
pcode - String Postal code
country - String Country name
Example
{
  "tags": ["HOME"],
  "pobox": "abc123",
  "extadd": "xyz789",
  "street": "xyz789",
  "locality": "abc123",
  "region": "xyz789",
  "pcode": "xyz789",
  "country": "xyz789"
}

AddressInput

Fields
Input Field Description
tags - [AddressTags!] Address tags
pobox - String Post office box
extadd - String Extra address data
street - String Street name
locality - String Locality (e.g. city)
region - String Region name
pcode - String Postal code
country - String Country name
Example
{
  "tags": ["HOME"],
  "pobox": "abc123",
  "extadd": "abc123",
  "street": "abc123",
  "locality": "xyz789",
  "region": "abc123",
  "pcode": "xyz789",
  "country": "xyz789"
}

AddressTags

Description

Specifies type of an address

Values
Enum Value Description

HOME

Place of residence address

WORK

Workplace adress

POSTAL

Postal code

PARCEL

Parcel delivery address

DOM

Domestic delivery address

PREF

Preferred delivery address when more than one address is specified

INTL

International delivery address
Example
"HOME"

Affiliation

Description

User's affiliation

Values
Enum Value Description

OWNER

Owner of the room

MEMBER

Member of the room

NONE

User doesn't have any affiliation
Example
"OWNER"

Agent

Description

Specifies how agent is stored

Types
Union Types

AgentVcard

External

Example
AgentVcard

AgentInput

Fields
Input Field Description
extValue - String Link to external vcard
vcard - VcardInput Individual vcard container
Example
{
  "extValue": "abc123",
  "vcard": VcardInput
}

AgentVcard

Description

Agent vCard

Fields
Field Name Description
vcard - Vcard vCard data
Example
{"vcard": Vcard}

AuthStatus

Description

All authorization statuses

Values
Enum Value Description

AUTHORIZED

Request is authorized

UNAUTHORIZED

Request is unauthorized
Example
"AUTHORIZED"

BareJID

Description

JID without a resource

Example
"alice@localhost"

BinValue

Fields
Field Name Description
binValue - String Value in binary form
Example
{"binValue": "abc123"}

BlockedEntityType

Description

Type of blocked entity

Values
Enum Value Description

USER

Individual user

ROOM

MUC Light room
Example
"USER"

BlockingAction

Description

Type of blocking action

Values
Enum Value Description

ALLOW

Unblock user/room

DENY

Block user/room
Example
"ALLOW"

BlockingInput

Description

Specifies blocking data

Fields
Input Field Description
entityType - BlockedEntityType! Type of entity to block
action - BlockingAction! Type of blocking action. Default = DENY
entity - JID! Entity's JID
Example
{
  "entityType": "USER",
  "action": "ALLOW",
  "entity": "alice@localhost"
}

BlockingItem

Description

Blocking item data

Fields
Field Name Description
entityType - BlockedEntityType! Type of the entity
action - BlockingAction! Action to be taken
entity - JID! Entity's JID
Example
{
  "entityType": "USER",
  "action": "ALLOW",
  "entity": "alice@localhost"
}

Boolean

Description

The Boolean scalar type represents true or false.

Example
true

Contact

Description

The contact or roster item

Fields
Field Name Description
jid - JID! The contact jid
name - String The contact name
groups - [String!] The list of the groups the contact belongs to
subscription - ContactSub The type of the subscription
ask - ContactAsk The type of the ask
Example
{
  "jid": "alice@localhost",
  "name": "xyz789",
  "groups": ["abc123"],
  "subscription": "NONE",
  "ask": "SUBSCRIBE"
}

ContactAsk

Description

The contact ask types

Values
Enum Value Description

SUBSCRIBE

Ask to subscribe

UNSUBSCRIBE

Ask to unsubscribe

IN

Invitation came in

OUT

Invitation came out

BOTH

Ask for mutual subscription

NONE

No invitation
Example
"SUBSCRIBE"

ContactInput

Description

The contact input data

Fields
Input Field Description
jid - JID! The contact jid
name - String! The contact name
groups - [String!] The contact groups
Example
{
  "jid": "alice@localhost",
  "name": "abc123",
  "groups": ["abc123"]
}

ContactSub

Description

The contact subscription types

Values
Enum Value Description

NONE

The user does not have a subscription to the contact's presence, and the contact does not have a subscription to the user's presence

BOTH

The user and the contact have subscriptions to each other's presence

FROM

The contact has a subscription to the user's presence, but the user does not have a subscription to the contact's presence

TO

The user has a subscription to the contact's presence, but the contact does not have a subscription to the user's presence
Example
"NONE"

DateTime

Description

Date and time represented using YYYY-MM-DDTHH:mm:ssZ format

Example
"2007-12-03T10:15:30Z"

DomainName

Description

XMPP domain name (domain part of a JID)

Example
"localhost"

Email

Fields
Field Name Description
tags - [EmailTags] Email tags
userId - String Email address
Example
{"tags": ["HOME"], "userId": "xyz789"}

EmailInput

Fields
Input Field Description
tags - [EmailTags!] Email tags
userId - String! Email address
Example
{"tags": ["HOME"], "userId": "xyz789"}

EmailTags

Description

Format or preference of an email

Values
Enum Value Description

HOME

Address associated with a residence

WORK

Address associated with a place of work

INTERNET

Internet addressing type

PREF

Preferred use of an email address when more than one is specified

X400

X.400 addressing type
Example
"HOME"

External

Fields
Field Name Description
extValue - String URI to an external value
Example
{"extValue": "abc123"}

FileUrls

Description

Type containing put url and get url for the file

Fields
Field Name Description
putUrl - String Url to put the file
getUrl - String Url to get the file
headers - [Header] Http headers
Example
{
  "putUrl": "xyz789",
  "getUrl": "abc123",
  "headers": [Header]
}

GeographicalPosition

Fields
Field Name Description
lat - String Geographical latitude
lon - String Geographical longtitude
Example
{
  "lat": "xyz789",
  "lon": "abc123"
}

GeographicalPositionInput

Fields
Input Field Description
lat - String! Geographical latitude
lon - String! Geographical longtitude
Example
{
  "lat": "abc123",
  "lon": "xyz789"
}

Header

Description

Type containing a HTTP header

Fields
Field Name Description
name - String Name
value - String Value
Example
{
  "name": "xyz789",
  "value": "xyz789"
}

HttpUploadUserMutation

Description

Allow user to generate upload/download URL for a file".

Fields
Field Name Description
getUrl - FileUrls Allow user to generate upload/download URLs for a file
Arguments
filename - NonEmptyString!
size - PosInt!
contentType - String
timeout - PosInt!
Example
{"getUrl": FileUrls}

ID

Description

The ID scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "4") or integer (such as 4) input value will be accepted as an ID.

Example
4

Image

Description

Specifies how image is stored

Types
Union Types

ImageData

External

Example
ImageData

ImageData

Fields
Field Name Description
type - String Format type parameter
binValue - String Base64 encoded binary image
Example
{
  "type": "abc123",
  "binValue": "abc123"
}

ImageInput

Fields
Input Field Description
type - String Format type parameter
binValue - String Base64 encoded binary image
extValue - String Link to external image
Example
{
  "type": "xyz789",
  "binValue": "abc123",
  "extValue": "xyz789"
}

InboxUserMutation

Description

Allow user to flush own inbox bin".

Fields
Field Name Description
flushBin - Int Flush the user's bin and return the number of deleted rows
Arguments
days - PosInt

Remove older than given days or all if null

Example
{"flushBin": 123}

Int

Description

The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.

Example
987

JID

Description

Unique XMPP identifier in the form of node@domain or **node@domain/resource

Example
"alice@localhost"

Key

Fields
Field Name Description
type - String Type of a key
credential - String Key credential
Example
{
  "type": "abc123",
  "credential": "xyz789"
}

KeyInput

Fields
Input Field Description
type - String Type of input
credential - String! Credential or encryption key
Example
{
  "type": "xyz789",
  "credential": "xyz789"
}

Keyword

Fields
Field Name Description
keyword - [String] Keywords list
Example
{"keyword": ["abc123"]}

KeywordInput

Fields
Input Field Description
keyword - [String!] Keywords list
Example
{"keyword": ["abc123"]}

Label

Fields
Field Name Description
tags - [AddressTags] Label tags
line - [String] Individual label lines
Example
{"tags": ["HOME"], "line": ["abc123"]}

LabelInput

Fields
Input Field Description
tags - [AddressTags!] Label tags
line - [String!]! Individual label lines
Example
{"tags": ["HOME"], "line": ["abc123"]}

LastActivity

Fields
Field Name Description
user - JID! The user's JID
timestamp - DateTime! The activity DateTime
status - String! The status text
Example
{
  "user": "alice@localhost",
  "timestamp": "2007-12-03T10:15:30Z",
  "status": "abc123"
}

LastUserMutation

Description

Allow user to get information about last activity.

Fields
Field Name Description
setLast - LastActivity Set user's last activity information
Arguments
timestamp - DateTime
status - String!
Example
{"setLast": LastActivity}

LastUserQuery

Description

Allow user to manage last activity.

Fields
Field Name Description
getLast - LastActivity Get the user's last activity information
Arguments
user - JID
Example
{"getLast": LastActivity}

MUCAffiliation

Description

User affiliation to a specific room

Values
Enum Value Description

OWNER

The user is the owner of the room

ADMIN

The user has an administrative role

MEMBER

The user is a member of the room

OUTCAST

The user isn't a member of the room

NONE

The user doesn't have any affiliation
Example
"OWNER"

MUCLightUserMutation

Description

Allow user to manage Multi-User Chat Light rooms.

Fields
Field Name Description
createRoom - Room Create a MUC light room under the given XMPP hostname
Arguments
mucDomain - DomainName!
name - String
subject - String
id - RoomName
changeRoomConfiguration - Room Change configuration of a MUC Light room
Arguments
room - BareJID!
name - String
subject - String
inviteUser - String Invite a user to a MUC Light room
Arguments
room - BareJID!
recipient - JID!
deleteRoom - String Remove a MUC Light room
Arguments
room - BareJID!
kickUser - String Kick a user from a MUC Light room
Arguments
room - BareJID!
user - JID
sendMessageToRoom - String Send a message to a MUC Light room
Arguments
room - BareJID!
body - String!
setBlockingList - String Set the user blocking list
Arguments
Example
{
  "createRoom": Room,
  "changeRoomConfiguration": Room,
  "inviteUser": "xyz789",
  "deleteRoom": "abc123",
  "kickUser": "abc123",
  "sendMessageToRoom": "abc123",
  "setBlockingList": "abc123"
}

MUCLightUserQuery

Description

Allow user to get information about Multi-User Chat Light rooms.

Fields
Field Name Description
getRoomMessages - StanzasPayload Get the MUC Light room archived messages
Arguments
room - BareJID!
pageSize - PosInt
before - DateTime
getRoomConfig - Room Get configuration of the MUC Light room
Arguments
room - BareJID!
listRoomUsers - [RoomUser!] Get users list of given MUC Light room
Arguments
room - BareJID!
listRooms - [JID!] Get the list of MUC Light rooms that the user participates in
getBlockingList - [BlockingItem!] Get the user blocking list
Example
{
  "getRoomMessages": StanzasPayload,
  "getRoomConfig": Room,
  "listRoomUsers": [RoomUser],
  "listRooms": ["alice@localhost"],
  "getBlockingList": [BlockingItem]
}

MUCRole

Description

MUC role types

Values
Enum Value Description

VISITOR

User is a visitor

PARTICIPANT

User can participate in the room

MODERATOR

User has ability to moderate room
Example
"VISITOR"

MUCRoomAffiliation

Description

MUC room affiliation data

Fields
Field Name Description
jid - JID! Room's JID
affiliation - MUCAffiliation! Affiliation type
Example
{
  "jid": "alice@localhost",
  "affiliation": "OWNER"
}

MUCRoomConfig

Description

MUC room configuration

Fields
Field Name Description
title - String! Room's title
description - String! Room's description
allowChangeSubject - Boolean! Allow to change the room's subject?
allowQueryUsers - Boolean! Allow to query users?
allowPrivateMessages - Boolean! Allow private messages?
allowVisitorStatus - Boolean! Allow visitor status?
allowVisitorNickchange - Boolean! Allow visitors to change their nicks?
public - Boolean! Is the room public?
publicList - Boolean! Is the room on the public list?
persistent - Boolean! Is the room persistent
moderated - Boolean! Is the room moderated?
membersByDefault - Boolean! Should all new occupants be members by default?
membersOnly - Boolean! Should only users with member affiliation be allowed to join the room?
allowUserInvites - Boolean! Can users invite others to join the room?
allowMultipleSession - Boolean! Allow multiple sessions of the room?
passwordProtected - Boolean! Is the room password protected?
password - String! Password to the room
anonymous - Boolean! Are occupants, except from moderators, able see each others real JIDs?
mayGetMemberList - [String!]! Array of roles and/or privileges that enable retrieving the room's member list
maxUsers - PosInt Maximum number of users in the room
logging - Boolean! Does the room enabled logging events to a file on the disk?
Example
{
  "title": "abc123",
  "description": "abc123",
  "allowChangeSubject": true,
  "allowQueryUsers": true,
  "allowPrivateMessages": false,
  "allowVisitorStatus": false,
  "allowVisitorNickchange": true,
  "public": false,
  "publicList": false,
  "persistent": true,
  "moderated": false,
  "membersByDefault": false,
  "membersOnly": true,
  "allowUserInvites": false,
  "allowMultipleSession": true,
  "passwordProtected": false,
  "password": "xyz789",
  "anonymous": true,
  "mayGetMemberList": ["abc123"],
  "maxUsers": 2,
  "logging": true
}

MUCRoomConfigInput

Description

MUC rooom configuration input

Fields
Input Field Description
title - String Room's title
description - String Room's description
allowChangeSubject - Boolean Allow to change room's subject?
allowQueryUsers - Boolean Allow to query users?
allowPrivateMessages - Boolean Allow private messages?
allowVisitorStatus - Boolean Allow visitor status?
allowVisitorNickchange - Boolean Allow visitors to change their nicks?
public - Boolean Is the room public?
publicList - Boolean Is the room on the public list?
persistent - Boolean Is the room persistent
moderated - Boolean Is the room moderated?
membersByDefault - Boolean Should all new occupants be members by default?
membersOnly - Boolean Should only users with member affiliation be allowed to join the room?
allowUserInvites - Boolean Can users invite others to join the room?
allowMultipleSession - Boolean Allow multiple sessions of the room?
passwordProtected - Boolean Is the room password protected?
password - String Password to the room
anonymous - Boolean Are occupants, except from moderators, able see each others real JIDs?
mayGetMemberList - [String!] Array of roles and/or privileges that enable retrieving the room's member list
maxUsers - PosInt Maximum number of users in the room
logging - Boolean Does the room enabled logging events to a file on the disk?
Example
{
  "title": "xyz789",
  "description": "xyz789",
  "allowChangeSubject": false,
  "allowQueryUsers": true,
  "allowPrivateMessages": false,
  "allowVisitorStatus": false,
  "allowVisitorNickchange": false,
  "public": false,
  "publicList": true,
  "persistent": true,
  "moderated": true,
  "membersByDefault": false,
  "membersOnly": false,
  "allowUserInvites": true,
  "allowMultipleSession": true,
  "passwordProtected": true,
  "password": "xyz789",
  "anonymous": false,
  "mayGetMemberList": ["xyz789"],
  "maxUsers": 2,
  "logging": false
}

MUCRoomDesc

Description

MUC room description

Fields
Field Name Description
jid - JID! Room's JID
title - String! Room's title
private - Boolean Is the room private?
usersNumber - NonNegInt Number of the users
Example
{
  "jid": "alice@localhost",
  "title": "abc123",
  "private": false,
  "usersNumber": 0
}

MUCRoomUser

Description

MUC room user data

Fields
Field Name Description
jid - JID User's JID
nick - String! User's nickname
role - MUCRole! User's role
Example
{
  "jid": "alice@localhost",
  "nick": "abc123",
  "role": "VISITOR"
}

MUCRoomsPayload

Description

MUC rooms payload

Fields
Field Name Description
rooms - [MUCRoomDesc!] List of rooms descriptions
count - NonNegInt Number of the rooms
index - NonNegInt Index of the room
first - String First room title
last - String Last room title
Example
{
  "rooms": [MUCRoomDesc],
  "count": 0,
  "index": 0,
  "first": "abc123",
  "last": "abc123"
}

MUCUserMutation

Description

Allow user to manage Multi-User Chat rooms.

Fields
Field Name Description
createInstantRoom - MUCRoomDesc Create a MUC room under the given XMPP hostname
Arguments
room - BareJID!
nick - ResourceName!
inviteUser - String Invite a user to a MUC room
Arguments
room - BareJID!
recipient - JID!
reason - String
kickUser - String Kick a user from a MUC room
Arguments
room - BareJID!
nick - ResourceName!
reason - String
sendMessageToRoom - String Send a message to a MUC room
Arguments
room - BareJID!
body - String!
resource - ResourceName
sendPrivateMessage - String Send a private message to a MUC room user from the given resource
Arguments
room - BareJID!
toNick - ResourceName!
body - String!
resource - ResourceName
deleteRoom - String Remove a MUC room
Arguments
room - BareJID!
reason - String
changeRoomConfiguration - MUCRoomConfig Change configuration of a MUC room
Arguments
room - BareJID!
setUserRole - String Change a user role
Arguments
room - BareJID!
nick - ResourceName!
role - MUCRole!
setUserAffiliation - String Change a user affiliation
Arguments
room - BareJID!
user - JID!
affiliation - MUCAffiliation!
enterRoom - String Enter the room with given resource and nick
Arguments
room - BareJID!
nick - ResourceName!
resource - ResourceName!
password - String
exitRoom - String Exit the room with given resource and nick
Arguments
room - BareJID!
nick - ResourceName!
resource - ResourceName!
Example
{
  "createInstantRoom": MUCRoomDesc,
  "inviteUser": "xyz789",
  "kickUser": "xyz789",
  "sendMessageToRoom": "abc123",
  "sendPrivateMessage": "xyz789",
  "deleteRoom": "abc123",
  "changeRoomConfiguration": MUCRoomConfig,
  "setUserRole": "abc123",
  "setUserAffiliation": "abc123",
  "enterRoom": "abc123",
  "exitRoom": "abc123"
}

MUCUserQuery

Description

Allow user to get information about Multi-User Chat rooms.

Fields
Field Name Description
listRooms - MUCRoomsPayload Get MUC rooms under the given MUC domain
Arguments
mucDomain - DomainName!
limit - PosInt
index - NonNegInt
getRoomConfig - MUCRoomConfig Get configuration of the MUC room
Arguments
room - BareJID!
listRoomUsers - [MUCRoomUser!] Get the user list of a given MUC room
Arguments
room - BareJID!
listRoomAffiliations - [MUCRoomAffiliation!] Get the affiliation list of given MUC room
Arguments
room - BareJID!
affiliation - MUCAffiliation
getRoomMessages - StanzasPayload Get the MUC room archived messages
Arguments
room - BareJID!
pageSize - PosInt
before - DateTime
Example
{
  "listRooms": MUCRoomsPayload,
  "getRoomConfig": MUCRoomConfig,
  "listRoomUsers": [MUCRoomUser],
  "listRoomAffiliations": [MUCRoomAffiliation],
  "getRoomMessages": StanzasPayload
}

NameComponents

Fields
Field Name Description
family - String User's family name
givenName - String User's name
middleName - String User's middle name
prefix - String Prefix to the name
suffix - String Suffix to the name
Example
{
  "family": "abc123",
  "givenName": "xyz789",
  "middleName": "abc123",
  "prefix": "xyz789",
  "suffix": "abc123"
}

NameComponentsInput

Fields
Input Field Description
family - String User's family name
givenName - String User's name
middleName - String User's middle name
prefix - String Prefix to the name
suffix - String Suffix to the name
Example
{
  "family": "abc123",
  "givenName": "abc123",
  "middleName": "xyz789",
  "prefix": "abc123",
  "suffix": "xyz789"
}

NonEmptyString

Description

String that contains at least one character

Example
"xyz789"

NonNegInt

Description

Integer that has a value above or equal to zero

Organization

Fields
Field Name Description
orgname - String Organization name
orgunit - [String] Organization unit
Example
{
  "orgname": "xyz789",
  "orgunit": ["xyz789"]
}

OrganizationInput

Fields
Input Field Description
orgname - String! Organization name
orgunit - [String!] Organization unit
Example
{
  "orgname": "abc123",
  "orgunit": ["xyz789"]
}

Phonetic

Fields
Field Name Description
phonetic - String Textual phonetic pronunciation
Example
{"phonetic": "xyz789"}

PosInt

Description

Integer that has a value above zero

Example
2

Privacy

Fields
Field Name Description
tags - [PrivacyClassificationTags] List of privacy classification tags
Example
{"tags": ["PUBLIC"]}

PrivacyClassificationTags

Values
Enum Value Description

PUBLIC

vCard may be shared with everyone

PRIVATE

vCard will not be shared

CONFIDENTIAL

vCard may be shared with allowed users
Example
"PUBLIC"

PrivacyInput

Fields
Input Field Description
tags - [PrivacyClassificationTags!] Privacy classification tag list
Example
{"tags": ["PUBLIC"]}

PrivateUserMutation

Description

Allow user to set own private

Fields
Field Name Description
setPrivate - XmlElement Set user's own private
Arguments
elementString - XmlElement!
Example
{
  "setPrivate": "<message to='bob@localhost' type='chat' from='alice@localhost'><body>Hi!</body></message>"
}

PrivateUserQuery

Description

Allow user to get own private

Fields
Field Name Description
getPrivate - XmlElement Get user's own private
Arguments
element - String!
nameSpace - NonEmptyString!
Example
{
  "getPrivate": "<message to='bob@localhost' type='chat' from='alice@localhost'><body>Hi!</body></message>"
}

ResourceName

Description

XMPP resource name (resource part of a JID)

Example
"res1"

Room

Description

Room data

Fields
Field Name Description
jid - BareJID! Room's JId
name - String Name of the room
subject - String Subject of the room
participants - [RoomUser!]! List of participants
options - [RoomConfigDictEntry!]! Configuration options
Example
{
  "jid": "alice@localhost",
  "name": "xyz789",
  "subject": "xyz789",
  "participants": [RoomUser],
  "options": [RoomConfigDictEntry]
}

RoomConfigDictEntry

Fields
Field Name Description
key - String! The name of the config option
value - String! Config option value
Example
{
  "key": "xyz789",
  "value": "xyz789"
}

RoomConfigDictEntryInput

Fields
Input Field Description
key - String! The name of the config option
value - String! Config option value
Example
{
  "key": "xyz789",
  "value": "xyz789"
}

RoomName

Description

XMPP room name (local part of a JID)

Example
"my-chat-room"

RoomUser

Description

Room user data

Fields
Field Name Description
jid - JID! User's JID
affiliation - Affiliation! User's affiliation
Example
{
  "jid": "alice@localhost",
  "affiliation": "OWNER"
}

RosterUserMutation

Description

Allow user to manage user rester/contacts.

Fields
Field Name Description
addContact - String Add a new contact to a user's roster without subscription
Arguments
contact - JID!
name - String
groups - [String!]
addContacts - [String]! Add new contacts to a user's roster without subscription
Arguments
contacts - [ContactInput!]!
subscription - String Manage the user subscription to the contact
Arguments
contact - JID!
action - SubAction!
deleteContact - String Delete user's contact
Arguments
contact - JID!
deleteContacts - [String]! Delete user's contacts
Arguments
contacts - [JID!]!
Example
{
  "addContact": "abc123",
  "addContacts": ["xyz789"],
  "subscription": "abc123",
  "deleteContact": "xyz789",
  "deleteContacts": ["xyz789"]
}

RosterUserQuery

Description

Allow user to get information about user roster/contacts.

Fields
Field Name Description
listContacts - [Contact!] Get the user's roster/contacts
getContact - Contact Get the user's contact
Arguments
contact - JID!
Example
{
  "listContacts": [Contact],
  "getContact": Contact
}

SendStanzaPayload

Description

Send stanza payload

Fields
Field Name Description
id - ID Stanza id
Example
{"id": "4"}

Session

Description

The information about the session

Fields
Field Name Description
user - JID! The full JID
connection - String The connection type (e.g. c2s)
ip - String The session IP address
port - Int The session port
priority - Int The priority level of the resource
node - String The node that the session process belongs to
uptime - Int The uptime of the session
Example
{
  "user": "alice@localhost",
  "connection": "abc123",
  "ip": "xyz789",
  "port": 987,
  "priority": 987,
  "node": "xyz789",
  "uptime": 123
}

SessionUserQuery

Description

Allow user to get information about sessions.

Fields
Field Name Description
listResources - [ResourceName!] List connected resources
countResources - Int Count connected resources
listSessions - [Session!] Get information about all sessions
Example
{
  "listResources": ["res1"],
  "countResources": 123,
  "listSessions": [Session]
}

Sound

Description

Specifies how sound is stored

Types
Union Types

Phonetic

BinValue

External

Example
Phonetic

SoundInput

Fields
Input Field Description
phonetic - String Textual phonetic pronunciation
binValue - String Base64 encoded sound binary value
extValue - String Link to external audio file
Example
{
  "phonetic": "abc123",
  "binValue": "abc123",
  "extValue": "xyz789"
}

StanzaMap

Description

Stanza map data

Fields
Field Name Description
sender - JID Sender's JID
timestamp - DateTime Stanza's timestamp
stanza_id - String ID of the stanza
stanza - XmlElement Stanza's data
Example
{
  "sender": "alice@localhost",
  "timestamp": "2007-12-03T10:15:30Z",
  "stanza_id": "abc123",
  "stanza": "<message to='bob@localhost' type='chat' from='alice@localhost'><body>Hi!</body></message>"
}

StanzaUserMutation

Description

Allow user to send messages.

Fields
Field Name Description
sendMessage - SendStanzaPayload Send a chat message to a local or remote bare or full JID
Arguments
from - JID
to - JID!
body - String!
sendMessageHeadLine - SendStanzaPayload Send a headline message to a local or remote bare or full JID
Arguments
from - JID
to - JID!
subject - String
body - String
sendStanza - SendStanzaPayload Send an arbitrary stanza
Arguments
stanza - XmlElement
Example
{
  "sendMessage": SendStanzaPayload,
  "sendMessageHeadLine": SendStanzaPayload,
  "sendStanza": SendStanzaPayload
}

StanzaUserQuery

Description

Allow user to query MAM archive.

Fields
Field Name Description
getLastMessages - StanzasPayload Get n last messages to/from a given contact (optional) with limit and optional date
Arguments
with - JID
limit - PosInt
before - DateTime
Example
{"getLastMessages": StanzasPayload}

StanzaUserSubscription

Fields
Field Name Description
subscribeForMessages - StanzaMap Subscribe to incoming messages
Example
{"subscribeForMessages": StanzaMap}

StanzasPayload

Description

Stanza payload data

Fields
Field Name Description
stanzas - [StanzaMap] List of stanza's maps
limit - Int Max number of stanzas
Example
{"stanzas": [StanzaMap], "limit": 987}

String

Description

The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.

Example
"abc123"

SubAction

Description

The subscription actions

Values
Enum Value Description

INVITE

Send the subscription request to a user. Presence type: subscribe

ACCEPT

Accept the subscription request. Presence type: subscribed

DECLINE

Decline the subscription's request. Presence type: unsubscribed

CANCEL

Cancel the user's subscription. Presence type: unsubscribe
Example
"INVITE"

Telephone

Fields
Field Name Description
tags - [TelephoneTags] Telephone tags
number - String Telephone's number
Example
{"tags": ["HOME"], "number": "xyz789"}

TelephoneInput

Fields
Input Field Description
tags - [TelephoneTags!] Telephone tags
number - String! Telephone's number
Example
{"tags": ["HOME"], "number": "abc123"}

TelephoneTags

Description

Specifies intended use of a telphone number

Values
Enum Value Description

HOME

Number associated with a residence

WORK

Number associated with a workplace

VOICE

Voice telephone number

FAX

Facsimile telephone number

PAGER

Paging device telephone number

MSG

Number has voice messaging support

CELL

Cellular telephone number

VIDEO

Video conferencing telephone number

BBS

Bulletin board system telephone number

MODEM

Modem connected telephone number

ISDN

ISDN service telephone number

PCS

Personal communication services telephone number

PREF

Preferred use of a telephone number
Example
"HOME"

Token

Description

Token data

Fields
Field Name Description
access - String Access token data
refresh - String Refresh token data
Example
{
  "access": "abc123",
  "refresh": "abc123"
}

TokenUserMutation

Description

Allow user to get and revoke tokens.

Fields
Field Name Description
requestToken - Token Get a new token
revokeToken - String Revoke any tokens
Example
{
  "requestToken": Token,
  "revokeToken": "xyz789"
}

UserAuthInfo

Description

Inforamtion about user request authorization

Fields
Field Name Description
username - UserName Authorized as user with name
authStatus - AuthStatus Authorization status
Example
{
  "username": "alice",
  "authStatus": "AUTHORIZED"
}

UserName

Description

XMPP user name (local part of a JID)

Example
"alice"

Vcard

Fields
Field Name Description
formattedName - String Formatted name from Vcard
nameComponents - NameComponents Person's name details
nickname - [String] User's nickname
photo - [Image] User's photo
birthday - [String] Birthday date
address - [Address] User's addresses
label - [Label] Formatted text corresponding to delivery address
telephone - [Telephone] User's telephone number
email - [Email] User's email
jabberId - [String] User's JID
mailer - [String] User's mail agent type
timeZone - [String] User's timezone
geo - [GeographicalPosition] Geographical position
title - [String] Job title, functional position or function
role - [String] User's role, occupation, or business category
logo - [Image] Logo image
agent - [Agent] Person who will act on behalf of the user or resource associated with the vCard
org - [Organization] Organizational name and units associated
categories - [Keyword] Application specific category information
note - [String] Note about user
prodId - [String] Identifier of product that generated the vCard property
rev - [String] Last revised property. The value must be an ISO 8601 formatted UTC date/time
sortString - [String] Sort string property
sound - [Sound] Formatted name pronunciation property
uid - [String] Unique identifier property
url - [String] Directory URL property
desc - [String] Free-form descriptive text
class - [Privacy] Privacy classification property
key - [Key] Authentication credential or encryption key property
Example
{
  "formattedName": "xyz789",
  "nameComponents": NameComponents,
  "nickname": ["abc123"],
  "photo": [ImageData],
  "birthday": ["abc123"],
  "address": [Address],
  "label": [Label],
  "telephone": [Telephone],
  "email": [Email],
  "jabberId": ["xyz789"],
  "mailer": ["xyz789"],
  "timeZone": ["xyz789"],
  "geo": [GeographicalPosition],
  "title": ["xyz789"],
  "role": ["abc123"],
  "logo": [ImageData],
  "agent": [AgentVcard],
  "org": [Organization],
  "categories": [Keyword],
  "note": ["xyz789"],
  "prodId": ["xyz789"],
  "rev": ["xyz789"],
  "sortString": ["xyz789"],
  "sound": [Phonetic],
  "uid": ["abc123"],
  "url": ["xyz789"],
  "desc": ["abc123"],
  "class": [Privacy],
  "key": [Key]
}

VcardInput

Fields
Input Field Description
formattedName - String! Formatted name from Vcard
nameComponents - NameComponentsInput! Person's name details
nickname - [String] User's nickname
photo - [ImageInput!] User's photo
birthday - [String!] Birthday date
address - [AddressInput!] User's address
label - [LabelInput!] Formatted text corresponding to delivery address
telephone - [TelephoneInput!] User's telephone number
email - [EmailInput!] User's email
jabberId - [String!] User's JID
mailer - [String!] User's mail agent type
timeZone - [String!] User's timezone
geo - [GeographicalPositionInput!] Geographical position
title - [String!] Job title, functional position or function
role - [String!] User's role, occupation, or business category
logo - [ImageInput!] Logo image
agent - [AgentInput!] Person who will act on behalf of the user or resource associated with the vCard
org - [OrganizationInput!] Organizational name and units associated
categories - [KeywordInput!] Application specific category information
note - [String!] Note about user
prodId - [String!] Identifier of product that generated the vCard property
rev - [String!] Last revised property. The value must be an ISO 8601 formatted UTC date/time
sortString - [String!] Sort string property
sound - [SoundInput!] Formatted name pronunciation property
uid - [String!] Unique identifier property
url - [String!] Directory URL property
desc - [String!] Free-form descriptive text
class - [PrivacyInput!] Privacy classification property
key - [KeyInput!] Authentication credential or encryption key property
Example
{
  "formattedName": "xyz789",
  "nameComponents": NameComponentsInput,
  "nickname": ["xyz789"],
  "photo": [ImageInput],
  "birthday": ["abc123"],
  "address": [AddressInput],
  "label": [LabelInput],
  "telephone": [TelephoneInput],
  "email": [EmailInput],
  "jabberId": ["xyz789"],
  "mailer": ["abc123"],
  "timeZone": ["abc123"],
  "geo": [GeographicalPositionInput],
  "title": ["abc123"],
  "role": ["abc123"],
  "logo": [ImageInput],
  "agent": [AgentInput],
  "org": [OrganizationInput],
  "categories": [KeywordInput],
  "note": ["xyz789"],
  "prodId": ["xyz789"],
  "rev": ["abc123"],
  "sortString": ["abc123"],
  "sound": [SoundInput],
  "uid": ["abc123"],
  "url": ["abc123"],
  "desc": ["xyz789"],
  "class": [PrivacyInput],
  "key": [KeyInput]
}

VcardUserMutation

Description

Allow user to set own vcard

Fields
Field Name Description
setVcard - Vcard Set user's own vcard
Arguments
vcard - VcardInput!
Example
{"setVcard": Vcard}

VcardUserQuery

Description

Allow user to get user's vcard

Fields
Field Name Description
getVcard - Vcard Get user's vcard
Arguments
user - JID
Example
{"getVcard": Vcard}

XmlElement

Description

String containing the XML document

Example
"<message to='bob@localhost' type='chat' from='alice@localhost'><body>Hi!</body></message>"