@aceplus/smartace-api 3.7.0-alpha.10 → 3.7.0-alpha.12

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.
@@ -49,6 +49,15 @@ type GroupGRPCSearch = {
49
49
  readonly responseType: typeof platform_group_pb.GroupProto.SearchReply;
50
50
  };
51
51
 
52
+ type GroupGRPCGetSpics = {
53
+ readonly methodName: string;
54
+ readonly service: typeof GroupGRPC;
55
+ readonly requestStream: false;
56
+ readonly responseStream: false;
57
+ readonly requestType: typeof platform_group_pb.GroupProto.GetSpicsRequest;
58
+ readonly responseType: typeof platform_group_pb.GroupProto.GetSpicsResponse;
59
+ };
60
+
52
61
  export class GroupGRPC {
53
62
  static readonly serviceName: string;
54
63
  static readonly Create: GroupGRPCCreate;
@@ -56,6 +65,7 @@ export class GroupGRPC {
56
65
  static readonly Update: GroupGRPCUpdate;
57
66
  static readonly Delete: GroupGRPCDelete;
58
67
  static readonly Search: GroupGRPCSearch;
68
+ static readonly GetSpics: GroupGRPCGetSpics;
59
69
  }
60
70
 
61
71
  export type ServiceError = { message: string, code: number; metadata: grpc.Metadata }
@@ -135,5 +145,14 @@ export class GroupGRPCClient {
135
145
  requestMessage: platform_group_pb.GroupProto.SearchRequest,
136
146
  callback: (error: ServiceError|null, responseMessage: platform_group_pb.GroupProto.SearchReply|null) => void
137
147
  ): UnaryResponse;
148
+ getSpics(
149
+ requestMessage: platform_group_pb.GroupProto.GetSpicsRequest,
150
+ metadata: grpc.Metadata,
151
+ callback: (error: ServiceError|null, responseMessage: platform_group_pb.GroupProto.GetSpicsResponse|null) => void
152
+ ): UnaryResponse;
153
+ getSpics(
154
+ requestMessage: platform_group_pb.GroupProto.GetSpicsRequest,
155
+ callback: (error: ServiceError|null, responseMessage: platform_group_pb.GroupProto.GetSpicsResponse|null) => void
156
+ ): UnaryResponse;
138
157
  }
139
158
 
@@ -55,6 +55,15 @@ GroupGRPC.Search = {
55
55
  responseType: platform_group_pb.GroupProto.SearchReply
56
56
  };
57
57
 
58
+ GroupGRPC.GetSpics = {
59
+ methodName: "GetSpics",
60
+ service: GroupGRPC,
61
+ requestStream: false,
62
+ responseStream: false,
63
+ requestType: platform_group_pb.GroupProto.GetSpicsRequest,
64
+ responseType: platform_group_pb.GroupProto.GetSpicsResponse
65
+ };
66
+
58
67
  exports.GroupGRPC = GroupGRPC;
59
68
 
60
69
  function GroupGRPCClient(serviceHost, options) {
@@ -217,5 +226,36 @@ GroupGRPCClient.prototype.search = function search(requestMessage, metadata, cal
217
226
  };
218
227
  };
219
228
 
229
+ GroupGRPCClient.prototype.getSpics = function getSpics(requestMessage, metadata, callback) {
230
+ if (arguments.length === 2) {
231
+ callback = arguments[1];
232
+ }
233
+ var client = grpc.unary(GroupGRPC.GetSpics, {
234
+ request: requestMessage,
235
+ host: this.serviceHost,
236
+ metadata: metadata,
237
+ transport: this.options.transport,
238
+ debug: this.options.debug,
239
+ onEnd: function (response) {
240
+ if (callback) {
241
+ if (response.status !== grpc.Code.OK) {
242
+ var err = new Error(response.statusMessage);
243
+ err.code = response.status;
244
+ err.metadata = response.trailers;
245
+ callback(err, null);
246
+ } else {
247
+ callback(null, response.message);
248
+ }
249
+ }
250
+ }
251
+ });
252
+ return {
253
+ cancel: function () {
254
+ callback = null;
255
+ client.close();
256
+ }
257
+ };
258
+ };
259
+
220
260
  exports.GroupGRPCClient = GroupGRPCClient;
