-
Notifications
You must be signed in to change notification settings - Fork 250
/
xep0059.ts
39 lines (35 loc) · 1.18 KB
/
xep0059.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// ====================================================================
// XEP-0059: Result Set Management
// --------------------------------------------------------------------
// Source: https://xmpp.org/extensions/xep-0059.html
// Version: 1.0.0 (2006-09-20)
// ====================================================================
import { childInteger, childIntegerAttribute, childText, DefinitionOptions } from '../jxt';
import { NS_RSM } from '../Namespaces';
export interface Paging {
max?: number;
before?: string;
after?: string;
first?: string;
last?: string;
count?: number;
index?: number;
firstIndex?: number;
}
const Protocol: DefinitionOptions = {
aliases: ['iq.pubsub.paging'],
element: 'set',
fields: {
after: childText(null, 'after'),
before: childText(null, 'before'),
count: childInteger(null, 'count'),
first: childText(null, 'first'),
firstIndex: childIntegerAttribute(null, 'first', 'index'),
index: childInteger(null, 'index'),
last: childText(null, 'last'),
max: childInteger(null, 'max')
},
namespace: NS_RSM,
path: 'paging'
};
export default Protocol;