@ondewo/sip-client-angular 3.1.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/LICENSE +191 -0
- package/README.md +27 -0
- package/api/ondewo/sip/sip.pb.d.ts +862 -0
- package/api/ondewo/sip/sip.pbconf.d.ts +6 -0
- package/api/ondewo/sip/sip.pbsc.d.ts +199 -0
- package/esm2020/api/ondewo/sip/sip.pb.mjs +1391 -0
- package/esm2020/api/ondewo/sip/sip.pbconf.mjs +13 -0
- package/esm2020/api/ondewo/sip/sip.pbsc.mjs +375 -0
- package/esm2020/ondewo-sip-client-angular.mjs +5 -0
- package/esm2020/public-api.mjs +4 -0
- package/fesm2015/ondewo-sip-client-angular.mjs +1768 -0
- package/fesm2015/ondewo-sip-client-angular.mjs.map +1 -0
- package/fesm2020/ondewo-sip-client-angular.mjs +1766 -0
- package/fesm2020/ondewo-sip-client-angular.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/ondewo-sip-api/README.md +86 -0
- package/package.json +49 -0
- package/public-api.d.ts +3 -0
|
@@ -0,0 +1,1766 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, Injectable, Optional, Inject } from '@angular/core';
|
|
3
|
+
import { uint8ArrayToBase64, GrpcCallType, GrpcMetadata } from '@ngx-grpc/common';
|
|
4
|
+
import * as i1 from '@ngx-grpc/core';
|
|
5
|
+
import { throwStatusErrors, takeMessages, GRPC_CLIENT_FACTORY } from '@ngx-grpc/core';
|
|
6
|
+
import { BinaryReader, BinaryWriter } from 'google-protobuf';
|
|
7
|
+
import * as googleProtobuf000 from '@ngx-grpc/well-known-types';
|
|
8
|
+
|
|
9
|
+
/* tslint:disable */
|
|
10
|
+
/**
|
|
11
|
+
* Message implementation for ondewo.sip.EndCallRequest
|
|
12
|
+
*/
|
|
13
|
+
class EndCallRequest {
|
|
14
|
+
/**
|
|
15
|
+
* Message constructor. Initializes the properties and applies default Protobuf values if necessary
|
|
16
|
+
* @param _value initial values object or instance of EndCallRequest to deeply clone from
|
|
17
|
+
*/
|
|
18
|
+
constructor(_value) {
|
|
19
|
+
_value = _value || {};
|
|
20
|
+
this.hardHangup = _value.hardHangup;
|
|
21
|
+
EndCallRequest.refineValues(this);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Deserialize binary data to message
|
|
25
|
+
* @param instance message instance
|
|
26
|
+
*/
|
|
27
|
+
static deserializeBinary(bytes) {
|
|
28
|
+
const instance = new EndCallRequest();
|
|
29
|
+
EndCallRequest.deserializeBinaryFromReader(instance, new BinaryReader(bytes));
|
|
30
|
+
return instance;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Check all the properties and set default protobuf values if necessary
|
|
34
|
+
* @param _instance message instance
|
|
35
|
+
*/
|
|
36
|
+
static refineValues(_instance) {
|
|
37
|
+
_instance.hardHangup = _instance.hardHangup || false;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Deserializes / reads binary message into message instance using provided binary reader
|
|
41
|
+
* @param _instance message instance
|
|
42
|
+
* @param _reader binary reader instance
|
|
43
|
+
*/
|
|
44
|
+
static deserializeBinaryFromReader(_instance, _reader) {
|
|
45
|
+
while (_reader.nextField()) {
|
|
46
|
+
if (_reader.isEndGroup())
|
|
47
|
+
break;
|
|
48
|
+
switch (_reader.getFieldNumber()) {
|
|
49
|
+
case 1:
|
|
50
|
+
_instance.hardHangup = _reader.readBool();
|
|
51
|
+
break;
|
|
52
|
+
default:
|
|
53
|
+
_reader.skipField();
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
EndCallRequest.refineValues(_instance);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Serializes a message to binary format using provided binary reader
|
|
60
|
+
* @param _instance message instance
|
|
61
|
+
* @param _writer binary writer instance
|
|
62
|
+
*/
|
|
63
|
+
static serializeBinaryToWriter(_instance, _writer) {
|
|
64
|
+
if (_instance.hardHangup) {
|
|
65
|
+
_writer.writeBool(1, _instance.hardHangup);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
get hardHangup() {
|
|
69
|
+
return this._hardHangup;
|
|
70
|
+
}
|
|
71
|
+
set hardHangup(value) {
|
|
72
|
+
this._hardHangup = value;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Serialize message to binary data
|
|
76
|
+
* @param instance message instance
|
|
77
|
+
*/
|
|
78
|
+
serializeBinary() {
|
|
79
|
+
const writer = new BinaryWriter();
|
|
80
|
+
EndCallRequest.serializeBinaryToWriter(this, writer);
|
|
81
|
+
return writer.getResultBuffer();
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Cast message to standard JavaScript object (all non-primitive values are deeply cloned)
|
|
85
|
+
*/
|
|
86
|
+
toObject() {
|
|
87
|
+
return {
|
|
88
|
+
hardHangup: this.hardHangup
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Convenience method to support JSON.stringify(message), replicates the structure of toObject()
|
|
93
|
+
*/
|
|
94
|
+
toJSON() {
|
|
95
|
+
return this.toObject();
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Cast message to JSON using protobuf JSON notation: https://developers.google.com/protocol-buffers/docs/proto3#json
|
|
99
|
+
* Attention: output differs from toObject() e.g. enums are represented as names and not as numbers, Timestamp is an ISO Date string format etc.
|
|
100
|
+
* If the message itself or some of descendant messages is google.protobuf.Any, you MUST provide a message pool as options. If not, the messagePool is not required
|
|
101
|
+
*/
|
|
102
|
+
toProtobufJSON(
|
|
103
|
+
// @ts-ignore
|
|
104
|
+
options) {
|
|
105
|
+
return {
|
|
106
|
+
hardHangup: this.hardHangup
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
EndCallRequest.id = 'ondewo.sip.EndCallRequest';
|
|
111
|
+
/**
|
|
112
|
+
* Message implementation for ondewo.sip.StartCallRequest
|
|
113
|
+
*/
|
|
114
|
+
class StartCallRequest {
|
|
115
|
+
/**
|
|
116
|
+
* Message constructor. Initializes the properties and applies default Protobuf values if necessary
|
|
117
|
+
* @param _value initial values object or instance of StartCallRequest to deeply clone from
|
|
118
|
+
*/
|
|
119
|
+
constructor(_value) {
|
|
120
|
+
_value = _value || {};
|
|
121
|
+
this.calleeId = _value.calleeId;
|
|
122
|
+
(this.headers = _value.headers
|
|
123
|
+
? Object.keys(_value.headers).reduce((r, k) => ({ ...r, [k]: _value.headers[k] }), {})
|
|
124
|
+
: {}),
|
|
125
|
+
StartCallRequest.refineValues(this);
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Deserialize binary data to message
|
|
129
|
+
* @param instance message instance
|
|
130
|
+
*/
|
|
131
|
+
static deserializeBinary(bytes) {
|
|
132
|
+
const instance = new StartCallRequest();
|
|
133
|
+
StartCallRequest.deserializeBinaryFromReader(instance, new BinaryReader(bytes));
|
|
134
|
+
return instance;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Check all the properties and set default protobuf values if necessary
|
|
138
|
+
* @param _instance message instance
|
|
139
|
+
*/
|
|
140
|
+
static refineValues(_instance) {
|
|
141
|
+
_instance.calleeId = _instance.calleeId || '';
|
|
142
|
+
_instance.headers = _instance.headers || {};
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Deserializes / reads binary message into message instance using provided binary reader
|
|
146
|
+
* @param _instance message instance
|
|
147
|
+
* @param _reader binary reader instance
|
|
148
|
+
*/
|
|
149
|
+
static deserializeBinaryFromReader(_instance, _reader) {
|
|
150
|
+
while (_reader.nextField()) {
|
|
151
|
+
if (_reader.isEndGroup())
|
|
152
|
+
break;
|
|
153
|
+
switch (_reader.getFieldNumber()) {
|
|
154
|
+
case 1:
|
|
155
|
+
_instance.calleeId = _reader.readString();
|
|
156
|
+
break;
|
|
157
|
+
case 2:
|
|
158
|
+
const msg_2 = {};
|
|
159
|
+
_reader.readMessage(msg_2, StartCallRequest.HeadersEntry.deserializeBinaryFromReader);
|
|
160
|
+
_instance.headers = _instance.headers || {};
|
|
161
|
+
_instance.headers[msg_2.key] = msg_2.value;
|
|
162
|
+
break;
|
|
163
|
+
default:
|
|
164
|
+
_reader.skipField();
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
StartCallRequest.refineValues(_instance);
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Serializes a message to binary format using provided binary reader
|
|
171
|
+
* @param _instance message instance
|
|
172
|
+
* @param _writer binary writer instance
|
|
173
|
+
*/
|
|
174
|
+
static serializeBinaryToWriter(_instance, _writer) {
|
|
175
|
+
if (_instance.calleeId) {
|
|
176
|
+
_writer.writeString(1, _instance.calleeId);
|
|
177
|
+
}
|
|
178
|
+
if (!!_instance.headers) {
|
|
179
|
+
const keys_2 = Object.keys(_instance.headers);
|
|
180
|
+
if (keys_2.length) {
|
|
181
|
+
const repeated_2 = keys_2
|
|
182
|
+
.map(key => ({ key: key, value: _instance.headers[key] }))
|
|
183
|
+
.reduce((r, v) => [...r, v], []);
|
|
184
|
+
_writer.writeRepeatedMessage(2, repeated_2, StartCallRequest.HeadersEntry.serializeBinaryToWriter);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
get calleeId() {
|
|
189
|
+
return this._calleeId;
|
|
190
|
+
}
|
|
191
|
+
set calleeId(value) {
|
|
192
|
+
this._calleeId = value;
|
|
193
|
+
}
|
|
194
|
+
get headers() {
|
|
195
|
+
return this._headers;
|
|
196
|
+
}
|
|
197
|
+
set headers(value) {
|
|
198
|
+
this._headers = value;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Serialize message to binary data
|
|
202
|
+
* @param instance message instance
|
|
203
|
+
*/
|
|
204
|
+
serializeBinary() {
|
|
205
|
+
const writer = new BinaryWriter();
|
|
206
|
+
StartCallRequest.serializeBinaryToWriter(this, writer);
|
|
207
|
+
return writer.getResultBuffer();
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Cast message to standard JavaScript object (all non-primitive values are deeply cloned)
|
|
211
|
+
*/
|
|
212
|
+
toObject() {
|
|
213
|
+
return {
|
|
214
|
+
calleeId: this.calleeId,
|
|
215
|
+
headers: this.headers
|
|
216
|
+
? Object.keys(this.headers).reduce((r, k) => ({ ...r, [k]: this.headers[k] }), {})
|
|
217
|
+
: {}
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* Convenience method to support JSON.stringify(message), replicates the structure of toObject()
|
|
222
|
+
*/
|
|
223
|
+
toJSON() {
|
|
224
|
+
return this.toObject();
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Cast message to JSON using protobuf JSON notation: https://developers.google.com/protocol-buffers/docs/proto3#json
|
|
228
|
+
* Attention: output differs from toObject() e.g. enums are represented as names and not as numbers, Timestamp is an ISO Date string format etc.
|
|
229
|
+
* If the message itself or some of descendant messages is google.protobuf.Any, you MUST provide a message pool as options. If not, the messagePool is not required
|
|
230
|
+
*/
|
|
231
|
+
toProtobufJSON(
|
|
232
|
+
// @ts-ignore
|
|
233
|
+
options) {
|
|
234
|
+
return {
|
|
235
|
+
calleeId: this.calleeId,
|
|
236
|
+
headers: this.headers
|
|
237
|
+
? Object.keys(this.headers).reduce((r, k) => ({ ...r, [k]: this.headers[k] }), {})
|
|
238
|
+
: {}
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
StartCallRequest.id = 'ondewo.sip.StartCallRequest';
|
|
243
|
+
(function (StartCallRequest) {
|
|
244
|
+
/**
|
|
245
|
+
* Message implementation for ondewo.sip.HeadersEntry
|
|
246
|
+
*/
|
|
247
|
+
class HeadersEntry {
|
|
248
|
+
/**
|
|
249
|
+
* Message constructor. Initializes the properties and applies default Protobuf values if necessary
|
|
250
|
+
* @param _value initial values object or instance of HeadersEntry to deeply clone from
|
|
251
|
+
*/
|
|
252
|
+
constructor(_value) {
|
|
253
|
+
_value = _value || {};
|
|
254
|
+
this.key = _value.key;
|
|
255
|
+
this.value = _value.value;
|
|
256
|
+
HeadersEntry.refineValues(this);
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* Deserialize binary data to message
|
|
260
|
+
* @param instance message instance
|
|
261
|
+
*/
|
|
262
|
+
static deserializeBinary(bytes) {
|
|
263
|
+
const instance = new HeadersEntry();
|
|
264
|
+
HeadersEntry.deserializeBinaryFromReader(instance, new BinaryReader(bytes));
|
|
265
|
+
return instance;
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* Check all the properties and set default protobuf values if necessary
|
|
269
|
+
* @param _instance message instance
|
|
270
|
+
*/
|
|
271
|
+
static refineValues(_instance) {
|
|
272
|
+
_instance.key = _instance.key || '';
|
|
273
|
+
_instance.value = _instance.value || '';
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* Deserializes / reads binary message into message instance using provided binary reader
|
|
277
|
+
* @param _instance message instance
|
|
278
|
+
* @param _reader binary reader instance
|
|
279
|
+
*/
|
|
280
|
+
static deserializeBinaryFromReader(_instance, _reader) {
|
|
281
|
+
while (_reader.nextField()) {
|
|
282
|
+
if (_reader.isEndGroup())
|
|
283
|
+
break;
|
|
284
|
+
switch (_reader.getFieldNumber()) {
|
|
285
|
+
case 1:
|
|
286
|
+
_instance.key = _reader.readString();
|
|
287
|
+
break;
|
|
288
|
+
case 2:
|
|
289
|
+
_instance.value = _reader.readString();
|
|
290
|
+
break;
|
|
291
|
+
default:
|
|
292
|
+
_reader.skipField();
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
HeadersEntry.refineValues(_instance);
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* Serializes a message to binary format using provided binary reader
|
|
299
|
+
* @param _instance message instance
|
|
300
|
+
* @param _writer binary writer instance
|
|
301
|
+
*/
|
|
302
|
+
static serializeBinaryToWriter(_instance, _writer) {
|
|
303
|
+
if (_instance.key) {
|
|
304
|
+
_writer.writeString(1, _instance.key);
|
|
305
|
+
}
|
|
306
|
+
if (_instance.value) {
|
|
307
|
+
_writer.writeString(2, _instance.value);
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
get key() {
|
|
311
|
+
return this._key;
|
|
312
|
+
}
|
|
313
|
+
set key(value) {
|
|
314
|
+
this._key = value;
|
|
315
|
+
}
|
|
316
|
+
get value() {
|
|
317
|
+
return this._value;
|
|
318
|
+
}
|
|
319
|
+
set value(value) {
|
|
320
|
+
this._value = value;
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* Serialize message to binary data
|
|
324
|
+
* @param instance message instance
|
|
325
|
+
*/
|
|
326
|
+
serializeBinary() {
|
|
327
|
+
const writer = new BinaryWriter();
|
|
328
|
+
HeadersEntry.serializeBinaryToWriter(this, writer);
|
|
329
|
+
return writer.getResultBuffer();
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* Cast message to standard JavaScript object (all non-primitive values are deeply cloned)
|
|
333
|
+
*/
|
|
334
|
+
toObject() {
|
|
335
|
+
return {
|
|
336
|
+
key: this.key,
|
|
337
|
+
value: this.value
|
|
338
|
+
};
|
|
339
|
+
}
|
|
340
|
+
/**
|
|
341
|
+
* Convenience method to support JSON.stringify(message), replicates the structure of toObject()
|
|
342
|
+
*/
|
|
343
|
+
toJSON() {
|
|
344
|
+
return this.toObject();
|
|
345
|
+
}
|
|
346
|
+
/**
|
|
347
|
+
* Cast message to JSON using protobuf JSON notation: https://developers.google.com/protocol-buffers/docs/proto3#json
|
|
348
|
+
* Attention: output differs from toObject() e.g. enums are represented as names and not as numbers, Timestamp is an ISO Date string format etc.
|
|
349
|
+
* If the message itself or some of descendant messages is google.protobuf.Any, you MUST provide a message pool as options. If not, the messagePool is not required
|
|
350
|
+
*/
|
|
351
|
+
toProtobufJSON(
|
|
352
|
+
// @ts-ignore
|
|
353
|
+
options) {
|
|
354
|
+
return {
|
|
355
|
+
key: this.key,
|
|
356
|
+
value: this.value
|
|
357
|
+
};
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
HeadersEntry.id = 'ondewo.sip.HeadersEntry';
|
|
361
|
+
StartCallRequest.HeadersEntry = HeadersEntry;
|
|
362
|
+
})(StartCallRequest || (StartCallRequest = {}));
|
|
363
|
+
/**
|
|
364
|
+
* Message implementation for ondewo.sip.RegisterAccountRequest
|
|
365
|
+
*/
|
|
366
|
+
class RegisterAccountRequest {
|
|
367
|
+
/**
|
|
368
|
+
* Message constructor. Initializes the properties and applies default Protobuf values if necessary
|
|
369
|
+
* @param _value initial values object or instance of RegisterAccountRequest to deeply clone from
|
|
370
|
+
*/
|
|
371
|
+
constructor(_value) {
|
|
372
|
+
_value = _value || {};
|
|
373
|
+
this.accountName = _value.accountName;
|
|
374
|
+
this.password = _value.password;
|
|
375
|
+
RegisterAccountRequest.refineValues(this);
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* Deserialize binary data to message
|
|
379
|
+
* @param instance message instance
|
|
380
|
+
*/
|
|
381
|
+
static deserializeBinary(bytes) {
|
|
382
|
+
const instance = new RegisterAccountRequest();
|
|
383
|
+
RegisterAccountRequest.deserializeBinaryFromReader(instance, new BinaryReader(bytes));
|
|
384
|
+
return instance;
|
|
385
|
+
}
|
|
386
|
+
/**
|
|
387
|
+
* Check all the properties and set default protobuf values if necessary
|
|
388
|
+
* @param _instance message instance
|
|
389
|
+
*/
|
|
390
|
+
static refineValues(_instance) {
|
|
391
|
+
_instance.accountName = _instance.accountName || '';
|
|
392
|
+
_instance.password = _instance.password || '';
|
|
393
|
+
}
|
|
394
|
+
/**
|
|
395
|
+
* Deserializes / reads binary message into message instance using provided binary reader
|
|
396
|
+
* @param _instance message instance
|
|
397
|
+
* @param _reader binary reader instance
|
|
398
|
+
*/
|
|
399
|
+
static deserializeBinaryFromReader(_instance, _reader) {
|
|
400
|
+
while (_reader.nextField()) {
|
|
401
|
+
if (_reader.isEndGroup())
|
|
402
|
+
break;
|
|
403
|
+
switch (_reader.getFieldNumber()) {
|
|
404
|
+
case 1:
|
|
405
|
+
_instance.accountName = _reader.readString();
|
|
406
|
+
break;
|
|
407
|
+
case 2:
|
|
408
|
+
_instance.password = _reader.readString();
|
|
409
|
+
break;
|
|
410
|
+
default:
|
|
411
|
+
_reader.skipField();
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
RegisterAccountRequest.refineValues(_instance);
|
|
415
|
+
}
|
|
416
|
+
/**
|
|
417
|
+
* Serializes a message to binary format using provided binary reader
|
|
418
|
+
* @param _instance message instance
|
|
419
|
+
* @param _writer binary writer instance
|
|
420
|
+
*/
|
|
421
|
+
static serializeBinaryToWriter(_instance, _writer) {
|
|
422
|
+
if (_instance.accountName) {
|
|
423
|
+
_writer.writeString(1, _instance.accountName);
|
|
424
|
+
}
|
|
425
|
+
if (_instance.password) {
|
|
426
|
+
_writer.writeString(2, _instance.password);
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
get accountName() {
|
|
430
|
+
return this._accountName;
|
|
431
|
+
}
|
|
432
|
+
set accountName(value) {
|
|
433
|
+
this._accountName = value;
|
|
434
|
+
}
|
|
435
|
+
get password() {
|
|
436
|
+
return this._password;
|
|
437
|
+
}
|
|
438
|
+
set password(value) {
|
|
439
|
+
this._password = value;
|
|
440
|
+
}
|
|
441
|
+
/**
|
|
442
|
+
* Serialize message to binary data
|
|
443
|
+
* @param instance message instance
|
|
444
|
+
*/
|
|
445
|
+
serializeBinary() {
|
|
446
|
+
const writer = new BinaryWriter();
|
|
447
|
+
RegisterAccountRequest.serializeBinaryToWriter(this, writer);
|
|
448
|
+
return writer.getResultBuffer();
|
|
449
|
+
}
|
|
450
|
+
/**
|
|
451
|
+
* Cast message to standard JavaScript object (all non-primitive values are deeply cloned)
|
|
452
|
+
*/
|
|
453
|
+
toObject() {
|
|
454
|
+
return {
|
|
455
|
+
accountName: this.accountName,
|
|
456
|
+
password: this.password
|
|
457
|
+
};
|
|
458
|
+
}
|
|
459
|
+
/**
|
|
460
|
+
* Convenience method to support JSON.stringify(message), replicates the structure of toObject()
|
|
461
|
+
*/
|
|
462
|
+
toJSON() {
|
|
463
|
+
return this.toObject();
|
|
464
|
+
}
|
|
465
|
+
/**
|
|
466
|
+
* Cast message to JSON using protobuf JSON notation: https://developers.google.com/protocol-buffers/docs/proto3#json
|
|
467
|
+
* Attention: output differs from toObject() e.g. enums are represented as names and not as numbers, Timestamp is an ISO Date string format etc.
|
|
468
|
+
* If the message itself or some of descendant messages is google.protobuf.Any, you MUST provide a message pool as options. If not, the messagePool is not required
|
|
469
|
+
*/
|
|
470
|
+
toProtobufJSON(
|
|
471
|
+
// @ts-ignore
|
|
472
|
+
options) {
|
|
473
|
+
return {
|
|
474
|
+
accountName: this.accountName,
|
|
475
|
+
password: this.password
|
|
476
|
+
};
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
RegisterAccountRequest.id = 'ondewo.sip.RegisterAccountRequest';
|
|
480
|
+
/**
|
|
481
|
+
* Message implementation for ondewo.sip.StartSessionRequest
|
|
482
|
+
*/
|
|
483
|
+
class StartSessionRequest {
|
|
484
|
+
/**
|
|
485
|
+
* Message constructor. Initializes the properties and applies default Protobuf values if necessary
|
|
486
|
+
* @param _value initial values object or instance of StartSessionRequest to deeply clone from
|
|
487
|
+
*/
|
|
488
|
+
constructor(_value) {
|
|
489
|
+
_value = _value || {};
|
|
490
|
+
this.accountName = _value.accountName;
|
|
491
|
+
this.autoAnswerInterval = _value.autoAnswerInterval;
|
|
492
|
+
StartSessionRequest.refineValues(this);
|
|
493
|
+
}
|
|
494
|
+
/**
|
|
495
|
+
* Deserialize binary data to message
|
|
496
|
+
* @param instance message instance
|
|
497
|
+
*/
|
|
498
|
+
static deserializeBinary(bytes) {
|
|
499
|
+
const instance = new StartSessionRequest();
|
|
500
|
+
StartSessionRequest.deserializeBinaryFromReader(instance, new BinaryReader(bytes));
|
|
501
|
+
return instance;
|
|
502
|
+
}
|
|
503
|
+
/**
|
|
504
|
+
* Check all the properties and set default protobuf values if necessary
|
|
505
|
+
* @param _instance message instance
|
|
506
|
+
*/
|
|
507
|
+
static refineValues(_instance) {
|
|
508
|
+
_instance.accountName = _instance.accountName || '';
|
|
509
|
+
_instance.autoAnswerInterval = _instance.autoAnswerInterval || 0;
|
|
510
|
+
}
|
|
511
|
+
/**
|
|
512
|
+
* Deserializes / reads binary message into message instance using provided binary reader
|
|
513
|
+
* @param _instance message instance
|
|
514
|
+
* @param _reader binary reader instance
|
|
515
|
+
*/
|
|
516
|
+
static deserializeBinaryFromReader(_instance, _reader) {
|
|
517
|
+
while (_reader.nextField()) {
|
|
518
|
+
if (_reader.isEndGroup())
|
|
519
|
+
break;
|
|
520
|
+
switch (_reader.getFieldNumber()) {
|
|
521
|
+
case 1:
|
|
522
|
+
_instance.accountName = _reader.readString();
|
|
523
|
+
break;
|
|
524
|
+
case 2:
|
|
525
|
+
_instance.autoAnswerInterval = _reader.readInt32();
|
|
526
|
+
break;
|
|
527
|
+
default:
|
|
528
|
+
_reader.skipField();
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
StartSessionRequest.refineValues(_instance);
|
|
532
|
+
}
|
|
533
|
+
/**
|
|
534
|
+
* Serializes a message to binary format using provided binary reader
|
|
535
|
+
* @param _instance message instance
|
|
536
|
+
* @param _writer binary writer instance
|
|
537
|
+
*/
|
|
538
|
+
static serializeBinaryToWriter(_instance, _writer) {
|
|
539
|
+
if (_instance.accountName) {
|
|
540
|
+
_writer.writeString(1, _instance.accountName);
|
|
541
|
+
}
|
|
542
|
+
if (_instance.autoAnswerInterval) {
|
|
543
|
+
_writer.writeInt32(2, _instance.autoAnswerInterval);
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
get accountName() {
|
|
547
|
+
return this._accountName;
|
|
548
|
+
}
|
|
549
|
+
set accountName(value) {
|
|
550
|
+
this._accountName = value;
|
|
551
|
+
}
|
|
552
|
+
get autoAnswerInterval() {
|
|
553
|
+
return this._autoAnswerInterval;
|
|
554
|
+
}
|
|
555
|
+
set autoAnswerInterval(value) {
|
|
556
|
+
this._autoAnswerInterval = value;
|
|
557
|
+
}
|
|
558
|
+
/**
|
|
559
|
+
* Serialize message to binary data
|
|
560
|
+
* @param instance message instance
|
|
561
|
+
*/
|
|
562
|
+
serializeBinary() {
|
|
563
|
+
const writer = new BinaryWriter();
|
|
564
|
+
StartSessionRequest.serializeBinaryToWriter(this, writer);
|
|
565
|
+
return writer.getResultBuffer();
|
|
566
|
+
}
|
|
567
|
+
/**
|
|
568
|
+
* Cast message to standard JavaScript object (all non-primitive values are deeply cloned)
|
|
569
|
+
*/
|
|
570
|
+
toObject() {
|
|
571
|
+
return {
|
|
572
|
+
accountName: this.accountName,
|
|
573
|
+
autoAnswerInterval: this.autoAnswerInterval
|
|
574
|
+
};
|
|
575
|
+
}
|
|
576
|
+
/**
|
|
577
|
+
* Convenience method to support JSON.stringify(message), replicates the structure of toObject()
|
|
578
|
+
*/
|
|
579
|
+
toJSON() {
|
|
580
|
+
return this.toObject();
|
|
581
|
+
}
|
|
582
|
+
/**
|
|
583
|
+
* Cast message to JSON using protobuf JSON notation: https://developers.google.com/protocol-buffers/docs/proto3#json
|
|
584
|
+
* Attention: output differs from toObject() e.g. enums are represented as names and not as numbers, Timestamp is an ISO Date string format etc.
|
|
585
|
+
* If the message itself or some of descendant messages is google.protobuf.Any, you MUST provide a message pool as options. If not, the messagePool is not required
|
|
586
|
+
*/
|
|
587
|
+
toProtobufJSON(
|
|
588
|
+
// @ts-ignore
|
|
589
|
+
options) {
|
|
590
|
+
return {
|
|
591
|
+
accountName: this.accountName,
|
|
592
|
+
autoAnswerInterval: this.autoAnswerInterval
|
|
593
|
+
};
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
StartSessionRequest.id = 'ondewo.sip.StartSessionRequest';
|
|
597
|
+
/**
|
|
598
|
+
* Message implementation for ondewo.sip.TransferCallRequest
|
|
599
|
+
*/
|
|
600
|
+
class TransferCallRequest {
|
|
601
|
+
/**
|
|
602
|
+
* Message constructor. Initializes the properties and applies default Protobuf values if necessary
|
|
603
|
+
* @param _value initial values object or instance of TransferCallRequest to deeply clone from
|
|
604
|
+
*/
|
|
605
|
+
constructor(_value) {
|
|
606
|
+
_value = _value || {};
|
|
607
|
+
this.transferId = _value.transferId;
|
|
608
|
+
(this.headers = _value.headers
|
|
609
|
+
? Object.keys(_value.headers).reduce((r, k) => ({ ...r, [k]: _value.headers[k] }), {})
|
|
610
|
+
: {}),
|
|
611
|
+
TransferCallRequest.refineValues(this);
|
|
612
|
+
}
|
|
613
|
+
/**
|
|
614
|
+
* Deserialize binary data to message
|
|
615
|
+
* @param instance message instance
|
|
616
|
+
*/
|
|
617
|
+
static deserializeBinary(bytes) {
|
|
618
|
+
const instance = new TransferCallRequest();
|
|
619
|
+
TransferCallRequest.deserializeBinaryFromReader(instance, new BinaryReader(bytes));
|
|
620
|
+
return instance;
|
|
621
|
+
}
|
|
622
|
+
/**
|
|
623
|
+
* Check all the properties and set default protobuf values if necessary
|
|
624
|
+
* @param _instance message instance
|
|
625
|
+
*/
|
|
626
|
+
static refineValues(_instance) {
|
|
627
|
+
_instance.transferId = _instance.transferId || '';
|
|
628
|
+
_instance.headers = _instance.headers || {};
|
|
629
|
+
}
|
|
630
|
+
/**
|
|
631
|
+
* Deserializes / reads binary message into message instance using provided binary reader
|
|
632
|
+
* @param _instance message instance
|
|
633
|
+
* @param _reader binary reader instance
|
|
634
|
+
*/
|
|
635
|
+
static deserializeBinaryFromReader(_instance, _reader) {
|
|
636
|
+
while (_reader.nextField()) {
|
|
637
|
+
if (_reader.isEndGroup())
|
|
638
|
+
break;
|
|
639
|
+
switch (_reader.getFieldNumber()) {
|
|
640
|
+
case 1:
|
|
641
|
+
_instance.transferId = _reader.readString();
|
|
642
|
+
break;
|
|
643
|
+
case 2:
|
|
644
|
+
const msg_2 = {};
|
|
645
|
+
_reader.readMessage(msg_2, TransferCallRequest.HeadersEntry.deserializeBinaryFromReader);
|
|
646
|
+
_instance.headers = _instance.headers || {};
|
|
647
|
+
_instance.headers[msg_2.key] = msg_2.value;
|
|
648
|
+
break;
|
|
649
|
+
default:
|
|
650
|
+
_reader.skipField();
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
TransferCallRequest.refineValues(_instance);
|
|
654
|
+
}
|
|
655
|
+
/**
|
|
656
|
+
* Serializes a message to binary format using provided binary reader
|
|
657
|
+
* @param _instance message instance
|
|
658
|
+
* @param _writer binary writer instance
|
|
659
|
+
*/
|
|
660
|
+
static serializeBinaryToWriter(_instance, _writer) {
|
|
661
|
+
if (_instance.transferId) {
|
|
662
|
+
_writer.writeString(1, _instance.transferId);
|
|
663
|
+
}
|
|
664
|
+
if (!!_instance.headers) {
|
|
665
|
+
const keys_2 = Object.keys(_instance.headers);
|
|
666
|
+
if (keys_2.length) {
|
|
667
|
+
const repeated_2 = keys_2
|
|
668
|
+
.map(key => ({ key: key, value: _instance.headers[key] }))
|
|
669
|
+
.reduce((r, v) => [...r, v], []);
|
|
670
|
+
_writer.writeRepeatedMessage(2, repeated_2, TransferCallRequest.HeadersEntry.serializeBinaryToWriter);
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
get transferId() {
|
|
675
|
+
return this._transferId;
|
|
676
|
+
}
|
|
677
|
+
set transferId(value) {
|
|
678
|
+
this._transferId = value;
|
|
679
|
+
}
|
|
680
|
+
get headers() {
|
|
681
|
+
return this._headers;
|
|
682
|
+
}
|
|
683
|
+
set headers(value) {
|
|
684
|
+
this._headers = value;
|
|
685
|
+
}
|
|
686
|
+
/**
|
|
687
|
+
* Serialize message to binary data
|
|
688
|
+
* @param instance message instance
|
|
689
|
+
*/
|
|
690
|
+
serializeBinary() {
|
|
691
|
+
const writer = new BinaryWriter();
|
|
692
|
+
TransferCallRequest.serializeBinaryToWriter(this, writer);
|
|
693
|
+
return writer.getResultBuffer();
|
|
694
|
+
}
|
|
695
|
+
/**
|
|
696
|
+
* Cast message to standard JavaScript object (all non-primitive values are deeply cloned)
|
|
697
|
+
*/
|
|
698
|
+
toObject() {
|
|
699
|
+
return {
|
|
700
|
+
transferId: this.transferId,
|
|
701
|
+
headers: this.headers
|
|
702
|
+
? Object.keys(this.headers).reduce((r, k) => ({ ...r, [k]: this.headers[k] }), {})
|
|
703
|
+
: {}
|
|
704
|
+
};
|
|
705
|
+
}
|
|
706
|
+
/**
|
|
707
|
+
* Convenience method to support JSON.stringify(message), replicates the structure of toObject()
|
|
708
|
+
*/
|
|
709
|
+
toJSON() {
|
|
710
|
+
return this.toObject();
|
|
711
|
+
}
|
|
712
|
+
/**
|
|
713
|
+
* Cast message to JSON using protobuf JSON notation: https://developers.google.com/protocol-buffers/docs/proto3#json
|
|
714
|
+
* Attention: output differs from toObject() e.g. enums are represented as names and not as numbers, Timestamp is an ISO Date string format etc.
|
|
715
|
+
* If the message itself or some of descendant messages is google.protobuf.Any, you MUST provide a message pool as options. If not, the messagePool is not required
|
|
716
|
+
*/
|
|
717
|
+
toProtobufJSON(
|
|
718
|
+
// @ts-ignore
|
|
719
|
+
options) {
|
|
720
|
+
return {
|
|
721
|
+
transferId: this.transferId,
|
|
722
|
+
headers: this.headers
|
|
723
|
+
? Object.keys(this.headers).reduce((r, k) => ({ ...r, [k]: this.headers[k] }), {})
|
|
724
|
+
: {}
|
|
725
|
+
};
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
TransferCallRequest.id = 'ondewo.sip.TransferCallRequest';
|
|
729
|
+
(function (TransferCallRequest) {
|
|
730
|
+
/**
|
|
731
|
+
* Message implementation for ondewo.sip.HeadersEntry
|
|
732
|
+
*/
|
|
733
|
+
class HeadersEntry {
|
|
734
|
+
/**
|
|
735
|
+
* Message constructor. Initializes the properties and applies default Protobuf values if necessary
|
|
736
|
+
* @param _value initial values object or instance of HeadersEntry to deeply clone from
|
|
737
|
+
*/
|
|
738
|
+
constructor(_value) {
|
|
739
|
+
_value = _value || {};
|
|
740
|
+
this.key = _value.key;
|
|
741
|
+
this.value = _value.value;
|
|
742
|
+
HeadersEntry.refineValues(this);
|
|
743
|
+
}
|
|
744
|
+
/**
|
|
745
|
+
* Deserialize binary data to message
|
|
746
|
+
* @param instance message instance
|
|
747
|
+
*/
|
|
748
|
+
static deserializeBinary(bytes) {
|
|
749
|
+
const instance = new HeadersEntry();
|
|
750
|
+
HeadersEntry.deserializeBinaryFromReader(instance, new BinaryReader(bytes));
|
|
751
|
+
return instance;
|
|
752
|
+
}
|
|
753
|
+
/**
|
|
754
|
+
* Check all the properties and set default protobuf values if necessary
|
|
755
|
+
* @param _instance message instance
|
|
756
|
+
*/
|
|
757
|
+
static refineValues(_instance) {
|
|
758
|
+
_instance.key = _instance.key || '';
|
|
759
|
+
_instance.value = _instance.value || '';
|
|
760
|
+
}
|
|
761
|
+
/**
|
|
762
|
+
* Deserializes / reads binary message into message instance using provided binary reader
|
|
763
|
+
* @param _instance message instance
|
|
764
|
+
* @param _reader binary reader instance
|
|
765
|
+
*/
|
|
766
|
+
static deserializeBinaryFromReader(_instance, _reader) {
|
|
767
|
+
while (_reader.nextField()) {
|
|
768
|
+
if (_reader.isEndGroup())
|
|
769
|
+
break;
|
|
770
|
+
switch (_reader.getFieldNumber()) {
|
|
771
|
+
case 1:
|
|
772
|
+
_instance.key = _reader.readString();
|
|
773
|
+
break;
|
|
774
|
+
case 2:
|
|
775
|
+
_instance.value = _reader.readString();
|
|
776
|
+
break;
|
|
777
|
+
default:
|
|
778
|
+
_reader.skipField();
|
|
779
|
+
}
|
|
780
|
+
}
|
|
781
|
+
HeadersEntry.refineValues(_instance);
|
|
782
|
+
}
|
|
783
|
+
/**
|
|
784
|
+
* Serializes a message to binary format using provided binary reader
|
|
785
|
+
* @param _instance message instance
|
|
786
|
+
* @param _writer binary writer instance
|
|
787
|
+
*/
|
|
788
|
+
static serializeBinaryToWriter(_instance, _writer) {
|
|
789
|
+
if (_instance.key) {
|
|
790
|
+
_writer.writeString(1, _instance.key);
|
|
791
|
+
}
|
|
792
|
+
if (_instance.value) {
|
|
793
|
+
_writer.writeString(2, _instance.value);
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
get key() {
|
|
797
|
+
return this._key;
|
|
798
|
+
}
|
|
799
|
+
set key(value) {
|
|
800
|
+
this._key = value;
|
|
801
|
+
}
|
|
802
|
+
get value() {
|
|
803
|
+
return this._value;
|
|
804
|
+
}
|
|
805
|
+
set value(value) {
|
|
806
|
+
this._value = value;
|
|
807
|
+
}
|
|
808
|
+
/**
|
|
809
|
+
* Serialize message to binary data
|
|
810
|
+
* @param instance message instance
|
|
811
|
+
*/
|
|
812
|
+
serializeBinary() {
|
|
813
|
+
const writer = new BinaryWriter();
|
|
814
|
+
HeadersEntry.serializeBinaryToWriter(this, writer);
|
|
815
|
+
return writer.getResultBuffer();
|
|
816
|
+
}
|
|
817
|
+
/**
|
|
818
|
+
* Cast message to standard JavaScript object (all non-primitive values are deeply cloned)
|
|
819
|
+
*/
|
|
820
|
+
toObject() {
|
|
821
|
+
return {
|
|
822
|
+
key: this.key,
|
|
823
|
+
value: this.value
|
|
824
|
+
};
|
|
825
|
+
}
|
|
826
|
+
/**
|
|
827
|
+
* Convenience method to support JSON.stringify(message), replicates the structure of toObject()
|
|
828
|
+
*/
|
|
829
|
+
toJSON() {
|
|
830
|
+
return this.toObject();
|
|
831
|
+
}
|
|
832
|
+
/**
|
|
833
|
+
* Cast message to JSON using protobuf JSON notation: https://developers.google.com/protocol-buffers/docs/proto3#json
|
|
834
|
+
* Attention: output differs from toObject() e.g. enums are represented as names and not as numbers, Timestamp is an ISO Date string format etc.
|
|
835
|
+
* If the message itself or some of descendant messages is google.protobuf.Any, you MUST provide a message pool as options. If not, the messagePool is not required
|
|
836
|
+
*/
|
|
837
|
+
toProtobufJSON(
|
|
838
|
+
// @ts-ignore
|
|
839
|
+
options) {
|
|
840
|
+
return {
|
|
841
|
+
key: this.key,
|
|
842
|
+
value: this.value
|
|
843
|
+
};
|
|
844
|
+
}
|
|
845
|
+
}
|
|
846
|
+
HeadersEntry.id = 'ondewo.sip.HeadersEntry';
|
|
847
|
+
TransferCallRequest.HeadersEntry = HeadersEntry;
|
|
848
|
+
})(TransferCallRequest || (TransferCallRequest = {}));
|
|
849
|
+
/**
|
|
850
|
+
* Message implementation for ondewo.sip.SipStatus
|
|
851
|
+
*/
|
|
852
|
+
class SipStatus {
|
|
853
|
+
/**
|
|
854
|
+
* Message constructor. Initializes the properties and applies default Protobuf values if necessary
|
|
855
|
+
* @param _value initial values object or instance of SipStatus to deeply clone from
|
|
856
|
+
*/
|
|
857
|
+
constructor(_value) {
|
|
858
|
+
_value = _value || {};
|
|
859
|
+
this.accountName = _value.accountName;
|
|
860
|
+
this.timestamp = _value.timestamp
|
|
861
|
+
? new googleProtobuf000.Timestamp(_value.timestamp)
|
|
862
|
+
: undefined;
|
|
863
|
+
this.statusType = _value.statusType;
|
|
864
|
+
this.calleeId = _value.calleeId;
|
|
865
|
+
this.transferCallId = _value.transferCallId;
|
|
866
|
+
(this.headers = _value.headers
|
|
867
|
+
? Object.keys(_value.headers).reduce((r, k) => ({ ...r, [k]: _value.headers[k] }), {})
|
|
868
|
+
: {}),
|
|
869
|
+
SipStatus.refineValues(this);
|
|
870
|
+
}
|
|
871
|
+
/**
|
|
872
|
+
* Deserialize binary data to message
|
|
873
|
+
* @param instance message instance
|
|
874
|
+
*/
|
|
875
|
+
static deserializeBinary(bytes) {
|
|
876
|
+
const instance = new SipStatus();
|
|
877
|
+
SipStatus.deserializeBinaryFromReader(instance, new BinaryReader(bytes));
|
|
878
|
+
return instance;
|
|
879
|
+
}
|
|
880
|
+
/**
|
|
881
|
+
* Check all the properties and set default protobuf values if necessary
|
|
882
|
+
* @param _instance message instance
|
|
883
|
+
*/
|
|
884
|
+
static refineValues(_instance) {
|
|
885
|
+
_instance.accountName = _instance.accountName || '';
|
|
886
|
+
_instance.timestamp = _instance.timestamp || undefined;
|
|
887
|
+
_instance.statusType = _instance.statusType || 0;
|
|
888
|
+
_instance.calleeId = _instance.calleeId || '';
|
|
889
|
+
_instance.transferCallId = _instance.transferCallId || '';
|
|
890
|
+
_instance.headers = _instance.headers || {};
|
|
891
|
+
}
|
|
892
|
+
/**
|
|
893
|
+
* Deserializes / reads binary message into message instance using provided binary reader
|
|
894
|
+
* @param _instance message instance
|
|
895
|
+
* @param _reader binary reader instance
|
|
896
|
+
*/
|
|
897
|
+
static deserializeBinaryFromReader(_instance, _reader) {
|
|
898
|
+
while (_reader.nextField()) {
|
|
899
|
+
if (_reader.isEndGroup())
|
|
900
|
+
break;
|
|
901
|
+
switch (_reader.getFieldNumber()) {
|
|
902
|
+
case 1:
|
|
903
|
+
_instance.accountName = _reader.readString();
|
|
904
|
+
break;
|
|
905
|
+
case 2:
|
|
906
|
+
_instance.timestamp = new googleProtobuf000.Timestamp();
|
|
907
|
+
_reader.readMessage(_instance.timestamp, googleProtobuf000.Timestamp.deserializeBinaryFromReader);
|
|
908
|
+
break;
|
|
909
|
+
case 3:
|
|
910
|
+
_instance.statusType = _reader.readEnum();
|
|
911
|
+
break;
|
|
912
|
+
case 4:
|
|
913
|
+
_instance.calleeId = _reader.readString();
|
|
914
|
+
break;
|
|
915
|
+
case 5:
|
|
916
|
+
_instance.transferCallId = _reader.readString();
|
|
917
|
+
break;
|
|
918
|
+
case 6:
|
|
919
|
+
const msg_6 = {};
|
|
920
|
+
_reader.readMessage(msg_6, SipStatus.HeadersEntry.deserializeBinaryFromReader);
|
|
921
|
+
_instance.headers = _instance.headers || {};
|
|
922
|
+
_instance.headers[msg_6.key] = msg_6.value;
|
|
923
|
+
break;
|
|
924
|
+
default:
|
|
925
|
+
_reader.skipField();
|
|
926
|
+
}
|
|
927
|
+
}
|
|
928
|
+
SipStatus.refineValues(_instance);
|
|
929
|
+
}
|
|
930
|
+
/**
|
|
931
|
+
* Serializes a message to binary format using provided binary reader
|
|
932
|
+
* @param _instance message instance
|
|
933
|
+
* @param _writer binary writer instance
|
|
934
|
+
*/
|
|
935
|
+
static serializeBinaryToWriter(_instance, _writer) {
|
|
936
|
+
if (_instance.accountName) {
|
|
937
|
+
_writer.writeString(1, _instance.accountName);
|
|
938
|
+
}
|
|
939
|
+
if (_instance.timestamp) {
|
|
940
|
+
_writer.writeMessage(2, _instance.timestamp, googleProtobuf000.Timestamp.serializeBinaryToWriter);
|
|
941
|
+
}
|
|
942
|
+
if (_instance.statusType) {
|
|
943
|
+
_writer.writeEnum(3, _instance.statusType);
|
|
944
|
+
}
|
|
945
|
+
if (_instance.calleeId) {
|
|
946
|
+
_writer.writeString(4, _instance.calleeId);
|
|
947
|
+
}
|
|
948
|
+
if (_instance.transferCallId) {
|
|
949
|
+
_writer.writeString(5, _instance.transferCallId);
|
|
950
|
+
}
|
|
951
|
+
if (!!_instance.headers) {
|
|
952
|
+
const keys_6 = Object.keys(_instance.headers);
|
|
953
|
+
if (keys_6.length) {
|
|
954
|
+
const repeated_6 = keys_6
|
|
955
|
+
.map(key => ({ key: key, value: _instance.headers[key] }))
|
|
956
|
+
.reduce((r, v) => [...r, v], []);
|
|
957
|
+
_writer.writeRepeatedMessage(6, repeated_6, SipStatus.HeadersEntry.serializeBinaryToWriter);
|
|
958
|
+
}
|
|
959
|
+
}
|
|
960
|
+
}
|
|
961
|
+
get accountName() {
|
|
962
|
+
return this._accountName;
|
|
963
|
+
}
|
|
964
|
+
set accountName(value) {
|
|
965
|
+
this._accountName = value;
|
|
966
|
+
}
|
|
967
|
+
get timestamp() {
|
|
968
|
+
return this._timestamp;
|
|
969
|
+
}
|
|
970
|
+
set timestamp(value) {
|
|
971
|
+
this._timestamp = value;
|
|
972
|
+
}
|
|
973
|
+
get statusType() {
|
|
974
|
+
return this._statusType;
|
|
975
|
+
}
|
|
976
|
+
set statusType(value) {
|
|
977
|
+
this._statusType = value;
|
|
978
|
+
}
|
|
979
|
+
get calleeId() {
|
|
980
|
+
return this._calleeId;
|
|
981
|
+
}
|
|
982
|
+
set calleeId(value) {
|
|
983
|
+
this._calleeId = value;
|
|
984
|
+
}
|
|
985
|
+
get transferCallId() {
|
|
986
|
+
return this._transferCallId;
|
|
987
|
+
}
|
|
988
|
+
set transferCallId(value) {
|
|
989
|
+
this._transferCallId = value;
|
|
990
|
+
}
|
|
991
|
+
get headers() {
|
|
992
|
+
return this._headers;
|
|
993
|
+
}
|
|
994
|
+
set headers(value) {
|
|
995
|
+
this._headers = value;
|
|
996
|
+
}
|
|
997
|
+
/**
|
|
998
|
+
* Serialize message to binary data
|
|
999
|
+
* @param instance message instance
|
|
1000
|
+
*/
|
|
1001
|
+
serializeBinary() {
|
|
1002
|
+
const writer = new BinaryWriter();
|
|
1003
|
+
SipStatus.serializeBinaryToWriter(this, writer);
|
|
1004
|
+
return writer.getResultBuffer();
|
|
1005
|
+
}
|
|
1006
|
+
/**
|
|
1007
|
+
* Cast message to standard JavaScript object (all non-primitive values are deeply cloned)
|
|
1008
|
+
*/
|
|
1009
|
+
toObject() {
|
|
1010
|
+
return {
|
|
1011
|
+
accountName: this.accountName,
|
|
1012
|
+
timestamp: this.timestamp ? this.timestamp.toObject() : undefined,
|
|
1013
|
+
statusType: this.statusType,
|
|
1014
|
+
calleeId: this.calleeId,
|
|
1015
|
+
transferCallId: this.transferCallId,
|
|
1016
|
+
headers: this.headers
|
|
1017
|
+
? Object.keys(this.headers).reduce((r, k) => ({ ...r, [k]: this.headers[k] }), {})
|
|
1018
|
+
: {}
|
|
1019
|
+
};
|
|
1020
|
+
}
|
|
1021
|
+
/**
|
|
1022
|
+
* Convenience method to support JSON.stringify(message), replicates the structure of toObject()
|
|
1023
|
+
*/
|
|
1024
|
+
toJSON() {
|
|
1025
|
+
return this.toObject();
|
|
1026
|
+
}
|
|
1027
|
+
/**
|
|
1028
|
+
* Cast message to JSON using protobuf JSON notation: https://developers.google.com/protocol-buffers/docs/proto3#json
|
|
1029
|
+
* Attention: output differs from toObject() e.g. enums are represented as names and not as numbers, Timestamp is an ISO Date string format etc.
|
|
1030
|
+
* If the message itself or some of descendant messages is google.protobuf.Any, you MUST provide a message pool as options. If not, the messagePool is not required
|
|
1031
|
+
*/
|
|
1032
|
+
toProtobufJSON(
|
|
1033
|
+
// @ts-ignore
|
|
1034
|
+
options) {
|
|
1035
|
+
return {
|
|
1036
|
+
accountName: this.accountName,
|
|
1037
|
+
timestamp: this.timestamp ? this.timestamp.toProtobufJSON(options) : null,
|
|
1038
|
+
statusType: SipStatus.StatusType[this.statusType === null || this.statusType === undefined
|
|
1039
|
+
? 0
|
|
1040
|
+
: this.statusType],
|
|
1041
|
+
calleeId: this.calleeId,
|
|
1042
|
+
transferCallId: this.transferCallId,
|
|
1043
|
+
headers: this.headers
|
|
1044
|
+
? Object.keys(this.headers).reduce((r, k) => ({ ...r, [k]: this.headers[k] }), {})
|
|
1045
|
+
: {}
|
|
1046
|
+
};
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
SipStatus.id = 'ondewo.sip.SipStatus';
|
|
1050
|
+
(function (SipStatus) {
|
|
1051
|
+
let StatusType;
|
|
1052
|
+
(function (StatusType) {
|
|
1053
|
+
StatusType[StatusType["no_session"] = 0] = "no_session";
|
|
1054
|
+
StatusType[StatusType["registered"] = 1] = "registered";
|
|
1055
|
+
StatusType[StatusType["ready"] = 2] = "ready";
|
|
1056
|
+
StatusType[StatusType["incoming_call_initiated"] = 3] = "incoming_call_initiated";
|
|
1057
|
+
StatusType[StatusType["outgoing_call_initiated"] = 4] = "outgoing_call_initiated";
|
|
1058
|
+
StatusType[StatusType["outgoing_call_connected"] = 5] = "outgoing_call_connected";
|
|
1059
|
+
StatusType[StatusType["incoming_call_connected"] = 6] = "incoming_call_connected";
|
|
1060
|
+
StatusType[StatusType["transfer_call_initiated"] = 7] = "transfer_call_initiated";
|
|
1061
|
+
StatusType[StatusType["soft_hangup_initiated"] = 8] = "soft_hangup_initiated";
|
|
1062
|
+
StatusType[StatusType["hard_hangup_initiated"] = 9] = "hard_hangup_initiated";
|
|
1063
|
+
StatusType[StatusType["incoming_call_failed"] = 10] = "incoming_call_failed";
|
|
1064
|
+
StatusType[StatusType["outgoing_call_failed"] = 11] = "outgoing_call_failed";
|
|
1065
|
+
StatusType[StatusType["incoming_call_finished"] = 12] = "incoming_call_finished";
|
|
1066
|
+
StatusType[StatusType["outgoing_call_finished"] = 13] = "outgoing_call_finished";
|
|
1067
|
+
})(StatusType = SipStatus.StatusType || (SipStatus.StatusType = {}));
|
|
1068
|
+
/**
|
|
1069
|
+
* Message implementation for ondewo.sip.HeadersEntry
|
|
1070
|
+
*/
|
|
1071
|
+
class HeadersEntry {
|
|
1072
|
+
/**
|
|
1073
|
+
* Message constructor. Initializes the properties and applies default Protobuf values if necessary
|
|
1074
|
+
* @param _value initial values object or instance of HeadersEntry to deeply clone from
|
|
1075
|
+
*/
|
|
1076
|
+
constructor(_value) {
|
|
1077
|
+
_value = _value || {};
|
|
1078
|
+
this.key = _value.key;
|
|
1079
|
+
this.value = _value.value;
|
|
1080
|
+
HeadersEntry.refineValues(this);
|
|
1081
|
+
}
|
|
1082
|
+
/**
|
|
1083
|
+
* Deserialize binary data to message
|
|
1084
|
+
* @param instance message instance
|
|
1085
|
+
*/
|
|
1086
|
+
static deserializeBinary(bytes) {
|
|
1087
|
+
const instance = new HeadersEntry();
|
|
1088
|
+
HeadersEntry.deserializeBinaryFromReader(instance, new BinaryReader(bytes));
|
|
1089
|
+
return instance;
|
|
1090
|
+
}
|
|
1091
|
+
/**
|
|
1092
|
+
* Check all the properties and set default protobuf values if necessary
|
|
1093
|
+
* @param _instance message instance
|
|
1094
|
+
*/
|
|
1095
|
+
static refineValues(_instance) {
|
|
1096
|
+
_instance.key = _instance.key || '';
|
|
1097
|
+
_instance.value = _instance.value || '';
|
|
1098
|
+
}
|
|
1099
|
+
/**
|
|
1100
|
+
* Deserializes / reads binary message into message instance using provided binary reader
|
|
1101
|
+
* @param _instance message instance
|
|
1102
|
+
* @param _reader binary reader instance
|
|
1103
|
+
*/
|
|
1104
|
+
static deserializeBinaryFromReader(_instance, _reader) {
|
|
1105
|
+
while (_reader.nextField()) {
|
|
1106
|
+
if (_reader.isEndGroup())
|
|
1107
|
+
break;
|
|
1108
|
+
switch (_reader.getFieldNumber()) {
|
|
1109
|
+
case 1:
|
|
1110
|
+
_instance.key = _reader.readString();
|
|
1111
|
+
break;
|
|
1112
|
+
case 2:
|
|
1113
|
+
_instance.value = _reader.readString();
|
|
1114
|
+
break;
|
|
1115
|
+
default:
|
|
1116
|
+
_reader.skipField();
|
|
1117
|
+
}
|
|
1118
|
+
}
|
|
1119
|
+
HeadersEntry.refineValues(_instance);
|
|
1120
|
+
}
|
|
1121
|
+
/**
|
|
1122
|
+
* Serializes a message to binary format using provided binary reader
|
|
1123
|
+
* @param _instance message instance
|
|
1124
|
+
* @param _writer binary writer instance
|
|
1125
|
+
*/
|
|
1126
|
+
static serializeBinaryToWriter(_instance, _writer) {
|
|
1127
|
+
if (_instance.key) {
|
|
1128
|
+
_writer.writeString(1, _instance.key);
|
|
1129
|
+
}
|
|
1130
|
+
if (_instance.value) {
|
|
1131
|
+
_writer.writeString(2, _instance.value);
|
|
1132
|
+
}
|
|
1133
|
+
}
|
|
1134
|
+
get key() {
|
|
1135
|
+
return this._key;
|
|
1136
|
+
}
|
|
1137
|
+
set key(value) {
|
|
1138
|
+
this._key = value;
|
|
1139
|
+
}
|
|
1140
|
+
get value() {
|
|
1141
|
+
return this._value;
|
|
1142
|
+
}
|
|
1143
|
+
set value(value) {
|
|
1144
|
+
this._value = value;
|
|
1145
|
+
}
|
|
1146
|
+
/**
|
|
1147
|
+
* Serialize message to binary data
|
|
1148
|
+
* @param instance message instance
|
|
1149
|
+
*/
|
|
1150
|
+
serializeBinary() {
|
|
1151
|
+
const writer = new BinaryWriter();
|
|
1152
|
+
HeadersEntry.serializeBinaryToWriter(this, writer);
|
|
1153
|
+
return writer.getResultBuffer();
|
|
1154
|
+
}
|
|
1155
|
+
/**
|
|
1156
|
+
* Cast message to standard JavaScript object (all non-primitive values are deeply cloned)
|
|
1157
|
+
*/
|
|
1158
|
+
toObject() {
|
|
1159
|
+
return {
|
|
1160
|
+
key: this.key,
|
|
1161
|
+
value: this.value
|
|
1162
|
+
};
|
|
1163
|
+
}
|
|
1164
|
+
/**
|
|
1165
|
+
* Convenience method to support JSON.stringify(message), replicates the structure of toObject()
|
|
1166
|
+
*/
|
|
1167
|
+
toJSON() {
|
|
1168
|
+
return this.toObject();
|
|
1169
|
+
}
|
|
1170
|
+
/**
|
|
1171
|
+
* Cast message to JSON using protobuf JSON notation: https://developers.google.com/protocol-buffers/docs/proto3#json
|
|
1172
|
+
* Attention: output differs from toObject() e.g. enums are represented as names and not as numbers, Timestamp is an ISO Date string format etc.
|
|
1173
|
+
* If the message itself or some of descendant messages is google.protobuf.Any, you MUST provide a message pool as options. If not, the messagePool is not required
|
|
1174
|
+
*/
|
|
1175
|
+
toProtobufJSON(
|
|
1176
|
+
// @ts-ignore
|
|
1177
|
+
options) {
|
|
1178
|
+
return {
|
|
1179
|
+
key: this.key,
|
|
1180
|
+
value: this.value
|
|
1181
|
+
};
|
|
1182
|
+
}
|
|
1183
|
+
}
|
|
1184
|
+
HeadersEntry.id = 'ondewo.sip.HeadersEntry';
|
|
1185
|
+
SipStatus.HeadersEntry = HeadersEntry;
|
|
1186
|
+
})(SipStatus || (SipStatus = {}));
|
|
1187
|
+
/**
|
|
1188
|
+
* Message implementation for ondewo.sip.SipStatusHistoryResponse
|
|
1189
|
+
*/
|
|
1190
|
+
class SipStatusHistoryResponse {
|
|
1191
|
+
/**
|
|
1192
|
+
* Message constructor. Initializes the properties and applies default Protobuf values if necessary
|
|
1193
|
+
* @param _value initial values object or instance of SipStatusHistoryResponse to deeply clone from
|
|
1194
|
+
*/
|
|
1195
|
+
constructor(_value) {
|
|
1196
|
+
_value = _value || {};
|
|
1197
|
+
this.statusHistory = (_value.statusHistory || []).map(m => new SipStatus(m));
|
|
1198
|
+
SipStatusHistoryResponse.refineValues(this);
|
|
1199
|
+
}
|
|
1200
|
+
/**
|
|
1201
|
+
* Deserialize binary data to message
|
|
1202
|
+
* @param instance message instance
|
|
1203
|
+
*/
|
|
1204
|
+
static deserializeBinary(bytes) {
|
|
1205
|
+
const instance = new SipStatusHistoryResponse();
|
|
1206
|
+
SipStatusHistoryResponse.deserializeBinaryFromReader(instance, new BinaryReader(bytes));
|
|
1207
|
+
return instance;
|
|
1208
|
+
}
|
|
1209
|
+
/**
|
|
1210
|
+
* Check all the properties and set default protobuf values if necessary
|
|
1211
|
+
* @param _instance message instance
|
|
1212
|
+
*/
|
|
1213
|
+
static refineValues(_instance) {
|
|
1214
|
+
_instance.statusHistory = _instance.statusHistory || [];
|
|
1215
|
+
}
|
|
1216
|
+
/**
|
|
1217
|
+
* Deserializes / reads binary message into message instance using provided binary reader
|
|
1218
|
+
* @param _instance message instance
|
|
1219
|
+
* @param _reader binary reader instance
|
|
1220
|
+
*/
|
|
1221
|
+
static deserializeBinaryFromReader(_instance, _reader) {
|
|
1222
|
+
while (_reader.nextField()) {
|
|
1223
|
+
if (_reader.isEndGroup())
|
|
1224
|
+
break;
|
|
1225
|
+
switch (_reader.getFieldNumber()) {
|
|
1226
|
+
case 1:
|
|
1227
|
+
const messageInitializer1 = new SipStatus();
|
|
1228
|
+
_reader.readMessage(messageInitializer1, SipStatus.deserializeBinaryFromReader);
|
|
1229
|
+
(_instance.statusHistory = _instance.statusHistory || []).push(messageInitializer1);
|
|
1230
|
+
break;
|
|
1231
|
+
default:
|
|
1232
|
+
_reader.skipField();
|
|
1233
|
+
}
|
|
1234
|
+
}
|
|
1235
|
+
SipStatusHistoryResponse.refineValues(_instance);
|
|
1236
|
+
}
|
|
1237
|
+
/**
|
|
1238
|
+
* Serializes a message to binary format using provided binary reader
|
|
1239
|
+
* @param _instance message instance
|
|
1240
|
+
* @param _writer binary writer instance
|
|
1241
|
+
*/
|
|
1242
|
+
static serializeBinaryToWriter(_instance, _writer) {
|
|
1243
|
+
if (_instance.statusHistory && _instance.statusHistory.length) {
|
|
1244
|
+
_writer.writeRepeatedMessage(1, _instance.statusHistory, SipStatus.serializeBinaryToWriter);
|
|
1245
|
+
}
|
|
1246
|
+
}
|
|
1247
|
+
get statusHistory() {
|
|
1248
|
+
return this._statusHistory;
|
|
1249
|
+
}
|
|
1250
|
+
set statusHistory(value) {
|
|
1251
|
+
this._statusHistory = value;
|
|
1252
|
+
}
|
|
1253
|
+
/**
|
|
1254
|
+
* Serialize message to binary data
|
|
1255
|
+
* @param instance message instance
|
|
1256
|
+
*/
|
|
1257
|
+
serializeBinary() {
|
|
1258
|
+
const writer = new BinaryWriter();
|
|
1259
|
+
SipStatusHistoryResponse.serializeBinaryToWriter(this, writer);
|
|
1260
|
+
return writer.getResultBuffer();
|
|
1261
|
+
}
|
|
1262
|
+
/**
|
|
1263
|
+
* Cast message to standard JavaScript object (all non-primitive values are deeply cloned)
|
|
1264
|
+
*/
|
|
1265
|
+
toObject() {
|
|
1266
|
+
return {
|
|
1267
|
+
statusHistory: (this.statusHistory || []).map(m => m.toObject())
|
|
1268
|
+
};
|
|
1269
|
+
}
|
|
1270
|
+
/**
|
|
1271
|
+
* Convenience method to support JSON.stringify(message), replicates the structure of toObject()
|
|
1272
|
+
*/
|
|
1273
|
+
toJSON() {
|
|
1274
|
+
return this.toObject();
|
|
1275
|
+
}
|
|
1276
|
+
/**
|
|
1277
|
+
* Cast message to JSON using protobuf JSON notation: https://developers.google.com/protocol-buffers/docs/proto3#json
|
|
1278
|
+
* Attention: output differs from toObject() e.g. enums are represented as names and not as numbers, Timestamp is an ISO Date string format etc.
|
|
1279
|
+
* If the message itself or some of descendant messages is google.protobuf.Any, you MUST provide a message pool as options. If not, the messagePool is not required
|
|
1280
|
+
*/
|
|
1281
|
+
toProtobufJSON(
|
|
1282
|
+
// @ts-ignore
|
|
1283
|
+
options) {
|
|
1284
|
+
return {
|
|
1285
|
+
statusHistory: (this.statusHistory || []).map(m => m.toProtobufJSON(options))
|
|
1286
|
+
};
|
|
1287
|
+
}
|
|
1288
|
+
}
|
|
1289
|
+
SipStatusHistoryResponse.id = 'ondewo.sip.SipStatusHistoryResponse';
|
|
1290
|
+
/**
|
|
1291
|
+
* Message implementation for ondewo.sip.PlayWavFilesRequest
|
|
1292
|
+
*/
|
|
1293
|
+
class PlayWavFilesRequest {
|
|
1294
|
+
/**
|
|
1295
|
+
* Message constructor. Initializes the properties and applies default Protobuf values if necessary
|
|
1296
|
+
* @param _value initial values object or instance of PlayWavFilesRequest to deeply clone from
|
|
1297
|
+
*/
|
|
1298
|
+
constructor(_value) {
|
|
1299
|
+
_value = _value || {};
|
|
1300
|
+
this.wavFiles = (_value.wavFiles || []).map(b => b ? b.subarray(0) : new Uint8Array());
|
|
1301
|
+
PlayWavFilesRequest.refineValues(this);
|
|
1302
|
+
}
|
|
1303
|
+
/**
|
|
1304
|
+
* Deserialize binary data to message
|
|
1305
|
+
* @param instance message instance
|
|
1306
|
+
*/
|
|
1307
|
+
static deserializeBinary(bytes) {
|
|
1308
|
+
const instance = new PlayWavFilesRequest();
|
|
1309
|
+
PlayWavFilesRequest.deserializeBinaryFromReader(instance, new BinaryReader(bytes));
|
|
1310
|
+
return instance;
|
|
1311
|
+
}
|
|
1312
|
+
/**
|
|
1313
|
+
* Check all the properties and set default protobuf values if necessary
|
|
1314
|
+
* @param _instance message instance
|
|
1315
|
+
*/
|
|
1316
|
+
static refineValues(_instance) {
|
|
1317
|
+
_instance.wavFiles = _instance.wavFiles || [];
|
|
1318
|
+
}
|
|
1319
|
+
/**
|
|
1320
|
+
* Deserializes / reads binary message into message instance using provided binary reader
|
|
1321
|
+
* @param _instance message instance
|
|
1322
|
+
* @param _reader binary reader instance
|
|
1323
|
+
*/
|
|
1324
|
+
static deserializeBinaryFromReader(_instance, _reader) {
|
|
1325
|
+
while (_reader.nextField()) {
|
|
1326
|
+
if (_reader.isEndGroup())
|
|
1327
|
+
break;
|
|
1328
|
+
switch (_reader.getFieldNumber()) {
|
|
1329
|
+
case 1:
|
|
1330
|
+
(_instance.wavFiles = _instance.wavFiles || []).push(_reader.readBytes());
|
|
1331
|
+
break;
|
|
1332
|
+
default:
|
|
1333
|
+
_reader.skipField();
|
|
1334
|
+
}
|
|
1335
|
+
}
|
|
1336
|
+
PlayWavFilesRequest.refineValues(_instance);
|
|
1337
|
+
}
|
|
1338
|
+
/**
|
|
1339
|
+
* Serializes a message to binary format using provided binary reader
|
|
1340
|
+
* @param _instance message instance
|
|
1341
|
+
* @param _writer binary writer instance
|
|
1342
|
+
*/
|
|
1343
|
+
static serializeBinaryToWriter(_instance, _writer) {
|
|
1344
|
+
if (_instance.wavFiles && _instance.wavFiles.length) {
|
|
1345
|
+
_writer.writeRepeatedBytes(1, _instance.wavFiles);
|
|
1346
|
+
}
|
|
1347
|
+
}
|
|
1348
|
+
get wavFiles() {
|
|
1349
|
+
return this._wavFiles;
|
|
1350
|
+
}
|
|
1351
|
+
set wavFiles(value) {
|
|
1352
|
+
this._wavFiles = value;
|
|
1353
|
+
}
|
|
1354
|
+
/**
|
|
1355
|
+
* Serialize message to binary data
|
|
1356
|
+
* @param instance message instance
|
|
1357
|
+
*/
|
|
1358
|
+
serializeBinary() {
|
|
1359
|
+
const writer = new BinaryWriter();
|
|
1360
|
+
PlayWavFilesRequest.serializeBinaryToWriter(this, writer);
|
|
1361
|
+
return writer.getResultBuffer();
|
|
1362
|
+
}
|
|
1363
|
+
/**
|
|
1364
|
+
* Cast message to standard JavaScript object (all non-primitive values are deeply cloned)
|
|
1365
|
+
*/
|
|
1366
|
+
toObject() {
|
|
1367
|
+
return {
|
|
1368
|
+
wavFiles: (this.wavFiles || []).map(b => b ? b.subarray(0) : new Uint8Array())
|
|
1369
|
+
};
|
|
1370
|
+
}
|
|
1371
|
+
/**
|
|
1372
|
+
* Convenience method to support JSON.stringify(message), replicates the structure of toObject()
|
|
1373
|
+
*/
|
|
1374
|
+
toJSON() {
|
|
1375
|
+
return this.toObject();
|
|
1376
|
+
}
|
|
1377
|
+
/**
|
|
1378
|
+
* Cast message to JSON using protobuf JSON notation: https://developers.google.com/protocol-buffers/docs/proto3#json
|
|
1379
|
+
* Attention: output differs from toObject() e.g. enums are represented as names and not as numbers, Timestamp is an ISO Date string format etc.
|
|
1380
|
+
* If the message itself or some of descendant messages is google.protobuf.Any, you MUST provide a message pool as options. If not, the messagePool is not required
|
|
1381
|
+
*/
|
|
1382
|
+
toProtobufJSON(
|
|
1383
|
+
// @ts-ignore
|
|
1384
|
+
options) {
|
|
1385
|
+
return {
|
|
1386
|
+
wavFiles: (this.wavFiles || []).map(b => (b ? uint8ArrayToBase64(b) : ''))
|
|
1387
|
+
};
|
|
1388
|
+
}
|
|
1389
|
+
}
|
|
1390
|
+
PlayWavFilesRequest.id = 'ondewo.sip.PlayWavFilesRequest';
|
|
1391
|
+
|
|
1392
|
+
/* tslint:disable */
|
|
1393
|
+
/**
|
|
1394
|
+
* Specific GrpcClientSettings for Sip.
|
|
1395
|
+
* Use it only if your default settings are not set or the service requires other settings.
|
|
1396
|
+
*/
|
|
1397
|
+
const GRPC_SIP_CLIENT_SETTINGS = new InjectionToken('GRPC_SIP_CLIENT_SETTINGS');
|
|
1398
|
+
|
|
1399
|
+
/* tslint:disable */
|
|
1400
|
+
/**
|
|
1401
|
+
* Service client implementation for ondewo.sip.Sip
|
|
1402
|
+
*/
|
|
1403
|
+
class SipClient {
|
|
1404
|
+
constructor(settings, clientFactory, handler) {
|
|
1405
|
+
this.handler = handler;
|
|
1406
|
+
/**
|
|
1407
|
+
* Raw RPC implementation for each service client method.
|
|
1408
|
+
* The raw methods provide more control on the incoming data and events. E.g. they can be useful to read status `OK` metadata.
|
|
1409
|
+
* Attention: these methods do not throw errors when non-zero status codes are received.
|
|
1410
|
+
*/
|
|
1411
|
+
this.$raw = {
|
|
1412
|
+
/**
|
|
1413
|
+
* Unary call: /ondewo.sip.Sip/StartSession
|
|
1414
|
+
*
|
|
1415
|
+
* @param requestMessage Request message
|
|
1416
|
+
* @param requestMetadata Request metadata
|
|
1417
|
+
* @returns Observable<GrpcEvent<googleProtobuf000.Empty>>
|
|
1418
|
+
*/
|
|
1419
|
+
startSession: (requestData, requestMetadata = new GrpcMetadata()) => {
|
|
1420
|
+
return this.handler.handle({
|
|
1421
|
+
type: GrpcCallType.unary,
|
|
1422
|
+
client: this.client,
|
|
1423
|
+
path: '/ondewo.sip.Sip/StartSession',
|
|
1424
|
+
requestData,
|
|
1425
|
+
requestMetadata,
|
|
1426
|
+
requestClass: StartSessionRequest,
|
|
1427
|
+
responseClass: googleProtobuf000.Empty
|
|
1428
|
+
});
|
|
1429
|
+
},
|
|
1430
|
+
/**
|
|
1431
|
+
* Unary call: /ondewo.sip.Sip/EndSession
|
|
1432
|
+
*
|
|
1433
|
+
* @param requestMessage Request message
|
|
1434
|
+
* @param requestMetadata Request metadata
|
|
1435
|
+
* @returns Observable<GrpcEvent<googleProtobuf000.Empty>>
|
|
1436
|
+
*/
|
|
1437
|
+
endSession: (requestData, requestMetadata = new GrpcMetadata()) => {
|
|
1438
|
+
return this.handler.handle({
|
|
1439
|
+
type: GrpcCallType.unary,
|
|
1440
|
+
client: this.client,
|
|
1441
|
+
path: '/ondewo.sip.Sip/EndSession',
|
|
1442
|
+
requestData,
|
|
1443
|
+
requestMetadata,
|
|
1444
|
+
requestClass: googleProtobuf000.Empty,
|
|
1445
|
+
responseClass: googleProtobuf000.Empty
|
|
1446
|
+
});
|
|
1447
|
+
},
|
|
1448
|
+
/**
|
|
1449
|
+
* Unary call: /ondewo.sip.Sip/StartCall
|
|
1450
|
+
*
|
|
1451
|
+
* @param requestMessage Request message
|
|
1452
|
+
* @param requestMetadata Request metadata
|
|
1453
|
+
* @returns Observable<GrpcEvent<googleProtobuf000.Empty>>
|
|
1454
|
+
*/
|
|
1455
|
+
startCall: (requestData, requestMetadata = new GrpcMetadata()) => {
|
|
1456
|
+
return this.handler.handle({
|
|
1457
|
+
type: GrpcCallType.unary,
|
|
1458
|
+
client: this.client,
|
|
1459
|
+
path: '/ondewo.sip.Sip/StartCall',
|
|
1460
|
+
requestData,
|
|
1461
|
+
requestMetadata,
|
|
1462
|
+
requestClass: StartCallRequest,
|
|
1463
|
+
responseClass: googleProtobuf000.Empty
|
|
1464
|
+
});
|
|
1465
|
+
},
|
|
1466
|
+
/**
|
|
1467
|
+
* Unary call: /ondewo.sip.Sip/EndCall
|
|
1468
|
+
*
|
|
1469
|
+
* @param requestMessage Request message
|
|
1470
|
+
* @param requestMetadata Request metadata
|
|
1471
|
+
* @returns Observable<GrpcEvent<googleProtobuf000.Empty>>
|
|
1472
|
+
*/
|
|
1473
|
+
endCall: (requestData, requestMetadata = new GrpcMetadata()) => {
|
|
1474
|
+
return this.handler.handle({
|
|
1475
|
+
type: GrpcCallType.unary,
|
|
1476
|
+
client: this.client,
|
|
1477
|
+
path: '/ondewo.sip.Sip/EndCall',
|
|
1478
|
+
requestData,
|
|
1479
|
+
requestMetadata,
|
|
1480
|
+
requestClass: EndCallRequest,
|
|
1481
|
+
responseClass: googleProtobuf000.Empty
|
|
1482
|
+
});
|
|
1483
|
+
},
|
|
1484
|
+
/**
|
|
1485
|
+
* Unary call: /ondewo.sip.Sip/TransferCall
|
|
1486
|
+
*
|
|
1487
|
+
* @param requestMessage Request message
|
|
1488
|
+
* @param requestMetadata Request metadata
|
|
1489
|
+
* @returns Observable<GrpcEvent<googleProtobuf000.Empty>>
|
|
1490
|
+
*/
|
|
1491
|
+
transferCall: (requestData, requestMetadata = new GrpcMetadata()) => {
|
|
1492
|
+
return this.handler.handle({
|
|
1493
|
+
type: GrpcCallType.unary,
|
|
1494
|
+
client: this.client,
|
|
1495
|
+
path: '/ondewo.sip.Sip/TransferCall',
|
|
1496
|
+
requestData,
|
|
1497
|
+
requestMetadata,
|
|
1498
|
+
requestClass: TransferCallRequest,
|
|
1499
|
+
responseClass: googleProtobuf000.Empty
|
|
1500
|
+
});
|
|
1501
|
+
},
|
|
1502
|
+
/**
|
|
1503
|
+
* Unary call: /ondewo.sip.Sip/RegisterAccount
|
|
1504
|
+
*
|
|
1505
|
+
* @param requestMessage Request message
|
|
1506
|
+
* @param requestMetadata Request metadata
|
|
1507
|
+
* @returns Observable<GrpcEvent<googleProtobuf000.Empty>>
|
|
1508
|
+
*/
|
|
1509
|
+
registerAccount: (requestData, requestMetadata = new GrpcMetadata()) => {
|
|
1510
|
+
return this.handler.handle({
|
|
1511
|
+
type: GrpcCallType.unary,
|
|
1512
|
+
client: this.client,
|
|
1513
|
+
path: '/ondewo.sip.Sip/RegisterAccount',
|
|
1514
|
+
requestData,
|
|
1515
|
+
requestMetadata,
|
|
1516
|
+
requestClass: RegisterAccountRequest,
|
|
1517
|
+
responseClass: googleProtobuf000.Empty
|
|
1518
|
+
});
|
|
1519
|
+
},
|
|
1520
|
+
/**
|
|
1521
|
+
* Unary call: /ondewo.sip.Sip/GetSipStatus
|
|
1522
|
+
*
|
|
1523
|
+
* @param requestMessage Request message
|
|
1524
|
+
* @param requestMetadata Request metadata
|
|
1525
|
+
* @returns Observable<GrpcEvent<thisProto.SipStatus>>
|
|
1526
|
+
*/
|
|
1527
|
+
getSipStatus: (requestData, requestMetadata = new GrpcMetadata()) => {
|
|
1528
|
+
return this.handler.handle({
|
|
1529
|
+
type: GrpcCallType.unary,
|
|
1530
|
+
client: this.client,
|
|
1531
|
+
path: '/ondewo.sip.Sip/GetSipStatus',
|
|
1532
|
+
requestData,
|
|
1533
|
+
requestMetadata,
|
|
1534
|
+
requestClass: googleProtobuf000.Empty,
|
|
1535
|
+
responseClass: SipStatus
|
|
1536
|
+
});
|
|
1537
|
+
},
|
|
1538
|
+
/**
|
|
1539
|
+
* Unary call: /ondewo.sip.Sip/GetSipStatusHistory
|
|
1540
|
+
*
|
|
1541
|
+
* @param requestMessage Request message
|
|
1542
|
+
* @param requestMetadata Request metadata
|
|
1543
|
+
* @returns Observable<GrpcEvent<thisProto.SipStatusHistoryResponse>>
|
|
1544
|
+
*/
|
|
1545
|
+
getSipStatusHistory: (requestData, requestMetadata = new GrpcMetadata()) => {
|
|
1546
|
+
return this.handler.handle({
|
|
1547
|
+
type: GrpcCallType.unary,
|
|
1548
|
+
client: this.client,
|
|
1549
|
+
path: '/ondewo.sip.Sip/GetSipStatusHistory',
|
|
1550
|
+
requestData,
|
|
1551
|
+
requestMetadata,
|
|
1552
|
+
requestClass: googleProtobuf000.Empty,
|
|
1553
|
+
responseClass: SipStatusHistoryResponse
|
|
1554
|
+
});
|
|
1555
|
+
},
|
|
1556
|
+
/**
|
|
1557
|
+
* Unary call: /ondewo.sip.Sip/PlayWavFiles
|
|
1558
|
+
*
|
|
1559
|
+
* @param requestMessage Request message
|
|
1560
|
+
* @param requestMetadata Request metadata
|
|
1561
|
+
* @returns Observable<GrpcEvent<googleProtobuf000.Empty>>
|
|
1562
|
+
*/
|
|
1563
|
+
playWavFiles: (requestData, requestMetadata = new GrpcMetadata()) => {
|
|
1564
|
+
return this.handler.handle({
|
|
1565
|
+
type: GrpcCallType.unary,
|
|
1566
|
+
client: this.client,
|
|
1567
|
+
path: '/ondewo.sip.Sip/PlayWavFiles',
|
|
1568
|
+
requestData,
|
|
1569
|
+
requestMetadata,
|
|
1570
|
+
requestClass: PlayWavFilesRequest,
|
|
1571
|
+
responseClass: googleProtobuf000.Empty
|
|
1572
|
+
});
|
|
1573
|
+
},
|
|
1574
|
+
/**
|
|
1575
|
+
* Unary call: /ondewo.sip.Sip/Mute
|
|
1576
|
+
*
|
|
1577
|
+
* @param requestMessage Request message
|
|
1578
|
+
* @param requestMetadata Request metadata
|
|
1579
|
+
* @returns Observable<GrpcEvent<googleProtobuf000.Empty>>
|
|
1580
|
+
*/
|
|
1581
|
+
mute: (requestData, requestMetadata = new GrpcMetadata()) => {
|
|
1582
|
+
return this.handler.handle({
|
|
1583
|
+
type: GrpcCallType.unary,
|
|
1584
|
+
client: this.client,
|
|
1585
|
+
path: '/ondewo.sip.Sip/Mute',
|
|
1586
|
+
requestData,
|
|
1587
|
+
requestMetadata,
|
|
1588
|
+
requestClass: googleProtobuf000.Empty,
|
|
1589
|
+
responseClass: googleProtobuf000.Empty
|
|
1590
|
+
});
|
|
1591
|
+
},
|
|
1592
|
+
/**
|
|
1593
|
+
* Unary call: /ondewo.sip.Sip/UnMute
|
|
1594
|
+
*
|
|
1595
|
+
* @param requestMessage Request message
|
|
1596
|
+
* @param requestMetadata Request metadata
|
|
1597
|
+
* @returns Observable<GrpcEvent<googleProtobuf000.Empty>>
|
|
1598
|
+
*/
|
|
1599
|
+
unMute: (requestData, requestMetadata = new GrpcMetadata()) => {
|
|
1600
|
+
return this.handler.handle({
|
|
1601
|
+
type: GrpcCallType.unary,
|
|
1602
|
+
client: this.client,
|
|
1603
|
+
path: '/ondewo.sip.Sip/UnMute',
|
|
1604
|
+
requestData,
|
|
1605
|
+
requestMetadata,
|
|
1606
|
+
requestClass: googleProtobuf000.Empty,
|
|
1607
|
+
responseClass: googleProtobuf000.Empty
|
|
1608
|
+
});
|
|
1609
|
+
}
|
|
1610
|
+
};
|
|
1611
|
+
this.client = clientFactory.createClient('ondewo.sip.Sip', settings);
|
|
1612
|
+
}
|
|
1613
|
+
/**
|
|
1614
|
+
* Unary call @/ondewo.sip.Sip/StartSession
|
|
1615
|
+
*
|
|
1616
|
+
* @param requestMessage Request message
|
|
1617
|
+
* @param requestMetadata Request metadata
|
|
1618
|
+
* @returns Observable<googleProtobuf000.Empty>
|
|
1619
|
+
*/
|
|
1620
|
+
startSession(requestData, requestMetadata = new GrpcMetadata()) {
|
|
1621
|
+
return this.$raw
|
|
1622
|
+
.startSession(requestData, requestMetadata)
|
|
1623
|
+
.pipe(throwStatusErrors(), takeMessages());
|
|
1624
|
+
}
|
|
1625
|
+
/**
|
|
1626
|
+
* Unary call @/ondewo.sip.Sip/EndSession
|
|
1627
|
+
*
|
|
1628
|
+
* @param requestMessage Request message
|
|
1629
|
+
* @param requestMetadata Request metadata
|
|
1630
|
+
* @returns Observable<googleProtobuf000.Empty>
|
|
1631
|
+
*/
|
|
1632
|
+
endSession(requestData, requestMetadata = new GrpcMetadata()) {
|
|
1633
|
+
return this.$raw
|
|
1634
|
+
.endSession(requestData, requestMetadata)
|
|
1635
|
+
.pipe(throwStatusErrors(), takeMessages());
|
|
1636
|
+
}
|
|
1637
|
+
/**
|
|
1638
|
+
* Unary call @/ondewo.sip.Sip/StartCall
|
|
1639
|
+
*
|
|
1640
|
+
* @param requestMessage Request message
|
|
1641
|
+
* @param requestMetadata Request metadata
|
|
1642
|
+
* @returns Observable<googleProtobuf000.Empty>
|
|
1643
|
+
*/
|
|
1644
|
+
startCall(requestData, requestMetadata = new GrpcMetadata()) {
|
|
1645
|
+
return this.$raw
|
|
1646
|
+
.startCall(requestData, requestMetadata)
|
|
1647
|
+
.pipe(throwStatusErrors(), takeMessages());
|
|
1648
|
+
}
|
|
1649
|
+
/**
|
|
1650
|
+
* Unary call @/ondewo.sip.Sip/EndCall
|
|
1651
|
+
*
|
|
1652
|
+
* @param requestMessage Request message
|
|
1653
|
+
* @param requestMetadata Request metadata
|
|
1654
|
+
* @returns Observable<googleProtobuf000.Empty>
|
|
1655
|
+
*/
|
|
1656
|
+
endCall(requestData, requestMetadata = new GrpcMetadata()) {
|
|
1657
|
+
return this.$raw
|
|
1658
|
+
.endCall(requestData, requestMetadata)
|
|
1659
|
+
.pipe(throwStatusErrors(), takeMessages());
|
|
1660
|
+
}
|
|
1661
|
+
/**
|
|
1662
|
+
* Unary call @/ondewo.sip.Sip/TransferCall
|
|
1663
|
+
*
|
|
1664
|
+
* @param requestMessage Request message
|
|
1665
|
+
* @param requestMetadata Request metadata
|
|
1666
|
+
* @returns Observable<googleProtobuf000.Empty>
|
|
1667
|
+
*/
|
|
1668
|
+
transferCall(requestData, requestMetadata = new GrpcMetadata()) {
|
|
1669
|
+
return this.$raw
|
|
1670
|
+
.transferCall(requestData, requestMetadata)
|
|
1671
|
+
.pipe(throwStatusErrors(), takeMessages());
|
|
1672
|
+
}
|
|
1673
|
+
/**
|
|
1674
|
+
* Unary call @/ondewo.sip.Sip/RegisterAccount
|
|
1675
|
+
*
|
|
1676
|
+
* @param requestMessage Request message
|
|
1677
|
+
* @param requestMetadata Request metadata
|
|
1678
|
+
* @returns Observable<googleProtobuf000.Empty>
|
|
1679
|
+
*/
|
|
1680
|
+
registerAccount(requestData, requestMetadata = new GrpcMetadata()) {
|
|
1681
|
+
return this.$raw
|
|
1682
|
+
.registerAccount(requestData, requestMetadata)
|
|
1683
|
+
.pipe(throwStatusErrors(), takeMessages());
|
|
1684
|
+
}
|
|
1685
|
+
/**
|
|
1686
|
+
* Unary call @/ondewo.sip.Sip/GetSipStatus
|
|
1687
|
+
*
|
|
1688
|
+
* @param requestMessage Request message
|
|
1689
|
+
* @param requestMetadata Request metadata
|
|
1690
|
+
* @returns Observable<thisProto.SipStatus>
|
|
1691
|
+
*/
|
|
1692
|
+
getSipStatus(requestData, requestMetadata = new GrpcMetadata()) {
|
|
1693
|
+
return this.$raw
|
|
1694
|
+
.getSipStatus(requestData, requestMetadata)
|
|
1695
|
+
.pipe(throwStatusErrors(), takeMessages());
|
|
1696
|
+
}
|
|
1697
|
+
/**
|
|
1698
|
+
* Unary call @/ondewo.sip.Sip/GetSipStatusHistory
|
|
1699
|
+
*
|
|
1700
|
+
* @param requestMessage Request message
|
|
1701
|
+
* @param requestMetadata Request metadata
|
|
1702
|
+
* @returns Observable<thisProto.SipStatusHistoryResponse>
|
|
1703
|
+
*/
|
|
1704
|
+
getSipStatusHistory(requestData, requestMetadata = new GrpcMetadata()) {
|
|
1705
|
+
return this.$raw
|
|
1706
|
+
.getSipStatusHistory(requestData, requestMetadata)
|
|
1707
|
+
.pipe(throwStatusErrors(), takeMessages());
|
|
1708
|
+
}
|
|
1709
|
+
/**
|
|
1710
|
+
* Unary call @/ondewo.sip.Sip/PlayWavFiles
|
|
1711
|
+
*
|
|
1712
|
+
* @param requestMessage Request message
|
|
1713
|
+
* @param requestMetadata Request metadata
|
|
1714
|
+
* @returns Observable<googleProtobuf000.Empty>
|
|
1715
|
+
*/
|
|
1716
|
+
playWavFiles(requestData, requestMetadata = new GrpcMetadata()) {
|
|
1717
|
+
return this.$raw
|
|
1718
|
+
.playWavFiles(requestData, requestMetadata)
|
|
1719
|
+
.pipe(throwStatusErrors(), takeMessages());
|
|
1720
|
+
}
|
|
1721
|
+
/**
|
|
1722
|
+
* Unary call @/ondewo.sip.Sip/Mute
|
|
1723
|
+
*
|
|
1724
|
+
* @param requestMessage Request message
|
|
1725
|
+
* @param requestMetadata Request metadata
|
|
1726
|
+
* @returns Observable<googleProtobuf000.Empty>
|
|
1727
|
+
*/
|
|
1728
|
+
mute(requestData, requestMetadata = new GrpcMetadata()) {
|
|
1729
|
+
return this.$raw
|
|
1730
|
+
.mute(requestData, requestMetadata)
|
|
1731
|
+
.pipe(throwStatusErrors(), takeMessages());
|
|
1732
|
+
}
|
|
1733
|
+
/**
|
|
1734
|
+
* Unary call @/ondewo.sip.Sip/UnMute
|
|
1735
|
+
*
|
|
1736
|
+
* @param requestMessage Request message
|
|
1737
|
+
* @param requestMetadata Request metadata
|
|
1738
|
+
* @returns Observable<googleProtobuf000.Empty>
|
|
1739
|
+
*/
|
|
1740
|
+
unMute(requestData, requestMetadata = new GrpcMetadata()) {
|
|
1741
|
+
return this.$raw
|
|
1742
|
+
.unMute(requestData, requestMetadata)
|
|
1743
|
+
.pipe(throwStatusErrors(), takeMessages());
|
|
1744
|
+
}
|
|
1745
|
+
}
|
|
1746
|
+
SipClient.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: SipClient, deps: [{ token: GRPC_SIP_CLIENT_SETTINGS, optional: true }, { token: GRPC_CLIENT_FACTORY }, { token: i1.GrpcHandler }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1747
|
+
SipClient.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: SipClient, providedIn: 'any' });
|
|
1748
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: SipClient, decorators: [{
|
|
1749
|
+
type: Injectable,
|
|
1750
|
+
args: [{ providedIn: 'any' }]
|
|
1751
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
1752
|
+
type: Optional
|
|
1753
|
+
}, {
|
|
1754
|
+
type: Inject,
|
|
1755
|
+
args: [GRPC_SIP_CLIENT_SETTINGS]
|
|
1756
|
+
}] }, { type: undefined, decorators: [{
|
|
1757
|
+
type: Inject,
|
|
1758
|
+
args: [GRPC_CLIENT_FACTORY]
|
|
1759
|
+
}] }, { type: i1.GrpcHandler }]; } });
|
|
1760
|
+
|
|
1761
|
+
/**
|
|
1762
|
+
* Generated bundle index. Do not edit.
|
|
1763
|
+
*/
|
|
1764
|
+
|
|
1765
|
+
export { EndCallRequest, GRPC_SIP_CLIENT_SETTINGS, PlayWavFilesRequest, RegisterAccountRequest, SipClient, SipStatus, SipStatusHistoryResponse, StartCallRequest, StartSessionRequest, TransferCallRequest };
|
|
1766
|
+
//# sourceMappingURL=ondewo-sip-client-angular.mjs.map
|