@fonoster/sdk 0.9.49 → 0.9.51
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/dist/node/Calls.js +5 -1
- package/dist/node/generated/node/calls_grpc_pb.js +1 -0
- package/dist/node/generated/node/calls_pb.js +54 -1
- package/dist/node/generated/web/calls_pb.d.ts +7 -0
- package/dist/node/generated/web/calls_pb.js +54 -1
- package/dist/node/tsconfig.tsbuildinfo +1 -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/Calls.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Calls = void 0;
|
|
4
|
+
const struct_pb_1 = require("google-protobuf/google/protobuf/struct_pb");
|
|
4
5
|
const makeRpcRequest_1 = require("./client/makeRpcRequest");
|
|
5
6
|
const calls_pb_1 = require("./generated/node/calls_pb");
|
|
6
7
|
const utils_1 = require("./utils");
|
|
@@ -86,7 +87,10 @@ class Calls {
|
|
|
86
87
|
method: client.createCall.bind(client),
|
|
87
88
|
requestPBObjectConstructor: calls_pb_1.CreateCallRequest,
|
|
88
89
|
metadata: this.client.getMetadata(),
|
|
89
|
-
request
|
|
90
|
+
request: {
|
|
91
|
+
...request,
|
|
92
|
+
metadata: struct_pb_1.Struct.fromJavaScript(request.metadata)
|
|
93
|
+
}
|
|
90
94
|
});
|
|
91
95
|
const trackCallRequest = new calls_pb_1.TrackCallRequest();
|
|
92
96
|
trackCallRequest.setRef(response.ref);
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
'use strict';
|
|
22
22
|
var grpc = require('@grpc/grpc-js');
|
|
23
23
|
var calls_pb = require('./calls_pb.js');
|
|
24
|
+
var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js');
|
|
24
25
|
|
|
25
26
|
function serialize_fonoster_calls_v1beta2_CallDetailRecord(arg) {
|
|
26
27
|
if (!(arg instanceof calls_pb.CallDetailRecord)) {
|
|
@@ -21,6 +21,8 @@ var global =
|
|
|
21
21
|
(function () { return this; }).call(null) ||
|
|
22
22
|
Function('return this')();
|
|
23
23
|
|
|
24
|
+
var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js');
|
|
25
|
+
goog.object.extend(proto, google_protobuf_struct_pb);
|
|
24
26
|
goog.exportSymbol('proto.fonoster.calls.v1beta2.CallDetailRecord', null, global);
|
|
25
27
|
goog.exportSymbol('proto.fonoster.calls.v1beta2.CallDirection', null, global);
|
|
26
28
|
goog.exportSymbol('proto.fonoster.calls.v1beta2.CallStatus', null, global);
|
|
@@ -636,7 +638,8 @@ proto.fonoster.calls.v1beta2.CreateCallRequest.toObject = function(includeInstan
|
|
|
636
638
|
from: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
637
639
|
to: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
638
640
|
appRef: jspb.Message.getFieldWithDefault(msg, 3, ""),
|
|
639
|
-
timeout: jspb.Message.getFieldWithDefault(msg, 4, 0)
|
|
641
|
+
timeout: jspb.Message.getFieldWithDefault(msg, 4, 0),
|
|
642
|
+
metadata: (f = msg.getMetadata()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f)
|
|
640
643
|
};
|
|
641
644
|
|
|
642
645
|
if (includeInstance) {
|
|
@@ -689,6 +692,11 @@ proto.fonoster.calls.v1beta2.CreateCallRequest.deserializeBinaryFromReader = fun
|
|
|
689
692
|
var value = /** @type {number} */ (reader.readInt32());
|
|
690
693
|
msg.setTimeout(value);
|
|
691
694
|
break;
|
|
695
|
+
case 5:
|
|
696
|
+
var value = new google_protobuf_struct_pb.Struct;
|
|
697
|
+
reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader);
|
|
698
|
+
msg.setMetadata(value);
|
|
699
|
+
break;
|
|
692
700
|
default:
|
|
693
701
|
reader.skipField();
|
|
694
702
|
break;
|
|
@@ -746,6 +754,14 @@ proto.fonoster.calls.v1beta2.CreateCallRequest.serializeBinaryToWriter = functio
|
|
|
746
754
|
f
|
|
747
755
|
);
|
|
748
756
|
}
|
|
757
|
+
f = message.getMetadata();
|
|
758
|
+
if (f != null) {
|
|
759
|
+
writer.writeMessage(
|
|
760
|
+
5,
|
|
761
|
+
f,
|
|
762
|
+
google_protobuf_struct_pb.Struct.serializeBinaryToWriter
|
|
763
|
+
);
|
|
764
|
+
}
|
|
749
765
|
};
|
|
750
766
|
|
|
751
767
|
|
|
@@ -821,6 +837,43 @@ proto.fonoster.calls.v1beta2.CreateCallRequest.prototype.setTimeout = function(v
|
|
|
821
837
|
};
|
|
822
838
|
|
|
823
839
|
|
|
840
|
+
/**
|
|
841
|
+
* optional google.protobuf.Struct metadata = 5;
|
|
842
|
+
* @return {?proto.google.protobuf.Struct}
|
|
843
|
+
*/
|
|
844
|
+
proto.fonoster.calls.v1beta2.CreateCallRequest.prototype.getMetadata = function() {
|
|
845
|
+
return /** @type{?proto.google.protobuf.Struct} */ (
|
|
846
|
+
jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 5));
|
|
847
|
+
};
|
|
848
|
+
|
|
849
|
+
|
|
850
|
+
/**
|
|
851
|
+
* @param {?proto.google.protobuf.Struct|undefined} value
|
|
852
|
+
* @return {!proto.fonoster.calls.v1beta2.CreateCallRequest} returns this
|
|
853
|
+
*/
|
|
854
|
+
proto.fonoster.calls.v1beta2.CreateCallRequest.prototype.setMetadata = function(value) {
|
|
855
|
+
return jspb.Message.setWrapperField(this, 5, value);
|
|
856
|
+
};
|
|
857
|
+
|
|
858
|
+
|
|
859
|
+
/**
|
|
860
|
+
* Clears the message field making it undefined.
|
|
861
|
+
* @return {!proto.fonoster.calls.v1beta2.CreateCallRequest} returns this
|
|
862
|
+
*/
|
|
863
|
+
proto.fonoster.calls.v1beta2.CreateCallRequest.prototype.clearMetadata = function() {
|
|
864
|
+
return this.setMetadata(undefined);
|
|
865
|
+
};
|
|
866
|
+
|
|
867
|
+
|
|
868
|
+
/**
|
|
869
|
+
* Returns whether this field is set.
|
|
870
|
+
* @return {boolean}
|
|
871
|
+
*/
|
|
872
|
+
proto.fonoster.calls.v1beta2.CreateCallRequest.prototype.hasMetadata = function() {
|
|
873
|
+
return jspb.Message.getField(this, 5) != null;
|
|
874
|
+
};
|
|
875
|
+
|
|
876
|
+
|
|
824
877
|
|
|
825
878
|
|
|
826
879
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as jspb from 'google-protobuf'
|
|
2
2
|
|
|
3
|
+
import * as google_protobuf_struct_pb from 'google-protobuf/google/protobuf/struct_pb'; // proto import: "google/protobuf/struct.proto"
|
|
3
4
|
|
|
4
5
|
|
|
5
6
|
export class CallDetailRecord extends jspb.Message {
|
|
@@ -69,6 +70,11 @@ export class CreateCallRequest extends jspb.Message {
|
|
|
69
70
|
getTimeout(): number;
|
|
70
71
|
setTimeout(value: number): CreateCallRequest;
|
|
71
72
|
|
|
73
|
+
getMetadata(): google_protobuf_struct_pb.Struct | undefined;
|
|
74
|
+
setMetadata(value?: google_protobuf_struct_pb.Struct): CreateCallRequest;
|
|
75
|
+
hasMetadata(): boolean;
|
|
76
|
+
clearMetadata(): CreateCallRequest;
|
|
77
|
+
|
|
72
78
|
serializeBinary(): Uint8Array;
|
|
73
79
|
toObject(includeInstance?: boolean): CreateCallRequest.AsObject;
|
|
74
80
|
static toObject(includeInstance: boolean, msg: CreateCallRequest): CreateCallRequest.AsObject;
|
|
@@ -83,6 +89,7 @@ export namespace CreateCallRequest {
|
|
|
83
89
|
to: string,
|
|
84
90
|
appRef: string,
|
|
85
91
|
timeout: number,
|
|
92
|
+
metadata?: google_protobuf_struct_pb.Struct.AsObject,
|
|
86
93
|
}
|
|
87
94
|
}
|
|
88
95
|
|
|
@@ -21,6 +21,8 @@ var global =
|
|
|
21
21
|
(function () { return this; }).call(null) ||
|
|
22
22
|
Function('return this')();
|
|
23
23
|
|
|
24
|
+
var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js');
|
|
25
|
+
goog.object.extend(proto, google_protobuf_struct_pb);
|
|
24
26
|
goog.exportSymbol('proto.fonoster.calls.v1beta2.CallDetailRecord', null, global);
|
|
25
27
|
goog.exportSymbol('proto.fonoster.calls.v1beta2.CallDirection', null, global);
|
|
26
28
|
goog.exportSymbol('proto.fonoster.calls.v1beta2.CallStatus', null, global);
|
|
@@ -636,7 +638,8 @@ proto.fonoster.calls.v1beta2.CreateCallRequest.toObject = function(includeInstan
|
|
|
636
638
|
from: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
637
639
|
to: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
638
640
|
appRef: jspb.Message.getFieldWithDefault(msg, 3, ""),
|
|
639
|
-
timeout: jspb.Message.getFieldWithDefault(msg, 4, 0)
|
|
641
|
+
timeout: jspb.Message.getFieldWithDefault(msg, 4, 0),
|
|
642
|
+
metadata: (f = msg.getMetadata()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f)
|
|
640
643
|
};
|
|
641
644
|
|
|
642
645
|
if (includeInstance) {
|
|
@@ -689,6 +692,11 @@ proto.fonoster.calls.v1beta2.CreateCallRequest.deserializeBinaryFromReader = fun
|
|
|
689
692
|
var value = /** @type {number} */ (reader.readInt32());
|
|
690
693
|
msg.setTimeout(value);
|
|
691
694
|
break;
|
|
695
|
+
case 5:
|
|
696
|
+
var value = new google_protobuf_struct_pb.Struct;
|
|
697
|
+
reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader);
|
|
698
|
+
msg.setMetadata(value);
|
|
699
|
+
break;
|
|
692
700
|
default:
|
|
693
701
|
reader.skipField();
|
|
694
702
|
break;
|
|
@@ -746,6 +754,14 @@ proto.fonoster.calls.v1beta2.CreateCallRequest.serializeBinaryToWriter = functio
|
|
|
746
754
|
f
|
|
747
755
|
);
|
|
748
756
|
}
|
|
757
|
+
f = message.getMetadata();
|
|
758
|
+
if (f != null) {
|
|
759
|
+
writer.writeMessage(
|
|
760
|
+
5,
|
|
761
|
+
f,
|
|
762
|
+
google_protobuf_struct_pb.Struct.serializeBinaryToWriter
|
|
763
|
+
);
|
|
764
|
+
}
|
|
749
765
|
};
|
|
750
766
|
|
|
751
767
|
|
|
@@ -821,6 +837,43 @@ proto.fonoster.calls.v1beta2.CreateCallRequest.prototype.setTimeout = function(v
|
|
|
821
837
|
};
|
|
822
838
|
|
|
823
839
|
|
|
840
|
+
/**
|
|
841
|
+
* optional google.protobuf.Struct metadata = 5;
|
|
842
|
+
* @return {?proto.google.protobuf.Struct}
|
|
843
|
+
*/
|
|
844
|
+
proto.fonoster.calls.v1beta2.CreateCallRequest.prototype.getMetadata = function() {
|
|
845
|
+
return /** @type{?proto.google.protobuf.Struct} */ (
|
|
846
|
+
jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 5));
|
|
847
|
+
};
|
|
848
|
+
|
|
849
|
+
|
|
850
|
+
/**
|
|
851
|
+
* @param {?proto.google.protobuf.Struct|undefined} value
|
|
852
|
+
* @return {!proto.fonoster.calls.v1beta2.CreateCallRequest} returns this
|
|
853
|
+
*/
|
|
854
|
+
proto.fonoster.calls.v1beta2.CreateCallRequest.prototype.setMetadata = function(value) {
|
|
855
|
+
return jspb.Message.setWrapperField(this, 5, value);
|
|
856
|
+
};
|
|
857
|
+
|
|
858
|
+
|
|
859
|
+
/**
|
|
860
|
+
* Clears the message field making it undefined.
|
|
861
|
+
* @return {!proto.fonoster.calls.v1beta2.CreateCallRequest} returns this
|
|
862
|
+
*/
|
|
863
|
+
proto.fonoster.calls.v1beta2.CreateCallRequest.prototype.clearMetadata = function() {
|
|
864
|
+
return this.setMetadata(undefined);
|
|
865
|
+
};
|
|
866
|
+
|
|
867
|
+
|
|
868
|
+
/**
|
|
869
|
+
* Returns whether this field is set.
|
|
870
|
+
* @return {boolean}
|
|
871
|
+
*/
|
|
872
|
+
proto.fonoster.calls.v1beta2.CreateCallRequest.prototype.hasMetadata = function() {
|
|
873
|
+
return jspb.Message.getField(this, 5) != null;
|
|
874
|
+
};
|
|
875
|
+
|
|
876
|
+
|
|
824
877
|
|
|
825
878
|
|
|
826
879
|
|