@wireapp/protocol-messaging 1.30.0 → 1.36.0
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.
- package/package.json +2 -2
- package/proto/messages.proto +1 -0
- package/proto/otr.proto +46 -8
- package/web/messages.d.ts +2 -0
- package/web/messages.js +22 -0
- package/web/otr.d.ts +281 -139
- package/web/otr.js +3327 -1719
- package/web/common.d.ts +0 -20
- package/web/common.js +0 -222
package/web/common.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import * as $protobuf from "protobufjs";
|
|
2
|
-
export interface IQualifiedUserId {
|
|
3
|
-
id: string;
|
|
4
|
-
domain: string;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export class QualifiedUserId implements IQualifiedUserId {
|
|
8
|
-
constructor(properties?: IQualifiedUserId);
|
|
9
|
-
public id: string;
|
|
10
|
-
public domain: string;
|
|
11
|
-
public static create(properties?: IQualifiedUserId): QualifiedUserId;
|
|
12
|
-
public static encode(message: IQualifiedUserId, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
13
|
-
public static encodeDelimited(message: IQualifiedUserId, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
14
|
-
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): QualifiedUserId;
|
|
15
|
-
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): QualifiedUserId;
|
|
16
|
-
public static verify(message: { [k: string]: any }): (string|null);
|
|
17
|
-
public static fromObject(object: { [k: string]: any }): QualifiedUserId;
|
|
18
|
-
public static toObject(message: QualifiedUserId, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
19
|
-
public toJSON(): { [k: string]: any };
|
|
20
|
-
}
|
package/web/common.js
DELETED
|
@@ -1,222 +0,0 @@
|
|
|
1
|
-
/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/
|
|
2
|
-
"use strict";
|
|
3
|
-
|
|
4
|
-
var $protobuf = require("protobufjs/minimal");
|
|
5
|
-
|
|
6
|
-
// Common aliases
|
|
7
|
-
var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;
|
|
8
|
-
|
|
9
|
-
// Exported root namespace
|
|
10
|
-
var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {});
|
|
11
|
-
|
|
12
|
-
$root.QualifiedUserId = (function() {
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Properties of a QualifiedUserId.
|
|
16
|
-
* @exports IQualifiedUserId
|
|
17
|
-
* @interface IQualifiedUserId
|
|
18
|
-
* @property {string} id QualifiedUserId id
|
|
19
|
-
* @property {string} domain QualifiedUserId domain
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Constructs a new QualifiedUserId.
|
|
24
|
-
* @exports QualifiedUserId
|
|
25
|
-
* @classdesc Represents a QualifiedUserId.
|
|
26
|
-
* @implements IQualifiedUserId
|
|
27
|
-
* @constructor
|
|
28
|
-
* @param {IQualifiedUserId=} [properties] Properties to set
|
|
29
|
-
*/
|
|
30
|
-
function QualifiedUserId(properties) {
|
|
31
|
-
if (properties)
|
|
32
|
-
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
33
|
-
if (properties[keys[i]] != null)
|
|
34
|
-
this[keys[i]] = properties[keys[i]];
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* QualifiedUserId id.
|
|
39
|
-
* @member {string} id
|
|
40
|
-
* @memberof QualifiedUserId
|
|
41
|
-
* @instance
|
|
42
|
-
*/
|
|
43
|
-
QualifiedUserId.prototype.id = "";
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* QualifiedUserId domain.
|
|
47
|
-
* @member {string} domain
|
|
48
|
-
* @memberof QualifiedUserId
|
|
49
|
-
* @instance
|
|
50
|
-
*/
|
|
51
|
-
QualifiedUserId.prototype.domain = "";
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Creates a new QualifiedUserId instance using the specified properties.
|
|
55
|
-
* @function create
|
|
56
|
-
* @memberof QualifiedUserId
|
|
57
|
-
* @static
|
|
58
|
-
* @param {IQualifiedUserId=} [properties] Properties to set
|
|
59
|
-
* @returns {QualifiedUserId} QualifiedUserId instance
|
|
60
|
-
*/
|
|
61
|
-
QualifiedUserId.create = function create(properties) {
|
|
62
|
-
return new QualifiedUserId(properties);
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Encodes the specified QualifiedUserId message. Does not implicitly {@link QualifiedUserId.verify|verify} messages.
|
|
67
|
-
* @function encode
|
|
68
|
-
* @memberof QualifiedUserId
|
|
69
|
-
* @static
|
|
70
|
-
* @param {IQualifiedUserId} message QualifiedUserId message or plain object to encode
|
|
71
|
-
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
72
|
-
* @returns {$protobuf.Writer} Writer
|
|
73
|
-
*/
|
|
74
|
-
QualifiedUserId.encode = function encode(message, writer) {
|
|
75
|
-
if (!writer)
|
|
76
|
-
writer = $Writer.create();
|
|
77
|
-
writer.uint32(/* id 1, wireType 2 =*/10).string(message.id);
|
|
78
|
-
writer.uint32(/* id 2, wireType 2 =*/18).string(message.domain);
|
|
79
|
-
return writer;
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Encodes the specified QualifiedUserId message, length delimited. Does not implicitly {@link QualifiedUserId.verify|verify} messages.
|
|
84
|
-
* @function encodeDelimited
|
|
85
|
-
* @memberof QualifiedUserId
|
|
86
|
-
* @static
|
|
87
|
-
* @param {IQualifiedUserId} message QualifiedUserId message or plain object to encode
|
|
88
|
-
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
89
|
-
* @returns {$protobuf.Writer} Writer
|
|
90
|
-
*/
|
|
91
|
-
QualifiedUserId.encodeDelimited = function encodeDelimited(message, writer) {
|
|
92
|
-
return this.encode(message, writer).ldelim();
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* Decodes a QualifiedUserId message from the specified reader or buffer.
|
|
97
|
-
* @function decode
|
|
98
|
-
* @memberof QualifiedUserId
|
|
99
|
-
* @static
|
|
100
|
-
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
101
|
-
* @param {number} [length] Message length if known beforehand
|
|
102
|
-
* @returns {QualifiedUserId} QualifiedUserId
|
|
103
|
-
* @throws {Error} If the payload is not a reader or valid buffer
|
|
104
|
-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
105
|
-
*/
|
|
106
|
-
QualifiedUserId.decode = function decode(reader, length) {
|
|
107
|
-
if (!(reader instanceof $Reader))
|
|
108
|
-
reader = $Reader.create(reader);
|
|
109
|
-
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.QualifiedUserId();
|
|
110
|
-
while (reader.pos < end) {
|
|
111
|
-
var tag = reader.uint32();
|
|
112
|
-
switch (tag >>> 3) {
|
|
113
|
-
case 1:
|
|
114
|
-
message.id = reader.string();
|
|
115
|
-
break;
|
|
116
|
-
case 2:
|
|
117
|
-
message.domain = reader.string();
|
|
118
|
-
break;
|
|
119
|
-
default:
|
|
120
|
-
reader.skipType(tag & 7);
|
|
121
|
-
break;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
if (!message.hasOwnProperty("id"))
|
|
125
|
-
throw $util.ProtocolError("missing required 'id'", { instance: message });
|
|
126
|
-
if (!message.hasOwnProperty("domain"))
|
|
127
|
-
throw $util.ProtocolError("missing required 'domain'", { instance: message });
|
|
128
|
-
return message;
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* Decodes a QualifiedUserId message from the specified reader or buffer, length delimited.
|
|
133
|
-
* @function decodeDelimited
|
|
134
|
-
* @memberof QualifiedUserId
|
|
135
|
-
* @static
|
|
136
|
-
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
137
|
-
* @returns {QualifiedUserId} QualifiedUserId
|
|
138
|
-
* @throws {Error} If the payload is not a reader or valid buffer
|
|
139
|
-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
140
|
-
*/
|
|
141
|
-
QualifiedUserId.decodeDelimited = function decodeDelimited(reader) {
|
|
142
|
-
if (!(reader instanceof $Reader))
|
|
143
|
-
reader = new $Reader(reader);
|
|
144
|
-
return this.decode(reader, reader.uint32());
|
|
145
|
-
};
|
|
146
|
-
|
|
147
|
-
/**
|
|
148
|
-
* Verifies a QualifiedUserId message.
|
|
149
|
-
* @function verify
|
|
150
|
-
* @memberof QualifiedUserId
|
|
151
|
-
* @static
|
|
152
|
-
* @param {Object.<string,*>} message Plain object to verify
|
|
153
|
-
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
154
|
-
*/
|
|
155
|
-
QualifiedUserId.verify = function verify(message) {
|
|
156
|
-
if (typeof message !== "object" || message === null)
|
|
157
|
-
return "object expected";
|
|
158
|
-
if (!$util.isString(message.id))
|
|
159
|
-
return "id: string expected";
|
|
160
|
-
if (!$util.isString(message.domain))
|
|
161
|
-
return "domain: string expected";
|
|
162
|
-
return null;
|
|
163
|
-
};
|
|
164
|
-
|
|
165
|
-
/**
|
|
166
|
-
* Creates a QualifiedUserId message from a plain object. Also converts values to their respective internal types.
|
|
167
|
-
* @function fromObject
|
|
168
|
-
* @memberof QualifiedUserId
|
|
169
|
-
* @static
|
|
170
|
-
* @param {Object.<string,*>} object Plain object
|
|
171
|
-
* @returns {QualifiedUserId} QualifiedUserId
|
|
172
|
-
*/
|
|
173
|
-
QualifiedUserId.fromObject = function fromObject(object) {
|
|
174
|
-
if (object instanceof $root.QualifiedUserId)
|
|
175
|
-
return object;
|
|
176
|
-
var message = new $root.QualifiedUserId();
|
|
177
|
-
if (object.id != null)
|
|
178
|
-
message.id = String(object.id);
|
|
179
|
-
if (object.domain != null)
|
|
180
|
-
message.domain = String(object.domain);
|
|
181
|
-
return message;
|
|
182
|
-
};
|
|
183
|
-
|
|
184
|
-
/**
|
|
185
|
-
* Creates a plain object from a QualifiedUserId message. Also converts values to other types if specified.
|
|
186
|
-
* @function toObject
|
|
187
|
-
* @memberof QualifiedUserId
|
|
188
|
-
* @static
|
|
189
|
-
* @param {QualifiedUserId} message QualifiedUserId
|
|
190
|
-
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
191
|
-
* @returns {Object.<string,*>} Plain object
|
|
192
|
-
*/
|
|
193
|
-
QualifiedUserId.toObject = function toObject(message, options) {
|
|
194
|
-
if (!options)
|
|
195
|
-
options = {};
|
|
196
|
-
var object = {};
|
|
197
|
-
if (options.defaults) {
|
|
198
|
-
object.id = "";
|
|
199
|
-
object.domain = "";
|
|
200
|
-
}
|
|
201
|
-
if (message.id != null && message.hasOwnProperty("id"))
|
|
202
|
-
object.id = message.id;
|
|
203
|
-
if (message.domain != null && message.hasOwnProperty("domain"))
|
|
204
|
-
object.domain = message.domain;
|
|
205
|
-
return object;
|
|
206
|
-
};
|
|
207
|
-
|
|
208
|
-
/**
|
|
209
|
-
* Converts this QualifiedUserId to JSON.
|
|
210
|
-
* @function toJSON
|
|
211
|
-
* @memberof QualifiedUserId
|
|
212
|
-
* @instance
|
|
213
|
-
* @returns {Object.<string,*>} JSON object
|
|
214
|
-
*/
|
|
215
|
-
QualifiedUserId.prototype.toJSON = function toJSON() {
|
|
216
|
-
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
217
|
-
};
|
|
218
|
-
|
|
219
|
-
return QualifiedUserId;
|
|
220
|
-
})();
|
|
221
|
-
|
|
222
|
-
module.exports = $root;
|