@fonoster/sdk 0.6.5 → 0.7.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.
Files changed (72) hide show
  1. package/README.md +524 -459
  2. package/dist/node/Acls.d.ts +43 -44
  3. package/dist/node/Acls.js +62 -49
  4. package/dist/node/Agents.d.ts +44 -45
  5. package/dist/node/Agents.js +47 -46
  6. package/dist/node/ApiKeys.d.ts +29 -29
  7. package/dist/node/ApiKeys.js +29 -29
  8. package/dist/node/Applications.d.ts +43 -43
  9. package/dist/node/Applications.js +56 -44
  10. package/dist/node/Calls.d.ts +42 -30
  11. package/dist/node/Calls.js +78 -54
  12. package/dist/node/Credentials.d.ts +39 -39
  13. package/dist/node/Credentials.js +39 -39
  14. package/dist/node/Domains.d.ts +37 -37
  15. package/dist/node/Domains.js +37 -37
  16. package/dist/node/Numbers.d.ts +40 -40
  17. package/dist/node/Numbers.js +40 -40
  18. package/dist/node/Secrets.d.ts +37 -37
  19. package/dist/node/Secrets.js +37 -37
  20. package/dist/node/Trunks.d.ts +58 -52
  21. package/dist/node/Trunks.js +104 -70
  22. package/dist/node/Users.d.ts +34 -34
  23. package/dist/node/Users.js +34 -34
  24. package/dist/node/Workspaces.d.ts +55 -54
  25. package/dist/node/Workspaces.js +61 -54
  26. package/dist/node/client/jsonToObject.js +1 -1
  27. package/dist/node/client/makeRpcRequest.js +1 -1
  28. package/dist/node/client/objectToJson.d.ts +1 -1
  29. package/dist/node/client/objectToJson.js +12 -2
  30. package/dist/node/client/types/CallsClient.d.ts +3 -2
  31. package/dist/node/client/types/IdentityClient.d.ts +2 -2
  32. package/dist/node/client/types/common.d.ts +8 -1
  33. package/dist/node/client/utils.js +6 -3
  34. package/dist/node/generated/node/acls_pb.js +6 -6
  35. package/dist/node/generated/node/agents_grpc_pb.js +0 -2
  36. package/dist/node/generated/node/agents_pb.js +450 -30
  37. package/dist/node/generated/node/applications_pb.js +24 -24
  38. package/dist/node/generated/node/calls_grpc_pb.js +0 -3
  39. package/dist/node/generated/node/calls_pb.js +103 -104
  40. package/dist/node/generated/node/credentials_pb.js +15 -45
  41. package/dist/node/generated/node/domains_pb.js +34 -34
  42. package/dist/node/generated/node/identity_grpc_pb.js +14 -14
  43. package/dist/node/generated/node/identity_pb.js +55 -55
  44. package/dist/node/generated/node/numbers_grpc_pb.js +0 -1
  45. package/dist/node/generated/node/numbers_pb.js +197 -17
  46. package/dist/node/generated/node/secrets_pb.js +6 -6
  47. package/dist/node/generated/node/trunks_grpc_pb.js +0 -2
  48. package/dist/node/generated/node/trunks_pb.js +532 -37
  49. package/dist/node/generated/web/IdentityServiceClientPb.ts +5 -5
  50. package/dist/node/generated/web/acls_pb.js +6 -6
  51. package/dist/node/generated/web/agents_pb.d.ts +62 -10
  52. package/dist/node/generated/web/agents_pb.js +450 -30
  53. package/dist/node/generated/web/applications_pb.d.ts +9 -9
  54. package/dist/node/generated/web/applications_pb.js +24 -24
  55. package/dist/node/generated/web/calls_pb.d.ts +37 -37
  56. package/dist/node/generated/web/calls_pb.js +103 -104
  57. package/dist/node/generated/web/credentials_pb.d.ts +0 -4
  58. package/dist/node/generated/web/credentials_pb.js +15 -45
  59. package/dist/node/generated/web/domains_pb.js +34 -34
  60. package/dist/node/generated/web/identity_pb.d.ts +13 -13
  61. package/dist/node/generated/web/identity_pb.js +55 -55
  62. package/dist/node/generated/web/numbers_pb.d.ts +26 -4
  63. package/dist/node/generated/web/numbers_pb.js +197 -17
  64. package/dist/node/generated/web/secrets_pb.js +6 -6
  65. package/dist/node/generated/web/trunks_pb.d.ts +71 -11
  66. package/dist/node/generated/web/trunks_pb.js +532 -37
  67. package/dist/node/tsconfig.node.tsbuildinfo +1 -1
  68. package/dist/node/utils.d.ts +5 -3
  69. package/dist/node/utils.js +56 -0
  70. package/dist/web/fonoster.min.js +1 -1
  71. package/dist/web/index.esm.js +1 -1
  72. package/package.json +4 -4
