@aceplus/smartace-api 2.11.0-alpha.3 → 2.11.0-alpha.4
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/package.json +1 -1
- package/spic.cabinet_pb.d.ts +34 -0
- package/spic.cabinet_pb.js +264 -1
- package/spic.cabinet_pb_service.d.ts +19 -0
- package/spic.cabinet_pb_service.js +40 -0
package/package.json
CHANGED
package/spic.cabinet_pb.d.ts
CHANGED
|
@@ -56,6 +56,17 @@ export class CabinetProto extends jspb.Message {
|
|
|
56
56
|
getImageBlob(): string;
|
|
57
57
|
setImageBlob(value: string): void;
|
|
58
58
|
|
|
59
|
+
hasBatteryPlaced(): boolean;
|
|
60
|
+
clearBatteryPlaced(): void;
|
|
61
|
+
getBatteryPlaced(): google_protobuf_timestamp_pb.Timestamp | undefined;
|
|
62
|
+
setBatteryPlaced(value?: google_protobuf_timestamp_pb.Timestamp): void;
|
|
63
|
+
|
|
64
|
+
getBatteryPercentage(): number;
|
|
65
|
+
setBatteryPercentage(value: number): void;
|
|
66
|
+
|
|
67
|
+
getCommunicationTime(): number;
|
|
68
|
+
setCommunicationTime(value: number): void;
|
|
69
|
+
|
|
59
70
|
serializeBinary(): Uint8Array;
|
|
60
71
|
toObject(includeInstance?: boolean): CabinetProto.AsObject;
|
|
61
72
|
static toObject(includeInstance: boolean, msg: CabinetProto): CabinetProto.AsObject;
|
|
@@ -82,6 +93,9 @@ export namespace CabinetProto {
|
|
|
82
93
|
clientId: number,
|
|
83
94
|
isMaintenance: boolean,
|
|
84
95
|
imageBlob: string,
|
|
96
|
+
batteryPlaced?: google_protobuf_timestamp_pb.Timestamp.AsObject,
|
|
97
|
+
batteryPercentage: number,
|
|
98
|
+
communicationTime: number,
|
|
85
99
|
}
|
|
86
100
|
|
|
87
101
|
export class CreateRequest extends jspb.Message {
|
|
@@ -396,6 +410,26 @@ export namespace CabinetProto {
|
|
|
396
410
|
}
|
|
397
411
|
}
|
|
398
412
|
|
|
413
|
+
export class ReplaceBatteryRequest extends jspb.Message {
|
|
414
|
+
getId(): number;
|
|
415
|
+
setId(value: number): void;
|
|
416
|
+
|
|
417
|
+
serializeBinary(): Uint8Array;
|
|
418
|
+
toObject(includeInstance?: boolean): ReplaceBatteryRequest.AsObject;
|
|
419
|
+
static toObject(includeInstance: boolean, msg: ReplaceBatteryRequest): ReplaceBatteryRequest.AsObject;
|
|
420
|
+
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
|
421
|
+
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
422
|
+
static serializeBinaryToWriter(message: ReplaceBatteryRequest, writer: jspb.BinaryWriter): void;
|
|
423
|
+
static deserializeBinary(bytes: Uint8Array): ReplaceBatteryRequest;
|
|
424
|
+
static deserializeBinaryFromReader(message: ReplaceBatteryRequest, reader: jspb.BinaryReader): ReplaceBatteryRequest;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
export namespace ReplaceBatteryRequest {
|
|
428
|
+
export type AsObject = {
|
|
429
|
+
id: number,
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
|
|
399
433
|
export class Image extends jspb.Message {
|
|
400
434
|
serializeBinary(): Uint8Array;
|
|
401
435
|
toObject(includeInstance?: boolean): Image.AsObject;
|
package/spic.cabinet_pb.js
CHANGED
|
@@ -58,6 +58,7 @@ goog.exportSymbol('proto.Spic.CabinetProto.OpenRequest.DeactivateRequest', null,
|
|
|
58
58
|
goog.exportSymbol('proto.Spic.CabinetProto.OpenRequest.OpenRequestType', null, global);
|
|
59
59
|
goog.exportSymbol('proto.Spic.CabinetProto.OpenRequest.SearchReply', null, global);
|
|
60
60
|
goog.exportSymbol('proto.Spic.CabinetProto.OpenRequest.SearchRequest', null, global);
|
|
61
|
+
goog.exportSymbol('proto.Spic.CabinetProto.ReplaceBatteryRequest', null, global);
|
|
61
62
|
goog.exportSymbol('proto.Spic.CabinetProto.RetrieveRequest', null, global);
|
|
62
63
|
goog.exportSymbol('proto.Spic.CabinetProto.RetrieveRequest.SearchCase', null, global);
|
|
63
64
|
goog.exportSymbol('proto.Spic.CabinetProto.SearchReply', null, global);
|
|
@@ -279,6 +280,27 @@ if (goog.DEBUG && !COMPILED) {
|
|
|
279
280
|
*/
|
|
280
281
|
proto.Spic.CabinetProto.LocationSearchReply.displayName = 'proto.Spic.CabinetProto.LocationSearchReply';
|
|
281
282
|
}
|
|
283
|
+
/**
|
|
284
|
+
* Generated by JsPbCodeGenerator.
|
|
285
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
286
|
+
* server response, or constructed directly in Javascript. The array is used
|
|
287
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
|
288
|
+
* If no data is provided, the constructed object will be empty, but still
|
|
289
|
+
* valid.
|
|
290
|
+
* @extends {jspb.Message}
|
|
291
|
+
* @constructor
|
|
292
|
+
*/
|
|
293
|
+
proto.Spic.CabinetProto.ReplaceBatteryRequest = function(opt_data) {
|
|
294
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
295
|
+
};
|
|
296
|
+
goog.inherits(proto.Spic.CabinetProto.ReplaceBatteryRequest, jspb.Message);
|
|
297
|
+
if (goog.DEBUG && !COMPILED) {
|
|
298
|
+
/**
|
|
299
|
+
* @public
|
|
300
|
+
* @override
|
|
301
|
+
*/
|
|
302
|
+
proto.Spic.CabinetProto.ReplaceBatteryRequest.displayName = 'proto.Spic.CabinetProto.ReplaceBatteryRequest';
|
|
303
|
+
}
|
|
282
304
|
/**
|
|
283
305
|
* Generated by JsPbCodeGenerator.
|
|
284
306
|
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
@@ -751,7 +773,10 @@ proto.Spic.CabinetProto.toObject = function(includeInstance, msg) {
|
|
|
751
773
|
groupId: jspb.Message.getFieldWithDefault(msg, 11, ""),
|
|
752
774
|
clientId: jspb.Message.getFieldWithDefault(msg, 12, 0),
|
|
753
775
|
isMaintenance: jspb.Message.getBooleanFieldWithDefault(msg, 13, false),
|
|
754
|
-
imageBlob: jspb.Message.getFieldWithDefault(msg, 14, "")
|
|
776
|
+
imageBlob: jspb.Message.getFieldWithDefault(msg, 14, ""),
|
|
777
|
+
batteryPlaced: (f = msg.getBatteryPlaced()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
|
|
778
|
+
batteryPercentage: jspb.Message.getFieldWithDefault(msg, 16, 0),
|
|
779
|
+
communicationTime: jspb.Message.getFieldWithDefault(msg, 17, 0)
|
|
755
780
|
};
|
|
756
781
|
|
|
757
782
|
if (includeInstance) {
|
|
@@ -847,6 +872,19 @@ proto.Spic.CabinetProto.deserializeBinaryFromReader = function(msg, reader) {
|
|
|
847
872
|
var value = /** @type {string} */ (reader.readString());
|
|
848
873
|
msg.setImageBlob(value);
|
|
849
874
|
break;
|
|
875
|
+
case 15:
|
|
876
|
+
var value = new google_protobuf_timestamp_pb.Timestamp;
|
|
877
|
+
reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
|
|
878
|
+
msg.setBatteryPlaced(value);
|
|
879
|
+
break;
|
|
880
|
+
case 16:
|
|
881
|
+
var value = /** @type {number} */ (reader.readInt32());
|
|
882
|
+
msg.setBatteryPercentage(value);
|
|
883
|
+
break;
|
|
884
|
+
case 17:
|
|
885
|
+
var value = /** @type {number} */ (reader.readInt64());
|
|
886
|
+
msg.setCommunicationTime(value);
|
|
887
|
+
break;
|
|
850
888
|
default:
|
|
851
889
|
reader.skipField();
|
|
852
890
|
break;
|
|
@@ -975,6 +1013,28 @@ proto.Spic.CabinetProto.serializeBinaryToWriter = function(message, writer) {
|
|
|
975
1013
|
f
|
|
976
1014
|
);
|
|
977
1015
|
}
|
|
1016
|
+
f = message.getBatteryPlaced();
|
|
1017
|
+
if (f != null) {
|
|
1018
|
+
writer.writeMessage(
|
|
1019
|
+
15,
|
|
1020
|
+
f,
|
|
1021
|
+
google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
|
|
1022
|
+
);
|
|
1023
|
+
}
|
|
1024
|
+
f = message.getBatteryPercentage();
|
|
1025
|
+
if (f !== 0) {
|
|
1026
|
+
writer.writeInt32(
|
|
1027
|
+
16,
|
|
1028
|
+
f
|
|
1029
|
+
);
|
|
1030
|
+
}
|
|
1031
|
+
f = message.getCommunicationTime();
|
|
1032
|
+
if (f !== 0) {
|
|
1033
|
+
writer.writeInt64(
|
|
1034
|
+
17,
|
|
1035
|
+
f
|
|
1036
|
+
);
|
|
1037
|
+
}
|
|
978
1038
|
};
|
|
979
1039
|
|
|
980
1040
|
|
|
@@ -3184,6 +3244,136 @@ proto.Spic.CabinetProto.LocationSearchReply.prototype.clearCabinetsList = functi
|
|
|
3184
3244
|
|
|
3185
3245
|
|
|
3186
3246
|
|
|
3247
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
3248
|
+
/**
|
|
3249
|
+
* Creates an object representation of this proto.
|
|
3250
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
3251
|
+
* Optional fields that are not set will be set to undefined.
|
|
3252
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
3253
|
+
* For the list of reserved names please see:
|
|
3254
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
|
3255
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
|
3256
|
+
* JSPB instance for transitional soy proto support:
|
|
3257
|
+
* http://goto/soy-param-migration
|
|
3258
|
+
* @return {!Object}
|
|
3259
|
+
*/
|
|
3260
|
+
proto.Spic.CabinetProto.ReplaceBatteryRequest.prototype.toObject = function(opt_includeInstance) {
|
|
3261
|
+
return proto.Spic.CabinetProto.ReplaceBatteryRequest.toObject(opt_includeInstance, this);
|
|
3262
|
+
};
|
|
3263
|
+
|
|
3264
|
+
|
|
3265
|
+
/**
|
|
3266
|
+
* Static version of the {@see toObject} method.
|
|
3267
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
|
3268
|
+
* the JSPB instance for transitional soy proto support:
|
|
3269
|
+
* http://goto/soy-param-migration
|
|
3270
|
+
* @param {!proto.Spic.CabinetProto.ReplaceBatteryRequest} msg The msg instance to transform.
|
|
3271
|
+
* @return {!Object}
|
|
3272
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
3273
|
+
*/
|
|
3274
|
+
proto.Spic.CabinetProto.ReplaceBatteryRequest.toObject = function(includeInstance, msg) {
|
|
3275
|
+
var f, obj = {
|
|
3276
|
+
id: jspb.Message.getFieldWithDefault(msg, 1, 0)
|
|
3277
|
+
};
|
|
3278
|
+
|
|
3279
|
+
if (includeInstance) {
|
|
3280
|
+
obj.$jspbMessageInstance = msg;
|
|
3281
|
+
}
|
|
3282
|
+
return obj;
|
|
3283
|
+
};
|
|
3284
|
+
}
|
|
3285
|
+
|
|
3286
|
+
|
|
3287
|
+
/**
|
|
3288
|
+
* Deserializes binary data (in protobuf wire format).
|
|
3289
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
3290
|
+
* @return {!proto.Spic.CabinetProto.ReplaceBatteryRequest}
|
|
3291
|
+
*/
|
|
3292
|
+
proto.Spic.CabinetProto.ReplaceBatteryRequest.deserializeBinary = function(bytes) {
|
|
3293
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
3294
|
+
var msg = new proto.Spic.CabinetProto.ReplaceBatteryRequest;
|
|
3295
|
+
return proto.Spic.CabinetProto.ReplaceBatteryRequest.deserializeBinaryFromReader(msg, reader);
|
|
3296
|
+
};
|
|
3297
|
+
|
|
3298
|
+
|
|
3299
|
+
/**
|
|
3300
|
+
* Deserializes binary data (in protobuf wire format) from the
|
|
3301
|
+
* given reader into the given message object.
|
|
3302
|
+
* @param {!proto.Spic.CabinetProto.ReplaceBatteryRequest} msg The message object to deserialize into.
|
|
3303
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
3304
|
+
* @return {!proto.Spic.CabinetProto.ReplaceBatteryRequest}
|
|
3305
|
+
*/
|
|
3306
|
+
proto.Spic.CabinetProto.ReplaceBatteryRequest.deserializeBinaryFromReader = function(msg, reader) {
|
|
3307
|
+
while (reader.nextField()) {
|
|
3308
|
+
if (reader.isEndGroup()) {
|
|
3309
|
+
break;
|
|
3310
|
+
}
|
|
3311
|
+
var field = reader.getFieldNumber();
|
|
3312
|
+
switch (field) {
|
|
3313
|
+
case 1:
|
|
3314
|
+
var value = /** @type {number} */ (reader.readInt64());
|
|
3315
|
+
msg.setId(value);
|
|
3316
|
+
break;
|
|
3317
|
+
default:
|
|
3318
|
+
reader.skipField();
|
|
3319
|
+
break;
|
|
3320
|
+
}
|
|
3321
|
+
}
|
|
3322
|
+
return msg;
|
|
3323
|
+
};
|
|
3324
|
+
|
|
3325
|
+
|
|
3326
|
+
/**
|
|
3327
|
+
* Serializes the message to binary data (in protobuf wire format).
|
|
3328
|
+
* @return {!Uint8Array}
|
|
3329
|
+
*/
|
|
3330
|
+
proto.Spic.CabinetProto.ReplaceBatteryRequest.prototype.serializeBinary = function() {
|
|
3331
|
+
var writer = new jspb.BinaryWriter();
|
|
3332
|
+
proto.Spic.CabinetProto.ReplaceBatteryRequest.serializeBinaryToWriter(this, writer);
|
|
3333
|
+
return writer.getResultBuffer();
|
|
3334
|
+
};
|
|
3335
|
+
|
|
3336
|
+
|
|
3337
|
+
/**
|
|
3338
|
+
* Serializes the given message to binary data (in protobuf wire
|
|
3339
|
+
* format), writing to the given BinaryWriter.
|
|
3340
|
+
* @param {!proto.Spic.CabinetProto.ReplaceBatteryRequest} message
|
|
3341
|
+
* @param {!jspb.BinaryWriter} writer
|
|
3342
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
3343
|
+
*/
|
|
3344
|
+
proto.Spic.CabinetProto.ReplaceBatteryRequest.serializeBinaryToWriter = function(message, writer) {
|
|
3345
|
+
var f = undefined;
|
|
3346
|
+
f = message.getId();
|
|
3347
|
+
if (f !== 0) {
|
|
3348
|
+
writer.writeInt64(
|
|
3349
|
+
1,
|
|
3350
|
+
f
|
|
3351
|
+
);
|
|
3352
|
+
}
|
|
3353
|
+
};
|
|
3354
|
+
|
|
3355
|
+
|
|
3356
|
+
/**
|
|
3357
|
+
* optional int64 id = 1;
|
|
3358
|
+
* @return {number}
|
|
3359
|
+
*/
|
|
3360
|
+
proto.Spic.CabinetProto.ReplaceBatteryRequest.prototype.getId = function() {
|
|
3361
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
|
|
3362
|
+
};
|
|
3363
|
+
|
|
3364
|
+
|
|
3365
|
+
/**
|
|
3366
|
+
* @param {number} value
|
|
3367
|
+
* @return {!proto.Spic.CabinetProto.ReplaceBatteryRequest} returns this
|
|
3368
|
+
*/
|
|
3369
|
+
proto.Spic.CabinetProto.ReplaceBatteryRequest.prototype.setId = function(value) {
|
|
3370
|
+
return jspb.Message.setProto3IntField(this, 1, value);
|
|
3371
|
+
};
|
|
3372
|
+
|
|
3373
|
+
|
|
3374
|
+
|
|
3375
|
+
|
|
3376
|
+
|
|
3187
3377
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
3188
3378
|
/**
|
|
3189
3379
|
* Creates an object representation of this proto.
|
|
@@ -8962,6 +9152,79 @@ proto.Spic.CabinetProto.prototype.setImageBlob = function(value) {
|
|
|
8962
9152
|
};
|
|
8963
9153
|
|
|
8964
9154
|
|
|
9155
|
+
/**
|
|
9156
|
+
* optional google.protobuf.Timestamp battery_placed = 15;
|
|
9157
|
+
* @return {?proto.google.protobuf.Timestamp}
|
|
9158
|
+
*/
|
|
9159
|
+
proto.Spic.CabinetProto.prototype.getBatteryPlaced = function() {
|
|
9160
|
+
return /** @type{?proto.google.protobuf.Timestamp} */ (
|
|
9161
|
+
jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 15));
|
|
9162
|
+
};
|
|
9163
|
+
|
|
9164
|
+
|
|
9165
|
+
/**
|
|
9166
|
+
* @param {?proto.google.protobuf.Timestamp|undefined} value
|
|
9167
|
+
* @return {!proto.Spic.CabinetProto} returns this
|
|
9168
|
+
*/
|
|
9169
|
+
proto.Spic.CabinetProto.prototype.setBatteryPlaced = function(value) {
|
|
9170
|
+
return jspb.Message.setWrapperField(this, 15, value);
|
|
9171
|
+
};
|
|
9172
|
+
|
|
9173
|
+
|
|
9174
|
+
/**
|
|
9175
|
+
* Clears the message field making it undefined.
|
|
9176
|
+
* @return {!proto.Spic.CabinetProto} returns this
|
|
9177
|
+
*/
|
|
9178
|
+
proto.Spic.CabinetProto.prototype.clearBatteryPlaced = function() {
|
|
9179
|
+
return this.setBatteryPlaced(undefined);
|
|
9180
|
+
};
|
|
9181
|
+
|
|
9182
|
+
|
|
9183
|
+
/**
|
|
9184
|
+
* Returns whether this field is set.
|
|
9185
|
+
* @return {boolean}
|
|
9186
|
+
*/
|
|
9187
|
+
proto.Spic.CabinetProto.prototype.hasBatteryPlaced = function() {
|
|
9188
|
+
return jspb.Message.getField(this, 15) != null;
|
|
9189
|
+
};
|
|
9190
|
+
|
|
9191
|
+
|
|
9192
|
+
/**
|
|
9193
|
+
* optional int32 battery_percentage = 16;
|
|
9194
|
+
* @return {number}
|
|
9195
|
+
*/
|
|
9196
|
+
proto.Spic.CabinetProto.prototype.getBatteryPercentage = function() {
|
|
9197
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0));
|
|
9198
|
+
};
|
|
9199
|
+
|
|
9200
|
+
|
|
9201
|
+
/**
|
|
9202
|
+
* @param {number} value
|
|
9203
|
+
* @return {!proto.Spic.CabinetProto} returns this
|
|
9204
|
+
*/
|
|
9205
|
+
proto.Spic.CabinetProto.prototype.setBatteryPercentage = function(value) {
|
|
9206
|
+
return jspb.Message.setProto3IntField(this, 16, value);
|
|
9207
|
+
};
|
|
9208
|
+
|
|
9209
|
+
|
|
9210
|
+
/**
|
|
9211
|
+
* optional int64 communication_time = 17;
|
|
9212
|
+
* @return {number}
|
|
9213
|
+
*/
|
|
9214
|
+
proto.Spic.CabinetProto.prototype.getCommunicationTime = function() {
|
|
9215
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 17, 0));
|
|
9216
|
+
};
|
|
9217
|
+
|
|
9218
|
+
|
|
9219
|
+
/**
|
|
9220
|
+
* @param {number} value
|
|
9221
|
+
* @return {!proto.Spic.CabinetProto} returns this
|
|
9222
|
+
*/
|
|
9223
|
+
proto.Spic.CabinetProto.prototype.setCommunicationTime = function(value) {
|
|
9224
|
+
return jspb.Message.setProto3IntField(this, 17, value);
|
|
9225
|
+
};
|
|
9226
|
+
|
|
9227
|
+
|
|
8965
9228
|
|
|
8966
9229
|
|
|
8967
9230
|
|
|
@@ -68,6 +68,15 @@ type CabinetGRPCLocationSearch = {
|
|
|
68
68
|
readonly responseType: typeof spic_cabinet_pb.CabinetProto.LocationSearchReply;
|
|
69
69
|
};
|
|
70
70
|
|
|
71
|
+
type CabinetGRPCReplaceBattery = {
|
|
72
|
+
readonly methodName: string;
|
|
73
|
+
readonly service: typeof CabinetGRPC;
|
|
74
|
+
readonly requestStream: false;
|
|
75
|
+
readonly responseStream: false;
|
|
76
|
+
readonly requestType: typeof spic_cabinet_pb.CabinetProto.ReplaceBatteryRequest;
|
|
77
|
+
readonly responseType: typeof spic_cabinet_pb.CabinetProto;
|
|
78
|
+
};
|
|
79
|
+
|
|
71
80
|
type CabinetGRPCSearchStates = {
|
|
72
81
|
readonly methodName: string;
|
|
73
82
|
readonly service: typeof CabinetGRPC;
|
|
@@ -122,6 +131,7 @@ export class CabinetGRPC {
|
|
|
122
131
|
static readonly RetrieveImage: CabinetGRPCRetrieveImage;
|
|
123
132
|
static readonly Search: CabinetGRPCSearch;
|
|
124
133
|
static readonly LocationSearch: CabinetGRPCLocationSearch;
|
|
134
|
+
static readonly ReplaceBattery: CabinetGRPCReplaceBattery;
|
|
125
135
|
static readonly SearchStates: CabinetGRPCSearchStates;
|
|
126
136
|
static readonly SearchEvents: CabinetGRPCSearchEvents;
|
|
127
137
|
static readonly CreateOpenRequest: CabinetGRPCCreateOpenRequest;
|
|
@@ -258,6 +268,15 @@ export class CabinetGRPCClient {
|
|
|
258
268
|
requestMessage: spic_cabinet_pb.CabinetProto.LocationSearchRequest,
|
|
259
269
|
callback: (error: ServiceError|null, responseMessage: spic_cabinet_pb.CabinetProto.LocationSearchReply|null) => void
|
|
260
270
|
): UnaryResponse;
|
|
271
|
+
replaceBattery(
|
|
272
|
+
requestMessage: spic_cabinet_pb.CabinetProto.ReplaceBatteryRequest,
|
|
273
|
+
metadata: grpc.Metadata,
|
|
274
|
+
callback: (error: ServiceError|null, responseMessage: spic_cabinet_pb.CabinetProto|null) => void
|
|
275
|
+
): UnaryResponse;
|
|
276
|
+
replaceBattery(
|
|
277
|
+
requestMessage: spic_cabinet_pb.CabinetProto.ReplaceBatteryRequest,
|
|
278
|
+
callback: (error: ServiceError|null, responseMessage: spic_cabinet_pb.CabinetProto|null) => void
|
|
279
|
+
): UnaryResponse;
|
|
261
280
|
searchStates(
|
|
262
281
|
requestMessage: spic_cabinet_pb.CabinetProto.State.SearchRequest,
|
|
263
282
|
metadata: grpc.Metadata,
|
|
@@ -74,6 +74,15 @@ CabinetGRPC.LocationSearch = {
|
|
|
74
74
|
responseType: spic_cabinet_pb.CabinetProto.LocationSearchReply
|
|
75
75
|
};
|
|
76
76
|
|
|
77
|
+
CabinetGRPC.ReplaceBattery = {
|
|
78
|
+
methodName: "ReplaceBattery",
|
|
79
|
+
service: CabinetGRPC,
|
|
80
|
+
requestStream: false,
|
|
81
|
+
responseStream: false,
|
|
82
|
+
requestType: spic_cabinet_pb.CabinetProto.ReplaceBatteryRequest,
|
|
83
|
+
responseType: spic_cabinet_pb.CabinetProto
|
|
84
|
+
};
|
|
85
|
+
|
|
77
86
|
CabinetGRPC.SearchStates = {
|
|
78
87
|
methodName: "SearchStates",
|
|
79
88
|
service: CabinetGRPC,
|
|
@@ -343,6 +352,37 @@ CabinetGRPCClient.prototype.locationSearch = function locationSearch(requestMess
|
|
|
343
352
|
};
|
|
344
353
|
};
|
|
345
354
|
|
|
355
|
+
CabinetGRPCClient.prototype.replaceBattery = function replaceBattery(requestMessage, metadata, callback) {
|
|
356
|
+
if (arguments.length === 2) {
|
|
357
|
+
callback = arguments[1];
|
|
358
|
+
}
|
|
359
|
+
var client = grpc.unary(CabinetGRPC.ReplaceBattery, {
|
|
360
|
+
request: requestMessage,
|
|
361
|
+
host: this.serviceHost,
|
|
362
|
+
metadata: metadata,
|
|
363
|
+
transport: this.options.transport,
|
|
364
|
+
debug: this.options.debug,
|
|
365
|
+
onEnd: function (response) {
|
|
366
|
+
if (callback) {
|
|
367
|
+
if (response.status !== grpc.Code.OK) {
|
|
368
|
+
var err = new Error(response.statusMessage);
|
|
369
|
+
err.code = response.status;
|
|
370
|
+
err.metadata = response.trailers;
|
|
371
|
+
callback(err, null);
|
|
372
|
+
} else {
|
|
373
|
+
callback(null, response.message);
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
});
|
|
378
|
+
return {
|
|
379
|
+
cancel: function () {
|
|
380
|
+
callback = null;
|
|
381
|
+
client.close();
|
|
382
|
+
}
|
|
383
|
+
};
|
|
384
|
+
};
|
|
385
|
+
|
|
346
386
|
CabinetGRPCClient.prototype.searchStates = function searchStates(requestMessage, metadata, callback) {
|
|
347
387
|
if (arguments.length === 2) {
|
|
348
388
|
callback = arguments[1];
|