221
261
 
@@ -508,6 +508,44 @@ export namespace AssetProto {
508
508
  }
509
509
  }
510
510
 
511
+ export class AssetTypeRequest extends jspb.Message {
512
+ serializeBinary(): Uint8Array;
513
+ toObject(includeInstance?: boolean): AssetTypeRequest.AsObject;
514
+ static toObject(includeInstance: boolean, msg: AssetTypeRequest): AssetTypeRequest.AsObject;
515
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
516
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
517
+ static serializeBinaryToWriter(message: AssetTypeRequest, writer: jspb.BinaryWriter): void;
518
+ static deserializeBinary(bytes: Uint8Array): AssetTypeRequest;
519
+ static deserializeBinaryFromReader(message: AssetTypeRequest, reader: jspb.BinaryReader): AssetTypeRequest;
520
+ }
521
+
522
+ export namespace AssetTypeRequest {
523
+ export type AsObject = {
524
+ }
525
+ }
526
+
527
+ export class AssetTypeResponse extends jspb.Message {
528
+ clearTypesList(): void;
529
+ getTypesList(): Array<AssetProto.AssetTypeMap[keyof AssetProto.AssetTypeMap]>;
530
+ setTypesList(value: Array<AssetProto.AssetTypeMap[keyof AssetProto.AssetTypeMap]>): void;
531
+ addTypes(value: AssetProto.AssetTypeMap[keyof AssetProto.AssetTypeMap], index?: number): AssetProto.AssetTypeMap[keyof AssetProto.AssetTypeMap];
532
+
533
+ serializeBinary(): Uint8Array;
534
+ toObject(includeInstance?: boolean): AssetTypeResponse.AsObject;
535
+ static toObject(includeInstance: boolean, msg: AssetTypeResponse): AssetTypeResponse.AsObject;
536
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
537
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
538
+ static serializeBinaryToWriter(message: AssetTypeResponse, writer: jspb.BinaryWriter): void;
539
+ static deserializeBinary(bytes: Uint8Array): AssetTypeResponse;
540
+ static deserializeBinaryFromReader(message: AssetTypeResponse, reader: jspb.BinaryReader): AssetTypeResponse;
541
+ }
542
+
543
+ export namespace AssetTypeResponse {
544
+ export type AsObject = {
545
+ typesList: Array<AssetProto.AssetTypeMap[keyof AssetProto.AssetTypeMap]>,
546
+ }
547
+ }
548
+
511
549
  export interface BatteryStatusMap {
512
550
  UNKOWWN: 0;
513
551
  OK: 1;
package/spic.asset_pb.js CHANGED
@@ -35,6 +35,8 @@ var google_api_annotations_pb = require('./google/api/annotations_pb.js');
35
35
  goog.object.extend(proto, google_api_annotations_pb);
36
36
  goog.exportSymbol('proto.Spic.AssetProto', null, global);
37
37
  goog.exportSymbol('proto.Spic.AssetProto.AssetType', null, global);
38
+ goog.exportSymbol('proto.Spic.AssetProto.AssetTypeRequest', null, global);
39
+ goog.exportSymbol('proto.Spic.AssetProto.AssetTypeResponse', null, global);
38
40
  goog.exportSymbol('proto.Spic.AssetProto.BatteryStatus', null, global);
39
41
  goog.exportSymbol('proto.Spic.AssetProto.CreateRequest', null, global);
40
42
  goog.exportSymbol('proto.Spic.AssetProto.DeleteRequest', null, global);
@@ -350,6 +352,48 @@ if (goog.DEBUG && !COMPILED) {
350
352
  */
351
353
  proto.Spic.AssetProto.StateChangedEvent.displayName = 'proto.Spic.AssetProto.StateChangedEvent';
352
354
  }
355
+ /**
356
+ * Generated by JsPbCodeGenerator.
357
+ * @param {Array=} opt_data Optional initial data array, typically from a
358
+ * server response, or constructed directly in Javascript. The array is used
359
+ * in place and becomes part of the constructed object. It is not cloned.
360
+ * If no data is provided, the constructed object will be empty, but still
361
+ * valid.
362
+ * @extends {jspb.Message}
363
+ * @constructor
364
+ */
365
+ proto.Spic.AssetProto.AssetTypeRequest = function(opt_data) {
366
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
367
+ };
368
+ goog.inherits(proto.Spic.AssetProto.AssetTypeRequest, jspb.Message);
369
+ if (goog.DEBUG && !COMPILED) {
370
+ /**
371
+ * @public
372
+ * @override
373
+ */
374
+ proto.Spic.AssetProto.AssetTypeRequest.displayName = 'proto.Spic.AssetProto.AssetTypeRequest';
375
+ }
376
+ /**
377
+ * Generated by JsPbCodeGenerator.
378
+ * @param {Array=} opt_data Optional initial data array, typically from a
379
+ * server response, or constructed directly in Javascript. The array is used
380
+ * in place and becomes part of the constructed object. It is not cloned.
381
+ * If no data is provided, the constructed object will be empty, but still
382
+ * valid.
383
+ * @extends {jspb.Message}
384
+ * @constructor
385
+ */
386
+ proto.Spic.AssetProto.AssetTypeResponse = function(opt_data) {
387
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.Spic.AssetProto.AssetTypeResponse.repeatedFields_, null);
388
+ };
389
+ goog.inherits(proto.Spic.AssetProto.AssetTypeResponse, jspb.Message);
390
+ if (goog.DEBUG && !COMPILED) {
391
+ /**
392
+ * @public
393
+ * @override
394
+ */
395
+ proto.Spic.AssetProto.AssetTypeResponse.displayName = 'proto.Spic.AssetProto.AssetTypeResponse';
396
+ }
353
397
  /**
354
398
  * Generated by JsPbCodeGenerator.
355
399
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -3547,6 +3591,265 @@ proto.Spic.AssetProto.StateChangedEvent.prototype.setOnlyAttributesUpdated = fun
3547
3591
  };
3548
3592
 
3549
3593
 
3594
+
3595
+
3596
+
3597
+ if (jspb.Message.GENERATE_TO_OBJECT) {
3598
+ /**
3599
+ * Creates an object representation of this proto.
3600
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
3601
+ * Optional fields that are not set will be set to undefined.
3602
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
3603
+ * For the list of reserved names please see:
3604
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
3605
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
3606
+ * JSPB instance for transitional soy proto support:
3607
+ * http://goto/soy-param-migration
3608
+ * @return {!Object}
3609
+ */
3610
+ proto.Spic.AssetProto.AssetTypeRequest.prototype.toObject = function(opt_includeInstance) {
3611
+ return proto.Spic.AssetProto.AssetTypeRequest.toObject(opt_includeInstance, this);
3612
+ };
3613
+
3614
+
3615
+ /**
3616
+ * Static version of the {@see toObject} method.
3617
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3618
+ * the JSPB instance for transitional soy proto support:
3619
+ * http://goto/soy-param-migration
3620
+ * @param {!proto.Spic.AssetProto.AssetTypeRequest} msg The msg instance to transform.
3621
+ * @return {!Object}
3622
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3623
+ */
3624
+ proto.Spic.AssetProto.AssetTypeRequest.toObject = function(includeInstance, msg) {
3625
+ var f, obj = {
3626
+
3627
+ };
3628
+
3629
+ if (includeInstance) {
3630
+ obj.$jspbMessageInstance = msg;
3631
+ }
3632
+ return obj;
3633
+ };
3634
+ }
3635
+
3636
+
3637
+ /**
3638
+ * Deserializes binary data (in protobuf wire format).
3639
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
3640
+ * @return {!proto.Spic.AssetProto.AssetTypeRequest}
3641
+ */
3642
+ proto.Spic.AssetProto.AssetTypeRequest.deserializeBinary = function(bytes) {
3643
+ var reader = new jspb.BinaryReader(bytes);
3644
+ var msg = new proto.Spic.AssetProto.AssetTypeRequest;
3645
+ return proto.Spic.AssetProto.AssetTypeRequest.deserializeBinaryFromReader(msg, reader);
3646
+ };
3647
+
3648
+
3649
+ /**
3650
+ * Deserializes binary data (in protobuf wire format) from the
3651
+ * given reader into the given message object.
3652
+ * @param {!proto.Spic.AssetProto.AssetTypeRequest} msg The message object to deserialize into.
3653
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3654
+ * @return {!proto.Spic.AssetProto.AssetTypeRequest}
3655
+ */
3656
+ proto.Spic.AssetProto.AssetTypeRequest.deserializeBinaryFromReader = function(msg, reader) {
3657
+ while (reader.nextField()) {
3658
+ if (reader.isEndGroup()) {
3659
+ break;
3660
+ }
3661
+ var field = reader.getFieldNumber();
3662
+ switch (field) {
3663
+ default:
3664
+ reader.skipField();
3665
+ break;
3666
+ }
3667
+ }
3668
+ return msg;
3669
+ };
3670
+
3671
+
3672
+ /**
3673
+ * Serializes the message to binary data (in protobuf wire format).
3674
+ * @return {!Uint8Array}
3675
+ */
3676
+ proto.Spic.AssetProto.AssetTypeRequest.prototype.serializeBinary = function() {
3677
+ var writer = new jspb.BinaryWriter();
3678
+ proto.Spic.AssetProto.AssetTypeRequest.serializeBinaryToWriter(this, writer);
3679
+ return writer.getResultBuffer();
3680
+ };
3681
+
3682
+
3683
+ /**
3684
+ * Serializes the given message to binary data (in protobuf wire
3685
+ * format), writing to the given BinaryWriter.
3686
+ * @param {!proto.Spic.AssetProto.AssetTypeRequest} message
3687
+ * @param {!jspb.BinaryWriter} writer
3688
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3689
+ */
3690
+ proto.Spic.AssetProto.AssetTypeRequest.serializeBinaryToWriter = function(message, writer) {
3691
+ var f = undefined;
3692
+ };
3693
+
3694
+
3695
+
3696
+ /**
3697
+ * List of repeated fields within this message type.
3698
+ * @private {!Array<number>}
3699
+ * @const
3700
+ */
3701
+ proto.Spic.AssetProto.AssetTypeResponse.repeatedFields_ = [1];
3702
+
3703
+
3704
+
3705
+ if (jspb.Message.GENERATE_TO_OBJECT) {
3706
+ /**
3707
+ * Creates an object representation of this proto.
3708
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
3709
+ * Optional fields that are not set will be set to undefined.
3710
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
3711
+ * For the list of reserved names please see:
3712
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
3713
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
3714
+ * JSPB instance for transitional soy proto support:
3715
+ * http://goto/soy-param-migration
3716
+ * @return {!Object}
3717
+ */
3718
+ proto.Spic.AssetProto.AssetTypeResponse.prototype.toObject = function(opt_includeInstance) {
3719
+ return proto.Spic.AssetProto.AssetTypeResponse.toObject(opt_includeInstance, this);
3720
+ };
3721
+
3722
+
3723
+ /**
3724
+ * Static version of the {@see toObject} method.
3725
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3726
+ * the JSPB instance for transitional soy proto support:
3727
+ * http://goto/soy-param-migration
3728
+ * @param {!proto.Spic.AssetProto.AssetTypeResponse} msg The msg instance to transform.
3729
+ * @return {!Object}
3730
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3731
+ */
3732
+ proto.Spic.AssetProto.AssetTypeResponse.toObject = function(includeInstance, msg) {
3733
+ var f, obj = {
3734
+ typesList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f
3735
+ };
3736
+
3737
+ if (includeInstance) {
3738
+ obj.$jspbMessageInstance = msg;
3739
+ }
3740
+ return obj;
3741
+ };
3742
+ }
3743
+
3744
+
3745
+ /**
3746
+ * Deserializes binary data (in protobuf wire format).
3747
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
3748
+ * @return {!proto.Spic.AssetProto.AssetTypeResponse}
3749
+ */
3750
+ proto.Spic.AssetProto.AssetTypeResponse.deserializeBinary = function(bytes) {
3751
+ var reader = new jspb.BinaryReader(bytes);
3752
+ var msg = new proto.Spic.AssetProto.AssetTypeResponse;
3753
+ return proto.Spic.AssetProto.AssetTypeResponse.deserializeBinaryFromReader(msg, reader);
3754
+ };
3755
+
3756
+
3757
+ /**
3758
+ * Deserializes binary data (in protobuf wire format) from the
3759
+ * given reader into the given message object.
3760
+ * @param {!proto.Spic.AssetProto.AssetTypeResponse} msg The message object to deserialize into.
3761
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3762
+ * @return {!proto.Spic.AssetProto.AssetTypeResponse}
3763
+ */
3764
+ proto.Spic.AssetProto.AssetTypeResponse.deserializeBinaryFromReader = function(msg, reader) {
3765
+ while (reader.nextField()) {
3766
+ if (reader.isEndGroup()) {
3767
+ break;
3768
+ }
3769
+ var field = reader.getFieldNumber();
3770
+ switch (field) {
3771
+ case 1:
3772
+ var values = /** @type {!Array<!proto.Spic.AssetProto.AssetType>} */ (reader.isDelimited() ? reader.readPackedEnum() : [reader.readEnum()]);
3773
+ for (var i = 0; i < values.length; i++) {
3774
+ msg.addTypes(values[i]);
3775
+ }
3776
+ break;
3777
+ default:
3778
+ reader.skipField();
3779
+ break;
3780
+ }
3781
+ }
3782
+ return msg;
3783
+ };
3784
+
3785
+
3786
+ /**
3787
+ * Serializes the message to binary data (in protobuf wire format).
3788
+ * @return {!Uint8Array}
3789
+ */
3790
+ proto.Spic.AssetProto.AssetTypeResponse.prototype.serializeBinary = function() {
3791
+ var writer = new jspb.BinaryWriter();
3792
+ proto.Spic.AssetProto.AssetTypeResponse.serializeBinaryToWriter(this, writer);
3793
+ return writer.getResultBuffer();
3794
+ };
3795
+
3796
+
3797
+ /**
3798
+ * Serializes the given message to binary data (in protobuf wire
3799
+ * format), writing to the given BinaryWriter.
3800
+ * @param {!proto.Spic.AssetProto.AssetTypeResponse} message
3801
+ * @param {!jspb.BinaryWriter} writer
3802
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3803
+ */
3804
+ proto.Spic.AssetProto.AssetTypeResponse.serializeBinaryToWriter = function(message, writer) {
3805
+ var f = undefined;
3806
+ f = message.getTypesList();
3807
+ if (f.length > 0) {
3808
+ writer.writePackedEnum(
3809
+ 1,
3810
+ f
3811
+ );
3812
+ }
3813
+ };
3814
+
3815
+
3816
+ /**
3817
+ * repeated AssetType types = 1;
3818
+ * @return {!Array<!proto.Spic.AssetProto.AssetType>}
3819
+ */
3820
+ proto.Spic.AssetProto.AssetTypeResponse.prototype.getTypesList = function() {
3821
+ return /** @type {!Array<!proto.Spic.AssetProto.AssetType>} */ (jspb.Message.getRepeatedField(this, 1));
3822
+ };
3823
+
3824
+
3825
+ /**
3826
+ * @param {!Array<!proto.Spic.AssetProto.AssetType>} value
3827
+ * @return {!proto.Spic.AssetProto.AssetTypeResponse} returns this
3828
+ */
3829
+ proto.Spic.AssetProto.AssetTypeResponse.prototype.setTypesList = function(value) {
3830
+ return jspb.Message.setField(this, 1, value || []);
3831
+ };
3832
+
3833
+
3834
+ /**
3835
+ * @param {!proto.Spic.AssetProto.AssetType} value
3836
+ * @param {number=} opt_index
3837
+ * @return {!proto.Spic.AssetProto.AssetTypeResponse} returns this
3838
+ */
3839
+ proto.Spic.AssetProto.AssetTypeResponse.prototype.addTypes = function(value, opt_index) {
3840
+ return jspb.Message.addToRepeatedField(this, 1, value, opt_index);
3841
+ };
3842
+
3843
+
3844
+ /**
3845
+ * Clears the list making it empty but non-null.
3846
+ * @return {!proto.Spic.AssetProto.AssetTypeResponse} returns this
3847
+ */
3848
+ proto.Spic.AssetProto.AssetTypeResponse.prototype.clearTypesList = function() {
3849
+ return this.setTypesList([]);
3850
+ };
3851
+
3852
+
3550
3853
  /**
3551
3854
  * optional int64 id = 1;
3552
3855
  * @return {number}
@@ -77,6 +77,15 @@ type AssetGRPCReplaceBattery = {
77
77
  readonly responseType: typeof spic_asset_pb.AssetProto;
78
78
  };
79
79
 
80
+ type AssetGRPCGetAssetTypes = {
81
+ readonly methodName: string;
82
+ readonly service: typeof AssetGRPC;
83
+ readonly requestStream: false;
84
+ readonly responseStream: false;
85
+ readonly requestType: typeof spic_asset_pb.AssetProto.AssetTypeRequest;
86
+ readonly responseType: typeof spic_asset_pb.AssetProto.AssetTypeResponse;
87
+ };
88
+
80
89
  export class AssetGRPC {
81
90
  static readonly serviceName: string;
82
91
  static readonly Create: AssetGRPCCreate;
@@ -87,6 +96,7 @@ export class AssetGRPC {
87
96
  static readonly Search: AssetGRPCSearch;
88
97
  static readonly LocationSearch: AssetGRPCLocationSearch;
89
98
  static readonly ReplaceBattery: AssetGRPCReplaceBattery;
99
+ static readonly GetAssetTypes: AssetGRPCGetAssetTypes;
90
100
  }
91
101
 
92
102
  export type ServiceError = { message: string, code: number; metadata: grpc.Metadata }
@@ -193,5 +203,14 @@ export class AssetGRPCClient {
193
203
  requestMessage: spic_asset_pb.AssetProto.ReplaceBatteryRequest,
194
204
  callback: (error: ServiceError|null, responseMessage: spic_asset_pb.AssetProto|null) => void
195
205
  ): UnaryResponse;
206
+ getAssetTypes(
207
+ requestMessage: spic_asset_pb.AssetProto.AssetTypeRequest,
208
+ metadata: grpc.Metadata,
209
+ callback: (error: ServiceError|null, responseMessage: spic_asset_pb.AssetProto.AssetTypeResponse|null) => void
210
+ ): UnaryResponse;
211
+ getAssetTypes(
212
+ requestMessage: spic_asset_pb.AssetProto.AssetTypeRequest,
213
+ callback: (error: ServiceError|null, responseMessage: spic_asset_pb.AssetProto.AssetTypeResponse|null) => void
214
+ ): UnaryResponse;
196
215
  }
197
216
 
@@ -83,6 +83,15 @@ AssetGRPC.ReplaceBattery = {
83
83
  responseType: spic_asset_pb.AssetProto
84
84
  };
85
85
 
86
+ AssetGRPC.GetAssetTypes = {
87
+ methodName: "GetAssetTypes",
88
+ service: AssetGRPC,
89
+ requestStream: false,
90
+ responseStream: false,
91
+ requestType: spic_asset_pb.AssetProto.AssetTypeRequest,
92
+ responseType: spic_asset_pb.AssetProto.AssetTypeResponse
93
+ };
94
+
86
95
  exports.AssetGRPC = AssetGRPC;
87
96
 
88
97
  function AssetGRPCClient(serviceHost, options) {
@@ -338,5 +347,36 @@ AssetGRPCClient.prototype.replaceBattery = function replaceBattery(requestMessag
338
347
  };
339
348
  };
340
349
 
350
+ AssetGRPCClient.prototype.getAssetTypes = function getAssetTypes(requestMessage, metadata, callback) {
351
+ if (arguments.length === 2) {
352
+ callback = arguments[1];
353
+ }
354
+ var client = grpc.unary(AssetGRPC.GetAssetTypes, {
355
+ request: requestMessage,
356
+ host: this.serviceHost,
357
+ metadata: metadata,
358
+ transport: this.options.transport,
359
+ debug: this.options.debug,
360
+ onEnd: function (response) {
361
+ if (callback) {
362
+ if (response.status !== grpc.Code.OK) {
363
+ var err = new Error(response.statusMessage);
364
+ err.code = response.status;
365
+ err.metadata = response.trailers;
366
+ callback(err, null);
367
+ } else {
368
+ callback(null, response.message);
369
+ }
370
+ }
371
+ }
372
+ });
373
+ return {
374
+ cancel: function () {
375
+ callback = null;
376
+ client.close();
377
+ }
378
+ };
379
+ };
380
+
341
381
  exports.AssetGRPCClient = AssetGRPCClient;
342
382