@@ -527,7 +527,7 @@ proto.fonoster.applications.v1beta2.Application.toObject = function(includeInsta
527
527
  ref: jspb.Message.getFieldWithDefault(msg, 1, ""),
528
528
  name: jspb.Message.getFieldWithDefault(msg, 2, ""),
529
529
  type: jspb.Message.getFieldWithDefault(msg, 3, 0),
530
- appEndpoint: jspb.Message.getFieldWithDefault(msg, 4, ""),
530
+ endpoint: jspb.Message.getFieldWithDefault(msg, 4, ""),
531
531
  textToSpeech: (f = msg.getTextToSpeech()) && proto.fonoster.applications.v1beta2.ProductContainer.toObject(includeInstance, f),
532
532
  speechToText: (f = msg.getSpeechToText()) && proto.fonoster.applications.v1beta2.ProductContainer.toObject(includeInstance, f),
533
533
  conversation: (f = msg.getConversation()) && proto.fonoster.applications.v1beta2.ProductContainer.toObject(includeInstance, f),
@@ -583,7 +583,7 @@ proto.fonoster.applications.v1beta2.Application.deserializeBinaryFromReader = fu
583
583
  break;
584
584
  case 4:
585
585
  var value = /** @type {string} */ (reader.readString());
586
- msg.setAppEndpoint(value);
586
+ msg.setEndpoint(value);
587
587
  break;
588
588
  case 5:
589
589
  var value = new proto.fonoster.applications.v1beta2.ProductContainer;
@@ -601,11 +601,11 @@ proto.fonoster.applications.v1beta2.Application.deserializeBinaryFromReader = fu
601
601
  msg.setConversation(value);
602
602
  break;
603
603
  case 8:
604
- var value = /** @type {number} */ (reader.readInt64());
604
+ var value = /** @type {number} */ (reader.readInt32());
605
605
  msg.setCreatedAt(value);
606
606
  break;
607
607
  case 9:
608
- var value = /** @type {number} */ (reader.readInt64());
608
+ var value = /** @type {number} */ (reader.readInt32());
609
609
  msg.setUpdatedAt(value);
610
610
  break;
611
611
  default:
@@ -658,7 +658,7 @@ proto.fonoster.applications.v1beta2.Application.serializeBinaryToWriter = functi
658
658
  f
659
659
  );
660
660
  }
