@marleena/trb-proto 1.0.38 → 1.0.40

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.
@@ -125,5 +125,48 @@ export class IndicatorsClient {
125
125
  this.methodDescriptorListSupported);
126
126
  }
127
127
 
128
+ methodDescriptorComputeForInstrument = new grpcWeb.MethodDescriptor(
129
+ '/trb.indicators.v1.Indicators/ComputeForInstrument',
130
+ grpcWeb.MethodType.UNARY,
131
+ indicators_indicators_pb.ComputeForInstrumentRequest,
132
+ indicators_indicators_pb.ComputeResponse,
133
+ (request: indicators_indicators_pb.ComputeForInstrumentRequest) => {
134
+ return request.serializeBinary();
135
+ },
136
+ indicators_indicators_pb.ComputeResponse.deserializeBinary
137
+ );
138
+
139
+ computeForInstrument(
140
+ request: indicators_indicators_pb.ComputeForInstrumentRequest,
141
+ metadata?: grpcWeb.Metadata | null): Promise<indicators_indicators_pb.ComputeResponse>;
142
+
143
+ computeForInstrument(
144
+ request: indicators_indicators_pb.ComputeForInstrumentRequest,
145
+ metadata: grpcWeb.Metadata | null,
146
+ callback: (err: grpcWeb.RpcError,
147
+ response: indicators_indicators_pb.ComputeResponse) => void): grpcWeb.ClientReadableStream<indicators_indicators_pb.ComputeResponse>;
148
+
149
+ computeForInstrument(
150
+ request: indicators_indicators_pb.ComputeForInstrumentRequest,
151
+ metadata?: grpcWeb.Metadata | null,
152
+ callback?: (err: grpcWeb.RpcError,
153
+ response: indicators_indicators_pb.ComputeResponse) => void) {
154
+ if (callback !== undefined) {
155
+ return this.client_.rpcCall(
156
+ this.hostname_ +
157
+ '/trb.indicators.v1.Indicators/ComputeForInstrument',
158
+ request,
159
+ metadata || {},
160
+ this.methodDescriptorComputeForInstrument,
161
+ callback);
162
+ }
163
+ return this.client_.unaryCall(
164
+ this.hostname_ +
165
+ '/trb.indicators.v1.Indicators/ComputeForInstrument',
166
+ request,
167
+ metadata || {},
168
+ this.methodDescriptorComputeForInstrument);
169
+ }
170
+
128
171
  }
129
172
 
@@ -72,6 +72,52 @@ export namespace ComputeRequest {
72
72
  }
73
73
  }
74
74
 
