@ondewo/sip-client-angular 4.0.0 → 5.2.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.
@@ -1,1856 +0,0 @@
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) => (Object.assign(Object.assign({}, 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) => (Object.assign(Object.assign({}, 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) => (Object.assign(Object.assign({}, 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
- this.authUsername = _value.authUsername;
376
- this.outboundProxy = _value.outboundProxy;
377
- RegisterAccountRequest.refineValues(this);
378
- }
379
- /**
380
- * Deserialize binary data to message
381
- * @param instance message instance
382
- */
383
- static deserializeBinary(bytes) {
384
- const instance = new RegisterAccountRequest();
385
- RegisterAccountRequest.deserializeBinaryFromReader(instance, new BinaryReader(bytes));
386
- return instance;
387
- }
388
- /**
389
- * Check all the properties and set default protobuf values if necessary
390
- * @param _instance message instance
391
- */
392
- static refineValues(_instance) {
393
- _instance.accountName = _instance.accountName || '';
394
- _instance.password = _instance.password || '';
395
- _instance.authUsername = _instance.authUsername || '';
396
- _instance.outboundProxy = _instance.outboundProxy || '';
397
- }
398
- /**
399
- * Deserializes / reads binary message into message instance using provided binary reader
400
- * @param _instance message instance
401
- * @param _reader binary reader instance
402
- */
403
- static deserializeBinaryFromReader(_instance, _reader) {
404
- while (_reader.nextField()) {
405
- if (_reader.isEndGroup())
406
- break;
407
- switch (_reader.getFieldNumber()) {
408
- case 1:
409
- _instance.accountName = _reader.readString();
410
- break;
411
- case 2:
412
- _instance.password = _reader.readString();
413
- break;
414
- case 3:
415
- _instance.authUsername = _reader.readString();
416
- break;
417
- case 4:
418
- _instance.outboundProxy = _reader.readString();
419
- break;
420
- default:
421
- _reader.skipField();
422
- }
423
- }
424
- RegisterAccountRequest.refineValues(_instance);
425
- }
426
- /**
427
- * Serializes a message to binary format using provided binary reader
428
- * @param _instance message instance
429
- * @param _writer binary writer instance
430
- */
431
- static serializeBinaryToWriter(_instance, _writer) {
432
- if (_instance.accountName) {
433
- _writer.writeString(1, _instance.accountName);
434
- }
435
- if (_instance.password) {
436
- _writer.writeString(2, _instance.password);
437
- }
438
- if (_instance.authUsername) {
439
- _writer.writeString(3, _instance.authUsername);
440
- }
441
- if (_instance.outboundProxy) {
442
- _writer.writeString(4, _instance.outboundProxy);
443
- }
444
- }
445
- get accountName() {
446
- return this._accountName;
447
- }
448
- set accountName(value) {
449
- this._accountName = value;
450
- }
451
- get password() {
452
- return this._password;
453
- }
454
- set password(value) {
455
- this._password = value;
456
- }
457
- get authUsername() {
458
- return this._authUsername;
459
- }
460
- set authUsername(value) {
461
- this._authUsername = value;
462
- }
463
- get outboundProxy() {
464
- return this._outboundProxy;
465
- }
466
- set outboundProxy(value) {
467
- this._outboundProxy = value;
468
- }
469
- /**
470
- * Serialize message to binary data
471
- * @param instance message instance
472
- */
473
- serializeBinary() {
474
- const writer = new BinaryWriter();
475
- RegisterAccountRequest.serializeBinaryToWriter(this, writer);
476
- return writer.getResultBuffer();
477
- }
478
- /**
479
- * Cast message to standard JavaScript object (all non-primitive values are deeply cloned)
480
- */
481
- toObject() {
482
- return {
483
- accountName: this.accountName,
484
- password: this.password,
485
- authUsername: this.authUsername,
486
- outboundProxy: this.outboundProxy
487
- };
488
- }
489
- /**
490
- * Convenience method to support JSON.stringify(message), replicates the structure of toObject()
491
- */
492
- toJSON() {
493
- return this.toObject();
494
- }
495
- /**
496
- * Cast message to JSON using protobuf JSON notation: https://developers.google.com/protocol-buffers/docs/proto3#json
497
- * Attention: output differs from toObject() e.g. enums are represented as names and not as numbers, Timestamp is an ISO Date string format etc.
498
- * 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
499
- */
500
- toProtobufJSON(
501
- // @ts-ignore
502
- options) {
503
- return {
504
- accountName: this.accountName,
505
- password: this.password,
506
- authUsername: this.authUsername,
507
- outboundProxy: this.outboundProxy
508
- };
509
- }
510
- }
511
- RegisterAccountRequest.id = 'ondewo.sip.RegisterAccountRequest';
512
- /**
513
- * Message implementation for ondewo.sip.StartSessionRequest
514
- */
515
- class StartSessionRequest {
516
- /**
517
- * Message constructor. Initializes the properties and applies default Protobuf values if necessary
518
- * @param _value initial values object or instance of StartSessionRequest to deeply clone from
519
- */
520
- constructor(_value) {
521
- _value = _value || {};
522
- this.accountName = _value.accountName;
523
- this.autoAnswerInterval = _value.autoAnswerInterval;
524
- StartSessionRequest.refineValues(this);
525
- }
526
- /**
527
- * Deserialize binary data to message
528
- * @param instance message instance
529
- */
530
- static deserializeBinary(bytes) {
531
- const instance = new StartSessionRequest();
532
- StartSessionRequest.deserializeBinaryFromReader(instance, new BinaryReader(bytes));
533
- return instance;
534
- }
535
- /**
536
- * Check all the properties and set default protobuf values if necessary
537
- * @param _instance message instance
538
- */
539
- static refineValues(_instance) {
540
- _instance.accountName = _instance.accountName || '';
541
- _instance.autoAnswerInterval = _instance.autoAnswerInterval || 0;
542
- }
543
- /**
544
- * Deserializes / reads binary message into message instance using provided binary reader
545
- * @param _instance message instance
546
- * @param _reader binary reader instance
547
- */
548
- static deserializeBinaryFromReader(_instance, _reader) {
549
- while (_reader.nextField()) {
550
- if (_reader.isEndGroup())
551
- break;
552
- switch (_reader.getFieldNumber()) {
553
- case 1:
554
- _instance.accountName = _reader.readString();
555
- break;
556
- case 2:
557
- _instance.autoAnswerInterval = _reader.readInt32();
558
- break;
559
- default:
560
- _reader.skipField();
561
- }
562
- }
563
- StartSessionRequest.refineValues(_instance);
564
- }
565
- /**
566
- * Serializes a message to binary format using provided binary reader
567
- * @param _instance message instance
568
- * @param _writer binary writer instance
569
- */
570
- static serializeBinaryToWriter(_instance, _writer) {
571
- if (_instance.accountName) {
572
- _writer.writeString(1, _instance.accountName);
573
- }
574
- if (_instance.autoAnswerInterval) {
575
- _writer.writeInt32(2, _instance.autoAnswerInterval);
576
- }
577
- }
578
- get accountName() {
579
- return this._accountName;
580
- }
581
- set accountName(value) {
582
- this._accountName = value;
583
- }
584
- get autoAnswerInterval() {
585
- return this._autoAnswerInterval;
586
- }
587
- set autoAnswerInterval(value) {
588
- this._autoAnswerInterval = value;
589
- }
590
- /**
591
- * Serialize message to binary data
592
- * @param instance message instance
593
- */
594
- serializeBinary() {
595
- const writer = new BinaryWriter();
596
- StartSessionRequest.serializeBinaryToWriter(this, writer);
597
- return writer.getResultBuffer();
598
- }
599
- /**
600
- * Cast message to standard JavaScript object (all non-primitive values are deeply cloned)
601
- */
602
- toObject() {
603
- return {
604
- accountName: this.accountName,
605
- autoAnswerInterval: this.autoAnswerInterval
606
- };
607
- }
608
- /**
609
- * Convenience method to support JSON.stringify(message), replicates the structure of toObject()
610
- */
611
- toJSON() {
612
- return this.toObject();
613
- }
614
- /**
615
- * Cast message to JSON using protobuf JSON notation: https://developers.google.com/protocol-buffers/docs/proto3#json
616
- * Attention: output differs from toObject() e.g. enums are represented as names and not as numbers, Timestamp is an ISO Date string format etc.
617
- * 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
618
- */
619
- toProtobufJSON(
620
- // @ts-ignore
621
- options) {
622
- return {
623
- accountName: this.accountName,
624
- autoAnswerInterval: this.autoAnswerInterval
625
- };
626
- }
627
- }
628
- StartSessionRequest.id = 'ondewo.sip.StartSessionRequest';
629
- /**
630
- * Message implementation for ondewo.sip.TransferCallRequest
631
- */
632
- class TransferCallRequest {
633
- /**
634
- * Message constructor. Initializes the properties and applies default Protobuf values if necessary
635
- * @param _value initial values object or instance of TransferCallRequest to deeply clone from
636
- */
637
- constructor(_value) {
638
- _value = _value || {};
639
- this.transferId = _value.transferId;
640
- (this.headers = _value.headers
641
- ? Object.keys(_value.headers).reduce((r, k) => (Object.assign(Object.assign({}, r), { [k]: _value.headers[k] })), {})
642
- : {}),
643
- TransferCallRequest.refineValues(this);
644
- }
645
- /**
646
- * Deserialize binary data to message
647
- * @param instance message instance
648
- */
649
- static deserializeBinary(bytes) {
650
- const instance = new TransferCallRequest();
651
- TransferCallRequest.deserializeBinaryFromReader(instance, new BinaryReader(bytes));
652
- return instance;
653
- }
654
- /**
655
- * Check all the properties and set default protobuf values if necessary
656
- * @param _instance message instance
657
- */
658
- static refineValues(_instance) {
659
- _instance.transferId = _instance.transferId || '';
660
- _instance.headers = _instance.headers || {};
661
- }
662
- /**
663
- * Deserializes / reads binary message into message instance using provided binary reader
664
- * @param _instance message instance
665
- * @param _reader binary reader instance
666
- */
667
- static deserializeBinaryFromReader(_instance, _reader) {
668
- while (_reader.nextField()) {
669
- if (_reader.isEndGroup())
670
- break;
671
- switch (_reader.getFieldNumber()) {
672
- case 1:
673
- _instance.transferId = _reader.readString();
674
- break;
675
- case 2:
676
- const msg_2 = {};
677
- _reader.readMessage(msg_2, TransferCallRequest.HeadersEntry.deserializeBinaryFromReader);
678
- _instance.headers = _instance.headers || {};
679
- _instance.headers[msg_2.key] = msg_2.value;
680
- break;
681
- default:
682
- _reader.skipField();
683
- }
684
- }
685
- TransferCallRequest.refineValues(_instance);
686
- }
687
- /**
688
- * Serializes a message to binary format using provided binary reader
689
- * @param _instance message instance
690
- * @param _writer binary writer instance
691
- */
692
- static serializeBinaryToWriter(_instance, _writer) {
693
- if (_instance.transferId) {
694
- _writer.writeString(1, _instance.transferId);
695
- }
696
- if (!!_instance.headers) {
697
- const keys_2 = Object.keys(_instance.headers);
698
- if (keys_2.length) {
699
- const repeated_2 = keys_2
700
- .map(key => ({ key: key, value: _instance.headers[key] }))
701
- .reduce((r, v) => [...r, v], []);
702
- _writer.writeRepeatedMessage(2, repeated_2, TransferCallRequest.HeadersEntry.serializeBinaryToWriter);
703
- }
704
- }
705
- }
706
- get transferId() {
707
- return this._transferId;
708
- }
709
- set transferId(value) {
710
- this._transferId = value;
711
- }
712
- get headers() {
713
- return this._headers;
714
- }
715
- set headers(value) {
716
- this._headers = value;
717
- }
718
- /**
719
- * Serialize message to binary data
720
- * @param instance message instance
721
- */
722
- serializeBinary() {
723
- const writer = new BinaryWriter();
724
- TransferCallRequest.serializeBinaryToWriter(this, writer);
725
- return writer.getResultBuffer();
726
- }
727
- /**
728
- * Cast message to standard JavaScript object (all non-primitive values are deeply cloned)
729
- */
730
- toObject() {
731
- return {
732
- transferId: this.transferId,
733
- headers: this.headers
734
- ? Object.keys(this.headers).reduce((r, k) => (Object.assign(Object.assign({}, r), { [k]: this.headers[k] })), {})
735
- : {}
736
- };
737
- }
738
- /**
739
- * Convenience method to support JSON.stringify(message), replicates the structure of toObject()
740
- */
741
- toJSON() {
742
- return this.toObject();
743
- }
744
- /**
745
- * Cast message to JSON using protobuf JSON notation: https://developers.google.com/protocol-buffers/docs/proto3#json
746
- * Attention: output differs from toObject() e.g. enums are represented as names and not as numbers, Timestamp is an ISO Date string format etc.
747
- * 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
748
- */
749
- toProtobufJSON(
750
- // @ts-ignore
751
- options) {
752
- return {
753
- transferId: this.transferId,
754
- headers: this.headers
755
- ? Object.keys(this.headers).reduce((r, k) => (Object.assign(Object.assign({}, r), { [k]: this.headers[k] })), {})
756
- : {}
757
- };
758
- }
759
- }
760
- TransferCallRequest.id = 'ondewo.sip.TransferCallRequest';
761
- (function (TransferCallRequest) {
762
- /**
763
- * Message implementation for ondewo.sip.HeadersEntry
764
- */
765
- class HeadersEntry {
766
- /**
767
- * Message constructor. Initializes the properties and applies default Protobuf values if necessary
768
- * @param _value initial values object or instance of HeadersEntry to deeply clone from
769
- */
770
- constructor(_value) {
771
- _value = _value || {};
772
- this.key = _value.key;
773
- this.value = _value.value;
774
- HeadersEntry.refineValues(this);
775
- }
776
- /**
777
- * Deserialize binary data to message
778
- * @param instance message instance
779
- */
780
- static deserializeBinary(bytes) {
781
- const instance = new HeadersEntry();
782
- HeadersEntry.deserializeBinaryFromReader(instance, new BinaryReader(bytes));
783
- return instance;
784
- }
785
- /**
786
- * Check all the properties and set default protobuf values if necessary
787
- * @param _instance message instance
788
- */
789
- static refineValues(_instance) {
790
- _instance.key = _instance.key || '';
791
- _instance.value = _instance.value || '';
792
- }
793
- /**
794
- * Deserializes / reads binary message into message instance using provided binary reader
795
- * @param _instance message instance
796
- * @param _reader binary reader instance
797
- */
798
- static deserializeBinaryFromReader(_instance, _reader) {
799
- while (_reader.nextField()) {
800
- if (_reader.isEndGroup())
801
- break;
802
- switch (_reader.getFieldNumber()) {
803
- case 1:
804
- _instance.key = _reader.readString();
805
- break;
806
- case 2:
807
- _instance.value = _reader.readString();
808
- break;
809
- default:
810
- _reader.skipField();
811
- }
812
- }
813
- HeadersEntry.refineValues(_instance);
814
- }
815
- /**
816
- * Serializes a message to binary format using provided binary reader
817
- * @param _instance message instance
818
- * @param _writer binary writer instance
819
- */
820
- static serializeBinaryToWriter(_instance, _writer) {
821
- if (_instance.key) {
822
- _writer.writeString(1, _instance.key);
823
- }
824
- if (_instance.value) {
825
- _writer.writeString(2, _instance.value);
826
- }
827
- }
828
- get key() {
829
- return this._key;
830
- }
831
- set key(value) {
832
- this._key = value;
833
- }
834
- get value() {
835
- return this._value;
836
- }
837
- set value(value) {
838
- this._value = value;
839
- }
840
- /**
841
- * Serialize message to binary data
842
- * @param instance message instance
843
- */
844
- serializeBinary() {
845
- const writer = new BinaryWriter();
846
- HeadersEntry.serializeBinaryToWriter(this, writer);
847
- return writer.getResultBuffer();
848
- }
849
- /**
850
- * Cast message to standard JavaScript object (all non-primitive values are deeply cloned)
851
- */
852
- toObject() {
853
- return {
854
- key: this.key,
855
- value: this.value
856
- };
857
- }
858
- /**
859
- * Convenience method to support JSON.stringify(message), replicates the structure of toObject()
860
- */
861
- toJSON() {
862
- return this.toObject();
863
- }
864
- /**
865
- * Cast message to JSON using protobuf JSON notation: https://developers.google.com/protocol-buffers/docs/proto3#json
866
- * Attention: output differs from toObject() e.g. enums are represented as names and not as numbers, Timestamp is an ISO Date string format etc.
867
- * 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
868
- */
869
- toProtobufJSON(
870
- // @ts-ignore
871
- options) {
872
- return {
873
- key: this.key,
874
- value: this.value
875
- };
876
- }
877
- }
878
- HeadersEntry.id = 'ondewo.sip.HeadersEntry';
879
- TransferCallRequest.HeadersEntry = HeadersEntry;
880
- })(TransferCallRequest || (TransferCallRequest = {}));
881
- /**
882
- * Message implementation for ondewo.sip.SipStatus
883
- */
884
- class SipStatus {
885
- /**
886
- * Message constructor. Initializes the properties and applies default Protobuf values if necessary
887
- * @param _value initial values object or instance of SipStatus to deeply clone from
888
- */
889
- constructor(_value) {
890
- _value = _value || {};
891
- this.accountName = _value.accountName;
892
- this.timestamp = _value.timestamp
893
- ? new googleProtobuf000.Timestamp(_value.timestamp)
894
- : undefined;
895
- this.statusType = _value.statusType;
896
- this.calleeId = _value.calleeId;
897
- this.transferCallId = _value.transferCallId;
898
- (this.headers = _value.headers
899
- ? Object.keys(_value.headers).reduce((r, k) => (Object.assign(Object.assign({}, r), { [k]: _value.headers[k] })), {})
900
- : {}),
901
- (this.description = _value.description);
902
- this.exceptionName = _value.exceptionName;
903
- this.exceptionTraceback = _value.exceptionTraceback;
904
- SipStatus.refineValues(this);
905
- }
906
- /**
907
- * Deserialize binary data to message
908
- * @param instance message instance
909
- */
910
- static deserializeBinary(bytes) {
911
- const instance = new SipStatus();
912
- SipStatus.deserializeBinaryFromReader(instance, new BinaryReader(bytes));
913
- return instance;
914
- }
915
- /**
916
- * Check all the properties and set default protobuf values if necessary
917
- * @param _instance message instance
918
- */
919
- static refineValues(_instance) {
920
- _instance.accountName = _instance.accountName || '';
921
- _instance.timestamp = _instance.timestamp || undefined;
922
- _instance.statusType = _instance.statusType || 0;
923
- _instance.calleeId = _instance.calleeId || '';
924
- _instance.transferCallId = _instance.transferCallId || '';
925
- _instance.headers = _instance.headers || {};
926
- _instance.description = _instance.description || '';
927
- _instance.exceptionName = _instance.exceptionName || '';
928
- _instance.exceptionTraceback = _instance.exceptionTraceback || '';
929
- }
930
- /**
931
- * Deserializes / reads binary message into message instance using provided binary reader
932
- * @param _instance message instance
933
- * @param _reader binary reader instance
934
- */
935
- static deserializeBinaryFromReader(_instance, _reader) {
936
- while (_reader.nextField()) {
937
- if (_reader.isEndGroup())
938
- break;
939
- switch (_reader.getFieldNumber()) {
940
- case 1:
941
- _instance.accountName = _reader.readString();
942
- break;
943
- case 2:
944
- _instance.timestamp = new googleProtobuf000.Timestamp();
945
- _reader.readMessage(_instance.timestamp, googleProtobuf000.Timestamp.deserializeBinaryFromReader);
946
- break;
947
- case 3:
948
- _instance.statusType = _reader.readEnum();
949
- break;
950
- case 4:
951
- _instance.calleeId = _reader.readString();
952
- break;
953
- case 5:
954
- _instance.transferCallId = _reader.readString();
955
- break;
956
- case 6:
957
- const msg_6 = {};
958
- _reader.readMessage(msg_6, SipStatus.HeadersEntry.deserializeBinaryFromReader);
959
- _instance.headers = _instance.headers || {};
960
- _instance.headers[msg_6.key] = msg_6.value;
961
- break;
962
- case 7:
963
- _instance.description = _reader.readString();
964
- break;
965
- case 8:
966
- _instance.exceptionName = _reader.readString();
967
- break;
968
- case 9:
969
- _instance.exceptionTraceback = _reader.readString();
970
- break;
971
- default:
972
- _reader.skipField();
973
- }
974
- }
975
- SipStatus.refineValues(_instance);
976
- }
977
- /**
978
- * Serializes a message to binary format using provided binary reader
979
- * @param _instance message instance
980
- * @param _writer binary writer instance
981
- */
982
- static serializeBinaryToWriter(_instance, _writer) {
983
- if (_instance.accountName) {
984
- _writer.writeString(1, _instance.accountName);
985
- }
986
- if (_instance.timestamp) {
987
- _writer.writeMessage(2, _instance.timestamp, googleProtobuf000.Timestamp.serializeBinaryToWriter);
988
- }
989
- if (_instance.statusType) {
990
- _writer.writeEnum(3, _instance.statusType);
991
- }
992
- if (_instance.calleeId) {
993
- _writer.writeString(4, _instance.calleeId);
994
- }
995
- if (_instance.transferCallId) {
996
- _writer.writeString(5, _instance.transferCallId);
997
- }
998
- if (!!_instance.headers) {
999
- const keys_6 = Object.keys(_instance.headers);
1000
- if (keys_6.length) {
1001
- const repeated_6 = keys_6
1002
- .map(key => ({ key: key, value: _instance.headers[key] }))
1003
- .reduce((r, v) => [...r, v], []);
1004
- _writer.writeRepeatedMessage(6, repeated_6, SipStatus.HeadersEntry.serializeBinaryToWriter);
1005
- }
1006
- }
1007
- if (_instance.description) {
1008
- _writer.writeString(7, _instance.description);
1009
- }
1010
- if (_instance.exceptionName) {
1011
- _writer.writeString(8, _instance.exceptionName);
1012
- }
1013
- if (_instance.exceptionTraceback) {
1014
- _writer.writeString(9, _instance.exceptionTraceback);
1015
- }
1016
- }
1017
- get accountName() {
1018
- return this._accountName;
1019
- }
1020
- set accountName(value) {
1021
- this._accountName = value;
1022
- }
1023
- get timestamp() {
1024
- return this._timestamp;
1025
- }
1026
- set timestamp(value) {
1027
- this._timestamp = value;
1028
- }
1029
- get statusType() {
1030
- return this._statusType;
1031
- }
1032
- set statusType(value) {
1033
- this._statusType = value;
1034
- }
1035
- get calleeId() {
1036
- return this._calleeId;
1037
- }
1038
- set calleeId(value) {
1039
- this._calleeId = value;
1040
- }
1041
- get transferCallId() {
1042
- return this._transferCallId;
1043
- }
1044
- set transferCallId(value) {
1045
- this._transferCallId = value;
1046
- }
1047
- get headers() {
1048
- return this._headers;
1049
- }
1050
- set headers(value) {
1051
- this._headers = value;
1052
- }
1053
- get description() {
1054
- return this._description;
1055
- }
1056
- set description(value) {
1057
- this._description = value;
1058
- }
1059
- get exceptionName() {
1060
- return this._exceptionName;
1061
- }
1062
- set exceptionName(value) {
1063
- this._exceptionName = value;
1064
- }
1065
- get exceptionTraceback() {
1066
- return this._exceptionTraceback;
1067
- }
1068
- set exceptionTraceback(value) {
1069
- this._exceptionTraceback = value;
1070
- }
1071
- /**
1072
- * Serialize message to binary data
1073
- * @param instance message instance
1074
- */
1075
- serializeBinary() {
1076
- const writer = new BinaryWriter();
1077
- SipStatus.serializeBinaryToWriter(this, writer);
1078
- return writer.getResultBuffer();
1079
- }
1080
- /**
1081
- * Cast message to standard JavaScript object (all non-primitive values are deeply cloned)
1082
- */
1083
- toObject() {
1084
- return {
1085
- accountName: this.accountName,
1086
- timestamp: this.timestamp ? this.timestamp.toObject() : undefined,
1087
- statusType: this.statusType,
1088
- calleeId: this.calleeId,
1089
- transferCallId: this.transferCallId,
1090
- headers: this.headers
1091
- ? Object.keys(this.headers).reduce((r, k) => (Object.assign(Object.assign({}, r), { [k]: this.headers[k] })), {})
1092
- : {},
1093
- description: this.description,
1094
- exceptionName: this.exceptionName,
1095
- exceptionTraceback: this.exceptionTraceback
1096
- };
1097
- }
1098
- /**
1099
- * Convenience method to support JSON.stringify(message), replicates the structure of toObject()
1100
- */
1101
- toJSON() {
1102
- return this.toObject();
1103
- }
1104
- /**
1105
- * Cast message to JSON using protobuf JSON notation: https://developers.google.com/protocol-buffers/docs/proto3#json
1106
- * Attention: output differs from toObject() e.g. enums are represented as names and not as numbers, Timestamp is an ISO Date string format etc.
1107
- * 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
1108
- */
1109
- toProtobufJSON(
1110
- // @ts-ignore
1111
- options) {
1112
- return {
1113
- accountName: this.accountName,
1114
- timestamp: this.timestamp ? this.timestamp.toProtobufJSON(options) : null,
1115
- statusType: SipStatus.StatusType[this.statusType === null || this.statusType === undefined
1116
- ? 0
1117
- : this.statusType],
1118
- calleeId: this.calleeId,
1119
- transferCallId: this.transferCallId,
1120
- headers: this.headers
1121
- ? Object.keys(this.headers).reduce((r, k) => (Object.assign(Object.assign({}, r), { [k]: this.headers[k] })), {})
1122
- : {},
1123
- description: this.description,
1124
- exceptionName: this.exceptionName,
1125
- exceptionTraceback: this.exceptionTraceback
1126
- };
1127
- }
1128
- }
1129
- SipStatus.id = 'ondewo.sip.SipStatus';
1130
- (function (SipStatus) {
1131
- let StatusType;
1132
- (function (StatusType) {
1133
- StatusType[StatusType["NO_SESSION"] = 0] = "NO_SESSION";
1134
- StatusType[StatusType["REGISTERED"] = 1] = "REGISTERED";
1135
- StatusType[StatusType["READY"] = 2] = "READY";
1136
- StatusType[StatusType["INCOMING_CALL_INITIATED"] = 3] = "INCOMING_CALL_INITIATED";
1137
- StatusType[StatusType["OUTGOING_CALL_INITIATED"] = 4] = "OUTGOING_CALL_INITIATED";
1138
- StatusType[StatusType["OUTGOING_CALL_CONNECTED"] = 5] = "OUTGOING_CALL_CONNECTED";
1139
- StatusType[StatusType["INCOMING_CALL_CONNECTED"] = 6] = "INCOMING_CALL_CONNECTED";
1140
- StatusType[StatusType["TRANSFER_CALL_INITIATED"] = 7] = "TRANSFER_CALL_INITIATED";
1141
- StatusType[StatusType["SOFT_HANGUP_INITIATED"] = 8] = "SOFT_HANGUP_INITIATED";
1142
- StatusType[StatusType["HARD_HANGUP_INITIATED"] = 9] = "HARD_HANGUP_INITIATED";
1143
- StatusType[StatusType["INCOMING_CALL_FAILED"] = 10] = "INCOMING_CALL_FAILED";
1144
- StatusType[StatusType["OUTGOING_CALL_FAILED"] = 11] = "OUTGOING_CALL_FAILED";
1145
- StatusType[StatusType["INCOMING_CALL_FINISHED"] = 12] = "INCOMING_CALL_FINISHED";
1146
- StatusType[StatusType["OUTGOING_CALL_FINISHED"] = 13] = "OUTGOING_CALL_FINISHED";
1147
- StatusType[StatusType["SESSION_REGISTRATION_FAILED"] = 14] = "SESSION_REGISTRATION_FAILED";
1148
- StatusType[StatusType["SESSION_STARTED"] = 15] = "SESSION_STARTED";
1149
- StatusType[StatusType["SESSION_ENDED"] = 16] = "SESSION_ENDED";
1150
- StatusType[StatusType["TRANSFER_CALL_FAILED"] = 17] = "TRANSFER_CALL_FAILED";
1151
- StatusType[StatusType["MICROPHONE_MUTED"] = 18] = "MICROPHONE_MUTED";
1152
- StatusType[StatusType["MICROPHONE_UNMUTED"] = 19] = "MICROPHONE_UNMUTED";
1153
- StatusType[StatusType["MICROPHONE_WAV_FILES_PLAYED"] = 20] = "MICROPHONE_WAV_FILES_PLAYED";
1154
- StatusType[StatusType["NO_ONGOING_CALL"] = 21] = "NO_ONGOING_CALL";
1155
- })(StatusType = SipStatus.StatusType || (SipStatus.StatusType = {}));
1156
- /**
1157
- * Message implementation for ondewo.sip.HeadersEntry
1158
- */
1159
- class HeadersEntry {
1160
- /**
1161
- * Message constructor. Initializes the properties and applies default Protobuf values if necessary
1162
- * @param _value initial values object or instance of HeadersEntry to deeply clone from
1163
- */
1164
- constructor(_value) {
1165
- _value = _value || {};
1166
- this.key = _value.key;
1167
- this.value = _value.value;
1168
- HeadersEntry.refineValues(this);
1169
- }
1170
- /**
1171
- * Deserialize binary data to message
1172
- * @param instance message instance
1173
- */
1174
- static deserializeBinary(bytes) {
1175
- const instance = new HeadersEntry();
1176
- HeadersEntry.deserializeBinaryFromReader(instance, new BinaryReader(bytes));
1177
- return instance;
1178
- }
1179
- /**
1180
- * Check all the properties and set default protobuf values if necessary
1181
- * @param _instance message instance
1182
- */
1183
- static refineValues(_instance) {
1184
- _instance.key = _instance.key || '';
1185
- _instance.value = _instance.value || '';
1186
- }
1187
- /**
1188
- * Deserializes / reads binary message into message instance using provided binary reader
1189
- * @param _instance message instance
1190
- * @param _reader binary reader instance
1191
- */
1192
- static deserializeBinaryFromReader(_instance, _reader) {
1193
- while (_reader.nextField()) {
1194
- if (_reader.isEndGroup())
1195
- break;
1196
- switch (_reader.getFieldNumber()) {
1197
- case 1:
1198
- _instance.key = _reader.readString();
1199
- break;
1200
- case 2:
1201
- _instance.value = _reader.readString();
1202
- break;
1203
- default:
1204
- _reader.skipField();
1205
- }
1206
- }
1207
- HeadersEntry.refineValues(_instance);
1208
- }
1209
- /**
1210
- * Serializes a message to binary format using provided binary reader
1211
- * @param _instance message instance
1212
- * @param _writer binary writer instance
1213
- */
1214
- static serializeBinaryToWriter(_instance, _writer) {
1215
- if (_instance.key) {
1216
- _writer.writeString(1, _instance.key);
1217
- }
1218
- if (_instance.value) {
1219
- _writer.writeString(2, _instance.value);
1220
- }
1221
- }
1222
- get key() {
1223
- return this._key;
1224
- }
1225
- set key(value) {
1226
- this._key = value;
1227
- }
1228
- get value() {
1229
- return this._value;
1230
- }
1231
- set value(value) {
1232
- this._value = value;
1233
- }
1234
- /**
1235
- * Serialize message to binary data
1236
- * @param instance message instance
1237
- */
1238
- serializeBinary() {
1239
- const writer = new BinaryWriter();
1240
- HeadersEntry.serializeBinaryToWriter(this, writer);
1241
- return writer.getResultBuffer();
1242
- }
1243
- /**
1244
- * Cast message to standard JavaScript object (all non-primitive values are deeply cloned)
1245
- */
1246
- toObject() {
1247
- return {
1248
- key: this.key,
1249
- value: this.value
1250
- };
1251
- }
1252
- /**
1253
- * Convenience method to support JSON.stringify(message), replicates the structure of toObject()
1254
- */
1255
- toJSON() {
1256
- return this.toObject();
1257
- }
1258
- /**
1259
- * Cast message to JSON using protobuf JSON notation: https://developers.google.com/protocol-buffers/docs/proto3#json
1260
- * Attention: output differs from toObject() e.g. enums are represented as names and not as numbers, Timestamp is an ISO Date string format etc.
1261
- * 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
1262
- */
1263
- toProtobufJSON(
1264
- // @ts-ignore
1265
- options) {
1266
- return {
1267
- key: this.key,
1268
- value: this.value
1269
- };
1270
- }
1271
- }
1272
- HeadersEntry.id = 'ondewo.sip.HeadersEntry';
1273
- SipStatus.HeadersEntry = HeadersEntry;
1274
- })(SipStatus || (SipStatus = {}));
1275
- /**
1276
- * Message implementation for ondewo.sip.SipStatusHistoryResponse
1277
- */
1278
- class SipStatusHistoryResponse {
1279
- /**
1280
- * Message constructor. Initializes the properties and applies default Protobuf values if necessary
1281
- * @param _value initial values object or instance of SipStatusHistoryResponse to deeply clone from
1282
- */
1283
- constructor(_value) {
1284
- _value = _value || {};
1285
- this.statusHistory = (_value.statusHistory || []).map(m => new SipStatus(m));
1286
- SipStatusHistoryResponse.refineValues(this);
1287
- }
1288
- /**
1289
- * Deserialize binary data to message
1290
- * @param instance message instance
1291
- */
1292
- static deserializeBinary(bytes) {
1293
- const instance = new SipStatusHistoryResponse();
1294
- SipStatusHistoryResponse.deserializeBinaryFromReader(instance, new BinaryReader(bytes));
1295
- return instance;
1296
- }
1297
- /**
1298
- * Check all the properties and set default protobuf values if necessary
1299
- * @param _instance message instance
1300
- */
1301
- static refineValues(_instance) {
1302
- _instance.statusHistory = _instance.statusHistory || [];
1303
- }
1304
- /**
1305
- * Deserializes / reads binary message into message instance using provided binary reader
1306
- * @param _instance message instance
1307
- * @param _reader binary reader instance
1308
- */
1309
- static deserializeBinaryFromReader(_instance, _reader) {
1310
- while (_reader.nextField()) {
1311
- if (_reader.isEndGroup())
1312
- break;
1313
- switch (_reader.getFieldNumber()) {
1314
- case 1:
1315
- const messageInitializer1 = new SipStatus();
1316
- _reader.readMessage(messageInitializer1, SipStatus.deserializeBinaryFromReader);
1317
- (_instance.statusHistory = _instance.statusHistory || []).push(messageInitializer1);
1318
- break;
1319
- default:
1320
- _reader.skipField();
1321
- }
1322
- }
1323
- SipStatusHistoryResponse.refineValues(_instance);
1324
- }
1325
- /**
1326
- * Serializes a message to binary format using provided binary reader
1327
- * @param _instance message instance
1328
- * @param _writer binary writer instance
1329
- */
1330
- static serializeBinaryToWriter(_instance, _writer) {
1331
- if (_instance.statusHistory && _instance.statusHistory.length) {
1332
- _writer.writeRepeatedMessage(1, _instance.statusHistory, SipStatus.serializeBinaryToWriter);
1333
- }
1334
- }
1335
- get statusHistory() {
1336
- return this._statusHistory;
1337
- }
1338
- set statusHistory(value) {
1339
- this._statusHistory = value;
1340
- }
1341
- /**
1342
- * Serialize message to binary data
1343
- * @param instance message instance
1344
- */
1345
- serializeBinary() {
1346
- const writer = new BinaryWriter();
1347
- SipStatusHistoryResponse.serializeBinaryToWriter(this, writer);
1348
- return writer.getResultBuffer();
1349
- }
1350
- /**
1351
- * Cast message to standard JavaScript object (all non-primitive values are deeply cloned)
1352
- */
1353
- toObject() {
1354
- return {
1355
- statusHistory: (this.statusHistory || []).map(m => m.toObject())
1356
- };
1357
- }
1358
- /**
1359
- * Convenience method to support JSON.stringify(message), replicates the structure of toObject()
1360
- */
1361
- toJSON() {
1362
- return this.toObject();
1363
- }
1364
- /**
1365
- * Cast message to JSON using protobuf JSON notation: https://developers.google.com/protocol-buffers/docs/proto3#json
1366
- * Attention: output differs from toObject() e.g. enums are represented as names and not as numbers, Timestamp is an ISO Date string format etc.
1367
- * 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
1368
- */
1369
- toProtobufJSON(
1370
- // @ts-ignore
1371
- options) {
1372
- return {
1373
- statusHistory: (this.statusHistory || []).map(m => m.toProtobufJSON(options))
1374
- };
1375
- }
1376
- }
1377
- SipStatusHistoryResponse.id = 'ondewo.sip.SipStatusHistoryResponse';
1378
- /**
1379
- * Message implementation for ondewo.sip.PlayWavFilesRequest
1380
- */
1381
- class PlayWavFilesRequest {
1382
- /**
1383
- * Message constructor. Initializes the properties and applies default Protobuf values if necessary
1384
- * @param _value initial values object or instance of PlayWavFilesRequest to deeply clone from
1385
- */
1386
- constructor(_value) {
1387
- _value = _value || {};
1388
- this.wavFiles = (_value.wavFiles || []).map(b => b ? b.subarray(0) : new Uint8Array());
1389
- PlayWavFilesRequest.refineValues(this);
1390
- }
1391
- /**
1392
- * Deserialize binary data to message
1393
- * @param instance message instance
1394
- */
1395
- static deserializeBinary(bytes) {
1396
- const instance = new PlayWavFilesRequest();
1397
- PlayWavFilesRequest.deserializeBinaryFromReader(instance, new BinaryReader(bytes));
1398
- return instance;
1399
- }
1400
- /**
1401
- * Check all the properties and set default protobuf values if necessary
1402
- * @param _instance message instance
1403
- */
1404
- static refineValues(_instance) {
1405
- _instance.wavFiles = _instance.wavFiles || [];
1406
- }
1407
- /**
1408
- * Deserializes / reads binary message into message instance using provided binary reader
1409
- * @param _instance message instance
1410
- * @param _reader binary reader instance
1411
- */
1412
- static deserializeBinaryFromReader(_instance, _reader) {
1413
- while (_reader.nextField()) {
1414
- if (_reader.isEndGroup())
1415
- break;
1416
- switch (_reader.getFieldNumber()) {
1417
- case 1:
1418
- (_instance.wavFiles = _instance.wavFiles || []).push(_reader.readBytes());
1419
- break;
1420
- default:
1421
- _reader.skipField();
1422
- }
1423
- }
1424
- PlayWavFilesRequest.refineValues(_instance);
1425
- }
1426
- /**
1427
- * Serializes a message to binary format using provided binary reader
1428
- * @param _instance message instance
1429
- * @param _writer binary writer instance
1430
- */
1431
- static serializeBinaryToWriter(_instance, _writer) {
1432
- if (_instance.wavFiles && _instance.wavFiles.length) {
1433
- _writer.writeRepeatedBytes(1, _instance.wavFiles);
1434
- }
1435
- }
1436
- get wavFiles() {
1437
- return this._wavFiles;
1438
- }
1439
- set wavFiles(value) {
1440
- this._wavFiles = value;
1441
- }
1442
- /**
1443
- * Serialize message to binary data
1444
- * @param instance message instance
1445
- */
1446
- serializeBinary() {
1447
- const writer = new BinaryWriter();
1448
- PlayWavFilesRequest.serializeBinaryToWriter(this, writer);
1449
- return writer.getResultBuffer();
1450
- }
1451
- /**
1452
- * Cast message to standard JavaScript object (all non-primitive values are deeply cloned)
1453
- */
1454
- toObject() {
1455
- return {
1456
- wavFiles: (this.wavFiles || []).map(b => b ? b.subarray(0) : new Uint8Array())
1457
- };
1458
- }
1459
- /**
1460
- * Convenience method to support JSON.stringify(message), replicates the structure of toObject()
1461
- */
1462
- toJSON() {
1463
- return this.toObject();
1464
- }
1465
- /**
1466
- * Cast message to JSON using protobuf JSON notation: https://developers.google.com/protocol-buffers/docs/proto3#json
1467
- * Attention: output differs from toObject() e.g. enums are represented as names and not as numbers, Timestamp is an ISO Date string format etc.
1468
- * 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
1469
- */
1470
- toProtobufJSON(
1471
- // @ts-ignore
1472
- options) {
1473
- return {
1474
- wavFiles: (this.wavFiles || []).map(b => (b ? uint8ArrayToBase64(b) : ''))
1475
- };
1476
- }
1477
- }
1478
- PlayWavFilesRequest.id = 'ondewo.sip.PlayWavFilesRequest';
1479
-
1480
- /* tslint:disable */
1481
- /**
1482
- * Specific GrpcClientSettings for Sip.
1483
- * Use it only if your default settings are not set or the service requires other settings.
1484
- */
1485
- const GRPC_SIP_CLIENT_SETTINGS = new InjectionToken('GRPC_SIP_CLIENT_SETTINGS');
1486
-
1487
- /* tslint:disable */
1488
- /**
1489
- * Service client implementation for ondewo.sip.Sip
1490
- */
1491
- class SipClient {
1492
- constructor(settings, clientFactory, handler) {
1493
- this.handler = handler;
1494
- /**
1495
- * Raw RPC implementation for each service client method.
1496
- * The raw methods provide more control on the incoming data and events. E.g. they can be useful to read status `OK` metadata.
1497
- * Attention: these methods do not throw errors when non-zero status codes are received.
1498
- */
1499
- this.$raw = {
1500
- /**
1501
- * Unary call: /ondewo.sip.Sip/StartSession
1502
- *
1503
- * @param requestMessage Request message
1504
- * @param requestMetadata Request metadata
1505
- * @returns Observable<GrpcEvent<thisProto.SipStatus>>
1506
- */
1507
- startSession: (requestData, requestMetadata = new GrpcMetadata()) => {
1508
- return this.handler.handle({
1509
- type: GrpcCallType.unary,
1510
- client: this.client,
1511
- path: '/ondewo.sip.Sip/StartSession',
1512
- requestData,
1513
- requestMetadata,
1514
- requestClass: StartSessionRequest,
1515
- responseClass: SipStatus
1516
- });
1517
- },
1518
- /**
1519
- * Unary call: /ondewo.sip.Sip/EndSession
1520
- *
1521
- * @param requestMessage Request message
1522
- * @param requestMetadata Request metadata
1523
- * @returns Observable<GrpcEvent<thisProto.SipStatus>>
1524
- */
1525
- endSession: (requestData, requestMetadata = new GrpcMetadata()) => {
1526
- return this.handler.handle({
1527
- type: GrpcCallType.unary,
1528
- client: this.client,
1529
- path: '/ondewo.sip.Sip/EndSession',
1530
- requestData,
1531
- requestMetadata,
1532
- requestClass: googleProtobuf000.Empty,
1533
- responseClass: SipStatus
1534
- });
1535
- },
1536
- /**
1537
- * Unary call: /ondewo.sip.Sip/StartCall
1538
- *
1539
- * @param requestMessage Request message
1540
- * @param requestMetadata Request metadata
1541
- * @returns Observable<GrpcEvent<thisProto.SipStatus>>
1542
- */
1543
- startCall: (requestData, requestMetadata = new GrpcMetadata()) => {
1544
- return this.handler.handle({
1545
- type: GrpcCallType.unary,
1546
- client: this.client,
1547
- path: '/ondewo.sip.Sip/StartCall',
1548
- requestData,
1549
- requestMetadata,
1550
- requestClass: StartCallRequest,
1551
- responseClass: SipStatus
1552
- });
1553
- },
1554
- /**
1555
- * Unary call: /ondewo.sip.Sip/EndCall
1556
- *
1557
- * @param requestMessage Request message
1558
- * @param requestMetadata Request metadata
1559
- * @returns Observable<GrpcEvent<thisProto.SipStatus>>
1560
- */
1561
- endCall: (requestData, requestMetadata = new GrpcMetadata()) => {
1562
- return this.handler.handle({
1563
- type: GrpcCallType.unary,
1564
- client: this.client,
1565
- path: '/ondewo.sip.Sip/EndCall',
1566
- requestData,
1567
- requestMetadata,
1568
- requestClass: EndCallRequest,
1569
- responseClass: SipStatus
1570
- });
1571
- },
1572
- /**
1573
- * Unary call: /ondewo.sip.Sip/TransferCall
1574
- *
1575
- * @param requestMessage Request message
1576
- * @param requestMetadata Request metadata
1577
- * @returns Observable<GrpcEvent<thisProto.SipStatus>>
1578
- */
1579
- transferCall: (requestData, requestMetadata = new GrpcMetadata()) => {
1580
- return this.handler.handle({
1581
- type: GrpcCallType.unary,
1582
- client: this.client,
1583
- path: '/ondewo.sip.Sip/TransferCall',
1584
- requestData,
1585
- requestMetadata,
1586
- requestClass: TransferCallRequest,
1587
- responseClass: SipStatus
1588
- });
1589
- },
1590
- /**
1591
- * Unary call: /ondewo.sip.Sip/RegisterAccount
1592
- *
1593
- * @param requestMessage Request message
1594
- * @param requestMetadata Request metadata
1595
- * @returns Observable<GrpcEvent<thisProto.SipStatus>>
1596
- */
1597
- registerAccount: (requestData, requestMetadata = new GrpcMetadata()) => {
1598
- return this.handler.handle({
1599
- type: GrpcCallType.unary,
1600
- client: this.client,
1601
- path: '/ondewo.sip.Sip/RegisterAccount',
1602
- requestData,
1603
- requestMetadata,
1604
- requestClass: RegisterAccountRequest,
1605
- responseClass: SipStatus
1606
- });
1607
- },
1608
- /**
1609
- * Unary call: /ondewo.sip.Sip/GetSipStatus
1610
- *
1611
- * @param requestMessage Request message
1612
- * @param requestMetadata Request metadata
1613
- * @returns Observable<GrpcEvent<thisProto.SipStatus>>
1614
- */
1615
- getSipStatus: (requestData, requestMetadata = new GrpcMetadata()) => {
1616
- return this.handler.handle({
1617
- type: GrpcCallType.unary,
1618
- client: this.client,
1619
- path: '/ondewo.sip.Sip/GetSipStatus',
1620
- requestData,
1621
- requestMetadata,
1622
- requestClass: googleProtobuf000.Empty,
1623
- responseClass: SipStatus
1624
- });
1625
- },
1626
- /**
1627
- * Unary call: /ondewo.sip.Sip/GetSipStatusHistory
1628
- *
1629
- * @param requestMessage Request message
1630
- * @param requestMetadata Request metadata
1631
- * @returns Observable<GrpcEvent<thisProto.SipStatusHistoryResponse>>
1632
- */
1633
- getSipStatusHistory: (requestData, requestMetadata = new GrpcMetadata()) => {
1634
- return this.handler.handle({
1635
- type: GrpcCallType.unary,
1636
- client: this.client,
1637
- path: '/ondewo.sip.Sip/GetSipStatusHistory',
1638
- requestData,
1639
- requestMetadata,
1640
- requestClass: googleProtobuf000.Empty,
1641
- responseClass: SipStatusHistoryResponse
1642
- });
1643
- },
1644
- /**
1645
- * Unary call: /ondewo.sip.Sip/PlayWavFiles
1646
- *
1647
- * @param requestMessage Request message
1648
- * @param requestMetadata Request metadata
1649
- * @returns Observable<GrpcEvent<thisProto.SipStatus>>
1650
- */
1651
- playWavFiles: (requestData, requestMetadata = new GrpcMetadata()) => {
1652
- return this.handler.handle({
1653
- type: GrpcCallType.unary,
1654
- client: this.client,
1655
- path: '/ondewo.sip.Sip/PlayWavFiles',
1656
- requestData,
1657
- requestMetadata,
1658
- requestClass: PlayWavFilesRequest,
1659
- responseClass: SipStatus
1660
- });
1661
- },
1662
- /**
1663
- * Unary call: /ondewo.sip.Sip/Mute
1664
- *
1665
- * @param requestMessage Request message
1666
- * @param requestMetadata Request metadata
1667
- * @returns Observable<GrpcEvent<thisProto.SipStatus>>
1668
- */
1669
- mute: (requestData, requestMetadata = new GrpcMetadata()) => {
1670
- return this.handler.handle({
1671
- type: GrpcCallType.unary,
1672
- client: this.client,
1673
- path: '/ondewo.sip.Sip/Mute',
1674
- requestData,
1675
- requestMetadata,
1676
- requestClass: googleProtobuf000.Empty,
1677
- responseClass: SipStatus
1678
- });
1679
- },
1680
- /**
1681
- * Unary call: /ondewo.sip.Sip/UnMute
1682
- *
1683
- * @param requestMessage Request message
1684
- * @param requestMetadata Request metadata
1685
- * @returns Observable<GrpcEvent<thisProto.SipStatus>>
1686
- */
1687
- unMute: (requestData, requestMetadata = new GrpcMetadata()) => {
1688
- return this.handler.handle({
1689
- type: GrpcCallType.unary,
1690
- client: this.client,
1691
- path: '/ondewo.sip.Sip/UnMute',
1692
- requestData,
1693
- requestMetadata,
1694
- requestClass: googleProtobuf000.Empty,
1695
- responseClass: SipStatus
1696
- });
1697
- }
1698
- };
1699
- this.client = clientFactory.createClient('ondewo.sip.Sip', settings);
1700
- }
1701
- /**
1702
- * Unary call @/ondewo.sip.Sip/StartSession
1703
- *
1704
- * @param requestMessage Request message
1705
- * @param requestMetadata Request metadata
1706
- * @returns Observable<thisProto.SipStatus>
1707
- */
1708
- startSession(requestData, requestMetadata = new GrpcMetadata()) {
1709
- return this.$raw
1710
- .startSession(requestData, requestMetadata)
1711
- .pipe(throwStatusErrors(), takeMessages());
1712
- }
1713
- /**
1714
- * Unary call @/ondewo.sip.Sip/EndSession
1715
- *
1716
- * @param requestMessage Request message
1717
- * @param requestMetadata Request metadata
1718
- * @returns Observable<thisProto.SipStatus>
1719
- */
1720
- endSession(requestData, requestMetadata = new GrpcMetadata()) {
1721
- return this.$raw
1722
- .endSession(requestData, requestMetadata)
1723
- .pipe(throwStatusErrors(), takeMessages());
1724
- }
1725
- /**
1726
- * Unary call @/ondewo.sip.Sip/StartCall
1727
- *
1728
- * @param requestMessage Request message
1729
- * @param requestMetadata Request metadata
1730
- * @returns Observable<thisProto.SipStatus>
1731
- */
1732
- startCall(requestData, requestMetadata = new GrpcMetadata()) {
1733
- return this.$raw
1734
- .startCall(requestData, requestMetadata)
1735
- .pipe(throwStatusErrors(), takeMessages());
1736
- }
1737
- /**
1738
- * Unary call @/ondewo.sip.Sip/EndCall
1739
- *
1740
- * @param requestMessage Request message
1741
- * @param requestMetadata Request metadata
1742
- * @returns Observable<thisProto.SipStatus>
1743
- */
1744
- endCall(requestData, requestMetadata = new GrpcMetadata()) {
1745
- return this.$raw
1746
- .endCall(requestData, requestMetadata)
1747
- .pipe(throwStatusErrors(), takeMessages());
1748
- }
1749
- /**
1750
- * Unary call @/ondewo.sip.Sip/TransferCall
1751
- *
1752
- * @param requestMessage Request message
1753
- * @param requestMetadata Request metadata
1754
- * @returns Observable<thisProto.SipStatus>
1755
- */
1756
- transferCall(requestData, requestMetadata = new GrpcMetadata()) {
1757
- return this.$raw
1758
- .transferCall(requestData, requestMetadata)
1759
- .pipe(throwStatusErrors(), takeMessages());
1760
- }
1761
- /**
1762
- * Unary call @/ondewo.sip.Sip/RegisterAccount
1763
- *
1764
- * @param requestMessage Request message
1765
- * @param requestMetadata Request metadata
1766
- * @returns Observable<thisProto.SipStatus>
1767
- */
1768
- registerAccount(requestData, requestMetadata = new GrpcMetadata()) {
1769
- return this.$raw
1770
- .registerAccount(requestData, requestMetadata)
1771
- .pipe(throwStatusErrors(), takeMessages());
1772
- }
1773
- /**
1774
- * Unary call @/ondewo.sip.Sip/GetSipStatus
1775
- *
1776
- * @param requestMessage Request message
1777
- * @param requestMetadata Request metadata
1778
- * @returns Observable<thisProto.SipStatus>
1779
- */
1780
- getSipStatus(requestData, requestMetadata = new GrpcMetadata()) {
1781
- return this.$raw
1782
- .getSipStatus(requestData, requestMetadata)
1783
- .pipe(throwStatusErrors(), takeMessages());
1784
- }
1785
- /**
1786
- * Unary call @/ondewo.sip.Sip/GetSipStatusHistory
1787
- *
1788
- * @param requestMessage Request message
1789
- * @param requestMetadata Request metadata
1790
- * @returns Observable<thisProto.SipStatusHistoryResponse>
1791
- */
1792
- getSipStatusHistory(requestData, requestMetadata = new GrpcMetadata()) {
1793
- return this.$raw
1794
- .getSipStatusHistory(requestData, requestMetadata)
1795
- .pipe(throwStatusErrors(), takeMessages());
1796
- }
1797
- /**
1798
- * Unary call @/ondewo.sip.Sip/PlayWavFiles
1799
- *
1800
- * @param requestMessage Request message
1801
- * @param requestMetadata Request metadata
1802
- * @returns Observable<thisProto.SipStatus>
1803
- */
1804
- playWavFiles(requestData, requestMetadata = new GrpcMetadata()) {
1805
- return this.$raw
1806
- .playWavFiles(requestData, requestMetadata)
1807
- .pipe(throwStatusErrors(), takeMessages());
1808
- }
1809
- /**
1810
- * Unary call @/ondewo.sip.Sip/Mute
1811
- *
1812
- * @param requestMessage Request message
1813
- * @param requestMetadata Request metadata
1814
- * @returns Observable<thisProto.SipStatus>
1815
- */
1816
- mute(requestData, requestMetadata = new GrpcMetadata()) {
1817
- return this.$raw
1818
- .mute(requestData, requestMetadata)
1819
- .pipe(throwStatusErrors(), takeMessages());
1820
- }
1821
- /**
1822
- * Unary call @/ondewo.sip.Sip/UnMute
1823
- *
1824
- * @param requestMessage Request message
1825
- * @param requestMetadata Request metadata
1826
- * @returns Observable<thisProto.SipStatus>
1827
- */
1828
- unMute(requestData, requestMetadata = new GrpcMetadata()) {
1829
- return this.$raw
1830
- .unMute(requestData, requestMetadata)
1831
- .pipe(throwStatusErrors(), takeMessages());
1832
- }
1833
- }
1834
- SipClient.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SipClient, deps: [{ token: GRPC_SIP_CLIENT_SETTINGS, optional: true }, { token: GRPC_CLIENT_FACTORY }, { token: i1.GrpcHandler }], target: i0.ɵɵFactoryTarget.Injectable });
1835
- SipClient.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SipClient, providedIn: 'any' });
1836
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SipClient, decorators: [{
1837
- type: Injectable,
1838
- args: [{ providedIn: 'any' }]
1839
- }], ctorParameters: function () {
1840
- return [{ type: undefined, decorators: [{
1841
- type: Optional
1842
- }, {
1843
- type: Inject,
1844
- args: [GRPC_SIP_CLIENT_SETTINGS]
1845
- }] }, { type: undefined, decorators: [{
1846
- type: Inject,
1847
- args: [GRPC_CLIENT_FACTORY]
1848
- }] }, { type: i1.GrpcHandler }];
1849
- } });
1850
-
1851
- /**
1852
- * Generated bundle index. Do not edit.
1853
- */
1854
-
1855
- export { EndCallRequest, GRPC_SIP_CLIENT_SETTINGS, PlayWavFilesRequest, RegisterAccountRequest, SipClient, SipStatus, SipStatusHistoryResponse, StartCallRequest, StartSessionRequest, TransferCallRequest };
1856
- //# sourceMappingURL=ondewo-sip-client-angular.mjs.map