661
- f = message.getAppEndpoint();
661
+ f = message.getEndpoint();
662
662
  if (f.length > 0) {
663
663
  writer.writeString(
664
664
  4,
@@ -691,14 +691,14 @@ proto.fonoster.applications.v1beta2.Application.serializeBinaryToWriter = functi
691
691
  }
692
692
  f = message.getCreatedAt();
693
693
  if (f !== 0) {
694
- writer.writeInt64(
694
+ writer.writeInt32(
695
695
  8,
696
696
  f
697
697
  );
698
698
  }
699
699
  f = message.getUpdatedAt();
700
700
  if (f !== 0) {
701
- writer.writeInt64(
701
+ writer.writeInt32(
702
702
  9,
703
703
  f
704
704
  );
@@ -761,10 +761,10 @@ proto.fonoster.applications.v1beta2.Application.prototype.setType = function(val
761
761
 
762
762
 
763
763
  /**
764
- * optional string app_endpoint = 4;
764
+ * optional string endpoint = 4;
765
765
  * @return {string}
766
766
  */
767
- proto.fonoster.applications.v1beta2.Application.prototype.getAppEndpoint = function() {
767
+ proto.fonoster.applications.v1beta2.Application.prototype.getEndpoint = function() {
768
768
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
769
769
  };
770
770
 
@@ -773,7 +773,7 @@ proto.fonoster.applications.v1beta2.Application.prototype.getAppEndpoint = funct
773
773
  * @param {string} value
774
774
  * @return {!proto.fonoster.applications.v1beta2.Application} returns this
775
775
  */
776
- proto.fonoster.applications.v1beta2.Application.prototype.setAppEndpoint = function(value) {
776
+ proto.fonoster.applications.v1beta2.Application.prototype.setEndpoint = function(value) {
777
777
  return jspb.Message.setProto3StringField(this, 4, value);
778
778
  };
779
779
 
@@ -890,7 +890,7 @@ proto.fonoster.applications.v1beta2.Application.prototype.hasConversation = func
890
890
 
891
891
 
892
892
  /**
893
- * optional int64 created_at = 8;
893
+ * optional int32 created_at = 8;
894
894
  * @return {number}
895
895
  */
896
896
  proto.fonoster.applications.v1beta2.Application.prototype.getCreatedAt = function() {
@@ -908,7 +908,7 @@ proto.fonoster.applications.v1beta2.Application.prototype.setCreatedAt = functio
908
908
 
909
909
 
910
910
  /**
911
- * optional int64 updated_at = 9;
911
+ * optional int32 updated_at = 9;
912
912
  * @return {number}
913
913
  */
914
914
  proto.fonoster.applications.v1beta2.Application.prototype.getUpdatedAt = function() {
@@ -959,7 +959,7 @@ proto.fonoster.applications.v1beta2.CreateApplicationRequest.toObject = function
959
959
  var f, obj = {
960
960
  name: jspb.Message.getFieldWithDefault(msg, 1, ""),
961
961
  type: jspb.Message.getFieldWithDefault(msg, 2, 0),
962
- appEndpoint: jspb.Message.getFieldWithDefault(msg, 3, ""),
962
+ endpoint: jspb.Message.getFieldWithDefault(msg, 3, ""),
963
963
  textToSpeech: (f = msg.getTextToSpeech()) && proto.fonoster.applications.v1beta2.ProductContainer.toObject(includeInstance, f),
964
964
  speechToText: (f = msg.getSpeechToText()) && proto.fonoster.applications.v1beta2.ProductContainer.toObject(includeInstance, f),
965
965
  intelligence: (f = msg.getIntelligence()) && proto.fonoster.applications.v1beta2.ProductContainer.toObject(includeInstance, f)
@@ -1009,7 +1009,7 @@ proto.fonoster.applications.v1beta2.CreateApplicationRequest.deserializeBinaryFr
1009
1009
  break;
1010
1010
  case 3:
1011
1011
  var value = /** @type {string} */ (reader.readString());
1012
- msg.setAppEndpoint(value);
1012
+ msg.setEndpoint(value);
1013
1013
  break;
1014
1014
  case 4:
1015
1015
  var value = new proto.fonoster.applications.v1beta2.ProductContainer;
@@ -1069,7 +1069,7 @@ proto.fonoster.applications.v1beta2.CreateApplicationRequest.serializeBinaryToWr
1069
1069
  f
1070
1070
  );
1071
1071
  }
1072
- f = message.getAppEndpoint();
1072
+ f = message.getEndpoint();
1073
1073
  if (f.length > 0) {
1074
1074
  writer.writeString(
1075
1075
  3,
@@ -1140,10 +1140,10 @@ proto.fonoster.applications.v1beta2.CreateApplicationRequest.prototype.setType =
1140
1140
 
1141
1141
 
1142
1142
  /**
1143
- * optional string app_endpoint = 3;
1143
+ * optional string endpoint = 3;
1144
1144
  * @return {string}
1145
1145
  */
1146
- proto.fonoster.applications.v1beta2.CreateApplicationRequest.prototype.getAppEndpoint = function() {
1146
+ proto.fonoster.applications.v1beta2.CreateApplicationRequest.prototype.getEndpoint = function() {
1147
1147
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
1148
1148
  };
1149
1149
 
@@ -1152,7 +1152,7 @@ proto.fonoster.applications.v1beta2.CreateApplicationRequest.prototype.getAppEnd
1152
1152
  * @param {string} value
1153
1153
  * @return {!proto.fonoster.applications.v1beta2.CreateApplicationRequest} returns this
1154
1154
  */
1155
- proto.fonoster.applications.v1beta2.CreateApplicationRequest.prototype.setAppEndpoint = function(value) {
1155
+ proto.fonoster.applications.v1beta2.CreateApplicationRequest.prototype.setEndpoint = function(value) {
1156
1156
  return jspb.Message.setProto3StringField(this, 3, value);
1157
1157
  };
1158
1158
 
@@ -1913,7 +1913,7 @@ proto.fonoster.applications.v1beta2.UpdateApplicationRequest.toObject = function
1913
1913
  ref: jspb.Message.getFieldWithDefault(msg, 1, ""),
1914
1914
  name: jspb.Message.getFieldWithDefault(msg, 2, ""),
1915
1915
  type: jspb.Message.getFieldWithDefault(msg, 3, 0),
1916
- appEndpoint: jspb.Message.getFieldWithDefault(msg, 4, ""),
1916
+ endpoint: jspb.Message.getFieldWithDefault(msg, 4, ""),
1917
1917
  textToSpeech: (f = msg.getTextToSpeech()) && proto.fonoster.applications.v1beta2.ProductContainer.toObject(includeInstance, f),
1918
1918
  speechToText: (f = msg.getSpeechToText()) && proto.fonoster.applications.v1beta2.ProductContainer.toObject(includeInstance, f),
1919
1919
  intelligence: (f = msg.getIntelligence()) && proto.fonoster.applications.v1beta2.ProductContainer.toObject(includeInstance, f)
@@ -1967,7 +1967,7 @@ proto.fonoster.applications.v1beta2.UpdateApplicationRequest.deserializeBinaryFr
1967
1967
  break;
1968
1968
  case 4:
1969
1969
  var value = /** @type {string} */ (reader.readString());
1970
- msg.setAppEndpoint(value);
1970
+ msg.setEndpoint(value);
1971
1971
  break;
1972
1972
  case 5:
1973
1973
  var value = new proto.fonoster.applications.v1beta2.ProductContainer;
@@ -2034,7 +2034,7 @@ proto.fonoster.applications.v1beta2.UpdateApplicationRequest.serializeBinaryToWr
2034
2034
  f
2035
2035
  );
2036
2036
  }
2037
- f = message.getAppEndpoint();
2037
+ f = message.getEndpoint();
2038
2038
  if (f.length > 0) {
2039
2039
  writer.writeString(
2040
2040
  4,
@@ -2123,10 +2123,10 @@ proto.fonoster.applications.v1beta2.UpdateApplicationRequest.prototype.setType =
2123
2123
 
2124
2124
 
2125
2125
  /**
2126
- * optional string app_endpoint = 4;
2126
+ * optional string endpoint = 4;
2127
2127
  * @return {string}
2128
2128
  */
2129
- proto.fonoster.applications.v1beta2.UpdateApplicationRequest.prototype.getAppEndpoint = function() {
2129
+ proto.fonoster.applications.v1beta2.UpdateApplicationRequest.prototype.getEndpoint = function() {
2130
2130
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
2131
2131
  };
2132
2132
 
@@ -2135,7 +2135,7 @@ proto.fonoster.applications.v1beta2.UpdateApplicationRequest.prototype.getAppEnd
2135
2135
  * @param {string} value
2136
2136
  * @return {!proto.fonoster.applications.v1beta2.UpdateApplicationRequest} returns this
2137
2137
  */
2138
- proto.fonoster.applications.v1beta2.UpdateApplicationRequest.prototype.setAppEndpoint = function(value) {
2138
+ proto.fonoster.applications.v1beta2.UpdateApplicationRequest.prototype.setEndpoint = function(value) {
2139
2139
  return jspb.Message.setProto3StringField(this, 4, value);
2140
2140
  };
2141
2141
 
@@ -111,9 +111,6 @@ function deserialize_fonoster_calls_v1beta2_TrackCallResponse(buffer_arg) {
111
111
  }
112
112
 
113
113
 
114
- // TODO: Consider using Timestamp instead of int64
115
- // import "google/protobuf/timestamp.proto";
116
- //
117
114
  // Calls service definition
118
115
  var CallsService = exports.CallsService = {
119
116
  // Call a number and returns the call status
@@ -22,11 +22,11 @@ goog.exportSymbol('proto.fonoster.calls.v1beta2.CallType', null, global);
22
22
  goog.exportSymbol('proto.fonoster.calls.v1beta2.CreateCallRequest', null, global);
23
23
  goog.exportSymbol('proto.fonoster.calls.v1beta2.CreateCallResponse', null, global);
24
24
  goog.exportSymbol('proto.fonoster.calls.v1beta2.GetCallRequest', null, global);
25
- goog.exportSymbol('proto.fonoster.calls.v1beta2.HangupCause', null, global);
26
25
  goog.exportSymbol('proto.fonoster.calls.v1beta2.ListCallsRequest', null, global);
27
26
  goog.exportSymbol('proto.fonoster.calls.v1beta2.ListCallsResponse', null, global);
28
27
  goog.exportSymbol('proto.fonoster.calls.v1beta2.TrackCallRequest', null, global);
29
28
  goog.exportSymbol('proto.fonoster.calls.v1beta2.TrackCallResponse', null, global);
29
+ goog.exportSymbol('proto.fonoster.calls.v1beta2.TrackCallResponse.Status', null, global);
30
30
  /**
31
31
  * Generated by JsPbCodeGenerator.
32
32
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -228,9 +228,9 @@ proto.fonoster.calls.v1beta2.CallDetailRecord.prototype.toObject = function(opt_
228
228
  proto.fonoster.calls.v1beta2.CallDetailRecord.toObject = function(includeInstance, msg) {
229
229
  var f, obj = {
230
230
  ref: jspb.Message.getFieldWithDefault(msg, 1, ""),
231
- type: jspb.Message.getFieldWithDefault(msg, 2, 0),
232
- status: jspb.Message.getFieldWithDefault(msg, 3, 0),
233
- hangupCause: jspb.Message.getFieldWithDefault(msg, 4, 0),
231
+ callId: jspb.Message.getFieldWithDefault(msg, 2, ""),
232
+ type: jspb.Message.getFieldWithDefault(msg, 3, 0),
233
+ status: jspb.Message.getFieldWithDefault(msg, 4, 0),
234
234
  startedAt: jspb.Message.getFieldWithDefault(msg, 5, 0),
235
235
  endedAt: jspb.Message.getFieldWithDefault(msg, 6, 0),
236
236
  from: jspb.Message.getFieldWithDefault(msg, 7, ""),
@@ -278,23 +278,23 @@ proto.fonoster.calls.v1beta2.CallDetailRecord.deserializeBinaryFromReader = func
278
278
  msg.setRef(value);
279
279
  break;
280
280
  case 2:
281
+ var value = /** @type {string} */ (reader.readString());
282
+ msg.setCallId(value);
283
+ break;
284
+ case 3:
281
285
  var value = /** @type {!proto.fonoster.calls.v1beta2.CallType} */ (reader.readEnum());
282
286
  msg.setType(value);
283
287
  break;
284
- case 3:
288
+ case 4:
285
289
  var value = /** @type {!proto.fonoster.calls.v1beta2.CallStatus} */ (reader.readEnum());
286
290
  msg.setStatus(value);
287
291
  break;
288
- case 4:
289
- var value = /** @type {!proto.fonoster.calls.v1beta2.HangupCause} */ (reader.readEnum());
290
- msg.setHangupCause(value);
291
- break;
292
292
  case 5:
293
- var value = /** @type {number} */ (reader.readInt64());
293
+ var value = /** @type {number} */ (reader.readInt32());
294
294
  msg.setStartedAt(value);
295
295
  break;
296
296
  case 6:
297
- var value = /** @type {number} */ (reader.readInt64());
297
+ var value = /** @type {number} */ (reader.readInt32());
298
298
  msg.setEndedAt(value);
299
299
  break;
300
300
  case 7:
@@ -349,21 +349,21 @@ proto.fonoster.calls.v1beta2.CallDetailRecord.serializeBinaryToWriter = function
349
349
  f
350
350
  );
351
351
  }
352
- f = message.getType();
353
- if (f !== 0.0) {
354
- writer.writeEnum(
352
+ f = message.getCallId();
353
+ if (f.length > 0) {
354
+ writer.writeString(
355
355
  2,
356
356
  f
357
357
  );
358
358
  }
359
- f = message.getStatus();
359
+ f = message.getType();
360
360
  if (f !== 0.0) {
361
361
  writer.writeEnum(
362
362
  3,
363
363
  f
364
364
  );
365
365
  }
366
- f = message.getHangupCause();
366
+ f = message.getStatus();
367
367
  if (f !== 0.0) {
368
368
  writer.writeEnum(
369
369
  4,
@@ -372,14 +372,14 @@ proto.fonoster.calls.v1beta2.CallDetailRecord.serializeBinaryToWriter = function
372
372
  }
373
373
  f = message.getStartedAt();
374
374
  if (f !== 0) {
375
- writer.writeInt64(
375
+ writer.writeInt32(
376
376
  5,
377
377
  f
378
378
  );
379
379
  }
380
380
  f = message.getEndedAt();
381
381
  if (f !== 0) {
382
- writer.writeInt64(
382
+ writer.writeInt32(
383
383
  6,
384
384
  f
385
385
  );
@@ -434,61 +434,61 @@ proto.fonoster.calls.v1beta2.CallDetailRecord.prototype.setRef = function(value)
434
434
 
435
435
 
436
436
  /**
437
- * optional CallType type = 2;
438
- * @return {!proto.fonoster.calls.v1beta2.CallType}
437
+ * optional string call_id = 2;
438
+ * @return {string}
439
439
  */
440
- proto.fonoster.calls.v1beta2.CallDetailRecord.prototype.getType = function() {
441
- return /** @type {!proto.fonoster.calls.v1beta2.CallType} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
440
+ proto.fonoster.calls.v1beta2.CallDetailRecord.prototype.getCallId = function() {
441
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
442
442
  };
443
443
 
444
444
 
445
445
  /**
446
- * @param {!proto.fonoster.calls.v1beta2.CallType} value
446
+ * @param {string} value
447
447
  * @return {!proto.fonoster.calls.v1beta2.CallDetailRecord} returns this
448
448
  */
449
- proto.fonoster.calls.v1beta2.CallDetailRecord.prototype.setType = function(value) {
450
- return jspb.Message.setProto3EnumField(this, 2, value);
449
+ proto.fonoster.calls.v1beta2.CallDetailRecord.prototype.setCallId = function(value) {
450
+ return jspb.Message.setProto3StringField(this, 2, value);
451
451
  };
452
452
 
453
453
 
454
454
  /**
455
- * optional CallStatus status = 3;
456
- * @return {!proto.fonoster.calls.v1beta2.CallStatus}
455
+ * optional CallType type = 3;
456
+ * @return {!proto.fonoster.calls.v1beta2.CallType}
457
457
  */
458
- proto.fonoster.calls.v1beta2.CallDetailRecord.prototype.getStatus = function() {
459
- return /** @type {!proto.fonoster.calls.v1beta2.CallStatus} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
458
+ proto.fonoster.calls.v1beta2.CallDetailRecord.prototype.getType = function() {
459
+ return /** @type {!proto.fonoster.calls.v1beta2.CallType} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
460
460
  };
461
461
 
462
462
 
463
463
  /**
464
- * @param {!proto.fonoster.calls.v1beta2.CallStatus} value
464
+ * @param {!proto.fonoster.calls.v1beta2.CallType} value
465
465
  * @return {!proto.fonoster.calls.v1beta2.CallDetailRecord} returns this
466
466
  */
467
- proto.fonoster.calls.v1beta2.CallDetailRecord.prototype.setStatus = function(value) {
467
+ proto.fonoster.calls.v1beta2.CallDetailRecord.prototype.setType = function(value) {
468
468
  return jspb.Message.setProto3EnumField(this, 3, value);
469
469
  };
470
470
 
471
471
 
472
472
  /**
473
- * optional HangupCause hangup_cause = 4;
474
- * @return {!proto.fonoster.calls.v1beta2.HangupCause}
473
+ * optional CallStatus status = 4;
474
+ * @return {!proto.fonoster.calls.v1beta2.CallStatus}
475
475
  */
476
- proto.fonoster.calls.v1beta2.CallDetailRecord.prototype.getHangupCause = function() {
477
- return /** @type {!proto.fonoster.calls.v1beta2.HangupCause} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
476
+ proto.fonoster.calls.v1beta2.CallDetailRecord.prototype.getStatus = function() {
477
+ return /** @type {!proto.fonoster.calls.v1beta2.CallStatus} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
478
478
  };
479
479
 
480
480
 
481
481
  /**
482
- * @param {!proto.fonoster.calls.v1beta2.HangupCause} value
482
+ * @param {!proto.fonoster.calls.v1beta2.CallStatus} value
483
483
  * @return {!proto.fonoster.calls.v1beta2.CallDetailRecord} returns this
484
484
  */
485
- proto.fonoster.calls.v1beta2.CallDetailRecord.prototype.setHangupCause = function(value) {
485
+ proto.fonoster.calls.v1beta2.CallDetailRecord.prototype.setStatus = function(value) {
486
486
  return jspb.Message.setProto3EnumField(this, 4, value);
487
487
  };
488
488
 
489
489
 
490
490
  /**
491
- * optional int64 started_at = 5;
491
+ * optional int32 started_at = 5;
492
492
  * @return {number}
493
493
  */
494
494
  proto.fonoster.calls.v1beta2.CallDetailRecord.prototype.getStartedAt = function() {
@@ -506,7 +506,7 @@ proto.fonoster.calls.v1beta2.CallDetailRecord.prototype.setStartedAt = function(
506
506
 
507
507
 
508
508
  /**
509
- * optional int64 ended_at = 6;
509
+ * optional int32 ended_at = 6;
510
510
  * @return {number}
511
511
  */
512
512
  proto.fonoster.calls.v1beta2.CallDetailRecord.prototype.getEndedAt = function() {
@@ -629,7 +629,8 @@ proto.fonoster.calls.v1beta2.CreateCallRequest.toObject = function(includeInstan
629
629
  var f, obj = {
630
630
  from: jspb.Message.getFieldWithDefault(msg, 1, ""),
631
631
  to: jspb.Message.getFieldWithDefault(msg, 2, ""),
632
- appRef: jspb.Message.getFieldWithDefault(msg, 3, "")
632
+ appRef: jspb.Message.getFieldWithDefault(msg, 3, ""),
633
+ timeout: jspb.Message.getFieldWithDefault(msg, 4, 0)
633
634
  };
634
635
 
635
636
  if (includeInstance) {
@@ -678,6 +679,10 @@ proto.fonoster.calls.v1beta2.CreateCallRequest.deserializeBinaryFromReader = fun
678
679
  var value = /** @type {string} */ (reader.readString());
679
680
  msg.setAppRef(value);
680
681
  break;
682
+ case 4:
683
+ var value = /** @type {number} */ (reader.readInt32());
684
+ msg.setTimeout(value);
685
+ break;
681
686
  default:
682
687
  reader.skipField();
683
688
  break;
@@ -728,6 +733,13 @@ proto.fonoster.calls.v1beta2.CreateCallRequest.serializeBinaryToWriter = functio
728
733
  f
729
734
  );
730
735
  }
736
+ f = message.getTimeout();
737
+ if (f !== 0) {
738
+ writer.writeInt32(
739
+ 4,
740
+ f
741
+ );
742
+ }
731
743
  };
732
744
 
733
745
 
@@ -785,6 +797,24 @@ proto.fonoster.calls.v1beta2.CreateCallRequest.prototype.setAppRef = function(va
785
797
  };
786
798
 
787
799
 
800
+ /**
801
+ * optional int32 timeout = 4;
802
+ * @return {number}
803
+ */
804
+ proto.fonoster.calls.v1beta2.CreateCallRequest.prototype.getTimeout = function() {
805
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
806
+ };
807
+
808
+
809
+ /**
810
+ * @param {number} value
811
+ * @return {!proto.fonoster.calls.v1beta2.CreateCallRequest} returns this
812
+ */
813
+ proto.fonoster.calls.v1beta2.CreateCallRequest.prototype.setTimeout = function(value) {
814
+ return jspb.Message.setProto3IntField(this, 4, value);
815
+ };
816
+
817
+
788
818
 
789
819
 
790
820
 
@@ -1737,8 +1767,7 @@ proto.fonoster.calls.v1beta2.TrackCallResponse.prototype.toObject = function(opt
1737
1767
  */
1738
1768
  proto.fonoster.calls.v1beta2.TrackCallResponse.toObject = function(includeInstance, msg) {
1739
1769
  var f, obj = {
1740
- ref: jspb.Message.getFieldWithDefault(msg, 1, ""),
1741
- status: jspb.Message.getFieldWithDefault(msg, 2, 0)
1770
+ status: jspb.Message.getFieldWithDefault(msg, 1, 0)
1742
1771
  };
1743
1772
 
1744
1773
  if (includeInstance) {
@@ -1776,11 +1805,7 @@ proto.fonoster.calls.v1beta2.TrackCallResponse.deserializeBinaryFromReader = fun
1776
1805
  var field = reader.getFieldNumber();
1777
1806
  switch (field) {
1778
1807
  case 1:
1779
- var value = /** @type {string} */ (reader.readString());
1780
- msg.setRef(value);
1781
- break;
1782
- case 2:
1783
- var value = /** @type {!proto.fonoster.calls.v1beta2.CallStatus} */ (reader.readEnum());
1808
+ var value = /** @type {!proto.fonoster.calls.v1beta2.TrackCallResponse.Status} */ (reader.readEnum());
1784
1809
  msg.setStatus(value);
1785
1810
  break;
1786
1811
  default:
@@ -1812,17 +1837,10 @@ proto.fonoster.calls.v1beta2.TrackCallResponse.prototype.serializeBinary = funct
1812
1837
  */
1813
1838
  proto.fonoster.calls.v1beta2.TrackCallResponse.serializeBinaryToWriter = function(message, writer) {
1814
1839
  var f = undefined;
1815
- f = message.getRef();
1816
- if (f.length > 0) {
1817
- writer.writeString(
1818
- 1,
1819
- f
1820
- );
1821
- }
1822
1840
  f = message.getStatus();
1823
1841
  if (f !== 0.0) {
1824
1842
  writer.writeEnum(
1825
- 2,
1843
+ 1,
1826
1844
  f
1827
1845
  );
1828
1846
  }
@@ -1830,38 +1848,33 @@ proto.fonoster.calls.v1beta2.TrackCallResponse.serializeBinaryToWriter = functio
1830
1848
 
1831
1849
 
1832
1850
  /**
1833
- * optional string ref = 1;
1834
- * @return {string}
1835
- */
1836
- proto.fonoster.calls.v1beta2.TrackCallResponse.prototype.getRef = function() {
1837
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1838
- };
1839
-
1840
-
1841
- /**
1842
- * @param {string} value
1843
- * @return {!proto.fonoster.calls.v1beta2.TrackCallResponse} returns this
1851
+ * @enum {number}
1844
1852
  */
1845
- proto.fonoster.calls.v1beta2.TrackCallResponse.prototype.setRef = function(value) {
1846
- return jspb.Message.setProto3StringField(this, 1, value);
1853
+ proto.fonoster.calls.v1beta2.TrackCallResponse.Status = {
1854
+ TRYING: 0,
1855
+ CANCEL: 1,
1856
+ ANSWER: 2,
1857
+ BUSY: 3,
1858
+ PROGRESS: 4,
1859
+ NOANSWER: 5,
1860
+ FAILED: 6
1847
1861
  };
1848
1862
 
1849
-
1850
1863
  /**
1851
- * optional CallStatus status = 2;
1852
- * @return {!proto.fonoster.calls.v1beta2.CallStatus}
1864
+ * optional Status status = 1;
1865
+ * @return {!proto.fonoster.calls.v1beta2.TrackCallResponse.Status}
1853
1866
  */
1854
1867
  proto.fonoster.calls.v1beta2.TrackCallResponse.prototype.getStatus = function() {
1855
- return /** @type {!proto.fonoster.calls.v1beta2.CallStatus} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
1868
+ return /** @type {!proto.fonoster.calls.v1beta2.TrackCallResponse.Status} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
1856
1869
  };
1857
1870
 
1858
1871
 
1859
1872
  /**
1860
- * @param {!proto.fonoster.calls.v1beta2.CallStatus} value
1873
+ * @param {!proto.fonoster.calls.v1beta2.TrackCallResponse.Status} value
1861
1874
  * @return {!proto.fonoster.calls.v1beta2.TrackCallResponse} returns this
1862
1875
  */
1863
1876
  proto.fonoster.calls.v1beta2.TrackCallResponse.prototype.setStatus = function(value) {
1864
- return jspb.Message.setProto3EnumField(this, 2, value);
1877
+ return jspb.Message.setProto3EnumField(this, 1, value);
1865
1878
  };
1866
1879
 
1867
1880
 
@@ -1869,48 +1882,34 @@ proto.fonoster.calls.v1beta2.TrackCallResponse.prototype.setStatus = function(va
1869
1882
  * @enum {number}
1870
1883
  */
1871
1884
  proto.fonoster.calls.v1beta2.CallType = {
1872
- PROGRAMMABLE: 0,
1873
- SIP_TRUNKING: 1
1874
- };
1875
-
1876
- /**
1877
- * @enum {number}
1878
- */
1879
- proto.fonoster.calls.v1beta2.HangupCause = {
1880
- NORMAL_CLEARING: 0,
1881
- CALL_REJECTED: 1,
1882
- UNALLOCATED: 2,
1883
- NO_USER_RESPONSE: 3,
1884
- NO_ROUTE_DESTINATION: 4,
1885
- NO_ANSWER: 5,
1886
- USER_BUSY: 6,
1887
- NOT_ACCEPTABLE_HERE: 7,
1888
- SERVICE_UNAVAILABLE: 8,
1889
- INVALID_NUMBER_FORMAT: 9,
1890
- UNKNOWN: 10
1885
+ SIP_ORIGINATED: 0,
1886
+ API_ORIGINATED: 1
1891
1887
  };
1892
1888
 
1893
1889
  /**
1894
1890
  * @enum {number}
1895
1891
  */
1896
1892
  proto.fonoster.calls.v1beta2.CallStatus = {
1897
- QUEUED: 0,
1898
- RINGING: 1,
1899
- IN_PROGRESS: 2,
1900
- COMPLETED: 3,
1901
- FAILED: 4,
1902
- BUSY: 5,
1903
- CANCELED: 7,
1904
- REJECTED: 8,
1905
- TIMEOUT: 9
1893
+ UNKNOWN: 0,
1894
+ NORMAL_CLEARING: 1,
1895
+ CALL_REJECTED: 2,
1896
+ UNALLOCATED: 3,
1897
+ NO_USER_RESPONSE: 4,
1898
+ NO_ROUTE_DESTINATION: 5,
1899
+ NO_ANSWER: 6,
1900
+ USER_BUSY: 7,
1901
+ NOT_ACCEPTABLE_HERE: 8,
1902
+ SERVICE_UNAVAILABLE: 9,
1903
+ INVALID_NUMBER_FORMAT: 10
1906
1904
  };
1907
1905
 
1908
1906
  /**
1909
1907
  * @enum {number}
1910
1908
  */
1911
1909
  proto.fonoster.calls.v1beta2.CallDirection = {
1912
- INBOUND: 0,
1913
- OUTBOUND: 1
1910
+ FROM_PSTN: 0,
1911
+ TO_PSTN: 1,
1912
+ INTRA_NETWORK: 2
1914
1913
  };
1915
1914
 
1916
1915
  goog.object.extend(exports, proto.fonoster.calls.v1beta2);