Annotate

teal-src/util/stanza.d.tl @ 12672:c8f59ce7d3cf

mod_admin_shell: Ensure account has role before it is usable By creating the account first without a password it can't be used until the role has set. This is most important for restricted accounts, as a failure to set the role would lead to the account having more privileges than indented.
author Kim Alvefur <zash@zash.se>
date Thu, 18 Aug 2022 19:00:01 +0200
parent 12517:a8c17c95ef4d
child 12774:fc4adc32a537
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11432
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
1 local record lib
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
2
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
3 type children_iter = function ( stanza_t ) : stanza_t
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
4 type childtags_iter = function () : stanza_t
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
5 type maptags_cb = function ( stanza_t ) : stanza_t
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
6
12516
d76ac22f3571 util.stanza: Document error conditions in Teal definition
Kim Alvefur <zash@zash.se>
parents: 11642
diff changeset
7
d76ac22f3571 util.stanza: Document error conditions in Teal definition
Kim Alvefur <zash@zash.se>
parents: 11642
diff changeset
8 enum stanza_error_type
d76ac22f3571 util.stanza: Document error conditions in Teal definition
Kim Alvefur <zash@zash.se>
parents: 11642
diff changeset
9 "auth"
d76ac22f3571 util.stanza: Document error conditions in Teal definition
Kim Alvefur <zash@zash.se>
parents: 11642
diff changeset
10 "cancel"
d76ac22f3571 util.stanza: Document error conditions in Teal definition
Kim Alvefur <zash@zash.se>
parents: 11642
diff changeset
11 "continue"
d76ac22f3571 util.stanza: Document error conditions in Teal definition
Kim Alvefur <zash@zash.se>
parents: 11642
diff changeset
12 "modify"
d76ac22f3571 util.stanza: Document error conditions in Teal definition
Kim Alvefur <zash@zash.se>
parents: 11642
diff changeset
13 "wait"
d76ac22f3571 util.stanza: Document error conditions in Teal definition
Kim Alvefur <zash@zash.se>
parents: 11642
diff changeset
14 end
d76ac22f3571 util.stanza: Document error conditions in Teal definition
Kim Alvefur <zash@zash.se>
parents: 11642
diff changeset
15 enum stanza_error_condition
d76ac22f3571 util.stanza: Document error conditions in Teal definition
Kim Alvefur <zash@zash.se>
parents: 11642
diff changeset
16 "bad-request"
d76ac22f3571 util.stanza: Document error conditions in Teal definition
Kim Alvefur <zash@zash.se>
parents: 11642
diff changeset
17 "conflict"
d76ac22f3571 util.stanza: Document error conditions in Teal definition
Kim Alvefur <zash@zash.se>
parents: 11642
diff changeset
18 "feature-not-implemented"
d76ac22f3571 util.stanza: Document error conditions in Teal definition
Kim Alvefur <zash@zash.se>
parents: 11642
diff changeset
19 "forbidden"
d76ac22f3571 util.stanza: Document error conditions in Teal definition
Kim Alvefur <zash@zash.se>
parents: 11642
diff changeset
20 "gone"
d76ac22f3571 util.stanza: Document error conditions in Teal definition
Kim Alvefur <zash@zash.se>
parents: 11642
diff changeset
21 "internal-server-error"
d76ac22f3571 util.stanza: Document error conditions in Teal definition
Kim Alvefur <zash@zash.se>
parents: 11642
diff changeset
22 "item-not-found"
d76ac22f3571 util.stanza: Document error conditions in Teal definition
Kim Alvefur <zash@zash.se>
parents: 11642
diff changeset
23 "jid-malformed"
d76ac22f3571 util.stanza: Document error conditions in Teal definition
Kim Alvefur <zash@zash.se>
parents: 11642
diff changeset
24 "not-acceptable"
d76ac22f3571 util.stanza: Document error conditions in Teal definition
Kim Alvefur <zash@zash.se>
parents: 11642
diff changeset
25 "not-allowed"
d76ac22f3571 util.stanza: Document error conditions in Teal definition
Kim Alvefur <zash@zash.se>
parents: 11642
diff changeset
26 "not-authorized"
d76ac22f3571 util.stanza: Document error conditions in Teal definition
Kim Alvefur <zash@zash.se>
parents: 11642
diff changeset
27 "policy-violation"
d76ac22f3571 util.stanza: Document error conditions in Teal definition
Kim Alvefur <zash@zash.se>
parents: 11642
diff changeset
28 "recipient-unavailable"
d76ac22f3571 util.stanza: Document error conditions in Teal definition
Kim Alvefur <zash@zash.se>
parents: 11642
diff changeset
29 "redirect"
d76ac22f3571 util.stanza: Document error conditions in Teal definition
Kim Alvefur <zash@zash.se>
parents: 11642
diff changeset
30 "registration-required"
d76ac22f3571 util.stanza: Document error conditions in Teal definition
Kim Alvefur <zash@zash.se>
parents: 11642
diff changeset
31 "remote-server-not-found"
d76ac22f3571 util.stanza: Document error conditions in Teal definition
Kim Alvefur <zash@zash.se>
parents: 11642
diff changeset
32 "remote-server-timeout"
d76ac22f3571 util.stanza: Document error conditions in Teal definition
Kim Alvefur <zash@zash.se>
parents: 11642
diff changeset
33 "resource-constraint"
d76ac22f3571 util.stanza: Document error conditions in Teal definition
Kim Alvefur <zash@zash.se>
parents: 11642
diff changeset
34 "service-unavailable"
d76ac22f3571 util.stanza: Document error conditions in Teal definition
Kim Alvefur <zash@zash.se>
parents: 11642
diff changeset
35 "subscription-required"
d76ac22f3571 util.stanza: Document error conditions in Teal definition
Kim Alvefur <zash@zash.se>
parents: 11642
diff changeset
36 "undefined-condition"
d76ac22f3571 util.stanza: Document error conditions in Teal definition
Kim Alvefur <zash@zash.se>
parents: 11642
diff changeset
37 "unexpected-request"
d76ac22f3571 util.stanza: Document error conditions in Teal definition
Kim Alvefur <zash@zash.se>
parents: 11642
diff changeset
38 end
d76ac22f3571 util.stanza: Document error conditions in Teal definition
Kim Alvefur <zash@zash.se>
parents: 11642
diff changeset
39
11432
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
40 record stanza_t
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
41 name : string
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
42 attr : { string : string }
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
43 { stanza_t | string }
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
44 tags : { stanza_t }
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
45
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
46 query : function ( stanza_t, string ) : stanza_t
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
47 body : function ( stanza_t, string, { string : string } ) : stanza_t
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
48 text_tag : function ( stanza_t, string, string, { string : string } ) : stanza_t
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
49 tag : function ( stanza_t, string, { string : string } ) : stanza_t
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
50 text : function ( stanza_t, string ) : stanza_t
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
51 up : function ( stanza_t ) : stanza_t
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
52 reset : function ( stanza_t ) : stanza_t
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
53 add_direct_child : function ( stanza_t, stanza_t )
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
54 add_child : function ( stanza_t, stanza_t )
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
55 remove_children : function ( stanza_t, string, string ) : stanza_t
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
56
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
57 get_child : function ( stanza_t, string, string ) : stanza_t
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
58 get_text : function ( stanza_t ) : string
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
59 get_child_text : function ( stanza_t, string, string ) : string
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
60 child_with_name : function ( stanza_t, string, string ) : stanza_t
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
61 child_with_ns : function ( stanza_t, string, string ) : stanza_t
11459
86904555bffc teal: Use new integer support in Teal 0.13.0
Kim Alvefur <zash@zash.se>
parents: 11432
diff changeset
62 children : function ( stanza_t ) : children_iter, stanza_t, integer
11432
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
63 childtags : function ( stanza_t, string, string ) : childtags_iter
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
64 maptags : function ( stanza_t, maptags_cb ) : stanza_t
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
65 find : function ( stanza_t, string ) : stanza_t | string
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
66
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
67 top_tag : function ( stanza_t ) : string
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
68 pretty_print : function ( stanza_t ) : string
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
69 pretty_top_tag : function ( stanza_t ) : string
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
70
12516
d76ac22f3571 util.stanza: Document error conditions in Teal definition
Kim Alvefur <zash@zash.se>
parents: 11642
diff changeset
71 get_error : function ( stanza_t ) : stanza_error_type, stanza_error_condition, string, stanza_t
11459
86904555bffc teal: Use new integer support in Teal 0.13.0
Kim Alvefur <zash@zash.se>
parents: 11432
diff changeset
72 indent : function ( stanza_t, integer, string ) : stanza_t
11432
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
73 end
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
74
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
75 record serialized_stanza_t
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
76 name : string
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
77 attr : { string : string }
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
78 { serialized_stanza_t | string }
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
79 end
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
80
12517
a8c17c95ef4d util.stanza: Document top level attributes in Teal definition
Kim Alvefur <zash@zash.se>
parents: 12516
diff changeset
81 record message_attr
a8c17c95ef4d util.stanza: Document top level attributes in Teal definition
Kim Alvefur <zash@zash.se>
parents: 12516
diff changeset
82 ["xml:lang"] : string
a8c17c95ef4d util.stanza: Document top level attributes in Teal definition
Kim Alvefur <zash@zash.se>
parents: 12516
diff changeset
83 from : string
a8c17c95ef4d util.stanza: Document top level attributes in Teal definition
Kim Alvefur <zash@zash.se>
parents: 12516
diff changeset
84 id : string
a8c17c95ef4d util.stanza: Document top level attributes in Teal definition
Kim Alvefur <zash@zash.se>
parents: 12516
diff changeset
85 to : string
a8c17c95ef4d util.stanza: Document top level attributes in Teal definition
Kim Alvefur <zash@zash.se>
parents: 12516
diff changeset
86 type : message_type
a8c17c95ef4d util.stanza: Document top level attributes in Teal definition
Kim Alvefur <zash@zash.se>
parents: 12516
diff changeset
87 enum message_type
a8c17c95ef4d util.stanza: Document top level attributes in Teal definition
Kim Alvefur <zash@zash.se>
parents: 12516
diff changeset
88 "chat"
a8c17c95ef4d util.stanza: Document top level attributes in Teal definition
Kim Alvefur <zash@zash.se>
parents: 12516
diff changeset
89 "error"
a8c17c95ef4d util.stanza: Document top level attributes in Teal definition
Kim Alvefur <zash@zash.se>
parents: 12516
diff changeset
90 "groupchat"
a8c17c95ef4d util.stanza: Document top level attributes in Teal definition
Kim Alvefur <zash@zash.se>
parents: 12516
diff changeset
91 "headline"
a8c17c95ef4d util.stanza: Document top level attributes in Teal definition
Kim Alvefur <zash@zash.se>
parents: 12516
diff changeset
92 "normal"
a8c17c95ef4d util.stanza: Document top level attributes in Teal definition
Kim Alvefur <zash@zash.se>
parents: 12516
diff changeset
93 end
a8c17c95ef4d util.stanza: Document top level attributes in Teal definition
Kim Alvefur <zash@zash.se>
parents: 12516
diff changeset
94 end
a8c17c95ef4d util.stanza: Document top level attributes in Teal definition
Kim Alvefur <zash@zash.se>
parents: 12516
diff changeset
95
a8c17c95ef4d util.stanza: Document top level attributes in Teal definition
Kim Alvefur <zash@zash.se>
parents: 12516
diff changeset
96 record presence_attr
a8c17c95ef4d util.stanza: Document top level attributes in Teal definition
Kim Alvefur <zash@zash.se>
parents: 12516
diff changeset
97 ["xml:lang"] : string
a8c17c95ef4d util.stanza: Document top level attributes in Teal definition
Kim Alvefur <zash@zash.se>
parents: 12516
diff changeset
98 from : string
a8c17c95ef4d util.stanza: Document top level attributes in Teal definition
Kim Alvefur <zash@zash.se>
parents: 12516
diff changeset
99 id : string
a8c17c95ef4d util.stanza: Document top level attributes in Teal definition
Kim Alvefur <zash@zash.se>
parents: 12516
diff changeset
100 to : string
a8c17c95ef4d util.stanza: Document top level attributes in Teal definition
Kim Alvefur <zash@zash.se>
parents: 12516
diff changeset
101 type : presence_type
a8c17c95ef4d util.stanza: Document top level attributes in Teal definition
Kim Alvefur <zash@zash.se>
parents: 12516
diff changeset
102 enum presence_type
a8c17c95ef4d util.stanza: Document top level attributes in Teal definition
Kim Alvefur <zash@zash.se>
parents: 12516
diff changeset
103 "error"
a8c17c95ef4d util.stanza: Document top level attributes in Teal definition
Kim Alvefur <zash@zash.se>
parents: 12516
diff changeset
104 "probe"
a8c17c95ef4d util.stanza: Document top level attributes in Teal definition
Kim Alvefur <zash@zash.se>
parents: 12516
diff changeset
105 "subscribe"
a8c17c95ef4d util.stanza: Document top level attributes in Teal definition
Kim Alvefur <zash@zash.se>
parents: 12516
diff changeset
106 "subscribed"
a8c17c95ef4d util.stanza: Document top level attributes in Teal definition
Kim Alvefur <zash@zash.se>
parents: 12516
diff changeset
107 "unsubscribe"
a8c17c95ef4d util.stanza: Document top level attributes in Teal definition
Kim Alvefur <zash@zash.se>
parents: 12516
diff changeset
108 "unsubscribed"
a8c17c95ef4d util.stanza: Document top level attributes in Teal definition
Kim Alvefur <zash@zash.se>
parents: 12516
diff changeset
109 end
a8c17c95ef4d util.stanza: Document top level attributes in Teal definition
Kim Alvefur <zash@zash.se>
parents: 12516
diff changeset
110 end
a8c17c95ef4d util.stanza: Document top level attributes in Teal definition
Kim Alvefur <zash@zash.se>
parents: 12516
diff changeset
111
a8c17c95ef4d util.stanza: Document top level attributes in Teal definition
Kim Alvefur <zash@zash.se>
parents: 12516
diff changeset
112 record iq_attr
a8c17c95ef4d util.stanza: Document top level attributes in Teal definition
Kim Alvefur <zash@zash.se>
parents: 12516
diff changeset
113 ["xml:lang"] : string
a8c17c95ef4d util.stanza: Document top level attributes in Teal definition
Kim Alvefur <zash@zash.se>
parents: 12516
diff changeset
114 from : string
a8c17c95ef4d util.stanza: Document top level attributes in Teal definition
Kim Alvefur <zash@zash.se>
parents: 12516
diff changeset
115 id : string
a8c17c95ef4d util.stanza: Document top level attributes in Teal definition
Kim Alvefur <zash@zash.se>
parents: 12516
diff changeset
116 to : string
a8c17c95ef4d util.stanza: Document top level attributes in Teal definition
Kim Alvefur <zash@zash.se>
parents: 12516
diff changeset
117 type : iq_type
a8c17c95ef4d util.stanza: Document top level attributes in Teal definition
Kim Alvefur <zash@zash.se>
parents: 12516
diff changeset
118 enum iq_type
a8c17c95ef4d util.stanza: Document top level attributes in Teal definition
Kim Alvefur <zash@zash.se>
parents: 12516
diff changeset
119 "error"
a8c17c95ef4d util.stanza: Document top level attributes in Teal definition
Kim Alvefur <zash@zash.se>
parents: 12516
diff changeset
120 "get"
a8c17c95ef4d util.stanza: Document top level attributes in Teal definition
Kim Alvefur <zash@zash.se>
parents: 12516
diff changeset
121 "result"
a8c17c95ef4d util.stanza: Document top level attributes in Teal definition
Kim Alvefur <zash@zash.se>
parents: 12516
diff changeset
122 "set"
a8c17c95ef4d util.stanza: Document top level attributes in Teal definition
Kim Alvefur <zash@zash.se>
parents: 12516
diff changeset
123 end
a8c17c95ef4d util.stanza: Document top level attributes in Teal definition
Kim Alvefur <zash@zash.se>
parents: 12516
diff changeset
124 end
a8c17c95ef4d util.stanza: Document top level attributes in Teal definition
Kim Alvefur <zash@zash.se>
parents: 12516
diff changeset
125
11432
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
126 stanza : function ( string, { string : string } ) : stanza_t
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
127 is_stanza : function ( any ) : boolean
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
128 preserialize : function ( stanza_t ) : serialized_stanza_t
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
129 deserialize : function ( serialized_stanza_t ) : stanza_t
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
130 clone : function ( stanza_t, boolean ) : stanza_t
12517
a8c17c95ef4d util.stanza: Document top level attributes in Teal definition
Kim Alvefur <zash@zash.se>
parents: 12516
diff changeset
131 message : function ( message_attr, string ) : stanza_t
a8c17c95ef4d util.stanza: Document top level attributes in Teal definition
Kim Alvefur <zash@zash.se>
parents: 12516
diff changeset
132 iq : function ( iq_attr ) : stanza_t
11432
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
133 reply : function ( stanza_t ) : stanza_t
12516
d76ac22f3571 util.stanza: Document error conditions in Teal definition
Kim Alvefur <zash@zash.se>
parents: 11642
diff changeset
134 error_reply : function ( stanza_t, stanza_error_type, stanza_error_condition, string, string ) : stanza_t
12517
a8c17c95ef4d util.stanza: Document top level attributes in Teal definition
Kim Alvefur <zash@zash.se>
parents: 12516
diff changeset
135 presence : function ( presence_attr ) : stanza_t
11432
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
136 xml_escape : function ( string ) : string
11642
7f2dee4249aa util.stanza: Export pretty printing function
Kim Alvefur <zash@zash.se>
parents: 11459
diff changeset
137 pretty_print : function ( string ) : string
11432
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
138 end
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
139
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
140 return lib