75
+ export class ComputeForInstrumentRequest extends jspb.Message {
76
+ getUid(): string;
77
+ setUid(value: string): ComputeForInstrumentRequest;
78
+
79
+ getInterval(): number;
80
+ setInterval(value: number): ComputeForInstrumentRequest;
81
+
82
+ getFrom(): google_protobuf_timestamp_pb.Timestamp | undefined;
83
+ setFrom(value?: google_protobuf_timestamp_pb.Timestamp): ComputeForInstrumentRequest;
84
+ hasFrom(): boolean;
85
+ clearFrom(): ComputeForInstrumentRequest;
86
+
87
+ getTo(): google_protobuf_timestamp_pb.Timestamp | undefined;
88
+ setTo(value?: google_protobuf_timestamp_pb.Timestamp): ComputeForInstrumentRequest;
89
+ hasTo(): boolean;
90
+ clearTo(): ComputeForInstrumentRequest;
91
+
92
+ getType(): IndicatorType;
93
+ setType(value: IndicatorType): ComputeForInstrumentRequest;
94
+
95
+ getParamsMap(): jspb.Map<string, number>;
96
+ clearParamsMap(): ComputeForInstrumentRequest;
97
+
98
+ getPersist(): boolean;
99
+ setPersist(value: boolean): ComputeForInstrumentRequest;
100
+
101
+ serializeBinary(): Uint8Array;
102
+ toObject(includeInstance?: boolean): ComputeForInstrumentRequest.AsObject;
103
+ static toObject(includeInstance: boolean, msg: ComputeForInstrumentRequest): ComputeForInstrumentRequest.AsObject;
104
+ static serializeBinaryToWriter(message: ComputeForInstrumentRequest, writer: jspb.BinaryWriter): void;
105
+ static deserializeBinary(bytes: Uint8Array): ComputeForInstrumentRequest;
106
+ static deserializeBinaryFromReader(message: ComputeForInstrumentRequest, reader: jspb.BinaryReader): ComputeForInstrumentRequest;
107
+ }
108
+
109
+ export namespace ComputeForInstrumentRequest {
110
+ export type AsObject = {
111
+ uid: string,
112
+ interval: number,
113
+ from?: google_protobuf_timestamp_pb.Timestamp.AsObject,
114
+ to?: google_protobuf_timestamp_pb.Timestamp.AsObject,
115
+ type: IndicatorType,
116
+ paramsMap: Array<[string, number]>,
117
+ persist: boolean,
118
+ }
119
+ }
120
+
75
121
  export class IndicatorPoint extends jspb.Message {
76
122
  getTime(): google_protobuf_timestamp_pb.Timestamp | undefined;
77
123
  setTime(value?: google_protobuf_timestamp_pb.Timestamp): IndicatorPoint;
@@ -26,6 +26,7 @@ goog.object.extend(proto, google_api_annotations_pb);
26
26
  var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');
27
27
  goog.object.extend(proto, google_protobuf_timestamp_pb);
28
28
  goog.exportSymbol('proto.trb.indicators.v1.Candle', null, global);
29
+ goog.exportSymbol('proto.trb.indicators.v1.ComputeForInstrumentRequest', null, global);
29
30
  goog.exportSymbol('proto.trb.indicators.v1.ComputeRequest', null, global);
30
31
  goog.exportSymbol('proto.trb.indicators.v1.ComputeResponse', null, global);
31
32
  goog.exportSymbol('proto.trb.indicators.v1.IndicatorInfo', null, global);
@@ -75,6 +76,27 @@ if (goog.DEBUG && !COMPILED) {
75
76
  */
76
77
  proto.trb.indicators.v1.ComputeRequest.displayName = 'proto.trb.indicators.v1.ComputeRequest';
77
78
  }
79
+ /**
80
+ * Generated by JsPbCodeGenerator.
81
+ * @param {Array=} opt_data Optional initial data array, typically from a
82
+ * server response, or constructed directly in Javascript. The array is used
83
+ * in place and becomes part of the constructed object. It is not cloned.
84
+ * If no data is provided, the constructed object will be empty, but still
85
+ * valid.
86
+ * @extends {jspb.Message}
87
+ * @constructor
88
+ */
89
+ proto.trb.indicators.v1.ComputeForInstrumentRequest = function(opt_data) {
90
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
91
+ };
92
+ goog.inherits(proto.trb.indicators.v1.ComputeForInstrumentRequest, jspb.Message);
93
+ if (goog.DEBUG && !COMPILED) {
94
+ /**
95
+ * @public
96
+ * @override
97
+ */
98
+ proto.trb.indicators.v1.ComputeForInstrumentRequest.displayName = 'proto.trb.indicators.v1.ComputeForInstrumentRequest';
99
+ }
78
100
  /**
79
101
  * Generated by JsPbCodeGenerator.
80
102
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -708,6 +730,362 @@ proto.trb.indicators.v1.ComputeRequest.prototype.clearParamsMap = function() {
708
730
 
709
731
 
710
732
 
733
+ if (jspb.Message.GENERATE_TO_OBJECT) {
734
+ /**
735
+ * Creates an object representation of this proto.
736
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
737
+ * Optional fields that are not set will be set to undefined.
738
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
739
+ * For the list of reserved names please see:
740
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
741
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
742
+ * JSPB instance for transitional soy proto support:
743
+ * http://goto/soy-param-migration
744
+ * @return {!Object}
745
+ */
746
+ proto.trb.indicators.v1.ComputeForInstrumentRequest.prototype.toObject = function(opt_includeInstance) {
747
+ return proto.trb.indicators.v1.ComputeForInstrumentRequest.toObject(opt_includeInstance, this);
748
+ };
749
+
750
+
751
+ /**
752
+ * Static version of the {@see toObject} method.
753
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
754
+ * the JSPB instance for transitional soy proto support:
755
+ * http://goto/soy-param-migration
756
+ * @param {!proto.trb.indicators.v1.ComputeForInstrumentRequest} msg The msg instance to transform.
757
+ * @return {!Object}
758
+ * @suppress {unusedLocalVariables} f is only used for nested messages
759
+ */
760
+ proto.trb.indicators.v1.ComputeForInstrumentRequest.toObject = function(includeInstance, msg) {
761
+ var f, obj = {
762
+ uid: jspb.Message.getFieldWithDefault(msg, 1, ""),
763
+ interval: jspb.Message.getFieldWithDefault(msg, 2, 0),
764
+ from: (f = msg.getFrom()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
765
+ to: (f = msg.getTo()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
766
+ type: jspb.Message.getFieldWithDefault(msg, 5, 0),
767
+ paramsMap: (f = msg.getParamsMap()) ? f.toObject(includeInstance, undefined) : [],
768
+ persist: jspb.Message.getBooleanFieldWithDefault(msg, 7, false)
769
+ };
770
+
771
+ if (includeInstance) {
772
+ obj.$jspbMessageInstance = msg;
773
+ }
774
+ return obj;
775
+ };
776
+ }
777
+
778
+
779
+ /**
780
+ * Deserializes binary data (in protobuf wire format).
781
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
782
+ * @return {!proto.trb.indicators.v1.ComputeForInstrumentRequest}
783
+ */
784
+ proto.trb.indicators.v1.ComputeForInstrumentRequest.deserializeBinary = function(bytes) {
785
+ var reader = new jspb.BinaryReader(bytes);
786
+ var msg = new proto.trb.indicators.v1.ComputeForInstrumentRequest;
787
+ return proto.trb.indicators.v1.ComputeForInstrumentRequest.deserializeBinaryFromReader(msg, reader);
788
+ };
789
+
790
+
791
+ /**
792
+ * Deserializes binary data (in protobuf wire format) from the
793
+ * given reader into the given message object.
794
+ * @param {!proto.trb.indicators.v1.ComputeForInstrumentRequest} msg The message object to deserialize into.
795
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
796
+ * @return {!proto.trb.indicators.v1.ComputeForInstrumentRequest}
797
+ */
798
+ proto.trb.indicators.v1.ComputeForInstrumentRequest.deserializeBinaryFromReader = function(msg, reader) {
799
+ while (reader.nextField()) {
800
+ if (reader.isEndGroup()) {
801
+ break;
802
+ }
803
+ var field = reader.getFieldNumber();
804
+ switch (field) {
805
+ case 1:
806
+ var value = /** @type {string} */ (reader.readString());
807
+ msg.setUid(value);
808
+ break;
809
+ case 2:
810
+ var value = /** @type {number} */ (reader.readInt32());
811
+ msg.setInterval(value);
812
+ break;
813
+ case 3:
814
+ var value = new google_protobuf_timestamp_pb.Timestamp;
815
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
816
+ msg.setFrom(value);
817
+ break;
818
+ case 4:
819
+ var value = new google_protobuf_timestamp_pb.Timestamp;
820
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
821
+ msg.setTo(value);
822
+ break;
823
+ case 5:
824
+ var value = /** @type {!proto.trb.indicators.v1.IndicatorType} */ (reader.readEnum());
825
+ msg.setType(value);
826
+ break;
827
+ case 6:
828
+ var value = msg.getParamsMap();
829
+ reader.readMessage(value, function(message, reader) {
830
+ jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readDouble, null, "", 0.0);
831
+ });
832
+ break;
833
+ case 7:
834
+ var value = /** @type {boolean} */ (reader.readBool());
835
+ msg.setPersist(value);
836
+ break;
837
+ default:
838
+ reader.skipField();
839
+ break;
840
+ }
841
+ }
842
+ return msg;
843
+ };
844
+
845
+
846
+ /**
847
+ * Serializes the message to binary data (in protobuf wire format).
848
+ * @return {!Uint8Array}
849
+ */
850
+ proto.trb.indicators.v1.ComputeForInstrumentRequest.prototype.serializeBinary = function() {
851
+ var writer = new jspb.BinaryWriter();
852
+ proto.trb.indicators.v1.ComputeForInstrumentRequest.serializeBinaryToWriter(this, writer);
853
+ return writer.getResultBuffer();
854
+ };
855
+
856
+
857
+ /**
858
+ * Serializes the given message to binary data (in protobuf wire
859
+ * format), writing to the given BinaryWriter.
860
+ * @param {!proto.trb.indicators.v1.ComputeForInstrumentRequest} message
861
+ * @param {!jspb.BinaryWriter} writer
862
+ * @suppress {unusedLocalVariables} f is only used for nested messages
863
+ */
864
+ proto.trb.indicators.v1.ComputeForInstrumentRequest.serializeBinaryToWriter = function(message, writer) {
865
+ var f = undefined;
866
+ f = message.getUid();
867
+ if (f.length > 0) {
868
+ writer.writeString(
869
+ 1,
870
+ f
871
+ );
872
+ }
873
+ f = message.getInterval();
874
+ if (f !== 0) {
875
+ writer.writeInt32(
876
+ 2,
877
+ f
878
+ );
879
+ }
880
+ f = message.getFrom();
881
+ if (f != null) {
882
+ writer.writeMessage(
883
+ 3,
884
+ f,
885
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
886
+ );
887
+ }
888
+ f = message.getTo();
889
+ if (f != null) {
890
+ writer.writeMessage(
891
+ 4,
892
+ f,
893
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
894
+ );
895
+ }
896
+ f = message.getType();
897
+ if (f !== 0.0) {
898
+ writer.writeEnum(
899
+ 5,
900
+ f
901
+ );
902
+ }
903
+ f = message.getParamsMap(true);
904
+ if (f && f.getLength() > 0) {
905
+ f.serializeBinary(6, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeDouble);
906
+ }
907
+ f = message.getPersist();
908
+ if (f) {
909
+ writer.writeBool(
910
+ 7,
911
+ f
912
+ );
913
+ }
914
+ };
915
+
916
+
917
+ /**
918
+ * optional string uid = 1;
919
+ * @return {string}
920
+ */
921
+ proto.trb.indicators.v1.ComputeForInstrumentRequest.prototype.getUid = function() {
922
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
923
+ };
924
+
925
+
926
+ /**
927
+ * @param {string} value
928
+ * @return {!proto.trb.indicators.v1.ComputeForInstrumentRequest} returns this
929
+ */
930
+ proto.trb.indicators.v1.ComputeForInstrumentRequest.prototype.setUid = function(value) {
931
+ return jspb.Message.setProto3StringField(this, 1, value);
932
+ };
933
+
934
+
935
+ /**
936
+ * optional int32 interval = 2;
937
+ * @return {number}
938
+ */
939
+ proto.trb.indicators.v1.ComputeForInstrumentRequest.prototype.getInterval = function() {
940
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
941
+ };
942
+
943
+
944
+ /**
945
+ * @param {number} value
946
+ * @return {!proto.trb.indicators.v1.ComputeForInstrumentRequest} returns this
947
+ */
948
+ proto.trb.indicators.v1.ComputeForInstrumentRequest.prototype.setInterval = function(value) {
949
+ return jspb.Message.setProto3IntField(this, 2, value);
950
+ };
951
+
952
+
953
+ /**
954
+ * optional google.protobuf.Timestamp from = 3;
955
+ * @return {?proto.google.protobuf.Timestamp}
956
+ */
957
+ proto.trb.indicators.v1.ComputeForInstrumentRequest.prototype.getFrom = function() {
958
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
959
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3));
960
+ };
961
+
962
+
963
+ /**
964
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
965
+ * @return {!proto.trb.indicators.v1.ComputeForInstrumentRequest} returns this
966
+ */
967
+ proto.trb.indicators.v1.ComputeForInstrumentRequest.prototype.setFrom = function(value) {
968
+ return jspb.Message.setWrapperField(this, 3, value);
969
+ };
970
+
971
+
972
+ /**
973
+ * Clears the message field making it undefined.
974
+ * @return {!proto.trb.indicators.v1.ComputeForInstrumentRequest} returns this
975
+ */
976
+ proto.trb.indicators.v1.ComputeForInstrumentRequest.prototype.clearFrom = function() {
977
+ return this.setFrom(undefined);
978
+ };
979
+
980
+
981
+ /**
982
+ * Returns whether this field is set.
983
+ * @return {boolean}
984
+ */
985
+ proto.trb.indicators.v1.ComputeForInstrumentRequest.prototype.hasFrom = function() {
986
+ return jspb.Message.getField(this, 3) != null;
987
+ };
988
+
989
+
990
+ /**
991
+ * optional google.protobuf.Timestamp to = 4;
992
+ * @return {?proto.google.protobuf.Timestamp}
993
+ */
994
+ proto.trb.indicators.v1.ComputeForInstrumentRequest.prototype.getTo = function() {
995
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
996
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4));
997
+ };
998
+
999
+
1000
+ /**
1001
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
1002
+ * @return {!proto.trb.indicators.v1.ComputeForInstrumentRequest} returns this
1003
+ */
1004
+ proto.trb.indicators.v1.ComputeForInstrumentRequest.prototype.setTo = function(value) {
1005
+ return jspb.Message.setWrapperField(this, 4, value);
1006
+ };
1007
+
1008
+
1009
+ /**
1010
+ * Clears the message field making it undefined.
1011
+ * @return {!proto.trb.indicators.v1.ComputeForInstrumentRequest} returns this
1012
+ */
1013
+ proto.trb.indicators.v1.ComputeForInstrumentRequest.prototype.clearTo = function() {
1014
+ return this.setTo(undefined);
1015
+ };
1016
+
1017
+
1018
+ /**
1019
+ * Returns whether this field is set.
1020
+ * @return {boolean}
1021
+ */
1022
+ proto.trb.indicators.v1.ComputeForInstrumentRequest.prototype.hasTo = function() {
1023
+ return jspb.Message.getField(this, 4) != null;
1024
+ };
1025
+
1026
+
1027
+ /**
1028
+ * optional IndicatorType type = 5;
1029
+ * @return {!proto.trb.indicators.v1.IndicatorType}
1030
+ */
1031
+ proto.trb.indicators.v1.ComputeForInstrumentRequest.prototype.getType = function() {
1032
+ return /** @type {!proto.trb.indicators.v1.IndicatorType} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
1033
+ };
1034
+
1035
+
1036
+ /**
1037
+ * @param {!proto.trb.indicators.v1.IndicatorType} value
1038
+ * @return {!proto.trb.indicators.v1.ComputeForInstrumentRequest} returns this
1039
+ */
1040
+ proto.trb.indicators.v1.ComputeForInstrumentRequest.prototype.setType = function(value) {
1041
+ return jspb.Message.setProto3EnumField(this, 5, value);
1042
+ };
1043
+
1044
+
1045
+ /**
1046
+ * map<string, double> params = 6;
1047
+ * @param {boolean=} opt_noLazyCreate Do not create the map if
1048
+ * empty, instead returning `undefined`
1049
+ * @return {!jspb.Map<string,number>}
1050
+ */
1051
+ proto.trb.indicators.v1.ComputeForInstrumentRequest.prototype.getParamsMap = function(opt_noLazyCreate) {
1052
+ return /** @type {!jspb.Map<string,number>} */ (
1053
+ jspb.Message.getMapField(this, 6, opt_noLazyCreate,
1054
+ null));
1055
+ };
1056
+
1057
+
1058
+ /**
1059
+ * Clears values from the map. The map will be non-null.
1060
+ * @return {!proto.trb.indicators.v1.ComputeForInstrumentRequest} returns this
1061
+ */
1062
+ proto.trb.indicators.v1.ComputeForInstrumentRequest.prototype.clearParamsMap = function() {
1063
+ this.getParamsMap().clear();
1064
+ return this;
1065
+ };
1066
+
1067
+
1068
+ /**
1069
+ * optional bool persist = 7;
1070
+ * @return {boolean}
1071
+ */
1072
+ proto.trb.indicators.v1.ComputeForInstrumentRequest.prototype.getPersist = function() {
1073
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false));
1074
+ };
1075
+
1076
+
1077
+ /**
1078
+ * @param {boolean} value
1079
+ * @return {!proto.trb.indicators.v1.ComputeForInstrumentRequest} returns this
1080
+ */
1081
+ proto.trb.indicators.v1.ComputeForInstrumentRequest.prototype.setPersist = function(value) {
1082
+ return jspb.Message.setProto3BooleanField(this, 7, value);
1083
+ };
1084
+
1085
+
1086
+
1087
+
1088
+
711
1089
  if (jspb.Message.GENERATE_TO_OBJECT) {
712
1090
  /**
713
1091
  * Creates an object representation of this proto.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marleena/trb-proto",
3
- "version": "1.0.38",
3
+ "version": "1.0.40",
4
4
  "description": "Generated protobuf messages and gRPC-Web clients for TrB services",
5
5
  "license": "MIT",
6
6
  "repository": {