@fonoster/sdk 0.7.4 → 0.7.7
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/README.md +20 -13
- package/dist/node/Calls.d.ts +2 -2
- package/dist/node/Calls.js +2 -2
- package/dist/node/Workspaces.js +0 -6
- package/dist/node/client/makeRpcRequest.js +0 -1
- package/dist/node/client/types/common.d.ts +1 -1
- package/dist/node/client/types/index.d.ts +3 -3
- package/dist/node/client/types/index.js +5 -5
- package/dist/node/client/utils.d.ts +1 -1
- package/dist/node/client/utils.js +2 -2
- package/dist/node/generated/node/applications_pb.js +1 -1
- package/dist/node/generated/web/applications_pb.d.ts +1 -1
- package/dist/node/generated/web/applications_pb.js +1 -1
- package/dist/node/node.d.ts +8 -8
- package/dist/node/node.js +12 -12
- package/dist/node/tsconfig.node.tsbuildinfo +1 -1
- package/dist/node/utils.js +0 -1
- package/dist/web/fonoster.min.js +1 -1
- package/dist/web/index.esm.js +1 -1
- package/package.json +4 -4
- package/dist/node/generated/node/acls.ts +0 -1054
- package/dist/node/generated/node/agents.ts +0 -1388
- package/dist/node/generated/node/applications.ts +0 -1411
- package/dist/node/generated/node/calls.ts +0 -1123
- package/dist/node/generated/node/credentials.ts +0 -1054
- package/dist/node/generated/node/domains.ts +0 -1144
- package/dist/node/generated/node/google/protobuf/empty.ts +0 -48
- package/dist/node/generated/node/google/protobuf/struct.ts +0 -408
- package/dist/node/generated/node/identity.ts +0 -4267
- package/dist/node/generated/node/numbers.ts +0 -1371
- package/dist/node/generated/node/secrets.ts +0 -985
- package/dist/node/generated/node/trunks.ts +0 -1546
- package/dist/node/generated/web/acls.ts +0 -1054
- package/dist/node/generated/web/agents.ts +0 -1388
- package/dist/node/generated/web/applications.ts +0 -1411
- package/dist/node/generated/web/calls.ts +0 -1123
- package/dist/node/generated/web/credentials.ts +0 -1054
- package/dist/node/generated/web/domains.ts +0 -1144
- package/dist/node/generated/web/google/protobuf/empty.ts +0 -48
- package/dist/node/generated/web/google/protobuf/struct.ts +0 -408
- package/dist/node/generated/web/identity.ts +0 -4267
- package/dist/node/generated/web/numbers.ts +0 -1371
- package/dist/node/generated/web/secrets.ts +0 -985
- package/dist/node/generated/web/trunks.ts +0 -1546
|
@@ -1,1123 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated by the protoc-gen-ts. DO NOT EDIT!
|
|
3
|
-
* compiler version: 3.20.3
|
|
4
|
-
* source: calls.proto
|
|
5
|
-
* git: https://github.com/thesayyn/protoc-gen-ts */
|
|
6
|
-
import * as pb_1 from "google-protobuf";
|
|
7
|
-
import * as grpc_1 from "@grpc/grpc-js";
|
|
8
|
-
export namespace fonoster.calls.v1beta2 {
|
|
9
|
-
export enum CallType {
|
|
10
|
-
PROGRAMMABLE = 0,
|
|
11
|
-
SIP_TRUNKING = 1
|
|
12
|
-
}
|
|
13
|
-
export enum HangupCause {
|
|
14
|
-
NORMAL_CLEARING = 0,
|
|
15
|
-
CALL_REJECTED = 1,
|
|
16
|
-
UNALLOCATED = 2,
|
|
17
|
-
NO_USER_RESPONSE = 3,
|
|
18
|
-
NO_ROUTE_DESTINATION = 4,
|
|
19
|
-
NO_ANSWER = 5,
|
|
20
|
-
USER_BUSY = 6,
|
|
21
|
-
NOT_ACCEPTABLE_HERE = 7,
|
|
22
|
-
SERVICE_UNAVAILABLE = 8,
|
|
23
|
-
INVALID_NUMBER_FORMAT = 9,
|
|
24
|
-
UNKNOWN = 10
|
|
25
|
-
}
|
|
26
|
-
export enum CallStatus {
|
|
27
|
-
QUEUED = 0,
|
|
28
|
-
RINGING = 1,
|
|
29
|
-
IN_PROGRESS = 2,
|
|
30
|
-
COMPLETED = 3,
|
|
31
|
-
FAILED = 4,
|
|
32
|
-
BUSY = 5,
|
|
33
|
-
CANCELED = 7,
|
|
34
|
-
REJECTED = 8,
|
|
35
|
-
TIMEOUT = 9
|
|
36
|
-
}
|
|
37
|
-
export enum CallDirection {
|
|
38
|
-
INBOUND = 0,
|
|
39
|
-
OUTBOUND = 1
|
|
40
|
-
}
|
|
41
|
-
export class CallDetailRecord extends pb_1.Message {
|
|
42
|
-
#one_of_decls: number[][] = [];
|
|
43
|
-
constructor(data?: any[] | {
|
|
44
|
-
ref?: string;
|
|
45
|
-
type?: CallType;
|
|
46
|
-
status?: CallStatus;
|
|
47
|
-
hangup_cause?: HangupCause;
|
|
48
|
-
started_at?: number;
|
|
49
|
-
ended_at?: number;
|
|
50
|
-
from?: string;
|
|
51
|
-
to?: string;
|
|
52
|
-
duration?: number;
|
|
53
|
-
direction?: CallDirection;
|
|
54
|
-
}) {
|
|
55
|
-
super();
|
|
56
|
-
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
57
|
-
if (!Array.isArray(data) && typeof data == "object") {
|
|
58
|
-
if ("ref" in data && data.ref != undefined) {
|
|
59
|
-
this.ref = data.ref;
|
|
60
|
-
}
|
|
61
|
-
if ("type" in data && data.type != undefined) {
|
|
62
|
-
this.type = data.type;
|
|
63
|
-
}
|
|
64
|
-
if ("status" in data && data.status != undefined) {
|
|
65
|
-
this.status = data.status;
|
|
66
|
-
}
|
|
67
|
-
if ("hangup_cause" in data && data.hangup_cause != undefined) {
|
|
68
|
-
this.hangup_cause = data.hangup_cause;
|
|
69
|
-
}
|
|
70
|
-
if ("started_at" in data && data.started_at != undefined) {
|
|
71
|
-
this.started_at = data.started_at;
|
|
72
|
-
}
|
|
73
|
-
if ("ended_at" in data && data.ended_at != undefined) {
|
|
74
|
-
this.ended_at = data.ended_at;
|
|
75
|
-
}
|
|
76
|
-
if ("from" in data && data.from != undefined) {
|
|
77
|
-
this.from = data.from;
|
|
78
|
-
}
|
|
79
|
-
if ("to" in data && data.to != undefined) {
|
|
80
|
-
this.to = data.to;
|
|
81
|
-
}
|
|
82
|
-
if ("duration" in data && data.duration != undefined) {
|
|
83
|
-
this.duration = data.duration;
|
|
84
|
-
}
|
|
85
|
-
if ("direction" in data && data.direction != undefined) {
|
|
86
|
-
this.direction = data.direction;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
get ref() {
|
|
91
|
-
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
|
|
92
|
-
}
|
|
93
|
-
set ref(value: string) {
|
|
94
|
-
pb_1.Message.setField(this, 1, value);
|
|
95
|
-
}
|
|
96
|
-
get type() {
|
|
97
|
-
return pb_1.Message.getFieldWithDefault(this, 2, CallType.PROGRAMMABLE) as CallType;
|
|
98
|
-
}
|
|
99
|
-
set type(value: CallType) {
|
|
100
|
-
pb_1.Message.setField(this, 2, value);
|
|
101
|
-
}
|
|
102
|
-
get status() {
|
|
103
|
-
return pb_1.Message.getFieldWithDefault(this, 3, CallStatus.QUEUED) as CallStatus;
|
|
104
|
-
}
|
|
105
|
-
set status(value: CallStatus) {
|
|
106
|
-
pb_1.Message.setField(this, 3, value);
|
|
107
|
-
}
|
|
108
|
-
get hangup_cause() {
|
|
109
|
-
return pb_1.Message.getFieldWithDefault(this, 4, HangupCause.NORMAL_CLEARING) as HangupCause;
|
|
110
|
-
}
|
|
111
|
-
set hangup_cause(value: HangupCause) {
|
|
112
|
-
pb_1.Message.setField(this, 4, value);
|
|
113
|
-
}
|
|
114
|
-
get started_at() {
|
|
115
|
-
return pb_1.Message.getFieldWithDefault(this, 5, 0) as number;
|
|
116
|
-
}
|
|
117
|
-
set started_at(value: number) {
|
|
118
|
-
pb_1.Message.setField(this, 5, value);
|
|
119
|
-
}
|
|
120
|
-
get ended_at() {
|
|
121
|
-
return pb_1.Message.getFieldWithDefault(this, 6, 0) as number;
|
|
122
|
-
}
|
|
123
|
-
set ended_at(value: number) {
|
|
124
|
-
pb_1.Message.setField(this, 6, value);
|
|
125
|
-
}
|
|
126
|
-
get from() {
|
|
127
|
-
return pb_1.Message.getFieldWithDefault(this, 7, "") as string;
|
|
128
|
-
}
|
|
129
|
-
set from(value: string) {
|
|
130
|
-
pb_1.Message.setField(this, 7, value);
|
|
131
|
-
}
|
|
132
|
-
get to() {
|
|
133
|
-
return pb_1.Message.getFieldWithDefault(this, 8, "") as string;
|
|
134
|
-
}
|
|
135
|
-
set to(value: string) {
|
|
136
|
-
pb_1.Message.setField(this, 8, value);
|
|
137
|
-
}
|
|
138
|
-
get duration() {
|
|
139
|
-
return pb_1.Message.getFieldWithDefault(this, 9, 0) as number;
|
|
140
|
-
}
|
|
141
|
-
set duration(value: number) {
|
|
142
|
-
pb_1.Message.setField(this, 9, value);
|
|
143
|
-
}
|
|
144
|
-
get direction() {
|
|
145
|
-
return pb_1.Message.getFieldWithDefault(this, 10, CallDirection.INBOUND) as CallDirection;
|
|
146
|
-
}
|
|
147
|
-
set direction(value: CallDirection) {
|
|
148
|
-
pb_1.Message.setField(this, 10, value);
|
|
149
|
-
}
|
|
150
|
-
static fromObject(data: {
|
|
151
|
-
ref?: string;
|
|
152
|
-
type?: CallType;
|
|
153
|
-
status?: CallStatus;
|
|
154
|
-
hangup_cause?: HangupCause;
|
|
155
|
-
started_at?: number;
|
|
156
|
-
ended_at?: number;
|
|
157
|
-
from?: string;
|
|
158
|
-
to?: string;
|
|
159
|
-
duration?: number;
|
|
160
|
-
direction?: CallDirection;
|
|
161
|
-
}): CallDetailRecord {
|
|
162
|
-
const message = new CallDetailRecord({});
|
|
163
|
-
if (data.ref != null) {
|
|
164
|
-
message.ref = data.ref;
|
|
165
|
-
}
|
|
166
|
-
if (data.type != null) {
|
|
167
|
-
message.type = data.type;
|
|
168
|
-
}
|
|
169
|
-
if (data.status != null) {
|
|
170
|
-
message.status = data.status;
|
|
171
|
-
}
|
|
172
|
-
if (data.hangup_cause != null) {
|
|
173
|
-
message.hangup_cause = data.hangup_cause;
|
|
174
|
-
}
|
|
175
|
-
if (data.started_at != null) {
|
|
176
|
-
message.started_at = data.started_at;
|
|
177
|
-
}
|
|
178
|
-
if (data.ended_at != null) {
|
|
179
|
-
message.ended_at = data.ended_at;
|
|
180
|
-
}
|
|
181
|
-
if (data.from != null) {
|
|
182
|
-
message.from = data.from;
|
|
183
|
-
}
|
|
184
|
-
if (data.to != null) {
|
|
185
|
-
message.to = data.to;
|
|
186
|
-
}
|
|
187
|
-
if (data.duration != null) {
|
|
188
|
-
message.duration = data.duration;
|
|
189
|
-
}
|
|
190
|
-
if (data.direction != null) {
|
|
191
|
-
message.direction = data.direction;
|
|
192
|
-
}
|
|
193
|
-
return message;
|
|
194
|
-
}
|
|
195
|
-
toObject() {
|
|
196
|
-
const data: {
|
|
197
|
-
ref?: string;
|
|
198
|
-
type?: CallType;
|
|
199
|
-
status?: CallStatus;
|
|
200
|
-
hangup_cause?: HangupCause;
|
|
201
|
-
started_at?: number;
|
|
202
|
-
ended_at?: number;
|
|
203
|
-
from?: string;
|
|
204
|
-
to?: string;
|
|
205
|
-
duration?: number;
|
|
206
|
-
direction?: CallDirection;
|
|
207
|
-
} = {};
|
|
208
|
-
if (this.ref != null) {
|
|
209
|
-
data.ref = this.ref;
|
|
210
|
-
}
|
|
211
|
-
if (this.type != null) {
|
|
212
|
-
data.type = this.type;
|
|
213
|
-
}
|
|
214
|
-
if (this.status != null) {
|
|
215
|
-
data.status = this.status;
|
|
216
|
-
}
|
|
217
|
-
if (this.hangup_cause != null) {
|
|
218
|
-
data.hangup_cause = this.hangup_cause;
|
|
219
|
-
}
|
|
220
|
-
if (this.started_at != null) {
|
|
221
|
-
data.started_at = this.started_at;
|
|
222
|
-
}
|
|
223
|
-
if (this.ended_at != null) {
|
|
224
|
-
data.ended_at = this.ended_at;
|
|
225
|
-
}
|
|
226
|
-
if (this.from != null) {
|
|
227
|
-
data.from = this.from;
|
|
228
|
-
}
|
|
229
|
-
if (this.to != null) {
|
|
230
|
-
data.to = this.to;
|
|
231
|
-
}
|
|
232
|
-
if (this.duration != null) {
|
|
233
|
-
data.duration = this.duration;
|
|
234
|
-
}
|
|
235
|
-
if (this.direction != null) {
|
|
236
|
-
data.direction = this.direction;
|
|
237
|
-
}
|
|
238
|
-
return data;
|
|
239
|
-
}
|
|
240
|
-
serialize(): Uint8Array;
|
|
241
|
-
serialize(w: pb_1.BinaryWriter): void;
|
|
242
|
-
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
|
|
243
|
-
const writer = w || new pb_1.BinaryWriter();
|
|
244
|
-
if (this.ref.length)
|
|
245
|
-
writer.writeString(1, this.ref);
|
|
246
|
-
if (this.type != CallType.PROGRAMMABLE)
|
|
247
|
-
writer.writeEnum(2, this.type);
|
|
248
|
-
if (this.status != CallStatus.QUEUED)
|
|
249
|
-
writer.writeEnum(3, this.status);
|
|
250
|
-
if (this.hangup_cause != HangupCause.NORMAL_CLEARING)
|
|
251
|
-
writer.writeEnum(4, this.hangup_cause);
|
|
252
|
-
if (this.started_at != 0)
|
|
253
|
-
writer.writeInt64(5, this.started_at);
|
|
254
|
-
if (this.ended_at != 0)
|
|
255
|
-
writer.writeInt64(6, this.ended_at);
|
|
256
|
-
if (this.from.length)
|
|
257
|
-
writer.writeString(7, this.from);
|
|
258
|
-
if (this.to.length)
|
|
259
|
-
writer.writeString(8, this.to);
|
|
260
|
-
if (this.duration != 0)
|
|
261
|
-
writer.writeInt32(9, this.duration);
|
|
262
|
-
if (this.direction != CallDirection.INBOUND)
|
|
263
|
-
writer.writeEnum(10, this.direction);
|
|
264
|
-
if (!w)
|
|
265
|
-
return writer.getResultBuffer();
|
|
266
|
-
}
|
|
267
|
-
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CallDetailRecord {
|
|
268
|
-
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CallDetailRecord();
|
|
269
|
-
while (reader.nextField()) {
|
|
270
|
-
if (reader.isEndGroup())
|
|
271
|
-
break;
|
|
272
|
-
switch (reader.getFieldNumber()) {
|
|
273
|
-
case 1:
|
|
274
|
-
message.ref = reader.readString();
|
|
275
|
-
break;
|
|
276
|
-
case 2:
|
|
277
|
-
message.type = reader.readEnum();
|
|
278
|
-
break;
|
|
279
|
-
case 3:
|
|
280
|
-
message.status = reader.readEnum();
|
|
281
|
-
break;
|
|
282
|
-
case 4:
|
|
283
|
-
message.hangup_cause = reader.readEnum();
|
|
284
|
-
break;
|
|
285
|
-
case 5:
|
|
286
|
-
message.started_at = reader.readInt64();
|
|
287
|
-
break;
|
|
288
|
-
case 6:
|
|
289
|
-
message.ended_at = reader.readInt64();
|
|
290
|
-
break;
|
|
291
|
-
case 7:
|
|
292
|
-
message.from = reader.readString();
|
|
293
|
-
break;
|
|
294
|
-
case 8:
|
|
295
|
-
message.to = reader.readString();
|
|
296
|
-
break;
|
|
297
|
-
case 9:
|
|
298
|
-
message.duration = reader.readInt32();
|
|
299
|
-
break;
|
|
300
|
-
case 10:
|
|
301
|
-
message.direction = reader.readEnum();
|
|
302
|
-
break;
|
|
303
|
-
default: reader.skipField();
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
return message;
|
|
307
|
-
}
|
|
308
|
-
serializeBinary(): Uint8Array {
|
|
309
|
-
return this.serialize();
|
|
310
|
-
}
|
|
311
|
-
static deserializeBinary(bytes: Uint8Array): CallDetailRecord {
|
|
312
|
-
return CallDetailRecord.deserialize(bytes);
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
export class CreateCallRequest extends pb_1.Message {
|
|
316
|
-
#one_of_decls: number[][] = [];
|
|
317
|
-
constructor(data?: any[] | {
|
|
318
|
-
from?: string;
|
|
319
|
-
to?: string;
|
|
320
|
-
app_ref?: string;
|
|
321
|
-
}) {
|
|
322
|
-
super();
|
|
323
|
-
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
324
|
-
if (!Array.isArray(data) && typeof data == "object") {
|
|
325
|
-
if ("from" in data && data.from != undefined) {
|
|
326
|
-
this.from = data.from;
|
|
327
|
-
}
|
|
328
|
-
if ("to" in data && data.to != undefined) {
|
|
329
|
-
this.to = data.to;
|
|
330
|
-
}
|
|
331
|
-
if ("app_ref" in data && data.app_ref != undefined) {
|
|
332
|
-
this.app_ref = data.app_ref;
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
get from() {
|
|
337
|
-
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
|
|
338
|
-
}
|
|
339
|
-
set from(value: string) {
|
|
340
|
-
pb_1.Message.setField(this, 1, value);
|
|
341
|
-
}
|
|
342
|
-
get to() {
|
|
343
|
-
return pb_1.Message.getFieldWithDefault(this, 2, "") as string;
|
|
344
|
-
}
|
|
345
|
-
set to(value: string) {
|
|
346
|
-
pb_1.Message.setField(this, 2, value);
|
|
347
|
-
}
|
|
348
|
-
get app_ref() {
|
|
349
|
-
return pb_1.Message.getFieldWithDefault(this, 3, "") as string;
|
|
350
|
-
}
|
|
351
|
-
set app_ref(value: string) {
|
|
352
|
-
pb_1.Message.setField(this, 3, value);
|
|
353
|
-
}
|
|
354
|
-
static fromObject(data: {
|
|
355
|
-
from?: string;
|
|
356
|
-
to?: string;
|
|
357
|
-
app_ref?: string;
|
|
358
|
-
}): CreateCallRequest {
|
|
359
|
-
const message = new CreateCallRequest({});
|
|
360
|
-
if (data.from != null) {
|
|
361
|
-
message.from = data.from;
|
|
362
|
-
}
|
|
363
|
-
if (data.to != null) {
|
|
364
|
-
message.to = data.to;
|
|
365
|
-
}
|
|
366
|
-
if (data.app_ref != null) {
|
|
367
|
-
message.app_ref = data.app_ref;
|
|
368
|
-
}
|
|
369
|
-
return message;
|
|
370
|
-
}
|
|
371
|
-
toObject() {
|
|
372
|
-
const data: {
|
|
373
|
-
from?: string;
|
|
374
|
-
to?: string;
|
|
375
|
-
app_ref?: string;
|
|
376
|
-
} = {};
|
|
377
|
-
if (this.from != null) {
|
|
378
|
-
data.from = this.from;
|
|
379
|
-
}
|
|
380
|
-
if (this.to != null) {
|
|
381
|
-
data.to = this.to;
|
|
382
|
-
}
|
|
383
|
-
if (this.app_ref != null) {
|
|
384
|
-
data.app_ref = this.app_ref;
|
|
385
|
-
}
|
|
386
|
-
return data;
|
|
387
|
-
}
|
|
388
|
-
serialize(): Uint8Array;
|
|
389
|
-
serialize(w: pb_1.BinaryWriter): void;
|
|
390
|
-
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
|
|
391
|
-
const writer = w || new pb_1.BinaryWriter();
|
|
392
|
-
if (this.from.length)
|
|
393
|
-
writer.writeString(1, this.from);
|
|
394
|
-
if (this.to.length)
|
|
395
|
-
writer.writeString(2, this.to);
|
|
396
|
-
if (this.app_ref.length)
|
|
397
|
-
writer.writeString(3, this.app_ref);
|
|
398
|
-
if (!w)
|
|
399
|
-
return writer.getResultBuffer();
|
|
400
|
-
}
|
|
401
|
-
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CreateCallRequest {
|
|
402
|
-
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CreateCallRequest();
|
|
403
|
-
while (reader.nextField()) {
|
|
404
|
-
if (reader.isEndGroup())
|
|
405
|
-
break;
|
|
406
|
-
switch (reader.getFieldNumber()) {
|
|
407
|
-
case 1:
|
|
408
|
-
message.from = reader.readString();
|
|
409
|
-
break;
|
|
410
|
-
case 2:
|
|
411
|
-
message.to = reader.readString();
|
|
412
|
-
break;
|
|
413
|
-
case 3:
|
|
414
|
-
message.app_ref = reader.readString();
|
|
415
|
-
break;
|
|
416
|
-
default: reader.skipField();
|
|
417
|
-
}
|
|
418
|
-
}
|
|
419
|
-
return message;
|
|
420
|
-
}
|
|
421
|
-
serializeBinary(): Uint8Array {
|
|
422
|
-
return this.serialize();
|
|
423
|
-
}
|
|
424
|
-
static deserializeBinary(bytes: Uint8Array): CreateCallRequest {
|
|
425
|
-
return CreateCallRequest.deserialize(bytes);
|
|
426
|
-
}
|
|
427
|
-
}
|
|
428
|
-
export class CreateCallResponse extends pb_1.Message {
|
|
429
|
-
#one_of_decls: number[][] = [];
|
|
430
|
-
constructor(data?: any[] | {
|
|
431
|
-
ref?: string;
|
|
432
|
-
}) {
|
|
433
|
-
super();
|
|
434
|
-
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
435
|
-
if (!Array.isArray(data) && typeof data == "object") {
|
|
436
|
-
if ("ref" in data && data.ref != undefined) {
|
|
437
|
-
this.ref = data.ref;
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
}
|
|
441
|
-
get ref() {
|
|
442
|
-
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
|
|
443
|
-
}
|
|
444
|
-
set ref(value: string) {
|
|
445
|
-
pb_1.Message.setField(this, 1, value);
|
|
446
|
-
}
|
|
447
|
-
static fromObject(data: {
|
|
448
|
-
ref?: string;
|
|
449
|
-
}): CreateCallResponse {
|
|
450
|
-
const message = new CreateCallResponse({});
|
|
451
|
-
if (data.ref != null) {
|
|
452
|
-
message.ref = data.ref;
|
|
453
|
-
}
|
|
454
|
-
return message;
|
|
455
|
-
}
|
|
456
|
-
toObject() {
|
|
457
|
-
const data: {
|
|
458
|
-
ref?: string;
|
|
459
|
-
} = {};
|
|
460
|
-
if (this.ref != null) {
|
|
461
|
-
data.ref = this.ref;
|
|
462
|
-
}
|
|
463
|
-
return data;
|
|
464
|
-
}
|
|
465
|
-
serialize(): Uint8Array;
|
|
466
|
-
serialize(w: pb_1.BinaryWriter): void;
|
|
467
|
-
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
|
|
468
|
-
const writer = w || new pb_1.BinaryWriter();
|
|
469
|
-
if (this.ref.length)
|
|
470
|
-
writer.writeString(1, this.ref);
|
|
471
|
-
if (!w)
|
|
472
|
-
return writer.getResultBuffer();
|
|
473
|
-
}
|
|
474
|
-
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CreateCallResponse {
|
|
475
|
-
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CreateCallResponse();
|
|
476
|
-
while (reader.nextField()) {
|
|
477
|
-
if (reader.isEndGroup())
|
|
478
|
-
break;
|
|
479
|
-
switch (reader.getFieldNumber()) {
|
|
480
|
-
case 1:
|
|
481
|
-
message.ref = reader.readString();
|
|
482
|
-
break;
|
|
483
|
-
default: reader.skipField();
|
|
484
|
-
}
|
|
485
|
-
}
|
|
486
|
-
return message;
|
|
487
|
-
}
|
|
488
|
-
serializeBinary(): Uint8Array {
|
|
489
|
-
return this.serialize();
|
|
490
|
-
}
|
|
491
|
-
static deserializeBinary(bytes: Uint8Array): CreateCallResponse {
|
|
492
|
-
return CreateCallResponse.deserialize(bytes);
|
|
493
|
-
}
|
|
494
|
-
}
|
|
495
|
-
export class ListCallsRequest extends pb_1.Message {
|
|
496
|
-
#one_of_decls: number[][] = [];
|
|
497
|
-
constructor(data?: any[] | {
|
|
498
|
-
after?: string;
|
|
499
|
-
before?: string;
|
|
500
|
-
type?: CallType;
|
|
501
|
-
status?: CallStatus;
|
|
502
|
-
from?: string;
|
|
503
|
-
to?: string;
|
|
504
|
-
page_size?: number;
|
|
505
|
-
page_token?: string;
|
|
506
|
-
}) {
|
|
507
|
-
super();
|
|
508
|
-
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
509
|
-
if (!Array.isArray(data) && typeof data == "object") {
|
|
510
|
-
if ("after" in data && data.after != undefined) {
|
|
511
|
-
this.after = data.after;
|
|
512
|
-
}
|
|
513
|
-
if ("before" in data && data.before != undefined) {
|
|
514
|
-
this.before = data.before;
|
|
515
|
-
}
|
|
516
|
-
if ("type" in data && data.type != undefined) {
|
|
517
|
-
this.type = data.type;
|
|
518
|
-
}
|
|
519
|
-
if ("status" in data && data.status != undefined) {
|
|
520
|
-
this.status = data.status;
|
|
521
|
-
}
|
|
522
|
-
if ("from" in data && data.from != undefined) {
|
|
523
|
-
this.from = data.from;
|
|
524
|
-
}
|
|
525
|
-
if ("to" in data && data.to != undefined) {
|
|
526
|
-
this.to = data.to;
|
|
527
|
-
}
|
|
528
|
-
if ("page_size" in data && data.page_size != undefined) {
|
|
529
|
-
this.page_size = data.page_size;
|
|
530
|
-
}
|
|
531
|
-
if ("page_token" in data && data.page_token != undefined) {
|
|
532
|
-
this.page_token = data.page_token;
|
|
533
|
-
}
|
|
534
|
-
}
|
|
535
|
-
}
|
|
536
|
-
get after() {
|
|
537
|
-
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
|
|
538
|
-
}
|
|
539
|
-
set after(value: string) {
|
|
540
|
-
pb_1.Message.setField(this, 1, value);
|
|
541
|
-
}
|
|
542
|
-
get before() {
|
|
543
|
-
return pb_1.Message.getFieldWithDefault(this, 2, "") as string;
|
|
544
|
-
}
|
|
545
|
-
set before(value: string) {
|
|
546
|
-
pb_1.Message.setField(this, 2, value);
|
|
547
|
-
}
|
|
548
|
-
get type() {
|
|
549
|
-
return pb_1.Message.getFieldWithDefault(this, 3, CallType.PROGRAMMABLE) as CallType;
|
|
550
|
-
}
|
|
551
|
-
set type(value: CallType) {
|
|
552
|
-
pb_1.Message.setField(this, 3, value);
|
|
553
|
-
}
|
|
554
|
-
get status() {
|
|
555
|
-
return pb_1.Message.getFieldWithDefault(this, 4, CallStatus.QUEUED) as CallStatus;
|
|
556
|
-
}
|
|
557
|
-
set status(value: CallStatus) {
|
|
558
|
-
pb_1.Message.setField(this, 4, value);
|
|
559
|
-
}
|
|
560
|
-
get from() {
|
|
561
|
-
return pb_1.Message.getFieldWithDefault(this, 5, "") as string;
|
|
562
|
-
}
|
|
563
|
-
set from(value: string) {
|
|
564
|
-
pb_1.Message.setField(this, 5, value);
|
|
565
|
-
}
|
|
566
|
-
get to() {
|
|
567
|
-
return pb_1.Message.getFieldWithDefault(this, 6, "") as string;
|
|
568
|
-
}
|
|
569
|
-
set to(value: string) {
|
|
570
|
-
pb_1.Message.setField(this, 6, value);
|
|
571
|
-
}
|
|
572
|
-
get page_size() {
|
|
573
|
-
return pb_1.Message.getFieldWithDefault(this, 7, 0) as number;
|
|
574
|
-
}
|
|
575
|
-
set page_size(value: number) {
|
|
576
|
-
pb_1.Message.setField(this, 7, value);
|
|
577
|
-
}
|
|
578
|
-
get page_token() {
|
|
579
|
-
return pb_1.Message.getFieldWithDefault(this, 8, "") as string;
|
|
580
|
-
}
|
|
581
|
-
set page_token(value: string) {
|
|
582
|
-
pb_1.Message.setField(this, 8, value);
|
|
583
|
-
}
|
|
584
|
-
static fromObject(data: {
|
|
585
|
-
after?: string;
|
|
586
|
-
before?: string;
|
|
587
|
-
type?: CallType;
|
|
588
|
-
status?: CallStatus;
|
|
589
|
-
from?: string;
|
|
590
|
-
to?: string;
|
|
591
|
-
page_size?: number;
|
|
592
|
-
page_token?: string;
|
|
593
|
-
}): ListCallsRequest {
|
|
594
|
-
const message = new ListCallsRequest({});
|
|
595
|
-
if (data.after != null) {
|
|
596
|
-
message.after = data.after;
|
|
597
|
-
}
|
|
598
|
-
if (data.before != null) {
|
|
599
|
-
message.before = data.before;
|
|
600
|
-
}
|
|
601
|
-
if (data.type != null) {
|
|
602
|
-
message.type = data.type;
|
|
603
|
-
}
|
|
604
|
-
if (data.status != null) {
|
|
605
|
-
message.status = data.status;
|
|
606
|
-
}
|
|
607
|
-
if (data.from != null) {
|
|
608
|
-
message.from = data.from;
|
|
609
|
-
}
|
|
610
|
-
if (data.to != null) {
|
|
611
|
-
message.to = data.to;
|
|
612
|
-
}
|
|
613
|
-
if (data.page_size != null) {
|
|
614
|
-
message.page_size = data.page_size;
|
|
615
|
-
}
|
|
616
|
-
if (data.page_token != null) {
|
|
617
|
-
message.page_token = data.page_token;
|
|
618
|
-
}
|
|
619
|
-
return message;
|
|
620
|
-
}
|
|
621
|
-
toObject() {
|
|
622
|
-
const data: {
|
|
623
|
-
after?: string;
|
|
624
|
-
before?: string;
|
|
625
|
-
type?: CallType;
|
|
626
|
-
status?: CallStatus;
|
|
627
|
-
from?: string;
|
|
628
|
-
to?: string;
|
|
629
|
-
page_size?: number;
|
|
630
|
-
page_token?: string;
|
|
631
|
-
} = {};
|
|
632
|
-
if (this.after != null) {
|
|
633
|
-
data.after = this.after;
|
|
634
|
-
}
|
|
635
|
-
if (this.before != null) {
|
|
636
|
-
data.before = this.before;
|
|
637
|
-
}
|
|
638
|
-
if (this.type != null) {
|
|
639
|
-
data.type = this.type;
|
|
640
|
-
}
|
|
641
|
-
if (this.status != null) {
|
|
642
|
-
data.status = this.status;
|
|
643
|
-
}
|
|
644
|
-
if (this.from != null) {
|
|
645
|
-
data.from = this.from;
|
|
646
|
-
}
|
|
647
|
-
if (this.to != null) {
|
|
648
|
-
data.to = this.to;
|
|
649
|
-
}
|
|
650
|
-
if (this.page_size != null) {
|
|
651
|
-
data.page_size = this.page_size;
|
|
652
|
-
}
|
|
653
|
-
if (this.page_token != null) {
|
|
654
|
-
data.page_token = this.page_token;
|
|
655
|
-
}
|
|
656
|
-
return data;
|
|
657
|
-
}
|
|
658
|
-
serialize(): Uint8Array;
|
|
659
|
-
serialize(w: pb_1.BinaryWriter): void;
|
|
660
|
-
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
|
|
661
|
-
const writer = w || new pb_1.BinaryWriter();
|
|
662
|
-
if (this.after.length)
|
|
663
|
-
writer.writeString(1, this.after);
|
|
664
|
-
if (this.before.length)
|
|
665
|
-
writer.writeString(2, this.before);
|
|
666
|
-
if (this.type != CallType.PROGRAMMABLE)
|
|
667
|
-
writer.writeEnum(3, this.type);
|
|
668
|
-
if (this.status != CallStatus.QUEUED)
|
|
669
|
-
writer.writeEnum(4, this.status);
|
|
670
|
-
if (this.from.length)
|
|
671
|
-
writer.writeString(5, this.from);
|
|
672
|
-
if (this.to.length)
|
|
673
|
-
writer.writeString(6, this.to);
|
|
674
|
-
if (this.page_size != 0)
|
|
675
|
-
writer.writeInt32(7, this.page_size);
|
|
676
|
-
if (this.page_token.length)
|
|
677
|
-
writer.writeString(8, this.page_token);
|
|
678
|
-
if (!w)
|
|
679
|
-
return writer.getResultBuffer();
|
|
680
|
-
}
|
|
681
|
-
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ListCallsRequest {
|
|
682
|
-
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ListCallsRequest();
|
|
683
|
-
while (reader.nextField()) {
|
|
684
|
-
if (reader.isEndGroup())
|
|
685
|
-
break;
|
|
686
|
-
switch (reader.getFieldNumber()) {
|
|
687
|
-
case 1:
|
|
688
|
-
message.after = reader.readString();
|
|
689
|
-
break;
|
|
690
|
-
case 2:
|
|
691
|
-
message.before = reader.readString();
|
|
692
|
-
break;
|
|
693
|
-
case 3:
|
|
694
|
-
message.type = reader.readEnum();
|
|
695
|
-
break;
|
|
696
|
-
case 4:
|
|
697
|
-
message.status = reader.readEnum();
|
|
698
|
-
break;
|
|
699
|
-
case 5:
|
|
700
|
-
message.from = reader.readString();
|
|
701
|
-
break;
|
|
702
|
-
case 6:
|
|
703
|
-
message.to = reader.readString();
|
|
704
|
-
break;
|
|
705
|
-
case 7:
|
|
706
|
-
message.page_size = reader.readInt32();
|
|
707
|
-
break;
|
|
708
|
-
case 8:
|
|
709
|
-
message.page_token = reader.readString();
|
|
710
|
-
break;
|
|
711
|
-
default: reader.skipField();
|
|
712
|
-
}
|
|
713
|
-
}
|
|
714
|
-
return message;
|
|
715
|
-
}
|
|
716
|
-
serializeBinary(): Uint8Array {
|
|
717
|
-
return this.serialize();
|
|
718
|
-
}
|
|
719
|
-
static deserializeBinary(bytes: Uint8Array): ListCallsRequest {
|
|
720
|
-
return ListCallsRequest.deserialize(bytes);
|
|
721
|
-
}
|
|
722
|
-
}
|
|
723
|
-
export class ListCallsResponse extends pb_1.Message {
|
|
724
|
-
#one_of_decls: number[][] = [];
|
|
725
|
-
constructor(data?: any[] | {
|
|
726
|
-
items?: CallDetailRecord[];
|
|
727
|
-
next_page_token?: string;
|
|
728
|
-
}) {
|
|
729
|
-
super();
|
|
730
|
-
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1], this.#one_of_decls);
|
|
731
|
-
if (!Array.isArray(data) && typeof data == "object") {
|
|
732
|
-
if ("items" in data && data.items != undefined) {
|
|
733
|
-
this.items = data.items;
|
|
734
|
-
}
|
|
735
|
-
if ("next_page_token" in data && data.next_page_token != undefined) {
|
|
736
|
-
this.next_page_token = data.next_page_token;
|
|
737
|
-
}
|
|
738
|
-
}
|
|
739
|
-
}
|
|
740
|
-
get items() {
|
|
741
|
-
return pb_1.Message.getRepeatedWrapperField(this, CallDetailRecord, 1) as CallDetailRecord[];
|
|
742
|
-
}
|
|
743
|
-
set items(value: CallDetailRecord[]) {
|
|
744
|
-
pb_1.Message.setRepeatedWrapperField(this, 1, value);
|
|
745
|
-
}
|
|
746
|
-
get next_page_token() {
|
|
747
|
-
return pb_1.Message.getFieldWithDefault(this, 2, "") as string;
|
|
748
|
-
}
|
|
749
|
-
set next_page_token(value: string) {
|
|
750
|
-
pb_1.Message.setField(this, 2, value);
|
|
751
|
-
}
|
|
752
|
-
static fromObject(data: {
|
|
753
|
-
items?: ReturnType<typeof CallDetailRecord.prototype.toObject>[];
|
|
754
|
-
next_page_token?: string;
|
|
755
|
-
}): ListCallsResponse {
|
|
756
|
-
const message = new ListCallsResponse({});
|
|
757
|
-
if (data.items != null) {
|
|
758
|
-
message.items = data.items.map(item => CallDetailRecord.fromObject(item));
|
|
759
|
-
}
|
|
760
|
-
if (data.next_page_token != null) {
|
|
761
|
-
message.next_page_token = data.next_page_token;
|
|
762
|
-
}
|
|
763
|
-
return message;
|
|
764
|
-
}
|
|
765
|
-
toObject() {
|
|
766
|
-
const data: {
|
|
767
|
-
items?: ReturnType<typeof CallDetailRecord.prototype.toObject>[];
|
|
768
|
-
next_page_token?: string;
|
|
769
|
-
} = {};
|
|
770
|
-
if (this.items != null) {
|
|
771
|
-
data.items = this.items.map((item: CallDetailRecord) => item.toObject());
|
|
772
|
-
}
|
|
773
|
-
if (this.next_page_token != null) {
|
|
774
|
-
data.next_page_token = this.next_page_token;
|
|
775
|
-
}
|
|
776
|
-
return data;
|
|
777
|
-
}
|
|
778
|
-
serialize(): Uint8Array;
|
|
779
|
-
serialize(w: pb_1.BinaryWriter): void;
|
|
780
|
-
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
|
|
781
|
-
const writer = w || new pb_1.BinaryWriter();
|
|
782
|
-
if (this.items.length)
|
|
783
|
-
writer.writeRepeatedMessage(1, this.items, (item: CallDetailRecord) => item.serialize(writer));
|
|
784
|
-
if (this.next_page_token.length)
|
|
785
|
-
writer.writeString(2, this.next_page_token);
|
|
786
|
-
if (!w)
|
|
787
|
-
return writer.getResultBuffer();
|
|
788
|
-
}
|
|
789
|
-
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ListCallsResponse {
|
|
790
|
-
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ListCallsResponse();
|
|
791
|
-
while (reader.nextField()) {
|
|
792
|
-
if (reader.isEndGroup())
|
|
793
|
-
break;
|
|
794
|
-
switch (reader.getFieldNumber()) {
|
|
795
|
-
case 1:
|
|
796
|
-
reader.readMessage(message.items, () => pb_1.Message.addToRepeatedWrapperField(message, 1, CallDetailRecord.deserialize(reader), CallDetailRecord));
|
|
797
|
-
break;
|
|
798
|
-
case 2:
|
|
799
|
-
message.next_page_token = reader.readString();
|
|
800
|
-
break;
|
|
801
|
-
default: reader.skipField();
|
|
802
|
-
}
|
|
803
|
-
}
|
|
804
|
-
return message;
|
|
805
|
-
}
|
|
806
|
-
serializeBinary(): Uint8Array {
|
|
807
|
-
return this.serialize();
|
|
808
|
-
}
|
|
809
|
-
static deserializeBinary(bytes: Uint8Array): ListCallsResponse {
|
|
810
|
-
return ListCallsResponse.deserialize(bytes);
|
|
811
|
-
}
|
|
812
|
-
}
|
|
813
|
-
export class GetCallRequest extends pb_1.Message {
|
|
814
|
-
#one_of_decls: number[][] = [];
|
|
815
|
-
constructor(data?: any[] | {
|
|
816
|
-
ref?: string;
|
|
817
|
-
}) {
|
|
818
|
-
super();
|
|
819
|
-
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
820
|
-
if (!Array.isArray(data) && typeof data == "object") {
|
|
821
|
-
if ("ref" in data && data.ref != undefined) {
|
|
822
|
-
this.ref = data.ref;
|
|
823
|
-
}
|
|
824
|
-
}
|
|
825
|
-
}
|
|
826
|
-
get ref() {
|
|
827
|
-
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
|
|
828
|
-
}
|
|
829
|
-
set ref(value: string) {
|
|
830
|
-
pb_1.Message.setField(this, 1, value);
|
|
831
|
-
}
|
|
832
|
-
static fromObject(data: {
|
|
833
|
-
ref?: string;
|
|
834
|
-
}): GetCallRequest {
|
|
835
|
-
const message = new GetCallRequest({});
|
|
836
|
-
if (data.ref != null) {
|
|
837
|
-
message.ref = data.ref;
|
|
838
|
-
}
|
|
839
|
-
return message;
|
|
840
|
-
}
|
|
841
|
-
toObject() {
|
|
842
|
-
const data: {
|
|
843
|
-
ref?: string;
|
|
844
|
-
} = {};
|
|
845
|
-
if (this.ref != null) {
|
|
846
|
-
data.ref = this.ref;
|
|
847
|
-
}
|
|
848
|
-
return data;
|
|
849
|
-
}
|
|
850
|
-
serialize(): Uint8Array;
|
|
851
|
-
serialize(w: pb_1.BinaryWriter): void;
|
|
852
|
-
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
|
|
853
|
-
const writer = w || new pb_1.BinaryWriter();
|
|
854
|
-
if (this.ref.length)
|
|
855
|
-
writer.writeString(1, this.ref);
|
|
856
|
-
if (!w)
|
|
857
|
-
return writer.getResultBuffer();
|
|
858
|
-
}
|
|
859
|
-
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetCallRequest {
|
|
860
|
-
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetCallRequest();
|
|
861
|
-
while (reader.nextField()) {
|
|
862
|
-
if (reader.isEndGroup())
|
|
863
|
-
break;
|
|
864
|
-
switch (reader.getFieldNumber()) {
|
|
865
|
-
case 1:
|
|
866
|
-
message.ref = reader.readString();
|
|
867
|
-
break;
|
|
868
|
-
default: reader.skipField();
|
|
869
|
-
}
|
|
870
|
-
}
|
|
871
|
-
return message;
|
|
872
|
-
}
|
|
873
|
-
serializeBinary(): Uint8Array {
|
|
874
|
-
return this.serialize();
|
|
875
|
-
}
|
|
876
|
-
static deserializeBinary(bytes: Uint8Array): GetCallRequest {
|
|
877
|
-
return GetCallRequest.deserialize(bytes);
|
|
878
|
-
}
|
|
879
|
-
}
|
|
880
|
-
export class TrackCallRequest extends pb_1.Message {
|
|
881
|
-
#one_of_decls: number[][] = [];
|
|
882
|
-
constructor(data?: any[] | {
|
|
883
|
-
ref?: string;
|
|
884
|
-
}) {
|
|
885
|
-
super();
|
|
886
|
-
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
887
|
-
if (!Array.isArray(data) && typeof data == "object") {
|
|
888
|
-
if ("ref" in data && data.ref != undefined) {
|
|
889
|
-
this.ref = data.ref;
|
|
890
|
-
}
|
|
891
|
-
}
|
|
892
|
-
}
|
|
893
|
-
get ref() {
|
|
894
|
-
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
|
|
895
|
-
}
|
|
896
|
-
set ref(value: string) {
|
|
897
|
-
pb_1.Message.setField(this, 1, value);
|
|
898
|
-
}
|
|
899
|
-
static fromObject(data: {
|
|
900
|
-
ref?: string;
|
|
901
|
-
}): TrackCallRequest {
|
|
902
|
-
const message = new TrackCallRequest({});
|
|
903
|
-
if (data.ref != null) {
|
|
904
|
-
message.ref = data.ref;
|
|
905
|
-
}
|
|
906
|
-
return message;
|
|
907
|
-
}
|
|
908
|
-
toObject() {
|
|
909
|
-
const data: {
|
|
910
|
-
ref?: string;
|
|
911
|
-
} = {};
|
|
912
|
-
if (this.ref != null) {
|
|
913
|
-
data.ref = this.ref;
|
|
914
|
-
}
|
|
915
|
-
return data;
|
|
916
|
-
}
|
|
917
|
-
serialize(): Uint8Array;
|
|
918
|
-
serialize(w: pb_1.BinaryWriter): void;
|
|
919
|
-
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
|
|
920
|
-
const writer = w || new pb_1.BinaryWriter();
|
|
921
|
-
if (this.ref.length)
|
|
922
|
-
writer.writeString(1, this.ref);
|
|
923
|
-
if (!w)
|
|
924
|
-
return writer.getResultBuffer();
|
|
925
|
-
}
|
|
926
|
-
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): TrackCallRequest {
|
|
927
|
-
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TrackCallRequest();
|
|
928
|
-
while (reader.nextField()) {
|
|
929
|
-
if (reader.isEndGroup())
|
|
930
|
-
break;
|
|
931
|
-
switch (reader.getFieldNumber()) {
|
|
932
|
-
case 1:
|
|
933
|
-
message.ref = reader.readString();
|
|
934
|
-
break;
|
|
935
|
-
default: reader.skipField();
|
|
936
|
-
}
|
|
937
|
-
}
|
|
938
|
-
return message;
|
|
939
|
-
}
|
|
940
|
-
serializeBinary(): Uint8Array {
|
|
941
|
-
return this.serialize();
|
|
942
|
-
}
|
|
943
|
-
static deserializeBinary(bytes: Uint8Array): TrackCallRequest {
|
|
944
|
-
return TrackCallRequest.deserialize(bytes);
|
|
945
|
-
}
|
|
946
|
-
}
|
|
947
|
-
export class TrackCallResponse extends pb_1.Message {
|
|
948
|
-
#one_of_decls: number[][] = [];
|
|
949
|
-
constructor(data?: any[] | {
|
|
950
|
-
ref?: string;
|
|
951
|
-
status?: CallStatus;
|
|
952
|
-
}) {
|
|
953
|
-
super();
|
|
954
|
-
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
955
|
-
if (!Array.isArray(data) && typeof data == "object") {
|
|
956
|
-
if ("ref" in data && data.ref != undefined) {
|
|
957
|
-
this.ref = data.ref;
|
|
958
|
-
}
|
|
959
|
-
if ("status" in data && data.status != undefined) {
|
|
960
|
-
this.status = data.status;
|
|
961
|
-
}
|
|
962
|
-
}
|
|
963
|
-
}
|
|
964
|
-
get ref() {
|
|
965
|
-
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
|
|
966
|
-
}
|
|
967
|
-
set ref(value: string) {
|
|
968
|
-
pb_1.Message.setField(this, 1, value);
|
|
969
|
-
}
|
|
970
|
-
get status() {
|
|
971
|
-
return pb_1.Message.getFieldWithDefault(this, 2, CallStatus.QUEUED) as CallStatus;
|
|
972
|
-
}
|
|
973
|
-
set status(value: CallStatus) {
|
|
974
|
-
pb_1.Message.setField(this, 2, value);
|
|
975
|
-
}
|
|
976
|
-
static fromObject(data: {
|
|
977
|
-
ref?: string;
|
|
978
|
-
status?: CallStatus;
|
|
979
|
-
}): TrackCallResponse {
|
|
980
|
-
const message = new TrackCallResponse({});
|
|
981
|
-
if (data.ref != null) {
|
|
982
|
-
message.ref = data.ref;
|
|
983
|
-
}
|
|
984
|
-
if (data.status != null) {
|
|
985
|
-
message.status = data.status;
|
|
986
|
-
}
|
|
987
|
-
return message;
|
|
988
|
-
}
|
|
989
|
-
toObject() {
|
|
990
|
-
const data: {
|
|
991
|
-
ref?: string;
|
|
992
|
-
status?: CallStatus;
|
|
993
|
-
} = {};
|
|
994
|
-
if (this.ref != null) {
|
|
995
|
-
data.ref = this.ref;
|
|
996
|
-
}
|
|
997
|
-
if (this.status != null) {
|
|
998
|
-
data.status = this.status;
|
|
999
|
-
}
|
|
1000
|
-
return data;
|
|
1001
|
-
}
|
|
1002
|
-
serialize(): Uint8Array;
|
|
1003
|
-
serialize(w: pb_1.BinaryWriter): void;
|
|
1004
|
-
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
|
|
1005
|
-
const writer = w || new pb_1.BinaryWriter();
|
|
1006
|
-
if (this.ref.length)
|
|
1007
|
-
writer.writeString(1, this.ref);
|
|
1008
|
-
if (this.status != CallStatus.QUEUED)
|
|
1009
|
-
writer.writeEnum(2, this.status);
|
|
1010
|
-
if (!w)
|
|
1011
|
-
return writer.getResultBuffer();
|
|
1012
|
-
}
|
|
1013
|
-
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): TrackCallResponse {
|
|
1014
|
-
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TrackCallResponse();
|
|
1015
|
-
while (reader.nextField()) {
|
|
1016
|
-
if (reader.isEndGroup())
|
|
1017
|
-
break;
|
|
1018
|
-
switch (reader.getFieldNumber()) {
|
|
1019
|
-
case 1:
|
|
1020
|
-
message.ref = reader.readString();
|
|
1021
|
-
break;
|
|
1022
|
-
case 2:
|
|
1023
|
-
message.status = reader.readEnum();
|
|
1024
|
-
break;
|
|
1025
|
-
default: reader.skipField();
|
|
1026
|
-
}
|
|
1027
|
-
}
|
|
1028
|
-
return message;
|
|
1029
|
-
}
|
|
1030
|
-
serializeBinary(): Uint8Array {
|
|
1031
|
-
return this.serialize();
|
|
1032
|
-
}
|
|
1033
|
-
static deserializeBinary(bytes: Uint8Array): TrackCallResponse {
|
|
1034
|
-
return TrackCallResponse.deserialize(bytes);
|
|
1035
|
-
}
|
|
1036
|
-
}
|
|
1037
|
-
interface GrpcUnaryServiceInterface<P, R> {
|
|
1038
|
-
(message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback<R>): grpc_1.ClientUnaryCall;
|
|
1039
|
-
(message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback<R>): grpc_1.ClientUnaryCall;
|
|
1040
|
-
(message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback<R>): grpc_1.ClientUnaryCall;
|
|
1041
|
-
(message: P, callback: grpc_1.requestCallback<R>): grpc_1.ClientUnaryCall;
|
|
1042
|
-
}
|
|
1043
|
-
interface GrpcStreamServiceInterface<P, R> {
|
|
1044
|
-
(message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream<R>;
|
|
1045
|
-
(message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream<R>;
|
|
1046
|
-
}
|
|
1047
|
-
interface GrpWritableServiceInterface<P, R> {
|
|
1048
|
-
(metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback<R>): grpc_1.ClientWritableStream<P>;
|
|
1049
|
-
(metadata: grpc_1.Metadata, callback: grpc_1.requestCallback<R>): grpc_1.ClientWritableStream<P>;
|
|
1050
|
-
(options: grpc_1.CallOptions, callback: grpc_1.requestCallback<R>): grpc_1.ClientWritableStream<P>;
|
|
1051
|
-
(callback: grpc_1.requestCallback<R>): grpc_1.ClientWritableStream<P>;
|
|
1052
|
-
}
|
|
1053
|
-
interface GrpcChunkServiceInterface<P, R> {
|
|
1054
|
-
(metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream<P, R>;
|
|
1055
|
-
(options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream<P, R>;
|
|
1056
|
-
}
|
|
1057
|
-
interface GrpcPromiseServiceInterface<P, R> {
|
|
1058
|
-
(message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise<R>;
|
|
1059
|
-
(message: P, options?: grpc_1.CallOptions): Promise<R>;
|
|
1060
|
-
}
|
|
1061
|
-
export abstract class UnimplementedCallsService {
|
|
1062
|
-
static definition = {
|
|
1063
|
-
CreateCall: {
|
|
1064
|
-
path: "/fonoster.calls.v1beta2.Calls/CreateCall",
|
|
1065
|
-
requestStream: false,
|
|
1066
|
-
responseStream: false,
|
|
1067
|
-
requestSerialize: (message: CreateCallRequest) => Buffer.from(message.serialize()),
|
|
1068
|
-
requestDeserialize: (bytes: Buffer) => CreateCallRequest.deserialize(new Uint8Array(bytes)),
|
|
1069
|
-
responseSerialize: (message: CreateCallResponse) => Buffer.from(message.serialize()),
|
|
1070
|
-
responseDeserialize: (bytes: Buffer) => CreateCallResponse.deserialize(new Uint8Array(bytes))
|
|
1071
|
-
},
|
|
1072
|
-
ListCalls: {
|
|
1073
|
-
path: "/fonoster.calls.v1beta2.Calls/ListCalls",
|
|
1074
|
-
requestStream: false,
|
|
1075
|
-
responseStream: false,
|
|
1076
|
-
requestSerialize: (message: ListCallsRequest) => Buffer.from(message.serialize()),
|
|
1077
|
-
requestDeserialize: (bytes: Buffer) => ListCallsRequest.deserialize(new Uint8Array(bytes)),
|
|
1078
|
-
responseSerialize: (message: ListCallsResponse) => Buffer.from(message.serialize()),
|
|
1079
|
-
responseDeserialize: (bytes: Buffer) => ListCallsResponse.deserialize(new Uint8Array(bytes))
|
|
1080
|
-
},
|
|
1081
|
-
GetCall: {
|
|
1082
|
-
path: "/fonoster.calls.v1beta2.Calls/GetCall",
|
|
1083
|
-
requestStream: false,
|
|
1084
|
-
responseStream: false,
|
|
1085
|
-
requestSerialize: (message: GetCallRequest) => Buffer.from(message.serialize()),
|
|
1086
|
-
requestDeserialize: (bytes: Buffer) => GetCallRequest.deserialize(new Uint8Array(bytes)),
|
|
1087
|
-
responseSerialize: (message: CallDetailRecord) => Buffer.from(message.serialize()),
|
|
1088
|
-
responseDeserialize: (bytes: Buffer) => CallDetailRecord.deserialize(new Uint8Array(bytes))
|
|
1089
|
-
},
|
|
1090
|
-
TrackCall: {
|
|
1091
|
-
path: "/fonoster.calls.v1beta2.Calls/TrackCall",
|
|
1092
|
-
requestStream: false,
|
|
1093
|
-
responseStream: true,
|
|
1094
|
-
requestSerialize: (message: TrackCallRequest) => Buffer.from(message.serialize()),
|
|
1095
|
-
requestDeserialize: (bytes: Buffer) => TrackCallRequest.deserialize(new Uint8Array(bytes)),
|
|
1096
|
-
responseSerialize: (message: TrackCallResponse) => Buffer.from(message.serialize()),
|
|
1097
|
-
responseDeserialize: (bytes: Buffer) => TrackCallResponse.deserialize(new Uint8Array(bytes))
|
|
1098
|
-
}
|
|
1099
|
-
};
|
|
1100
|
-
[method: string]: grpc_1.UntypedHandleCall;
|
|
1101
|
-
abstract CreateCall(call: grpc_1.ServerUnaryCall<CreateCallRequest, CreateCallResponse>, callback: grpc_1.sendUnaryData<CreateCallResponse>): void;
|
|
1102
|
-
abstract ListCalls(call: grpc_1.ServerUnaryCall<ListCallsRequest, ListCallsResponse>, callback: grpc_1.sendUnaryData<ListCallsResponse>): void;
|
|
1103
|
-
abstract GetCall(call: grpc_1.ServerUnaryCall<GetCallRequest, CallDetailRecord>, callback: grpc_1.sendUnaryData<CallDetailRecord>): void;
|
|
1104
|
-
abstract TrackCall(call: grpc_1.ServerWritableStream<TrackCallRequest, TrackCallResponse>): void;
|
|
1105
|
-
}
|
|
1106
|
-
export class CallsClient extends grpc_1.makeGenericClientConstructor(UnimplementedCallsService.definition, "Calls", {}) {
|
|
1107
|
-
constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial<grpc_1.ChannelOptions>) {
|
|
1108
|
-
super(address, credentials, options);
|
|
1109
|
-
}
|
|
1110
|
-
CreateCall: GrpcUnaryServiceInterface<CreateCallRequest, CreateCallResponse> = (message: CreateCallRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback<CreateCallResponse>, options?: grpc_1.CallOptions | grpc_1.requestCallback<CreateCallResponse>, callback?: grpc_1.requestCallback<CreateCallResponse>): grpc_1.ClientUnaryCall => {
|
|
1111
|
-
return super.CreateCall(message, metadata, options, callback);
|
|
1112
|
-
};
|
|
1113
|
-
ListCalls: GrpcUnaryServiceInterface<ListCallsRequest, ListCallsResponse> = (message: ListCallsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback<ListCallsResponse>, options?: grpc_1.CallOptions | grpc_1.requestCallback<ListCallsResponse>, callback?: grpc_1.requestCallback<ListCallsResponse>): grpc_1.ClientUnaryCall => {
|
|
1114
|
-
return super.ListCalls(message, metadata, options, callback);
|
|
1115
|
-
};
|
|
1116
|
-
GetCall: GrpcUnaryServiceInterface<GetCallRequest, CallDetailRecord> = (message: GetCallRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback<CallDetailRecord>, options?: grpc_1.CallOptions | grpc_1.requestCallback<CallDetailRecord>, callback?: grpc_1.requestCallback<CallDetailRecord>): grpc_1.ClientUnaryCall => {
|
|
1117
|
-
return super.GetCall(message, metadata, options, callback);
|
|
1118
|
-
};
|
|
1119
|
-
TrackCall: GrpcStreamServiceInterface<TrackCallRequest, TrackCallResponse> = (message: TrackCallRequest, metadata?: grpc_1.Metadata | grpc_1.CallOptions, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream<TrackCallResponse> => {
|
|
1120
|
-
return super.TrackCall(message, metadata, options);
|
|
1121
|
-
};
|
|
1122
|
-
}
|
|
1123
|
-
}
|